mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-02-16 17:02:32 +00:00
Improve compute shader validation error message (#3139)
* Improve compute shader validation error message * Add entry to changelog. * Improve error message wording (by cwfitzgerald) Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com> * Add credit and PR link to changelog Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
This commit is contained in:
parent
ccabcad6bb
commit
51b34c5b51
@ -34,7 +34,7 @@ Bottom level categories:
|
||||
- DX11
|
||||
- GLES
|
||||
- WebGPU
|
||||
- Enscripten
|
||||
- Emscripten
|
||||
- Hal
|
||||
-->
|
||||
|
||||
@ -46,6 +46,7 @@ Bottom level categories:
|
||||
|
||||
- Convert all `Default` Implementations on Enums to `derive(Default)`
|
||||
- Implement `Default` for `CompositeAlphaMode`
|
||||
- Improve compute shader validation error message. By @haraldreingruber in [#3139](https://github.com/gfx-rs/wgpu/pull/3139)
|
||||
|
||||
#### WebGPU
|
||||
- Implement `queue_validate_write_buffer` by @jinleili in [#3098](https://github.com/gfx-rs/wgpu/pull/3098)
|
||||
|
@ -236,10 +236,11 @@ pub enum StageError {
|
||||
#[error("shader module is invalid")]
|
||||
InvalidModule,
|
||||
#[error(
|
||||
"shader entry point current workgroup size {current:?} must be less or equal to {limit:?} of total {total}"
|
||||
"shader entry point's workgroup size {current:?} ({current_total} total invocations) must be less or equal to the per-dimension limit {limit:?} and the total invocation limit {total}"
|
||||
)]
|
||||
InvalidWorkgroupSize {
|
||||
current: [u32; 3],
|
||||
current_total: u32,
|
||||
limit: [u32; 3],
|
||||
total: u32,
|
||||
},
|
||||
@ -1098,6 +1099,7 @@ impl Interface {
|
||||
{
|
||||
return Err(StageError::InvalidWorkgroupSize {
|
||||
current: entry_point.workgroup_size,
|
||||
current_total: total_invocations,
|
||||
limit: max_workgroup_size_limits,
|
||||
total: self.limits.max_compute_invocations_per_workgroup,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user