Eliminate the OpenGL ES 1.1 implementation SwiftShader's OpenGL ES support is deprecated in favor of the Vulkan implementation, with ANGLE providing backward compatibility for GLES use cases. There are no known uses of our OpenGL ES 1.1 implementation left, so this change removes its code entirely. Bug: b/147516027 Change-Id: I72bcd7a648df435bd5c00caf3b4bb35965a0c116 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/53909 Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by: Nicolas Capens <nicolascapens@google.com> Reviewed-by: Alexis Hétu <sugoi@google.com>
diff --git a/src/OpenGL/libEGL/Config.cpp b/src/OpenGL/libEGL/Config.cpp index 62dc92f..17d219c 100644 --- a/src/OpenGL/libEGL/Config.cpp +++ b/src/OpenGL/libEGL/Config.cpp
@@ -26,11 +26,11 @@ #include <system/graphics.h> #endif -#include <string.h> #include <algorithm> #include <cstring> -#include <vector> #include <map> +#include <string.h> +#include <vector> using namespace std; @@ -123,7 +123,7 @@ mColorBufferType = EGL_RGB_BUFFER; mConfigCaveat = EGL_NONE; mConfigID = 0; - mConformant = EGL_OPENGL_ES_BIT | EGL_OPENGL_ES2_BIT | EGL_OPENGL_ES3_BIT; + mConformant = EGL_OPENGL_ES2_BIT | EGL_OPENGL_ES3_BIT; switch(depthStencilFormat) { @@ -180,7 +180,7 @@ mMinSwapInterval = minInterval; mNativeRenderable = EGL_FALSE; mNativeVisualType = 0; - mRenderableType = EGL_OPENGL_ES_BIT | EGL_OPENGL_ES2_BIT | EGL_OPENGL_ES3_BIT; + mRenderableType = EGL_OPENGL_ES2_BIT | EGL_OPENGL_ES3_BIT; mSampleBuffers = (multiSample > 0) ? 1 : 0; mSamples = multiSample; mSurfaceType = EGL_PBUFFER_BIT | EGL_WINDOW_BIT | EGL_SWAP_BEHAVIOR_PRESERVED_BIT | EGL_MULTISAMPLE_RESOLVE_BOX_BIT;
diff --git a/src/OpenGL/libEGL/Display.cpp b/src/OpenGL/libEGL/Display.cpp index 5138b60..ed4b77e 100644 --- a/src/OpenGL/libEGL/Display.cpp +++ b/src/OpenGL/libEGL/Display.cpp
@@ -18,18 +18,18 @@ #include "Display.h" -#include "main.h" -#include "libEGL/Surface.hpp" -#include "libEGL/Context.hpp" +#include "Common/RecursiveLock.hpp" #include "common/Image.hpp" #include "common/debug.h" -#include "Common/RecursiveLock.hpp" +#include "libEGL/Context.hpp" +#include "libEGL/Surface.hpp" +#include "main.h" #if defined(__ANDROID__) && !defined(ANDROID_NDK_BUILD) -#include <vndk/window.h> -#include <sys/ioctl.h> -#include <linux/fb.h> #include <fcntl.h> +#include <linux/fb.h> +#include <sys/ioctl.h> +#include <vndk/window.h> #elif defined(USE_X11) #include "Main/libX11.hpp" #elif defined(__APPLE__) @@ -39,8 +39,8 @@ #endif #include <algorithm> -#include <vector> #include <map> +#include <vector> namespace egl { @@ -569,15 +569,8 @@ const egl::Config *config = mConfigSet.get(configHandle); egl::Context *context = nullptr; - if(clientVersion == 1 && config->mRenderableType & EGL_OPENGL_ES_BIT) - { - if(libGLES_CM) - { - context = libGLES_CM->es1CreateContext(this, shareContext, config); - } - } - else if((clientVersion == 2 && config->mRenderableType & EGL_OPENGL_ES2_BIT) || - (clientVersion == 3 && config->mRenderableType & EGL_OPENGL_ES3_BIT)) + if((clientVersion == 2 && config->mRenderableType & EGL_OPENGL_ES2_BIT) || + (clientVersion == 3 && config->mRenderableType & EGL_OPENGL_ES3_BIT)) { if(libGLESv2) {
diff --git a/src/OpenGL/libEGL/Surface.cpp b/src/OpenGL/libEGL/Surface.cpp index f93065a..f04887e 100644 --- a/src/OpenGL/libEGL/Surface.cpp +++ b/src/OpenGL/libEGL/Surface.cpp
@@ -18,13 +18,13 @@ #include "Surface.hpp" -#include "main.h" +#include "Context.hpp" #include "Display.h" +#include "Main/FrameBuffer.hpp" #include "Texture.hpp" #include "common/Image.hpp" -#include "Context.hpp" #include "common/debug.h" -#include "Main/FrameBuffer.hpp" +#include "main.h" #if defined(USE_X11) #include "Main/libX11.hpp" @@ -77,10 +77,6 @@ backBuffer = libGLESv2->createBackBuffer(width, height, config->mRenderTargetFormat, config->mSamples); } } - else if(libGLES_CM) - { - backBuffer = libGLES_CM->createBackBuffer(width, height, config->mRenderTargetFormat, config->mSamples); - } if(!backBuffer) { @@ -95,10 +91,6 @@ { depthStencil = libGLESv2->createDepthStencil(width, height, config->mDepthStencilFormat, config->mSamples); } - else if(libGLES_CM) - { - depthStencil = libGLES_CM->createDepthStencil(width, height, config->mDepthStencilFormat, config->mSamples); - } if(!depthStencil) { @@ -409,10 +401,6 @@ { frameBuffer = libGLESv2->createFrameBuffer(display->getNativeDisplay(), window, width, height); } - else if(libGLES_CM) - { - frameBuffer = libGLES_CM->createFrameBuffer(display->getNativeDisplay(), window, width, height); - } if(!frameBuffer) {
diff --git a/src/OpenGL/libEGL/libEGL.cpp b/src/OpenGL/libEGL/libEGL.cpp index c38cb7e..ca8bfa3 100644 --- a/src/OpenGL/libEGL/libEGL.cpp +++ b/src/OpenGL/libEGL/libEGL.cpp
@@ -14,14 +14,14 @@ // libEGL.cpp: Implements the exported EGL functions. -#include "main.h" +#include "Common/Version.h" +#include "Context.hpp" #include "Display.h" #include "Surface.hpp" #include "Texture.hpp" -#include "Context.hpp" #include "common/Image.hpp" #include "common/debug.h" -#include "Common/Version.h" +#include "main.h" #if defined(__ANDROID__) && !defined(ANDROID_NDK_BUILD) #include <vndk/window.h> @@ -30,8 +30,8 @@ #endif #include <algorithm> -#include <vector> #include <string.h> +#include <vector> namespace egl { @@ -1615,12 +1615,6 @@ if(proc) return success(proc); } - if(libGLES_CM) - { - __eglMustCastToProperFunctionPointerType proc = libGLES_CM->es1GetProcAddress(procname); - if(proc) return success(proc); - } - return success((__eglMustCastToProperFunctionPointerType)NULL); } }
diff --git a/src/OpenGL/libEGL/main.cpp b/src/OpenGL/libEGL/main.cpp index d5cbddb..65a052e 100644 --- a/src/OpenGL/libEGL/main.cpp +++ b/src/OpenGL/libEGL/main.cpp
@@ -16,15 +16,15 @@ #include "main.h" -#include "libEGL.hpp" #include "Context.hpp" -#include "Surface.hpp" #include "Display.h" +#include "Surface.hpp" +#include "libEGL.hpp" -#include "resource.h" -#include "Common/Thread.hpp" #include "Common/SharedLibrary.hpp" +#include "Common/Thread.hpp" #include "common/debug.h" +#include "resource.h" #include <EGL/eglext.h> @@ -720,5 +720,4 @@ return &libEGL; } -LibGLES_CM libGLES_CM; LibGLESv2 libGLESv2;
diff --git a/src/OpenGL/libEGL/main.h b/src/OpenGL/libEGL/main.h index a2a8f44..1667a69 100644 --- a/src/OpenGL/libEGL/main.h +++ b/src/OpenGL/libEGL/main.h
@@ -17,7 +17,6 @@ #ifndef LIBEGL_MAIN_H_ #define LIBEGL_MAIN_H_ -#include "libGLES_CM/libGLES_CM.hpp" #include "libGLESv2/libGLESv2.hpp" #include <EGL/egl.h> @@ -76,7 +75,6 @@ } } -extern LibGLES_CM libGLES_CM; extern LibGLESv2 libGLESv2; #endif // LIBEGL_MAIN_H_