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

wined3d: Avoid multiple layout qualifiers for uniform blocks.

Nvidia Legacy GPU driver (340.xx series) doesn't allow multiple layout qualifiers. 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 d5b9271e
...@@ -2318,9 +2318,10 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont ...@@ -2318,9 +2318,10 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
{ {
if (reg_maps->cb_sizes[i]) if (reg_maps->cb_sizes[i])
{ {
shader_addline(buffer, "layout(std140");
if (shader_glsl_use_layout_binding_qualifier(gl_info)) if (shader_glsl_use_layout_binding_qualifier(gl_info))
shader_addline(buffer, "layout(binding = %u)\n", uniform_block_base + i); shader_addline(buffer, ", binding = %u", uniform_block_base + i);
shader_addline(buffer, "layout(std140) uniform block_%s_cb%u { vec4 %s_cb%u[%u]; };\n", shader_addline(buffer, ") uniform block_%s_cb%u { vec4 %s_cb%u[%u]; };\n",
prefix, i, prefix, i, reg_maps->cb_sizes[i]); prefix, i, prefix, i, reg_maps->cb_sizes[i]);
} }
} }
......
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