Disable descriptor aliasing on Adreno to workaround shader compiler bug

Alised descriptor sets are incorrectly interpreted by the shader compiler causing it to bugger up LLVM function argument types and crash

Co-authored-by: PixelyIon <pixelyion@protonmail.com>
This commit is contained in:
Billy Laws 2022-03-16 21:14:52 +00:00 committed by PixelyIon
parent fc2c123ae2
commit fae5332f20
3 changed files with 3 additions and 1 deletions

View File

@ -35,7 +35,7 @@ namespace skyline::gpu {
profile = Shader::Profile{
.supported_spirv = traits.supportsSpirv14 ? 0x00010400U : 0x00010000U,
.unified_descriptor_binding = true,
.support_descriptor_aliasing = true,
.support_descriptor_aliasing = !traits.quirks.brokenDescriptorAliasing,
.support_int8 = traits.supportsInt8,
.support_int16 = traits.supportsInt16,
.support_int64 = traits.supportsInt64,

View File

@ -132,6 +132,7 @@ namespace skyline::gpu {
case vk::DriverId::eQualcommProprietary: {
needsIndividualTextureBindingWrites = true;
vkImageMutableFormatCostly = true; // Disables UBWC
brokenDescriptorAliasing = true;
break;
}

View File

@ -41,6 +41,7 @@ namespace skyline::gpu {
struct QuirkManager {
bool needsIndividualTextureBindingWrites{}; //!< [Adreno Proprietary] A bug that requires descriptor set writes for VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER to be done individually with descriptorCount = 1 rather than batched
bool vkImageMutableFormatCostly{}; //!< [Adreno Proprietary/Freedreno] An indication that VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT is costly and should not be enabled unless absolutely necessary (Disables UBWC on Adreno GPUs)
bool brokenDescriptorAliasing{}; //!< [Adreno Proprietary] A bug that causes alised descriptor sets to be incorrectly interpreted by the shader compiler leading to it buggering up LLVM function argument types and crashing
QuirkManager() = default;