dzn: Mark transition barriers as executed when we execute barriers

It was previously done dzn_cmd_buffer_flush_transition_barriers(),
leaving the queue+flush case unhandled. Let's fix that by moving
this piece of code to dzn_cmd_buffer_exec_transition_barriers().

Fixes: 35356b1173 ("dzn: Cache and pack transition barriers")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17314>
This commit is contained in:
Boris Brezillon
2022-06-30 05:06:01 -07:00
committed by Marge Bot
parent c06926f694
commit a577acf8f6

View File

@@ -53,6 +53,10 @@ dzn_cmd_buffer_exec_transition_barriers(struct dzn_cmd_buffer *cmdbuf,
if (flush_count)
ID3D12GraphicsCommandList1_ResourceBarrier(cmdbuf->cmdlist, flush_count,
&barriers[barrier_count - flush_count]);
/* Set Before = After so we don't execute the same barrier twice. */
for (uint32_t b = 0; b < barrier_count; b++)
barriers[b].Transition.StateBefore = barriers[b].Transition.StateAfter;
}
static void
@@ -69,10 +73,6 @@ dzn_cmd_buffer_flush_transition_barriers(struct dzn_cmd_buffer *cmdbuf,
return;
dzn_cmd_buffer_exec_transition_barriers(cmdbuf, &barriers[first_subres], subres_count);
/* Set Before = After so we don't execute the same barrier twice */
for (uint32_t b = first_subres; b < first_subres + subres_count; b++)
barriers[b].Transition.StateBefore = barriers[b].Transition.StateAfter;
}
enum dzn_queue_transition_flags {