Commit d4443bdc authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

wined3d: Make sure that "tgsm_count" is not decreased while adding TGSM declarations.

Suggested by Sebastian Lackner. Signed-off-by: 's avatarJózef Kucia <jkucia@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 287c1851
...@@ -884,7 +884,7 @@ static HRESULT shader_reg_maps_add_tgsm(struct wined3d_shader_reg_maps *reg_maps ...@@ -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))) register_idx + 1, sizeof(*reg_maps->tgsm)))
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
reg_maps->tgsm_count = register_idx + 1; reg_maps->tgsm_count = max(register_idx + 1, reg_maps->tgsm_count);
tgsm = &reg_maps->tgsm[register_idx]; tgsm = &reg_maps->tgsm[register_idx];
tgsm->size = size; tgsm->size = size;
tgsm->stride = stride; tgsm->stride = stride;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment