radv: disable alphaToOne except for Zink

It's just completely broken if alpha-to-coverage is also used. Given
this is a requirement for Zink and no known GL apps are affected, let's
disable for everything except Zink. This is going to be fixed but the
fixes aren't small enough for backporting.

This fixes a rendering issue with XPlane 12.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32576>
This commit is contained in:
Samuel Pitoiset 2024-12-10 17:21:56 +01:00 committed by Marge Bot
parent 310e03c8d3
commit 3b010a9e60

View file

@ -786,6 +786,7 @@ radv_physical_device_get_features(const struct radv_physical_device *pdev, struc
bool has_shader_image_float_minmax = pdev->info.gfx_level != GFX8 && pdev->info.gfx_level != GFX9 &&
pdev->info.gfx_level != GFX11 && pdev->info.gfx_level != GFX11_5;
bool has_fragment_shader_interlock = radv_has_pops(pdev);
const bool is_zink = instance->vk.app_info.engine_name && !strcmp(instance->vk.app_info.engine_name, "mesa zink");
*features = (struct vk_features){
/* Vulkan 1.0 */
@ -806,7 +807,11 @@ radv_physical_device_get_features(const struct radv_physical_device *pdev, struc
.depthBounds = true,
.wideLines = true,
.largePoints = true,
.alphaToOne = true,
/* FIXME: alpha-to-one is performed before alpha-to-coverage but it should be after.
* This is currently broken on RADV and the fixes aren't trivial to backport. Let's disable it
* for everything except Zink because it's a requirement and no application seems affected.
*/
.alphaToOne = is_zink,
.multiViewport = true,
.samplerAnisotropy = true,
.textureCompressionETC2 = pdev->info.has_etc_support || pdev->emulate_etc2,
@ -1190,7 +1195,7 @@ radv_physical_device_get_features(const struct radv_physical_device *pdev, struc
.extendedDynamicState3SampleLocationsEnable = pdev->info.gfx_level < GFX10,
.extendedDynamicState3LineRasterizationMode = true,
.extendedDynamicState3ExtraPrimitiveOverestimationSize = false,
.extendedDynamicState3AlphaToOneEnable = !pdev->use_llvm,
.extendedDynamicState3AlphaToOneEnable = is_zink && !pdev->use_llvm,
.extendedDynamicState3RasterizationStream = false,
.extendedDynamicState3ColorBlendAdvanced = false,
.extendedDynamicState3ViewportWScalingEnable = false,