[Mesa-dev] [PATCH 21/26] glsl: don't try to eliminate unused patches with explicit locations
Timothy Arceri
timothy.arceri at collabora.com
Mon Feb 29 01:18:01 UTC 2016
These outputs have a separate location domain from per-vertex outputs
and need to be handled separately. For now just skip them.
---
src/compiler/glsl/linker.cpp | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index f4708fa..a4d83e1 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -2770,6 +2770,15 @@ match_explicit_outputs_to_inputs(struct gl_shader_program *prog,
if (var->data.explicit_location &&
var->data.location >= VARYING_SLOT_VAR0) {
+
+ /* FIXME: We could also match per patch outputs too rather than just
+ * skipping over them here.
+ */
+ if (var->data.patch) {
+ var->data.is_unmatched_generic_inout = 0;
+ continue;
+ }
+
const unsigned idx = var->data.location - VARYING_SLOT_VAR0;
if (explicit_locations[idx][var->data.location_frac] == NULL)
explicit_locations[idx][var->data.location_frac] = var;
@@ -2786,6 +2795,15 @@ match_explicit_outputs_to_inputs(struct gl_shader_program *prog,
ir_variable *output = NULL;
if (input->data.explicit_location
&& input->data.location >= VARYING_SLOT_VAR0) {
+
+ /* FIXME: We could also match per patch outputs too rather than just
+ * skipping over them here.
+ */
+ if (input->data.patch) {
+ input->data.is_unmatched_generic_inout = 0;
+ continue;
+ }
+
output = explicit_locations[input->data.location - VARYING_SLOT_VAR0]
[input->data.location_frac];
--
2.5.0
More information about the mesa-dev
mailing list