wgpu/examples/src
Martin Vilcans 8e0b715954
hello_compute: check for missing command-line args (#4939)
* hello_compute: check for missing command-line args

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.

* Add PR #4939 to changelog as instructed
2024-01-02 21:08:41 +00:00
..
boids Update examples readme files (#4774) 2023-11-25 22:59:40 +00:00
bunnymark Update examples readme files (#4774) 2023-11-25 22:59:40 +00:00
conservative_raster Update examples readme files (#4774) 2023-11-25 22:59:40 +00:00
cube Update examples readme files (#4774) 2023-11-25 22:59:40 +00:00
hello Update examples readme files (#4774) 2023-11-25 22:59:40 +00:00
hello_compute hello_compute: check for missing command-line args (#4939) 2024-01-02 21:08:41 +00:00
hello_synchronization rename DeviceDescriptor.limits to DeviceDescriptor.required_limits 2023-11-29 19:55:18 +01:00
hello_triangle rename DeviceDescriptor.limits to DeviceDescriptor.required_limits 2023-11-29 19:55:18 +01:00
hello_windows rename DeviceDescriptor.limits to DeviceDescriptor.required_limits 2023-11-29 19:55:18 +01:00
hello_workgroups rename DeviceDescriptor.limits to DeviceDescriptor.required_limits 2023-11-29 19:55:18 +01:00
mipmap Update multi-planar texture API (#4837) 2023-12-07 14:06:56 -05:00
msaa_line Update examples readme files (#4774) 2023-11-25 22:59:40 +00:00
render_to_texture rename DeviceDescriptor.limits to DeviceDescriptor.required_limits 2023-11-29 19:55:18 +01:00
repeated_compute rename DeviceDescriptor.limits to DeviceDescriptor.required_limits 2023-11-29 19:55:18 +01:00
shadow Update multi-planar texture API (#4837) 2023-12-07 14:06:56 -05:00
skybox Fixes for Skybox and All Examples (#4780) 2023-11-27 11:40:37 +01:00
srgb_blend Update examples readme files (#4774) 2023-11-25 22:59:40 +00:00
stencil_triangles Update examples readme files (#4774) 2023-11-25 22:59:40 +00:00
storage_texture rename DeviceDescriptor.limits to DeviceDescriptor.required_limits 2023-11-29 19:55:18 +01:00
texture_arrays Update examples readme files (#4774) 2023-11-25 22:59:40 +00:00
timestamp_queries rename DeviceDescriptor.limits to DeviceDescriptor.required_limits 2023-11-29 19:55:18 +01:00
uniform_values rename DeviceDescriptor.limits to DeviceDescriptor.required_limits 2023-11-29 19:55:18 +01:00
water Update examples readme files (#4774) 2023-11-25 22:59:40 +00:00
framework.rs rename DeviceDescriptor.limits to DeviceDescriptor.required_limits 2023-11-29 19:55:18 +01:00
lib.rs Move to A Single Example Executable (#4756) 2023-11-23 05:26:42 -05:00
main.rs Change examples page menu on smaller screens (#4958) 2024-01-02 13:27:39 -05:00
utils.rs Move to A Single Example Executable (#4756) 2023-11-23 05:26:42 -05:00