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

SHADER_MODULE_STATE::has_specialization_constants is not initialized #1530

Closed
zeux opened this issue Feb 7, 2020 · 0 comments · Fixed by #1534
Closed

SHADER_MODULE_STATE::has_specialization_constants is not initialized #1530

zeux opened this issue Feb 7, 2020 · 0 comments · Fixed by #1534
Assignees
Milestone

Comments

@zeux
Copy link

zeux commented Feb 7, 2020

During parsing of the module, SHADER_MODULE_STATE::has_specialization_constants is set to true if one of OpSpecConstant instructions are present in the SPIRV.

However, if none of them are present, the variable is not initialized.

This can lead to odd issues elsewhere; specifically, I hit this in #1512 which I actually encountered when a compute shader without specialization constants had a pipeline state created for it with specialization constants (which is valid, albeit pointless).

This should probably be initialized to false to avoid surprises in the future.

@jeremy-lunarg jeremy-lunarg self-assigned this Feb 7, 2020
jeremy-lunarg added a commit to jeremy-lunarg/Vulkan-ValidationLayers that referenced this issue Feb 8, 2020
Fix KhronosGroup#1530.

Initialize has_specialization_constant to false.

Change-Id: I245d2a20612227e772ea3b8a5270c08957d523ae
jeremy-lunarg added a commit to jeremy-lunarg/Vulkan-ValidationLayers that referenced this issue Feb 8, 2020
Fix KhronosGroup#1530.

Initialize has_specialization_constant to false.

Change-Id: I245d2a20612227e772ea3b8a5270c08957d523ae
jeremy-lunarg added a commit that referenced this issue Feb 10, 2020
Fix #1530.

Initialize has_specialization_constant to false.

Change-Id: I245d2a20612227e772ea3b8a5270c08957d523ae
locke-lunarg pushed a commit that referenced this issue Feb 11, 2020
Fix #1530.

Initialize has_specialization_constant to false.

Change-Id: I245d2a20612227e772ea3b8a5270c08957d523ae
locke-lunarg pushed a commit that referenced this issue Feb 14, 2020
Fix #1530.

Initialize has_specialization_constant to false.

Change-Id: I245d2a20612227e772ea3b8a5270c08957d523ae
@shannon-lunarg shannon-lunarg added this to the sdk-1.2.135.0 milestone Apr 6, 2020
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.

3 participants