Commit a400a90
authored
Test Shader compilation with WEBMIN flag (#1638)
Use a generated shader to check no mandatory glsl function missing in
spirv-cross when using WEBMIN flag.
BabylonJS/SPIRV-Cross#10
## Fix
`UniformTypeChangeTraverser` and `MoveNonSamplerUniformsIntoStruct` were
also visiting whole `layout(std140) uniform` blocks (`EbtBlock`) and
`uniform Foo foo;` struct instances (`EbtStruct`) and rewriting them to
`vec4`, producing unnamed placeholder uniforms in the spirv-cross output
and a `Identifier can't be empty.` assert in bgfx. Both traversers are
now restricted to scalar/vector basic types (Float/Int/Uint/Bool).
`CollectNonSamplerUniforms` also throws early if a uniform name is empty
so future regressions surface in the compiler instead of deep in bgfx.1 parent 5c4081e commit a400a90
12 files changed
Lines changed: 25117 additions & 22858 deletions
File tree
- Apps/UnitTests
- JavaScript
- dist
- src
- Source
- Plugins/ShaderCompiler/Source
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
| 27 | + | |
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
| |||
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
49 | | - | |
| 54 | + | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
| |||
94 | 99 | | |
95 | 100 | | |
96 | 101 | | |
| 102 | + | |
0 commit comments