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.
if (majorVersion <= 15) {
bugs_.Infest(Bugs::GEOMETRY_SHADERS_SLOW);
// Also seen to cause weird issues on 18, so let's lump it in.
if (majorVersion <= 18) {
bugs_.Infest(Bugs::GEOMETRY_SHADERS_SLOW_OR_BROKEN);
}
}

View File

@ -333,7 +333,7 @@ public:
RASPBERRY_SHADER_COMP_HANG = 8,
MALI_CONSTANT_LOAD_BUG = 9,
SUBPASS_FEEDBACK_BROKEN = 10,
GEOMETRY_SHADERS_SLOW = 11,
GEOMETRY_SHADERS_SLOW_OR_BROKEN = 11,
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.
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;
if (useGeometry && (!vertexSupported || (features & GPU_SUPPORTS_VS_RANGE_CULLING) == 0)) {
// 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) {
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;
if (usable && !vertexSupported) {
CheckBox *geometryCulling = graphicsSettings->Add(new CheckBox(&g_Config.bUseGeometryShader, gr->T("Geometry shader culling")));