mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-15 06:45:59 +01:00
renderer: safeguard against non-sampleable currentFB in blurMainFb
fixes #8325
This commit is contained in:
parent
5833abbbd1
commit
180c26ada6
2 changed files with 11 additions and 0 deletions
|
@ -97,12 +97,18 @@ void CFramebuffer::bind() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFramebuffer::release() {
|
void CFramebuffer::release() {
|
||||||
|
if (!m_iFbAllocated && !m_cTex)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Debug::log(TRACE, "fb {} released", m_iFb);
|
||||||
|
|
||||||
if (m_iFbAllocated)
|
if (m_iFbAllocated)
|
||||||
glDeleteFramebuffers(1, &m_iFb);
|
glDeleteFramebuffers(1, &m_iFb);
|
||||||
|
|
||||||
m_cTex.reset();
|
m_cTex.reset();
|
||||||
m_iFbAllocated = false;
|
m_iFbAllocated = false;
|
||||||
m_vSize = Vector2D();
|
m_vSize = Vector2D();
|
||||||
|
m_iFb = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
CFramebuffer::~CFramebuffer() {
|
CFramebuffer::~CFramebuffer() {
|
||||||
|
|
|
@ -1656,6 +1656,11 @@ void CHyprOpenGLImpl::renderTextureMatte(SP<CTexture> tex, CBox* pBox, CFramebuf
|
||||||
// Dual (or more) kawase blur
|
// Dual (or more) kawase blur
|
||||||
CFramebuffer* CHyprOpenGLImpl::blurMainFramebufferWithDamage(float a, CRegion* originalDamage) {
|
CFramebuffer* CHyprOpenGLImpl::blurMainFramebufferWithDamage(float a, CRegion* originalDamage) {
|
||||||
|
|
||||||
|
if (!m_RenderData.currentFB->getTexture()) {
|
||||||
|
Debug::log(ERR, "BUG THIS: null fb texture while attempting to blur main fb?! (introspection off?!)");
|
||||||
|
return &m_RenderData.pCurrentMonData->mirrorFB; // return something to sample from at least
|
||||||
|
}
|
||||||
|
|
||||||
TRACY_GPU_ZONE("RenderBlurMainFramebufferWithDamage");
|
TRACY_GPU_ZONE("RenderBlurMainFramebufferWithDamage");
|
||||||
|
|
||||||
const auto BLENDBEFORE = m_bBlend;
|
const auto BLENDBEFORE = m_bBlend;
|
||||||
|
|
Loading…
Reference in a new issue