Commit 2f4a3c1c authored by Emma Anholt's avatar Emma Anholt Committed by Marge Bot
Browse files

freedreno/ir3: Drop handling FRAG_RESULT_DEPTH writing to .z

Since we consume NIR, we get FRAG_RESULT_DEPTH in .x.  Something must have
been working out for this code to not be trying to get an undefined value,
but go ahead and drop it now.

Part-of: <mesa/mesa!4668>
parent eab73799
......@@ -3150,12 +3150,10 @@ setup_output(struct ir3_context *ctx, nir_variable *out)
unsigned n = out->data.driver_location;
unsigned frac = out->data.location_frac;
unsigned slot = out->data.location;
unsigned comp = 0;
if (ctx->so->type == MESA_SHADER_FRAGMENT) {
switch (slot) {
case FRAG_RESULT_DEPTH:
comp = 2; /* tgsi will write to .z component */
so->writes_pos = true;
break;
case FRAG_RESULT_COLOR:
......@@ -3213,7 +3211,7 @@ setup_output(struct ir3_context *ctx, nir_variable *out)
compile_assert(ctx, n < ARRAY_SIZE(so->outputs));
so->outputs[n].slot = slot;
so->outputs[n].regid = regid(n, comp);
so->outputs[n].regid = regid(n, 0);
so->outputs_count = MAX2(so->outputs_count, n + 1);
for (int i = 0; i < ncomp; i++) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment