[PATCH 3/6] d3d10/effect: Store explicit bind point value for constant buffers and object variables.

Matteo Bruni matteo.mystral at gmail.com
Fri Aug 27 04:53:58 CDT 2021


On Thu, Aug 26, 2021 at 7:32 AM Nikolay Sivov <nsivov at codeweavers.com> wrote:
>
> Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
> ---
>  dlls/d3d10/d3d10_private.h | 1 +
>  dlls/d3d10/effect.c        | 8 ++++++--
>  2 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/dlls/d3d10/d3d10_private.h b/dlls/d3d10/d3d10_private.h
> index 751c39dc895..5e406110988 100644
> --- a/dlls/d3d10/d3d10_private.h
> +++ b/dlls/d3d10/d3d10_private.h
> @@ -199,6 +199,7 @@ struct d3d10_effect_variable
>      DWORD annotation_count;
>      DWORD flag;
>      DWORD data_size;
> +    DWORD explicit_bind_point;
>      struct d3d10_effect *effect;
>      struct d3d10_effect_variable *elements;
>      struct d3d10_effect_variable *members;
> diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c
> index fe494e952d6..acc7199138b 100644
> --- a/dlls/d3d10/effect.c
> +++ b/dlls/d3d10/effect.c
> @@ -1165,6 +1165,8 @@ static HRESULT parse_fx10_variable_head(const char *data, size_t data_size,
>      }
>      set_variable_vtbl(v);
>
> +    v->explicit_bind_point = ~0u;
> +
>      return copy_variableinfo_from_type(v);
>  }
>
> @@ -1927,7 +1929,8 @@ static HRESULT parse_fx10_local_variable(const char *data, size_t data_size,
>      }
>      TRACE("Variable semantic: %s.\n", debugstr_a(v->semantic));
>
> -    skip_dword_unknown("local variable", ptr, 1);
> +    read_dword(ptr, &v->explicit_bind_point);
> +    TRACE("Variable explicit bind point %#x.\n", v->explicit_bind_point);
>
>      switch (v->type->basetype)
>      {
> @@ -2191,7 +2194,8 @@ static HRESULT parse_fx10_local_buffer(const char *data, size_t data_size,
>      read_dword(ptr, &l->type->member_count);
>      TRACE("Local buffer member count: %#x.\n", l->type->member_count);
>
> -    skip_dword_unknown("local buffer", ptr, 1);
> +    read_dword(ptr, &l->explicit_bind_point);
> +    TRACE("Local buffer explicit bind point: %#x.\n", l->explicit_bind_point);
>
>      read_dword(ptr, &l->annotation_count);
>      TRACE("Local buffer has %u annotations.\n", l->annotation_count);

Can we add a test for these explicit bind points? Modifying a couple
of effects from the existing tests might be enough.



More information about the wine-devel mailing list