[radeonsi] Using bindless image in shader causes "Unknown intrinsic: @bindless_image_descriptor_amd" and GL_EXT_shader_image_load_formatted is not respected
System information
- OS: Manjaro Linux
- GPU: RX 5700XT
- Kernel version: 6.6.32-1-MANJARO
- Mesa version: 4.6 (Compatibility Profile) Mesa 24.0.9-manjaro1.1
Description
I am trying to compile this compute shader, the standard glCreateShader, glShaderSource, glCompileShader
way:
#version 460 core
#extension GL_ARB_bindless_texture : require
#extension GL_EXT_shader_image_load_formatted : require
layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;
struct GpuPointShadow {
image2D RayTracedShadowMapImage;
};
layout(std140, binding = 2) uniform ShadowsUBO {
GpuPointShadow PointShadows[1];
} shadowsUBO;
void main() {
GpuPointShadow pointShadow = shadowsUBO.PointShadows[0];
imageSize(pointShadow.RayTracedShadowMapImage);
}
It compiles fine on property AMD and NVIDIA drivers, however on Mesa 24.0.9 I am getting two error messages.
First (from glGetShaderInfoLog()
):
- 0:9(10): error: image not qualified with writeonly must have a format layout qualifier
I shouldn't have to specify a format or make the image writeonly
as I am enabling the GL_EXT_shader_image_load_formatted
extension.
In this I can work arround it by using writeonly
but that still leaves me the second message.
Second (this is printed without me querying anything):
- Unknown intrinsic: div 32x8 %61 = @bindless_image_descriptor_amd (%60) (image_dim=1D, image_array=false, format=none, access=none)
This also gets printed with other functions operating on the image like imageLoad
/imageStore