EGL_KHR_platform_x11: wrong implementation in CreatePlatformWindowSurface()
Bug: b/168821209
Change-Id: I1892581045ec37abc4060cf4de2c45cb2fb6208a
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48568
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Caramelli <caramelli.devel@gmail.com>
diff --git a/src/OpenGL/libEGL/libEGL.cpp b/src/OpenGL/libEGL/libEGL.cpp
index f8a8879..ce2fe96 100644
--- a/src/OpenGL/libEGL/libEGL.cpp
+++ b/src/OpenGL/libEGL/libEGL.cpp
@@ -361,6 +361,10 @@
return EGL_NO_SURFACE;
}
+#if defined(USE_X11)
+ native_window = (void *)(*(::Window*)native_window);
+#endif
+
if(!display->isValidWindow((EGLNativeWindowType)native_window))
{
return error(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE);