Bug 199086 - [WHLSL] Cannot use * qualifier/operator for buffer access and stores
Summary: [WHLSL] Cannot use * qualifier/operator for buffer access and stores
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-20 15:52 PDT by Justin Fan
Modified: 2020-05-05 00:42 PDT (History)
0 users

See Also:


Attachments

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