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

Add warning if Forward Declaration uses layout qualifiers #3775

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

spencer-lunarg
Copy link
Contributor

closes #3774

Now something like

#version 450
#extension GL_EXT_buffer_reference : enable

layout(buffer_reference, std140) buffer StructB;
layout(buffer_reference) buffer StructB {
    vec4 x;
};

void main() {}

will give a warning of

WARNING: test.comp:4: 'StructB' : the packing layout (scalar, std430, etc) is ignored when defined in forward declaration

Copy link
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.

Could you add a test for this? There's an existing spv.bufferhandle_Error.frag test file you can just add a couple of lines to.

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.

Forward Declaration silently ignores buffer_reference_align
2 participants