mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
virgl/vtest: use correct resource stride in flush_frontbuffer
The displaytarget's resource stride is alignment is currently 64-bytes, where the shared resource stride is unaligned. Signed-off-by: Italo Nicola <italonicola@collabora.com> Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11714>
This commit is contained in:
parent
a235e02787
commit
b6d0447027
1 changed files with 2 additions and 1 deletions
|
|
@ -628,7 +628,8 @@ static void virgl_vtest_flush_frontbuffer(struct virgl_winsys *vws,
|
|||
|
||||
if (sub_box) {
|
||||
box = *sub_box;
|
||||
offset = box.y / util_format_get_blockheight(res->format) * res->stride +
|
||||
uint32_t shm_stride = util_format_get_stride(res->format, res->width);
|
||||
offset = box.y / util_format_get_blockheight(res->format) * shm_stride +
|
||||
box.x / util_format_get_blockwidth(res->format) * util_format_get_blocksize(res->format);
|
||||
} else {
|
||||
box.z = layer;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue