From: D Scott Phillips Date: Tue, 19 May 2020 20:42:26 +0000 (-0700) Subject: anv/gen11+: Disable object level preemption X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=81201e461772a06ed2c20207d2901f6cf9a24114;p=mesa.git 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: --- 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