[Mesa-dev] [PATCH 08/18] glsl: Only geometry shader outputs can be associated with non-zero streams.
Iago Toral Quiroga
itoral at igalia.com
Wed Jun 11 00:49:31 PDT 2014
This should be ensured by the parser, so assert on that.
---
src/glsl/link_varyings.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp
index 1a69897..aed069a 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.streamId == 0 ||
+ (output_var->data.streamId < MAX_VERTEX_STREAMS &&
+ producer->Stage == MESA_SHADER_GEOMETRY));
+
tfeedback_candidate_generator g(mem_ctx, tfeedback_candidates);
g.process(output_var);
--
1.9.1
More information about the mesa-dev
mailing list