gfx-rs/wgpu-rs

Validation warnings should say which shader they were triggered by

fintelia opened this issue · 2 comments

Currently shader validation warnings don't actually say which shader caused them. For instance, running terra currently produces the following output:

[2021-05-08T01:39:24Z ERROR wgpu_core::validation] Unexpected varying type: Array { base: [5], size: Constant([15]), stride: 4 }
[2021-05-08T01:39:27Z WARN  wgpu_core::device] Failed to parse shader SPIR-V code: UnsupportedCapability(Float64)
[2021-05-08T01:39:27Z WARN  wgpu_core::device] 	Proceeding unsafely without validation
[2021-05-08T01:39:27Z WARN  wgpu_core::device] Failed to parse shader SPIR-V code: UnsupportedInstruction(Function, ControlBarrier)
[2021-05-08T01:39:27Z WARN  wgpu_core::device] 	Proceeding unsafely without validation
[2021-05-08T01:39:28Z WARN  wgpu_core::device] Failed to parse shader SPIR-V code: UnsupportedInstruction(Function, ControlBarrier)
[2021-05-08T01:39:28Z WARN  wgpu_core::device] 	Proceeding unsafely without validation
[2021-05-08T01:40:17Z WARN  wgpu_core::device] Failed to parse shader SPIR-V code: UnsupportedInstruction(Function, ControlBarrier)
[2021-05-08T01:40:17Z WARN  wgpu_core::device] 	Proceeding unsafely without validation

All of these warnings are expected, but if they weren't it would be rather annoying to actually figure out where they were coming from...

kvark commented

It's actually fairly easy, I think. Just drop the "cross" dependency, and all these warnings become hard errors.

Well, specifically disable the "cross" dependency and request shader validation, but yes. Just made a PR with a possible resolution that just prints the label in the warn/error message.