Closed
Bug 1985191
Opened 1 year ago
Closed 1 year ago
WGSL: `atan2(2.0, 0.0)` results in a validation error
Categories
(Core :: Graphics: WebGPU, defect, P2)
Core
Graphics: WebGPU
Tracking
()
RESOLVED
FIXED
People
(Reporter: ErichDonGubler, Unassigned)
References
Details
Steps to reproduce
-
Obtain a
GPUDeviceand call itscreateShaderModulemethod, like the following:const code = ` fn do_thing() -> f32 { return atan2(0.0, -1.0); }` const adapter = await navigator.gpu.requestAdapter() const device = await adapter.requestDevice() device.createShaderModule({ code })Observe that the following error is returned in the web console:
23:56:43.053 Uncaptured WebGPU error: Shader module creation failed: Shader validation error 23:56:43.053 Encountered one or more errors while creating shader module 23:56:43.053 WebGPU compilation info for shader module (1 error(s), 0 warning(s), 0 info) 23:56:43.053 Shader validation error: Function [0] 'do_thing' is invalid ┌─ :2:1 │ 2 │ ╭ fn do_thing() -> f32 { 3 │ │ return atan2(0.0, -1.0); │ │ ^^^ naga::ir::Expression [0] │ ╰──────────────────────────^ naga::ir::Function [0] │ = Expression [0] is invalid = Abstract types may only appear in constant expressionsI expect that this snippet run without any errors.
Updated•1 year ago
|
Priority: -- → P2
Updated•1 year ago
|
See Also: → https://github.com/gfx-rs/wgpu/issues/8179
Updated•1 year ago
|
Summary: WGSL: `atan(2.0, 0.0)` results in a validation error → WGSL: `atan2(2.0, 0.0)` results in a validation error
Comment 1•1 year ago
|
||
Depends on: webgpu-update-wgpu
| Reporter | ||
Updated•1 year ago
|
No longer depends on: webgpu-update-wgpu
| Reporter | ||
Comment 2•1 year ago
|
||
Confirmed fixed just now in my Firefox Nightly web console. 😀
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•