From ea77ec746f4f1db6c3399fcd89e129750a761ccf Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 12 Jun 2023 14:28:24 +0100 Subject: [PATCH] Don't generate BGRA8 internal format for DX interop textures in GL * Proper GL doesn't seem to support this internal format, and fortunately the contents save/load work fine with GL's built-in swizzling if we treat the texture as RGBA8 instead. --- renderdoc/driver/gl/wrappers/gl_interop_funcs.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/renderdoc/driver/gl/wrappers/gl_interop_funcs.cpp b/renderdoc/driver/gl/wrappers/gl_interop_funcs.cpp index 4be4046bd..665a42170 100644 --- a/renderdoc/driver/gl/wrappers/gl_interop_funcs.cpp +++ b/renderdoc/driver/gl/wrappers/gl_interop_funcs.cpp @@ -269,6 +269,9 @@ bool WrappedOpenGL::Serialise_wglDXRegisterObjectNV(SerialiserType &ser, GLResou GetDXTextureProperties(dxObject, format, width, height, depth, mips, layers, samples); if(type != eGL_NONE) internalFormat = MakeGLFormat(format); + // desktop GL doesn't support BGRA8 as an internal format for some reason + if(internalFormat == eGL_BGRA8_EXT) + internalFormat = eGL_RGBA8; #else RDCERR("Should never happen - cannot serialise wglDXRegisterObjectNV, interop is disabled"); #endif