Open matthew-wong1 opened 1 month ago
Hi! I think it would be helpful if the label attribute of a WebGPU object was included in any validation error messages.
For example, if I create the following texture:
const texture = device.createTexture({ label: "Texture 1", dimension: "2d", sampleCount: 1, format: "rgba8unorm-srgb", size: { width: 36, height: 145, depthOrArrayLayers: 34 }, mipLevelCount: 10, usage: GPUTextureUsage.RENDER_ATTACHMENT. viewFormat: ["rgba8unorm"] });
I'll get the error message: Device::create_texture error: Texture descriptor mip level count 10 is invalid, maximum allowed is 8.
Device::create_texture error: Texture descriptor mip level count 10 is invalid, maximum allowed is 8.
I think it would be helpful if this error message could include the label e.g. Texture 1 in this case, to make it easier to debug. Thanks!
Texture 1
wgpu itself supports this, but not wgpu-core (which is what we use). this will be changed once https://github.com/gfx-rs/wgpu/issues/5121 is completed.
Hi! I think it would be helpful if the label attribute of a WebGPU object was included in any validation error messages.
For example, if I create the following texture:
I'll get the error message:
Device::create_texture error: Texture descriptor mip level count 10 is invalid, maximum allowed is 8.
I think it would be helpful if this error message could include the label e.g.
Texture 1
in this case, to make it easier to debug. Thanks!