panfrost: Fix stride calculation for Z32_S8X24/X32_S8X24 formats
Z32_S8X24 variants are actually stored in 2 planes (one per component), we have to adjust the bytes_per_pixel value accordingly. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7653>
This commit is contained in:
parent
00360cd5c8
commit
ae27d7faae
|
@ -302,6 +302,13 @@ panfrost_setup_slices(struct panfrost_device *dev,
|
|||
unsigned depth = res->depth0;
|
||||
unsigned bytes_per_pixel = util_format_get_blocksize(pres->internal_format);
|
||||
|
||||
/* Z32_S8X24 variants are actually stored in 2 planes (one per
|
||||
* component), we have to adjust the bytes_per_pixel value accordingly.
|
||||
*/
|
||||
if (pres->internal_format == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT ||
|
||||
pres->internal_format == PIPE_FORMAT_X32_S8X24_UINT)
|
||||
bytes_per_pixel = 4;
|
||||
|
||||
/* MSAA is implemented as a 3D texture with z corresponding to the
|
||||
* sample #, horrifyingly enough */
|
||||
|
||||
|
|
Loading…
Reference in New Issue