Commit c61d4ef
committed
Fix HLSL2GLSLConverter:
Root Cause
The HLSL2GLSL converter was not assigning explicit layout(binding=N) qualifiers to uniform blocks (cbuffers), while it was already doing this for SSBOs and images. This caused OpenGL linking failures when:
VS has cbInlinePositions (binding 0 by default) and cbInlineColors (binding 1 by default)
PS has only cbInlineColors (binding 0 by default, since it's the first UBO in PS)
When linked together, binding 0 had conflicting definitions → "buffer block with binding '0' has mismatching definitions".1 parent 5a675bd commit c61d4ef
2 files changed
Lines changed: 16 additions & 9 deletions
File tree
- Graphics/HLSL2GLSLConverterLib
- include
- src
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
| 293 | + | |
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| |||
Lines changed: 14 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
912 | 912 | | |
913 | 913 | | |
914 | 914 | | |
915 | | - | |
| 915 | + | |
916 | 916 | | |
917 | 917 | | |
918 | 918 | | |
919 | | - | |
920 | | - | |
921 | | - | |
922 | | - | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
923 | 929 | | |
924 | 930 | | |
925 | 931 | | |
| |||
4554 | 4560 | | |
4555 | 4561 | | |
4556 | 4562 | | |
| 4563 | + | |
4557 | 4564 | | |
4558 | 4565 | | |
4559 | 4566 | | |
| |||
4565 | 4572 | | |
4566 | 4573 | | |
4567 | 4574 | | |
4568 | | - | |
| 4575 | + | |
4569 | 4576 | | |
4570 | 4577 | | |
4571 | 4578 | | |
| |||
0 commit comments