Bug 264140

Summary: [WGSL] error: use of undeclared identifier 'textureSampleCompareLevel' opening https://spookyball.com/
Product: WebKit Reporter: Mike Wyrzykowski <mwyrzykowski>
Component: WebGPUAssignee: Tadeu Zagallo <tzagallo>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
WGSL shader source none

Description Mike Wyrzykowski 2023-11-02 23:13:26 PDT
Created attachment 468465 [details]
WGSL shader source

Open https://spookyball.com/ and notice the MSL compilation error printed:

program_source:377:28: error: use of undeclared identifier 'textureSampleCompareLevel'
        local8 = (local8 + textureSampleCompareLevel(global5, global6, clamp((local5 + (global8[local9] * local6)), local7.xy, local7.zw), (local4.z - 0.003)));

it appears to come from this line in the attached wgsl shader:

      visibility = visibility + textureSampleCompareLevel(
        shadowTexture, shadowSampler,
        clamp(viewportPos + shadowSampleOffsets[i] * texelSize, clampRect.xy, clampRect.zw),
        shadowPos.z - 0.003);
Comment 1 Radar WebKit Bug Importer 2023-11-02 23:13:41 PDT
<rdar://problem/117891882>
Comment 2 Tadeu Zagallo 2023-11-03 07:58:36 PDT
Pull request: https://github.com/WebKit/WebKit/pull/19951
Comment 3 EWS 2023-11-06 01:33:33 PST
Committed 270257@main (144459dcdc40): <https://commits.webkit.org/270257@main>

Reviewed commits have been landed. Closing PR #19951 and removing active labels.