Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ae36fffb790d1c33f548681ce46b41c007850418
https://github.com/WebKit/WebKit/commit/ae36fffb790d1c33f548681ce46b41c007850418
Author: Tadeu Zagallo <[email protected]>
Date: 2024-04-26 (Fri, 26 Apr 2024)
Changed paths:
A LayoutTests/fast/webgpu/fuzz-126848520-auto-layout-expected.txt
A LayoutTests/fast/webgpu/fuzz-126848520-auto-layout.html
A LayoutTests/fast/webgpu/fuzz-126848520-explicit-layout-expected.txt
A LayoutTests/fast/webgpu/fuzz-126848520-explicit-layout.html
M Source/WebCore/Modules/WebGPU/Implementation/WebGPUDeviceImpl.cpp
M Source/WebGPU/WGSL/EntryPointRewriter.cpp
M Source/WebGPU/WGSL/EntryPointRewriter.h
M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp
M Source/WebGPU/WGSL/GlobalVariableRewriter.h
M Source/WebGPU/WGSL/WGSL.cpp
M Source/WebGPU/WGSL/WGSL.h
M Source/WebGPU/WGSL/wgslc.cpp
M Source/WebGPU/WebGPU/BindGroupLayout.mm
M Source/WebGPU/WebGPU/ComputePassEncoder.mm
M Source/WebGPU/WebGPU/Pipeline.h
M Source/WebGPU/WebGPU/Pipeline.mm
M Source/WebGPU/WebGPU/RenderPassEncoder.mm
M Source/WebGPU/WebGPU/RenderPipeline.mm
M Source/WebGPU/WebGPU/ShaderModule.mm
M Source/WebGPU/WebGPU/WebGPU.h
Log Message:
-----------
[WebGPU] Validate buffer length for bind group entries
https://bugs.webkit.org/show_bug.cgi?id=273151
rdar://126848520
Reviewed by Mike Wyrzykowski.
We were missing a validation that the size of the buffer passed into a bind
group
was big enough to fit the type of that entry. Most of the plumbing was already
done,
but we never populated the `minBindingSize` in the compiler info. That works
out of
the box for auto layouts, but for user-provided layouts we need to update the
entries
with the computed size, and this later needs to be checked from draw/dispatch.
* LayoutTests/fast/webgpu/fuzz-126848520-auto-layout-expected.txt: Added.
* LayoutTests/fast/webgpu/fuzz-126848520-auto-layout.html: Added.
* LayoutTests/fast/webgpu/fuzz-126848520-explicit-layout-expected.txt: Added.
* LayoutTests/fast/webgpu/fuzz-126848520-explicit-layout.html: Added.
* Source/WebGPU/WGSL/EntryPointRewriter.cpp:
(WGSL::rewriteEntryPoints):
* Source/WebGPU/WGSL/EntryPointRewriter.h:
* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::RewriteGlobalVariables):
(WGSL::RewriteGlobalVariables::visitEntryPoint):
(WGSL::bindingMemberForGlobal):
(WGSL::RewriteGlobalVariables::insertStructs):
(WGSL::rewriteGlobalVariables):
* Source/WebGPU/WGSL/GlobalVariableRewriter.h:
* Source/WebGPU/WGSL/WGSL.cpp:
(WGSL::prepareImpl):
(WGSL::prepare):
* Source/WebGPU/WGSL/WGSL.h:
* Source/WebGPU/WGSL/wgslc.cpp:
(runWGSL):
* Source/WebGPU/WebGPU/BindGroupLayout.mm:
(WebGPU::createArgumentDescriptor):
* Source/WebGPU/WebGPU/ComputePassEncoder.mm:
(WebGPU::ComputePassEncoder::executePreDispatchCommands):
* Source/WebGPU/WebGPU/Pipeline.h:
* Source/WebGPU/WebGPU/Pipeline.mm:
(WebGPU::createLibrary):
(WebGPU::validateBindGroup):
* Source/WebGPU/WebGPU/RenderPassEncoder.mm:
(WebGPU::RenderPassEncoder::executePreDrawCommands):
* Source/WebGPU/WebGPU/RenderPipeline.mm:
* Source/WebGPU/WebGPU/ShaderModule.mm:
(WebGPU::earlyCompileShaderModule):
Canonical link: https://commits.webkit.org/278052@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes