summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-02-20 13:58:18 +1000
committerDave Airlie <airlied@redhat.com>2015-05-08 10:21:01 +1000
commit731b7c49bb78d6d1be25f9010af0087146de0b48 (patch)
tree0e56839dfbe3917de6a6cace22386e13012459bb /src/mesa
parentb1119ce838462ff533512188c969fc28ab6a89a9 (diff)
downloadexternal_mesa3d-731b7c49bb78d6d1be25f9010af0087146de0b48.zip
external_mesa3d-731b7c49bb78d6d1be25f9010af0087146de0b48.tar.gz
external_mesa3d-731b7c49bb78d6d1be25f9010af0087146de0b48.tar.bz2
st/glsl_to_tgsi: fix ir_assignment hack doing bad things for doubles
This hack for fixing gl_FragDepth apparantly caused a GLSL shader outputting a single double to try and output a dvec4, but we hadn't assigned outputs for the secondary bit. This avoids going into the hack code for scalar doubles. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 93671ba..08957dc 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -2611,6 +2611,7 @@ glsl_to_tgsi_visitor::visit(ir_assignment *ir)
assert(!ir->lhs->type->is_scalar() && !ir->lhs->type->is_vector());
l.writemask = WRITEMASK_XYZW;
} else if (ir->lhs->type->is_scalar() &&
+ !ir->lhs->type->is_double() &&
ir->lhs->variable_referenced()->data.mode == ir_var_shader_out) {
/* FINISHME: This hack makes writing to gl_FragDepth, which lives in the
* FINISHME: W component of fragment shader output zero, work correctly.