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 549 forks source link

Improve DX12 command list naming #3504

Open yzsolt opened 3 years ago

yzsolt commented 3 years ago

(Follow up of https://github.com/gfx-rs/gfx/pull/3499)

Although the DX12 backend sets the debug name of CommandBuffers by calling SetName on the underlying GraphicsCommandList, it doesn't show up in the tested graphics debuggers (RenderDoc, PIX). Baldur Karlsson (RenderDoc author) explained why:

command buffers are inherently transient, and the lifetime of when exactly the name should be applied is a little unclear. They are better annotated using markers rather than names, if you want to have a global name for the command buffer you could insert it as a marker as the first command

Markers are already set by the DX12 backend to mark bound descriptor sets, so the initial pieces are there if we want to take this route.

kvark commented 3 years ago

the lifetime of when exactly the name should be applied is a little unclear

I don't know why Baldur finds this unclear. To me, it's as clear as Vulkan command buffers. They also go through the reset/recording/finished cycle.