KhronosGroup / KhronosGroup/glslang
unnamed structs are compatible if the fields match
Open
question
Specification
- Dominant language
- C++
- Stars
- 3.6k
- Forks
- 989
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 31
Description
i.e. something like the following compiles.
```glsl
struct { float r; } p;
struct { float r; } q;
p.r = 1.;
q = p;
```
The GLSL spec doesn't have anything to suggest that this would be valid and it is rejected by ANGLE.
Contributor guide
Research direction
Use the GLSL snippet in the issue as the first reproduction, then compare glslang's result with the GLSL specification and ANGLE. Trace the compiler's handling of unnamed struct compatibility and establish the expected behavior before resolving it with regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100