Skip to content

Commit 0a1170f

Browse files
Fixed HDR Vulkan bugs
Fixed bug where builtin scanlines were not being turned off when certain shaders are loaded Fixed bug where shaders were turned off the builtin HDR shader was not applied
1 parent 65df1c4 commit 0a1170f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

gfx/drivers/vulkan.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3206,7 +3206,7 @@ static bool vulkan_init_default_filter_chain(vk_t *vk)
32063206
{
32073207
vulkan_set_hdr_inverse_tonemap(vk, vk->filter_chain_default, true);
32083208
vulkan_set_hdr10(vk, vk->filter_chain_default, true);
3209-
vulkan_filter_chain_set_subpixel_layout(vk->filter_chain_default, 0.0f);
3209+
vulkan_filter_chain_set_scanlines(vk->filter_chain_default, 0.0f);
32103210
settings->bools.video_hdr_scanlines = false;
32113211
vk->flags |= VK_FLAG_SHOULD_RESIZE;
32123212
}
@@ -4770,6 +4770,7 @@ static bool vulkan_frame(void *data, const void *frame,
47704770
? vulkan_filter_chain_get_pass_rt_format(filter_chain, shader_preset->passes - 1)
47714771
: vk->context->swapchain_format;
47724772
bool use_main_buffer = vulkan_is_hdr10_format(back_buffer_format) &&
4773+
(shader_preset && shader_preset->passes) &&
47734774
(filter_chain && !vulkan_filter_chain_emits_hdr10(filter_chain)); /* this is used when presets use scale_type in their last pass */
47744775
#endif /* VULKAN_HDR_SWAPCHAIN */
47754776

0 commit comments

Comments
 (0)