Vulkan: Disable geometry shaders for Mali <= 18.

These drivers apparently have some weird behavior.
This commit is contained in:
Unknown W. Brackets 2022-10-09 00:57:10 -07:00
parent 1c7a5bbb49
commit bc84d6345b
4 changed files with 6 additions and 5 deletions

View file

@ -848,8 +848,9 @@ VKContext::VKContext(VulkanContext *vulkan)
} }
// Older ARM devices have very slow geometry shaders, not worth using. At least before 15. // Older ARM devices have very slow geometry shaders, not worth using. At least before 15.
if (majorVersion <= 15) { // Also seen to cause weird issues on 18, so let's lump it in.
bugs_.Infest(Bugs::GEOMETRY_SHADERS_SLOW); if (majorVersion <= 18) {
bugs_.Infest(Bugs::GEOMETRY_SHADERS_SLOW_OR_BROKEN);
} }
} }

View file

@ -333,7 +333,7 @@ public:
RASPBERRY_SHADER_COMP_HANG = 8, RASPBERRY_SHADER_COMP_HANG = 8,
MALI_CONSTANT_LOAD_BUG = 9, MALI_CONSTANT_LOAD_BUG = 9,
SUBPASS_FEEDBACK_BROKEN = 10, SUBPASS_FEEDBACK_BROKEN = 10,
GEOMETRY_SHADERS_SLOW = 11, GEOMETRY_SHADERS_SLOW_OR_BROKEN = 11,
MAX_BUG, MAX_BUG,
}; };

View file

@ -234,7 +234,7 @@ u32 GPU_Vulkan::CheckGPUFeatures() const {
// Fall back to geometry shader culling if we can't do vertex range culling. // Fall back to geometry shader culling if we can't do vertex range culling.
if (enabledFeatures.geometryShader) { if (enabledFeatures.geometryShader) {
const bool useGeometry = g_Config.bUseGeometryShader && !draw_->GetBugs().Has(Draw::Bugs::GEOMETRY_SHADERS_SLOW); const bool useGeometry = g_Config.bUseGeometryShader && !draw_->GetBugs().Has(Draw::Bugs::GEOMETRY_SHADERS_SLOW_OR_BROKEN);
const bool vertexSupported = draw_->GetDeviceCaps().clipDistanceSupported && draw_->GetDeviceCaps().cullDistanceSupported; const bool vertexSupported = draw_->GetDeviceCaps().clipDistanceSupported && draw_->GetDeviceCaps().cullDistanceSupported;
if (useGeometry && (!vertexSupported || (features & GPU_SUPPORTS_VS_RANGE_CULLING) == 0)) { if (useGeometry && (!vertexSupported || (features & GPU_SUPPORTS_VS_RANGE_CULLING) == 0)) {
// Switch to culling via the geometry shader if not fully supported in vertex. // Switch to culling via the geometry shader if not fully supported in vertex.

View file

@ -474,7 +474,7 @@ void GameSettingsScreen::CreateViews() {
} }
if (GetGPUBackend() == GPUBackend::VULKAN) { if (GetGPUBackend() == GPUBackend::VULKAN) {
const bool usable = !draw->GetBugs().Has(Draw::Bugs::GEOMETRY_SHADERS_SLOW); const bool usable = !draw->GetBugs().Has(Draw::Bugs::GEOMETRY_SHADERS_SLOW_OR_BROKEN);
const bool vertexSupported = draw->GetDeviceCaps().clipDistanceSupported && draw->GetDeviceCaps().cullDistanceSupported; const bool vertexSupported = draw->GetDeviceCaps().clipDistanceSupported && draw->GetDeviceCaps().cullDistanceSupported;
if (usable && !vertexSupported) { if (usable && !vertexSupported) {
CheckBox *geometryCulling = graphicsSettings->Add(new CheckBox(&g_Config.bUseGeometryShader, gr->T("Geometry shader culling"))); CheckBox *geometryCulling = graphicsSettings->Add(new CheckBox(&g_Config.bUseGeometryShader, gr->T("Geometry shader culling")));