Skip to content

broadcom/compiler: handle gl_PrimitiveID read in fragment shaders without a geometry shader

Iago Toral requested to merge itoral/mesa:v3d_fs_primitive_id into main

OpenGL ES 3.1 specifies that a geometry shader can write to gl_PrimitiveID, which can then be read by a fragment shader.

OpenGL ES 3.2 additionally adds the capacity for the fragment shader to read gl_PrimitiveID even if there is no geometry shader. This commit adds support for this feature, which is also implicitly expected by the geometry shader feature in Vulkan 1.0.

Fixes: dEQP-VK.pipeline.framebuffer_attachment.no_attachments dEQP-VK.pipeline.framebuffer_attachment.no_attachments_ms

Merge request reports