Commit c47cd435 by Alexis Hetu Committed by Alexis Hétu

Non libX11 build fix

Reverted the portion of the following cl which broke the build: https://swiftshader-review.googlesource.com/c/SwiftShader/+/15909 Change-Id: I4a0e7ef5507dd5502861ccf34c400f1feb54b0cc Reviewed-on: https://swiftshader-review.googlesource.com/20228Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Tested-by: 's avatarAlexis Hétu <sugoi@google.com>
parent dd662d21
...@@ -1248,20 +1248,16 @@ EGLDisplay GetPlatformDisplay(EGLenum platform, void *native_display, const EGLA ...@@ -1248,20 +1248,16 @@ EGLDisplay GetPlatformDisplay(EGLenum platform, void *native_display, const EGLA
#if defined(__linux__) && !defined(__ANDROID__) #if defined(__linux__) && !defined(__ANDROID__)
switch(platform) switch(platform)
{ {
case EGL_PLATFORM_X11_EXT: #if defined(USE_X11)
case EGL_PLATFORM_GBM_KHR: case EGL_PLATFORM_X11_EXT: break;
break; #endif
case EGL_PLATFORM_GBM_KHR: break;
default: default:
return error(EGL_BAD_PARAMETER, EGL_NO_DISPLAY); return error(EGL_BAD_PARAMETER, EGL_NO_DISPLAY);
} }
if(platform == EGL_PLATFORM_X11_EXT) if(platform == EGL_PLATFORM_GBM_KHR)
{ {
if(!libX11)
{
return error(EGL_BAD_PARAMETER, EGL_NO_DISPLAY);
}
if(native_display != (void*)EGL_DEFAULT_DISPLAY) if(native_display != (void*)EGL_DEFAULT_DISPLAY)
{ {
return error(EGL_BAD_PARAMETER, EGL_NO_DISPLAY); // Unimplemented return error(EGL_BAD_PARAMETER, EGL_NO_DISPLAY); // Unimplemented
...@@ -1271,9 +1267,17 @@ EGLDisplay GetPlatformDisplay(EGLenum platform, void *native_display, const EGLA ...@@ -1271,9 +1267,17 @@ EGLDisplay GetPlatformDisplay(EGLenum platform, void *native_display, const EGLA
{ {
return error(EGL_BAD_ATTRIBUTE, EGL_NO_DISPLAY); // Unimplemented return error(EGL_BAD_ATTRIBUTE, EGL_NO_DISPLAY); // Unimplemented
} }
return success(HEADLESS_DISPLAY);
} }
else if(platform == EGL_PLATFORM_GBM_KHR) #if defined(USE_X11)
else if(platform == EGL_PLATFORM_X11_EXT)
{ {
if(!libX11)
{
return error(EGL_BAD_PARAMETER, EGL_NO_DISPLAY);
}
if(native_display != (void*)EGL_DEFAULT_DISPLAY) if(native_display != (void*)EGL_DEFAULT_DISPLAY)
{ {
return error(EGL_BAD_PARAMETER, EGL_NO_DISPLAY); // Unimplemented return error(EGL_BAD_PARAMETER, EGL_NO_DISPLAY); // Unimplemented
...@@ -1283,9 +1287,8 @@ EGLDisplay GetPlatformDisplay(EGLenum platform, void *native_display, const EGLA ...@@ -1283,9 +1287,8 @@ EGLDisplay GetPlatformDisplay(EGLenum platform, void *native_display, const EGLA
{ {
return error(EGL_BAD_ATTRIBUTE, EGL_NO_DISPLAY); // Unimplemented return error(EGL_BAD_ATTRIBUTE, EGL_NO_DISPLAY); // Unimplemented
} }
return success(HEADLESS_DISPLAY);
} }
#endif
return success(PRIMARY_DISPLAY); // We only support the default display return success(PRIMARY_DISPLAY); // We only support the default display
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment