Skip to content

Commit

Permalink
Cherry-pick de8e668. rdar://123269255
Browse files Browse the repository at this point in the history
    [WebGPU] GPU process crashes when Metal debug validation is enabled and https://webgpu.github.io/webgpu-samples/samples/particles is opened (269756)
    https://bugs.webkit.org/show_bug.cgi?id=269756
    <radar://123269255>

    Reviewed by Dan Glastonbury.

    Array lengths should refrence the webBinding and not the generated metal binding.
    * Source/WebGPU/WebGPU/RenderPipeline.mm:
    (WebGPU::Device::addPipelineLayouts):

    Canonical link: https://commits.webkit.org/275026@main

Identifier: 273664.1306@safari-7619.1.5-branch
  • Loading branch information
mwyrzykowski authored and MyahCobbs committed Feb 26, 2024
1 parent 6ddb990 commit 8ab751a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/WebGPU/WebGPU/RenderPipeline.mm
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ static WGPUTextureFormat convertFormat(WGSL::TexelFormat format)
auto shortName = entryName.substring(2, entryName.length() - (sizeof("_ArrayLength") + 1));
minBindingSize = entryMap.find(shortName)->value;
} else
entryMap.set(entryName, entry.binding);
entryMap.set(entryName, entry.webBinding);

newEntry.binding = entry.webBinding;
newEntry.metalBinding = entry.binding;
Expand Down

0 comments on commit 8ab751a

Please sign in to comment.