Skip to content

Commit

Permalink
fix imgui sync
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNumbat committed Jan 28, 2024
1 parent 15dccf5 commit b830bc7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion rvk/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -765,12 +765,13 @@ Slice<const char*> Device::baseline_extensions() {
}

Slice<const char*> Device::ray_tracing_extensions() {
static Array<const char*, 5> device{
static Array<const char*, 6> device{
reinterpret_cast<const char*>(VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME),
reinterpret_cast<const char*>(VK_KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME),
reinterpret_cast<const char*>(VK_KHR_DEFERRED_HOST_OPERATIONS_EXTENSION_NAME),
reinterpret_cast<const char*>(VK_KHR_RAY_TRACING_MAINTENANCE_1_EXTENSION_NAME),
reinterpret_cast<const char*>(VK_KHR_RAY_TRACING_POSITION_FETCH_EXTENSION_NAME),
reinterpret_cast<const char*>(VK_KHR_RAY_QUERY_EXTENSION_NAME),
};
return Slice<const char*>{device};
}
Expand Down
1 change: 1 addition & 0 deletions rvk/rvk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ void shutdown() {
}

void reset_imgui() {
vkDeviceWaitIdle(*impl::singleton->device);
impl::singleton->destroy_imgui();
impl::singleton->create_imgui();
}
Expand Down
6 changes: 4 additions & 2 deletions rvk/shader_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ void Shader_Loader::try_reload() {
Opt<Vec<u8, Files::Alloc>> data;
do {
data = shader.second.read();
shader.first = Shader{device.dup(), data->slice()};
callbacks_to_run.insert(reloads.get(token), {});
if(data.ok()) {
shader.first = Shader{device.dup(), data->slice()};
callbacks_to_run.insert(reloads.get(token), {});
}
} while(!data.ok());
}
}
Expand Down

0 comments on commit b830bc7

Please sign in to comment.