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

Nikolay Sivov nsivov at codeweavers.com
Tue Oct 5 03:29:04 CDT 2021



On 10/5/21 11:20 AM, Matteo Bruni wrote:
> 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.
Sure, no harm in that, I'll resend 7/7 with next batch then. Thanks for
the review.



More information about the wine-devel mailing list