GL: Remove geometry shader invocations workaround

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

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

Pull Request: https://projects.blender.org/blender/blender/pulls/116600
This commit is contained in:
Clément Foucault
2024-01-31 17:17:38 +01:00
committed by Gitea
parent 1ddc35ac88
commit c0c3565714
3 changed files with 0 additions and 13 deletions

View File

@@ -318,7 +318,6 @@ static void detect_workarounds()
/* Do not alter OpenGL 4.3 features.
* These code paths should be removed. */
GLContext::debug_layer_support = false;
GLContext::geometry_shader_invocations = false;
#endif
return;
@@ -481,7 +480,6 @@ bool GLContext::debug_layer_support = false;
bool GLContext::direct_state_access_support = false;
bool GLContext::explicit_location_support = false;
bool GLContext::framebuffer_fetch_support = false;
bool GLContext::geometry_shader_invocations = false;
bool GLContext::layered_rendering_support = false;
bool GLContext::native_barycentric_support = false;
bool GLContext::multi_bind_support = false;
@@ -567,7 +565,6 @@ void GLBackend::capabilities_init()
epoxy_has_gl_extension("GL_ARB_debug_output");
GLContext::direct_state_access_support = epoxy_has_gl_extension("GL_ARB_direct_state_access");
GLContext::explicit_location_support = epoxy_gl_version() >= 43;
GLContext::geometry_shader_invocations = epoxy_has_gl_extension("GL_ARB_gpu_shader5");
GLContext::framebuffer_fetch_support = epoxy_has_gl_extension("GL_EXT_shader_framebuffer_fetch");
GLContext::texture_barrier_support = epoxy_has_gl_extension("GL_ARB_texture_barrier");
GLContext::layered_rendering_support = epoxy_has_gl_extension(

View File

@@ -51,7 +51,6 @@ class GLContext : public Context {
static bool debug_layer_support;
static bool direct_state_access_support;
static bool explicit_location_support;
static bool geometry_shader_invocations;
static bool framebuffer_fetch_support;
static bool layered_rendering_support;
static bool native_barycentric_support;

View File

@@ -895,11 +895,6 @@ std::string GLShader::geometry_layout_declare(const ShaderCreateInfo &info) cons
int max_verts = info.geometry_layout_.max_vertices;
int invocations = info.geometry_layout_.invocations;
if (GLContext::geometry_shader_invocations == false && invocations != -1) {
max_verts *= invocations;
invocations = -1;
}
std::stringstream ss;
ss << "\n/* Geometry Layout. */\n";
ss << "layout(" << to_string(info.geometry_layout_.primitive_in);
@@ -1080,10 +1075,6 @@ static const char *glsl_patch_default_get()
ss << "#define GPU_ARB_shader_draw_parameters\n";
ss << "#define gpu_BaseInstance gl_BaseInstanceARB\n";
}
if (GLContext::geometry_shader_invocations) {
ss << "#extension GL_ARB_gpu_shader5 : enable\n";
ss << "#define GPU_ARB_gpu_shader5\n";
}
if (epoxy_has_gl_extension("GL_ARB_conservative_depth")) {
ss << "#extension GL_ARB_conservative_depth : enable\n";
}