From 0544afd2df8a534f2f72c18c18a8489c78d8024c Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 13 May 2020 15:08:33 -0700 Subject: [PATCH] iris: Set MOCS on 3DSTATE_CONSTANT_XS on Gfx9+ We were leaving this blank due to a Broadwell restriction, causing our constant buffers to be uncached. We later fixed this for Gfx12+, but left Gfx9-11 without a fix. We should specify one. Reviewed-by: Jason Ekstrand Part-of: --- src/gallium/drivers/iris/iris_state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 50aaf13808d..841365d4bec 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -5509,9 +5509,11 @@ emit_push_constant_packets(struct iris_context *ice, iris_emit_cmd(batch, GENX(3DSTATE_CONSTANT_VS), pkt) { pkt._3DCommandSubOpcode = push_constant_opcodes[stage]; -#if GFX_VER >= 12 + +#if GFX_VER >= 9 pkt.MOCS = isl_mocs(isl_dev, 0, false); #endif + if (prog_data) { /* The Skylake PRM contains the following restriction: *