summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-10-12 13:47:40 +1000
committerEmil Velikov <emil.l.velikov@gmail.com>2016-01-08 12:05:27 +0200
commit6c69561068b92b8f6285645798a9b9769bc50cf4 (patch)
treee9981decedabc19e68962c45364519693c0f4ca0
parent343fc2c3a33a4967fcc75bf1cc5b3baffba8fa5d (diff)
glsl: only update doubles inputs for vertex inputs.
This doesn't apply to other stages. This is only used in the mesa/st code, which needs further fixes. Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 1fc39dae22843d6faf3ec43eab90c7d06f9f6f7b)
-rw-r--r--src/glsl/ir_set_program_inouts.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/glsl/ir_set_program_inouts.cpp b/src/glsl/ir_set_program_inouts.cpp
index 838b5e7cf0..c9b8a38384 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] =