mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
asahi: flush before resource transition
otherwise data_valid is not valid! fixes arb_shader_image_load_store-bitcast and who knows what else. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
This commit is contained in:
parent
e637ccff36
commit
9fc23df0d5
1 changed files with 6 additions and 0 deletions
|
|
@ -1179,6 +1179,12 @@ transition_resource(struct pipe_context *pctx, struct agx_resource *rsrc,
|
|||
assert(new_res);
|
||||
assert(!(rsrc->base.bind & PIPE_BIND_SHARED) && "cannot swap BOs if shared");
|
||||
|
||||
/* Flush current writers out, so that rsrc->data_valid is correctly set (e.g.
|
||||
* for render targets). The writers would have been flushed by the blits
|
||||
* anyway, so this is not further harming performance.
|
||||
*/
|
||||
agx_flush_writer(agx_context(pctx), rsrc, "Transition");
|
||||
|
||||
int level;
|
||||
BITSET_FOREACH_SET(level, rsrc->data_valid, PIPE_MAX_TEXTURE_LEVELS) {
|
||||
/* Blit each valid level */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue