mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #11656 from hrydgard/disable-vendor-checks
VK: Add INI options to disable some vendor checks
This commit is contained in:
commit
ebdecb6583
4 changed files with 12 additions and 2 deletions
|
@ -605,6 +605,7 @@ static ConfigSetting graphicsSettings[] = {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
ConfigSetting("D3D11Device", &g_Config.sD3D11Device, "", true, false),
|
ConfigSetting("D3D11Device", &g_Config.sD3D11Device, "", true, false),
|
||||||
#endif
|
#endif
|
||||||
|
ConfigSetting("VendorBugChecksEnabled", &g_Config.bVendorBugChecksEnabled, true, false, false),
|
||||||
ReportedConfigSetting("RenderingMode", &g_Config.iRenderingMode, &DefaultRenderingMode, true, true),
|
ReportedConfigSetting("RenderingMode", &g_Config.iRenderingMode, &DefaultRenderingMode, true, true),
|
||||||
ConfigSetting("SoftwareRenderer", &g_Config.bSoftwareRendering, false, true, true),
|
ConfigSetting("SoftwareRenderer", &g_Config.bSoftwareRendering, false, true, true),
|
||||||
ReportedConfigSetting("HardwareTransform", &g_Config.bHardwareTransform, true, true, true),
|
ReportedConfigSetting("HardwareTransform", &g_Config.bHardwareTransform, true, true, true),
|
||||||
|
|
|
@ -131,6 +131,7 @@ public:
|
||||||
bool bSoftwareRendering;
|
bool bSoftwareRendering;
|
||||||
bool bHardwareTransform; // only used in the GLES backend
|
bool bHardwareTransform; // only used in the GLES backend
|
||||||
bool bSoftwareSkinning; // may speed up some games
|
bool bSoftwareSkinning; // may speed up some games
|
||||||
|
bool bVendorBugChecksEnabled;
|
||||||
|
|
||||||
int iRenderingMode; // 0 = non-buffered rendering 1 = buffered rendering
|
int iRenderingMode; // 0 = non-buffered rendering 1 = buffered rendering
|
||||||
int iTexFiltering; // 1 = off , 2 = nearest , 3 = linear , 4 = linear(CG)
|
int iTexFiltering; // 1 = off , 2 = nearest , 3 = linear , 4 = linear(CG)
|
||||||
|
|
|
@ -86,7 +86,9 @@ bool GenerateVulkanGLSLFragmentShader(const FShaderID &id, char *buffer, uint32_
|
||||||
bool earlyFragmentTests = ((!enableAlphaTest && !enableColorTest) || testForceToZero) && !gstate_c.Supports(GPU_ROUND_FRAGMENT_DEPTH_TO_16BIT);
|
bool earlyFragmentTests = ((!enableAlphaTest && !enableColorTest) || testForceToZero) && !gstate_c.Supports(GPU_ROUND_FRAGMENT_DEPTH_TO_16BIT);
|
||||||
bool hasStencilOutput = stencilToAlpha != REPLACE_ALPHA_NO || id.Bit(FS_BIT_REPLACE_ALPHA_WITH_STENCIL_TYPE) == 0;
|
bool hasStencilOutput = stencilToAlpha != REPLACE_ALPHA_NO || id.Bit(FS_BIT_REPLACE_ALPHA_WITH_STENCIL_TYPE) == 0;
|
||||||
|
|
||||||
bool isAdreno = vulkanVendorId == VULKAN_VENDOR_QUALCOMM;
|
// TODO: This is a bug affecting shader cache generality - we CANNOT check anything but the shader ID and (indirectly) the game ID in here really.
|
||||||
|
// Need to move this check somehow to the shader ID generator. That's tricky though because it's generic...
|
||||||
|
bool isAdreno = vulkanVendorId == VULKAN_VENDOR_QUALCOMM && g_Config.bVendorBugChecksEnabled;
|
||||||
|
|
||||||
if (earlyFragmentTests) {
|
if (earlyFragmentTests) {
|
||||||
WRITE(p, "layout (early_fragment_tests) in;\n");
|
WRITE(p, "layout (early_fragment_tests) in;\n");
|
||||||
|
|
|
@ -201,6 +201,10 @@ void GPU_Vulkan::CheckGPUFeatures() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Might enable this later - in the first round we are mostly looking at depth/stencil/discard.
|
||||||
|
// if (g_Config.bDisableVendorBugChecks)
|
||||||
|
// features |= GPU_SUPPORTS_ACCURATE_DEPTH;
|
||||||
|
|
||||||
// Mandatory features on Vulkan, which may be checked in "centralized" code
|
// Mandatory features on Vulkan, which may be checked in "centralized" code
|
||||||
features |= GPU_SUPPORTS_TEXTURE_LOD_CONTROL;
|
features |= GPU_SUPPORTS_TEXTURE_LOD_CONTROL;
|
||||||
features |= GPU_SUPPORTS_FBO;
|
features |= GPU_SUPPORTS_FBO;
|
||||||
|
@ -224,7 +228,7 @@ void GPU_Vulkan::CheckGPUFeatures() {
|
||||||
// We thought we had a bug here on nVidia but turns out we accidentally #ifdef-ed out crucial
|
// We thought we had a bug here on nVidia but turns out we accidentally #ifdef-ed out crucial
|
||||||
// code on Android.
|
// code on Android.
|
||||||
case VULKAN_VENDOR_INTEL:
|
case VULKAN_VENDOR_INTEL:
|
||||||
// Workaround for Intel driver bug.
|
// Workaround for Intel driver bug. TODO: Re-enable after some driver version
|
||||||
break;
|
break;
|
||||||
case VULKAN_VENDOR_AMD:
|
case VULKAN_VENDOR_AMD:
|
||||||
// See issue #10074, and also #10065 (AMD) and #10109 for the choice of the driver version to check for
|
// See issue #10074, and also #10065 (AMD) and #10109 for the choice of the driver version to check for
|
||||||
|
@ -235,6 +239,8 @@ void GPU_Vulkan::CheckGPUFeatures() {
|
||||||
features |= GPU_SUPPORTS_DUALSOURCE_BLEND;
|
features |= GPU_SUPPORTS_DUALSOURCE_BLEND;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (!g_Config.bVendorBugChecksEnabled)
|
||||||
|
features |= GPU_SUPPORTS_DUALSOURCE_BLEND;
|
||||||
}
|
}
|
||||||
if (vulkan_->GetFeaturesEnabled().logicOp) {
|
if (vulkan_->GetFeaturesEnabled().logicOp) {
|
||||||
features |= GPU_SUPPORTS_LOGIC_OP;
|
features |= GPU_SUPPORTS_LOGIC_OP;
|
||||||
|
|
Loading…
Add table
Reference in a new issue