Skip to content

Instantly share code, notes, and snippets.

@yorung
Created May 8, 2016 06:40
Show Gist options
  • Select an option

  • Save yorung/18ca48b4da2bd96092b31532e602fd01 to your computer and use it in GitHub Desktop.

Select an option

Save yorung/18ca48b4da2bd96092b31532e602fd01 to your computer and use it in GitHub Desktop.
Bind a descriptor heap.
void afSetDescriptorHeap(ComPtr<ID3D12DescriptorHeap> heap)
{
ID3D12GraphicsCommandList* list = deviceMan.GetCommandList();
ID3D12DescriptorHeap* ppHeaps[] = { heap.Get() };
list->SetDescriptorHeaps(_countof(ppHeaps), ppHeaps);
list->SetGraphicsRootDescriptorTable(0, heap->GetGPUDescriptorHandleForHeapStart());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment