KhronosGroup / KhronosGroup/glslang
HLSL: reject-valid: can't return empty struct
Open
bug
HLSL
SPIR-V
- Dominant language
- C++
- Stars
- 3.6k
- Forks
- 989
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 31
Description
The following program is accepted by fxc.exe:
( http://shader-playground.timjones.io/8188336997c14f2d8f2c5ffd8a4ea729 )
```
struct TEmptyStruct {};
TEmptyStruct PSMain()
{
TEmptyStruct o = (TEmptyStruct)0;
return o;
}
```
Howerver, it is rejected by glslang :
```
$ glslangValidator -V100 --spirv-val -S frag -D --target-env vulkan1.0 /tmp/input.frag.hlsl -e PSMain
/tmp/input.frag.hlsl
error: SPIRV-Tools Validation Errors
error: Interface variable id <17> is used by entry point 'PSMain' id <4>, but is not listed as an interface
%_entryPointOutput = OpVariable %_ptr_Output_TEmptyStruct Output
```
Contributor guide
Assessment
This issue has not been assessed yet.