KhronosGroup / KhronosGroup/Vulkan-ValidationLayers
Add new update in shader interface of vec to scalar
- Dominant language
- C++
- Stars
- 1k
- Forks
- 504
- Avg merge
- 11h 35m
- Merged PRs (30d)
- 224
Description
See https://gitlab.khronos.org/vulkan/vulkan/-/issues/4470#note_563146 for long painful details, but
```
// vertex
layout(location = 0, component = 0) out float a;
layout(location = 0, component = 1) out float b;
layout(location = 0, component = 2) out float c;
layout(location = 0, component = 3) out float d;
// frag
layout(location = 0) in vec4 x;
```
is not allowed, the spec says
> if the [maintenance4](https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-maintenance4) feature is enabled, they are declared as OpTypeVector variables, and the output has a Component Count value higher than that of the input but the same Component Type; or
the key part is `they are declared as OpTypeVector variables` so in this case the `float`/`int` scalar are not allowed to be counted as a `vec1` implicitly here
Contributor guide
Assessment
This issue has not been assessed yet.