summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-09-19 12:35:51 -0700
committerEric Anholt <[email protected]>2018-10-15 17:16:43 -0700
commitda15a0d88ea1a29968ee624186d895fe5ff0f574 (patch)
treecdf39b7405733ab518c34a1489858d6bcd241f6b /src/gallium
parentf93e43127252679b54646c6b6aad1feaf3e2375a (diff)
gallium/ttn: Fix the type of gl_FragDepth.
In TGSI we have a vec4 of which only .z is used, but for NIR we should be using a float the same as other NIR IR. We were already moving TGSI's .z to the .x channel. Acked-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/nir/tgsi_to_nir.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c
index 12114dc2030..4f7f900c243 100644
--- a/src/gallium/auxiliary/nir/tgsi_to_nir.c
+++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c
@@ -344,6 +344,7 @@ ttn_emit_declaration(struct ttn_compile *c)
}
case TGSI_SEMANTIC_POSITION:
var->data.location = FRAG_RESULT_DEPTH;
+ var->type = glsl_float_type();
break;
default:
fprintf(stderr, "Bad TGSI semantic: %d/%d\n",