From 07055bb5318b0291807ed2bc1411351f697ca106 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Wed, 8 Jul 2026 13:34:31 +0000 Subject: [PATCH] [Fix] (MG_Backend/DirectGLES): bind GL_DRAW_INDIRECT_BUFFER for native indirect draws Co-Authored-By: Claude Fable 5 --- MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp b/MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp index 72607ebb..8c5007e7 100644 --- a/MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp +++ b/MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp @@ -266,12 +266,13 @@ namespace MobileGL::MG_Backend::DirectGLES { } } - // Indirect Buffer Object + // Indirect Buffer Object - must also be bound to GL_DRAW_INDIRECT_BUFFER on the ES + // context since indirect draws now execute natively on the GPU. if (includeIndirectBuffer) { auto& possibleIndirectBuffer = MG_State::pGLContext->GetBufferBindingSlot(BufferTarget::DrawIndirect).GetBoundObject(); if (possibleIndirectBuffer) { - CreateAndSyncBufferObject(possibleIndirectBuffer); + SyncBoundBuffer(BufferTarget::DrawIndirect, GL_DRAW_INDIRECT_BUFFER); } }