wined3d: Bind unordered access views even if they are not used by current shaders.

An alternative would be to invalidate unordered access view bindings
when a shader is set.

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:
Józef Kucia 2017-03-03 01:30:33 +01:00 committed by Alexandre Julliard
parent 9db12225f4
commit a19e6265d7
1 changed files with 2 additions and 7 deletions

View File

@ -3410,9 +3410,6 @@ static void context_load_unordered_access_resources(struct wined3d_context *cont
for (i = 0; i < MAX_UNORDERED_ACCESS_VIEWS; ++i) for (i = 0; i < MAX_UNORDERED_ACCESS_VIEWS; ++i)
{ {
if (!shader->reg_maps.uav_resource_info[i].type)
continue;
if (!(view = views[i])) if (!(view = views[i]))
continue; continue;
@ -3447,12 +3444,10 @@ static void context_bind_unordered_access_views(struct wined3d_context *context,
for (i = 0; i < MAX_UNORDERED_ACCESS_VIEWS; ++i) for (i = 0; i < MAX_UNORDERED_ACCESS_VIEWS; ++i)
{ {
if (!shader->reg_maps.uav_resource_info[i].type)
continue;
if (!(view = views[i])) if (!(view = views[i]))
{ {
WARN("No unordered access view bound at index %u.\n", i); if (shader->reg_maps.uav_resource_info[i].type)
WARN("No unordered access view bound at index %u.\n", i);
GL_EXTCALL(glBindImageTexture(i, 0, 0, GL_FALSE, 0, GL_READ_WRITE, GL_R8)); GL_EXTCALL(glBindImageTexture(i, 0, 0, GL_FALSE, 0, GL_READ_WRITE, GL_R8));
continue; continue;
} }