Commit 04064eb
authored
fix: complete gputypes integration with wgpu-native v27 (#4)
* fix: complete gputypes integration with wgpu-native v27 compatibility
Conversion layer fixes:
- TextureViewDimension values match between gputypes and wgpu-native v27
- Add struct padding for FFI alignment (sampler/texture/storage binding layouts)
- Fix VertexFormat, VertexStepMode, TextureSampleType conversions
Example fixes:
- Use CreatePipelineLayoutSimple in cube, rotating-triangle, mrt, textured-quad
- Fix GetModuleHandleW: use kernel32.dll instead of user32.dll (8 examples)
- render_bundle: fallback shader without primitive_index (works on all GPUs)
Default value fixes:
- sampler: MaxAnisotropy >= 1
- texture: SampleCount >= 1, MipLevelCount >= 1
All 11 examples now work on all supported hardware.
* docs: update documentation for v0.2.0 gputypes integration
CHANGELOG.md:
- Document conversion layer and all fixes
README.md:
- Update wgpu-native version to v27.0.4.0
ROADMAP.md (modernized following GitHub best practices):
- Add disclaimer about plans vs commitments
- Use phase labels instead of hardcoded dates
- Add How to Contribute section
- Link to GitHub Issues/Projects for live tracking
- Add upstream dependencies tracking
examples/README.md:
- Update version to 0.2.0
- Add gputypes note
* chore: exclude gocyclo/cyclop/funlen for conversion files
Conversion functions (toWGPUTextureFormat, fromWGPUTextureFormat,
toWGPUVertexFormat) have large switch statements for enum mapping
which are inherently high complexity but straightforward.
CreateRenderPipeline has high complexity due to wire struct
initialization but is a single-purpose function.
Exclude convert.go and render_pipeline.go from gocyclo/cyclop/funlen
checks since these patterns are acceptable for FFI conversion code.1 parent c6e8312 commit 04064eb
File tree
22 files changed
+1210
-263
lines changed- examples
- colored-triangle
- cube
- indirect
- mrt
- render_bundle
- rotating-triangle
- textured-quad
- triangle
- wgpu
22 files changed
+1210
-263
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
83 | 89 | | |
84 | 90 | | |
85 | 91 | | |
| 92 | + | |
| 93 | + | |
86 | 94 | | |
87 | 95 | | |
88 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
27 | 37 | | |
28 | 38 | | |
29 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
0 commit comments