KhronosGroup / KhronosGroup/Vulkan-ValidationLayers
Handle matching nested structs inside blocks for shader interfaces
- Dominant language
- C++
- Stars
- 1k
- Forks
- 504
- Avg merge
- 11h 35m
- Merged PRs (30d)
- 224
Description
```
const char vsSource[] = R"glsl(
#version 450
struct Foo {
vec2 a;
};
layout(location = 0) out block {
Foo foo;
} testBlock;
void main(void) {
testBlock.foo.a = vec2(0);
}
)glsl";
const char fsSource[] = R"glsl(
#version 450
layout(location = 0) out vec4 color;
struct Foo {
int a[8];
vec4 b;
};
layout(location = 0) in block {
Foo foo;
} testBlock;
void main(void) {
color = testBlock.foo.b;
}
)glsl";
```
Here we currently don't recognize the mismatch between the 2 stages
Contributor guide
Research direction
Reproduce the mismatch with the vertex and fragment shader snippets in the issue, then trace the shader interface matching validation path. Add regression coverage for the nested Foo member type and array mismatch, and confirm that validation reports it; no source file or test path is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100