Address feedback

This commit is contained in:
Henrik Rydgård 2021-02-01 09:22:58 +01:00
parent cde3889866
commit 4c9b5ada0f
4 changed files with 4 additions and 3 deletions

View file

@ -536,6 +536,8 @@ OpenGLContext::OpenGLContext() {
caps_.depthClampSupported = gl_extensions.ARB_depth_clamp;
// Interesting potential hack for emulating GL_DEPTH_CLAMP (use a separate varying, force depth in fragment shader):
// This will induce a performance penalty on many architectures though so a blanket enable of this
// is probably not a good idea.
// https://stackoverflow.com/questions/5960757/how-to-emulate-gl-depth-clamp-nv
switch (gl_extensions.gpuVendor) {

View file

@ -222,7 +222,7 @@ void GPU_GLES::CheckGPUFeatures() {
features |= GPU_SUPPORTS_TEXTURE_FLOAT;
if (draw_->GetDeviceCaps().depthClampSupported) {
features |= GPU_SUPPORTS_DEPTH_CLAMP;
features |= GPU_SUPPORTS_DEPTH_CLAMP | GPU_SUPPORTS_ACCURATE_DEPTH;
// Our implementation of depth texturing needs simple Z range, so can't
// use the extension hacks (yet).
if (gl_extensions.GLES3)

View file

@ -236,7 +236,6 @@ void DrawEngineGLES::ApplyDrawState(int prim) {
// TODO: Might happen in clear mode if not through...
depthClampEnable = false;
} else {
// Set cull
if (gstate.getDepthRangeMin() == 0 || gstate.getDepthRangeMax() == 65535) {
// TODO: Still has a bug where we clamp to depth range if one is not the full range.
// But the alternate is not clamping in either direction...

View file

@ -220,7 +220,7 @@ void GPU_Vulkan::CheckGPUFeatures() {
}
// Might enable this later - in the first round we are mostly looking at depth/stencil/discard.
// if (g_Config.bDisableVendorBugChecks)
// if (!g_Config.bEnableVendorBugChecks)
// features |= GPU_SUPPORTS_ACCURATE_DEPTH;
// Mandatory features on Vulkan, which may be checked in "centralized" code