mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-18 04:18:23 +02:00
tc: don't reuse first rp info on batch if there is work pending
this otherwise causes a mismatch if drivers try to access previous info during a set_framebuffer_state call (e.g., to flush clears) Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35777>
This commit is contained in:
parent
f0c58518cc
commit
9482ad212d
1 changed files with 4 additions and 2 deletions
|
|
@ -1452,8 +1452,10 @@ tc_set_framebuffer_state(struct pipe_context *_pipe,
|
|||
{
|
||||
struct threaded_context *tc = threaded_context(_pipe);
|
||||
unsigned next = tc->next;
|
||||
/* always skip incrementing if this is the first call on a batch */
|
||||
bool set_skip_first_increment = !tc->batch_slots[tc->next].num_total_slots;
|
||||
/* always skip incrementing if this is the first call on a batch AND there is no pending work from previous batch */
|
||||
bool set_skip_first_increment = !tc->batch_slots[tc->next].num_total_slots &&
|
||||
(!tc->renderpass_info_recording ||
|
||||
!TC_RENDERPASS_INFO_HAS_WORK(tc->renderpass_info_recording->data32[0]));
|
||||
struct tc_framebuffer *p =
|
||||
tc_add_call_no_copy(tc, TC_CALL_set_framebuffer_state, tc_framebuffer);
|
||||
unsigned nr_cbufs = fb->nr_cbufs;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue