[DX12] Updating a descriptor heap using a command list?

Started by
4 comments, last by Hodgman 7 years, 8 months ago

Hello,

Is there a way to update a (GPU visible) descriptor in a heap from a command list?

As an exemple, I have a list of 100 texture descriptors:

- Draw call 1 uses this list.

- Modify one of the descriptor (lets say, descriptor #17)... something like "commandList->UpdateDescriptor(descHeap, 17, srvDesc)"

- Draw call 2 uses the modified list.

As I understand, descriptors are managed from the CPU and to be sure I do not modify something the GPU may be using I would need to create a brand new list of 100 descriptors with only one of them modified.

- Draw call 1 uses first list.

- Create a second list of 100 descriptors with #17 different from first list.

- Draw call 2 uses the second list.

That does not look too bad but I have a feeling that scaling the number of descriptors to 10k can become problematic.

Hopefully you can understand what I mean...

Thanks.

Advertisement

Currently no, there is no way to do what you want. If you want to have per-draw lists, keep them small so that renaming them is cheap. If you want large lists, consider just using new elements instead of replacing them in place.

Is it in the plans or its something that will never happen?
I bet it's like this because of limitations of some hardware (Intel? NVIDIA?)..
It's a pity because it makes things a lot harder then they should be.

I'm afraid I don't have anything to share regarding future plans for this area, but this isn't the first time we've heard this request and we'll take it under advisement.

It seems this was a planned feature and was in the documentation at one point:

http://www.gamedev.net/topic/670726-d3d12-copying-descriptors/

IIRC it's even mentioned in the Frank Luna book...

This would be hell for driver teams to implement safely though, so it's probably best they've scrapped it... :(

This topic is closed to new replies.

Advertisement