Commit graph

9 commits

Author SHA1 Message Date
989c3a2726 Add build_shader.sh with --keep-coordinate-space flag documented 2026-07-23 11:04:28 +10:00
0223087e3e Recompile shader.spv with --keep-coordinate-space to fix double Y-flip 2026-07-23 09:04:54 +10:00
c7887a7afa Auto-detect v3d driver for Y-flip instead of arch heuristic 2026-07-23 08:40:20 +10:00
f4811fe713 Auto-detect Y-flip for platforms with broken negative viewport height (RPi5) 2026-07-23 08:10:27 +10:00
fd8a2cc15b Cap atlas size to device max_texture_dimension_2d
RPi5 GPU limits max texture dimension to 2048, but atlas was hardcoded
to 2560. Now clamps to device.limits().max_texture_dimension_2d.
2026-07-23 06:20:35 +10:00
c6d3cb672d Use downlevel_limits for RPi5 compatibility
Limits::default() requests max_color_attachments=8, but RPi5 Vulkan
only supports 4. downlevel_defaults() uses 4, which is all we need.
2026-07-22 22:28:14 +10:00
182cd5ec7a Re-enable GPU backends for RPi5 and cross-platform support
Features now: std, spirv, parking_lot, vulkan, gles, metal, dx12
Drops wgsl (replaced by SPIR-V passthrough), keeps all platform backends.
.so size: 9.4 MB -> 4.0 MB
2026-07-22 22:01:57 +10:00
0c8bb45215 Reduce .so from 9.4 MB to 721 KB via SPIR-V passthrough and release optimizations
- Compile shader.wgsl to SPIR-V at build time, commit .spv to repo
- Use wgpu PASSTHROUGH_SHADERS feature to skip naga runtime
- Disable default wgpu features, keep only 'spirv'
- Add release profile: LTO, strip, opt-level=z, panic=abort, codegen-units=1
- Use create_shader_module_passthrough() instead of create_shader_module()

To regenerate shader.spv after editing shader.wgsl:
  naga-cli src/shader.wgsl shader.spv
2026-07-22 12:57:20 +10:00
f04f3a8ae9 initial commit 2026-07-20 12:53:51 +10:00