[Mesa-dev] [PATCH 1/2] gallium/ttn: Fix the type of gl_FragDepth.
Eric Anholt
eric at anholt.net
Wed Sep 19 20:37:11 UTC 2018
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.
---
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 12114dc2030a..4f7f900c2433 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.18.0
More information about the mesa-dev
mailing list