From ad626025d5a88af19079a66d15ab3515ac4983b9 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Tue, 8 Jul 2025 15:41:10 +0800 Subject: [PATCH] [Fix] (Diligent/Init): request NativeMultiDraw feature --- MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp b/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp index 0b36c447..3103daa5 100644 --- a/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp +++ b/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp @@ -734,6 +734,7 @@ namespace MG_EGL::Diligent { MG_Diligent::g_pFactory = pFactoryVk; ::Diligent::EngineVkCreateInfo EngineCI; EngineCI.DynamicHeapSize = 512 << 20; + EngineCI.Features.NativeMultiDraw = DEVICE_FEATURE_STATE_OPTIONAL; MG_Util::Debug::LogD("Creating Vulkan device and contexts"); pFactoryVk->CreateDeviceAndContextsVk( @@ -757,7 +758,8 @@ namespace MG_EGL::Diligent { default: apiVersion = ""; } - MG_Util::Debug::LogD("Running on %s, %s", MG_Diligent::g_pDevice->GetAdapterInfo().Description, apiVersion.c_str()); + MG_Util::Debug::LogI("Running on %s, %s", MG_Diligent::g_pDevice->GetAdapterInfo().Description, apiVersion.c_str()); + MG_Util::Debug::LogI("NativeMultiDraw is%s supported.", (MG_Diligent::g_pDevice->GetDeviceInfo().Features.NativeMultiDraw != DEVICE_FEATURE_STATE_DISABLED) ? " " : " not"); } else { MG_Util::Debug::LogE("Failed to create Vulkan device"); }