Bug 262135 - [WGSL] Buffer dynamic offsets are not implemented
Summary: [WGSL] Buffer dynamic offsets are not implemented
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tadeu Zagallo
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-09-26 13:04 PDT by Mike Wyrzykowski
Modified: 2023-10-17 11:30 PDT (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-09-26 13:04:43 PDT
[WGSL] Buffer dynamic offsets are not implemented

This offset would probably be in its own buffer because the pipeline doesn't know the value until right before draw time. 

So:
[[vertex]] type2 function0(type3 parameter0 [[stage_in]], constant type5& parameter1 [[buffer(22)]])
{
    const constant type4& local0 = parameter1.uniforms;

would become something like:

[[vertex]] type2 function0(type3 parameter0 [[stage_in]], constant type5& parameter1 [[buffer(22)]], constant uint32_t* offsets [[buffer(23)]])
{
    const constant type4& local0 = *(const constant type4*)((constant char*)&parameter1.uniforms + offsets[INDEX]));

where INDEX is 0,1,2... corresponding to the nth buffer in the bind group
Comment 1 Radar WebKit Bug Importer 2023-09-26 13:05:02 PDT
<rdar://problem/116073820>
Comment 2 Tadeu Zagallo 2023-10-12 04:53:01 PDT
Pull request: https://github.com/WebKit/WebKit/pull/18992
Comment 3 EWS 2023-10-17 11:30:21 PDT
Committed 269418@main (7990584a04b5): <https://commits.webkit.org/269418@main>

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