freedreno/computerator: Set SP_MODE_CONTROL to the same value as vulkan/GL
authorEric Anholt <eric@anholt.net>
Wed, 8 Jul 2020 02:14:34 +0000 (19:14 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 5 Aug 2020 04:35:05 +0000 (04:35 +0000)
This gets us consistent hcN access with our drivers, for experimenting.
We don't know what the other bit does yet, but let's not have to debug
that later.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6179>

src/freedreno/computerator/a6xx.c

index 4d8dce2b6aa9c86d7ba06ddcaed0c8acb033fd67..4cd8e5784f6d0ca7d318554c6c63ae375d3282b4 100644 (file)
@@ -117,6 +117,9 @@ cs_program_emit(struct fd_ringbuffer *ring, struct kernel *kernel)
        const struct ir3_info *i = &v->info;
        enum a3xx_threadsize thrsz = FOUR_QUADS;
 
+       OUT_PKT4(ring, REG_A6XX_SP_MODE_CONTROL, 1);
+       OUT_RING(ring, A6XX_SP_MODE_CONTROL_CONSTANT_DEMOTION_ENABLE | 4);
+
        OUT_PKT4(ring, REG_A6XX_HLSQ_INVALIDATE_CMD, 1);
        OUT_RING(ring, A6XX_HLSQ_INVALIDATE_CMD_VS_STATE |
                    A6XX_HLSQ_INVALIDATE_CMD_HS_STATE |