diff --git a/app/src/main/cpp/skyline/gpu/trait_manager.cpp b/app/src/main/cpp/skyline/gpu/trait_manager.cpp index 6cc6b70d..dd5db21b 100644 --- a/app/src/main/cpp/skyline/gpu/trait_manager.cpp +++ b/app/src/main/cpp/skyline/gpu/trait_manager.cpp @@ -10,6 +10,16 @@ namespace skyline::gpu { bool supportsUniformBufferStandardLayout{}; // We require VK_KHR_uniform_buffer_standard_layout but assume it is implicitly supported even when not present for (auto &extension : deviceExtensions) { + #define EXT_SET_COND(name, property, cond) \ + case util::Hash(name): \ + if (cond) { \ + if (name == extensionName) { \ + property = true; \ + enabledExtensions.push_back(std::array{name}); \ + } \ + } \ + break + #define EXT_SET(name, property) \ case util::Hash(name): \ if (name == extensionName) { \ @@ -35,7 +45,7 @@ namespace skyline::gpu { EXT_SET("VK_EXT_custom_border_color", hasCustomBorderColorExt); EXT_SET("VK_EXT_provoking_vertex", hasProvokingVertexExt); EXT_SET("VK_EXT_vertex_attribute_divisor", hasVertexAttributeDivisorExt); - EXT_SET("VK_KHR_push_descriptor", supportsPushDescriptors); + EXT_SET_COND("VK_KHR_push_descriptor", supportsPushDescriptors, !quirks.brokenPushDescriptors); EXT_SET("VK_KHR_imageless_framebuffer", hasImagelessFramebuffersExt); EXT_SET("VK_EXT_global_priority", supportsGlobalPriority); EXT_SET("VK_EXT_shader_viewport_index_layer", supportsShaderViewportIndexLayer); @@ -170,6 +180,7 @@ namespace skyline::gpu { adrenoBrokenFormatReport = true; brokenDescriptorAliasing = true; relaxedRenderPassCompatibility = true; // Adreno drivers support relaxed render pass compatibility rules + brokenPushDescriptors = true; if (deviceProperties.driverVersion < VK_MAKE_VERSION(512, 600, 0)) maxSubpassCount = 64; // Driver will segfault while destroying the renderpass and associated objects if this is exceeded on all 5xx and below drivers diff --git a/app/src/main/cpp/skyline/gpu/trait_manager.h b/app/src/main/cpp/skyline/gpu/trait_manager.h index 6d9bde40..87bdd2fb 100644 --- a/app/src/main/cpp/skyline/gpu/trait_manager.h +++ b/app/src/main/cpp/skyline/gpu/trait_manager.h @@ -53,6 +53,7 @@ namespace skyline::gpu { bool adrenoBrokenFormatReport{}; //!< [Adreno Proprietary] If the drivers report format support incorrectly and include cases that are supported by the hardware 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 bool relaxedRenderPassCompatibility{}; //!< [Adreno Proprietary/Freedreno] A relaxed version of Vulkan specification's render pass compatibility clause which allows for caching pipeline objects for multi-subpass renderpasses, this is intentionally disabled by default as it requires testing prior to enabling + bool brokenPushDescriptors{}; //!< [Adreno Proprietary] A bug that causes push descriptor updates to ignored by the driver in certain situations u32 maxSubpassCount{std::numeric_limits::max()}; //!< The maximum amount of subpasses within a renderpass, this is limited to 64 on older Adreno proprietary drivers vk::QueueGlobalPriorityEXT maxGlobalPriority{vk::QueueGlobalPriorityEXT::eMedium}; //!< The highest allowed global priority of the queue, drivers will not allow higher priorities to be set on queues