mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
v3dv: fix copy image to buffer
If either of bufferRowLength or bufferImageHeight are zero, then that aspect alone of the image is tighly packed. We were assuming that if either was zero both aspects were tightly packed, which is wrong. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
parent
beee18103e
commit
54374f36df
1 changed files with 6 additions and 4 deletions
|
|
@ -116,13 +116,15 @@ emit_copy_layer_to_buffer_per_tile_list(struct v3dv_job *job,
|
|||
|
||||
/* Store TLB to buffer */
|
||||
uint32_t width, height;
|
||||
if (region->bufferRowLength == 0 || region->bufferImageHeight == 0) {
|
||||
if (region->bufferRowLength == 0)
|
||||
width = image->extent.width;
|
||||
height = image->extent.height;
|
||||
} else {
|
||||
else
|
||||
width = region->bufferRowLength;
|
||||
|
||||
if (region->bufferImageHeight == 0)
|
||||
height = image->extent.height;
|
||||
else
|
||||
height = region->bufferImageHeight;
|
||||
}
|
||||
|
||||
uint32_t buffer_stride = width * image->cpp;
|
||||
uint32_t buffer_offset =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue