Skip to content

SHADER_MODULE_STATE::has_specialization_constants is not initialized #1530

Closed
@zeux

Description

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.

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions