Bug 265894 - [WebGPU] Crash in ConstantValue::integerValue() because the activeType is float
Summary: [WebGPU] Crash in ConstantValue::integerValue() because the activeType is float
Status: RESOLVED FIXED
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-12-05 12:01 PST by Mike Wyrzykowski
Modified: 2023-12-08 10:25 PST (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-12-05 12:01:33 PST
The following WGSL source generates a crash in ConstantValue::integerValue() because the activeType is float:

override x: u32 = 1u;
override y: u32 = 1u;
override z: u32 = 1u;
@compute @workgroup_size(x, y, z) fn main () {
  _ = 0u;
}

Generated Metal code:
#include <metal_stdlib>
#include <metal_types>

using namespace metal;

constant unsigned global0 [[function_constant(0)]];
constant unsigned global1 [[function_constant(1)]];
constant unsigned global2 [[function_constant(2)]];
[[kernel]]  void function0()
{
    (void)(0u);
}
Comment 1 Radar WebKit Bug Importer 2023-12-05 12:01:57 PST
<rdar://problem/119206116>
Comment 2 Mike Wyrzykowski 2023-12-05 12:33:08 PST
Pull request: https://github.com/WebKit/WebKit/pull/21350
Comment 3 EWS 2023-12-08 10:25:25 PST
Committed 271743@main (81a7c89e229f): <https://commits.webkit.org/271743@main>

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