mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
pan/lib: fix up afbc and linear layout
A few cases of UINT32_MAX were missed, whoops. Fixes:c2c91e78fd("pan/layout: Allow bigger size/surface stride on v12+") Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> (cherry picked from commit69b8372fbf) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41269>
This commit is contained in:
parent
ead15a5202
commit
9501cafc50
2 changed files with 4 additions and 4 deletions
|
|
@ -4214,7 +4214,7 @@
|
|||
"description": "pan/lib: fix up afbc and linear layout",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "c2c91e78fdc7e121a54796636c09ab8d76451df4",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -179,8 +179,8 @@ pan_mod_afbc_init_slice_layout(
|
|||
slayout->afbc.surface_stride_B = surf_stride_B;
|
||||
slayout->size_B = surf_stride_B * mip_extent_px.depth;
|
||||
|
||||
if (hdr_surf_size_B > UINT32_MAX || surf_stride_B > UINT32_MAX ||
|
||||
slayout->size_B > UINT32_MAX)
|
||||
if (hdr_surf_size_B > UINT32_MAX || surf_stride_B > MAX_SLICE_STRIDE_B ||
|
||||
slayout->size_B > MAX_SIZE_B)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
|
@ -682,7 +682,7 @@ pan_mod_linear_init_slice_layout(
|
|||
|
||||
/* Surface stride is passed as a 32-bit unsigned integer to RT/ZS and texture
|
||||
* descriptors, make sure it fits. */
|
||||
if (surf_stride_B > UINT32_MAX)
|
||||
if (surf_stride_B > MAX_SLICE_STRIDE_B)
|
||||
return false;
|
||||
|
||||
slayout->tiled_or_linear.surface_stride_B = surf_stride_B;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue