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>
This commit is contained in:
parent
b1119ce838
commit
731b7c49bb
|
@ -2611,6 +2611,7 @@ glsl_to_tgsi_visitor::visit(ir_assignment *ir)
|
||||||
assert(!ir->lhs->type->is_scalar() && !ir->lhs->type->is_vector());
|
assert(!ir->lhs->type->is_scalar() && !ir->lhs->type->is_vector());
|
||||||
l.writemask = WRITEMASK_XYZW;
|
l.writemask = WRITEMASK_XYZW;
|
||||||
} else if (ir->lhs->type->is_scalar() &&
|
} else if (ir->lhs->type->is_scalar() &&
|
||||||
|
!ir->lhs->type->is_double() &&
|
||||||
ir->lhs->variable_referenced()->data.mode == ir_var_shader_out) {
|
ir->lhs->variable_referenced()->data.mode == ir_var_shader_out) {
|
||||||
/* FINISHME: This hack makes writing to gl_FragDepth, which lives in the
|
/* FINISHME: This hack makes writing to gl_FragDepth, which lives in the
|
||||||
* FINISHME: W component of fragment shader output zero, work correctly.
|
* FINISHME: W component of fragment shader output zero, work correctly.
|
||||||
|
|
Loading…
Reference in New Issue