Merge commit '77417d5c9e0a5d4c79ddd0285d530b45f7259f0d' into deqp-deps/glslang

Bug: b/284009632
Bug: b/290544176
Test: run cts -m CtsDeqpTestCases -t dEQP-VK.api.command_buffers.*
Change-Id: I28063e7e6ee5f4e8e57f1129a145023701de5802
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..f008351
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,240 @@
+
+// This file is derived (manually) from the CMake targets.
+// We only consider the targets that dEQP depends on (including transitive
+// dependencies). Search for "GLSLANG_LIBRARIES" in dEQP.
+//
+// dEQP depends on:
+// - glslang
+//   - OGLCompiler
+//   - OSDependent
+//   - MachineIndependent
+//     - OGLCompiler
+//     - OSDependent
+//     - GenericCodeGen
+// - SPIRV (does not depend on SPIRV-Tools-opt because ENABLE_OPT=0)
+//   - MachineIndependent
+//     - ...
+// - SPVRemapper
+
+package {
+    default_applicable_licenses: ["external_deqp-deps_glslang_license"],
+}
+
+// Added automatically by a large-scale-change that took the approach of
+// 'apply every license found to every target'. While this makes sure we respect
+// every license restriction, it may not be entirely correct.
+//
+// e.g. GPL in an MIT project might only apply to the contrib/ directory.
+//
+// Please consider splitting the single license below into multiple licenses,
+// taking care not to lose any license_kind information, and overriding the
+// default license using the 'licenses: [...]' property on targets as needed.
+//
+// For unused files, consider creating a 'fileGroup' with "//visibility:private"
+// to attach the license to, and including a comment whether the files may be
+// used in the current project.
+//
+// large-scale-change included anything that looked like it might be a license
+// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
+//
+// Please consider removing redundant or irrelevant files from 'license_text:'.
+//
+// large-scale-change filtered out the below license kinds as false-positives:
+//   SPDX-license-identifier-GPL
+//   SPDX-license-identifier-GPL-3.0
+// See: http://go/android-license-faq
+license {
+    name: "external_deqp-deps_glslang_license",
+    visibility: [":__subpackages__"],
+    license_kinds: [
+        "SPDX-license-identifier-Apache-2.0",
+        "SPDX-license-identifier-BSD",
+        "SPDX-license-identifier-MIT",
+    ],
+    license_text: [
+        "LICENSE",
+        "LICENSE.txt",
+    ],
+}
+
+genrule {
+    name: "deqp_glslang_gen_build_info_h",
+    srcs: ["CHANGES.md", "build_info.h.tmpl"],
+    out: ["glslang/build_info.h"],
+    cmd: "$(location) $$(dirname $(location CHANGES.md)) -i $(location build_info.h.tmpl) -o $(location glslang/build_info.h)",
+    tool_files: ["build_info.py"],
+}
+
+cc_defaults {
+    name: "deqp_glslang_defaults",
+    defaults: ["deqp_and_deps_defaults"],
+    cppflags: [
+        "-Wno-enum-enum-conversion",
+        "-Wno-implicit-fallthrough",
+        "-Wno-missing-field-initializers",
+        "-Wno-unused-variable",
+        "-Wno-implicit-int-conversion",
+        "-Wno-sign-conversion",
+        "-Wno-unused-parameter",
+        "-Wno-unused-but-set-variable",
+        "-Wno-shorten-64-to-32",
+    ],
+    export_include_dirs: [
+        ".",
+    ],
+    generated_headers: [
+        "deqp_glslang_gen_build_info_h",
+    ],
+}
+
+cc_library_static {
+    name: "deqp_glslang_OSDependent",
+    defaults: [
+        "deqp_glslang_defaults",
+    ],
+    export_include_dirs: [
+        "glslang/OSDependent",
+    ],
+    srcs: [
+        "glslang/OSDependent/Unix/ossource.cpp",
+    ],
+}
+
+cc_library_static {
+    name: "deqp_glslang_OGLCompiler",
+    defaults: [
+        "deqp_glslang_defaults",
+    ],
+    export_include_dirs: [
+        "OGLCompilersDLL",
+    ],
+    srcs: [
+        "OGLCompilersDLL/InitializeDll.cpp",
+    ],
+}
+
+cc_library_static {
+    name: "deqp_glslang_MachineIndependent",
+    defaults: [
+        "deqp_glslang_defaults",
+    ],
+    export_include_dirs: [
+        "glslang/MachineIndependent",
+        "glslang/HLSL",
+    ],
+    srcs: [
+//        "glslang/MachineIndependent/glslang.m4",
+//        "glslang/MachineIndependent/glslang.y",
+        "glslang/MachineIndependent/glslang_tab.cpp",
+        "glslang/MachineIndependent/attribute.cpp",
+        "glslang/MachineIndependent/Constant.cpp",
+        "glslang/MachineIndependent/iomapper.cpp",
+        "glslang/MachineIndependent/InfoSink.cpp",
+        "glslang/MachineIndependent/Initialize.cpp",
+        "glslang/MachineIndependent/IntermTraverse.cpp",
+        "glslang/MachineIndependent/Intermediate.cpp",
+        "glslang/MachineIndependent/ParseContextBase.cpp",
+        "glslang/MachineIndependent/ParseHelper.cpp",
+        "glslang/MachineIndependent/PoolAlloc.cpp",
+        "glslang/MachineIndependent/RemoveTree.cpp",
+        "glslang/MachineIndependent/Scan.cpp",
+        "glslang/MachineIndependent/ShaderLang.cpp",
+        "glslang/MachineIndependent/SpirvIntrinsics.cpp",
+        "glslang/MachineIndependent/SymbolTable.cpp",
+        "glslang/MachineIndependent/Versions.cpp",
+        "glslang/MachineIndependent/intermOut.cpp",
+        "glslang/MachineIndependent/limits.cpp",
+        "glslang/MachineIndependent/linkValidate.cpp",
+        "glslang/MachineIndependent/parseConst.cpp",
+        "glslang/MachineIndependent/reflection.cpp",
+        "glslang/MachineIndependent/preprocessor/Pp.cpp",
+        "glslang/MachineIndependent/preprocessor/PpAtom.cpp",
+        "glslang/MachineIndependent/preprocessor/PpContext.cpp",
+        "glslang/MachineIndependent/preprocessor/PpScanner.cpp",
+        "glslang/MachineIndependent/preprocessor/PpTokens.cpp",
+        "glslang/MachineIndependent/propagateNoContraction.cpp",
+
+        "glslang/HLSL/hlslAttributes.cpp",
+        "glslang/HLSL/hlslParseHelper.cpp",
+        "glslang/HLSL/hlslScanContext.cpp",
+        "glslang/HLSL/hlslOpMap.cpp",
+        "glslang/HLSL/hlslTokenStream.cpp",
+        "glslang/HLSL/hlslGrammar.cpp",
+        "glslang/HLSL/hlslParseables.cpp",
+    ],
+    static_libs: [
+        "deqp_glslang_OGLCompiler",
+        "deqp_glslang_OSDependent",
+        "deqp_glslang_GenericCodeGen",
+    ],
+}
+
+cc_library_static {
+    name: "deqp_glslang_glslang",
+    defaults: [
+        "deqp_glslang_defaults",
+    ],
+    export_include_dirs: [
+        "glslang",
+    ],
+    srcs: [
+        "glslang/CInterface/glslang_c_interface.cpp"
+    ],
+    static_libs: [
+        "deqp_glslang_OGLCompiler",
+        "deqp_glslang_OSDependent",
+        "deqp_glslang_MachineIndependent",
+    ],
+}
+
+cc_library_static {
+    name: "deqp_glslang_SPIRV",
+    defaults: [
+        "deqp_glslang_defaults",
+    ],
+    export_include_dirs: [
+        "SPIRV",
+    ],
+    srcs: [
+        "SPIRV/GlslangToSpv.cpp",
+        "SPIRV/InReadableOrder.cpp",
+        "SPIRV/Logger.cpp",
+        "SPIRV/SpvBuilder.cpp",
+        "SPIRV/SpvPostProcess.cpp",
+        "SPIRV/doc.cpp",
+        "SPIRV/SpvTools.cpp",
+        "SPIRV/disassemble.cpp",
+        "SPIRV/CInterface/spirv_c_interface.cpp",
+    ],
+    static_libs: [
+        "deqp_glslang_MachineIndependent",
+    ],
+}
+
+cc_library_static {
+    name: "deqp_glslang_SPVRemapper",
+    defaults: [
+        "deqp_glslang_defaults",
+    ],
+    export_include_dirs: [
+        "SPIRV",
+    ],
+    srcs: [
+        "SPIRV/SPVRemapper.cpp",
+        "SPIRV/doc.cpp",
+    ],
+}
+
+cc_library_static {
+    name: "deqp_glslang_GenericCodeGen",
+    defaults: [
+        "deqp_glslang_defaults",
+    ],
+    export_include_dirs: [
+        "glslang/GenericCodeGen",
+    ],
+    srcs: [
+        "glslang/GenericCodeGen/CodeGen.cpp",
+        "glslang/GenericCodeGen/Link.cpp",
+    ],
+}
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 6787a97..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,168 +0,0 @@
-# Copyright (C) 2020-2023 The Khronos Group Inc.
-#
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-#    Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-#
-#    Redistributions in binary form must reproduce the above
-#    copyright notice, this list of conditions and the following
-#    disclaimer in the documentation and/or other materials provided
-#    with the distribution.
-#
-#    Neither the name of The Khronos Group Inc. nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-LOCAL_PATH := $(call my-dir)
-
-# Generate glslang/build_info.h
-GLSLANG_GENERATED_INCLUDEDIR:=$(TARGET_OUT)/include
-GLSLANG_BUILD_INFO_H:=$(GLSLANG_GENERATED_INCLUDEDIR)/glslang/build_info.h
-
-define gen_glslang_build_info_h
-$(call generate-file-dir,$(GLSLANG_GENERATED_INCLUDEDIR)/dummy_filename)
-$(GLSLANG_BUILD_INFO_H): \
-		$(LOCAL_PATH)/build_info.py \
-		$(LOCAL_PATH)/build_info.h.tmpl \
-		$(LOCAL_PATH)/CHANGES.md
-		@$(HOST_PYTHON) $(LOCAL_PATH)/build_info.py \
-						$(LOCAL_PATH) \
-						-i $(LOCAL_PATH)/build_info.h.tmpl \
-						-o $(GLSLANG_BUILD_INFO_H)
-		@echo "[$(TARGET_ARCH_ABI)] Generate       : $(GLSLANG_BUILD_INFO_H) <= CHANGES.md"
-endef
-$(eval $(call gen_glslang_build_info_h))
-
-GLSLANG_OS_FLAGS := -DGLSLANG_OSINCLUDE_UNIX
-# AMD and NV extensions are turned on by default in upstream Glslang.
-GLSLANG_DEFINES:= -DENABLE_HLSL $(GLSLANG_OS_FLAGS)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE:=OSDependent
-LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
-LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)
-LOCAL_SRC_FILES:=glslang/OSDependent/Unix/ossource.cpp
-LOCAL_C_INCLUDES:=$(LOCAL_PATH) $(LOCAL_PATH)/glslang/OSDependent/Unix/
-LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)/glslang/OSDependent/Unix/
-include $(BUILD_STATIC_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE:=OGLCompiler
-LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
-LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)
-LOCAL_SRC_FILES:=OGLCompilersDLL/InitializeDll.cpp
-LOCAL_C_INCLUDES:=$(LOCAL_PATH)/OGLCompiler
-LOCAL_STATIC_LIBRARIES:=OSDependent
-include $(BUILD_STATIC_LIBRARY)
-
-# Build the stubbed HLSL library.
-# The HLSL source is now directly referenced by the glslang static library
-# instead.
-include $(CLEAR_VARS)
-LOCAL_MODULE:=HLSL
-LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
-LOCAL_SRC_FILES:= \
-	hlsl/stub.cpp
-LOCAL_C_INCLUDES:=$(LOCAL_PATH) \
-	$(LOCAL_PATH)/glslang/HLSL
-include $(BUILD_STATIC_LIBRARY)
-
-include $(CLEAR_VARS)
-GLSLANG_OUT_PATH=$(if $(call host-path-is-absolute,$(TARGET_OUT)),$(TARGET_OUT),$(abspath $(TARGET_OUT)))
-
-# ShaderLang.cpp depends on the generated build_info.h
-$(LOCAL_PATH)/glslang/MachineIndependent/ShaderLang.cpp: \
-	$(GLSLANG_BUILD_INFO_H)
-
-LOCAL_MODULE:=glslang
-LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
-LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)
-LOCAL_SRC_FILES:= \
-		glslang/CInterface/glslang_c_interface.cpp \
-		glslang/GenericCodeGen/CodeGen.cpp \
-		glslang/GenericCodeGen/Link.cpp \
-		glslang/HLSL/hlslAttributes.cpp \
-		glslang/HLSL/hlslGrammar.cpp \
-		glslang/HLSL/hlslOpMap.cpp \
-		glslang/HLSL/hlslParseables.cpp \
-		glslang/HLSL/hlslParseHelper.cpp \
-		glslang/HLSL/hlslScanContext.cpp \
-		glslang/HLSL/hlslTokenStream.cpp \
-		glslang/MachineIndependent/attribute.cpp \
-		glslang/MachineIndependent/Constant.cpp \
-		glslang/MachineIndependent/glslang_tab.cpp \
-		glslang/MachineIndependent/InfoSink.cpp \
-		glslang/MachineIndependent/Initialize.cpp \
-		glslang/MachineIndependent/Intermediate.cpp \
-		glslang/MachineIndependent/intermOut.cpp \
-		glslang/MachineIndependent/IntermTraverse.cpp \
-		glslang/MachineIndependent/iomapper.cpp \
-		glslang/MachineIndependent/limits.cpp \
-		glslang/MachineIndependent/linkValidate.cpp \
-		glslang/MachineIndependent/parseConst.cpp \
-		glslang/MachineIndependent/ParseContextBase.cpp \
-		glslang/MachineIndependent/ParseHelper.cpp \
-		glslang/MachineIndependent/PoolAlloc.cpp \
-		glslang/MachineIndependent/propagateNoContraction.cpp \
-		glslang/MachineIndependent/reflection.cpp \
-		glslang/MachineIndependent/RemoveTree.cpp \
-		glslang/MachineIndependent/Scan.cpp \
-		glslang/MachineIndependent/ShaderLang.cpp \
-		glslang/MachineIndependent/SpirvIntrinsics.cpp \
-		glslang/MachineIndependent/SymbolTable.cpp \
-		glslang/MachineIndependent/Versions.cpp \
-		glslang/MachineIndependent/preprocessor/PpAtom.cpp \
-		glslang/MachineIndependent/preprocessor/PpContext.cpp \
-		glslang/MachineIndependent/preprocessor/Pp.cpp \
-		glslang/MachineIndependent/preprocessor/PpScanner.cpp \
-		glslang/MachineIndependent/preprocessor/PpTokens.cpp
-LOCAL_C_INCLUDES:=$(LOCAL_PATH) \
-	$(LOCAL_PATH)/glslang/MachineIndependent \
-	$(GLSLANG_GENERATED_INCLUDEDIR) \
-	$(GLSLANG_OUT_PATH)
-LOCAL_STATIC_LIBRARIES:=OSDependent OGLCompiler HLSL
-include $(BUILD_STATIC_LIBRARY)
-
-include $(CLEAR_VARS)
-
-# GlslangToSpv.cpp depends on the generated build_info.h
-$(LOCAL_PATH)/SPIRV/GlslangToSpv.cpp: \
-	$(GLSLANG_BUILD_INFO_H)
-
-LOCAL_MODULE:=SPIRV
-LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti -Werror $(GLSLANG_DEFINES)
-LOCAL_SRC_FILES:= \
-	SPIRV/CInterface/spirv_c_interface.cpp \
-	SPIRV/GlslangToSpv.cpp \
-	SPIRV/InReadableOrder.cpp \
-	SPIRV/Logger.cpp \
-	SPIRV/SPVRemapper.cpp \
-	SPIRV/SpvBuilder.cpp \
-	SPIRV/SpvPostProcess.cpp \
-	SPIRV/SpvTools.cpp \
-	SPIRV/disassemble.cpp \
-	SPIRV/doc.cpp
-LOCAL_C_INCLUDES:=$(LOCAL_PATH) \
-	$(LOCAL_PATH)/glslang/SPIRV \
-	$(GLSLANG_GENERATED_INCLUDEDIR)
-LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)/glslang/SPIRV
-LOCAL_STATIC_LIBRARIES:=glslang
-include $(BUILD_STATIC_LIBRARY)
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..a10c094
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,108 @@
+Here, glslang proper means core GLSL parsing, HLSL parsing, and SPIR-V code
+generation. Glslang proper requires use of two licenses, one that covers
+non-preprocessing and an additional one that covers preprocessing.
+
+Bison was removed long ago. You can build glslang from the source grammar,
+using tools of your choice, without using bison or any bison files.
+
+Other parts, outside of glslang proper, include:
+
+- gl_types.h, only needed for OpenGL-like reflection, and can be left out of
+  a parse and codegen project.  See it for its license.
+
+- update_glslang_sources.py, which is not part of the project proper and does
+  not need to be used.
+
+- the SPIR-V "remapper", which is optional, but has the same license as
+  glslang proper
+
+- Google tests and SPIR-V tools, and anything in the external subdirectory
+  are external and optional; see them for their respective licenses.
+
+--------------------------------------------------------------------------------
+
+The core of glslang-proper, minus the preprocessor is licenced as follows:
+
+//
+// Copyright (C) 2015-2018 Google, Inc.
+// Copyright (C) <various other dates and companies>
+//
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+//
+//    Redistributions of source code must retain the above copyright
+//    notice, this list of conditions and the following disclaimer.
+//
+//    Redistributions in binary form must reproduce the above
+//    copyright notice, this list of conditions and the following
+//    disclaimer in the documentation and/or other materials provided
+//    with the distribution.
+//
+//    Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+//    contributors may be used to endorse or promote products derived
+//    from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+
+--------------------------------------------------------------------------------
+
+The preprocessor has the core license stated above, plus an additional licence:
+
+/****************************************************************************\
+Copyright (c) 2002, NVIDIA Corporation.
+
+NVIDIA Corporation("NVIDIA") supplies this software to you in
+consideration of your agreement to the following terms, and your use,
+installation, modification or redistribution of this NVIDIA software
+constitutes acceptance of these terms.  If you do not agree with these
+terms, please do not use, install, modify or redistribute this NVIDIA
+software.
+
+In consideration of your agreement to abide by the following terms, and
+subject to these terms, NVIDIA grants you a personal, non-exclusive
+license, under NVIDIA's copyrights in this original NVIDIA software (the
+"NVIDIA Software"), to use, reproduce, modify and redistribute the
+NVIDIA Software, with or without modifications, in source and/or binary
+forms; provided that if you redistribute the NVIDIA Software, you must
+retain the copyright notice of NVIDIA, this notice and the following
+text and disclaimers in all such redistributions of the NVIDIA Software.
+Neither the name, trademarks, service marks nor logos of NVIDIA
+Corporation may be used to endorse or promote products derived from the
+NVIDIA Software without specific prior written permission from NVIDIA.
+Except as expressly stated in this notice, no other rights or licenses
+express or implied, are granted by NVIDIA herein, including but not
+limited to any patent rights that may be infringed by your derivative
+works or by other works in which the NVIDIA Software may be
+incorporated. No hardware is licensed hereunder.
+
+THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER
+PRODUCTS.
+
+IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT,
+INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY
+OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE
+NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT,
+TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
+NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+\****************************************************************************/
diff --git a/METADATA b/METADATA
new file mode 100644
index 0000000..263906b
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,13 @@
+name: "glslang"
+description:
+    "An OpenGL and OpenGL ES shader front end and validator."
+
+third_party {
+  url {
+    type: GIT
+    value: "https://github.com/KhronosGroup/glslang.git"
+  }
+  version: "e9405d0b443a1849fa55b7bfeaceda586a1c37af"
+  license_type: NOTICE
+  last_upgrade_date { year: 2018 month: 12 day: 14 }
+}
diff --git a/MODULE_LICENSE_BSD b/MODULE_LICENSE_BSD
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/MODULE_LICENSE_BSD
diff --git a/OWNERS b/OWNERS
new file mode 100644
index 0000000..ca2b824
--- /dev/null
+++ b/OWNERS
@@ -0,0 +1 @@
+include platform/external/deqp:/OWNERS
diff --git a/ndk_test/Android.mk b/ndk_test/Android.mk
deleted file mode 100644
index d2e93da..0000000
--- a/ndk_test/Android.mk
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright (C) 2020 The Khronos Group Inc.
-#
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-#    Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-#
-#    Redistributions in binary form must reproduce the above
-#    copyright notice, this list of conditions and the following
-#    disclaimer in the documentation and/or other materials provided
-#    with the distribution.
-#
-#    Neither the name of The Khronos Group Inc. nor the names of its
-#    contributors may be used to endorse or promote products derived
-#    from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_CPP_EXTENSION := .cc .cpp .cxx
-LOCAL_SRC_FILES:=test.cpp
-LOCAL_MODULE:=glslang_ndk_test
-LOCAL_LDLIBS:=-landroid
-LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti -Werror
-LOCAL_STATIC_LIBRARIES:=glslang SPIRV HLSL
-include $(BUILD_SHARED_LIBRARY)
-
-include $(LOCAL_PATH)/../Android.mk