so I have been running known bad shaders (infinite loops) and came across a really unexpected error dump when using D3D12 as backend.
It took me 3 days to go through the naga translation etc, but I have no recreated this issue in wgpu-native. It will happen with backend forced to Dx12 and not on Vulkan (using the snippet from #337). ref branch
here is the loop that naga translated into wgsl (I removed some of the placeholder vars). I think this is also a bad translation - but I am not too sure. it's an issue to file elsewhere too.
var i: i32 = 0i;
loop {
if !((i < 100i)) {
break;
}
{
a = (a - 0.005f);
}
continuing {
b = (b + 0.1f);
}
}
Which I guess is an FXC issue (since it works in vulkan) - but that is an issue to file elsewhere. The problem here is how there is seemingly a nullbyte at the end but the bound is wrong? I am not quite sure but it might be an easy fix.
so I have been running known bad shaders (infinite loops) and came across a really unexpected error dump when using D3D12 as backend.
It took me 3 days to go through the naga translation etc, but I have no recreated this issue in wgpu-native. It will happen with backend forced to Dx12 and not on Vulkan (using the snippet from #337). ref branch
here is the loop that naga translated into wgsl (I removed some of the placeholder vars). I think this is also a bad translation - but I am not too sure. it's an issue to file elsewhere too.
If run with DX12 you get a panic emitted from https://github.com/gfx-rs/wgpu-native/blob/3e18e3d3e5fd433053875464447c36d980625f0b/src/logging.rs#L43
the full output and stacktrace:
```bash [wgpu] [warn] Naga generated shader for "fs_main" at Fragment: struct NagaConstants { int first_vertex; int first_instance; uint other; }; ConstantBufferif you decode the error message you get
Which I guess is an FXC issue (since it works in vulkan) - but that is an issue to file elsewhere. The problem here is how there is seemingly a nullbyte at the end but the bound is wrong? I am not quite sure but it might be an easy fix.