Skip to content

Commit c6a8db9

Browse files
committed
[D3D12] Fix Windows builds
1 parent 8332545 commit c6a8db9

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

backends/gpu/direct3d12/includes/kore3/direct3d12/commandlist_structs.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ typedef struct kore_d3d12_command_list {
5050
uint32_t dynamic_descriptor_offsets[KORE_D3D12_COMMAND_LIST_ALLOCATOR_COUNT];
5151
uint8_t current_allocator_index;
5252

53+
#ifdef KORE_D3D12_NO_RAYTRACING
5354
struct ID3D12GraphicsCommandList3 *list;
55+
#else
56+
struct ID3D12GraphicsCommandList4 *list;
57+
#endif
5458

5559
struct ID3D12DescriptorHeap *rtv_descriptors;
5660
uint32_t rtv_increment;

backends/gpu/direct3d12/includes/kore3/direct3d12/device_structs.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ struct kore_d3d12_descriptor_set;
2828
#define KORE_D3D12_MAX_PIPELINES 1024
2929

3030
typedef struct kore_d3d12_device {
31-
struct ID3D12Device3 *device;
31+
#ifdef KORE_D3D12_NO_RAYTRACING
32+
struct ID3D12Device3 *device;
33+
#else
34+
struct ID3D12Device5 *device;
35+
#endif
3236
struct ID3D12CommandQueue *graphics_queue;
3337
struct ID3D12CommandQueue *compute_queue;
3438
struct ID3D12CommandQueue *copy_queue;

backends/gpu/direct3d12/sources/device.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,8 +682,13 @@ void kore_d3d12_device_create_command_list(kore_gpu_device *device, kore_gpu_com
682682

683683
list->d3d12.current_allocator_index = 0;
684684

685+
#ifdef KORE_D3D12_NO_RAYTRACING
685686
kore_microsoft_affirm(COM_CREATE(device->d3d12.device, CreateCommandList, ID3D12GraphicsCommandList3, &list->d3d12.list, 0, list_type,
686687
list->d3d12.allocator[list->d3d12.current_allocator_index], NULL));
688+
#else
689+
kore_microsoft_affirm(COM_CREATE(device->d3d12.device, CreateCommandList, ID3D12GraphicsCommandList4, &list->d3d12.list, 0, list_type,
690+
list->d3d12.allocator[list->d3d12.current_allocator_index], NULL));
691+
#endif
687692

688693
list->d3d12.compute_pipe = NULL;
689694
list->d3d12.ray_pipe = NULL;

0 commit comments

Comments
 (0)