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

Generating Aligned of zero #3893

Open
spencer-lunarg opened this issue Mar 4, 2025 · 0 comments
Open

Generating Aligned of zero #3893

spencer-lunarg opened this issue Mar 4, 2025 · 0 comments

Comments

@spencer-lunarg
Copy link
Contributor

https://godbolt.org/z/zTr5qY6Ec

#version 460
#extension GL_EXT_shader_explicit_arithmetic_types_int64 : require
#extension GL_EXT_buffer_reference2 : require

layout(set = 0, binding = 0) restrict readonly buffer SSBO_0 {
	uint64_t address;
};

struct Data {
	uint a;
	uint b;
	uint c;
	int d;
	uint e;
};

layout(set = 0, binding = 1) restrict readonly buffer SSBO_1 {
	Data data[];
} InBuffer;

layout(buffer_reference) buffer MyBuffer {
	Data data[];
};

void main() {
    MyBuffer(address).data[0] = InBuffer.data[0];
}

will produce OpStore %34 %32 Aligned 0 which we are going to ban in https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/7210

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

No branches or pull requests

1 participant