freedreno/ir3: fix a dirty lie
authorRob Clark <robdclark@chromium.org>
Mon, 27 Jan 2020 16:35:20 +0000 (08:35 -0800)
committerMarge Bot <eric+marge@anholt.net>
Sat, 1 Feb 2020 02:40:22 +0000 (02:40 +0000)
Lies, damn lies, and leftover hacks!

We no longer hard-code these two, so fix the disasm to print the correct
values.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3569>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3569>

src/freedreno/ir3/ir3_shader.c

index 559a017d7478155e6580d2753773192752d1f939..3d28aec44455f93b18ce4dcee109adb0a3d00c10 100644 (file)
@@ -488,13 +488,10 @@ ir3_shader_disasm(struct ir3_shader_variant *so, uint32_t *bin, FILE *out)
                        dump_output(out, so, FRAG_RESULT_DATA6, "data6");
                        dump_output(out, so, FRAG_RESULT_DATA7, "data7");
                }
-               /* these two are hard-coded since we don't know how to
-                * program them to anything but all 0's...
-                */
-               if (so->frag_coord)
-                       fprintf(out, "; fragcoord: r0.x\n");
-               if (so->frag_face)
-                       fprintf(out, "; fragface: hr0.x\n");
+               dump_reg(out, "fragcoord",
+                       ir3_find_sysval_regid(so, SYSTEM_VALUE_FRAG_COORD));
+               dump_reg(out, "fragface",
+                       ir3_find_sysval_regid(so, SYSTEM_VALUE_FRONT_FACE));
                break;
        default:
                /* TODO */