From 6cd2ae8330a86aa7e2635ebf65091d6679d561ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Wed, 31 Jul 2013 09:12:31 +0300 Subject: [PATCH] glsl: mark builtin variable assigned locations used MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit patch fixes regressions with following ES3 tests GL3Tests/depth24/depth24_basic.test GL3Tests/depth24/depth24_precision.test GL3Tests/rgb8_rgba8/rgb8_rgba8_rgb.test Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66292 Signed-off-by: Tapani Pälli --- src/glsl/linker.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 942f906..9228ef7 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -1293,6 +1293,11 @@ assign_attribute_or_color_locations(gl_shader_program *prog, foreach_list(node, sh->ir) { ir_variable *const var = ((ir_instruction *) node)->as_variable(); + /* Mark builtin variable locations that have been set to used_locations + */ + if (var != NULL && var->location != -1) + used_locations |= (1 << var->location); + if ((var == NULL) || (var->mode != (unsigned) direction)) continue; -- 1.8.1.4