mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 02:20:11 +01:00
radeonsi: fix EXPLICIT_FLUSH for flush offsets > 0
Cc: 18.3 19.0 <mesa-stable@lists.freedesktop.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
4522f01d4e
commit
61c678d4bc
1 changed files with 5 additions and 2 deletions
|
|
@ -525,10 +525,13 @@ static void si_buffer_do_flush_region(struct pipe_context *ctx,
|
||||||
struct si_resource *buf = si_resource(transfer->resource);
|
struct si_resource *buf = si_resource(transfer->resource);
|
||||||
|
|
||||||
if (stransfer->staging) {
|
if (stransfer->staging) {
|
||||||
|
unsigned src_offset = stransfer->offset +
|
||||||
|
transfer->box.x % SI_MAP_BUFFER_ALIGNMENT +
|
||||||
|
(box->x - transfer->box.x);
|
||||||
|
|
||||||
/* Copy the staging buffer into the original one. */
|
/* Copy the staging buffer into the original one. */
|
||||||
si_copy_buffer((struct si_context*)ctx, transfer->resource,
|
si_copy_buffer((struct si_context*)ctx, transfer->resource,
|
||||||
&stransfer->staging->b.b, box->x,
|
&stransfer->staging->b.b, box->x, src_offset,
|
||||||
stransfer->offset + box->x % SI_MAP_BUFFER_ALIGNMENT,
|
|
||||||
box->width);
|
box->width);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue