Fix T98708: Crash on startup - OpenGL4.2 without conservative depth.

Intel iGPU (HD4000) supports OpenGL 4.4 but doesn't support conservative
depth. (GL_ARB_conservative_depth). This change will only check for the
availability of the extension.
This commit is contained in:
Jeroen Bakker 2022-06-15 09:09:43 +02:00 committed by Philipp Oeser
parent de267abe4e
commit 92fee7077a
Notes: blender-bot 2023-02-13 15:16:29 +01:00
Referenced by issue #98708, Blender 3.2.0 crashes on start on Ubuntu 22.04
Referenced by issue #98661, 3.2: Potential candidates for corrective releases
1 changed files with 2 additions and 2 deletions

View File

@ -613,7 +613,7 @@ std::string GLShader::fragment_interface_declare(const ShaderCreateInfo &info) c
if (info.early_fragment_test_) {
ss << "layout(early_fragment_tests) in;\n";
}
if (GLEW_VERSION_4_2 || GLEW_ARB_conservative_depth) {
if (GLEW_ARB_conservative_depth) {
ss << "layout(" << to_string(info.depth_write_) << ") out float gl_FragDepth;\n";
}
ss << "\n/* Outputs. */\n";
@ -836,7 +836,7 @@ static char *glsl_patch_default_get()
STR_CONCAT(patch, slen, "#extension GL_ARB_texture_cube_map_array : enable\n");
STR_CONCAT(patch, slen, "#define GPU_ARB_texture_cube_map_array\n");
}
if (!GLEW_VERSION_4_2 && GLEW_ARB_conservative_depth) {
if (GLEW_ARB_conservative_depth) {
STR_CONCAT(patch, slen, "#extension GL_ARB_conservative_depth : enable\n");
}
if (GPU_shader_image_load_store_support()) {