mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
panvk/cs: Poison cmdbuf registers when PANVK_DEBUG=cs is set
Poison all cmdbuf registers to make sure we don't inherit state from a previously executed cmdbuf. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31911>
This commit is contained in:
parent
c3ff3f2405
commit
c0f47b12fc
2 changed files with 14 additions and 0 deletions
|
|
@ -302,6 +302,10 @@ panvk_cs_reg_whitelist(frag_ctx, PANVK_CS_REG_RANGE(RUN_FRAGMENT_SR));
|
|||
panvk_cs_reg_whitelist(vt_ctx, PANVK_CS_REG_RANGE(RUN_IDVS_SR));
|
||||
#define cs_update_vt_ctx(__b) panvk_cs_reg_upd_ctx(__b, vt_ctx)
|
||||
|
||||
panvk_cs_reg_whitelist(cmdbuf_regs, {PANVK_CS_REG_RUN_IDVS_SR_START,
|
||||
PANVK_CS_REG_SCRATCH_END});
|
||||
#define cs_update_cmdbuf_regs(__b) panvk_cs_reg_upd_ctx(__b, cmdbuf_regs)
|
||||
|
||||
struct panvk_tls_state {
|
||||
struct panfrost_ptr desc;
|
||||
struct pan_tls_info info;
|
||||
|
|
|
|||
|
|
@ -161,6 +161,16 @@ finish_cs(struct panvk_cmd_buffer *cmdbuf, uint32_t subqueue)
|
|||
}
|
||||
}
|
||||
|
||||
if ((instance->debug_flags & PANVK_DEBUG_CS) &&
|
||||
cmdbuf->vk.level != VK_COMMAND_BUFFER_LEVEL_SECONDARY) {
|
||||
cs_update_cmdbuf_regs(b) {
|
||||
/* Poison all cmdbuf registers to make sure we don't inherit state from
|
||||
* a previously executed cmdbuf. */
|
||||
for (uint32_t i = 0; i <= PANVK_CS_REG_SCRATCH_END; i++)
|
||||
cs_move32_to(b, cs_reg32(b, i), 0xdead | i << 24);
|
||||
}
|
||||
}
|
||||
|
||||
cs_finish(&cmdbuf->state.cs[subqueue].builder);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue