Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: e1551b11d288edb551694c530411a026b42c7747 https://github.com/WebKit/WebKit/commit/e1551b11d288edb551694c530411a026b42c7747 Author: Tadeu Zagallo <tzaga...@apple.com> Date: 2023-10-30 (Mon, 30 Oct 2023)
Changed paths: M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp M Source/WebGPU/WGSL/WGSL.h A Source/WebGPU/WGSL/tests/valid/texture-external.wgsl M Source/WebGPU/WebGPU/BindGroup.mm M Source/WebGPU/WebGPU/BindGroupLayout.mm M Source/WebGPU/WebGPU/Device.h M Source/WebGPU/WebGPU/RenderPipeline.mm Log Message: ----------- [WGSL] texture_external as a global generates incorrect indices https://bugs.webkit.org/show_bug.cgi?id=263564 rdar://117379167 Reviewed by Mike Wyrzykowski. The generated auto layout shouldn't use the user-provided @binding values directly, but instead generate new binding IDs. This solves the problem for texture_external as well as generates contiguous IDs. The code can be simplified further, but for now it exposes extra information for the API about the offsets of the bufferSize special entries, while keeping the current behavior working. Once we update the API we can simplify the code without breaking anything. * Source/WebGPU/WGSL/GlobalVariableRewriter.cpp: (WGSL::RewriteGlobalVariables::determineUsedGlobals): (WGSL::RewriteGlobalVariables::insertStructs): * Source/WebGPU/WGSL/tests/valid/texture-external.wgsl: Added. (WGSL::RewriteGlobalVariables::insertStructs): * Source/WebGPU/WGSL/WGSL.h: * Source/WebGPU/WebGPU/BindGroup.mm: (WebGPU::Device::createBindGroup): * Source/WebGPU/WebGPU/BindGroupLayout.mm: (WebGPU::Device::createBindGroupLayout): * Source/WebGPU/WebGPU/Device.h: * Source/WebGPU/WebGPU/RenderPipeline.mm: (WebGPU::Device::addPipelineLayouts): (WebGPU::Device::generatePipelineLayout): Update BindGroupLayout generation to match the compiler change. Canonical link: https://commits.webkit.org/269996@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes