[PATCH 7/7] d3d10/effect: Use effect variable pointers to store per-pass shader objects.

Matteo Bruni matteo.mystral at gmail.com
Tue Oct 5 03:20:51 CDT 2021


On Mon, Oct 4, 2021 at 1:49 PM Nikolay Sivov <nsivov at codeweavers.com> wrote:
>
> Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
> ---
>  dlls/d3d10/d3d10_private.h |  9 +++--
>  dlls/d3d10/effect.c        | 74 +++++++++++++++++++-------------------
>  dlls/d3d10/tests/effect.c  | 28 +++++++++++++++
>  3 files changed, 72 insertions(+), 39 deletions(-)
>
> diff --git a/dlls/d3d10/d3d10_private.h b/dlls/d3d10/d3d10_private.h
> index 1ebbbd11ea3..216a5ae82a2 100644
> --- a/dlls/d3d10/d3d10_private.h
> +++ b/dlls/d3d10/d3d10_private.h
> @@ -238,9 +238,12 @@ struct d3d10_effect_pass
>      struct d3d10_effect_object *objects;
>      struct d3d10_effect_variable *annotations;
>
> -    D3D10_PASS_SHADER_DESC vs;
> -    D3D10_PASS_SHADER_DESC ps;
> -    D3D10_PASS_SHADER_DESC gs;
> +    struct d3d10_effect_variable *vs;
> +    struct d3d10_effect_variable *ps;
> +    struct d3d10_effect_variable *gs;
> +    unsigned int vs_index;
> +    unsigned int ps_index;
> +    unsigned int gs_index;
>      UINT stencil_ref;
>      UINT sample_mask;
>      float blend_factor[4];

I think It would be a bit nicer to introduce our own struct to store
both the variable pointer and the index, mirroring
D3D10_PASS_SHADER_DESC.



More information about the wine-devel mailing list