Skip to content

Commit

Permalink
remove hacky texture
Browse files Browse the repository at this point in the history
This will use more hardware planes, causing some devices to composite yeilding lower framerates
  • Loading branch information
honjow authored and honjow committed Apr 7, 2024
1 parent 01dba53 commit 8bd4a89
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions src/steamcompmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2522,35 +2522,6 @@ paint_all(bool async)
if ( overlay == global_focus.inputFocusWindow )
update_touch_scaling( &frameInfo );
}
else if ( !GetBackend()->UsesVulkanSwapchain() && GetBackend()->IsSessionBased() )
{
auto tex = vulkan_get_hacky_blank_texture();
if ( tex != nullptr )
{
// HACK! HACK HACK HACK
// To avoid stutter when toggling the overlay on
int curLayer = frameInfo.layerCount++;

FrameInfo_t::Layer_t *layer = &frameInfo.layers[ curLayer ];


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->pBackendFb = tex->GetBackendFb().get();

layer->filter = GamescopeUpscaleFilter::NEAREST;
layer->blackBorder = true;
}
}

if (notification)
{
Expand Down

0 comments on commit 8bd4a89

Please sign in to comment.