Firefox nightly shader compilation issue
Issue Template
Description
On Firefox Nightly 136.0a1 (2025-01-15) (64-bit), using GPU acceleration while using Relic Optimizer causes a shader compilation issue
Steps to Reproduce
- Use Firefox Nightly
- Go to https://fribbels.github.io/hsr-optimizer#main
- Select GPU Acceleration (stable)
Expected Behavior
No shader compilation issues
Actual Behavior
A shader compilation issue occurs,
Shader validation error: Function [42] 'calculateAshblazingSet' is invalid
┌─ :1784:1
│
1784 │ ╭ fn calculateAshblazingSet(
1785 │ │ p_x: ptr<function, ComputedStats>,
1786 │ │ p_state: ptr<function, ConditionalState>,
1787 │ │ hitMulti: f32,
· │
1795 │ │
1796 │ │ return 0;
│ │ ^ naga::Expression [23]
│ ╰───────────^ naga::Function [42]
│
= The `return` value Some([23]) does not match the function return value
Screenshots
Additional Information
I am aware Firefox Nightly is not a stable environment, and as such could cause issues that don't matter. I apologize if this is the case, but it was the only way to enable GPU acceleration via Firefox.
Yeah this is unfortunately a known issue: https://github.com/fribbels/hsr-optimizer/blob/main/docs/guides/en/troubleshooting.md#error-gpu-acceleration-is-not-supported and we're awaiting a fix on Firefox's side. Their shader compilation method doesn't match the webgpu spec and hopefully will be updated soon.