Skip to content

glsl: respect GL_EXT_shader_image_load_formatted when image is embedded in a struct

Qiang Yu requested to merge yuq825/mesa:topic/fix-image-format into main

What does this MR do and why?

For #11323 (closed)

glsl: respect GL_EXT_shader_image_load_formatted when image is embedded in a struct

Fix compilation failure when image is embedded in struct when
GL_EXT_shader_image_load_formatted is enabled:

  struct GpuPointShadow {
      image2D RayTracedShadowMapImage;
  };

  layout(std140, binding = 2) uniform ShadowsUBO {
      GpuPointShadow PointShadows[1];
  } shadowsUBO;

Compile log:
  error: image not qualified with `writeonly' must have a format layout qualifier

Signed-off-by: Qiang Yu <yuq825@gmail.com>

Merge request reports