Skip to content

Fix interaction between GL_EXT_mesh_shader and GL_EXT_fragment_shading_rate#3298

Merged
arcady-lunarg merged 2 commits intoKhronosGroup:mainfrom
zeux:extms-shadingrate-fix
Aug 7, 2023
Merged

Fix interaction between GL_EXT_mesh_shader and GL_EXT_fragment_shading_rate#3298
arcady-lunarg merged 2 commits intoKhronosGroup:mainfrom
zeux:extms-shadingrate-fix

Conversation

@zeux
Copy link
Copy Markdown
Contributor

@zeux zeux commented Aug 6, 2023

Before this change, using gl_MeshPrimitivesEXT in mesh shader would unconditionally create gl_MeshPrimitivesEXT.gl_PrimitiveShadingRateEXT field and add PrimitiveShadingRateKHR capability to the output SPIRV file, which would subsequently trigger validation errors when creating the shader module unless the application requested primitive shading rate feature.

What should happen instead is that unless GL_EXT_fragment_shading_rate extension is enabled, we should not allow using
gl_PrimitiveShadingRateEXT and should not emit the associated fields into the output.

This change fixes this by using existing filterMember mechanism that is already used in a few other cases like this, and adjusting the required extension on the field member which will generate an error when gl_PrimitiveShadingRateEXT is used without enabling the extension.

Fixes #3103.

…g_rate

Before this change, using gl_MeshPrimitivesEXT in mesh shader would
unconditionally create gl_MeshPrimitivesEXT.gl_PrimitiveShadingRateEXT
field and add PrimitiveShadingRateKHR capability to the output SPIRV
file, which would subsequently trigger validation errors when creating
the shader module unless the application requested primitive shading
rate feature.

What should happen instead is that unless GL_EXT_fragment_shading_rate
extension is enabled, we should not allow using
gl_PrimitiveShadingRateEXT and should not emit the associated fields
into the output.

This change fixes this by using existing filterMember mechanism that is
already used in a few other cases like this, and adjusting the required
extension on the field member which will generate an error when
gl_PrimitiveShadingRateEXT is used without enabling the extension.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Aug 6, 2023

CLA assistant check
All committers have signed the CLA.

@arcady-lunarg arcady-lunarg added the kokoro:run Trigger Google bot runs label Aug 7, 2023
@kokoro-team kokoro-team removed the kokoro:run Trigger Google bot runs label Aug 7, 2023
Copy link
Copy Markdown
Contributor

@arcady-lunarg arcady-lunarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the fix.

@arcady-lunarg arcady-lunarg merged commit 34d4f78 into KhronosGroup:main Aug 7, 2023
@zeux zeux deleted the extms-shadingrate-fix branch August 7, 2023 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Usage of any fields of gl_MeshPrimitivesEXT is enabling capability FragmentShadingRateKHR even if gl_PrimitiveShadingRateEXT is not used

4 participants