From 8e2c8b036180a97627e4ec26bf4caeb4bb0b71d0 Mon Sep 17 00:00:00 2001 From: Robert Konrad Date: Sat, 22 Jun 2024 18:25:51 +0200 Subject: [PATCH] [D3D12] Fix constant buffers with Kong --- .../Direct3D12/Sources/kinc/backend/graphics5/commandlist.c.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Backends/Graphics5/Direct3D12/Sources/kinc/backend/graphics5/commandlist.c.h b/Backends/Graphics5/Direct3D12/Sources/kinc/backend/graphics5/commandlist.c.h index 2593eb989..c07d96635 100644 --- a/Backends/Graphics5/Direct3D12/Sources/kinc/backend/graphics5/commandlist.c.h +++ b/Backends/Graphics5/Direct3D12/Sources/kinc/backend/graphics5/commandlist.c.h @@ -162,6 +162,9 @@ void kinc_g5_command_list_set_vertex_constant_buffer(struct kinc_g5_command_list assert(list->impl.open); #ifdef KINC_DXC +#ifdef KINC_KONG + list->impl._commandList->SetGraphicsRootConstantBufferView(2, buffer->impl.constant_buffer->GetGPUVirtualAddress() + offset); +#else if (list->impl._currentPipeline->impl.vertexConstantsSize > 0) { if (list->impl._currentPipeline->impl.textures > 0) { list->impl._commandList->SetGraphicsRootConstantBufferView(2, buffer->impl.constant_buffer->GetGPUVirtualAddress() + offset); @@ -170,6 +173,7 @@ void kinc_g5_command_list_set_vertex_constant_buffer(struct kinc_g5_command_list list->impl._commandList->SetGraphicsRootConstantBufferView(0, buffer->impl.constant_buffer->GetGPUVirtualAddress() + offset); } } +#endif #else list->impl._commandList->SetGraphicsRootConstantBufferView(2, buffer->impl.constant_buffer->GetGPUVirtualAddress() + offset); #endif