Bug 200256

Summary: [WHLSL] When called with its second argument greater than its third, clamp should return its third argument
Product: WebKit Reporter: Robin Morisset <rmorisset>
Component: WebGPUAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal    
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Robin Morisset 2019-07-29 16:13:05 PDT
For compatibility with HLSL (and with the spec now that I've specified HLSL behavior).
In other words, "max(min(upper, x), lower)" must become "min(max(x, lower), upper)".
Comment 1 Robin Morisset 2019-08-01 11:40:14 PDT
I've changed the spec to follow SPIR-V behavior (undefined value returned in that case), so this is no longer a "bug", but it would still be slightly nicer for portability to follow HLSL.
Comment 2 Myles C. Maxfield 2020-05-05 00:42:30 PDT
WHLSL is no longer relevant.