diff options
author | Kenneth Graunke <[email protected]> | 2016-03-15 11:13:25 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2016-03-16 00:09:56 -0700 |
commit | b566317e7e6eb78a22cac759a4af2e9d78f74a32 (patch) | |
tree | f587ab9b4363e3310624267708d2f56d0562b63d /src/mesa/drivers/dri | |
parent | 9d9965c06f18f7d609933e511b98514570e85909 (diff) |
meta: Use ARB_explicit_attrib_location in the rest of the meta shaders.
This is cleaner than using glBindAttribLocation().
Not all drivers support the extension, but I don't think those drivers
use GLSL in the first place. Apparently some Meta shaders already use
GL_ARB_explicit_attrib_location, so I think it should be okay.
Honestly, I'm not sure how the old code worked anyway - we bound the
attribute location for "texcoords", while all the shaders capitalized
or spelled it differently.
v2: Convert another instance in brw_meta_fast_clear.c.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_meta_fast_clear.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c index b81b1438ba3..fe61c1654d2 100644 --- a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c +++ b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c @@ -110,7 +110,8 @@ brw_bind_rep_write_shader(struct brw_context *brw, float *color) const char *vs_source = "#extension GL_AMD_vertex_shader_layer : enable\n" "#extension GL_ARB_draw_instanced : enable\n" - "attribute vec4 position;\n" + "#extension GL_ARB_explicit_attrib_location : enable\n" + "layout(location = 0) in vec4 position;\n" "uniform int layer;\n" "void main()\n" "{\n" @@ -144,7 +145,6 @@ brw_bind_rep_write_shader(struct brw_context *brw, float *color) _mesa_DeleteShader(fs); _mesa_AttachShader(clear->shader_prog, vs); _mesa_DeleteShader(vs); - _mesa_BindAttribLocation(clear->shader_prog, 0, "position"); _mesa_ObjectLabel(GL_PROGRAM, clear->shader_prog, -1, "meta repclear"); _mesa_LinkProgram(clear->shader_prog); |