Skip to content

Commit

Permalink
[D3D12] Fix constant buffers with Kong
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Jun 22, 2024
1 parent ba12ac8 commit 8e2c8b0
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand Down

0 comments on commit 8e2c8b0

Please sign in to comment.