Skip to content

Fix using buffer reference blocks as struct members in glsl#2482

Merged
HansKristian-Work merged 1 commit into
KhronosGroup:mainfrom
hybelius:buffer_reference
May 22, 2025
Merged

Fix using buffer reference blocks as struct members in glsl#2482
HansKristian-Work merged 1 commit into
KhronosGroup:mainfrom
hybelius:buffer_reference

Conversation

@hybelius

@hybelius hybelius commented May 8, 2025

Copy link
Copy Markdown
Contributor

Buffer reference blocks are always emitted after structs, even when forward declared. This causes invalid GLSL to be generated if a buffer reference block is used as a struct member.

This patch fixes the problem by emitting buffer reference block forward declarations before emitting structs.

Buffer reference blocks are always emitted after structs, even when forward declared.
This causes invalid GLSL to be generated if a buffer reference block is used as a struct member.

This patch fixes the problem by emitting buffer reference block forward declarations before emitting structs.

Change-Id: I27dd9a8855f3514f48689a9203f9562f387b55af
Signed-off-by: Patrik Wallin Hybelius <patrik.wallinhybelius@arm.com>
@CLAassistant

CLAassistant commented May 8, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@HansKristian-Work HansKristian-Work merged commit 0c25283 into KhronosGroup:main May 22, 2025
2 of 6 checks passed
@hybelius hybelius deleted the buffer_reference branch June 19, 2025 13:16
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.

3 participants