Imbris

Results 125 comments of Imbris

I think I'm seeing this break a hlsl shader on integrated AMD with FXC. Should I try to pursue fixing this or am I likely to encounter other issues with...

While someone would probably not write this, the switch on a constant with just a default case can be produced from wgsl too: ```wgsl @compute @workgroup_size(1) fn main() { var...

> @Imberflur what do you mean by "break a hlsl shader"? The output color of a fragment shader ends up being zero instead of the expected color and it seems...

In my case there is this switch being produced: ```hlsl 276 float3 _expr758 = phi_4151_; 277 float4 _expr760 = phi_4149_; 278 float3 _expr761 = _expr760.xyz; 279 switch(asint(0u)) { 280 default:...

Oh! The issue seems to easily reproduce with an addition to the triangle example. patch ```diff diff --git a/examples/src/hello_triangle/mod.rs b/examples/src/hello_triangle/mod.rs index 79162a695..a243d4d89 100644 --- a/examples/src/hello_triangle/mod.rs +++ b/examples/src/hello_triangle/mod.rs @@ -10,7 +10,10...

oh no there are more switch related bugs in FXC

```wgsl var z = 0.0; switch 0 { case 0, 2, default { z = 1.0; } } ``` multiple cases with a single body like this also aren't compiled...

So we can probably lower this to something like a `do {} while(false)` like the solution for the linked spirv-cross issue. This needs any contained `continue` statements to be forwarded...

> oh no there are more switch related bugs in FXC https://bugs.chromium.org/p/tint/issues/detail?id=2126#c4 Is it worth opening an issue to track this?

https://github.com/gfx-rs/wgpu/issues/5656