wined3d: Make sure that "tgsm_count" is not decreased while adding TGSM declarations.
Suggested by Sebastian Lackner. Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
287c185173
commit
d4443bdc29
|
@ -884,7 +884,7 @@ static HRESULT shader_reg_maps_add_tgsm(struct wined3d_shader_reg_maps *reg_maps
|
|||
register_idx + 1, sizeof(*reg_maps->tgsm)))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
reg_maps->tgsm_count = register_idx + 1;
|
||||
reg_maps->tgsm_count = max(register_idx + 1, reg_maps->tgsm_count);
|
||||
tgsm = ®_maps->tgsm[register_idx];
|
||||
tgsm->size = size;
|
||||
tgsm->stride = stride;
|
||||
|
|
Loading…
Reference in New Issue