Bug 262084 - [WGSL] 1D/2D/3D texture read() function expects unsigned values
Summary: [WGSL] 1D/2D/3D texture read() function expects unsigned values
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-09-25 16:44 PDT by Mike Wyrzykowski
Modified: 2023-09-25 16:46 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Wyrzykowski 2023-09-25 16:44:14 PDT
The WGSL specification for https://www.w3.org/TR/WGSL/#textureload allows for signed and unsigned values, but Metal only allows for unsigned values.

This results in the following error opening https://webgpu.github.io/webgpu-samples/samples/reversedZ -

MSL compilation error: Error Domain=MTLLibraryErrorDomain Code=3 "program_source:12:27: error: no matching member function for call to 'read'
    float local1 = local0.read(vec<int, 2>(floor(parameter0.xy)), 0);

if 'vec<int, 2>' was 'vec<uint, 2>' then it would compile
Comment 1 Radar WebKit Bug Importer 2023-09-25 16:44:30 PDT
<rdar://problem/116023220>