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.
This commit is contained in:
baldurk
2023-06-12 14:28:24 +01:00
parent 505229b9a9
commit ea77ec746f
@@ -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