Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

[wgsl-in] Error on usage of ldexp function #1908

@hanawatson

Description

@hanawatson

naga rejects (valid) usage of the ldexp built-in function. This happens with both the (scalar float, scalar int) and (vector float, vector int) overloads.

code example (analogous for vector arguments):

@compute @workgroup_size(1)
fn compute_main() {
	var var0 = ldexp(3.0, 3);
}

naga compilation error (identical message for vector arguments):

error: 
  ┌─ test.wgsl:3:12
  │
3 │     var var0 = ldexp(3.0, 3);
  │               ^^^^^^^^^^^^^^ naga::Expression [3]

Entry point compute_main at Compute is invalid: 
	Expression [3] is invalid
	Argument [1] to Ldexp as expression [2] has an invalid type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: front-endInput formats for conversionkind: bugSomething isn't workinglang: WGSLWebGPU shading language

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions