Bug 199086

Summary: [WHLSL] Cannot use * qualifier/operator for buffer access and stores
Product: WebKit Reporter: Justin Fan <justin_fan>
Component: WebGPUAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal    
Priority: P2    
Version: Other   
Hardware: Unspecified   
OS: Unspecified   

Description Justin Fan 2019-06-20 15:52:11 PDT
>These WHLSL codes fail in the checker:

[numthreads(1, 1, 1)]
compute void _compute_main(device int* result : register(u0))
{
    result[0] = 42;
}

OR

[numthreads(1, 1, 1)]
compute void _compute_main(device int[] result : register(u0))
{
    *result = 42;
}


>This code does not generate valid MSL output:

[numthreads(1, 1, 1)]
compute void _compute_main(device int* result : register(u0))
{
    *result = 42;
}


Metal compile error is:

program_source:12941:16: error: excess elements in scalar initializer
variable6663 = { variable6661.structureElement13, static_cast<uint32_t>(variable6662) };
Comment 1 Myles C. Maxfield 2020-05-05 00:42:51 PDT
WHLSL is no longer relevant.