Skip to content

amd/surface, radv: do not set flags.texture for BC + linear format

Yogesh Mohan Marmithu requested to merge yogeshmohan/mesa:bc_linear into main

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 ValidateSwModeParams() in https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/amd/addrlib/src/gfx9/gfx9addrlib.cpp From Marek Olšák the addrlib behaviour is correct.

In pal driver, flags.texture is not set in DetermineSurfaceFlags() function if BC + linear from file https://github.com/GPUOpen-Drivers/pal/blob/dev/src/core/addrMgr/addrMgr2/addrMgr2.cpp pal driver does it because it is expected that the BC + linear image is only used as transfer resource.

Use the solution from pal driver for radv driver also.

Testing done in vega gpu: no new failures with opengl-cts-4.6.2

Merge request reports

Loading