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>
(cherry picked from commit 2867a07922)
This commit is contained in:
Samuel Pitoiset 2024-05-22 18:28:44 +02:00 committed by Eric Engestrom
parent e6ef7eb2ec
commit e72c610a26
2 changed files with 2 additions and 2 deletions

View file

@ -3554,7 +3554,7 @@
"description": "radv: fix setting a custom pitch for CB on GFX10_3+",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "3f7ddaf28163a23de218990908725387f03205c1",
"notes": null

View file

@ -1777,7 +1777,7 @@ radv_initialise_color_surface(struct radv_device *device, struct radv_color_buff
*
* We set the pitch in MIP0_WIDTH.
*/
if (device->physical_device->rad_info.gfx_level && iview->image->vk.image_type == VK_IMAGE_TYPE_2D &&
if (device->physical_device->rad_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);