mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-27 04:04:23 +08:00
st/pbo: reject vs/fs pbo ops if rowstride < width
this pbo shader works by iterating over the framebuffer size
and storing a value to an offset for each source pixel. if the
number of pixels being written out does not correspond to fragcoord
to the extent that certain source pixels are not written at all, however,
then this method should not be used in order to avoid giving broken results
cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30689>
(cherry picked from commit c2dcecffc5
)
This commit is contained in:
parent
bd69d51ba0
commit
33cb5bfa25
@ -1034,7 +1034,7 @@
|
||||
"description": "st/pbo: reject vs/fs pbo ops if rowstride < width",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
@ -111,6 +111,9 @@ st_pbo_addresses_pixelstore(struct st_context *st,
|
||||
if (buf_offset % addr->bytes_per_pixel)
|
||||
return false;
|
||||
|
||||
if (store->RowLength && store->RowLength < addr->width)
|
||||
return false;
|
||||
|
||||
/* Convert to texels */
|
||||
buf_offset = buf_offset / addr->bytes_per_pixel;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user