gfx-rs / gfx

[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
http://gfx-rs.github.io/
Apache License 2.0
5.35k stars 548 forks source link

DX12 Name Corruption #3564

Open cwfitzgerald opened 3 years ago

cwfitzgerald commented 3 years ago

Description

When reporting gfx-rs/wgpu#1129, I noticed that the debug names of most d3d12 objects were totally corrupt, consisting of random characters.

Repro steps

Run any example in the debugger then look at the "Live Object" warnings at the end.

Expected vs observed behavior

Expected: reasonable debug names Observerved: garbage

tangmi commented 3 years ago

I wasn't able to repro by running rend3/scene-viewer or wgpu-rs/water on my gtx1080.

I noticed ID3D12Object::SetName returns an HRESULT, perhaps you can try wrapping all the calls in gfx-backend-dx12 with assert!(winerror::SUCCEEDED(*.SetName(...)))?