Vulkan: Allow configuring geometry shaders on/off.

This commit is contained in:
Unknown W. Brackets 2022-10-02 07:41:36 -07:00
parent 8df956b036
commit 2832edcc37
4 changed files with 14 additions and 2 deletions

View file

@ -473,6 +473,15 @@ void GameSettingsScreen::CreateViews() {
inflightChoice->OnChoice.Handle(this, &GameSettingsScreen::OnInflightFramesChoice);
}
if (GetGPUBackend() == GPUBackend::VULKAN) {
const bool usable = !draw->GetBugs().Has(Draw::Bugs::GEOMETRY_SHADERS_SLOW);
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")));
geometryCulling->SetDisabledPtr(&g_Config.bSoftwareRendering);
}
}
if (deviceType != DEVICE_TYPE_VR) {
CheckBox *hwTransform = graphicsSettings->Add(new CheckBox(&g_Config.bHardwareTransform, gr->T("Hardware Transform")));
hwTransform->SetDisabledPtr(&g_Config.bSoftwareRendering);