Bug 264140 - [WGSL] error: use of undeclared identifier 'textureSampleCompareLevel' opening https://spookyball.com/
Summary: [WGSL] error: use of undeclared identifier 'textureSampleCompareLevel' openin...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tadeu Zagallo
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-02 23:13 PDT by Mike Wyrzykowski
Modified: 2023-11-06 01:33 PST (History)
1 user (show)

See Also:


Attachments
WGSL shader source (13.34 KB, text/plain)
2023-11-02 23:13 PDT, Mike Wyrzykowski
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.