From 2f8d0d5f7e2cc8171586769f8b34c9068d599ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Tue, 16 Jun 2026 21:26:46 -0700 Subject: [PATCH] Validate depth attachments don't use BGFX_RESOLVE_AUTO_GEN_MIPS. Closes #2862. (#3764) --- src/bgfx.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/bgfx.cpp b/src/bgfx.cpp index 98727c0c0..5185376a5 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -4995,6 +4995,16 @@ namespace bgfx , ii , tr.m_flags ); + + BGFX_ERROR_CHECK( + 0 == (at.resolve & BGFX_RESOLVE_AUTO_GEN_MIPS) + , _err + , BGFX_ERROR_FRAME_BUFFER_VALIDATION + , "Frame buffer depth attachment cannot use `BGFX_RESOLVE_AUTO_GEN_MIPS`. Depth textures do not support MSAA resolve." + , "Attachment %d, resolve flags 0x%02x." + , ii + , at.resolve + ); } else {