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: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5110>
(cherry picked from commit 81201e4617)
This commit is contained in:
D Scott Phillips 2020-05-19 13:42:26 -07:00 committed by Eric Engestrom
parent ad8cd753a1
commit a366c3f548
2 changed files with 17 additions and 1 deletions

View file

@ -2389,7 +2389,7 @@
"description": "anv/gen11+: Disable object level preemption",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": null
},

View file

@ -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