Bug 263564 - [WGSL] texture_external as a global generates incorrect indices
Summary: [WGSL] texture_external as a global generates incorrect indices
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-10-23 16:09 PDT by Mike Wyrzykowski
Modified: 2023-10-30 22:38 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-10-23 16:09:14 PDT
Given the following WGSL globals:

@group(0) @binding(0) var inputTexture0: texture_external;
@group(0) @binding(1) var <uniform> kernel_offsets: array<vec4f, 9>;
@group(0) @binding(2) var <uniform> kernels: array<mat4x4f, 9>;
@group(0) @binding(3) var <uniform> bias: vec4f;


They appear to generate this AB:

struct __ArgumentBufferT_0 {
    texture2d<float> __global0_FirstPlane;
    texture2d<float> __global0_SecondPlane;
    float3x2 __global0_UVRemapMatrix;
    float4x3 __global0_ColorSpaceConversionMatrix;
    const constant array<vec<float, 4>, 9>& global1 [[id(1)]];
    const constant array<matrix<float, 4, 4>, 9>& global2 [[id(2)]];
    const constant vec<float, 4>& global3 [[id(3)]];
};

but [[id(1)]] should be [[id(4)]]
Comment 1 Radar WebKit Bug Importer 2023-10-23 16:09:32 PDT
<rdar://problem/117379167>
Comment 2 Tadeu Zagallo 2023-10-27 08:09:07 PDT
Pull request: https://github.com/WebKit/WebKit/pull/19641
Comment 3 EWS 2023-10-30 22:38:07 PDT
Committed 269996@main (e1551b11d288): <https://commits.webkit.org/269996@main>

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