mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2025-01-10 02:08:43 +00:00
Disable 10-bit SDR swapchains on Vulkan due to inconsistent dithering behavior
This commit is contained in:
parent
8aeb976128
commit
6a58dbb05e
1 changed files with 4 additions and 0 deletions
|
@ -251,6 +251,9 @@ bool PlVkRenderer::initialize(PDECODER_PARAMETERS params)
|
||||||
vkSwapchainParams.surface = m_VkSurface;
|
vkSwapchainParams.surface = m_VkSurface;
|
||||||
vkSwapchainParams.present_mode = presentMode;
|
vkSwapchainParams.present_mode = presentMode;
|
||||||
vkSwapchainParams.swapchain_depth = 1; // No queued frames
|
vkSwapchainParams.swapchain_depth = 1; // No queued frames
|
||||||
|
#if PL_API_VER >= 338
|
||||||
|
vkSwapchainParams.disable_10bit_sdr = true; // Some drivers don't dither 10-bit SDR output correctly
|
||||||
|
#endif
|
||||||
m_Swapchain = pl_vulkan_create_swapchain(m_Vulkan, &vkSwapchainParams);
|
m_Swapchain = pl_vulkan_create_swapchain(m_Vulkan, &vkSwapchainParams);
|
||||||
if (m_Swapchain == nullptr) {
|
if (m_Swapchain == nullptr) {
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
|
@ -511,6 +514,7 @@ void PlVkRenderer::renderFrame(AVFrame *frame)
|
||||||
if (!pl_render_image(m_Renderer, &mappedFrame, &targetFrame, &pl_render_fast_params)) {
|
if (!pl_render_image(m_Renderer, &mappedFrame, &targetFrame, &pl_render_fast_params)) {
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
"pl_render_image() failed");
|
"pl_render_image() failed");
|
||||||
|
// NB: We must fallthrough to call pl_swapchain_submit_frame()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Submit the frame for display and swap buffers
|
// Submit the frame for display and swap buffers
|
||||||
|
|
Loading…
Reference in a new issue