drm: reject unimportable buffers early

This commit is contained in:
Vaxry 2024-06-26 22:25:13 +02:00
parent 13caeb2bd1
commit a03c2af877

View file

@ -982,6 +982,11 @@ bool Aquamarine::CDRMOutput::commitState(bool onlyTest) {
return false; return false;
} }
if (COMMITTED & COutputState::eOutputStateProperties::AQ_OUTPUT_STATE_BUFFER && STATE.buffer->attachments.has(AQ_ATTACHMENT_DRM_KMS_UNIMPORTABLE)) {
backend->backend->log(AQ_LOG_TRACE, "drm: Cannot commit a KMS-unimportable buffer.");
return false;
}
// If we are changing the rendering format, we may need to reconfigure the output (aka modeset) // If we are changing the rendering format, we may need to reconfigure the output (aka modeset)
// which may result in some glitches // which may result in some glitches
const bool NEEDS_RECONFIG = COMMITTED & const bool NEEDS_RECONFIG = COMMITTED &