From a23e9a9bdfa745efe578442f180e1079602ad6b9 Mon Sep 17 00:00:00 2001 From: Richard Henninger <56615615+richen604@users.noreply.github.com> Date: Wed, 18 Dec 2024 07:01:56 -0800 Subject: [PATCH] drm: moved null check for renderer to shouldBlit() (#109) (#121) --- src/backend/drm/DRM.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/backend/drm/DRM.cpp b/src/backend/drm/DRM.cpp index 83b8aa5..3bd4daa 100644 --- a/src/backend/drm/DRM.cpp +++ b/src/backend/drm/DRM.cpp @@ -1419,11 +1419,6 @@ bool Aquamarine::CDRMOutput::commitState(bool onlyTest) { return false; } - if (!backend->rendererState.renderer) { - backend->backend->log(AQ_LOG_ERROR, "drm: No renderer attached to backend"); - return false; - } - const auto& STATE = state->state(); const uint32_t COMMITTED = STATE.committed; @@ -1522,6 +1517,11 @@ bool Aquamarine::CDRMOutput::commitState(bool onlyTest) { SP drmFB; if (backend->shouldBlit()) { + if (!backend->rendererState.renderer) { + backend->backend->log(AQ_LOG_ERROR, "drm: No renderer attached to backend when required for blitting"); + return false; + } + TRACE(backend->backend->log(AQ_LOG_TRACE, "drm: Backend requires blit, blitting")); if (!mgpu.swapchain) {