panvk/jm: Preload the FB even if we have no draws queued
There seems to be cases where we end up with a depth/stencil preload,
with no draw associated to it, so let's make sure we preload in that
case, otherwise we will write invalid data back.
Fixes: 0bc3502ca3 ("panvk: Implement a custom FB preload logic")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158>
This commit is contained in:
committed by
Marge Bot
parent
ec9a5c8278
commit
023972827a
@@ -415,7 +415,6 @@ dEQP-VK.dynamic_rendering.primary_cmd_buff.basic.contents_2_secondary_cmdbuffers
|
||||
dEQP-VK.dynamic_rendering.primary_cmd_buff.basic.contents_primary_secondary_cmdbuffers_resuming,Fail
|
||||
dEQP-VK.dynamic_rendering.primary_cmd_buff.basic.contents_secondary_2_primary_cmdbuffers_resuming,Fail
|
||||
dEQP-VK.dynamic_rendering.primary_cmd_buff.basic.contents_secondary_primary_cmdbuffers_resuming,Fail
|
||||
dEQP-VK.dynamic_rendering.primary_cmd_buff.basic.partial_binding_depth_stencil,Fail
|
||||
dEQP-VK.dynamic_rendering.primary_cmd_buff.basic.single_cmdbuffer_resuming,Fail
|
||||
|
||||
# CTS bug, see https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/5700
|
||||
|
||||
@@ -149,11 +149,9 @@ panvk_per_arch(cmd_close_batch)(struct panvk_cmd_buffer *cmdbuf)
|
||||
fbinfo->first_provoking_vertex =
|
||||
cmdbuf->state.gfx.render.first_provoking_vertex != U_TRISTATE_NO;
|
||||
|
||||
if (batch->vtc_jc.first_tiler) {
|
||||
VkResult result = panvk_per_arch(cmd_fb_preload)(cmdbuf, fbinfo);
|
||||
if (result != VK_SUCCESS)
|
||||
return;
|
||||
}
|
||||
VkResult result = panvk_per_arch(cmd_fb_preload)(cmdbuf, fbinfo);
|
||||
if (result != VK_SUCCESS)
|
||||
return;
|
||||
|
||||
uint32_t view_mask = cmdbuf->state.gfx.render.view_mask;
|
||||
assert(view_mask == 0 || util_bitcount(view_mask) <= batch->fb.layer_count);
|
||||
|
||||
@@ -422,6 +422,13 @@ cmd_emit_dcd(struct panvk_cmd_buffer *cmdbuf, struct pan_fb_info *fbinfo,
|
||||
|
||||
struct mali_draw_packed dcd_base;
|
||||
|
||||
/* If we got a preload without any draw, we end up with a NULL TLS
|
||||
* descriptor. Allocate a dummy one (no TLS, no WLS) to get things working. */
|
||||
if (!batch->tls.cpu) {
|
||||
panvk_per_arch(cmd_alloc_tls_desc)(cmdbuf, true);
|
||||
GENX(pan_emit_tls)(&batch->tlsinfo, batch->tls.cpu);
|
||||
}
|
||||
|
||||
pan_pack(&dcd_base, DRAW, cfg) {
|
||||
cfg.thread_storage = batch->tls.gpu;
|
||||
cfg.state = rsd.gpu;
|
||||
|
||||
Reference in New Issue
Block a user