[PATCH 2/3] d3dx9: Set dirty flag on parameter change.

Paul Gofman gofmanp at gmail.com
Mon Mar 13 19:16:20 CDT 2017


Yes, arrays and structs are always considered completely dirty, it is in 
my test (for both shader constants and states).
Setting dirty each element here is actually a leftover from early 
implementation when I did not know that, I will fix it (just put it off 
the loop).

On 03/14/2017 12:42 AM, Matteo Bruni wrote:
> 2017-03-09 23:15 GMT+01:00 Paul Gofman <gofmanp at gmail.com>:
>
>> @@ -2021,9 +2055,11 @@ static HRESULT d3dx9_base_effect_set_matrix_array(struct d3dx9_base_effect *base
>>           switch (param->class)
>>           {
>>               case D3DXPC_MATRIX_ROWS:
>> +                set_dirty(param);
>>                   for (i = 0; i < count; ++i)
>>                   {
>>                       set_matrix(&param->members[i], &matrix[i]);
>> +                    set_dirty(&param->members[i]);
>>                   }
>>                   return D3D_OK;
>>
> Here and below it should be possible to avoid marking dirty each array
> element individually. IIRC I had some test showing that arrays are
> always considered completely dirty or clean on native i.e.
> CommitChanges updates the whole array even if you only change a subset
> of the elements.
>




More information about the wine-devel mailing list