Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward Declaration silently ignores buffer_reference_align #3774

Open
spencer-lunarg opened this issue Oct 25, 2024 · 0 comments · May be fixed by #3775
Open

Forward Declaration silently ignores buffer_reference_align #3774

spencer-lunarg opened this issue Oct 25, 2024 · 0 comments · May be fixed by #3775

Comments

@spencer-lunarg
Copy link
Contributor

There should be a warning or ban (and 100% spec clarification) that buffer_reference_align is ignored when doing forward declaration

#version 450
#extension GL_EXT_buffer_reference : enable

layout(buffer_reference, buffer_reference_align=4) buffer StructA {
    vec4 x;
};

layout(buffer_reference, buffer_reference_align=4) buffer StructB;
layout(buffer_reference) buffer StructB {
    vec4 x;
};

layout(set = 0, binding = 0) buffer foo {
    StructA ptrA;
    StructB ptrB;
};

void main() {
    ptrA.x = vec4(0); // Aligned 4
    ptrB.x = vec4(0); // Aligned 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 a pull request may close this issue.

1 participant