Bug 264371
| Summary: | [WGSL] textureSampleGrad is not implemented | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Mike Wyrzykowski <mwyrzykowski> |
| Component: | WebGPU | Assignee: | Tadeu Zagallo <tzagallo> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Mike Wyrzykowski
textureSampleGrad should map to sample which takes a gradient (page 202 of the Metal shading language spec)
Open https://webgpu.github.io/webgpu-samples/samples/normalMap.
Note the failure:
MSL compilation error: Error Domain=MTLLibraryErrorDomain Code=3 "program_source:120:26: error: use of undeclared identifier 'textureSampleGrad'
if ((local7.z >= textureSampleGrad(global11, global8, local7.xy, local2, local3).r)) {
^
" UserInfo={NSLocalizedDescription=program_source:120:26: error: use of undeclared identifier 'textureSampleGrad'
if ((local7.z >= textureSampleGrad(global11, global8, local7.xy, local2, local3).r)) {
it comes from this WGSL:
// Walk the depth texture, and stop when the ray intersects the depth map
var pos = vec3(startUV, 0);
for (var i = 0; i < 32; i++) {
if (pos.z >= textureSampleGrad(depthTexture, textureSampler, pos.xy, ddx, ddy).r) {
break; // Hit the surface
}
pos += posDelta;
}
in https://webgpu.github.io/webgpu-samples/samples/normalMap#./normalMap.wgsl
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/118084526>
Tadeu Zagallo
Pull request: https://github.com/WebKit/WebKit/pull/20162
EWS
Committed 270430@main (8af46bcd0f22): <https://commits.webkit.org/270430@main>
Reviewed commits have been landed. Closing PR #20162 and removing active labels.