From 81201e461772a06ed2c20207d2901f6cf9a24114 Mon Sep 17 00:00:00 2001 From: D Scott Phillips Date: Tue, 19 May 2020 13:42:26 -0700 Subject: [PATCH] anv/gen11+: Disable object level preemption An unknown issue is causing vs push constants to become corrupted during object-level preemption. For now, restrict to command buffer level preemption to avoid rendering corruption. Cc: Reviewed-by: Jason Ekstrand Part-of: --- src/intel/vulkan/genX_state.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/intel/vulkan/genX_state.c b/src/intel/vulkan/genX_state.c index c9735df68bf..3c5033459d0 100644 --- a/src/intel/vulkan/genX_state.c +++ b/src/intel/vulkan/genX_state.c @@ -237,6 +237,22 @@ genX(init_device_state)(struct anv_device *device) lri.DataDWord = cache_mode_0; } } + + /* an unknown issue is causing vs push constants to become + * corrupted during object-level preemption. For now, restrict + * to command buffer level preemption to avoid rendering + * corruption. + */ + uint32_t cs_chicken1; + anv_pack_struct(&cs_chicken1, + GENX(CS_CHICKEN1), + .ReplayMode = MidcmdbufferPreemption, + .ReplayModeMask = true); + + anv_batch_emit(&batch, GENX(MI_LOAD_REGISTER_IMM), lri) { + lri.RegisterOffset = GENX(CS_CHICKEN1_num); + lri.DataDWord = cs_chicken1; + } #endif #if GEN_GEN == 12 -- 2.30.2