Skip to content

[HLSL][SPIR-V] Push constants in HLSL #124581

@s-perron

Description

@s-perron

Vulkan/SPIR-V has the concept of a push constant. It is a small block of data that can be accessed without a descriptor. In DirectX, this would be a root constant. If a cbuffer is a root constant is determined by the root signature, and it not strictly part of the shader. In Vulkan it is part of the shader. The push constant must be marked as a root constant.

This is done in DXC by using the vk::push_constant attribute. The variable to which it is applied will not be added to the $Global cbuffer. Instead it will be its own variable in the push constant storage class. This attribute needs to be implemented in clang.

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions