Fallback to per-vertex depth rounding on GLES2.

Instead of not-working 24->16 now that it's disabled.
This commit is contained in:
Unknown W. Brackets 2016-02-06 20:42:01 -08:00
parent 0e85225e29
commit eab0278af4

View File

@ -567,13 +567,13 @@ void GLES_GPU::CheckGPUFeatures() {
// If we already have a 16-bit depth buffer, we don't need to round.
if (fbo_standard_z_depth() > 16) {
if (!g_Config.bHighQualityDepth) {
if (!g_Config.bHighQualityDepth && (features & GPU_SUPPORTS_ACCURATE_DEPTH) != 0) {
features |= GPU_SCALE_DEPTH_FROM_24BIT_TO_16BIT;
} else if (PSP_CoreParameter().compat.flags().PixelDepthRounding) {
if (!gl_extensions.IsGLES || gl_extensions.GLES3) {
// Use fragment rounding on desktop and GLES3, most accurate.
features |= GPU_ROUND_FRAGMENT_DEPTH_TO_16BIT;
} else if (fbo_standard_z_depth() == 24) {
} else if (fbo_standard_z_depth() == 24 && (features & GPU_SUPPORTS_ACCURATE_DEPTH) != 0) {
// Here we can simulate a 16 bit depth buffer by scaling.
// Note that the depth buffer is fixed point, not floating, so dividing by 256 is pretty good.
features |= GPU_SCALE_DEPTH_FROM_24BIT_TO_16BIT;