iris: Set MOCS on 3DSTATE_CONSTANT_XS on Gfx9+
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 13 May 2020 22:08:33 +0000 (15:08 -0700)
committerMarge Bot <emma+marge@anholt.net>
Thu, 28 Oct 2021 19:45:55 +0000 (19:45 +0000)
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 <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13480>

src/gallium/drivers/iris/iris_state.c

index 50aaf13..841365d 100644 (file)
@@ -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:
           *