steamcompmtr: Fix hacky blank texture in nested

This commit is contained in:
Joshua Ashton 2023-11-17 02:21:01 -08:00
parent f1646ee01e
commit abdc97e796

View file

@ -2542,29 +2542,32 @@ paint_all(bool async)
}
else
{
// HACK! HACK HACK HACK
// To avoid stutter when toggling the overlay on
int curLayer = frameInfo.layerCount++;
FrameInfo_t::Layer_t *layer = &frameInfo.layers[ curLayer ];
auto tex = vulkan_get_hacky_blank_texture();
if ( !BIsNested() && tex != nullptr )
{
// HACK! HACK HACK HACK
// To avoid stutter when toggling the overlay on
int curLayer = frameInfo.layerCount++;
layer->scale.x = g_nOutputWidth == tex->width() ? 1.0f : tex->width() / (float)g_nOutputWidth;
layer->scale.y = g_nOutputHeight == tex->height() ? 1.0f : tex->height() / (float)g_nOutputHeight;
layer->offset.x = 0.0f;
layer->offset.y = 0.0f;
layer->opacity = 1.0f; // BLAH
layer->zpos = g_zposOverlay;
layer->applyColorMgmt = g_ColorMgmt.pending.enabled;
FrameInfo_t::Layer_t *layer = &frameInfo.layers[ curLayer ];
layer->colorspace = GAMESCOPE_APP_TEXTURE_COLORSPACE_LINEAR;
layer->ctm = nullptr;
layer->tex = tex;
layer->fbid = tex->fbid();
layer->filter = GamescopeUpscaleFilter::NEAREST;
layer->blackBorder = true;
layer->scale.x = g_nOutputWidth == tex->width() ? 1.0f : tex->width() / (float)g_nOutputWidth;
layer->scale.y = g_nOutputHeight == tex->height() ? 1.0f : tex->height() / (float)g_nOutputHeight;
layer->offset.x = 0.0f;
layer->offset.y = 0.0f;
layer->opacity = 1.0f; // BLAH
layer->zpos = g_zposOverlay;
layer->applyColorMgmt = g_ColorMgmt.pending.enabled;
layer->colorspace = GAMESCOPE_APP_TEXTURE_COLORSPACE_LINEAR;
layer->ctm = nullptr;
layer->tex = tex;
layer->fbid = tex->fbid();
layer->filter = GamescopeUpscaleFilter::NEAREST;
layer->blackBorder = true;
}
}
if (notification)