I need help diagnosing an error.
I am on ubuntu 23.10.
GL_VENDOR : AMD
GL_RENDERER : Radeon RX 5500 XT (navi14, LLVM 17.0.4, DRM 3.56, 6.5.0-44-generic)
GL_VERSION : 4.6 (Compatibility Profile) Mesa 23.3.0-devel
GLSL VERSION: 4.60
glCompileShader segfaults in fragment shader when using samplerCube with a uvec2 bindless texture handle.
Funny thing is all the shaders I am using with sampler2D with a uvec2 bindless texture handle work as expected. I am totally stopped from all progress until this is cleared. I am suspecting a mesa update did this, but I don't know enough to diagnose it. I want to emphasize , one day all my shaders worked and then the next , this error. ( Which means I did not edit any of my code to cause this error. )
dmesg has an error:
segfault at 0 ip 00007344e6a84680 sp 00007ffeef624b30 error 4 in radeonsi_dri.so[7344e6a7e000+e27000] likely on CPU 7 (core 7, socket 0)
What I have tried already: I have changed to a different known working video card. ( no-go ) I have used a backup drive that had the same code on it and it works. The backup drive had the same exact Mesa version on it. It has to be software related because when I swap to the backup drive, the shaders compile. I installed the latest radeon drivers from AMD and that did not fix it either. Also, I checked the return values of the GL_ARB_bindless_texture and I am not returing null.
FRAGMENT SHADER SOURCE:
const char* fragment_shader_source =
"#version 450 core\n"
"#extension GL_ARB_bindless_texture : require\n"
"in vec3 Normal;\n"
"in vec2 TexCoord;\n"
"in vec3 FragPos;\n"
"out vec4 FragColor;\n"
"uniform vec3 view_position;\n"
"uniform uvec2 reflection_map_bindless_texture;\n"
// works(1)"uniform samplerCube cubemap;\n"
"void main(){\n"
"vec3 I = normalize( FragPos - view_position );\n"
"vec3 R = reflect( I , normalize( Normal ) );\n"
"FragColor = texture( samplerCube( reflection_map_bindless_texture ) , R );\n"
// works(1)"FragColor = texture( cubemap , R );\n"
"}\n";
I hope someone else has seen this and can tell me what is happening. Or maybe can point me in right path to solving this.