-
Notifications
You must be signed in to change notification settings - Fork 193
Wrong number of arguments error is wrong/misleading #2583
Comments
This should have been fixed by #2432. You are probably missing the array layer. |
@teoxoy can you maybe reopen this issue? I updated wgpu to the lastest version and naga is 0.13.0 and it still produces this error? See: https://github.com/Norlock/sparticles-egui/tree/post_fx_overhaul |
The fix is not yet part of a release. Could you try wgpu trunk? Also, we are planning to do a release (which will include the fix) next week. |
@teoxoy I did update it with trunk by changing egui manually. If you fetch my branch and put this forked repo (https://github.com/Norlock/egui.git) next to this one. You can see it still produces the same error. Cargo tree shows it uses trunk |
I already fixed the issue, but the error message is wrong. For read_write textures you have to pass 2 arguments instead of 3 as the error message suggested. This was the fix: @group(0) @binding(2) var fx_blend: texture_storage_2d<rgba8unorm, read_write>;
@fragment
fn fs_main(@builtin(position) pos: vec4<f32>) -> @location(0) vec4<f32> {
return textureLoad(fx_blend, vec2<i32>(pos.xy));
} |
One more question I found with the new naga crate. Is it true I have to use same vec size in all/any comparison now?
before I could use:
|
That is most likely due to us updating the validation according to the spec. Double-checked and this is correct, the binary operation |
Will reopen the issue and transfer it to naga. |
Commit with fix: Norlock/sparticles@8bebe48 see: blend.wgsl. The commit you can go to and reproduce the bug by reverting line 15. |
Repro steps
Expected vs observed behavior
Expect behavior:
Observed behavior:
The text was updated successfully, but these errors were encountered: