summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2014-01-06 19:47:25 -0800
committerPaul Berry <[email protected]>2014-02-05 09:00:31 -0800
commit28e526d5580739e8b4098cd08c644b9157fdc94c (patch)
tree72b9d74476bea0537abda8c1d5b6739b60f235da /src
parent79134cb51609724cc4d94ade12dc52a09e2e91db (diff)
glsl/cs: Change some linker loops to use MESA_SHADER_FRAGMENT as a bound.
Linker loops that iterate through all the stages in the pipeline need to use MESA_SHADER_FRAGMENT as a bound, so that we can add an additional MESA_SHADER_COMPUTE stage, without it being erroneously included in the pipeline. Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/glsl/linker.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 93b4754970c..32825ba41cc 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -2098,7 +2098,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
unsigned prev;
- for (prev = 0; prev < MESA_SHADER_STAGES; prev++) {
+ for (prev = 0; prev <= MESA_SHADER_FRAGMENT; prev++) {
if (prog->_LinkedShaders[prev] != NULL)
break;
}
@@ -2106,7 +2106,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
/* Validate the inputs of each stage with the output of the preceding
* stage.
*/
- for (unsigned i = prev + 1; i < MESA_SHADER_STAGES; i++) {
+ for (unsigned i = prev + 1; i <= MESA_SHADER_FRAGMENT; i++) {
if (prog->_LinkedShaders[i] == NULL)
continue;
@@ -2201,7 +2201,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
}
unsigned first;
- for (first = 0; first < MESA_SHADER_STAGES; first++) {
+ for (first = 0; first <= MESA_SHADER_FRAGMENT; first++) {
if (prog->_LinkedShaders[first] != NULL)
break;
}
@@ -2233,7 +2233,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
* eliminated if they are (transitively) not used in a later stage.
*/
int last, next;
- for (last = MESA_SHADER_STAGES-1; last >= 0; last--) {
+ for (last = MESA_SHADER_FRAGMENT; last >= 0; last--) {
if (prog->_LinkedShaders[last] != NULL)
break;
}