From 781b846a2cae4aa614bbddcc2c533a758105cc59 Mon Sep 17 00:00:00 2001 From: foxtacles Date: Sun, 5 Apr 2026 16:53:27 -0700 Subject: [PATCH] Fix Wayland crash during SDL3 GPU device enumeration (#773) (#795) --- miniwin/src/internal/d3drmrenderer_sdl3gpu.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/miniwin/src/internal/d3drmrenderer_sdl3gpu.h b/miniwin/src/internal/d3drmrenderer_sdl3gpu.h index 55f8233a..87dd50bd 100644 --- a/miniwin/src/internal/d3drmrenderer_sdl3gpu.h +++ b/miniwin/src/internal/d3drmrenderer_sdl3gpu.h @@ -120,19 +120,15 @@ class Direct3DRMSDL3GPURenderer : public Direct3DRMRenderer { inline static void Direct3DRMSDL3GPU_EnumDevice(LPD3DENUMDEVICESCALLBACK cb, void* ctx) { -#ifdef __APPLE__ - SDL_GPUDevice* device = SDL_CreateGPUDevice(SDL_GPU_SHADERFORMAT_MSL, false, nullptr); + SDL_GPUDevice* device = SDL_CreateGPUDevice( + SDL_GPU_SHADERFORMAT_SPIRV | SDL_GPU_SHADERFORMAT_DXBC | SDL_GPU_SHADERFORMAT_DXIL | SDL_GPU_SHADERFORMAT_MSL, + false, + nullptr + ); if (!device) { return; } SDL_DestroyGPUDevice(device); -#else - Direct3DRMRenderer* device = Direct3DRMSDL3GPURenderer::Create(640, 480); - if (!device) { - return; - } - device->Release(); -#endif D3DDEVICEDESC halDesc = {}; halDesc.dcmColorModel = D3DCOLOR_RGB;