[Mesa-dev] [PATCH 20/27] glsl: don't try to eliminate unused patches with explicit locations
Timothy Arceri
timothy.arceri at collabora.com
Thu Mar 31 10:57:55 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 8633e22..aba02de 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -2866,6 +2866,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;
@@ -2882,6 +2891,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.5
More information about the mesa-dev
mailing list