mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-01-27 16:24:54 +00:00
Vulkan: Allow configuring geometry shaders on/off.
This commit is contained in:
parent
8df956b036
commit
2832edcc37
@ -874,6 +874,7 @@ static ConfigSetting graphicsSettings[] = {
|
||||
#endif
|
||||
ConfigSetting("CameraDevice", &g_Config.sCameraDevice, "", true, false),
|
||||
ConfigSetting("VendorBugChecksEnabled", &g_Config.bVendorBugChecksEnabled, true, false, false),
|
||||
ConfigSetting("UseGeometryShader", &g_Config.bUseGeometryShader, true, true, true),
|
||||
ReportedConfigSetting("RenderingMode", &g_Config.iRenderingMode, 1, true, true),
|
||||
ConfigSetting("SoftwareRenderer", &g_Config.bSoftwareRendering, false, true, true),
|
||||
ConfigSetting("SoftwareRendererJit", &g_Config.bSoftwareRenderingJit, true, true, true),
|
||||
|
@ -164,6 +164,7 @@ public:
|
||||
bool bHardwareTransform; // only used in the GLES backend
|
||||
bool bSoftwareSkinning; // may speed up some games
|
||||
bool bVendorBugChecksEnabled;
|
||||
bool bUseGeometryShader;
|
||||
|
||||
int iRenderingMode; // 0 = non-buffered rendering 1 = buffered rendering
|
||||
int iTexFiltering; // 1 = auto , 2 = nearest , 3 = linear , 4 = auto max quality
|
||||
|
@ -233,9 +233,10 @@ u32 GPU_Vulkan::CheckGPUFeatures() const {
|
||||
}
|
||||
|
||||
// Fall back to geometry shader culling if we can't do vertex range culling.
|
||||
if (enabledFeatures.geometryShader && !draw_->GetBugs().Has(Draw::Bugs::GEOMETRY_SHADERS_SLOW)) {
|
||||
if (enabledFeatures.geometryShader) {
|
||||
const bool useGeometry = g_Config.bUseGeometryShader && !draw_->GetBugs().Has(Draw::Bugs::GEOMETRY_SHADERS_SLOW);
|
||||
const bool vertexSupported = draw_->GetDeviceCaps().clipDistanceSupported && draw_->GetDeviceCaps().cullDistanceSupported;
|
||||
if (!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.
|
||||
features |= GPU_SUPPORTS_GS_CULLING;
|
||||
features &= ~GPU_SUPPORTS_VS_RANGE_CULLING;
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user