From 7d3e95d7edffdd4ba34b2987659b9ef235f802f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 14 Nov 2017 16:34:23 +0100 Subject: [PATCH] Buildfix, update comments slightly --- GPU/Common/TextureCacheCommon.cpp | 6 +++--- GPU/D3D11/GPU_D3D11.cpp | 10 ---------- GPU/GLES/TextureCacheGLES.cpp | 4 +++- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/GPU/Common/TextureCacheCommon.cpp b/GPU/Common/TextureCacheCommon.cpp index 6175140da45d..49940114b852 100644 --- a/GPU/Common/TextureCacheCommon.cpp +++ b/GPU/Common/TextureCacheCommon.cpp @@ -229,7 +229,9 @@ void TextureCacheCommon::UpdateSamplingParams(TexCacheEntry &entry, SamplerCache key.lodBias = 0; break; case GE_TEXLEVEL_MODE_SLOPE: - // Just do the normal thing without bias. + // It's incorrect to use the slope as a bias. Instead it should be passed + // into the shader directly as an explicit lod level, with the bias on top. For now, we just kill the + // lodBias in this mode, working around #9772. key.maxLevel = entry.maxLevel; key.minLevel = 0; key.lodBias = 0; @@ -237,8 +239,6 @@ void TextureCacheCommon::UpdateSamplingParams(TexCacheEntry &entry, SamplerCache } } - // TODO: Support lod bias stuff - if (entry.framebuffer) { WARN_LOG_REPORT_ONCE(wrongFramebufAttach, G3D, "Framebuffer still attached in UpdateSamplingParams()?"); } diff --git a/GPU/D3D11/GPU_D3D11.cpp b/GPU/D3D11/GPU_D3D11.cpp index 760285b5deed..59f3241e6bf9 100644 --- a/GPU/D3D11/GPU_D3D11.cpp +++ b/GPU/D3D11/GPU_D3D11.cpp @@ -176,16 +176,6 @@ GPU_D3D11::GPU_D3D11(GraphicsContext *gfxCtx, Draw::DrawContext *draw) // Some of our defaults are different from hw defaults, let's assert them. // We restore each frame anyway, but here is convenient for tests. textureCache_->NotifyConfigChanged(); - - if (g_Config.bHardwareTessellation) { - if (false) { // TODO: Check GPU features - // Disable hardware tessellation. - g_Config.bHardwareTessellation = false; - ERROR_LOG(G3D, "Hardware Tessellation is unsupported, falling back to software tessellation"); - I18NCategory *gr = GetI18NCategory("Graphics"); - host->NotifyUserMessage(gr->T("Turn off Hardware Tessellation - unsupported"), 2.5f, 0xFF3030FF); - } - } } GPU_D3D11::~GPU_D3D11() { diff --git a/GPU/GLES/TextureCacheGLES.cpp b/GPU/GLES/TextureCacheGLES.cpp index 513d6d5e372f..6660b58dada8 100644 --- a/GPU/GLES/TextureCacheGLES.cpp +++ b/GPU/GLES/TextureCacheGLES.cpp @@ -148,9 +148,11 @@ void TextureCacheGLES::UpdateSamplingParams(TexCacheEntry &entry, bool force) { glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, std::max(0.0f, std::min((float)maxLevel, lodBias))); } else { // mode == GE_TEXLEVEL_MODE_SLOPE) { // It's incorrect to use the slope as a bias. Instead it should be passed - // into the shader directly as an explicit lod level. For now, we just kill the + // into the shader directly as an explicit lod level, with the bias on top. For now, we just kill the // lodBias in this mode, working around #9772. +#ifndef USING_GLES2 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_LOD_BIAS, 0.0f); +#endif glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_LOD, 0); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, (float)maxLevel); }