Skip to content

Commit

Permalink
Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
sergcpp committed Nov 14, 2024
1 parent 18891c9 commit 5755d62
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/RendererVK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,8 @@ void Ray::Vk::Renderer::RenderScene(const SceneBase &scene, RegionContext &regio
VkCommandBufferBeginInfo begin_info = {VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO};
begin_info.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;

ctx_->api().vkBeginCommandBuffer(ctx_->draw_cmd_buf(ctx_->backend_frame), &begin_info);
CommandBuffer cmd_buf = ctx_->draw_cmd_buf(ctx_->backend_frame);
ctx_->api().vkBeginCommandBuffer(cmd_buf, &begin_info);
#endif

DebugMarker render_scene_marker(ctx_.get(), cmd_buf, "Ray::RenderScene");
Expand Down Expand Up @@ -863,8 +863,8 @@ void Ray::Vk::Renderer::DenoiseImage(const int pass, const RegionContext &region
VkCommandBufferBeginInfo begin_info = {VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO};
begin_info.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;

ctx_->api().vkBeginCommandBuffer(ctx_->draw_cmd_buf(ctx_->backend_frame), &begin_info);
cmd_buf = ctx_->draw_cmd_buf(ctx_->backend_frame);
ctx_->api().vkBeginCommandBuffer(cmd_buf, &begin_info);
#endif

ctx_->api().vkCmdResetQueryPool(cmd_buf, ctx_->query_pool(ctx_->backend_frame), 0, MaxTimestampQueries);
Expand Down Expand Up @@ -1268,8 +1268,8 @@ void Ray::Vk::Renderer::UpdateSpatialCache(const SceneBase &scene, RegionContext
VkCommandBufferBeginInfo begin_info = {VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO};
begin_info.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;

ctx_->api().vkBeginCommandBuffer(ctx_->draw_cmd_buf(ctx_->backend_frame), &begin_info);
CommandBuffer cmd_buf = ctx_->draw_cmd_buf(ctx_->backend_frame);
ctx_->api().vkBeginCommandBuffer(cmd_buf, &begin_info);
#endif

DebugMarker update_cache_marker(ctx_.get(), cmd_buf, "Ray::UpdateSpatialCache");
Expand Down Expand Up @@ -1538,8 +1538,8 @@ void Ray::Vk::Renderer::ResetSpatialCache(const SceneBase &scene,
VkCommandBufferBeginInfo begin_info = {VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO};
begin_info.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;

ctx_->api().vkBeginCommandBuffer(ctx_->draw_cmd_buf(ctx_->backend_frame), &begin_info);
CommandBuffer cmd_buf = ctx_->draw_cmd_buf(ctx_->backend_frame);
ctx_->api().vkBeginCommandBuffer(cmd_buf, &begin_info);
#endif

{ // Reset spatial cache
Expand Down

0 comments on commit 5755d62

Please sign in to comment.