[Mesa-dev] [PATCH 5/8] glsl: only update doubles inputs for vertex inputs.

Dave Airlie airlied at gmail.com
Tue Dec 8 22:06:49 PST 2015


From: Dave Airlie <airlied at redhat.com>

This doesn't apply to other stages. This is only
used in the mesa/st code, which needs further fixes.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/glsl/ir_set_program_inouts.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/glsl/ir_set_program_inouts.cpp b/src/glsl/ir_set_program_inouts.cpp
index 838b5e7..c9b8a38 100644
--- a/src/glsl/ir_set_program_inouts.cpp
+++ b/src/glsl/ir_set_program_inouts.cpp
@@ -115,8 +115,11 @@ mark(struct gl_program *prog, ir_variable *var, int offset, int len,
          else
             prog->InputsRead |= bitfield;
 
-         if (var->type->without_array()->is_dual_slot_double())
+         /* double inputs read is only for vertex inputs */
+         if (stage == MESA_SHADER_VERTEX &&
+             var->type->without_array()->is_dual_slot_double())
             prog->DoubleInputsRead |= bitfield;
+
          if (stage == MESA_SHADER_FRAGMENT) {
             gl_fragment_program *fprog = (gl_fragment_program *) prog;
             fprog->InterpQualifier[idx] =
-- 
2.5.0



More information about the mesa-dev mailing list