Commit bb5e4a5
authored
fix(msl): vertex stage_in for struct args, metal::discard_fragment namespace (v0.14.4)
* test: add coverage tests for MSL/GLSL backends, IR validator
- msl/expressions_test.go: MSL expression generation tests
- msl/statements_test.go: MSL statement generation tests
- msl/types_test.go: MSL type mapping, entry point tests
- glsl/expressions_test.go: GLSL type/expression/statement tests
- ir/validate_expression_test.go: comprehensive expression/type validation
- Removed old validate_test.go (superseded by new comprehensive tests)
* fix: remove incorrect gl_GlobalInvocationID assertion in GLSL compute test
* fix(msl): vertex stage_in for struct args, metal::discard_fragment namespace
- Remove fragment-only gate in writeEntryPointInputStruct, allowing
vertex shaders with struct-typed inputs (e.g. fn vs_main(in: VertexInput))
to generate synthesized _Input struct with [[attribute(N)]] members
- Use member binding-based attribute generation (locationInputAttribute,
builtinInputAttribute) instead of hardcoded position/user attributes
- Add metal:: namespace prefix to discard_fragment() call
Fixes gogpu/ui#23
* fix: fallback attributes for unbound struct members, lint fixes
- Add fallback attribute generation for struct members without explicit
bindings (fragment: [[position]]/[[user(locnN)]], vertex: [[attribute(N)]])
- Fix revive lint: globalIdBinding → globalIDBinding
- Add cyclop nolint for writeEntryPointInputStruct1 parent 7b3f74d commit bb5e4a5
File tree
10 files changed
+5076
-390
lines changed- glsl
- ir
- msl
- snapshot/testdata/golden/msl
10 files changed
+5076
-390
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
8 | 16 | | |
9 | 17 | | |
10 | 18 | | |
| |||
0 commit comments