rendervulkan: Pick right first partial composite image

This commit is contained in:
Joshua Ashton 2023-06-27 09:48:47 +01:00 committed by Joshie
parent 6a6df4ea95
commit 70626628f9
2 changed files with 18 additions and 2 deletions

View file

@ -42,6 +42,7 @@
#include "shaders/ffx_fsr1.h" #include "shaders/ffx_fsr1.h"
#include "shaders/descriptor_set_constants.h" #include "shaders/descriptor_set_constants.h"
extern bool g_bWasPartialComposite;
static constexpr mat3x4 g_rgb2yuv_srgb_to_bt601_limited = {{ static constexpr mat3x4 g_rgb2yuv_srgb_to_bt601_limited = {{
{ 0.257f, 0.504f, 0.098f, 0.0625f }, { 0.257f, 0.504f, 0.098f, 0.0625f },
@ -3587,9 +3588,24 @@ bool vulkan_composite( const struct FrameInfo_t *frameInfo, std::shared_ptr<CVul
if ( partial ) if ( partial )
{ {
g_output.nOutPresentImagePartial = g_output.nOutImagePartial; if ( !g_bWasPartialComposite )
{
g_output.nOutPresentImagePartial = g_output.nOutImage;
g_output.nOutImagePartial = g_output.nOutImage;
}
else
{
g_output.nOutPresentImagePartial = g_output.nOutImagePartial;
}
g_output.nOutImagePartial = ( g_output.nOutImagePartial + 1 ) % 3; g_output.nOutImagePartial = ( g_output.nOutImagePartial + 1 ) % 3;
} }
else
{
if (g_bWasPartialComposite)
{
g_output.nOutImage = ( g_output.nOutImagePartial + 1 ) % 3;
}
}
auto compositeImage = partial ? g_output.outputImagesPartialOverlay[ g_output.nOutImagePartial ] : g_output.outputImages[ g_output.nOutImage ]; auto compositeImage = partial ? g_output.outputImagesPartialOverlay[ g_output.nOutImagePartial ] : g_output.outputImages[ g_output.nOutImage ];

View file

@ -101,6 +101,7 @@
static LogScope xwm_log("xwm"); static LogScope xwm_log("xwm");
bool g_bWasPartialComposite = false;
/// ///
// Color Mgmt // Color Mgmt
@ -2433,7 +2434,6 @@ paint_all(bool async)
} }
bNeedsFullComposite |= !!(g_uCompositeDebug & CompositeDebugFlag::Heatmap); bNeedsFullComposite |= !!(g_uCompositeDebug & CompositeDebugFlag::Heatmap);
static bool g_bWasPartialComposite = false;
static int g_nLastSingleOverlayZPos = 0; static int g_nLastSingleOverlayZPos = 0;
if ( !bNeedsFullComposite && !bWantsPartialComposite ) if ( !bNeedsFullComposite && !bWantsPartialComposite )