Skip to content

Commit

Permalink
Fixed compiler warnings
Browse files Browse the repository at this point in the history
- Using ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart now again as intended (I don't know why at some point of time MSFT had this function the way it was used previously...)
  • Loading branch information
Ohjurot committed Aug 4, 2022
1 parent 93a057b commit 97c7a6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion demo/d3d12/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ static void get_swap_chain_buffers()
assert(SUCCEEDED(hr));

/* Recreate render target views */
ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(rtv_descriptor_heap, &descriptor_handle);
descriptor_handle = ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(rtv_descriptor_heap);
ID3D12Device_CreateRenderTargetView(device, rtv_buffers[0], NULL, descriptor_handle);
rtv_handles[0] = descriptor_handle;
descriptor_handle.ptr += rtv_desc_increment;
Expand Down
4 changes: 2 additions & 2 deletions demo/d3d12/nuklear_d3d12.h
Original file line number Diff line number Diff line change
Expand Up @@ -677,8 +677,8 @@ nk_d3d12_init(ID3D12Device *device, int width, int height, unsigned int max_vert
}

/* Get address of first handle (CPU and GPU) */
ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(d3d12.desc_heap, &d3d12.cpu_descriptor_handle);
ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(d3d12.desc_heap, &d3d12.gpu_descriptor_handle);
d3d12.cpu_descriptor_handle = ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(d3d12.desc_heap);
d3d12.gpu_descriptor_handle = ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(d3d12.desc_heap);

/* Get addresses of vertex & index buffers */
d3d12.gpu_vertex_buffer_address = ID3D12Resource_GetGPUVirtualAddress(d3d12.vertex_buffer);
Expand Down

0 comments on commit 97c7a6b

Please sign in to comment.