Skip to content

Commit

Permalink
Create stretch_pic renderpass in vkpt_draw_create_pipelines().
Browse files Browse the repository at this point in the history
Renderpass needs to be recreated when toggling HDR, so put it
into the init function that is called after a swapchain change.
  • Loading branch information
res2k committed Jan 9, 2025
1 parent 2612292 commit dd1f16f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/refresh/vkpt/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ vkpt_draw_initialize()
{
num_stretch_pics = 0;
LOG_FUNC();
create_render_pass();
for(int i = 0; i < MAX_FRAMES_IN_FLIGHT; i++) {
_VK(buffer_create(buf_stretch_pic_queue + i, sizeof(StretchPic_t) * MAX_STRETCH_PICS,
VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
Expand Down Expand Up @@ -475,6 +474,8 @@ vkpt_draw_create_pipelines()
{
LOG_FUNC();

create_render_pass();

assert(desc_set_layout_sbo);
VkDescriptorSetLayout desc_set_layouts[] = {
desc_set_layout_sbo, qvk.desc_set_layout_textures, desc_set_layout_ubo
Expand Down

0 comments on commit dd1f16f

Please sign in to comment.