mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
VideoCommon: Use coarse derivatives for Manual Texture Sampling if possible
This commit is contained in:
@ -99,7 +99,7 @@ void VideoBackend::InitBackendInfo()
|
||||
g_Config.backend_info.bSupportsGPUTextureDecoding = true;
|
||||
g_Config.backend_info.bSupportsBBox = true;
|
||||
|
||||
// Overwritten in Render.cpp later
|
||||
// Overwritten in OGLRender.cpp later
|
||||
g_Config.backend_info.bSupportsDualSourceBlend = true;
|
||||
g_Config.backend_info.bSupportsPrimitiveRestart = true;
|
||||
g_Config.backend_info.bSupportsPaletteConversion = true;
|
||||
@ -107,6 +107,7 @@ void VideoBackend::InitBackendInfo()
|
||||
g_Config.backend_info.bSupportsDepthClamp = true;
|
||||
g_Config.backend_info.bSupportsST3CTextures = false;
|
||||
g_Config.backend_info.bSupportsBPTCTextures = false;
|
||||
g_Config.backend_info.bSupportsCoarseDerivatives = false;
|
||||
|
||||
g_Config.backend_info.Adapters.clear();
|
||||
|
||||
|
@ -483,6 +483,8 @@ Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_
|
||||
GLExtensions::Supports("GL_EXT_texture_compression_s3tc");
|
||||
g_Config.backend_info.bSupportsBPTCTextures =
|
||||
GLExtensions::Supports("GL_ARB_texture_compression_bptc");
|
||||
g_Config.backend_info.bSupportsCoarseDerivatives =
|
||||
GLExtensions::Supports("GL_ARB_derivative_control") || GLExtensions::Version() >= 450;
|
||||
|
||||
if (m_main_gl_context->IsGLES())
|
||||
{
|
||||
|
@ -747,6 +747,7 @@ void ProgramShaderCache::CreateHeader()
|
||||
"%s\n" // shader image load store
|
||||
"%s\n" // shader framebuffer fetch
|
||||
"%s\n" // shader thread shuffle
|
||||
"%s\n" // derivative control
|
||||
|
||||
// Precision defines for GLSL ES
|
||||
"%s\n"
|
||||
@ -826,6 +827,9 @@ void ProgramShaderCache::CreateHeader()
|
||||
"#extension GL_ARB_shader_image_load_store : enable" :
|
||||
"",
|
||||
framebuffer_fetch_string.c_str(), shader_shuffle_string.c_str(),
|
||||
g_ActiveConfig.backend_info.bSupportsCoarseDerivatives ?
|
||||
"#extension GL_ARB_derivative_control : enable" :
|
||||
"",
|
||||
is_glsles ? "precision highp float;" : "", is_glsles ? "precision highp int;" : "",
|
||||
is_glsles ? "precision highp sampler2DArray;" : "",
|
||||
(is_glsles && g_ActiveConfig.backend_info.bSupportsPaletteConversion) ?
|
||||
|
Reference in New Issue
Block a user