Skip to content

Commit

Permalink
[Vulkan] Hack the buffer hack even more
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Aug 19, 2024
1 parent c50adaf commit 9632698
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ void kinc_g5_constant_buffer_init(kinc_g5_constant_buffer_t *buffer, int size) {
createUniformBuffer(&buffer->impl.buf, &buffer->impl.mem_alloc, &buffer->impl.mem, &buffer->impl.buffer_info, size);

// buffer hack
if (vk_ctx.vertex_uniform_buffer != NULL && vk_ctx.fragment_uniform_buffer != NULL && vk_ctx.compute_uniform_buffer != NULL) {
// allow writing the buffers again after G4onG5 wrote them
vk_ctx.vertex_uniform_buffer = NULL;
vk_ctx.fragment_uniform_buffer = NULL;
vk_ctx.compute_uniform_buffer = NULL;
}

if (vk_ctx.vertex_uniform_buffer == NULL) {
vk_ctx.vertex_uniform_buffer = &buffer->impl.buf;
}
Expand Down

0 comments on commit 9632698

Please sign in to comment.