-
Notifications
You must be signed in to change notification settings - Fork 920
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
hello_compute: check for missing command-line args #4939
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes off-by-one error when checking for missing arguments. Before this, running the example gave this scary looking error message: ``` $ cargo run --bin wgpu-examples hello_compute Finished dev [unoptimized + debuginfo] target(s) in 0.13s Running `target/debug/wgpu-examples hello_compute` [2023-12-27T22:14:26Z ERROR wgpu::backend::direct] Handling wgpu errors as fatal by default thread 'main' panicked at 'wgpu error: Validation Error Caused by: In Device::create_bind_group Buffer binding size 0 is less than minimum 4 note: buffer = `Storage Buffer` ', wgpu/src/backend/direct.rs:3139:5 ``` As this was the first example I tried to run, it almost scared me away, thinking it was a driver issue. Instead, without arguments the example should use defaults.
Wumpf
approved these changes
Dec 28, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, thanks! That was apparently missed when the examples switched to a single binary, thus having two arguments in the beginning, one for executable path and one for the selected example
moz-v2v-gh
pushed a commit
to mozilla/gecko-dev
that referenced
this pull request
Jan 6, 2024
…a54af3aa12d. r=webgpu-reviewers,supply-chain-reviewers,ErichDonGubler Changelog * #4927 BGL Weak Pointer Deduplication Pool By cwfitzgerald in gfx-rs/wgpu#4927 * #4958 Change examples page menu on smaller screens By Dinnerbone in gfx-rs/wgpu#4958 * #4950 Bump anyhow from 1.0.77 to 1.0.78 By dependabot[bot] in gfx-rs/wgpu#4950 * #4957 Disable Linux Tests By cwfitzgerald in gfx-rs/wgpu#4957 * #4960 Fix incorrect ConfigureSurfaceError::TooLarge message By Dinnerbone in gfx-rs/wgpu#4960 * #4935 Add `cfg_aliases` to `wgpu` By daxpedda in gfx-rs/wgpu#4935 * #4939 hello_compute: check for missing command-line args By vilcans in gfx-rs/wgpu#4939 * #4948 Bump winit from 0.29.6 to 0.29.8 By dependabot[bot] in gfx-rs/wgpu#4948 * #4944 Fix xtask wasm-bindgen install By rukai in gfx-rs/wgpu#4944 * #4858 [glsl-in] fix swizzle in global const context By teoxoy in gfx-rs/wgpu#4858 * #4968 [gl] fix RGBA8 format capabilities By teoxoy in gfx-rs/wgpu#4968 * #4947 Avoid allocating during queue submit By udoprog in gfx-rs/wgpu#4947 * #4965 Bump serde from 1.0.193 to 1.0.194 By dependabot[bot] in gfx-rs/wgpu#4965 * #4975 Fix Hang in Multithreaded Compute Test By cwfitzgerald in gfx-rs/wgpu#4975 * #4966 Bump anyhow from 1.0.78 to 1.0.79 By dependabot[bot] in gfx-rs/wgpu#4966 * #4978 Bump thiserror from 1.0.52 to 1.0.56 By dependabot[bot] in gfx-rs/wgpu#4978 * #4979 Bump syn from 2.0.46 to 2.0.47 By dependabot[bot] in gfx-rs/wgpu#4979 * #4977 Use Custom Mesa for Building By cwfitzgerald in gfx-rs/wgpu#4977 * #4981 Bump serde_json from 1.0.108 to 1.0.110 By dependabot[bot] in gfx-rs/wgpu#4981 * #4959 wgpu-hal: Fix Mesa version check for version with suffix containing `.` By ids1024 in gfx-rs/wgpu#4959 * #4976 Shorten Lock Lifetimes By cwfitzgerald in gfx-rs/wgpu#4976 * #4980 Pin DXC and Vulkan SDK version By cwfitzgerald in gfx-rs/wgpu#4980 * #4974 gles: use already existing debug__fn private capabilty instead of checking extensions By valaphee in gfx-rs/wgpu#4974 * #4987 Remove Mac CI By cwfitzgerald in gfx-rs/wgpu#4987 * #4990 Fix Queue::write_texture, Fix DX12 write_texture_subset_2d and re-enable the test. By dtzxporter in gfx-rs/wgpu#4990 * #4994 Bump syn from 2.0.47 to 2.0.48 By dependabot[bot] in gfx-rs/wgpu#4994 * #4993 Bump serde_json from 1.0.110 to 1.0.111 By dependabot[bot] in gfx-rs/wgpu#4993 * #4992 Bump gpu-allocator from 0.24.0 to 0.25.0 By dependabot[bot] in gfx-rs/wgpu#4992 * #4995 Add Verbosity Flags to wgpu-info By cwfitzgerald in gfx-rs/wgpu#4995 * #4996 Dependency Update Rollup By cwfitzgerald in gfx-rs/wgpu#4996 * #4954 Put raw texture access behind snatch guards By nical in gfx-rs/wgpu#4954 * #4954 Put raw texture access behind snatch guards By nical in gfx-rs/wgpu#4954 * #4969 Texture snatching By nical in gfx-rs/wgpu#4969 * #4969 Texture snatching By nical in gfx-rs/wgpu#4969 Differential Revision: https://phabricator.services.mozilla.com/D197786
ErichDonGubler
pushed a commit
to erichdongubler-mozilla/firefox
that referenced
this pull request
Jan 9, 2024
…a54af3aa12d. r=webgpu-reviewers,supply-chain-reviewers,ErichDonGubler Changelog * #4927 BGL Weak Pointer Deduplication Pool By cwfitzgerald in gfx-rs/wgpu#4927 * #4958 Change examples page menu on smaller screens By Dinnerbone in gfx-rs/wgpu#4958 * #4950 Bump anyhow from 1.0.77 to 1.0.78 By dependabot[bot] in gfx-rs/wgpu#4950 * #4957 Disable Linux Tests By cwfitzgerald in gfx-rs/wgpu#4957 * #4960 Fix incorrect ConfigureSurfaceError::TooLarge message By Dinnerbone in gfx-rs/wgpu#4960 * #4935 Add `cfg_aliases` to `wgpu` By daxpedda in gfx-rs/wgpu#4935 * #4939 hello_compute: check for missing command-line args By vilcans in gfx-rs/wgpu#4939 * #4948 Bump winit from 0.29.6 to 0.29.8 By dependabot[bot] in gfx-rs/wgpu#4948 * #4944 Fix xtask wasm-bindgen install By rukai in gfx-rs/wgpu#4944 * #4858 [glsl-in] fix swizzle in global const context By teoxoy in gfx-rs/wgpu#4858 * #4968 [gl] fix RGBA8 format capabilities By teoxoy in gfx-rs/wgpu#4968 * #4947 Avoid allocating during queue submit By udoprog in gfx-rs/wgpu#4947 * #4965 Bump serde from 1.0.193 to 1.0.194 By dependabot[bot] in gfx-rs/wgpu#4965 * #4975 Fix Hang in Multithreaded Compute Test By cwfitzgerald in gfx-rs/wgpu#4975 * #4966 Bump anyhow from 1.0.78 to 1.0.79 By dependabot[bot] in gfx-rs/wgpu#4966 * #4978 Bump thiserror from 1.0.52 to 1.0.56 By dependabot[bot] in gfx-rs/wgpu#4978 * #4979 Bump syn from 2.0.46 to 2.0.47 By dependabot[bot] in gfx-rs/wgpu#4979 * #4977 Use Custom Mesa for Building By cwfitzgerald in gfx-rs/wgpu#4977 * #4981 Bump serde_json from 1.0.108 to 1.0.110 By dependabot[bot] in gfx-rs/wgpu#4981 * #4959 wgpu-hal: Fix Mesa version check for version with suffix containing `.` By ids1024 in gfx-rs/wgpu#4959 * #4976 Shorten Lock Lifetimes By cwfitzgerald in gfx-rs/wgpu#4976 * #4980 Pin DXC and Vulkan SDK version By cwfitzgerald in gfx-rs/wgpu#4980 * #4974 gles: use already existing debug__fn private capabilty instead of checking extensions By valaphee in gfx-rs/wgpu#4974 * #4987 Remove Mac CI By cwfitzgerald in gfx-rs/wgpu#4987 * #4990 Fix Queue::write_texture, Fix DX12 write_texture_subset_2d and re-enable the test. By dtzxporter in gfx-rs/wgpu#4990 * #4994 Bump syn from 2.0.47 to 2.0.48 By dependabot[bot] in gfx-rs/wgpu#4994 * #4993 Bump serde_json from 1.0.110 to 1.0.111 By dependabot[bot] in gfx-rs/wgpu#4993 * #4992 Bump gpu-allocator from 0.24.0 to 0.25.0 By dependabot[bot] in gfx-rs/wgpu#4992 * #4995 Add Verbosity Flags to wgpu-info By cwfitzgerald in gfx-rs/wgpu#4995 * #4996 Dependency Update Rollup By cwfitzgerald in gfx-rs/wgpu#4996 * #4954 Put raw texture access behind snatch guards By nical in gfx-rs/wgpu#4954 * #4954 Put raw texture access behind snatch guards By nical in gfx-rs/wgpu#4954 * #4969 Texture snatching By nical in gfx-rs/wgpu#4969 * #4969 Texture snatching By nical in gfx-rs/wgpu#4969 Differential Revision: https://phabricator.services.mozilla.com/D197786
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified-and-comments-removed
that referenced
this pull request
Jan 16, 2024
…a54af3aa12d. r=webgpu-reviewers,supply-chain-reviewers,ErichDonGubler Changelog * #4927 BGL Weak Pointer Deduplication Pool By cwfitzgerald in gfx-rs/wgpu#4927 * #4958 Change examples page menu on smaller screens By Dinnerbone in gfx-rs/wgpu#4958 * #4950 Bump anyhow from 1.0.77 to 1.0.78 By dependabot[bot] in gfx-rs/wgpu#4950 * #4957 Disable Linux Tests By cwfitzgerald in gfx-rs/wgpu#4957 * #4960 Fix incorrect ConfigureSurfaceError::TooLarge message By Dinnerbone in gfx-rs/wgpu#4960 * #4935 Add `cfg_aliases` to `wgpu` By daxpedda in gfx-rs/wgpu#4935 * #4939 hello_compute: check for missing command-line args By vilcans in gfx-rs/wgpu#4939 * #4948 Bump winit from 0.29.6 to 0.29.8 By dependabot[bot] in gfx-rs/wgpu#4948 * #4944 Fix xtask wasm-bindgen install By rukai in gfx-rs/wgpu#4944 * #4858 [glsl-in] fix swizzle in global const context By teoxoy in gfx-rs/wgpu#4858 * #4968 [gl] fix RGBA8 format capabilities By teoxoy in gfx-rs/wgpu#4968 * #4947 Avoid allocating during queue submit By udoprog in gfx-rs/wgpu#4947 * #4965 Bump serde from 1.0.193 to 1.0.194 By dependabot[bot] in gfx-rs/wgpu#4965 * #4975 Fix Hang in Multithreaded Compute Test By cwfitzgerald in gfx-rs/wgpu#4975 * #4966 Bump anyhow from 1.0.78 to 1.0.79 By dependabot[bot] in gfx-rs/wgpu#4966 * #4978 Bump thiserror from 1.0.52 to 1.0.56 By dependabot[bot] in gfx-rs/wgpu#4978 * #4979 Bump syn from 2.0.46 to 2.0.47 By dependabot[bot] in gfx-rs/wgpu#4979 * #4977 Use Custom Mesa for Building By cwfitzgerald in gfx-rs/wgpu#4977 * #4981 Bump serde_json from 1.0.108 to 1.0.110 By dependabot[bot] in gfx-rs/wgpu#4981 * #4959 wgpu-hal: Fix Mesa version check for version with suffix containing `.` By ids1024 in gfx-rs/wgpu#4959 * #4976 Shorten Lock Lifetimes By cwfitzgerald in gfx-rs/wgpu#4976 * #4980 Pin DXC and Vulkan SDK version By cwfitzgerald in gfx-rs/wgpu#4980 * #4974 gles: use already existing debug__fn private capabilty instead of checking extensions By valaphee in gfx-rs/wgpu#4974 * #4987 Remove Mac CI By cwfitzgerald in gfx-rs/wgpu#4987 * #4990 Fix Queue::write_texture, Fix DX12 write_texture_subset_2d and re-enable the test. By dtzxporter in gfx-rs/wgpu#4990 * #4994 Bump syn from 2.0.47 to 2.0.48 By dependabot[bot] in gfx-rs/wgpu#4994 * #4993 Bump serde_json from 1.0.110 to 1.0.111 By dependabot[bot] in gfx-rs/wgpu#4993 * #4992 Bump gpu-allocator from 0.24.0 to 0.25.0 By dependabot[bot] in gfx-rs/wgpu#4992 * #4995 Add Verbosity Flags to wgpu-info By cwfitzgerald in gfx-rs/wgpu#4995 * #4996 Dependency Update Rollup By cwfitzgerald in gfx-rs/wgpu#4996 * #4954 Put raw texture access behind snatch guards By nical in gfx-rs/wgpu#4954 * #4954 Put raw texture access behind snatch guards By nical in gfx-rs/wgpu#4954 * #4969 Texture snatching By nical in gfx-rs/wgpu#4969 * #4969 Texture snatching By nical in gfx-rs/wgpu#4969 Differential Revision: https://phabricator.services.mozilla.com/D197786 UltraBlame original commit: 17af24495b14543eed7f3cfd1434a961d879f47e
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-comments-removed
that referenced
this pull request
Jan 16, 2024
…a54af3aa12d. r=webgpu-reviewers,supply-chain-reviewers,ErichDonGubler Changelog * #4927 BGL Weak Pointer Deduplication Pool By cwfitzgerald in gfx-rs/wgpu#4927 * #4958 Change examples page menu on smaller screens By Dinnerbone in gfx-rs/wgpu#4958 * #4950 Bump anyhow from 1.0.77 to 1.0.78 By dependabot[bot] in gfx-rs/wgpu#4950 * #4957 Disable Linux Tests By cwfitzgerald in gfx-rs/wgpu#4957 * #4960 Fix incorrect ConfigureSurfaceError::TooLarge message By Dinnerbone in gfx-rs/wgpu#4960 * #4935 Add `cfg_aliases` to `wgpu` By daxpedda in gfx-rs/wgpu#4935 * #4939 hello_compute: check for missing command-line args By vilcans in gfx-rs/wgpu#4939 * #4948 Bump winit from 0.29.6 to 0.29.8 By dependabot[bot] in gfx-rs/wgpu#4948 * #4944 Fix xtask wasm-bindgen install By rukai in gfx-rs/wgpu#4944 * #4858 [glsl-in] fix swizzle in global const context By teoxoy in gfx-rs/wgpu#4858 * #4968 [gl] fix RGBA8 format capabilities By teoxoy in gfx-rs/wgpu#4968 * #4947 Avoid allocating during queue submit By udoprog in gfx-rs/wgpu#4947 * #4965 Bump serde from 1.0.193 to 1.0.194 By dependabot[bot] in gfx-rs/wgpu#4965 * #4975 Fix Hang in Multithreaded Compute Test By cwfitzgerald in gfx-rs/wgpu#4975 * #4966 Bump anyhow from 1.0.78 to 1.0.79 By dependabot[bot] in gfx-rs/wgpu#4966 * #4978 Bump thiserror from 1.0.52 to 1.0.56 By dependabot[bot] in gfx-rs/wgpu#4978 * #4979 Bump syn from 2.0.46 to 2.0.47 By dependabot[bot] in gfx-rs/wgpu#4979 * #4977 Use Custom Mesa for Building By cwfitzgerald in gfx-rs/wgpu#4977 * #4981 Bump serde_json from 1.0.108 to 1.0.110 By dependabot[bot] in gfx-rs/wgpu#4981 * #4959 wgpu-hal: Fix Mesa version check for version with suffix containing `.` By ids1024 in gfx-rs/wgpu#4959 * #4976 Shorten Lock Lifetimes By cwfitzgerald in gfx-rs/wgpu#4976 * #4980 Pin DXC and Vulkan SDK version By cwfitzgerald in gfx-rs/wgpu#4980 * #4974 gles: use already existing debug__fn private capabilty instead of checking extensions By valaphee in gfx-rs/wgpu#4974 * #4987 Remove Mac CI By cwfitzgerald in gfx-rs/wgpu#4987 * #4990 Fix Queue::write_texture, Fix DX12 write_texture_subset_2d and re-enable the test. By dtzxporter in gfx-rs/wgpu#4990 * #4994 Bump syn from 2.0.47 to 2.0.48 By dependabot[bot] in gfx-rs/wgpu#4994 * #4993 Bump serde_json from 1.0.110 to 1.0.111 By dependabot[bot] in gfx-rs/wgpu#4993 * #4992 Bump gpu-allocator from 0.24.0 to 0.25.0 By dependabot[bot] in gfx-rs/wgpu#4992 * #4995 Add Verbosity Flags to wgpu-info By cwfitzgerald in gfx-rs/wgpu#4995 * #4996 Dependency Update Rollup By cwfitzgerald in gfx-rs/wgpu#4996 * #4954 Put raw texture access behind snatch guards By nical in gfx-rs/wgpu#4954 * #4954 Put raw texture access behind snatch guards By nical in gfx-rs/wgpu#4954 * #4969 Texture snatching By nical in gfx-rs/wgpu#4969 * #4969 Texture snatching By nical in gfx-rs/wgpu#4969 Differential Revision: https://phabricator.services.mozilla.com/D197786 UltraBlame original commit: 17af24495b14543eed7f3cfd1434a961d879f47e
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified
that referenced
this pull request
Jan 16, 2024
…a54af3aa12d. r=webgpu-reviewers,supply-chain-reviewers,ErichDonGubler Changelog * #4927 BGL Weak Pointer Deduplication Pool By cwfitzgerald in gfx-rs/wgpu#4927 * #4958 Change examples page menu on smaller screens By Dinnerbone in gfx-rs/wgpu#4958 * #4950 Bump anyhow from 1.0.77 to 1.0.78 By dependabot[bot] in gfx-rs/wgpu#4950 * #4957 Disable Linux Tests By cwfitzgerald in gfx-rs/wgpu#4957 * #4960 Fix incorrect ConfigureSurfaceError::TooLarge message By Dinnerbone in gfx-rs/wgpu#4960 * #4935 Add `cfg_aliases` to `wgpu` By daxpedda in gfx-rs/wgpu#4935 * #4939 hello_compute: check for missing command-line args By vilcans in gfx-rs/wgpu#4939 * #4948 Bump winit from 0.29.6 to 0.29.8 By dependabot[bot] in gfx-rs/wgpu#4948 * #4944 Fix xtask wasm-bindgen install By rukai in gfx-rs/wgpu#4944 * #4858 [glsl-in] fix swizzle in global const context By teoxoy in gfx-rs/wgpu#4858 * #4968 [gl] fix RGBA8 format capabilities By teoxoy in gfx-rs/wgpu#4968 * #4947 Avoid allocating during queue submit By udoprog in gfx-rs/wgpu#4947 * #4965 Bump serde from 1.0.193 to 1.0.194 By dependabot[bot] in gfx-rs/wgpu#4965 * #4975 Fix Hang in Multithreaded Compute Test By cwfitzgerald in gfx-rs/wgpu#4975 * #4966 Bump anyhow from 1.0.78 to 1.0.79 By dependabot[bot] in gfx-rs/wgpu#4966 * #4978 Bump thiserror from 1.0.52 to 1.0.56 By dependabot[bot] in gfx-rs/wgpu#4978 * #4979 Bump syn from 2.0.46 to 2.0.47 By dependabot[bot] in gfx-rs/wgpu#4979 * #4977 Use Custom Mesa for Building By cwfitzgerald in gfx-rs/wgpu#4977 * #4981 Bump serde_json from 1.0.108 to 1.0.110 By dependabot[bot] in gfx-rs/wgpu#4981 * #4959 wgpu-hal: Fix Mesa version check for version with suffix containing `.` By ids1024 in gfx-rs/wgpu#4959 * #4976 Shorten Lock Lifetimes By cwfitzgerald in gfx-rs/wgpu#4976 * #4980 Pin DXC and Vulkan SDK version By cwfitzgerald in gfx-rs/wgpu#4980 * #4974 gles: use already existing debug__fn private capabilty instead of checking extensions By valaphee in gfx-rs/wgpu#4974 * #4987 Remove Mac CI By cwfitzgerald in gfx-rs/wgpu#4987 * #4990 Fix Queue::write_texture, Fix DX12 write_texture_subset_2d and re-enable the test. By dtzxporter in gfx-rs/wgpu#4990 * #4994 Bump syn from 2.0.47 to 2.0.48 By dependabot[bot] in gfx-rs/wgpu#4994 * #4993 Bump serde_json from 1.0.110 to 1.0.111 By dependabot[bot] in gfx-rs/wgpu#4993 * #4992 Bump gpu-allocator from 0.24.0 to 0.25.0 By dependabot[bot] in gfx-rs/wgpu#4992 * #4995 Add Verbosity Flags to wgpu-info By cwfitzgerald in gfx-rs/wgpu#4995 * #4996 Dependency Update Rollup By cwfitzgerald in gfx-rs/wgpu#4996 * #4954 Put raw texture access behind snatch guards By nical in gfx-rs/wgpu#4954 * #4954 Put raw texture access behind snatch guards By nical in gfx-rs/wgpu#4954 * #4969 Texture snatching By nical in gfx-rs/wgpu#4969 * #4969 Texture snatching By nical in gfx-rs/wgpu#4969 Differential Revision: https://phabricator.services.mozilla.com/D197786 UltraBlame original commit: 17af24495b14543eed7f3cfd1434a961d879f47e
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Connections
N/A
Description
Fixes off-by-one error when checking for missing arguments. Before this, running the example gave this discouraging error message:
As this was the first example I tried to run, it almost scared me away, thinking it was a driver issue.
Instead, without arguments the example should use defaults.
Testing
Tested from the command-line, now it uses defaults as it should:
Checklist
cargo fmt
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown
--target wasm32-unknown-emscripten
cargo xtask test
to run tests.CHANGELOG.md
. See simple instructions inside file.