mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 02:20:11 +01:00
radv: set RADEON_SURF_NO_TEXTURE flag in radv_get_surface_flags()
In vkCreateImage() if block comrpessed format and VK_IMAGE_TILING_LINEAR is used, then the app crashes in vega gpu. This is because addrlib does not support BC + linear as from function ValidateSwModeParams(). From Marek Olšák the addrlib behaviour is correct. In pal driver, flags.texture is not set in DetermineSurfaceFlags() function if BC + linear. pal driver does it because it is expected that the BC + linear image is only used as transfer resource. This patch sets RADEON_SURF_NO_TEXTURE flag if usage is not VK_IMAGE_USAGE_SAMPLED_BIT and and VK_IMAGE_USAGE_STORAGE_BIT. flags.texture flag is not set if RADEON_SURF_NO_TEXTURE and this fixes the crash. v1: set NO_TEXTURE if not SAMPLED or STORAGE (Marek Olšák) Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21422>
This commit is contained in:
parent
de0885cdb8
commit
2b04d6cada
1 changed files with 2 additions and 0 deletions
|
|
@ -656,6 +656,8 @@ radv_get_surface_flags(struct radv_device *device, struct radv_image *image, uns
|
|||
/* Disable DCC for VRS rate images because the hw can't handle compression. */
|
||||
if (pCreateInfo->usage & VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR)
|
||||
flags |= RADEON_SURF_VRS_RATE | RADEON_SURF_DISABLE_DCC;
|
||||
if (!(pCreateInfo->usage & (VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_STORAGE_BIT)))
|
||||
flags |= RADEON_SURF_NO_TEXTURE;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue