microsoft / DirectXShaderCompiler

This repo hosts the source for the DirectX Shader Compiler which is based on LLVM/Clang.
Other
3.04k stars 677 forks source link

[SPIR-V] Teach DXC about component decorations #6831

Open s-perron opened 1 month ago

s-perron commented 1 month ago

Description

Two inputs or outputs can have the same location as long as they have different components. DXC is currently unaware of the component and will issue an error if two inputs have the same location. This should be updated, so that we can add the component decoration.

Steps to Reproduce

https://godbolt.org/z/EYf4bEce5

Actual Behavior The compiler issues an error. We would expect no error, and color should have two decoration. A location decoration setting its location to 0, and a component decoration setting the component to 1.

Environment

s-perron commented 3 weeks ago

@cassiebeckley While you are looking into how to implement vk::location in clang, think about how to incorporate the component.