Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WebGPU] Invalid bind group should be returned if the bind group layout is not compatible with the bind group descriptor #21369

Conversation

mwyrzykowski
Copy link
Contributor

@mwyrzykowski mwyrzykowski commented Dec 6, 2023

f418211

[WebGPU] Invalid bind group should be returned if the bind group layout is not compatible with the bind group descriptor
https://bugs.webkit.org/show_bug.cgi?id=265918
<radar://119225289>

Reviewed by Tadeu Zagallo.

If the BindGroupLayout is not compatible with the BindGroup, an
invalid BindGroup should be returned.

* Source/WebGPU/WebGPU/BindGroup.mm:
(WebGPU::hasBinding):
(WebGPU::Device::createBindGroup):

* LayoutTests/http/tests/webgpu/webgpu/api/validation/getBindGroupLayout-expected.txt:
getBindGroupLayout test is now passing locally.

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

20f9b2f

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug   πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ§ͺ api-wpe
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ mac-wk1 βœ… πŸ›  gtk
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ gtk-wk2
βœ… πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2   πŸ§ͺ api-gtk
βœ… πŸ›  tv-sim
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch
βœ… πŸ›  watch-sim

@mwyrzykowski mwyrzykowski self-assigned this Dec 6, 2023
@mwyrzykowski mwyrzykowski added the WebGPU For bugs in WebGPU label Dec 6, 2023
@mwyrzykowski mwyrzykowski requested a review from djg December 6, 2023 01:44
@@ -554,9 +558,7 @@ static MTLResourceUsage resourceUsageForBindingAcccess(BindGroupLayout::BindingA
constexpr auto maxResourceUsageValue = MTLResourceUsageRead | MTLResourceUsageWrite;
static_assert(maxResourceUsageValue == 3, "Code path assumes MTLResourceUsageRead | MTLResourceUsageWrite == 3");
Vector<id<MTLResource>> stageResources[stageCount][maxResourceUsageValue];
// FIXME: https://bugs.webkit.org/show_bug.cgi?id=257190 The bind group layout determines the layout of what gets put into the bind group.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That FIXME bug link was already completed, removing stale comment

@mwyrzykowski mwyrzykowski force-pushed the eng/WebGPU-Invalid-bind-group-should-be-returned-if-the-bind-group-layout-is-not-compatible-with-the-bind-group-descriptor branch from fe9caff to 20f9b2f Compare December 6, 2023 17:29
@mwyrzykowski mwyrzykowski added safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks merge-queue Applied to send a pull request to merge-queue and removed safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks labels Dec 6, 2023
…ut is not compatible with the bind group descriptor

https://bugs.webkit.org/show_bug.cgi?id=265918
<radar://119225289>

Reviewed by Tadeu Zagallo.

If the BindGroupLayout is not compatible with the BindGroup, an
invalid BindGroup should be returned.

* Source/WebGPU/WebGPU/BindGroup.mm:
(WebGPU::hasBinding):
(WebGPU::Device::createBindGroup):

* LayoutTests/http/tests/webgpu/webgpu/api/validation/getBindGroupLayout-expected.txt:
getBindGroupLayout test is now passing locally.

Canonical link: https://commits.webkit.org/271624@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/WebGPU-Invalid-bind-group-should-be-returned-if-the-bind-group-layout-is-not-compatible-with-the-bind-group-descriptor branch from 20f9b2f to f418211 Compare December 6, 2023 20:17
@webkit-commit-queue webkit-commit-queue merged commit f418211 into WebKit:main Dec 6, 2023
@webkit-commit-queue
Copy link
Collaborator

Committed 271624@main (f418211): https://commits.webkit.org/271624@main

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

@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebGPU For bugs in WebGPU
Projects
None yet
4 participants