radv: fix setting a custom pitch for CB on GFX10_3+

The gfx_level check was missing the version...

Found by inspection.

Fixes: 3f7ddaf281 ("radv: implement setting a custom pitch to any multiple of 256B on gfx10.3+"
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29331>
This commit is contained in:
Samuel Pitoiset 2024-05-22 18:28:44 +02:00 committed by Marge Bot
parent f168dc6d53
commit 2867a07922

View file

@ -1783,7 +1783,7 @@ radv_initialise_color_surface(struct radv_device *device, struct radv_color_buff
*
* We set the pitch in MIP0_WIDTH.
*/
if (pdev->info.gfx_level && iview->image->vk.image_type == VK_IMAGE_TYPE_2D &&
if (pdev->info.gfx_level >= GFX10_3 && iview->image->vk.image_type == VK_IMAGE_TYPE_2D &&
iview->image->vk.array_layers == 1 && plane->surface.is_linear) {
assert((plane->surface.u.gfx9.surf_pitch * plane->surface.bpe) % 256 == 0);