[Mesa-dev] [PATCH 20/26] glsl: skip location and component packing validation on patch out
Timothy Arceri
timothy.arceri at collabora.com
Mon Feb 29 01:18:00 UTC 2016
These outputs have a separate location domain from per-vertex outputs
and need to be handled separately. For now just skip validation so we
don't invalidate valid shaders.
---
src/compiler/glsl/link_varyings.cpp | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp
index c791d91..bb444b2 100644
--- a/src/compiler/glsl/link_varyings.cpp
+++ b/src/compiler/glsl/link_varyings.cpp
@@ -229,8 +229,12 @@ cross_validate_outputs_to_inputs(struct gl_shader_program *prog,
foreach_in_list(ir_instruction, node, producer->ir) {
ir_variable *const var = node->as_variable();
- if ((var == NULL) || (var->data.mode != ir_var_shader_out))
- continue;
+ /* FIXME: We should also validate per patch outputs too rather than just
+ * skipping over them here.
+ */
+ if ((var == NULL) || var->data.patch ||
+ (var->data.mode != ir_var_shader_out))
+ continue;
if (!var->data.explicit_location
|| var->data.location < VARYING_SLOT_VAR0)
@@ -313,8 +317,12 @@ cross_validate_outputs_to_inputs(struct gl_shader_program *prog,
foreach_in_list(ir_instruction, node, consumer->ir) {
ir_variable *const input = node->as_variable();
- if ((input == NULL) || (input->data.mode != ir_var_shader_in))
- continue;
+ /* FIXME: We should also validate per patch outputs too rather than just
+ * skipping over them here.
+ */
+ if ((input == NULL) || input->data.patch ||
+ (input->data.mode != ir_var_shader_in))
+ continue;
if (strcmp(input->name, "gl_Color") == 0 && input->data.used) {
const ir_variable *const front_color =
--
2.5.0
More information about the mesa-dev
mailing list