freedreno/a4xx: fix SP_FS_MRT_REG.HALF_PRECISION
authorRob Clark <robdclark@chromium.org>
Fri, 25 Oct 2019 20:57:49 +0000 (13:57 -0700)
committerRob Clark <robdclark@gmail.com>
Sat, 9 Nov 2019 02:49:15 +0000 (02:49 +0000)
Set flag based on actual output reg type.

Signed-off-by: Rob Clark <robdclark@chromium.org>
src/gallium/drivers/freedreno/a4xx/fd4_program.c

index b982d5d06e7de5dd1b04d4b5f327a884111f0a28..002de9f1923173d36347d7bbca0c6586209ca1a3 100644 (file)
@@ -411,7 +411,7 @@ fd4_program_emit(struct fd_ringbuffer *ring, struct fd4_emit *emit,
                OUT_RING(ring, A4XX_SP_FS_MRT_REG_REGID(color_regid[i]) |
                                A4XX_SP_FS_MRT_REG_MRTFORMAT(format) |
                                COND(srgb, A4XX_SP_FS_MRT_REG_COLOR_SRGB) |
-                               COND(emit->key.half_precision,
+                               COND(color_regid[i] & HALF_REG_ID,
                                        A4XX_SP_FS_MRT_REG_HALF_PRECISION));
        }