aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/linker.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-10-19 12:11:26 +0200
committermarha <marha@users.sourceforge.net>2011-10-19 12:11:26 +0200
commit1e90ede4237374dfbb2c8c506a906233bcfd3c5d (patch)
tree13b59b0ab2715fd0bb9eea788c73b08f3b07c01e /mesalib/src/glsl/linker.cpp
parentbaf98f9bb36f956245d83ecd04f90625d6d68d2b (diff)
parent9f986778bd4393c5a9108426969d45aa7f10f334 (diff)
downloadvcxsrv-1e90ede4237374dfbb2c8c506a906233bcfd3c5d.tar.gz
vcxsrv-1e90ede4237374dfbb2c8c506a906233bcfd3c5d.tar.bz2
vcxsrv-1e90ede4237374dfbb2c8c506a906233bcfd3c5d.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/include/os.h
Diffstat (limited to 'mesalib/src/glsl/linker.cpp')
-rw-r--r--mesalib/src/glsl/linker.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/mesalib/src/glsl/linker.cpp b/mesalib/src/glsl/linker.cpp
index 9463f5305..a7c38a342 100644
--- a/mesalib/src/glsl/linker.cpp
+++ b/mesalib/src/glsl/linker.cpp
@@ -1342,7 +1342,10 @@ assign_attribute_or_color_locations(gl_shader_program *prog,
}
}
- /* The location was explicitly assigned, nothing to do here.
+ /* If the variable is not a built-in and has a location statically
+ * assigned in the shader (presumably via a layout qualifier), make sure
+ * that it doesn't collide with other assigned locations. Otherwise,
+ * add it to the list of variables that need linker-assigned locations.
*/
const unsigned slots = count_attribute_slots(var->type);
if (var->location != -1) {
@@ -1802,7 +1805,8 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
* present in a linked program. By checking for use of shading language
* version 1.00, we also catch the GL_ARB_ES2_compatibility case.
*/
- if (ctx->API == API_OPENGLES2 || prog->Version == 100) {
+ if (!prog->InternalSeparateShader &&
+ (ctx->API == API_OPENGLES2 || prog->Version == 100)) {
if (prog->_LinkedShaders[MESA_SHADER_VERTEX] == NULL) {
linker_error(prog, "program lacks a vertex shader\n");
} else if (prog->_LinkedShaders[MESA_SHADER_FRAGMENT] == NULL) {