Commit 8d412db2 by Jamie Madill Committed by Commit Bot

Revert "Convert unordered_map to absl::flat_hash_map for select files"

This reverts commit 1acaf4ec. Reason for revert: Fails when is_component_build is not set: lld-link: error: <root>: undefined symbol: public: __cdecl absl::Condition::Condition<struct std::__1::atomic<bool> const>(bool (__cdecl *)(struct std::__1::atomic<bool> const *), struct std::__1::atomic<bool> const *) <snip> Original change's description: > Convert unordered_map to absl::flat_hash_map for select files > > This is the initial CL to start migrating to abseil in various places: > - formatutils.h > - FramebufferVk.h > - Program.h > - ProgramExecutableVk.h > - RewriteRowMajorMatrices.cpp > > This intentionally hits a couple different places in the code to make > sure the abseil dependencies are added to the required targets. > > Bug: angleproject:4873 > Change-Id: I68c7d067b6912b0cc0ecde231501dbed92f0b189 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2321735 > Commit-Queue: Tim Van Patten <timvp@google.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Charlie Lao <cclao@google.com> TBR=timvp@google.com,jmadill@chromium.org,cclao@google.com Change-Id: I75041532fc5126b4c7cc5e0d4529883fb357e05b No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:4873 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2383870Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent f71283c9
...@@ -221,10 +221,7 @@ config("includes_config") { ...@@ -221,10 +221,7 @@ config("includes_config") {
angle_source_set("includes") { angle_source_set("includes") {
sources = libangle_includes sources = libangle_includes
public_configs = [ public_configs = [ ":includes_config" ]
":angle_abseil_config",
":includes_config",
]
} }
angle_static_library("preprocessor") { angle_static_library("preprocessor") {
...@@ -464,7 +461,6 @@ angle_static_library("translator") { ...@@ -464,7 +461,6 @@ angle_static_library("translator") {
public_configs += [ ":external_config" ] public_configs += [ ":external_config" ]
deps = [ deps = [
":angle_abseil",
":includes", ":includes",
":preprocessor", ":preprocessor",
] ]
...@@ -596,7 +592,6 @@ config("libANGLE_config") { ...@@ -596,7 +592,6 @@ config("libANGLE_config") {
angle_source_set("libANGLE_headers") { angle_source_set("libANGLE_headers") {
sources = libangle_headers sources = libangle_headers
deps = [ ":angle_abseil" ]
public_deps = [ public_deps = [
":angle_common", ":angle_common",
":angle_translator_headers", ":angle_translator_headers",
...@@ -612,7 +607,6 @@ if (angle_enable_vulkan || angle_enable_metal) { ...@@ -612,7 +607,6 @@ if (angle_enable_vulkan || angle_enable_metal) {
"src/libANGLE/renderer/glslang_wrapper_utils.h", "src/libANGLE/renderer/glslang_wrapper_utils.h",
] ]
deps = [ deps = [
":angle_abseil",
":libANGLE_headers", ":libANGLE_headers",
"${angle_glslang_dir}:glslang_default_resource_limits_sources", "${angle_glslang_dir}:glslang_default_resource_limits_sources",
"${angle_glslang_dir}:glslang_lib_sources", "${angle_glslang_dir}:glslang_lib_sources",
...@@ -640,7 +634,6 @@ angle_source_set("libANGLE_base") { ...@@ -640,7 +634,6 @@ angle_source_set("libANGLE_base") {
":translator", ":translator",
] ]
deps = [ deps = [
":angle_abseil",
":angle_compression", ":angle_compression",
":angle_image_util", ":angle_image_util",
":includes", ":includes",
...@@ -786,7 +779,7 @@ angle_source_set("libANGLE") { ...@@ -786,7 +779,7 @@ angle_source_set("libANGLE") {
sources = [ "src/libANGLE/FrameCapture_mock.cpp" ] sources = [ "src/libANGLE/FrameCapture_mock.cpp" ]
# gl_enum_utils defaults included in with_capture build # gl_enum_utils defaults included in with_capture build
deps = [ ":angle_abseil" ] deps = []
if (angle_enable_trace || is_debug) { if (angle_enable_trace || is_debug) {
deps += [ ":angle_gl_enum_utils" ] deps += [ ":angle_gl_enum_utils" ]
} }
...@@ -800,25 +793,6 @@ angle_source_set("angle_gl_enum_utils") { ...@@ -800,25 +793,6 @@ angle_source_set("angle_gl_enum_utils") {
] ]
} }
config("angle_abseil_config") {
configs = [
"//third_party/abseil-cpp:absl_define_config",
"//third_party/abseil-cpp:absl_include_config",
]
}
group("angle_abseil") {
# When build_with_chromium=true we need to include "//third_party/abseil-cpp:absl" while
# we can be more specific when building standalone ANGLE.
if (build_with_chromium) {
public_deps = [ "//third_party/abseil-cpp:absl" ]
} else {
public_deps = [ "//third_party/abseil-cpp/absl/container:flat_hash_map" ]
}
public_configs = [ ":angle_abseil_config" ]
}
config("angle_compression_config") { config("angle_compression_config") {
include_dirs = [ "//third_party/zlib/google" ] include_dirs = [ "//third_party/zlib/google" ]
} }
......
...@@ -180,7 +180,6 @@ assert INCLUDE_REGEX.match(b'\n#include "foo"') ...@@ -180,7 +180,6 @@ assert INCLUDE_REGEX.match(b'\n#include "foo"')
# #includes in #ifdefs properly, so they will erroneously be marked as being # #includes in #ifdefs properly, so they will erroneously be marked as being
# included, but not part of the source list. # included, but not part of the source list.
IGNORED_INCLUDES = { IGNORED_INCLUDES = {
b'absl/container/flat_hash_map.h',
b'compiler/translator/TranslatorESSL.h', b'compiler/translator/TranslatorESSL.h',
b'compiler/translator/TranslatorGLSL.h', b'compiler/translator/TranslatorGLSL.h',
b'compiler/translator/TranslatorHLSL.h', b'compiler/translator/TranslatorHLSL.h',
...@@ -225,7 +224,6 @@ IGNORED_INCLUDE_PREFIXES = { ...@@ -225,7 +224,6 @@ IGNORED_INCLUDE_PREFIXES = {
} }
IGNORED_DIRECTORIES = { IGNORED_DIRECTORIES = {
'//third_party/abseil-cpp',
'//third_party/SwiftShader', '//third_party/SwiftShader',
'//third_party/vulkan-headers', '//third_party/vulkan-headers',
'//third_party/vulkan-loader', '//third_party/vulkan-loader',
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
#include "compiler/translator/tree_ops/RewriteRowMajorMatrices.h" #include "compiler/translator/tree_ops/RewriteRowMajorMatrices.h"
#include "absl/container/flat_hash_map.h"
#include "compiler/translator/Compiler.h" #include "compiler/translator/Compiler.h"
#include "compiler/translator/ImmutableStringBuilder.h" #include "compiler/translator/ImmutableStringBuilder.h"
#include "compiler/translator/StaticType.h" #include "compiler/translator/StaticType.h"
...@@ -187,7 +185,7 @@ TOperator GetIndexOp(TIntermNode *node) ...@@ -187,7 +185,7 @@ TOperator GetIndexOp(TIntermNode *node)
} }
bool IsConvertedField(TIntermTyped *indexNode, bool IsConvertedField(TIntermTyped *indexNode,
const absl::flat_hash_map<const TField *, bool> &convertedFields) const std::unordered_map<const TField *, bool> &convertedFields)
{ {
TIntermBinary *asBinary = indexNode->getAsBinaryNode(); TIntermBinary *asBinary = indexNode->getAsBinaryNode();
if (asBinary == nullptr) if (asBinary == nullptr)
...@@ -534,9 +532,9 @@ class RewriteRowMajorMatricesTraverser : public TIntermTraverser ...@@ -534,9 +532,9 @@ class RewriteRowMajorMatricesTraverser : public TIntermTraverser
TIntermSequence *getStructCopyFunctions() { return &mOuterPass.copyFunctionDefinitions; } TIntermSequence *getStructCopyFunctions() { return &mOuterPass.copyFunctionDefinitions; }
private: private:
using StructMap = absl::flat_hash_map<const TStructure *, StructConversionData>; typedef std::unordered_map<const TStructure *, StructConversionData> StructMap;
using InterfaceBlockMap = absl::flat_hash_map<const TVariable *, TVariable *>; typedef std::unordered_map<const TVariable *, TVariable *> InterfaceBlockMap;
using InterfaceBlockFieldConverted = absl::flat_hash_map<const TField *, bool>; typedef std::unordered_map<const TField *, bool> InterfaceBlockFieldConverted;
RewriteRowMajorMatricesTraverser( RewriteRowMajorMatricesTraverser(
TSymbolTable *symbolTable, TSymbolTable *symbolTable,
......
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "absl/container/flat_hash_map.h"
#include "common/Optional.h" #include "common/Optional.h"
#include "common/angleutils.h" #include "common/angleutils.h"
#include "common/mathutil.h" #include "common/mathutil.h"
...@@ -174,12 +172,12 @@ class ProgramBindings final : angle::NonCopyable ...@@ -174,12 +172,12 @@ class ProgramBindings final : angle::NonCopyable
int getBindingByName(const std::string &name) const; int getBindingByName(const std::string &name) const;
int getBinding(const sh::ShaderVariable &variable) const; int getBinding(const sh::ShaderVariable &variable) const;
using const_iterator = absl::flat_hash_map<std::string, GLuint>::const_iterator; using const_iterator = std::unordered_map<std::string, GLuint>::const_iterator;
const_iterator begin() const; const_iterator begin() const;
const_iterator end() const; const_iterator end() const;
private: private:
absl::flat_hash_map<std::string, GLuint> mBindings; std::unordered_map<std::string, GLuint> mBindings;
}; };
// Uniforms and Fragment Outputs require special treatment due to array notation (e.g., "[0]") // Uniforms and Fragment Outputs require special treatment due to array notation (e.g., "[0]")
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
#include <cstddef> #include <cstddef>
#include <ostream> #include <ostream>
#include "absl/container/flat_hash_map.h"
#include "angle_gl.h" #include "angle_gl.h"
#include "common/android_util.h" #include "common/android_util.h"
#include "libANGLE/Caps.h" #include "libANGLE/Caps.h"
...@@ -276,7 +274,7 @@ void MaybeOverrideLuminance(GLenum &format, GLenum &type, GLenum actualFormat, G ...@@ -276,7 +274,7 @@ void MaybeOverrideLuminance(GLenum &format, GLenum &type, GLenum actualFormat, G
typedef std::set<GLenum> FormatSet; typedef std::set<GLenum> FormatSet;
const FormatSet &GetAllSizedInternalFormats(); const FormatSet &GetAllSizedInternalFormats();
typedef absl::flat_hash_map<GLenum, absl::flat_hash_map<GLenum, InternalFormat>> typedef std::unordered_map<GLenum, std::unordered_map<GLenum, InternalFormat>>
InternalFormatInfoMap; InternalFormatInfoMap;
const InternalFormatInfoMap &GetInternalFormatMap(); const InternalFormatInfoMap &GetInternalFormatMap();
......
...@@ -195,7 +195,6 @@ angle_source_set("angle_vulkan_backend") { ...@@ -195,7 +195,6 @@ angle_source_set("angle_vulkan_backend") {
libs = [] libs = []
deps = [ deps = [
":angle_vk_mem_alloc_wrapper", ":angle_vk_mem_alloc_wrapper",
"$angle_root:angle_abseil",
"$angle_root:angle_compression", "$angle_root:angle_compression",
"$angle_root:angle_gpu_info_util", "$angle_root:angle_gpu_info_util",
"$angle_root:angle_image_util", "$angle_root:angle_image_util",
......
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
#ifndef LIBANGLE_RENDERER_VULKAN_FRAMEBUFFERVK_H_ #ifndef LIBANGLE_RENDERER_VULKAN_FRAMEBUFFERVK_H_
#define LIBANGLE_RENDERER_VULKAN_FRAMEBUFFERVK_H_ #define LIBANGLE_RENDERER_VULKAN_FRAMEBUFFERVK_H_
#include "absl/container/flat_hash_map.h"
#include "libANGLE/renderer/FramebufferImpl.h" #include "libANGLE/renderer/FramebufferImpl.h"
#include "libANGLE/renderer/RenderTargetCache.h" #include "libANGLE/renderer/RenderTargetCache.h"
#include "libANGLE/renderer/vulkan/BufferVk.h" #include "libANGLE/renderer/vulkan/BufferVk.h"
...@@ -257,7 +255,7 @@ class FramebufferVk : public FramebufferImpl ...@@ -257,7 +255,7 @@ class FramebufferVk : public FramebufferImpl
gl::DrawBufferMask mEmulatedAlphaAttachmentMask; gl::DrawBufferMask mEmulatedAlphaAttachmentMask;
vk::FramebufferDesc mCurrentFramebufferDesc; vk::FramebufferDesc mCurrentFramebufferDesc;
absl::flat_hash_map<vk::FramebufferDesc, vk::FramebufferHelper> mFramebufferCache; std::unordered_map<vk::FramebufferDesc, vk::FramebufferHelper> mFramebufferCache;
vk::ClearValuesArray mDeferredClears; vk::ClearValuesArray mDeferredClears;
}; };
......
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
#ifndef LIBANGLE_RENDERER_VULKAN_PROGRAMEXECUTABLEVK_H_ #ifndef LIBANGLE_RENDERER_VULKAN_PROGRAMEXECUTABLEVK_H_
#define LIBANGLE_RENDERER_VULKAN_PROGRAMEXECUTABLEVK_H_ #define LIBANGLE_RENDERER_VULKAN_PROGRAMEXECUTABLEVK_H_
#include "absl/container/flat_hash_map.h"
#include "common/bitset_utils.h" #include "common/bitset_utils.h"
#include "common/utilities.h" #include "common/utilities.h"
#include "libANGLE/Context.h" #include "libANGLE/Context.h"
...@@ -226,8 +224,8 @@ class ProgramExecutableVk ...@@ -226,8 +224,8 @@ class ProgramExecutableVk
size_t mNumDefaultUniformDescriptors; size_t mNumDefaultUniformDescriptors;
vk::BufferSerial mCurrentDefaultUniformBufferSerial; vk::BufferSerial mCurrentDefaultUniformBufferSerial;
absl::flat_hash_map<vk::UniformsAndXfbDesc, VkDescriptorSet> mUniformsAndXfbDescriptorSetCache; std::unordered_map<vk::UniformsAndXfbDesc, VkDescriptorSet> mUniformsAndXfbDescriptorSetCache;
absl::flat_hash_map<vk::TextureDescriptorDesc, VkDescriptorSet> mTextureDescriptorsCache; std::unordered_map<vk::TextureDescriptorDesc, VkDescriptorSet> mTextureDescriptorsCache;
// We keep a reference to the pipeline and descriptor set layouts. This ensures they don't get // We keep a reference to the pipeline and descriptor set layouts. This ensures they don't get
// deleted while this program is in use. // deleted while this program is in use.
......
...@@ -238,9 +238,13 @@ libangle_headers = [ ...@@ -238,9 +238,13 @@ libangle_headers = [
"src/libANGLE/MemoryObject.h", "src/libANGLE/MemoryObject.h",
"src/libANGLE/MemoryProgramCache.h", "src/libANGLE/MemoryProgramCache.h",
"src/libANGLE/Observer.h", "src/libANGLE/Observer.h",
"src/libANGLE/Overlay.cpp",
"src/libANGLE/Overlay.h", "src/libANGLE/Overlay.h",
"src/libANGLE/OverlayWidgets.cpp",
"src/libANGLE/OverlayWidgets.h", "src/libANGLE/OverlayWidgets.h",
"src/libANGLE/Overlay_autogen.cpp",
"src/libANGLE/Overlay_autogen.h", "src/libANGLE/Overlay_autogen.h",
"src/libANGLE/Overlay_font_autogen.cpp",
"src/libANGLE/Overlay_font_autogen.h", "src/libANGLE/Overlay_font_autogen.h",
"src/libANGLE/Program.h", "src/libANGLE/Program.h",
"src/libANGLE/ProgramExecutable.h", "src/libANGLE/ProgramExecutable.h",
...@@ -379,10 +383,6 @@ libangle_sources = [ ...@@ -379,10 +383,6 @@ libangle_sources = [
"src/libANGLE/MemoryObject.cpp", "src/libANGLE/MemoryObject.cpp",
"src/libANGLE/MemoryProgramCache.cpp", "src/libANGLE/MemoryProgramCache.cpp",
"src/libANGLE/Observer.cpp", "src/libANGLE/Observer.cpp",
"src/libANGLE/Overlay.cpp",
"src/libANGLE/OverlayWidgets.cpp",
"src/libANGLE/Overlay_autogen.cpp",
"src/libANGLE/Overlay_font_autogen.cpp",
"src/libANGLE/Platform.cpp", "src/libANGLE/Platform.cpp",
"src/libANGLE/Program.cpp", "src/libANGLE/Program.cpp",
"src/libANGLE/ProgramExecutable.cpp", "src/libANGLE/ProgramExecutable.cpp",
......
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