mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 05:10:11 +01:00
r600/sfn: clear PIPE_MAP_UNSYNCRONIZED for partial DS texture writes
When writing to a depth texture the driver is first doing a decompress
blit to a stageing resource. On one hand this blit can be skipped, if
PIPE_MAP_DISCARD_WHOLE_RESOURCE is set, OTOH we need to clear the
PIPE_MAP_UNSYNCHRONIZED flag if a partial write is done, because we have to
wait until the blit is finished.
v2: Update the patch with a more targeted approach.
Fixes: 25b97a3a96 ("mesa/st: mark internal texture map calls as UNSYNCHRONIZED")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13916
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37457>
This commit is contained in:
parent
59a4f53b95
commit
04f6e24e65
1 changed files with 10 additions and 4 deletions
|
|
@ -1381,10 +1381,16 @@ void *r600_texture_transfer_map(struct pipe_context *ctx,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
rctx->blit_decompress_depth(ctx, rtex, staging_depth,
|
||||
level, level,
|
||||
box->z, box->z + box->depth - 1,
|
||||
0, 0);
|
||||
if (!(usage & PIPE_MAP_DISCARD_WHOLE_RESOURCE)) {
|
||||
rctx->blit_decompress_depth(ctx, rtex, staging_depth,
|
||||
level, level,
|
||||
box->z, box->z + box->depth - 1,
|
||||
0, 0);
|
||||
/* Since we have to wait for the blit_decompress_depth to finish,
|
||||
* we have to clear PIPE_MAP_UNSYNCHRONIZED here.
|
||||
*/
|
||||
usage &= ~PIPE_MAP_UNSYNCHRONIZED;
|
||||
}
|
||||
|
||||
offset = r600_texture_get_offset(rctx->screen, staging_depth,
|
||||
level, box,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue