KhronosGroup / KhronosGroup/Vulkan-ValidationLayers

Handle matching nested structs inside blocks for shader interfaces

Open
#11,267 0 comments 0 reactions 0 assignees View on GitHub
ShaderVal
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.