summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2014-06-06 13:28:32 +0200
committerIago Toral Quiroga <[email protected]>2014-06-30 08:08:50 +0200
commit598c2e2c83447cf222f96f833569eeb0bd179871 (patch)
tree1c4c9f865234a430bc38f70f65acf41b36a36298 /src/glsl
parente2dd717616757a74ab2835602dd7c1a6256805ed (diff)
glsl: Only geometry shader outputs can be associated with non-zero streams.
This should be ensured by the parser, so assert on that. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/link_varyings.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp
index 3d5a6807cdd..520a51a278e 100644
--- a/src/glsl/link_varyings.cpp
+++ b/src/glsl/link_varyings.cpp
@@ -1347,6 +1347,11 @@ assign_varying_locations(struct gl_context *ctx,
(output_var->data.mode != ir_var_shader_out))
continue;
+ /* Only geometry shaders can use non-zero streams */
+ assert(output_var->data.stream == 0 ||
+ (output_var->data.stream < MAX_VERTEX_STREAMS &&
+ producer->Stage == MESA_SHADER_GEOMETRY));
+
tfeedback_candidate_generator g(mem_ctx, tfeedback_candidates);
g.process(output_var);