mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Vulkan: Turn off the ubershader on T880, T860 and T830 on old driver versions.
This commit is contained in:
parent
1d8e549b6b
commit
2cca0b265e
3 changed files with 22 additions and 2 deletions
|
@ -948,6 +948,9 @@ VKContext::VKContext(VulkanContext *vulkan)
|
|||
// Workaround for Intel driver bug. TODO: Re-enable after some driver version
|
||||
bugs_.Infest(Bugs::DUAL_SOURCE_BLENDING_BROKEN);
|
||||
} else if (caps_.vendor == GPUVendor::VENDOR_ARM) {
|
||||
// Really old Vulkan drivers for Mali didn't have proper versions. We try to detect that (can't be 100% but pretty good).
|
||||
bool isOldVersion = IsHashMaliDriverVersion(deviceProps);
|
||||
|
||||
int majorVersion = VK_API_VERSION_MAJOR(deviceProps.driverVersion);
|
||||
|
||||
// These GPUs (up to some certain hardware version?) have a bug where draws where gl_Position.w == .z
|
||||
|
@ -966,9 +969,18 @@ VKContext::VKContext(VulkanContext *vulkan)
|
|||
|
||||
// Older ARM devices have very slow geometry shaders, not worth using. At least before 15.
|
||||
// Also seen to cause weird issues on 18, so let's lump it in.
|
||||
if (majorVersion <= 18) {
|
||||
if (majorVersion <= 18 || isOldVersion) {
|
||||
bugs_.Infest(Bugs::GEOMETRY_SHADERS_SLOW_OR_BROKEN);
|
||||
}
|
||||
|
||||
// Attempt to workaround #17386
|
||||
if (isOldVersion) {
|
||||
if (!strcmp(deviceProps.deviceName, "Mali-T880") ||
|
||||
!strcmp(deviceProps.deviceName, "Mali-T860") ||
|
||||
!strcmp(deviceProps.deviceName, "Mali-T830")) {
|
||||
bugs_.Infest(Bugs::UNIFORM_INDEXING_BROKEN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Limited, through input attachments and self-dependencies.
|
||||
|
|
|
@ -347,6 +347,7 @@ public:
|
|||
SUBPASS_FEEDBACK_BROKEN = 10,
|
||||
GEOMETRY_SHADERS_SLOW_OR_BROKEN = 11,
|
||||
ADRENO_RESOURCE_DEADLOCK = 12,
|
||||
UNIFORM_INDEXING_BROKEN = 13, // not a properly diagnosed issue, a workaround attempt: #17386
|
||||
MAX_BUG,
|
||||
};
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ u32 GPU_Vulkan::CheckGPUFeatures() const {
|
|||
uint32_t features = GPUCommonHW::CheckGPUFeatures();
|
||||
|
||||
VulkanContext *vulkan = (VulkanContext *)draw_->GetNativeObject(Draw::NativeObject::CONTEXT);
|
||||
|
||||
|
||||
// Could simplify this, but it's good as documentation.
|
||||
switch (vulkan->GetPhysicalDeviceProperties().properties.vendorID) {
|
||||
case VULKAN_VENDOR_AMD:
|
||||
|
@ -216,6 +216,8 @@ u32 GPU_Vulkan::CheckGPUFeatures() const {
|
|||
|
||||
// NOTE: Galaxy S8 has version 16 but still seems to have some problems with accurate depth.
|
||||
|
||||
// TODO: Move this check to thin3d_vulkan.
|
||||
|
||||
bool driverTooOld = IsHashMaliDriverVersion(vulkan->GetPhysicalDeviceProperties().properties)
|
||||
|| VK_VERSION_MAJOR(vulkan->GetPhysicalDeviceProperties().properties.driverVersion) < 14;
|
||||
|
||||
|
@ -293,6 +295,11 @@ u32 GPU_Vulkan::CheckGPUFeatures() const {
|
|||
features &= ~GPU_USE_FRAMEBUFFER_FETCH;
|
||||
// }
|
||||
|
||||
// Attempt to workaround #17386
|
||||
if (draw_->GetBugs().Has(Draw::Bugs::UNIFORM_INDEXING_BROKEN)) {
|
||||
features &= ~GPU_USE_LIGHT_UBERSHADER;
|
||||
}
|
||||
|
||||
return CheckGPUFeaturesLate(features);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue