-
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d698c5b
commit df288d8
Showing
8 changed files
with
56 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
Backends/Graphics5/Direct3D12/Sources/kope/direct3d12/descriptorset.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,12 @@ | ||
#include "descriptorset_functions.h" | ||
#include "descriptorset_structs.h" | ||
|
||
void kope_d3d12_descriptor_set_set_buffer_view_cbv(kope_g5_device *device, kope_d3d12_descriptor_set *set, kope_g5_buffer *buffer, uint32_t index) { | ||
D3D12_CONSTANT_BUFFER_VIEW_DESC desc; | ||
desc.BufferLocation = buffer->d3d12.resource->GetGPUVirtualAddress(); | ||
desc.SizeInBytes = (UINT)buffer->d3d12.size; | ||
|
||
D3D12_CPU_DESCRIPTOR_HANDLE descriptor_handle = device->d3d12.staging_descriptor_heap->GetCPUDescriptorHandleForHeapStart(); | ||
descriptor_handle.ptr += (set->allocation.offset + index) * device->d3d12.cbv_srv_uav_increment; | ||
device->d3d12.device->CreateConstantBufferView(&desc, descriptor_handle); | ||
} |
6 changes: 6 additions & 0 deletions
6
Backends/Graphics5/Direct3D12/Sources/kope/direct3d12/descriptorset_functions.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters