Commit 77edad29 by Nicolas Capens Committed by Nicolas Capens

Remove the OpenGL ES 1.1 build target

Both the CMake and Android build targets are removed. This change leaves the actual code in place for now, to have smaller revert in case we need OpenGL ES 1.1 a little longer. Bug: b/147516027 Change-Id: I0ac044e61a601e43fbd7f727db2bfe7e9a4cabb3 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/53908 Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 4c0f888d
......@@ -142,7 +142,6 @@ endfunction()
option_if_not_defined(SWIFTSHADER_BUILD_EGL "Build the EGL library" TRUE)
option_if_not_defined(SWIFTSHADER_BUILD_GLESv2 "Build the OpenGL ES 2 library" TRUE)
option_if_not_defined(SWIFTSHADER_BUILD_GLES_CM "Build the OpenGL ES 1.1 library" TRUE)
option_if_not_defined(SWIFTSHADER_BUILD_VULKAN "Build the Vulkan library" TRUE)
option_if_not_defined(SWIFTSHADER_BUILD_WSI_WAYLAND "Build the Wayland WSI support" FALSE)
option_if_not_defined(SWIFTSHADER_BUILD_WSI_DIRECTFB "Build the DirectFB WSI support" FALSE)
......@@ -785,10 +784,6 @@ if(SWIFTSHADER_BUILD_GLESv2)
add_subdirectory(src/OpenGL/libGLESv2) # Add libGLESv2 target
endif()
if(SWIFTSHADER_BUILD_GLES_CM)
add_subdirectory(src/OpenGL/libGLES_CM) # Add libGLES_CM target
endif(SWIFTSHADER_BUILD_GLES_CM)
if(SWIFTSHADER_BUILD_VULKAN)
if (NOT TARGET SPIRV-Tools)
# This variable is also used by SPIRV-Tools to locate SPIRV-Headers
......
......@@ -57,7 +57,7 @@ The GLSL compiler is implemented in [src/OpenGL/compiler/](../src/OpenGL/compile
The [EGL](https://www.khronos.org/registry/egl/specs/eglspec.1.4.20110406.pdf) API is implemented in [src/OpenGL/libEGL/](../src/OpenGL/libEGL/). Its entry functions are listed in [libEGL.def](../src/OpenGL/libEGL/libEGL.def) (for Windows) and [libEGL.lds](../src/OpenGL/libEGL/libEGL.lds) (for Linux), and defined in [main.cpp](../src/OpenGL/libEGL/main.cpp) and implemented in [libEGL.cpp](../src/OpenGL/libEGL/libEGL.cpp). The [Display](../src/OpenGL/libEGL/Display.h), [Surface](../src/OpenGL/libEGL/Surface.h), and [Config](../src/OpenGL/libEGL/Config.h) classes are respective implementations of the abstract EGLDisplay, EGLSurface, and EGLConfig types.
[OpenGL ES 1.1](https://www.khronos.org/registry/gles/specs/1.1/es_full_spec_1.1.12.pdf) is implemented in [src/OpenGL/libGLES_CM/](../src/OpenGL/libGLES_CM/), while [OpenGL ES 2.0](https://www.khronos.org/registry/gles/specs/2.0/es_full_spec_2.0.25.pdf) is implemented in [src/OpenGL/libGLESv2/](../src/OpenGL/libGLESv2/). Note that while [OpenGL ES 3.0](https://www.khronos.org/registry/gles/specs/3.0/es_spec_3.0.0.pdf) functions are implemented in [libGLESv3.cpp](../src/OpenGL/libGLESv2/libGLESv3.cpp), it is compiled into the libGLESv2 library as standard among most implementations (some platforms have a libGLESv3 symbolically link to libGLESv2). We'll focus on OpenGL ES 2.0 in this documentation.
[OpenGL ES 2.0](https://www.khronos.org/registry/gles/specs/2.0/es_full_spec_2.0.25.pdf) is implemented in [src/OpenGL/libGLESv2/](../src/OpenGL/libGLESv2/). Note that while [OpenGL ES 3.0](https://www.khronos.org/registry/gles/specs/3.0/es_spec_3.0.0.pdf) functions are implemented in [libGLESv3.cpp](../src/OpenGL/libGLESv2/libGLESv3.cpp), it is compiled into the libGLESv2 library as standard among most implementations (some platforms have a libGLESv3 symbolically link to libGLESv2). We'll focus on OpenGL ES 2.0 in this documentation.
When the application calls an OpenGL function, it lands in the C entry functions at [main.cpp](../src/OpenGL/libGLESv2/main.cpp). It then gets dispatched to [libGLESv2.cpp](../src/OpenGL/libGLESv2/libGLESv2.cpp) functions in the es2 namespace. These functions obtain the thread's OpenGL context, and perform validation of the call's parameters. Most functions then call a corresponding [Context](../src/OpenGL/libGLESv2/Context.h) method to perform the call's main operations (changing state or queuing a draw task).
......@@ -413,58 +413,6 @@ cc_library_shared {
],
}
// libGLESv1_CM libraries
cc_defaults {
name: "libGLESv1_CM_swiftshader_defaults",
defaults: [ "libswiftshader" ],
cflags: [
"-DLOG_TAG=\"libGLES_CM_swiftshader\"",
"-DEGLAPI=",
"-DGL_API=",
"-DGL_APICALL=",
"-DGL_GLEXT_PROTOTYPES",
"-Wno-format",
],
srcs: [
"OpenGL/libGLES_CM/Buffer.cpp",
"OpenGL/libGLES_CM/Context.cpp",
"OpenGL/libGLES_CM/Device.cpp",
"OpenGL/libGLES_CM/Framebuffer.cpp",
"OpenGL/libGLES_CM/IndexDataManager.cpp",
"OpenGL/libGLES_CM/libGLES_CM.cpp",
"OpenGL/libGLES_CM/main.cpp",
"OpenGL/libGLES_CM/Renderbuffer.cpp",
"OpenGL/libGLES_CM/ResourceManager.cpp",
"OpenGL/libGLES_CM/Texture.cpp",
"OpenGL/libGLES_CM/utilities.cpp",
"OpenGL/libGLES_CM/VertexDataManager.cpp",
],
version_script: "OpenGL/libGLES_CM/libGLES_CM.lds",
}
cc_library_shared {
name: "libGLESv1_CM_swiftshader",
defaults: [
"libGLESv1_CM_swiftshader_defaults",
"swiftshader_client_libraries",
],
}
cc_library_shared {
name: "libGLESv1_CM_swiftshader_debug",
defaults: [
"libGLESv1_CM_swiftshader_defaults",
"swiftshader_client_libraries_debug",
],
}
// libGLESv2 libraries
cc_defaults {
......
# Copyright 2020 The SwiftShader Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set(ROOT_PROJECT_COMPILE_OPTIONS
${SWIFTSHADER_COMPILE_OPTIONS}
${WARNINGS_AS_ERRORS}
)
set(ROOT_PROJECT_LINK_LIBRARIES
${OS_LIBS}
${SWIFTSHADER_LIBS}
)
set(LIBGLES_CM_SRC_FILES
Buffer.cpp
Buffer.h
Context.cpp
Context.h
Device.cpp
Device.hpp
Framebuffer.cpp
Framebuffer.h
IndexDataManager.cpp
IndexDataManager.h
libGLES_CM.cpp
libGLES_CM.hpp
main.cpp
main.h
mathutil.h
Renderbuffer.cpp
Renderbuffer.h
resource.h
ResourceManager.cpp
ResourceManager.h
Texture.cpp
Texture.h
utilities.cpp
utilities.h
VertexDataManager.cpp
VertexDataManager.h
)
if(WIN32)
list(APPEND LIBGLES_CM_SRC_FILES
libGLES_CM.rc
)
endif()
add_library(libGLES_CM SHARED
${LIBGLES_CM_SRC_FILES}
)
set_target_properties(libGLES_CM PROPERTIES
POSITION_INDEPENDENT_CODE 1
FOLDER "OpenGL"
PREFIX ""
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
)
target_include_directories(libGLES_CM
PRIVATE
".."
"../.."
)
target_compile_definitions(libGLES_CM
PRIVATE
"GL_GLEXT_PROTOTYPES"
"EGLAPI="
"GL_API="
"GL_APICALL="
"GLAPI="
)
target_compile_options(libGLES_CM
PRIVATE
${ROOT_PROJECT_COMPILE_OPTIONS}
)
target_link_options(libGLES_CM
PUBLIC
${SWIFTSHADER_LINK_FLAGS}
)
target_link_libraries(libGLES_CM
PRIVATE
libGLESCommon
gl_swiftshader_core
${ROOT_PROJECT_LINK_LIBRARIES}
)
if (ANDROID)
set_target_properties(libGLES_CM PROPERTIES SUFFIX "_swiftshader.so")
endif ()
set_shared_library_export_map(libGLES_CM ${CMAKE_CURRENT_SOURCE_DIR})
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(LIB_PREFIX "lib64")
else()
set(LIB_PREFIX "lib")
endif()
add_custom_command(
TARGET libGLES_CM
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:libGLES_CM>/translator
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:libGLES_CM> $<TARGET_FILE_DIR:libGLES_CM>/translator/${LIB_PREFIX}GLES_CM_translator${CMAKE_SHARED_LIBRARY_SUFFIX}
)
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