Commit 785baaa9 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

wined3d: Fix FFP vertex shaders with ARB_explicit_attrib_location.

parent 71f975f6
......@@ -6363,10 +6363,15 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
shader_addline(buffer, "%s\n", shader_glsl_get_version(gl_info, NULL));
if (shader_glsl_use_explicit_attrib_location(gl_info))
shader_addline(buffer, "#extension GL_ARB_explicit_attrib_location : enable\n");
for (i = 0; i < WINED3D_FFP_ATTRIBS_COUNT; ++i)
{
const char *type = i < ARRAY_SIZE(attrib_info) ? attrib_info[i].type : "vec4";
if (shader_glsl_use_explicit_attrib_location(gl_info))
shader_addline(buffer, "layout(location = %u) ", i);
shader_addline(buffer, "%s %s vs_in%u;\n", get_attribute_keyword(gl_info), type, i);
}
shader_addline(buffer, "\n");
......
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