GL: Remove texture gather workaround

# Conflicts:
#	source/blender/gpu/opengl/gl_backend.cc

# Conflicts:
#	source/blender/gpu/opengl/gl_shader.cc
This commit is contained in:
Clément Foucault
2024-01-31 17:15:53 +01:00
committed by Clément Foucault
parent 749a3880de
commit 1ddc35ac88
3 changed files with 0 additions and 20 deletions

View File

@@ -319,7 +319,6 @@ static void detect_workarounds()
* These code paths should be removed. */
GLContext::debug_layer_support = false;
GLContext::geometry_shader_invocations = false;
GLContext::texture_gather_support = false;
#endif
return;
@@ -414,14 +413,6 @@ static void detect_workarounds()
{
GLContext::unused_fb_slot_workaround = true;
}
/* There is a bug on older Nvidia GPU where GL_ARB_texture_gather
* is reported to be supported but yield a compile error (see #55802). */
if (GPU_type_matches(GPU_DEVICE_NVIDIA, GPU_OS_ANY, GPU_DRIVER_ANY) &&
!(epoxy_gl_version() >= 40))
{
GLContext::texture_gather_support = false;
}
/* dFdx/dFdy calculation factors, those are dependent on driver. */
if (GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_ANY, GPU_DRIVER_ANY) && strstr(version, "3.3.10750"))
{
@@ -500,7 +491,6 @@ bool GLContext::shader_draw_parameters_support = false;
bool GLContext::stencil_texturing_support = false;
bool GLContext::texture_barrier_support = false;
bool GLContext::texture_filter_anisotropic_support = false;
bool GLContext::texture_gather_support = false;
/** Workarounds. */
@@ -592,7 +582,6 @@ void GLBackend::capabilities_init()
GLContext::stencil_texturing_support = epoxy_gl_version() >= 43;
GLContext::texture_filter_anisotropic_support = epoxy_has_gl_extension(
"GL_EXT_texture_filter_anisotropic");
GLContext::texture_gather_support = epoxy_has_gl_extension("GL_ARB_texture_gather");
/* Disabled until it is proven to work. */
GLContext::framebuffer_fetch_support = false;

View File

@@ -62,7 +62,6 @@ class GLContext : public Context {
static bool stencil_texturing_support;
static bool texture_barrier_support;
static bool texture_filter_anisotropic_support;
static bool texture_gather_support;
/** Workarounds. */

View File

@@ -1075,14 +1075,6 @@ static const char *glsl_patch_default_get()
/* Enable extensions for features that are not part of our base GLSL version
* don't use an extension for something already available! */
if (GLContext::texture_gather_support) {
ss << "#extension GL_ARB_texture_gather: enable\n";
/* Some drivers don't agree on epoxy_has_gl_extension("GL_ARB_texture_gather") and the actual
* support in the shader so double check the preprocessor define (see #56544). */
ss << "#ifdef GL_ARB_texture_gather\n";
ss << "# define GPU_ARB_texture_gather\n";
ss << "#endif\n";
}
if (GLContext::shader_draw_parameters_support) {
ss << "#extension GL_ARB_shader_draw_parameters : enable\n";
ss << "#define GPU_ARB_shader_draw_parameters\n";