From da15a0d88ea1a29968ee624186d895fe5ff0f574 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 19 Sep 2018 12:35:51 -0700 Subject: [PATCH] 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 --- src/gallium/auxiliary/nir/tgsi_to_nir.c | 1 + 1 file changed, 1 insertion(+) 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", -- 2.30.2