2

I copy data to my D3D12_HEAP_TYPE_DEFAULT buffers from my D3D12_HEAP_TYPE_UPLOAD intermediate buffers using D3D12_COMMAND_LIST_TYPE_COPY queue. After copy has been made, i need to transition resource back to D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER. But copy queue doesn't support transition to this state. How can i do it properly?

Should i insert fence right after copying, then wait for this fence on graphics queue and perform transition there, that is not really comfortable option. Any other possibilities?

Yola
  • 18,496
  • 11
  • 65
  • 106

1 Answers1

1

If you use a copy command list on the copy queue, your resource will decay back to common as describe in the quote. You can then either transition from common to vertex and constant buffer at the usage site explicitely, or do nothing because common will promote itself to anyway.

The following resources will decay when an ExecuteCommandLists operation is completed on the GPU: Resources being accessed on a Copy queue, or Buffer resources on any queue type, or Texture resources on any queue type that have the D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS flag set.

galop1n
  • 8,573
  • 22
  • 36