Merge remote-tracking branch 'aosp/upstream-mirror' into into 'aosp/master'
... to pull in http://crrev.com/c/2753096 for SwANGLE.
Created with:
repo sync .
git merge aosp/upstream-mirror
scripts/roll_aosp.sh
git commit -a --amend
repo upload .
Bug: b/182588516
Test: launch Cuttlefish with SwANGLE
Change-Id: I22e3cbc80b3022b78424cba54a9bd526509d52a8
diff --git a/Android.bp b/Android.bp
index 510664d..a19e86b 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1626,6 +1626,7 @@
"src/third_party/khronos/",
"src/third_party/volk/",
"third_party/abseil-cpp/",
+ "third_party/vulkan-deps/spirv-headers/src/include/",
"third_party/vulkan-deps/vulkan-headers/src/include/",
"third_party/zlib/",
"third_party/zlib/google/",
@@ -1754,10 +1755,12 @@
"angle_compression",
"angle_glslang_wrapper",
"angle_libANGLE_headers",
+ "src_common_spirv_angle_spirv_builder",
"src_common_vulkan_angle_vulkan_entry_points",
"src_common_vulkan_angle_vulkan_headers",
"src_common_vulkan_vulkan",
"src_libANGLE_renderer_vulkan_angle_vk_mem_alloc_wrapper",
+ "third_party_vulkan_deps_spirv_headers_src_spv_headers",
],
}
cc_defaults {
@@ -4627,6 +4630,65 @@
},
}
cc_defaults {
+ name: "third_party_abseil_cpp_absl_numeric_representation",
+ stl: "libc++_static",
+ local_include_dirs: [
+ "",
+ "third_party/abseil-cpp/",
+ ],
+ sdk_version: "28",
+ cflags: [
+ "-DABSL_ALLOCATOR_NOTHROW=1",
+ "-DANDROID",
+ "-DANDROID_NDK_VERSION_ROLL=r22_1",
+ "-DCR_CLANG_REVISION=\"llvmorg-13-init-3462-gfe5c2c3c-2\"",
+ "-DCR_LIBCXX_REVISION=8fa87946779682841e21e2da977eccfb6cb3bded",
+ "-DDYNAMIC_ANNOTATIONS_ENABLED=0",
+ "-DHAVE_SYS_UIO_H",
+ "-DNDEBUG",
+ "-DNVALGRIND",
+ "-D_GNU_SOURCE",
+ "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D_LIBCPP_ENABLE_NODISCARD",
+ "-D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS",
+ "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-Wno-builtin-assume-aligned-alignment",
+ "-Wno-builtin-macro-redefined",
+ "-Wno-c++11-narrowing",
+ "-Wno-deprecated-copy",
+ "-Wno-final-dtor-non-final-class",
+ "-Wno-ignored-pragma-optimize",
+ "-Wno-implicit-fallthrough",
+ "-Wno-implicit-int-float-conversion",
+ "-Wno-misleading-indentation",
+ "-Wno-missing-field-initializers",
+ "-Wno-non-c-typedef-for-linkage",
+ "-Wno-psabi",
+ "-Wno-sign-conversion",
+ "-Wno-trigraphs",
+ "-Wno-undefined-var-template",
+ "-Wno-unknown-warning-option",
+ "-Wno-unneeded-internal-declaration",
+ "-Wno-unused-parameter",
+ "-Wno-unused-variable",
+ ],
+ defaults: [
+ "third_party_abseil_cpp_absl_base_config",
+ ],
+ arch: {
+ x86_64: {
+ cflags: [
+ "-Wno-max-tokens",
+ ],
+ },
+ x86: {
+ cflags: [
+ "-Wno-max-tokens",
+ ],
+ },
+ },
+}
+cc_defaults {
name: "third_party_abseil_cpp_absl_strings_str_format_internal",
stl: "libc++_static",
local_include_dirs: [
@@ -4696,6 +4758,7 @@
"third_party_abseil_cpp_absl_meta_type_traits",
"third_party_abseil_cpp_absl_numeric_bits",
"third_party_abseil_cpp_absl_numeric_int128",
+ "third_party_abseil_cpp_absl_numeric_representation",
"third_party_abseil_cpp_absl_strings_strings",
"third_party_abseil_cpp_absl_types_optional",
"third_party_abseil_cpp_absl_types_span",
diff --git a/BUILD.gn b/BUILD.gn
index f86bead..8471313 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -43,6 +43,9 @@
# Adds run-time checks to filter out EVENT() messages when the debug annotator is disabled.
angle_enable_annotator_run_time_checks = false
+
+ # Enables non-conformant extensions and features
+ angle_expose_non_conformant_extensions_and_versions = false
}
if (angle_build_all) {
@@ -360,6 +363,10 @@
libs = [ "android" ]
}
}
+
+ if (angle_expose_non_conformant_extensions_and_versions) {
+ defines = [ "ANGLE_EXPOSE_NON_CONFORMANT_EXTENSIONS_AND_VERSIONS" ]
+ }
}
config("angle_image_util_config") {
diff --git a/DEPS b/DEPS
index f4cba68..601ea7c 100644
--- a/DEPS
+++ b/DEPS
@@ -20,7 +20,7 @@
'checkout_angle_internal': False,
# Version of Chromium our Chromium-based DEPS are mirrored from.
- 'chromium_revision': '031d7b5c58790b4d923fc74ca6d13a5d323d2ebd',
+ 'chromium_revision': 'e90a7a4d378a3f2761779b78b800f883419fe68f',
# We never want to checkout chromium,
# but need a dummy DEPS entry for the autoroller
'dummy_checkout_chromium': False,
@@ -65,7 +65,7 @@
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling catapult
# and whatever else without interference from each other.
- 'catapult_revision': '4f82770e78a801033e58a1e6ce6ff941c0ff21e8',
+ 'catapult_revision': 'cf138ce6bf90f8ad2c79f38f6ed919182c5a3132',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling luci-go
@@ -76,12 +76,12 @@
deps = {
'build': {
- 'url': '{chromium_git}/chromium/src/build.git@f33045737d32abf1d1e0691ca2562b915a9d123b',
+ 'url': '{chromium_git}/chromium/src/build.git@8b3a30a92cf71db5f2dffbee8f53872bcc93a0bc',
'condition': 'not build_with_chromium',
},
'buildtools': {
- 'url': '{chromium_git}/chromium/src/buildtools.git@368c7dd2c90cd27cadfa8e653ab6953405f153cc',
+ 'url': '{chromium_git}/chromium/src/buildtools.git@69cc9b8a3ae010e0721c4bea12de7a352d9a93f9',
'condition': 'not build_with_chromium',
},
@@ -94,7 +94,7 @@
'packages': [
{
'package': 'gn/gn/linux-amd64',
- 'version': 'git_revision:dfcbc6fed0a8352696f92d67ccad54048ad182b3',
+ 'version': 'git_revision:e0358b49272c8b354eda0a595e1d7887343fab27',
}
],
'dep_type': 'cipd',
@@ -105,7 +105,7 @@
'packages': [
{
'package': 'gn/gn/mac-${{arch}}',
- 'version': 'git_revision:dfcbc6fed0a8352696f92d67ccad54048ad182b3',
+ 'version': 'git_revision:e0358b49272c8b354eda0a595e1d7887343fab27',
}
],
'dep_type': 'cipd',
@@ -126,7 +126,7 @@
'packages': [
{
'package': 'gn/gn/windows-amd64',
- 'version': 'git_revision:dfcbc6fed0a8352696f92d67ccad54048ad182b3',
+ 'version': 'git_revision:e0358b49272c8b354eda0a595e1d7887343fab27',
}
],
'dep_type': 'cipd',
@@ -134,12 +134,12 @@
},
'testing': {
- 'url': '{chromium_git}/chromium/src/testing@786c1103e3154ecd7bd01297a6c1eb6677782030',
+ 'url': '{chromium_git}/chromium/src/testing@09e6844f481f1a3c46ac3e1f67461b2cceb86eb5',
'condition': 'not build_with_chromium',
},
'third_party/abseil-cpp': {
- 'url': '{chromium_git}/chromium/src/third_party/abseil-cpp@357278b25ad765d339712ac2c9e7aed5cd627a8f',
+ 'url': '{chromium_git}/chromium/src/third_party/abseil-cpp@8e820e32d0d6bff14551631a5cd38ff7d3453c63',
'condition': 'not build_with_chromium',
},
@@ -245,7 +245,7 @@
},
'third_party/SwiftShader': {
- 'url': '{swiftshader_git}/SwiftShader@023914a27b634063766fee96f2e6763513f5b059',
+ 'url': '{swiftshader_git}/SwiftShader@3c4fd15fb075ab3a8eb5809f9a42b5faa9ac63ae',
'condition': 'not build_with_chromium',
},
@@ -254,7 +254,7 @@
},
'third_party/vulkan-deps': {
- 'url': '{chromium_git}/vulkan-deps@32692e5de307b72f994cc07e75a4ed4175248ea6',
+ 'url': '{chromium_git}/vulkan-deps@ea8c29e1ee20acc3428b9ff4d2524f8dbe3aeced',
'condition': 'not build_with_chromium',
},
@@ -264,12 +264,12 @@
},
'third_party/zlib': {
- 'url': '{chromium_git}/chromium/src/third_party/zlib@348acca950b1d6de784a954f4fda0952046c652c',
+ 'url': '{chromium_git}/chromium/src/third_party/zlib@09490503d0f201b81e03f5ca0ab8ba8ee76d4a8e',
'condition': 'not build_with_chromium',
},
'tools/clang': {
- 'url': '{chromium_git}/chromium/src/tools/clang.git@fc54e6b87c72f4affd4faa8e62ba849e4f5e5cc2',
+ 'url': '{chromium_git}/chromium/src/tools/clang.git@e6455713209bbdd355cc8a1cd4f8ee90fb3dfe88',
'condition': 'not build_with_chromium',
},
@@ -304,7 +304,7 @@
},
'tools/mb': {
- 'url': '{chromium_git}/chromium/src/tools/mb@5f9e9dff87d6cfbff415ec602c837e340c7cff2f',
+ 'url': '{chromium_git}/chromium/src/tools/mb@3164db0bf1cc1dd38b8eb934b6e2205b2e0b4b3a',
'condition': 'not build_with_chromium',
},
@@ -327,7 +327,7 @@
'packages': [
{
'package': 'skia/tools/goldctl/linux-amd64',
- 'version': 'pVWUmcQ85_lx3kRUwR24iSVp_YTL6Oa3ZUVqn33pXqUC',
+ 'version': 'B61Q7uQOsOlRtaowXXUUrD_eSjWCpiKEcrtjT3VFg-cC',
},
],
'dep_type': 'cipd',
@@ -338,7 +338,7 @@
'packages': [
{
'package': 'skia/tools/goldctl/windows-amd64',
- 'version': 'MKEUDKNT8DcyLZqnGZ2-o5TvzpNJbgsYtzzVAxVi2v4C',
+ 'version': 'j4rOmbVNLoVaUWWPvzH9y8NIrbGae5OxIInpCD89q0QC',
},
],
'dep_type': 'cipd',
@@ -349,7 +349,7 @@
'packages': [
{
'package': 'skia/tools/goldctl/mac-amd64',
- 'version': 'P0qLgrCL8oP-jPdw9rs0tWhuvsx8cVqnV8C1DBI4TNAC',
+ 'version': 'RY1cs6o9Gi3j3iBE9XxPDZcR1n4Xvo27QvF_F3wL2r4C',
},
],
'dep_type': 'cipd',
@@ -421,14 +421,14 @@
'name': 'mac_toolchain',
'pattern': '.',
'condition': 'checkout_mac and not build_with_chromium',
- 'action': ['python3', 'build/mac_toolchain.py'],
+ 'action': ['python', 'build/mac_toolchain.py'],
},
{
# Note: On Win, this should run after win_toolchain, as it may use it.
'name': 'clang',
'pattern': '.',
- 'action': ['python3', 'tools/clang/scripts/update.py'],
+ 'action': ['python', 'tools/clang/scripts/update.py'],
'condition': 'not build_with_chromium',
},
@@ -437,7 +437,7 @@
'name': 'lastchange',
'pattern': '.',
'condition': 'not build_with_chromium',
- 'action': ['python3', 'build/util/lastchange.py',
+ 'action': ['python', 'build/util/lastchange.py',
'-o', 'build/util/LASTCHANGE'],
},
diff --git a/doc/ContributingCode.md b/doc/ContributingCode.md
index b1db161..1fd3dab 100644
--- a/doc/ContributingCode.md
+++ b/doc/ContributingCode.md
@@ -131,7 +131,7 @@
CL with a particular review, and track dependencies between commits.
* Download the hook from
[https://chromium-review.googlesource.com/tools/hooks/commit-msg][commit-msg-hook] and copy
- this file to `.git/hooks/commit-msg` within your local repository. On non-Windows, platforms,
+ this file to `.git/hooks/commit-msg` within your local repository. On non-Windows platforms,
ensure that permissions are set to allow execution.
* *BE AWARE:* Some patch management tools, such as StGit, currently bypass git hooks. They should
not currently be used with changes intended for review.
@@ -146,9 +146,9 @@
* `git add src/../FileName.cpp`
* `git commit`
* A text editor will open. Add a description at the top of the file.
- * If your changes are associated with an issue in the issue tracker (e.g. a fix for a reported
- bug), please associate the CL with that issue by adding the following line to the commit
- message: `Bug: angleproject:<issue number>`.
+ * Associate the CL with an issue in the issue tracker (e.g. a fix for a reported bug)
+ by adding the following line to the commit message: `Bug: angleproject:<issue number>`.
+ * If necessary please file a new bug at http://anglebug.com/new
* Save.
* Close the text editor.
* Use `git commit --amend` to update your CL with new changes.
diff --git a/doc/DevSetupAndroid.md b/doc/DevSetupAndroid.md
index d7da563..cdf6cb0 100644
--- a/doc/DevSetupAndroid.md
+++ b/doc/DevSetupAndroid.md
@@ -192,6 +192,15 @@
dcheck_always_on = true
```
+#### Application Compatibility
+
+Application compatibility may be increased by enabling non-conformant features and extensions with
+a GN arg:
+
+```
+angle_expose_non_conformant_extensions_and_versions = true
+```
+
## Command line for launching chrome on Android
[This Makefile](https://github.com/phuang/test/blob/master/chromium/Makefile) contains many useful command lines for launching chrome.
diff --git a/include/platform/FeaturesVk.h b/include/platform/FeaturesVk.h
index e58a24f..35ab1a2 100644
--- a/include/platform/FeaturesVk.h
+++ b/include/platform/FeaturesVk.h
@@ -90,6 +90,16 @@
"supportsIncrementalPresent", FeatureCategory::VulkanFeatures,
"VkDevice supports the VK_KHR_incremental_present extension", &members};
+ // Whether the Vulkan presentation engine rotates the present region rectangles of the
+ // VK_KHR_incremental_present extension in pre-rotation situations. The Android presentation
+ // engine assumes that these rectangles need to be rotated, and thus ANGLE should not also
+ // pre-rotate them.
+ Feature disablePreRotateIncrementalPresentRectangles = {
+ "disablePreRotateIncrementalPresentRectangles", FeatureCategory::VulkanFeatures,
+ "Presentation engine performs necessary rotation for present region rectangles of the "
+ "VK_KHR_incremental_present extension",
+ &members};
+
// Whether texture copies on cube map targets should be done on GPU. This is a workaround for
// Intel drivers on windows that have an issue with creating single-layer views on cube map
// textures.
diff --git a/infra/config/generated/commit-queue.cfg b/infra/config/generated/commit-queue.cfg
index f828bb0..45caf20 100644
--- a/infra/config/generated/commit-queue.cfg
+++ b/infra/config/generated/commit-queue.cfg
@@ -113,9 +113,6 @@
name: "chromium/try/mac-angle-chromium-try"
}
builders {
- name: "chromium/try/mac-angle-rel"
- }
- builders {
name: "chromium/try/mac-angle-try"
}
builders {
diff --git a/infra/config/main.star b/infra/config/main.star
index b5d7dea..7adf703 100755
--- a/infra/config/main.star
+++ b/infra/config/main.star
@@ -370,9 +370,6 @@
builder = 'chromium:try/mac-angle-chromium-try',
),
luci.cq_tryjob_verifier(
- builder = 'chromium:try/mac-angle-rel',
- ),
- luci.cq_tryjob_verifier(
builder = 'chromium:try/mac-angle-try',
),
luci.cq_tryjob_verifier(
diff --git a/scripts/code_generation_hashes/GL_EGL_entry_points.json b/scripts/code_generation_hashes/GL_EGL_entry_points.json
index 1263013..5cd2500 100644
--- a/scripts/code_generation_hashes/GL_EGL_entry_points.json
+++ b/scripts/code_generation_hashes/GL_EGL_entry_points.json
@@ -10,7 +10,7 @@
"scripts/entry_point_packed_gl_enums.json":
"4f7b43863a5e61991bba4010db463679",
"scripts/generate_entry_points.py":
- "1c1f236f9804be736409ffffc0869662",
+ "776b9fad21f479a16e23beeed97c53f8",
"scripts/gl.xml":
"2a73a58a7e26d8676a2c0af6d528cae6",
"scripts/gl_angle_ext.xml":
@@ -166,7 +166,7 @@
"src/libGLESv2/libGLESv2_with_capture_autogen.def":
"301a20588e14724b390409c71d5ccfcd",
"src/libOpenCL/entry_points_cl_autogen.cpp":
- "359093faf2a825d10384d301009ad5b5",
+ "9da7a72f6afcd5af04777103612a3bee",
"src/libOpenCL/entry_points_cl_autogen.h":
"3b4a3094e8fd9082b71915b5bd1e8fee"
}
\ No newline at end of file
diff --git a/scripts/code_generation_hashes/SPIR-V_helpers.json b/scripts/code_generation_hashes/SPIR-V_helpers.json
index cc14fa2..86da48c 100644
--- a/scripts/code_generation_hashes/SPIR-V_helpers.json
+++ b/scripts/code_generation_hashes/SPIR-V_helpers.json
@@ -1,14 +1,14 @@
{
"src/common/spirv/gen_spirv_builder_and_parser.py":
- "60a5245905287df8a9fb55be33acfc48",
+ "5ddd90060971e4cb7f8867e488e3d73a",
"src/common/spirv/spirv_instruction_builder_autogen.cpp":
- "6ea97ca168ecccb4a621a06446e4933a",
+ "ec0ed8f398906dc49c35100fe1ac7a4a",
"src/common/spirv/spirv_instruction_builder_autogen.h":
- "7f0130816be26511615f7b1e33fda196",
+ "e704ce45c18d87996e8a920bb92e505a",
"src/common/spirv/spirv_instruction_parser_autogen.cpp":
"55d28bb4b003dbecf31e162ff996fc4f",
"src/common/spirv/spirv_instruction_parser_autogen.h":
- "c35834942632d4cd1587bf7d66721df7",
+ "d1e45755f704b7bd587be379e5eabd67",
"third_party/vulkan-deps/spirv-headers/src/include/spirv/1.0/spirv.core.grammar.json":
"a8c4239344b2fc10bfc4ace7ddee1867"
}
\ No newline at end of file
diff --git a/scripts/code_generation_hashes/restricted_traces.json b/scripts/code_generation_hashes/restricted_traces.json
index 4384fef..8132b90 100644
--- a/scripts/code_generation_hashes/restricted_traces.json
+++ b/scripts/code_generation_hashes/restricted_traces.json
@@ -1,6 +1,6 @@
{
"src/tests/restricted_traces/.gitignore":
- "97d094f939508ea18d5b2c8f45e01785",
+ "109f280e7cbf8147446642d5c39a9987",
"src/tests/restricted_traces/aliexpress.tar.gz.sha1":
"12f48ff0c4ca7980ea879c81b0c9518b",
"src/tests/restricted_traces/among_us.tar.gz.sha1":
@@ -35,6 +35,8 @@
"0d569cbab0adf4df1027f671c65f7bff",
"src/tests/restricted_traces/eight_ball_pool.tar.gz.sha1":
"5826ab8ccdef774fbec4106ddef76720",
+ "src/tests/restricted_traces/extreme_car_driving_simulator.tar.gz.sha1":
+ "935f2d28778428e1c608d785f9a3664e",
"src/tests/restricted_traces/fallout_shelter_online.tar.gz.sha1":
"6f2784d375489b6d6f44092de1a859e0",
"src/tests/restricted_traces/fate_grand_order.tar.gz.sha1":
@@ -61,6 +63,8 @@
"8f467e30dd52312c0a1c257d76db9589",
"src/tests/restricted_traces/lego_legacy.tar.gz.sha1":
"543b6beed660d7206c2839c6811aa9f4",
+ "src/tests/restricted_traces/lineage_m.tar.gz.sha1":
+ "dff18018a646039b905aa1fc18900778",
"src/tests/restricted_traces/magic_tiles_3.tar.gz.sha1":
"e31a9dcfc1734a407d3f54183941f965",
"src/tests/restricted_traces/manhattan_10.tar.gz.sha1":
@@ -79,6 +83,8 @@
"9a97bffd4c6c156a14308bb1c6f50a7e",
"src/tests/restricted_traces/one_punch_man.tar.gz.sha1":
"d7af01fd688a3cbbb9b7d58ed31620fb",
+ "src/tests/restricted_traces/plants_vs_zombies_2.tar.gz.sha1":
+ "fe1d7c220de5c5942195c0bc56267149",
"src/tests/restricted_traces/pubg_mobile_lite.tar.gz.sha1":
"6a77372489ee4b43639b684a39ab8d71",
"src/tests/restricted_traces/raid_shadow_legends.tar.gz.sha1":
@@ -88,13 +94,13 @@
"src/tests/restricted_traces/real_gangster_crime.tar.gz.sha1":
"c85be329035a760edad673eb2ca7c3f1",
"src/tests/restricted_traces/restricted_traces.json":
- "e1d1b013f60fc9349d0f9190e7efa5b2",
+ "53c08acf0dbb2e5558f2ddc253cc9437",
"src/tests/restricted_traces/restricted_traces_autogen.cpp":
- "8cda6f05df47a23e663ef1ce44f6ad3b",
+ "ee4443af895aceb575c1ace1bb202c6a",
"src/tests/restricted_traces/restricted_traces_autogen.gni":
- "7380c5d634735e54aebf3b7d968158b0",
+ "3f1dc277b29c6883497b6960ccba9e5e",
"src/tests/restricted_traces/restricted_traces_autogen.h":
- "d6c08b0e6e023c3132ed34bb154f3ec1",
+ "efa301ef19ee3fe951b3a5ca945a0066",
"src/tests/restricted_traces/rise_of_kingdoms.tar.gz.sha1":
"d4618f857c44f0dfa642ae3af8f161d9",
"src/tests/restricted_traces/romancing_saga.tar.gz.sha1":
diff --git a/scripts/generate_entry_points.py b/scripts/generate_entry_points.py
index 8888784..9a740c6 100755
--- a/scripts/generate_entry_points.py
+++ b/scripts/generate_entry_points.py
@@ -248,8 +248,7 @@
TEMPLATE_CL_ENTRY_POINT_NO_RETURN = """\
void CL_API_ENTRY CL_{name}({params})
{{
- // TODO: CL_EVENT
- // CL_EVENT({name}, "{format_params}"{comma_if_needed}{pass_params});
+ CL_EVENT({name}, "{format_params}"{comma_if_needed}{pass_params});
// TODO: {name}
}}
@@ -258,8 +257,7 @@
TEMPLATE_CL_ENTRY_POINT_WITH_RETURN = """\
{return_type}CL_API_ENTRY CL_{name}({params})
{{
- // TODO: CL_EVENT
- // CL_EVENT({name}, "{format_params}"{comma_if_needed}{pass_params});
+ CL_EVENT({name}, "{format_params}"{comma_if_needed}{pass_params});
// TODO: {name}
@@ -622,18 +620,18 @@
"LPGLYPHMETRICSFLOAT": POINTER_FORMAT,
"UINT": "%u",
# CL-specific types
- "size_t": "%u",
- "cl_char": "%d",
- "cl_uchar": "%u",
- "cl_short": "%d",
- "cl_ushort": "%u",
+ "size_t": "%zu",
+ "cl_char": "%hhd",
+ "cl_uchar": "%hhu",
+ "cl_short": "%hd",
+ "cl_ushort": "%hu",
"cl_int": "%d",
"cl_uint": "%u",
- "cl_long": "%d",
- "cl_ulong": "%u",
- "cl_half": "%lf",
- "cl_float": "%lf",
- "cl_double": "%lf",
+ "cl_long": "%ld",
+ "cl_ulong": "%lu",
+ "cl_half": "%hu",
+ "cl_float": "%f",
+ "cl_double": "%f",
"cl_platform_id": POINTER_FORMAT,
"cl_device_id": POINTER_FORMAT,
"cl_context": POINTER_FORMAT,
@@ -642,63 +640,61 @@
"cl_program": POINTER_FORMAT,
"cl_kernel": POINTER_FORMAT,
"cl_event": POINTER_FORMAT,
- "cl_program": POINTER_FORMAT,
"cl_sampler": POINTER_FORMAT,
"cl_bool": "%u",
- "cl_bitfield": "%u",
- "cl_properties": "%u",
- "cl_device_type": "%u",
+ "cl_bitfield": "%lu",
+ "cl_properties": "%lu",
+ "cl_device_type": "%lu",
"cl_platform_info": "%u",
"cl_device_info": "%u",
- "cl_platform_info": "%u",
- "cl_device_fp_config": "%u",
+ "cl_device_fp_config": "%lu",
"cl_device_mem_cache_type": "%u",
"cl_device_local_mem_type": "%u",
- "cl_device_exec_capabilities": "%u",
- "cl_device_svm_capabilities": "%u",
- "cl_command_queue_properties": "%u",
- "cl_device_partition_property": "%u",
- "cl_device_affinity_domain": "%u",
- "cl_context_properties": "%u",
+ "cl_device_exec_capabilities": "%lu",
+ "cl_device_svm_capabilities": "%lu",
+ "cl_command_queue_properties": "%lu",
+ "cl_device_partition_property": "%zu",
+ "cl_device_affinity_domain": "%lu",
+ "cl_context_properties": "%zu",
"cl_context_info": "%u",
- "cl_queue_properties": "%u",
+ "cl_queue_properties": "%lu",
"cl_command_queue_info": "%u",
"cl_channel_order": "%u",
"cl_channel_type": "%u",
- "cl_mem_flags": "%u",
- "cl_svm_mem_flags": "%u",
+ "cl_mem_flags": "%lu",
+ "cl_svm_mem_flags": "%lu",
"cl_mem_object_type": "%u",
"cl_mem_info": "%u",
- "cl_mem_migration_flags": "%u",
+ "cl_mem_migration_flags": "%lu",
+ "cl_mem_properties": "%lu",
"cl_image_info": "%u",
"cl_buffer_create_type": "%u",
"cl_addressing_mode": "%u",
"cl_filter_mode": "%u",
"cl_sampler_info": "%u",
- "cl_map_flags": "%u",
- "cl_pipe_properties": "%u",
+ "cl_map_flags": "%lu",
+ "cl_pipe_properties": "%zu",
"cl_pipe_info": "%u",
"cl_program_info": "%u",
"cl_program_build_info": "%u",
"cl_program_binary_type": "%u",
- "cl_build_status": "%u",
+ "cl_build_status": "%d",
"cl_kernel_info": "%u",
"cl_kernel_arg_info": "%u",
"cl_kernel_arg_address_qualifier": "%u",
"cl_kernel_arg_access_qualifier": "%u",
- "cl_kernel_arg_type_qualifier": "%u",
+ "cl_kernel_arg_type_qualifier": "%lu",
"cl_kernel_work_group_info": "%u",
"cl_kernel_sub_group_info": "%u",
"cl_event_info": "%u",
"cl_command_type": "%u",
"cl_profiling_info": "%u",
- "cl_sampler_properties": "%u",
+ "cl_sampler_properties": "%lu",
"cl_kernel_exec_info": "%u",
- "cl_device_atomic_capabilities": "%u",
- "cl_device_device_enqueue_capabilities": "%u",
+ "cl_device_atomic_capabilities": "%lu",
"cl_khronos_vendor_id": "%u",
- "cl_mem_properties": "%u",
"cl_version": "%u",
+ "cl_device_device_enqueue_capabilities": "%lu",
}
TEMPLATE_HEADER_INCLUDES = """\
@@ -889,6 +885,7 @@
LIBCL_SOURCE_INCLUDES = """\
#include "entry_points_cl_autogen.h"
+#include "entry_points_cl_utils.h"
"""
TEMPLATE_EVENT_COMMENT = """\
@@ -1164,7 +1161,16 @@
def just_the_name(param):
- return param[type_name_sep_index(param) + 1:].strip()
+
+ def get_name(param_string):
+ return param_string[type_name_sep_index(param_string) + 1:].strip()
+
+ left_paren = param.find("(")
+ if left_paren == -1:
+ return get_name(param)
+ right_paren = param.index(")")
+ paren_content = param[left_paren + 1:right_paren]
+ return get_name(paren_content)
def make_param(param_type, param_name):
diff --git a/src/common/spirv/angle_spirv_utils.cpp b/src/common/spirv/angle_spirv_utils.cpp
index d93eeb8..1bb37b8 100644
--- a/src/common/spirv/angle_spirv_utils.cpp
+++ b/src/common/spirv/angle_spirv_utils.cpp
@@ -27,7 +27,7 @@
}
} // anonymous namespace
-bool Validate(const std::vector<uint32_t> &blob)
+bool Validate(const Blob &blob)
{
spvtools::SpirvTools spirvTools(SPV_ENV_VULKAN_1_1);
@@ -44,7 +44,7 @@
return result;
}
#else // ANGLE_ENABLE_ASSERTS
-bool Validate(const std::vector<uint32_t> &blob)
+bool Validate(const Blob &blob)
{
// Placeholder implementation since this is only used inside an ASSERT().
// Return false to indicate an error in case this is ever accidentally used somewhere else.
diff --git a/src/common/spirv/gen_spirv_builder_and_parser.py b/src/common/spirv/gen_spirv_builder_and_parser.py
index fbce72c..7af597a 100755
--- a/src/common/spirv/gen_spirv_builder_and_parser.py
+++ b/src/common/spirv/gen_spirv_builder_and_parser.py
@@ -41,6 +41,8 @@
#ifndef COMMON_SPIRV_{file_name_capitalized}AUTOGEN_H_
#define COMMON_SPIRV_{file_name_capitalized}AUTOGEN_H_
+#include <spirv/unified1/spirv.hpp>
+
#include "spirv_types.h"
namespace angle
@@ -90,7 +92,34 @@
return static_cast<uint32_t>(length) << 16 | op;
}
-} // anonymous namespace"""
+} // anonymous namespace
+
+void WriteSpirvHeader(std::vector<uint32_t> *blob, uint32_t idCount)
+{
+ // Header:
+ //
+ // - Magic number
+ // - Version (1.0)
+ // - ANGLE's Generator number:
+ // * 24 for tool id (higher 16 bits)
+ // * 0 for tool version (lower 16 bits))
+ // - Bound (idCount)
+ // - 0 (reserved)
+ constexpr uint32_t kANGLEGeneratorId = 24;
+
+ ASSERT(blob->empty());
+
+ blob->push_back(spv::MagicNumber);
+ blob->push_back(0x00010000);
+ blob->push_back(kANGLEGeneratorId << 16 | 0);
+ blob->push_back(idCount);
+ blob->push_back(0x00000000);
+}
+"""
+
+BUILDER_HELPER_FUNCTION_PROTOTYPE = """
+ void WriteSpirvHeader(std::vector<uint32_t> *blob, uint32_t idCount);
+"""
PARSER_FIXED_FUNCTIONS_PROTOTYPES = """void GetInstructionOpAndLength(const uint32_t *_instruction,
spv::Op *opOut, uint32_t *lengthOut);
@@ -105,7 +134,7 @@
}
"""
-TEMPLATE_BUILDER_FUNCTION_PROTOTYPE = """void Write{op}(std::vector<uint32_t> *blob {param_list})"""
+TEMPLATE_BUILDER_FUNCTION_PROTOTYPE = """void Write{op}(Blob *blob {param_list})"""
TEMPLATE_BUILDER_FUNCTION_BODY = """{{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -157,7 +186,7 @@
self.bit_mask_types = set([])
# List of generated instructions builder/parser functions so far.
- self.instruction_builder_prototypes = []
+ self.instruction_builder_prototypes = [BUILDER_HELPER_FUNCTION_PROTOTYPE]
self.instruction_builder_impl = []
self.instruction_parser_prototypes = [PARSER_FIXED_FUNCTIONS_PROTOTYPES]
self.instruction_parser_impl = [PARSER_FIXED_FUNCTIONS]
diff --git a/src/common/spirv/spirv_instruction_builder_autogen.cpp b/src/common/spirv/spirv_instruction_builder_autogen.cpp
index 172b6ba..1f2d88d 100644
--- a/src/common/spirv/spirv_instruction_builder_autogen.cpp
+++ b/src/common/spirv/spirv_instruction_builder_autogen.cpp
@@ -29,14 +29,36 @@
}
} // anonymous namespace
-void WriteNop(std::vector<uint32_t> *blob)
+void WriteSpirvHeader(std::vector<uint32_t> *blob, uint32_t idCount)
+{
+ // Header:
+ //
+ // - Magic number
+ // - Version (1.0)
+ // - ANGLE's Generator number:
+ // * 24 for tool id (higher 16 bits)
+ // * 0 for tool version (lower 16 bits))
+ // - Bound (idCount)
+ // - 0 (reserved)
+ constexpr uint32_t kANGLEGeneratorId = 24;
+
+ ASSERT(blob->empty());
+
+ blob->push_back(spv::MagicNumber);
+ blob->push_back(0x00010000);
+ blob->push_back(kANGLEGeneratorId << 16 | 0);
+ blob->push_back(idCount);
+ blob->push_back(0x00000000);
+}
+
+void WriteNop(Blob *blob)
{
const size_t startSize = blob->size();
blob->push_back(0);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpNop);
}
-void WriteUndef(std::vector<uint32_t> *blob, IdResultType idResultType, IdResult idResult)
+void WriteUndef(Blob *blob, IdResultType idResultType, IdResult idResult)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -44,7 +66,7 @@
blob->push_back(idResult);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpUndef);
}
-void WriteSourceContinued(std::vector<uint32_t> *blob, LiteralString continuedSource)
+void WriteSourceContinued(Blob *blob, LiteralString continuedSource)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -56,7 +78,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpSourceContinued);
}
-void WriteSource(std::vector<uint32_t> *blob,
+void WriteSource(Blob *blob,
spv::SourceLanguage sourceLanguage,
LiteralInteger version,
const IdRef *file,
@@ -81,7 +103,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpSource);
}
-void WriteSourceExtension(std::vector<uint32_t> *blob, LiteralString extension)
+void WriteSourceExtension(Blob *blob, LiteralString extension)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -93,7 +115,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpSourceExtension);
}
-void WriteName(std::vector<uint32_t> *blob, IdRef target, LiteralString name)
+void WriteName(Blob *blob, IdRef target, LiteralString name)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -106,10 +128,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpName);
}
-void WriteMemberName(std::vector<uint32_t> *blob,
- IdRef type,
- LiteralInteger member,
- LiteralString name)
+void WriteMemberName(Blob *blob, IdRef type, LiteralInteger member, LiteralString name)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -123,7 +142,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpMemberName);
}
-void WriteString(std::vector<uint32_t> *blob, IdResult idResult, LiteralString string)
+void WriteString(Blob *blob, IdResult idResult, LiteralString string)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -136,7 +155,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpString);
}
-void WriteLine(std::vector<uint32_t> *blob, IdRef file, LiteralInteger line, LiteralInteger column)
+void WriteLine(Blob *blob, IdRef file, LiteralInteger line, LiteralInteger column)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -145,7 +164,7 @@
blob->push_back(column);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpLine);
}
-void WriteExtension(std::vector<uint32_t> *blob, LiteralString name)
+void WriteExtension(Blob *blob, LiteralString name)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -157,7 +176,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpExtension);
}
-void WriteExtInstImport(std::vector<uint32_t> *blob, IdResult idResult, LiteralString name)
+void WriteExtInstImport(Blob *blob, IdResult idResult, LiteralString name)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -170,7 +189,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpExtInstImport);
}
-void WriteExtInst(std::vector<uint32_t> *blob,
+void WriteExtInst(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef set,
@@ -189,7 +208,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpExtInst);
}
-void WriteMemoryModel(std::vector<uint32_t> *blob,
+void WriteMemoryModel(Blob *blob,
spv::AddressingModel addressingModel,
spv::MemoryModel memoryModel)
{
@@ -199,7 +218,7 @@
blob->push_back(memoryModel);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpMemoryModel);
}
-void WriteEntryPoint(std::vector<uint32_t> *blob,
+void WriteEntryPoint(Blob *blob,
spv::ExecutionModel executionModel,
IdRef entryPoint,
LiteralString name,
@@ -221,7 +240,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpEntryPoint);
}
-void WriteExecutionMode(std::vector<uint32_t> *blob, IdRef entryPoint, spv::ExecutionMode mode)
+void WriteExecutionMode(Blob *blob, IdRef entryPoint, spv::ExecutionMode mode)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -229,31 +248,28 @@
blob->push_back(mode);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpExecutionMode);
}
-void WriteCapability(std::vector<uint32_t> *blob, spv::Capability capability)
+void WriteCapability(Blob *blob, spv::Capability capability)
{
const size_t startSize = blob->size();
blob->push_back(0);
blob->push_back(capability);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpCapability);
}
-void WriteTypeVoid(std::vector<uint32_t> *blob, IdResult idResult)
+void WriteTypeVoid(Blob *blob, IdResult idResult)
{
const size_t startSize = blob->size();
blob->push_back(0);
blob->push_back(idResult);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpTypeVoid);
}
-void WriteTypeBool(std::vector<uint32_t> *blob, IdResult idResult)
+void WriteTypeBool(Blob *blob, IdResult idResult)
{
const size_t startSize = blob->size();
blob->push_back(0);
blob->push_back(idResult);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpTypeBool);
}
-void WriteTypeInt(std::vector<uint32_t> *blob,
- IdResult idResult,
- LiteralInteger width,
- LiteralInteger signedness)
+void WriteTypeInt(Blob *blob, IdResult idResult, LiteralInteger width, LiteralInteger signedness)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -262,7 +278,7 @@
blob->push_back(signedness);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpTypeInt);
}
-void WriteTypeFloat(std::vector<uint32_t> *blob, IdResult idResult, LiteralInteger width)
+void WriteTypeFloat(Blob *blob, IdResult idResult, LiteralInteger width)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -270,7 +286,7 @@
blob->push_back(width);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpTypeFloat);
}
-void WriteTypeVector(std::vector<uint32_t> *blob,
+void WriteTypeVector(Blob *blob,
IdResult idResult,
IdRef componentType,
LiteralInteger componentCount)
@@ -282,10 +298,7 @@
blob->push_back(componentCount);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpTypeVector);
}
-void WriteTypeMatrix(std::vector<uint32_t> *blob,
- IdResult idResult,
- IdRef columnType,
- LiteralInteger columnCount)
+void WriteTypeMatrix(Blob *blob, IdResult idResult, IdRef columnType, LiteralInteger columnCount)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -294,7 +307,7 @@
blob->push_back(columnCount);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpTypeMatrix);
}
-void WriteTypeImage(std::vector<uint32_t> *blob,
+void WriteTypeImage(Blob *blob,
IdResult idResult,
IdRef sampledType,
spv::Dim dim,
@@ -321,14 +334,14 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpTypeImage);
}
-void WriteTypeSampler(std::vector<uint32_t> *blob, IdResult idResult)
+void WriteTypeSampler(Blob *blob, IdResult idResult)
{
const size_t startSize = blob->size();
blob->push_back(0);
blob->push_back(idResult);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpTypeSampler);
}
-void WriteTypeSampledImage(std::vector<uint32_t> *blob, IdResult idResult, IdRef imageType)
+void WriteTypeSampledImage(Blob *blob, IdResult idResult, IdRef imageType)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -336,7 +349,7 @@
blob->push_back(imageType);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpTypeSampledImage);
}
-void WriteTypeArray(std::vector<uint32_t> *blob, IdResult idResult, IdRef elementType, IdRef length)
+void WriteTypeArray(Blob *blob, IdResult idResult, IdRef elementType, IdRef length)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -345,7 +358,7 @@
blob->push_back(length);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpTypeArray);
}
-void WriteTypeRuntimeArray(std::vector<uint32_t> *blob, IdResult idResult, IdRef elementType)
+void WriteTypeRuntimeArray(Blob *blob, IdResult idResult, IdRef elementType)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -353,7 +366,7 @@
blob->push_back(elementType);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpTypeRuntimeArray);
}
-void WriteTypeStruct(std::vector<uint32_t> *blob, IdResult idResult, const IdRefList &memberList)
+void WriteTypeStruct(Blob *blob, IdResult idResult, const IdRefList &memberList)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -364,10 +377,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpTypeStruct);
}
-void WriteTypePointer(std::vector<uint32_t> *blob,
- IdResult idResult,
- spv::StorageClass storageClass,
- IdRef type)
+void WriteTypePointer(Blob *blob, IdResult idResult, spv::StorageClass storageClass, IdRef type)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -376,7 +386,7 @@
blob->push_back(type);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpTypePointer);
}
-void WriteTypeFunction(std::vector<uint32_t> *blob,
+void WriteTypeFunction(Blob *blob,
IdResult idResult,
IdRef returnType,
const IdRefList ¶meterList)
@@ -391,9 +401,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpTypeFunction);
}
-void WriteTypeForwardPointer(std::vector<uint32_t> *blob,
- IdRef pointerType,
- spv::StorageClass storageClass)
+void WriteTypeForwardPointer(Blob *blob, IdRef pointerType, spv::StorageClass storageClass)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -401,7 +409,7 @@
blob->push_back(storageClass);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpTypeForwardPointer);
}
-void WriteConstantTrue(std::vector<uint32_t> *blob, IdResultType idResultType, IdResult idResult)
+void WriteConstantTrue(Blob *blob, IdResultType idResultType, IdResult idResult)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -409,7 +417,7 @@
blob->push_back(idResult);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpConstantTrue);
}
-void WriteConstantFalse(std::vector<uint32_t> *blob, IdResultType idResultType, IdResult idResult)
+void WriteConstantFalse(Blob *blob, IdResultType idResultType, IdResult idResult)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -417,7 +425,7 @@
blob->push_back(idResult);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpConstantFalse);
}
-void WriteConstant(std::vector<uint32_t> *blob,
+void WriteConstant(Blob *blob,
IdResultType idResultType,
IdResult idResult,
LiteralContextDependentNumber value)
@@ -429,7 +437,7 @@
blob->push_back(value);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpConstant);
}
-void WriteConstantComposite(std::vector<uint32_t> *blob,
+void WriteConstantComposite(Blob *blob,
IdResultType idResultType,
IdResult idResult,
const IdRefList &constituentsList)
@@ -444,7 +452,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpConstantComposite);
}
-void WriteConstantNull(std::vector<uint32_t> *blob, IdResultType idResultType, IdResult idResult)
+void WriteConstantNull(Blob *blob, IdResultType idResultType, IdResult idResult)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -452,9 +460,7 @@
blob->push_back(idResult);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpConstantNull);
}
-void WriteSpecConstantTrue(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult)
+void WriteSpecConstantTrue(Blob *blob, IdResultType idResultType, IdResult idResult)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -462,9 +468,7 @@
blob->push_back(idResult);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpSpecConstantTrue);
}
-void WriteSpecConstantFalse(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult)
+void WriteSpecConstantFalse(Blob *blob, IdResultType idResultType, IdResult idResult)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -472,7 +476,7 @@
blob->push_back(idResult);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpSpecConstantFalse);
}
-void WriteSpecConstant(std::vector<uint32_t> *blob,
+void WriteSpecConstant(Blob *blob,
IdResultType idResultType,
IdResult idResult,
LiteralContextDependentNumber value)
@@ -484,7 +488,7 @@
blob->push_back(value);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpSpecConstant);
}
-void WriteSpecConstantComposite(std::vector<uint32_t> *blob,
+void WriteSpecConstantComposite(Blob *blob,
IdResultType idResultType,
IdResult idResult,
const IdRefList &constituentsList)
@@ -499,7 +503,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpSpecConstantComposite);
}
-void WriteFunction(std::vector<uint32_t> *blob,
+void WriteFunction(Blob *blob,
IdResultType idResultType,
IdResult idResult,
spv::FunctionControlMask functionControl,
@@ -513,9 +517,7 @@
blob->push_back(functionType);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFunction);
}
-void WriteFunctionParameter(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult)
+void WriteFunctionParameter(Blob *blob, IdResultType idResultType, IdResult idResult)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -523,14 +525,14 @@
blob->push_back(idResult);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFunctionParameter);
}
-void WriteFunctionEnd(std::vector<uint32_t> *blob)
+void WriteFunctionEnd(Blob *blob)
{
const size_t startSize = blob->size();
blob->push_back(0);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFunctionEnd);
}
-void WriteFunctionCall(std::vector<uint32_t> *blob,
+void WriteFunctionCall(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef function,
@@ -547,7 +549,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFunctionCall);
}
-void WriteVariable(std::vector<uint32_t> *blob,
+void WriteVariable(Blob *blob,
IdResultType idResultType,
IdResult idResult,
spv::StorageClass storageClass,
@@ -564,7 +566,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpVariable);
}
-void WriteImageTexelPointer(std::vector<uint32_t> *blob,
+void WriteImageTexelPointer(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef image,
@@ -580,7 +582,7 @@
blob->push_back(sample);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpImageTexelPointer);
}
-void WriteLoad(std::vector<uint32_t> *blob,
+void WriteLoad(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
@@ -597,10 +599,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpLoad);
}
-void WriteStore(std::vector<uint32_t> *blob,
- IdRef pointer,
- IdRef object,
- const spv::MemoryAccessMask *memoryAccess)
+void WriteStore(Blob *blob, IdRef pointer, IdRef object, const spv::MemoryAccessMask *memoryAccess)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -612,7 +611,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpStore);
}
-void WriteCopyMemory(std::vector<uint32_t> *blob,
+void WriteCopyMemory(Blob *blob,
IdRef target,
IdRef source,
const spv::MemoryAccessMask *memoryAccess)
@@ -627,7 +626,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpCopyMemory);
}
-void WriteCopyMemorySized(std::vector<uint32_t> *blob,
+void WriteCopyMemorySized(Blob *blob,
IdRef target,
IdRef source,
IdRef size,
@@ -644,7 +643,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpCopyMemorySized);
}
-void WriteAccessChain(std::vector<uint32_t> *blob,
+void WriteAccessChain(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef base,
@@ -661,7 +660,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpAccessChain);
}
-void WriteInBoundsAccessChain(std::vector<uint32_t> *blob,
+void WriteInBoundsAccessChain(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef base,
@@ -678,7 +677,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpInBoundsAccessChain);
}
-void WriteArrayLength(std::vector<uint32_t> *blob,
+void WriteArrayLength(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef structure,
@@ -692,7 +691,7 @@
blob->push_back(arraymember);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpArrayLength);
}
-void WriteInBoundsPtrAccessChain(std::vector<uint32_t> *blob,
+void WriteInBoundsPtrAccessChain(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef base,
@@ -711,7 +710,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpInBoundsPtrAccessChain);
}
-void WriteDecorate(std::vector<uint32_t> *blob,
+void WriteDecorate(Blob *blob,
IdRef target,
spv::Decoration decoration,
const LiteralIntegerList &valuesPairList)
@@ -726,7 +725,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpDecorate);
}
-void WriteMemberDecorate(std::vector<uint32_t> *blob,
+void WriteMemberDecorate(Blob *blob,
IdRef structureType,
LiteralInteger member,
spv::Decoration decoration,
@@ -743,16 +742,14 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpMemberDecorate);
}
-void WriteDecorationGroup(std::vector<uint32_t> *blob, IdResult idResult)
+void WriteDecorationGroup(Blob *blob, IdResult idResult)
{
const size_t startSize = blob->size();
blob->push_back(0);
blob->push_back(idResult);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpDecorationGroup);
}
-void WriteGroupDecorate(std::vector<uint32_t> *blob,
- IdRef decorationGroup,
- const IdRefList &targetsList)
+void WriteGroupDecorate(Blob *blob, IdRef decorationGroup, const IdRefList &targetsList)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -763,7 +760,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpGroupDecorate);
}
-void WriteGroupMemberDecorate(std::vector<uint32_t> *blob,
+void WriteGroupMemberDecorate(Blob *blob,
IdRef decorationGroup,
const PairIdRefLiteralIntegerList &targetsPairList)
{
@@ -777,7 +774,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpGroupMemberDecorate);
}
-void WriteVectorExtractDynamic(std::vector<uint32_t> *blob,
+void WriteVectorExtractDynamic(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef vector,
@@ -791,7 +788,7 @@
blob->push_back(index);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpVectorExtractDynamic);
}
-void WriteVectorInsertDynamic(std::vector<uint32_t> *blob,
+void WriteVectorInsertDynamic(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef vector,
@@ -807,7 +804,7 @@
blob->push_back(index);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpVectorInsertDynamic);
}
-void WriteVectorShuffle(std::vector<uint32_t> *blob,
+void WriteVectorShuffle(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef vector1,
@@ -826,7 +823,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpVectorShuffle);
}
-void WriteCompositeConstruct(std::vector<uint32_t> *blob,
+void WriteCompositeConstruct(Blob *blob,
IdResultType idResultType,
IdResult idResult,
const IdRefList &constituentsList)
@@ -841,7 +838,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpCompositeConstruct);
}
-void WriteCompositeExtract(std::vector<uint32_t> *blob,
+void WriteCompositeExtract(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef composite,
@@ -858,7 +855,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpCompositeExtract);
}
-void WriteCompositeInsert(std::vector<uint32_t> *blob,
+void WriteCompositeInsert(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef object,
@@ -877,10 +874,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpCompositeInsert);
}
-void WriteCopyObject(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef operand)
+void WriteCopyObject(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef operand)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -889,10 +883,7 @@
blob->push_back(operand);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpCopyObject);
}
-void WriteTranspose(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef matrix)
+void WriteTranspose(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef matrix)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -901,7 +892,7 @@
blob->push_back(matrix);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpTranspose);
}
-void WriteSampledImage(std::vector<uint32_t> *blob,
+void WriteSampledImage(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef image,
@@ -915,7 +906,7 @@
blob->push_back(sampler);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpSampledImage);
}
-void WriteImageSampleImplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSampleImplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -939,7 +930,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpImageSampleImplicitLod);
}
-void WriteImageSampleExplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSampleExplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -960,7 +951,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpImageSampleExplicitLod);
}
-void WriteImageSampleDrefImplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSampleDrefImplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -986,7 +977,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpImageSampleDrefImplicitLod);
}
-void WriteImageSampleDrefExplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSampleDrefExplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -1009,7 +1000,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpImageSampleDrefExplicitLod);
}
-void WriteImageSampleProjImplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSampleProjImplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -1033,7 +1024,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpImageSampleProjImplicitLod);
}
-void WriteImageSampleProjExplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSampleProjExplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -1054,7 +1045,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpImageSampleProjExplicitLod);
}
-void WriteImageSampleProjDrefImplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSampleProjDrefImplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -1081,7 +1072,7 @@
(*blob)[startSize] =
MakeLengthOp(blob->size() - startSize, spv::OpImageSampleProjDrefImplicitLod);
}
-void WriteImageSampleProjDrefExplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSampleProjDrefExplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -1105,7 +1096,7 @@
(*blob)[startSize] =
MakeLengthOp(blob->size() - startSize, spv::OpImageSampleProjDrefExplicitLod);
}
-void WriteImageFetch(std::vector<uint32_t> *blob,
+void WriteImageFetch(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef image,
@@ -1129,7 +1120,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpImageFetch);
}
-void WriteImageGather(std::vector<uint32_t> *blob,
+void WriteImageGather(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -1155,7 +1146,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpImageGather);
}
-void WriteImageDrefGather(std::vector<uint32_t> *blob,
+void WriteImageDrefGather(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -1181,7 +1172,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpImageDrefGather);
}
-void WriteImageRead(std::vector<uint32_t> *blob,
+void WriteImageRead(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef image,
@@ -1205,7 +1196,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpImageRead);
}
-void WriteImageWrite(std::vector<uint32_t> *blob,
+void WriteImageWrite(Blob *blob,
IdRef image,
IdRef coordinate,
IdRef texel,
@@ -1227,10 +1218,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpImageWrite);
}
-void WriteImage(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef sampledImage)
+void WriteImage(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef sampledImage)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -1239,7 +1227,7 @@
blob->push_back(sampledImage);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpImage);
}
-void WriteImageQueryLod(std::vector<uint32_t> *blob,
+void WriteImageQueryLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -1253,10 +1241,7 @@
blob->push_back(coordinate);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpImageQueryLod);
}
-void WriteConvertFToU(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef floatValue)
+void WriteConvertFToU(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef floatValue)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -1265,10 +1250,7 @@
blob->push_back(floatValue);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpConvertFToU);
}
-void WriteConvertFToS(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef floatValue)
+void WriteConvertFToS(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef floatValue)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -1277,10 +1259,7 @@
blob->push_back(floatValue);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpConvertFToS);
}
-void WriteConvertSToF(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef signedValue)
+void WriteConvertSToF(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef signedValue)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -1289,10 +1268,7 @@
blob->push_back(signedValue);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpConvertSToF);
}
-void WriteConvertUToF(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef unsignedValue)
+void WriteConvertUToF(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef unsignedValue)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -1301,10 +1277,7 @@
blob->push_back(unsignedValue);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpConvertUToF);
}
-void WriteUConvert(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef unsignedValue)
+void WriteUConvert(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef unsignedValue)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -1313,10 +1286,7 @@
blob->push_back(unsignedValue);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpUConvert);
}
-void WriteSConvert(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef signedValue)
+void WriteSConvert(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef signedValue)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -1325,10 +1295,7 @@
blob->push_back(signedValue);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpSConvert);
}
-void WriteFConvert(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef floatValue)
+void WriteFConvert(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef floatValue)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -1337,10 +1304,7 @@
blob->push_back(floatValue);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFConvert);
}
-void WriteQuantizeToF16(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef value)
+void WriteQuantizeToF16(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef value)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -1349,10 +1313,7 @@
blob->push_back(value);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpQuantizeToF16);
}
-void WriteConvertPtrToU(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef pointer)
+void WriteConvertPtrToU(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef pointer)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -1361,7 +1322,7 @@
blob->push_back(pointer);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpConvertPtrToU);
}
-void WriteConvertUToPtr(std::vector<uint32_t> *blob,
+void WriteConvertUToPtr(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef integerValue)
@@ -1373,10 +1334,7 @@
blob->push_back(integerValue);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpConvertUToPtr);
}
-void WriteBitcast(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef operand)
+void WriteBitcast(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef operand)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -1385,10 +1343,7 @@
blob->push_back(operand);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpBitcast);
}
-void WriteSNegate(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef operand)
+void WriteSNegate(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef operand)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -1397,10 +1352,7 @@
blob->push_back(operand);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpSNegate);
}
-void WriteFNegate(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef operand)
+void WriteFNegate(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef operand)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -1409,7 +1361,7 @@
blob->push_back(operand);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFNegate);
}
-void WriteIAdd(std::vector<uint32_t> *blob,
+void WriteIAdd(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1423,7 +1375,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpIAdd);
}
-void WriteFAdd(std::vector<uint32_t> *blob,
+void WriteFAdd(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1437,7 +1389,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFAdd);
}
-void WriteISub(std::vector<uint32_t> *blob,
+void WriteISub(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1451,7 +1403,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpISub);
}
-void WriteFSub(std::vector<uint32_t> *blob,
+void WriteFSub(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1465,7 +1417,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFSub);
}
-void WriteIMul(std::vector<uint32_t> *blob,
+void WriteIMul(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1479,7 +1431,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpIMul);
}
-void WriteFMul(std::vector<uint32_t> *blob,
+void WriteFMul(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1493,7 +1445,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFMul);
}
-void WriteUDiv(std::vector<uint32_t> *blob,
+void WriteUDiv(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1507,7 +1459,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpUDiv);
}
-void WriteSDiv(std::vector<uint32_t> *blob,
+void WriteSDiv(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1521,7 +1473,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpSDiv);
}
-void WriteFDiv(std::vector<uint32_t> *blob,
+void WriteFDiv(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1535,7 +1487,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFDiv);
}
-void WriteUMod(std::vector<uint32_t> *blob,
+void WriteUMod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1549,7 +1501,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpUMod);
}
-void WriteSRem(std::vector<uint32_t> *blob,
+void WriteSRem(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1563,7 +1515,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpSRem);
}
-void WriteSMod(std::vector<uint32_t> *blob,
+void WriteSMod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1577,7 +1529,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpSMod);
}
-void WriteFRem(std::vector<uint32_t> *blob,
+void WriteFRem(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1591,7 +1543,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFRem);
}
-void WriteFMod(std::vector<uint32_t> *blob,
+void WriteFMod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1605,7 +1557,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFMod);
}
-void WriteVectorTimesScalar(std::vector<uint32_t> *blob,
+void WriteVectorTimesScalar(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef vector,
@@ -1619,7 +1571,7 @@
blob->push_back(scalar);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpVectorTimesScalar);
}
-void WriteMatrixTimesScalar(std::vector<uint32_t> *blob,
+void WriteMatrixTimesScalar(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef matrix,
@@ -1633,7 +1585,7 @@
blob->push_back(scalar);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpMatrixTimesScalar);
}
-void WriteVectorTimesMatrix(std::vector<uint32_t> *blob,
+void WriteVectorTimesMatrix(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef vector,
@@ -1647,7 +1599,7 @@
blob->push_back(matrix);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpVectorTimesMatrix);
}
-void WriteMatrixTimesVector(std::vector<uint32_t> *blob,
+void WriteMatrixTimesVector(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef matrix,
@@ -1661,7 +1613,7 @@
blob->push_back(vector);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpMatrixTimesVector);
}
-void WriteMatrixTimesMatrix(std::vector<uint32_t> *blob,
+void WriteMatrixTimesMatrix(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef leftMatrix,
@@ -1675,7 +1627,7 @@
blob->push_back(rightMatrix);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpMatrixTimesMatrix);
}
-void WriteOuterProduct(std::vector<uint32_t> *blob,
+void WriteOuterProduct(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef vector1,
@@ -1689,7 +1641,7 @@
blob->push_back(vector2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpOuterProduct);
}
-void WriteDot(std::vector<uint32_t> *blob,
+void WriteDot(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef vector1,
@@ -1703,7 +1655,7 @@
blob->push_back(vector2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpDot);
}
-void WriteIAddCarry(std::vector<uint32_t> *blob,
+void WriteIAddCarry(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1717,7 +1669,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpIAddCarry);
}
-void WriteISubBorrow(std::vector<uint32_t> *blob,
+void WriteISubBorrow(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1731,7 +1683,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpISubBorrow);
}
-void WriteUMulExtended(std::vector<uint32_t> *blob,
+void WriteUMulExtended(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1745,7 +1697,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpUMulExtended);
}
-void WriteSMulExtended(std::vector<uint32_t> *blob,
+void WriteSMulExtended(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1759,10 +1711,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpSMulExtended);
}
-void WriteAny(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef vector)
+void WriteAny(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef vector)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -1771,10 +1720,7 @@
blob->push_back(vector);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpAny);
}
-void WriteAll(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef vector)
+void WriteAll(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef vector)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -1783,7 +1729,7 @@
blob->push_back(vector);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpAll);
}
-void WriteIsNan(std::vector<uint32_t> *blob, IdResultType idResultType, IdResult idResult, IdRef x)
+void WriteIsNan(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef x)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -1792,7 +1738,7 @@
blob->push_back(x);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpIsNan);
}
-void WriteIsInf(std::vector<uint32_t> *blob, IdResultType idResultType, IdResult idResult, IdRef x)
+void WriteIsInf(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef x)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -1801,7 +1747,7 @@
blob->push_back(x);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpIsInf);
}
-void WriteLogicalEqual(std::vector<uint32_t> *blob,
+void WriteLogicalEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1815,7 +1761,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpLogicalEqual);
}
-void WriteLogicalNotEqual(std::vector<uint32_t> *blob,
+void WriteLogicalNotEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1829,7 +1775,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpLogicalNotEqual);
}
-void WriteLogicalOr(std::vector<uint32_t> *blob,
+void WriteLogicalOr(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1843,7 +1789,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpLogicalOr);
}
-void WriteLogicalAnd(std::vector<uint32_t> *blob,
+void WriteLogicalAnd(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1857,10 +1803,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpLogicalAnd);
}
-void WriteLogicalNot(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef operand)
+void WriteLogicalNot(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef operand)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -1869,7 +1812,7 @@
blob->push_back(operand);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpLogicalNot);
}
-void WriteSelect(std::vector<uint32_t> *blob,
+void WriteSelect(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef condition,
@@ -1885,7 +1828,7 @@
blob->push_back(object2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpSelect);
}
-void WriteIEqual(std::vector<uint32_t> *blob,
+void WriteIEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1899,7 +1842,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpIEqual);
}
-void WriteINotEqual(std::vector<uint32_t> *blob,
+void WriteINotEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1913,7 +1856,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpINotEqual);
}
-void WriteUGreaterThan(std::vector<uint32_t> *blob,
+void WriteUGreaterThan(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1927,7 +1870,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpUGreaterThan);
}
-void WriteSGreaterThan(std::vector<uint32_t> *blob,
+void WriteSGreaterThan(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1941,7 +1884,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpSGreaterThan);
}
-void WriteUGreaterThanEqual(std::vector<uint32_t> *blob,
+void WriteUGreaterThanEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1955,7 +1898,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpUGreaterThanEqual);
}
-void WriteSGreaterThanEqual(std::vector<uint32_t> *blob,
+void WriteSGreaterThanEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1969,7 +1912,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpSGreaterThanEqual);
}
-void WriteULessThan(std::vector<uint32_t> *blob,
+void WriteULessThan(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1983,7 +1926,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpULessThan);
}
-void WriteSLessThan(std::vector<uint32_t> *blob,
+void WriteSLessThan(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -1997,7 +1940,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpSLessThan);
}
-void WriteULessThanEqual(std::vector<uint32_t> *blob,
+void WriteULessThanEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -2011,7 +1954,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpULessThanEqual);
}
-void WriteSLessThanEqual(std::vector<uint32_t> *blob,
+void WriteSLessThanEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -2025,7 +1968,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpSLessThanEqual);
}
-void WriteFOrdEqual(std::vector<uint32_t> *blob,
+void WriteFOrdEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -2039,7 +1982,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFOrdEqual);
}
-void WriteFUnordEqual(std::vector<uint32_t> *blob,
+void WriteFUnordEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -2053,7 +1996,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFUnordEqual);
}
-void WriteFOrdNotEqual(std::vector<uint32_t> *blob,
+void WriteFOrdNotEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -2067,7 +2010,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFOrdNotEqual);
}
-void WriteFUnordNotEqual(std::vector<uint32_t> *blob,
+void WriteFUnordNotEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -2081,7 +2024,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFUnordNotEqual);
}
-void WriteFOrdLessThan(std::vector<uint32_t> *blob,
+void WriteFOrdLessThan(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -2095,7 +2038,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFOrdLessThan);
}
-void WriteFUnordLessThan(std::vector<uint32_t> *blob,
+void WriteFUnordLessThan(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -2109,7 +2052,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFUnordLessThan);
}
-void WriteFOrdGreaterThan(std::vector<uint32_t> *blob,
+void WriteFOrdGreaterThan(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -2123,7 +2066,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFOrdGreaterThan);
}
-void WriteFUnordGreaterThan(std::vector<uint32_t> *blob,
+void WriteFUnordGreaterThan(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -2137,7 +2080,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFUnordGreaterThan);
}
-void WriteFOrdLessThanEqual(std::vector<uint32_t> *blob,
+void WriteFOrdLessThanEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -2151,7 +2094,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFOrdLessThanEqual);
}
-void WriteFUnordLessThanEqual(std::vector<uint32_t> *blob,
+void WriteFUnordLessThanEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -2165,7 +2108,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFUnordLessThanEqual);
}
-void WriteFOrdGreaterThanEqual(std::vector<uint32_t> *blob,
+void WriteFOrdGreaterThanEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -2179,7 +2122,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFOrdGreaterThanEqual);
}
-void WriteFUnordGreaterThanEqual(std::vector<uint32_t> *blob,
+void WriteFUnordGreaterThanEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -2193,7 +2136,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFUnordGreaterThanEqual);
}
-void WriteShiftRightLogical(std::vector<uint32_t> *blob,
+void WriteShiftRightLogical(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef base,
@@ -2207,7 +2150,7 @@
blob->push_back(shift);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpShiftRightLogical);
}
-void WriteShiftRightArithmetic(std::vector<uint32_t> *blob,
+void WriteShiftRightArithmetic(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef base,
@@ -2221,7 +2164,7 @@
blob->push_back(shift);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpShiftRightArithmetic);
}
-void WriteShiftLeftLogical(std::vector<uint32_t> *blob,
+void WriteShiftLeftLogical(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef base,
@@ -2235,7 +2178,7 @@
blob->push_back(shift);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpShiftLeftLogical);
}
-void WriteBitwiseOr(std::vector<uint32_t> *blob,
+void WriteBitwiseOr(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -2249,7 +2192,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpBitwiseOr);
}
-void WriteBitwiseXor(std::vector<uint32_t> *blob,
+void WriteBitwiseXor(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -2263,7 +2206,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpBitwiseXor);
}
-void WriteBitwiseAnd(std::vector<uint32_t> *blob,
+void WriteBitwiseAnd(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
@@ -2277,10 +2220,7 @@
blob->push_back(operand2);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpBitwiseAnd);
}
-void WriteNot(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef operand)
+void WriteNot(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef operand)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -2289,7 +2229,7 @@
blob->push_back(operand);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpNot);
}
-void WriteBitFieldInsert(std::vector<uint32_t> *blob,
+void WriteBitFieldInsert(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef base,
@@ -2307,7 +2247,7 @@
blob->push_back(count);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpBitFieldInsert);
}
-void WriteBitFieldSExtract(std::vector<uint32_t> *blob,
+void WriteBitFieldSExtract(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef base,
@@ -2323,7 +2263,7 @@
blob->push_back(count);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpBitFieldSExtract);
}
-void WriteBitFieldUExtract(std::vector<uint32_t> *blob,
+void WriteBitFieldUExtract(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef base,
@@ -2339,10 +2279,7 @@
blob->push_back(count);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpBitFieldUExtract);
}
-void WriteBitReverse(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef base)
+void WriteBitReverse(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef base)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -2351,10 +2288,7 @@
blob->push_back(base);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpBitReverse);
}
-void WriteBitCount(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef base)
+void WriteBitCount(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef base)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -2363,7 +2297,7 @@
blob->push_back(base);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpBitCount);
}
-void WriteDPdx(std::vector<uint32_t> *blob, IdResultType idResultType, IdResult idResult, IdRef p)
+void WriteDPdx(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -2372,7 +2306,7 @@
blob->push_back(p);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpDPdx);
}
-void WriteDPdy(std::vector<uint32_t> *blob, IdResultType idResultType, IdResult idResult, IdRef p)
+void WriteDPdy(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -2381,7 +2315,7 @@
blob->push_back(p);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpDPdy);
}
-void WriteFwidth(std::vector<uint32_t> *blob, IdResultType idResultType, IdResult idResult, IdRef p)
+void WriteFwidth(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -2390,10 +2324,7 @@
blob->push_back(p);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFwidth);
}
-void WriteDPdxFine(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef p)
+void WriteDPdxFine(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -2402,10 +2333,7 @@
blob->push_back(p);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpDPdxFine);
}
-void WriteDPdyFine(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef p)
+void WriteDPdyFine(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -2414,10 +2342,7 @@
blob->push_back(p);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpDPdyFine);
}
-void WriteFwidthFine(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef p)
+void WriteFwidthFine(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -2426,10 +2351,7 @@
blob->push_back(p);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFwidthFine);
}
-void WriteDPdxCoarse(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef p)
+void WriteDPdxCoarse(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -2438,10 +2360,7 @@
blob->push_back(p);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpDPdxCoarse);
}
-void WriteDPdyCoarse(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef p)
+void WriteDPdyCoarse(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -2450,10 +2369,7 @@
blob->push_back(p);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpDPdyCoarse);
}
-void WriteFwidthCoarse(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef p)
+void WriteFwidthCoarse(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -2462,38 +2378,35 @@
blob->push_back(p);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpFwidthCoarse);
}
-void WriteEmitVertex(std::vector<uint32_t> *blob)
+void WriteEmitVertex(Blob *blob)
{
const size_t startSize = blob->size();
blob->push_back(0);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpEmitVertex);
}
-void WriteEndPrimitive(std::vector<uint32_t> *blob)
+void WriteEndPrimitive(Blob *blob)
{
const size_t startSize = blob->size();
blob->push_back(0);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpEndPrimitive);
}
-void WriteEmitStreamVertex(std::vector<uint32_t> *blob, IdRef stream)
+void WriteEmitStreamVertex(Blob *blob, IdRef stream)
{
const size_t startSize = blob->size();
blob->push_back(0);
blob->push_back(stream);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpEmitStreamVertex);
}
-void WriteEndStreamPrimitive(std::vector<uint32_t> *blob, IdRef stream)
+void WriteEndStreamPrimitive(Blob *blob, IdRef stream)
{
const size_t startSize = blob->size();
blob->push_back(0);
blob->push_back(stream);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpEndStreamPrimitive);
}
-void WriteControlBarrier(std::vector<uint32_t> *blob,
- IdScope execution,
- IdScope memory,
- IdMemorySemantics semantics)
+void WriteControlBarrier(Blob *blob, IdScope execution, IdScope memory, IdMemorySemantics semantics)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -2502,7 +2415,7 @@
blob->push_back(semantics);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpControlBarrier);
}
-void WriteMemoryBarrier(std::vector<uint32_t> *blob, IdScope memory, IdMemorySemantics semantics)
+void WriteMemoryBarrier(Blob *blob, IdScope memory, IdMemorySemantics semantics)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -2510,7 +2423,7 @@
blob->push_back(semantics);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpMemoryBarrier);
}
-void WriteAtomicLoad(std::vector<uint32_t> *blob,
+void WriteAtomicLoad(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
@@ -2526,7 +2439,7 @@
blob->push_back(semantics);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpAtomicLoad);
}
-void WriteAtomicStore(std::vector<uint32_t> *blob,
+void WriteAtomicStore(Blob *blob,
IdRef pointer,
IdScope scope,
IdMemorySemantics semantics,
@@ -2540,7 +2453,7 @@
blob->push_back(value);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpAtomicStore);
}
-void WriteAtomicExchange(std::vector<uint32_t> *blob,
+void WriteAtomicExchange(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
@@ -2558,7 +2471,7 @@
blob->push_back(value);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpAtomicExchange);
}
-void WriteAtomicCompareExchange(std::vector<uint32_t> *blob,
+void WriteAtomicCompareExchange(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
@@ -2580,7 +2493,7 @@
blob->push_back(comparator);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpAtomicCompareExchange);
}
-void WriteAtomicIIncrement(std::vector<uint32_t> *blob,
+void WriteAtomicIIncrement(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
@@ -2596,7 +2509,7 @@
blob->push_back(semantics);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpAtomicIIncrement);
}
-void WriteAtomicIDecrement(std::vector<uint32_t> *blob,
+void WriteAtomicIDecrement(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
@@ -2612,7 +2525,7 @@
blob->push_back(semantics);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpAtomicIDecrement);
}
-void WriteAtomicIAdd(std::vector<uint32_t> *blob,
+void WriteAtomicIAdd(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
@@ -2630,7 +2543,7 @@
blob->push_back(value);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpAtomicIAdd);
}
-void WriteAtomicISub(std::vector<uint32_t> *blob,
+void WriteAtomicISub(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
@@ -2648,7 +2561,7 @@
blob->push_back(value);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpAtomicISub);
}
-void WriteAtomicSMin(std::vector<uint32_t> *blob,
+void WriteAtomicSMin(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
@@ -2666,7 +2579,7 @@
blob->push_back(value);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpAtomicSMin);
}
-void WriteAtomicUMin(std::vector<uint32_t> *blob,
+void WriteAtomicUMin(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
@@ -2684,7 +2597,7 @@
blob->push_back(value);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpAtomicUMin);
}
-void WriteAtomicSMax(std::vector<uint32_t> *blob,
+void WriteAtomicSMax(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
@@ -2702,7 +2615,7 @@
blob->push_back(value);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpAtomicSMax);
}
-void WriteAtomicUMax(std::vector<uint32_t> *blob,
+void WriteAtomicUMax(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
@@ -2720,7 +2633,7 @@
blob->push_back(value);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpAtomicUMax);
}
-void WriteAtomicAnd(std::vector<uint32_t> *blob,
+void WriteAtomicAnd(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
@@ -2738,7 +2651,7 @@
blob->push_back(value);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpAtomicAnd);
}
-void WriteAtomicOr(std::vector<uint32_t> *blob,
+void WriteAtomicOr(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
@@ -2756,7 +2669,7 @@
blob->push_back(value);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpAtomicOr);
}
-void WriteAtomicXor(std::vector<uint32_t> *blob,
+void WriteAtomicXor(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
@@ -2774,7 +2687,7 @@
blob->push_back(value);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpAtomicXor);
}
-void WritePhi(std::vector<uint32_t> *blob,
+void WritePhi(Blob *blob,
IdResultType idResultType,
IdResult idResult,
const PairIdRefIdRefList &variableParentPairList)
@@ -2790,7 +2703,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpPhi);
}
-void WriteLoopMerge(std::vector<uint32_t> *blob,
+void WriteLoopMerge(Blob *blob,
IdRef mergeBlock,
IdRef continueTarget,
spv::LoopControlMask loopControl)
@@ -2802,9 +2715,7 @@
blob->push_back(loopControl);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpLoopMerge);
}
-void WriteSelectionMerge(std::vector<uint32_t> *blob,
- IdRef mergeBlock,
- spv::SelectionControlMask selectionControl)
+void WriteSelectionMerge(Blob *blob, IdRef mergeBlock, spv::SelectionControlMask selectionControl)
{
const size_t startSize = blob->size();
blob->push_back(0);
@@ -2812,21 +2723,21 @@
blob->push_back(selectionControl);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpSelectionMerge);
}
-void WriteLabel(std::vector<uint32_t> *blob, IdResult idResult)
+void WriteLabel(Blob *blob, IdResult idResult)
{
const size_t startSize = blob->size();
blob->push_back(0);
blob->push_back(idResult);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpLabel);
}
-void WriteBranch(std::vector<uint32_t> *blob, IdRef targetLabel)
+void WriteBranch(Blob *blob, IdRef targetLabel)
{
const size_t startSize = blob->size();
blob->push_back(0);
blob->push_back(targetLabel);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpBranch);
}
-void WriteBranchConditional(std::vector<uint32_t> *blob,
+void WriteBranchConditional(Blob *blob,
IdRef condition,
IdRef trueLabel,
IdRef falseLabel,
@@ -2843,7 +2754,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpBranchConditional);
}
-void WriteSwitch(std::vector<uint32_t> *blob,
+void WriteSwitch(Blob *blob,
IdRef selector,
IdRef default_,
const PairLiteralIntegerIdRefList &targetPairList)
@@ -2859,35 +2770,35 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpSwitch);
}
-void WriteKill(std::vector<uint32_t> *blob)
+void WriteKill(Blob *blob)
{
const size_t startSize = blob->size();
blob->push_back(0);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpKill);
}
-void WriteReturn(std::vector<uint32_t> *blob)
+void WriteReturn(Blob *blob)
{
const size_t startSize = blob->size();
blob->push_back(0);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpReturn);
}
-void WriteReturnValue(std::vector<uint32_t> *blob, IdRef value)
+void WriteReturnValue(Blob *blob, IdRef value)
{
const size_t startSize = blob->size();
blob->push_back(0);
blob->push_back(value);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpReturnValue);
}
-void WriteUnreachable(std::vector<uint32_t> *blob)
+void WriteUnreachable(Blob *blob)
{
const size_t startSize = blob->size();
blob->push_back(0);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpUnreachable);
}
-void WriteGroupAll(std::vector<uint32_t> *blob,
+void WriteGroupAll(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
@@ -2901,7 +2812,7 @@
blob->push_back(predicate);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpGroupAll);
}
-void WriteGroupAny(std::vector<uint32_t> *blob,
+void WriteGroupAny(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
@@ -2915,7 +2826,7 @@
blob->push_back(predicate);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpGroupAny);
}
-void WriteGroupBroadcast(std::vector<uint32_t> *blob,
+void WriteGroupBroadcast(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
@@ -2931,7 +2842,7 @@
blob->push_back(localId);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpGroupBroadcast);
}
-void WriteGroupIAdd(std::vector<uint32_t> *blob,
+void WriteGroupIAdd(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
@@ -2947,7 +2858,7 @@
blob->push_back(x);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpGroupIAdd);
}
-void WriteGroupFAdd(std::vector<uint32_t> *blob,
+void WriteGroupFAdd(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
@@ -2963,7 +2874,7 @@
blob->push_back(x);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpGroupFAdd);
}
-void WriteGroupFMin(std::vector<uint32_t> *blob,
+void WriteGroupFMin(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
@@ -2979,7 +2890,7 @@
blob->push_back(x);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpGroupFMin);
}
-void WriteGroupUMin(std::vector<uint32_t> *blob,
+void WriteGroupUMin(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
@@ -2995,7 +2906,7 @@
blob->push_back(x);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpGroupUMin);
}
-void WriteGroupSMin(std::vector<uint32_t> *blob,
+void WriteGroupSMin(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
@@ -3011,7 +2922,7 @@
blob->push_back(x);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpGroupSMin);
}
-void WriteGroupFMax(std::vector<uint32_t> *blob,
+void WriteGroupFMax(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
@@ -3027,7 +2938,7 @@
blob->push_back(x);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpGroupFMax);
}
-void WriteGroupUMax(std::vector<uint32_t> *blob,
+void WriteGroupUMax(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
@@ -3043,7 +2954,7 @@
blob->push_back(x);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpGroupUMax);
}
-void WriteGroupSMax(std::vector<uint32_t> *blob,
+void WriteGroupSMax(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
@@ -3059,7 +2970,7 @@
blob->push_back(x);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpGroupSMax);
}
-void WriteImageSparseSampleImplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSparseSampleImplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -3084,7 +2995,7 @@
(*blob)[startSize] =
MakeLengthOp(blob->size() - startSize, spv::OpImageSparseSampleImplicitLod);
}
-void WriteImageSparseSampleExplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSparseSampleExplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -3106,7 +3017,7 @@
(*blob)[startSize] =
MakeLengthOp(blob->size() - startSize, spv::OpImageSparseSampleExplicitLod);
}
-void WriteImageSparseSampleDrefImplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSparseSampleDrefImplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -3133,7 +3044,7 @@
(*blob)[startSize] =
MakeLengthOp(blob->size() - startSize, spv::OpImageSparseSampleDrefImplicitLod);
}
-void WriteImageSparseSampleDrefExplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSparseSampleDrefExplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -3157,7 +3068,7 @@
(*blob)[startSize] =
MakeLengthOp(blob->size() - startSize, spv::OpImageSparseSampleDrefExplicitLod);
}
-void WriteImageSparseSampleProjImplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSparseSampleProjImplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -3182,7 +3093,7 @@
(*blob)[startSize] =
MakeLengthOp(blob->size() - startSize, spv::OpImageSparseSampleProjImplicitLod);
}
-void WriteImageSparseSampleProjExplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSparseSampleProjExplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -3204,7 +3115,7 @@
(*blob)[startSize] =
MakeLengthOp(blob->size() - startSize, spv::OpImageSparseSampleProjExplicitLod);
}
-void WriteImageSparseSampleProjDrefImplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSparseSampleProjDrefImplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -3231,7 +3142,7 @@
(*blob)[startSize] =
MakeLengthOp(blob->size() - startSize, spv::OpImageSparseSampleProjDrefImplicitLod);
}
-void WriteImageSparseSampleProjDrefExplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSparseSampleProjDrefExplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -3255,7 +3166,7 @@
(*blob)[startSize] =
MakeLengthOp(blob->size() - startSize, spv::OpImageSparseSampleProjDrefExplicitLod);
}
-void WriteImageSparseFetch(std::vector<uint32_t> *blob,
+void WriteImageSparseFetch(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef image,
@@ -3279,7 +3190,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpImageSparseFetch);
}
-void WriteImageSparseGather(std::vector<uint32_t> *blob,
+void WriteImageSparseGather(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -3305,7 +3216,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpImageSparseGather);
}
-void WriteImageSparseDrefGather(std::vector<uint32_t> *blob,
+void WriteImageSparseDrefGather(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -3331,7 +3242,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpImageSparseDrefGather);
}
-void WriteImageSparseTexelsResident(std::vector<uint32_t> *blob,
+void WriteImageSparseTexelsResident(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef residentCode)
@@ -3343,14 +3254,14 @@
blob->push_back(residentCode);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpImageSparseTexelsResident);
}
-void WriteNoLine(std::vector<uint32_t> *blob)
+void WriteNoLine(Blob *blob)
{
const size_t startSize = blob->size();
blob->push_back(0);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpNoLine);
}
-void WriteImageSparseRead(std::vector<uint32_t> *blob,
+void WriteImageSparseRead(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef image,
@@ -3374,7 +3285,7 @@
}
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpImageSparseRead);
}
-void WriteGroupIAddNonUniformAMD(std::vector<uint32_t> *blob,
+void WriteGroupIAddNonUniformAMD(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
@@ -3390,7 +3301,7 @@
blob->push_back(x);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpGroupIAddNonUniformAMD);
}
-void WriteGroupFAddNonUniformAMD(std::vector<uint32_t> *blob,
+void WriteGroupFAddNonUniformAMD(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
@@ -3406,7 +3317,7 @@
blob->push_back(x);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpGroupFAddNonUniformAMD);
}
-void WriteGroupFMinNonUniformAMD(std::vector<uint32_t> *blob,
+void WriteGroupFMinNonUniformAMD(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
@@ -3422,7 +3333,7 @@
blob->push_back(x);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpGroupFMinNonUniformAMD);
}
-void WriteGroupUMinNonUniformAMD(std::vector<uint32_t> *blob,
+void WriteGroupUMinNonUniformAMD(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
@@ -3438,7 +3349,7 @@
blob->push_back(x);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpGroupUMinNonUniformAMD);
}
-void WriteGroupSMinNonUniformAMD(std::vector<uint32_t> *blob,
+void WriteGroupSMinNonUniformAMD(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
@@ -3454,7 +3365,7 @@
blob->push_back(x);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpGroupSMinNonUniformAMD);
}
-void WriteGroupFMaxNonUniformAMD(std::vector<uint32_t> *blob,
+void WriteGroupFMaxNonUniformAMD(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
@@ -3470,7 +3381,7 @@
blob->push_back(x);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpGroupFMaxNonUniformAMD);
}
-void WriteGroupUMaxNonUniformAMD(std::vector<uint32_t> *blob,
+void WriteGroupUMaxNonUniformAMD(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
@@ -3486,7 +3397,7 @@
blob->push_back(x);
(*blob)[startSize] = MakeLengthOp(blob->size() - startSize, spv::OpGroupUMaxNonUniformAMD);
}
-void WriteGroupSMaxNonUniformAMD(std::vector<uint32_t> *blob,
+void WriteGroupSMaxNonUniformAMD(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
diff --git a/src/common/spirv/spirv_instruction_builder_autogen.h b/src/common/spirv/spirv_instruction_builder_autogen.h
index 19a291c..d3ef333 100644
--- a/src/common/spirv/spirv_instruction_builder_autogen.h
+++ b/src/common/spirv/spirv_instruction_builder_autogen.h
@@ -11,62 +11,57 @@
#ifndef COMMON_SPIRV_SPIRVINSTRUCTIONBUILDERAUTOGEN_H_
#define COMMON_SPIRV_SPIRVINSTRUCTIONBUILDERAUTOGEN_H_
+#include <spirv/unified1/spirv.hpp>
+
#include "spirv_types.h"
namespace angle
{
namespace spirv
{
-void WriteNop(std::vector<uint32_t> *blob);
-void WriteUndef(std::vector<uint32_t> *blob, IdResultType idResultType, IdResult idResult);
-void WriteSourceContinued(std::vector<uint32_t> *blob, LiteralString continuedSource);
-void WriteSource(std::vector<uint32_t> *blob,
+
+void WriteSpirvHeader(std::vector<uint32_t> *blob, uint32_t idCount);
+void WriteNop(Blob *blob);
+void WriteUndef(Blob *blob, IdResultType idResultType, IdResult idResult);
+void WriteSourceContinued(Blob *blob, LiteralString continuedSource);
+void WriteSource(Blob *blob,
spv::SourceLanguage sourceLanguage,
LiteralInteger version,
const IdRef *file,
const LiteralString *source);
-void WriteSourceExtension(std::vector<uint32_t> *blob, LiteralString extension);
-void WriteName(std::vector<uint32_t> *blob, IdRef target, LiteralString name);
-void WriteMemberName(std::vector<uint32_t> *blob,
- IdRef type,
- LiteralInteger member,
- LiteralString name);
-void WriteString(std::vector<uint32_t> *blob, IdResult idResult, LiteralString string);
-void WriteLine(std::vector<uint32_t> *blob, IdRef file, LiteralInteger line, LiteralInteger column);
-void WriteExtension(std::vector<uint32_t> *blob, LiteralString name);
-void WriteExtInstImport(std::vector<uint32_t> *blob, IdResult idResult, LiteralString name);
-void WriteExtInst(std::vector<uint32_t> *blob,
+void WriteSourceExtension(Blob *blob, LiteralString extension);
+void WriteName(Blob *blob, IdRef target, LiteralString name);
+void WriteMemberName(Blob *blob, IdRef type, LiteralInteger member, LiteralString name);
+void WriteString(Blob *blob, IdResult idResult, LiteralString string);
+void WriteLine(Blob *blob, IdRef file, LiteralInteger line, LiteralInteger column);
+void WriteExtension(Blob *blob, LiteralString name);
+void WriteExtInstImport(Blob *blob, IdResult idResult, LiteralString name);
+void WriteExtInst(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef set,
LiteralExtInstInteger instruction,
const IdRefList &operandList);
-void WriteMemoryModel(std::vector<uint32_t> *blob,
+void WriteMemoryModel(Blob *blob,
spv::AddressingModel addressingModel,
spv::MemoryModel memoryModel);
-void WriteEntryPoint(std::vector<uint32_t> *blob,
+void WriteEntryPoint(Blob *blob,
spv::ExecutionModel executionModel,
IdRef entryPoint,
LiteralString name,
const IdRefList &interfaceList);
-void WriteExecutionMode(std::vector<uint32_t> *blob, IdRef entryPoint, spv::ExecutionMode mode);
-void WriteCapability(std::vector<uint32_t> *blob, spv::Capability capability);
-void WriteTypeVoid(std::vector<uint32_t> *blob, IdResult idResult);
-void WriteTypeBool(std::vector<uint32_t> *blob, IdResult idResult);
-void WriteTypeInt(std::vector<uint32_t> *blob,
- IdResult idResult,
- LiteralInteger width,
- LiteralInteger signedness);
-void WriteTypeFloat(std::vector<uint32_t> *blob, IdResult idResult, LiteralInteger width);
-void WriteTypeVector(std::vector<uint32_t> *blob,
+void WriteExecutionMode(Blob *blob, IdRef entryPoint, spv::ExecutionMode mode);
+void WriteCapability(Blob *blob, spv::Capability capability);
+void WriteTypeVoid(Blob *blob, IdResult idResult);
+void WriteTypeBool(Blob *blob, IdResult idResult);
+void WriteTypeInt(Blob *blob, IdResult idResult, LiteralInteger width, LiteralInteger signedness);
+void WriteTypeFloat(Blob *blob, IdResult idResult, LiteralInteger width);
+void WriteTypeVector(Blob *blob,
IdResult idResult,
IdRef componentType,
LiteralInteger componentCount);
-void WriteTypeMatrix(std::vector<uint32_t> *blob,
- IdResult idResult,
- IdRef columnType,
- LiteralInteger columnCount);
-void WriteTypeImage(std::vector<uint32_t> *blob,
+void WriteTypeMatrix(Blob *blob, IdResult idResult, IdRef columnType, LiteralInteger columnCount);
+void WriteTypeImage(Blob *blob,
IdResult idResult,
IdRef sampledType,
spv::Dim dim,
@@ -76,190 +71,165 @@
LiteralInteger sampled,
spv::ImageFormat imageFormat,
const spv::AccessQualifier *accessQualifier);
-void WriteTypeSampler(std::vector<uint32_t> *blob, IdResult idResult);
-void WriteTypeSampledImage(std::vector<uint32_t> *blob, IdResult idResult, IdRef imageType);
-void WriteTypeArray(std::vector<uint32_t> *blob,
- IdResult idResult,
- IdRef elementType,
- IdRef length);
-void WriteTypeRuntimeArray(std::vector<uint32_t> *blob, IdResult idResult, IdRef elementType);
-void WriteTypeStruct(std::vector<uint32_t> *blob, IdResult idResult, const IdRefList &memberList);
-void WriteTypePointer(std::vector<uint32_t> *blob,
- IdResult idResult,
- spv::StorageClass storageClass,
- IdRef type);
-void WriteTypeFunction(std::vector<uint32_t> *blob,
+void WriteTypeSampler(Blob *blob, IdResult idResult);
+void WriteTypeSampledImage(Blob *blob, IdResult idResult, IdRef imageType);
+void WriteTypeArray(Blob *blob, IdResult idResult, IdRef elementType, IdRef length);
+void WriteTypeRuntimeArray(Blob *blob, IdResult idResult, IdRef elementType);
+void WriteTypeStruct(Blob *blob, IdResult idResult, const IdRefList &memberList);
+void WriteTypePointer(Blob *blob, IdResult idResult, spv::StorageClass storageClass, IdRef type);
+void WriteTypeFunction(Blob *blob,
IdResult idResult,
IdRef returnType,
const IdRefList ¶meterList);
-void WriteTypeForwardPointer(std::vector<uint32_t> *blob,
- IdRef pointerType,
- spv::StorageClass storageClass);
-void WriteConstantTrue(std::vector<uint32_t> *blob, IdResultType idResultType, IdResult idResult);
-void WriteConstantFalse(std::vector<uint32_t> *blob, IdResultType idResultType, IdResult idResult);
-void WriteConstant(std::vector<uint32_t> *blob,
+void WriteTypeForwardPointer(Blob *blob, IdRef pointerType, spv::StorageClass storageClass);
+void WriteConstantTrue(Blob *blob, IdResultType idResultType, IdResult idResult);
+void WriteConstantFalse(Blob *blob, IdResultType idResultType, IdResult idResult);
+void WriteConstant(Blob *blob,
IdResultType idResultType,
IdResult idResult,
LiteralContextDependentNumber value);
-void WriteConstantComposite(std::vector<uint32_t> *blob,
+void WriteConstantComposite(Blob *blob,
IdResultType idResultType,
IdResult idResult,
const IdRefList &constituentsList);
-void WriteConstantNull(std::vector<uint32_t> *blob, IdResultType idResultType, IdResult idResult);
-void WriteSpecConstantTrue(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult);
-void WriteSpecConstantFalse(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult);
-void WriteSpecConstant(std::vector<uint32_t> *blob,
+void WriteConstantNull(Blob *blob, IdResultType idResultType, IdResult idResult);
+void WriteSpecConstantTrue(Blob *blob, IdResultType idResultType, IdResult idResult);
+void WriteSpecConstantFalse(Blob *blob, IdResultType idResultType, IdResult idResult);
+void WriteSpecConstant(Blob *blob,
IdResultType idResultType,
IdResult idResult,
LiteralContextDependentNumber value);
-void WriteSpecConstantComposite(std::vector<uint32_t> *blob,
+void WriteSpecConstantComposite(Blob *blob,
IdResultType idResultType,
IdResult idResult,
const IdRefList &constituentsList);
-void WriteFunction(std::vector<uint32_t> *blob,
+void WriteFunction(Blob *blob,
IdResultType idResultType,
IdResult idResult,
spv::FunctionControlMask functionControl,
IdRef functionType);
-void WriteFunctionParameter(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult);
-void WriteFunctionEnd(std::vector<uint32_t> *blob);
-void WriteFunctionCall(std::vector<uint32_t> *blob,
+void WriteFunctionParameter(Blob *blob, IdResultType idResultType, IdResult idResult);
+void WriteFunctionEnd(Blob *blob);
+void WriteFunctionCall(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef function,
const IdRefList &argumentList);
-void WriteVariable(std::vector<uint32_t> *blob,
+void WriteVariable(Blob *blob,
IdResultType idResultType,
IdResult idResult,
spv::StorageClass storageClass,
const IdRef *initializer);
-void WriteImageTexelPointer(std::vector<uint32_t> *blob,
+void WriteImageTexelPointer(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef image,
IdRef coordinate,
IdRef sample);
-void WriteLoad(std::vector<uint32_t> *blob,
+void WriteLoad(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
const spv::MemoryAccessMask *memoryAccess);
-void WriteStore(std::vector<uint32_t> *blob,
- IdRef pointer,
- IdRef object,
- const spv::MemoryAccessMask *memoryAccess);
-void WriteCopyMemory(std::vector<uint32_t> *blob,
+void WriteStore(Blob *blob, IdRef pointer, IdRef object, const spv::MemoryAccessMask *memoryAccess);
+void WriteCopyMemory(Blob *blob,
IdRef target,
IdRef source,
const spv::MemoryAccessMask *memoryAccess);
-void WriteCopyMemorySized(std::vector<uint32_t> *blob,
+void WriteCopyMemorySized(Blob *blob,
IdRef target,
IdRef source,
IdRef size,
const spv::MemoryAccessMask *memoryAccess);
-void WriteAccessChain(std::vector<uint32_t> *blob,
+void WriteAccessChain(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef base,
const IdRefList &indexesList);
-void WriteInBoundsAccessChain(std::vector<uint32_t> *blob,
+void WriteInBoundsAccessChain(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef base,
const IdRefList &indexesList);
-void WriteArrayLength(std::vector<uint32_t> *blob,
+void WriteArrayLength(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef structure,
LiteralInteger arraymember);
-void WriteInBoundsPtrAccessChain(std::vector<uint32_t> *blob,
+void WriteInBoundsPtrAccessChain(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef base,
IdRef element,
const IdRefList &indexesList);
-void WriteDecorate(std::vector<uint32_t> *blob,
+void WriteDecorate(Blob *blob,
IdRef target,
spv::Decoration decoration,
const LiteralIntegerList &valuesPairList);
-void WriteMemberDecorate(std::vector<uint32_t> *blob,
+void WriteMemberDecorate(Blob *blob,
IdRef structureType,
LiteralInteger member,
spv::Decoration decoration,
const LiteralIntegerList &valuesPairList);
-void WriteDecorationGroup(std::vector<uint32_t> *blob, IdResult idResult);
-void WriteGroupDecorate(std::vector<uint32_t> *blob,
- IdRef decorationGroup,
- const IdRefList &targetsList);
-void WriteGroupMemberDecorate(std::vector<uint32_t> *blob,
+void WriteDecorationGroup(Blob *blob, IdResult idResult);
+void WriteGroupDecorate(Blob *blob, IdRef decorationGroup, const IdRefList &targetsList);
+void WriteGroupMemberDecorate(Blob *blob,
IdRef decorationGroup,
const PairIdRefLiteralIntegerList &targetsPairList);
-void WriteVectorExtractDynamic(std::vector<uint32_t> *blob,
+void WriteVectorExtractDynamic(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef vector,
IdRef index);
-void WriteVectorInsertDynamic(std::vector<uint32_t> *blob,
+void WriteVectorInsertDynamic(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef vector,
IdRef component,
IdRef index);
-void WriteVectorShuffle(std::vector<uint32_t> *blob,
+void WriteVectorShuffle(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef vector1,
IdRef vector2,
const LiteralIntegerList &componentsPairList);
-void WriteCompositeConstruct(std::vector<uint32_t> *blob,
+void WriteCompositeConstruct(Blob *blob,
IdResultType idResultType,
IdResult idResult,
const IdRefList &constituentsList);
-void WriteCompositeExtract(std::vector<uint32_t> *blob,
+void WriteCompositeExtract(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef composite,
const LiteralIntegerList &indexesPairList);
-void WriteCompositeInsert(std::vector<uint32_t> *blob,
+void WriteCompositeInsert(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef object,
IdRef composite,
const LiteralIntegerList &indexesPairList);
-void WriteCopyObject(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef operand);
-void WriteTranspose(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef matrix);
-void WriteSampledImage(std::vector<uint32_t> *blob,
+void WriteCopyObject(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef operand);
+void WriteTranspose(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef matrix);
+void WriteSampledImage(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef image,
IdRef sampler);
-void WriteImageSampleImplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSampleImplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
IdRef coordinate,
const spv::ImageOperandsMask *imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageSampleExplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSampleExplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
IdRef coordinate,
spv::ImageOperandsMask imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageSampleDrefImplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSampleDrefImplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -267,7 +237,7 @@
IdRef dref,
const spv::ImageOperandsMask *imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageSampleDrefExplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSampleDrefExplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -275,21 +245,21 @@
IdRef dref,
spv::ImageOperandsMask imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageSampleProjImplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSampleProjImplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
IdRef coordinate,
const spv::ImageOperandsMask *imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageSampleProjExplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSampleProjExplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
IdRef coordinate,
spv::ImageOperandsMask imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageSampleProjDrefImplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSampleProjDrefImplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -297,7 +267,7 @@
IdRef dref,
const spv::ImageOperandsMask *imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageSampleProjDrefExplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSampleProjDrefExplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -305,14 +275,14 @@
IdRef dref,
spv::ImageOperandsMask imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageFetch(std::vector<uint32_t> *blob,
+void WriteImageFetch(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef image,
IdRef coordinate,
const spv::ImageOperandsMask *imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageGather(std::vector<uint32_t> *blob,
+void WriteImageGather(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -320,7 +290,7 @@
IdRef component,
const spv::ImageOperandsMask *imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageDrefGather(std::vector<uint32_t> *blob,
+void WriteImageDrefGather(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -328,474 +298,399 @@
IdRef dref,
const spv::ImageOperandsMask *imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageRead(std::vector<uint32_t> *blob,
+void WriteImageRead(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef image,
IdRef coordinate,
const spv::ImageOperandsMask *imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageWrite(std::vector<uint32_t> *blob,
+void WriteImageWrite(Blob *blob,
IdRef image,
IdRef coordinate,
IdRef texel,
const spv::ImageOperandsMask *imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImage(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef sampledImage);
-void WriteImageQueryLod(std::vector<uint32_t> *blob,
+void WriteImage(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef sampledImage);
+void WriteImageQueryLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
IdRef coordinate);
-void WriteConvertFToU(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef floatValue);
-void WriteConvertFToS(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef floatValue);
-void WriteConvertSToF(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef signedValue);
-void WriteConvertUToF(std::vector<uint32_t> *blob,
+void WriteConvertFToU(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef floatValue);
+void WriteConvertFToS(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef floatValue);
+void WriteConvertSToF(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef signedValue);
+void WriteConvertUToF(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef unsignedValue);
-void WriteUConvert(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef unsignedValue);
-void WriteSConvert(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef signedValue);
-void WriteFConvert(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef floatValue);
-void WriteQuantizeToF16(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef value);
-void WriteConvertPtrToU(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef pointer);
-void WriteConvertUToPtr(std::vector<uint32_t> *blob,
+void WriteUConvert(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef unsignedValue);
+void WriteSConvert(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef signedValue);
+void WriteFConvert(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef floatValue);
+void WriteQuantizeToF16(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef value);
+void WriteConvertPtrToU(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef pointer);
+void WriteConvertUToPtr(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef integerValue);
-void WriteBitcast(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef operand);
-void WriteSNegate(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef operand);
-void WriteFNegate(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef operand);
-void WriteIAdd(std::vector<uint32_t> *blob,
+void WriteBitcast(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef operand);
+void WriteSNegate(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef operand);
+void WriteFNegate(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef operand);
+void WriteIAdd(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteFAdd(std::vector<uint32_t> *blob,
+void WriteFAdd(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteISub(std::vector<uint32_t> *blob,
+void WriteISub(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteFSub(std::vector<uint32_t> *blob,
+void WriteFSub(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteIMul(std::vector<uint32_t> *blob,
+void WriteIMul(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteFMul(std::vector<uint32_t> *blob,
+void WriteFMul(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteUDiv(std::vector<uint32_t> *blob,
+void WriteUDiv(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteSDiv(std::vector<uint32_t> *blob,
+void WriteSDiv(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteFDiv(std::vector<uint32_t> *blob,
+void WriteFDiv(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteUMod(std::vector<uint32_t> *blob,
+void WriteUMod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteSRem(std::vector<uint32_t> *blob,
+void WriteSRem(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteSMod(std::vector<uint32_t> *blob,
+void WriteSMod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteFRem(std::vector<uint32_t> *blob,
+void WriteFRem(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteFMod(std::vector<uint32_t> *blob,
+void WriteFMod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteVectorTimesScalar(std::vector<uint32_t> *blob,
+void WriteVectorTimesScalar(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef vector,
IdRef scalar);
-void WriteMatrixTimesScalar(std::vector<uint32_t> *blob,
+void WriteMatrixTimesScalar(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef matrix,
IdRef scalar);
-void WriteVectorTimesMatrix(std::vector<uint32_t> *blob,
+void WriteVectorTimesMatrix(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef vector,
IdRef matrix);
-void WriteMatrixTimesVector(std::vector<uint32_t> *blob,
+void WriteMatrixTimesVector(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef matrix,
IdRef vector);
-void WriteMatrixTimesMatrix(std::vector<uint32_t> *blob,
+void WriteMatrixTimesMatrix(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef leftMatrix,
IdRef rightMatrix);
-void WriteOuterProduct(std::vector<uint32_t> *blob,
+void WriteOuterProduct(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef vector1,
IdRef vector2);
-void WriteDot(std::vector<uint32_t> *blob,
+void WriteDot(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef vector1,
IdRef vector2);
-void WriteIAddCarry(std::vector<uint32_t> *blob,
+void WriteIAddCarry(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteISubBorrow(std::vector<uint32_t> *blob,
+void WriteISubBorrow(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteUMulExtended(std::vector<uint32_t> *blob,
+void WriteUMulExtended(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteSMulExtended(std::vector<uint32_t> *blob,
+void WriteSMulExtended(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteAny(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef vector);
-void WriteAll(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef vector);
-void WriteIsNan(std::vector<uint32_t> *blob, IdResultType idResultType, IdResult idResult, IdRef x);
-void WriteIsInf(std::vector<uint32_t> *blob, IdResultType idResultType, IdResult idResult, IdRef x);
-void WriteLogicalEqual(std::vector<uint32_t> *blob,
+void WriteAny(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef vector);
+void WriteAll(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef vector);
+void WriteIsNan(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef x);
+void WriteIsInf(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef x);
+void WriteLogicalEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteLogicalNotEqual(std::vector<uint32_t> *blob,
+void WriteLogicalNotEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteLogicalOr(std::vector<uint32_t> *blob,
+void WriteLogicalOr(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteLogicalAnd(std::vector<uint32_t> *blob,
+void WriteLogicalAnd(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteLogicalNot(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef operand);
-void WriteSelect(std::vector<uint32_t> *blob,
+void WriteLogicalNot(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef operand);
+void WriteSelect(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef condition,
IdRef object1,
IdRef object2);
-void WriteIEqual(std::vector<uint32_t> *blob,
+void WriteIEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteINotEqual(std::vector<uint32_t> *blob,
+void WriteINotEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteUGreaterThan(std::vector<uint32_t> *blob,
+void WriteUGreaterThan(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteSGreaterThan(std::vector<uint32_t> *blob,
+void WriteSGreaterThan(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteUGreaterThanEqual(std::vector<uint32_t> *blob,
+void WriteUGreaterThanEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteSGreaterThanEqual(std::vector<uint32_t> *blob,
+void WriteSGreaterThanEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteULessThan(std::vector<uint32_t> *blob,
+void WriteULessThan(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteSLessThan(std::vector<uint32_t> *blob,
+void WriteSLessThan(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteULessThanEqual(std::vector<uint32_t> *blob,
+void WriteULessThanEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteSLessThanEqual(std::vector<uint32_t> *blob,
+void WriteSLessThanEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteFOrdEqual(std::vector<uint32_t> *blob,
+void WriteFOrdEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteFUnordEqual(std::vector<uint32_t> *blob,
+void WriteFUnordEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteFOrdNotEqual(std::vector<uint32_t> *blob,
+void WriteFOrdNotEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteFUnordNotEqual(std::vector<uint32_t> *blob,
+void WriteFUnordNotEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteFOrdLessThan(std::vector<uint32_t> *blob,
+void WriteFOrdLessThan(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteFUnordLessThan(std::vector<uint32_t> *blob,
+void WriteFUnordLessThan(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteFOrdGreaterThan(std::vector<uint32_t> *blob,
+void WriteFOrdGreaterThan(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteFUnordGreaterThan(std::vector<uint32_t> *blob,
+void WriteFUnordGreaterThan(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteFOrdLessThanEqual(std::vector<uint32_t> *blob,
+void WriteFOrdLessThanEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteFUnordLessThanEqual(std::vector<uint32_t> *blob,
+void WriteFUnordLessThanEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteFOrdGreaterThanEqual(std::vector<uint32_t> *blob,
+void WriteFOrdGreaterThanEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteFUnordGreaterThanEqual(std::vector<uint32_t> *blob,
+void WriteFUnordGreaterThanEqual(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteShiftRightLogical(std::vector<uint32_t> *blob,
+void WriteShiftRightLogical(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef base,
IdRef shift);
-void WriteShiftRightArithmetic(std::vector<uint32_t> *blob,
+void WriteShiftRightArithmetic(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef base,
IdRef shift);
-void WriteShiftLeftLogical(std::vector<uint32_t> *blob,
+void WriteShiftLeftLogical(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef base,
IdRef shift);
-void WriteBitwiseOr(std::vector<uint32_t> *blob,
+void WriteBitwiseOr(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteBitwiseXor(std::vector<uint32_t> *blob,
+void WriteBitwiseXor(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteBitwiseAnd(std::vector<uint32_t> *blob,
+void WriteBitwiseAnd(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef operand1,
IdRef operand2);
-void WriteNot(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef operand);
-void WriteBitFieldInsert(std::vector<uint32_t> *blob,
+void WriteNot(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef operand);
+void WriteBitFieldInsert(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef base,
IdRef insert,
IdRef offset,
IdRef count);
-void WriteBitFieldSExtract(std::vector<uint32_t> *blob,
+void WriteBitFieldSExtract(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef base,
IdRef offset,
IdRef count);
-void WriteBitFieldUExtract(std::vector<uint32_t> *blob,
+void WriteBitFieldUExtract(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef base,
IdRef offset,
IdRef count);
-void WriteBitReverse(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef base);
-void WriteBitCount(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef base);
-void WriteDPdx(std::vector<uint32_t> *blob, IdResultType idResultType, IdResult idResult, IdRef p);
-void WriteDPdy(std::vector<uint32_t> *blob, IdResultType idResultType, IdResult idResult, IdRef p);
-void WriteFwidth(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef p);
-void WriteDPdxFine(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef p);
-void WriteDPdyFine(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef p);
-void WriteFwidthFine(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef p);
-void WriteDPdxCoarse(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef p);
-void WriteDPdyCoarse(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef p);
-void WriteFwidthCoarse(std::vector<uint32_t> *blob,
- IdResultType idResultType,
- IdResult idResult,
- IdRef p);
-void WriteEmitVertex(std::vector<uint32_t> *blob);
-void WriteEndPrimitive(std::vector<uint32_t> *blob);
-void WriteEmitStreamVertex(std::vector<uint32_t> *blob, IdRef stream);
-void WriteEndStreamPrimitive(std::vector<uint32_t> *blob, IdRef stream);
-void WriteControlBarrier(std::vector<uint32_t> *blob,
+void WriteBitReverse(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef base);
+void WriteBitCount(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef base);
+void WriteDPdx(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p);
+void WriteDPdy(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p);
+void WriteFwidth(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p);
+void WriteDPdxFine(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p);
+void WriteDPdyFine(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p);
+void WriteFwidthFine(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p);
+void WriteDPdxCoarse(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p);
+void WriteDPdyCoarse(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p);
+void WriteFwidthCoarse(Blob *blob, IdResultType idResultType, IdResult idResult, IdRef p);
+void WriteEmitVertex(Blob *blob);
+void WriteEndPrimitive(Blob *blob);
+void WriteEmitStreamVertex(Blob *blob, IdRef stream);
+void WriteEndStreamPrimitive(Blob *blob, IdRef stream);
+void WriteControlBarrier(Blob *blob,
IdScope execution,
IdScope memory,
IdMemorySemantics semantics);
-void WriteMemoryBarrier(std::vector<uint32_t> *blob, IdScope memory, IdMemorySemantics semantics);
-void WriteAtomicLoad(std::vector<uint32_t> *blob,
+void WriteMemoryBarrier(Blob *blob, IdScope memory, IdMemorySemantics semantics);
+void WriteAtomicLoad(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
IdScope scope,
IdMemorySemantics semantics);
-void WriteAtomicStore(std::vector<uint32_t> *blob,
+void WriteAtomicStore(Blob *blob,
IdRef pointer,
IdScope scope,
IdMemorySemantics semantics,
IdRef value);
-void WriteAtomicExchange(std::vector<uint32_t> *blob,
+void WriteAtomicExchange(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
IdScope scope,
IdMemorySemantics semantics,
IdRef value);
-void WriteAtomicCompareExchange(std::vector<uint32_t> *blob,
+void WriteAtomicCompareExchange(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
@@ -804,186 +699,184 @@
IdMemorySemantics unequal,
IdRef value,
IdRef comparator);
-void WriteAtomicIIncrement(std::vector<uint32_t> *blob,
+void WriteAtomicIIncrement(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
IdScope scope,
IdMemorySemantics semantics);
-void WriteAtomicIDecrement(std::vector<uint32_t> *blob,
+void WriteAtomicIDecrement(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
IdScope scope,
IdMemorySemantics semantics);
-void WriteAtomicIAdd(std::vector<uint32_t> *blob,
+void WriteAtomicIAdd(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
IdScope scope,
IdMemorySemantics semantics,
IdRef value);
-void WriteAtomicISub(std::vector<uint32_t> *blob,
+void WriteAtomicISub(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
IdScope scope,
IdMemorySemantics semantics,
IdRef value);
-void WriteAtomicSMin(std::vector<uint32_t> *blob,
+void WriteAtomicSMin(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
IdScope scope,
IdMemorySemantics semantics,
IdRef value);
-void WriteAtomicUMin(std::vector<uint32_t> *blob,
+void WriteAtomicUMin(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
IdScope scope,
IdMemorySemantics semantics,
IdRef value);
-void WriteAtomicSMax(std::vector<uint32_t> *blob,
+void WriteAtomicSMax(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
IdScope scope,
IdMemorySemantics semantics,
IdRef value);
-void WriteAtomicUMax(std::vector<uint32_t> *blob,
+void WriteAtomicUMax(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
IdScope scope,
IdMemorySemantics semantics,
IdRef value);
-void WriteAtomicAnd(std::vector<uint32_t> *blob,
+void WriteAtomicAnd(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
IdScope scope,
IdMemorySemantics semantics,
IdRef value);
-void WriteAtomicOr(std::vector<uint32_t> *blob,
+void WriteAtomicOr(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
IdScope scope,
IdMemorySemantics semantics,
IdRef value);
-void WriteAtomicXor(std::vector<uint32_t> *blob,
+void WriteAtomicXor(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef pointer,
IdScope scope,
IdMemorySemantics semantics,
IdRef value);
-void WritePhi(std::vector<uint32_t> *blob,
+void WritePhi(Blob *blob,
IdResultType idResultType,
IdResult idResult,
const PairIdRefIdRefList &variableParentPairList);
-void WriteLoopMerge(std::vector<uint32_t> *blob,
+void WriteLoopMerge(Blob *blob,
IdRef mergeBlock,
IdRef continueTarget,
spv::LoopControlMask loopControl);
-void WriteSelectionMerge(std::vector<uint32_t> *blob,
- IdRef mergeBlock,
- spv::SelectionControlMask selectionControl);
-void WriteLabel(std::vector<uint32_t> *blob, IdResult idResult);
-void WriteBranch(std::vector<uint32_t> *blob, IdRef targetLabel);
-void WriteBranchConditional(std::vector<uint32_t> *blob,
+void WriteSelectionMerge(Blob *blob, IdRef mergeBlock, spv::SelectionControlMask selectionControl);
+void WriteLabel(Blob *blob, IdResult idResult);
+void WriteBranch(Blob *blob, IdRef targetLabel);
+void WriteBranchConditional(Blob *blob,
IdRef condition,
IdRef trueLabel,
IdRef falseLabel,
const LiteralIntegerList &branchweightsPairList);
-void WriteSwitch(std::vector<uint32_t> *blob,
+void WriteSwitch(Blob *blob,
IdRef selector,
IdRef default_,
const PairLiteralIntegerIdRefList &targetPairList);
-void WriteKill(std::vector<uint32_t> *blob);
-void WriteReturn(std::vector<uint32_t> *blob);
-void WriteReturnValue(std::vector<uint32_t> *blob, IdRef value);
-void WriteUnreachable(std::vector<uint32_t> *blob);
-void WriteGroupAll(std::vector<uint32_t> *blob,
+void WriteKill(Blob *blob);
+void WriteReturn(Blob *blob);
+void WriteReturnValue(Blob *blob, IdRef value);
+void WriteUnreachable(Blob *blob);
+void WriteGroupAll(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
IdRef predicate);
-void WriteGroupAny(std::vector<uint32_t> *blob,
+void WriteGroupAny(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
IdRef predicate);
-void WriteGroupBroadcast(std::vector<uint32_t> *blob,
+void WriteGroupBroadcast(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
IdRef value,
IdRef localId);
-void WriteGroupIAdd(std::vector<uint32_t> *blob,
+void WriteGroupIAdd(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
spv::GroupOperation operation,
IdRef x);
-void WriteGroupFAdd(std::vector<uint32_t> *blob,
+void WriteGroupFAdd(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
spv::GroupOperation operation,
IdRef x);
-void WriteGroupFMin(std::vector<uint32_t> *blob,
+void WriteGroupFMin(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
spv::GroupOperation operation,
IdRef x);
-void WriteGroupUMin(std::vector<uint32_t> *blob,
+void WriteGroupUMin(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
spv::GroupOperation operation,
IdRef x);
-void WriteGroupSMin(std::vector<uint32_t> *blob,
+void WriteGroupSMin(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
spv::GroupOperation operation,
IdRef x);
-void WriteGroupFMax(std::vector<uint32_t> *blob,
+void WriteGroupFMax(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
spv::GroupOperation operation,
IdRef x);
-void WriteGroupUMax(std::vector<uint32_t> *blob,
+void WriteGroupUMax(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
spv::GroupOperation operation,
IdRef x);
-void WriteGroupSMax(std::vector<uint32_t> *blob,
+void WriteGroupSMax(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
spv::GroupOperation operation,
IdRef x);
-void WriteImageSparseSampleImplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSparseSampleImplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
IdRef coordinate,
const spv::ImageOperandsMask *imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageSparseSampleExplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSparseSampleExplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
IdRef coordinate,
spv::ImageOperandsMask imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageSparseSampleDrefImplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSparseSampleDrefImplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -991,7 +884,7 @@
IdRef dref,
const spv::ImageOperandsMask *imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageSparseSampleDrefExplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSparseSampleDrefExplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -999,21 +892,21 @@
IdRef dref,
spv::ImageOperandsMask imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageSparseSampleProjImplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSparseSampleProjImplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
IdRef coordinate,
const spv::ImageOperandsMask *imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageSparseSampleProjExplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSparseSampleProjExplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
IdRef coordinate,
spv::ImageOperandsMask imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageSparseSampleProjDrefImplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSparseSampleProjDrefImplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -1021,7 +914,7 @@
IdRef dref,
const spv::ImageOperandsMask *imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageSparseSampleProjDrefExplicitLod(std::vector<uint32_t> *blob,
+void WriteImageSparseSampleProjDrefExplicitLod(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -1029,14 +922,14 @@
IdRef dref,
spv::ImageOperandsMask imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageSparseFetch(std::vector<uint32_t> *blob,
+void WriteImageSparseFetch(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef image,
IdRef coordinate,
const spv::ImageOperandsMask *imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageSparseGather(std::vector<uint32_t> *blob,
+void WriteImageSparseGather(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -1044,7 +937,7 @@
IdRef component,
const spv::ImageOperandsMask *imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageSparseDrefGather(std::vector<uint32_t> *blob,
+void WriteImageSparseDrefGather(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef sampledImage,
@@ -1052,61 +945,61 @@
IdRef dref,
const spv::ImageOperandsMask *imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteImageSparseTexelsResident(std::vector<uint32_t> *blob,
+void WriteImageSparseTexelsResident(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef residentCode);
-void WriteNoLine(std::vector<uint32_t> *blob);
-void WriteImageSparseRead(std::vector<uint32_t> *blob,
+void WriteNoLine(Blob *blob);
+void WriteImageSparseRead(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdRef image,
IdRef coordinate,
const spv::ImageOperandsMask *imageOperands,
const IdRefList &imageOperandIdsList);
-void WriteGroupIAddNonUniformAMD(std::vector<uint32_t> *blob,
+void WriteGroupIAddNonUniformAMD(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
spv::GroupOperation operation,
IdRef x);
-void WriteGroupFAddNonUniformAMD(std::vector<uint32_t> *blob,
+void WriteGroupFAddNonUniformAMD(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
spv::GroupOperation operation,
IdRef x);
-void WriteGroupFMinNonUniformAMD(std::vector<uint32_t> *blob,
+void WriteGroupFMinNonUniformAMD(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
spv::GroupOperation operation,
IdRef x);
-void WriteGroupUMinNonUniformAMD(std::vector<uint32_t> *blob,
+void WriteGroupUMinNonUniformAMD(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
spv::GroupOperation operation,
IdRef x);
-void WriteGroupSMinNonUniformAMD(std::vector<uint32_t> *blob,
+void WriteGroupSMinNonUniformAMD(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
spv::GroupOperation operation,
IdRef x);
-void WriteGroupFMaxNonUniformAMD(std::vector<uint32_t> *blob,
+void WriteGroupFMaxNonUniformAMD(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
spv::GroupOperation operation,
IdRef x);
-void WriteGroupUMaxNonUniformAMD(std::vector<uint32_t> *blob,
+void WriteGroupUMaxNonUniformAMD(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
spv::GroupOperation operation,
IdRef x);
-void WriteGroupSMaxNonUniformAMD(std::vector<uint32_t> *blob,
+void WriteGroupSMaxNonUniformAMD(Blob *blob,
IdResultType idResultType,
IdResult idResult,
IdScope execution,
diff --git a/src/common/spirv/spirv_instruction_parser_autogen.h b/src/common/spirv/spirv_instruction_parser_autogen.h
index 92d310d..5b39a01 100644
--- a/src/common/spirv/spirv_instruction_parser_autogen.h
+++ b/src/common/spirv/spirv_instruction_parser_autogen.h
@@ -11,6 +11,8 @@
#ifndef COMMON_SPIRV_SPIRVINSTRUCTIONPARSERAUTOGEN_H_
#define COMMON_SPIRV_SPIRVINSTRUCTIONPARSERAUTOGEN_H_
+#include <spirv/unified1/spirv.hpp>
+
#include "spirv_types.h"
namespace angle
diff --git a/src/common/spirv/spirv_types.h b/src/common/spirv/spirv_types.h
index 6191f7d..b8a6c65 100644
--- a/src/common/spirv/spirv_types.h
+++ b/src/common/spirv/spirv_types.h
@@ -10,8 +10,6 @@
#ifndef COMMON_SPIRV_TYPES_H_
#define COMMON_SPIRV_TYPES_H_
-#include <spirv/unified1/spirv.hpp>
-
#include "common/FastVector.h"
#include <vector>
@@ -44,7 +42,7 @@
struct IdRefHelper
{
- spv::Id value;
+ uint32_t value;
};
struct LiteralIntegerHelper
{
@@ -109,9 +107,12 @@
// Id 0 is invalid in SPIR-V.
constexpr uint32_t kMinValidId = 1;
+// The SPIR-V blob is a sequence of uint32_t's
+using Blob = std::vector<uint32_t>;
+
// Returns whether SPIR-V is valid. Useful for ASSERTs. Automatically generates a warning if
// SPIR-V is not valid.
-bool Validate(const std::vector<uint32_t> &blob);
+bool Validate(const Blob &blob);
} // namespace spirv
} // namespace angle
diff --git a/src/image_util/loadimage.inc b/src/image_util/loadimage.inc
index 40ad295..8d44b2b 100644
--- a/src/image_util/loadimage.inc
+++ b/src/image_util/loadimage.inc
@@ -81,9 +81,7 @@
type *dest = priv::OffsetDataPointer<type>(output, y, z, outputRowPitch, outputDepthPitch);
for (size_t x = 0; x < width; x++)
{
- dest[x * 4 + 0] = source[x * 3 + 0];
- dest[x * 4 + 1] = source[x * 3 + 1];
- dest[x * 4 + 2] = source[x * 3 + 2];
+ memcpy(&dest[x * 4], &source[x * 3], sizeof(type) * 3);
dest[x * 4 + 3] = fourthValue;
}
}
diff --git a/src/libANGLE/Caps.h b/src/libANGLE/Caps.h
index a451568..cd462fd 100644
--- a/src/libANGLE/Caps.h
+++ b/src/libANGLE/Caps.h
@@ -778,6 +778,9 @@
// PVRTC1 textures must be squares.
bool squarePvrtc1 = false;
+
+ // ETC1 texture support is emulated.
+ bool emulatedEtc1 = false;
};
struct TypePrecision
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index 4fa5041..4a86888 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -3722,6 +3722,12 @@
}
}
+ // Hide emulated ETC1 extension from WebGL contexts.
+ if (mWebGLContext && getLimitations().emulatedEtc1)
+ {
+ mSupportedExtensions.compressedETC1RGB8TextureOES = false;
+ }
+
// If we're capturing application calls for replay, don't expose any binary formats to prevent
// traces from trying to use cached results
if (getFrameCapture()->enabled())
diff --git a/src/libANGLE/VaryingPacking.cpp b/src/libANGLE/VaryingPacking.cpp
index 69bcafb..a1e7c3d 100644
--- a/src/libANGLE/VaryingPacking.cpp
+++ b/src/libANGLE/VaryingPacking.cpp
@@ -851,9 +851,20 @@
// not active. GLES specs are a bit vague on whether it's allowed to only pack active
// varyings, though GLES 3.1 spec section 11.1.2.1 says that "device-dependent
// optimizations" may be used to make vertex shader outputs fit.
- if ((input && output && output->staticUse) || isActiveBuiltInInput ||
- isActiveBuiltInOutput ||
- (isSeparableProgram && ((input && input->active) || (output && output->active))))
+ //
+ // When separable programs are linked, varyings at the separable program's boundary are
+ // treated as active. See section 7.4.1 in
+ // https://www.khronos.org/registry/OpenGL/specs/es/3.2/es_spec_3.2.pdf
+ bool matchedInputOutputStaticUse = (input && output && output->staticUse);
+ bool activeBuiltIn = (isActiveBuiltInInput || isActiveBuiltInOutput);
+
+ // Separable program requirements
+ bool separableActiveInput = (input && (input->active || !output));
+ bool separableActiveOutput = (output && (output->active || !input));
+ bool separableActiveVarying =
+ (isSeparableProgram && (separableActiveInput || separableActiveOutput));
+
+ if (matchedInputOutputStaticUse || activeBuiltIn || separableActiveVarying)
{
const sh::ShaderVariable *varying = output ? output : input;
diff --git a/src/libANGLE/capture/FrameCapture.cpp b/src/libANGLE/capture/FrameCapture.cpp
index d44ccde..af75749 100644
--- a/src/libANGLE/capture/FrameCapture.cpp
+++ b/src/libANGLE/capture/FrameCapture.cpp
@@ -2707,7 +2707,7 @@
// use that rather than try to read data back that may have been converted.
const std::vector<uint8_t> &capturedTextureLevel =
context->getShareGroup()->getFrameCaptureShared()->retrieveCachedTextureLevel(
- texture->id(), index.getLevelIndex());
+ texture->id(), index.getTarget(), index.getLevelIndex());
// Use the shadow copy of the data to populate the call
CaptureTextureContents(setupCalls, &replayState, texture, index, desc,
@@ -3572,6 +3572,20 @@
return false;
}
+
+GLint GetAdjustedTextureCacheLevel(gl::TextureTarget target, GLint level)
+{
+ GLint adjustedLevel = level;
+
+ // If target is a cube, we need to maintain 6 images per level
+ if (IsCubeMapFaceTarget(target))
+ {
+ adjustedLevel *= 6;
+ adjustedLevel += CubeMapTextureTargetToFaceIndex(target);
+ }
+
+ return adjustedLevel;
+}
} // namespace
ParamCapture::ParamCapture() : type(ParamType::TGLenum), enumGroup(gl::GLenumGroup::DefaultGroup) {}
@@ -4884,14 +4898,16 @@
}
const std::vector<uint8_t> &FrameCaptureShared::retrieveCachedTextureLevel(gl::TextureID id,
+ gl::TextureTarget target,
GLint level)
{
// Look up the data for the requested texture
const auto &foundTextureLevels = mCachedTextureLevelData.find(id);
ASSERT(foundTextureLevels != mCachedTextureLevelData.end());
- // For that texture, look up the data for the given level
- const auto &foundTextureLevel = foundTextureLevels->second.find(level);
+ GLint adjustedLevel = GetAdjustedTextureCacheLevel(target, level);
+
+ const auto &foundTextureLevel = foundTextureLevels->second.find(adjustedLevel);
ASSERT(foundTextureLevel != foundTextureLevels->second.end());
const std::vector<uint8_t> &capturedTextureLevel = foundTextureLevel->second;
@@ -4956,7 +4972,7 @@
std::vector<uint8_t> &FrameCaptureShared::getCachedTextureLevelData(gl::Texture *texture,
gl::TextureTarget target,
- GLint level,
+ GLint textureLevel,
EntryPoint entryPoint)
{
auto foundTextureLevels = mCachedTextureLevelData.find(texture->id());
@@ -4968,15 +4984,18 @@
foundTextureLevels = emplaceResult.first;
}
+ // For this texture, look up the adjusted level, which may not match 1:1 due to cubes
+ GLint adjustedLevel = GetAdjustedTextureCacheLevel(target, textureLevel);
+
TextureLevels &foundLevels = foundTextureLevels->second;
- TextureLevels::iterator foundLevel = foundLevels.find(level);
+ TextureLevels::iterator foundLevel = foundLevels.find(adjustedLevel);
if (foundLevel != foundLevels.end())
{
if (entryPoint == EntryPoint::GLCompressedTexImage2D ||
entryPoint == EntryPoint::GLCompressedTexImage3D)
{
// Delete the cached entry in case the caller is respecifying the level.
- foundLevels.erase(level);
+ foundLevels.erase(adjustedLevel);
}
else
{
@@ -4991,10 +5010,10 @@
// Otherwise, create an appropriately sized cache for this level
// Get the format of the texture for use with the compressed block size math.
- const gl::InternalFormat &format = *texture->getFormat(target, level).info;
+ const gl::InternalFormat &format = *texture->getFormat(target, textureLevel).info;
// Divide dimensions according to block size.
- const gl::Extents &levelExtents = texture->getExtents(target, level);
+ const gl::Extents &levelExtents = texture->getExtents(target, textureLevel);
// Calculate the size needed to store the compressed level
GLuint sizeInBytes;
@@ -5003,7 +5022,7 @@
// Initialize texture rectangle data. Default init to zero for stability.
std::vector<uint8_t> newPixelData(sizeInBytes, 0);
- auto emplaceResult = foundLevels.emplace(level, std::move(newPixelData));
+ auto emplaceResult = foundLevels.emplace(adjustedLevel, std::move(newPixelData));
ASSERT(emplaceResult.second);
// Using the level entry we just created, return the location (a byte vector) where compressed
diff --git a/src/libANGLE/capture/FrameCapture.h b/src/libANGLE/capture/FrameCapture.h
index 082f739..51d8069 100644
--- a/src/libANGLE/capture/FrameCapture.h
+++ b/src/libANGLE/capture/FrameCapture.h
@@ -407,7 +407,9 @@
void setProgramSources(gl::ShaderProgramID id, ProgramSources sources);
// Load data from a previously stored texture level
- const std::vector<uint8_t> &retrieveCachedTextureLevel(gl::TextureID id, GLint level);
+ const std::vector<uint8_t> &retrieveCachedTextureLevel(gl::TextureID id,
+ gl::TextureTarget target,
+ GLint level);
// Create new texture level data and copy the source into it
void copyCachedTextureLevel(const gl::Context *context,
diff --git a/src/libANGLE/capture/capture_gles_3_2_params.cpp b/src/libANGLE/capture/capture_gles_3_2_params.cpp
index ceaeeb1..06f45dc 100644
--- a/src/libANGLE/capture/capture_gles_3_2_params.cpp
+++ b/src/libANGLE/capture/capture_gles_3_2_params.cpp
@@ -6,6 +6,7 @@
// capture_gles32_params.cpp:
// Pointer parameter capture functions for the OpenGL ES 3.2 entry points.
+#include "libANGLE/capture/capture_gles_2_0_autogen.h"
#include "libANGLE/capture/capture_gles_3_2_autogen.h"
using namespace angle;
@@ -57,7 +58,8 @@
GLint basevertex,
ParamCapture *indicesParam)
{
- UNIMPLEMENTED();
+ CaptureDrawElements_indices(glState, isCallValid, modePacked, count, typePacked, indices,
+ indicesParam);
}
void CaptureDrawElementsInstancedBaseVertex_indices(const State &glState,
diff --git a/src/libANGLE/capture/capture_gles_ext_params.cpp b/src/libANGLE/capture/capture_gles_ext_params.cpp
index a88b6fc..4788818 100644
--- a/src/libANGLE/capture/capture_gles_ext_params.cpp
+++ b/src/libANGLE/capture/capture_gles_ext_params.cpp
@@ -535,7 +535,7 @@
GLint *data,
ParamCapture *paramCapture)
{
- UNIMPLEMENTED();
+ paramCapture->readBufferSizeBytes = sizeof(GLsizei);
}
void CaptureGetIntegervRobustANGLE_data(const State &glState,
@@ -546,7 +546,7 @@
GLint *data,
ParamCapture *paramCapture)
{
- UNIMPLEMENTED();
+ CaptureGetParameter(glState, pname, sizeof(GLint) * bufSize, paramCapture);
}
void CaptureGetProgramivRobustANGLE_length(const State &glState,
diff --git a/src/libANGLE/capture/frame_capture_utils.cpp b/src/libANGLE/capture/frame_capture_utils.cpp
index 249afdf..ecd6e42 100644
--- a/src/libANGLE/capture/frame_capture_utils.cpp
+++ b/src/libANGLE/capture/frame_capture_utils.cpp
@@ -85,7 +85,11 @@
{
for (size_t i = 0; i < bindingPointerVector.size(); i++)
{
- bos->writeInt(bindingPointerVector[i].id().value);
+ // Do not serialize zero bindings, as this will create unwanted diffs
+ if (bindingPointerVector[i].id().value != 0)
+ {
+ bos->writeInt(bindingPointerVector[i].id().value);
+ }
}
}
diff --git a/src/libANGLE/renderer/driver_utils.cpp b/src/libANGLE/renderer/driver_utils.cpp
index 71c2744..1d6e07b 100644
--- a/src/libANGLE/renderer/driver_utils.cpp
+++ b/src/libANGLE/renderer/driver_utils.cpp
@@ -154,6 +154,8 @@
return "AMD";
case VENDOR_ID_ARM:
return "ARM";
+ case VENDOR_ID_APPLE:
+ return "Apple";
case VENDOR_ID_BROADCOM:
return "Broadcom";
case VENDOR_ID_GOOGLE:
diff --git a/src/libANGLE/renderer/driver_utils.h b/src/libANGLE/renderer/driver_utils.h
index f3caec8..91461e3 100644
--- a/src/libANGLE/renderer/driver_utils.h
+++ b/src/libANGLE/renderer/driver_utils.h
@@ -19,6 +19,7 @@
{
VENDOR_ID_UNKNOWN = 0x0,
VENDOR_ID_AMD = 0x1002,
+ VENDOR_ID_APPLE = 0x106B,
VENDOR_ID_ARM = 0x13B5,
// Broadcom devices won't use PCI, but this is their Vulkan vendor id.
VENDOR_ID_BROADCOM = 0x14E4,
@@ -48,6 +49,11 @@
return vendorId == VENDOR_ID_AMD;
}
+inline bool IsApple(uint32_t vendorId)
+{
+ return vendorId == VENDOR_ID_APPLE;
+}
+
inline bool IsARM(uint32_t vendorId)
{
return vendorId == VENDOR_ID_ARM;
diff --git a/src/libANGLE/renderer/glslang_wrapper_utils.cpp b/src/libANGLE/renderer/glslang_wrapper_utils.cpp
index bfd2cdf..1f8f0f9 100644
--- a/src/libANGLE/renderer/glslang_wrapper_utils.cpp
+++ b/src/libANGLE/renderer/glslang_wrapper_utils.cpp
@@ -1066,9 +1066,9 @@
class SpirvTransformerBase : angle::NonCopyable
{
public:
- SpirvTransformerBase(const std::vector<uint32_t> &spirvBlobIn,
+ SpirvTransformerBase(const spirv::Blob &spirvBlobIn,
const ShaderInterfaceVariableInfoMap &variableInfoMap,
- SpirvBlob *spirvBlobOut)
+ spirv::Blob *spirvBlobOut)
: mSpirvBlobIn(spirvBlobIn), mVariableInfoMap(variableInfoMap), mSpirvBlobOut(spirvBlobOut)
{
gl::ShaderBitSet allStages;
@@ -1081,7 +1081,7 @@
return mVariableInfoById;
}
- static spirv::IdRef GetNewId(SpirvBlob *blob);
+ static spirv::IdRef GetNewId(spirv::Blob *blob);
spirv::IdRef getNewId();
protected:
@@ -1102,13 +1102,13 @@
void copyInstruction(const uint32_t *instruction, size_t wordCount);
// SPIR-V to transform:
- const SpirvBlob &mSpirvBlobIn;
+ const spirv::Blob &mSpirvBlobIn;
// Input shader variable info map:
const ShaderInterfaceVariableInfoMap &mVariableInfoMap;
// Transformed SPIR-V:
- SpirvBlob *mSpirvBlobOut;
+ spirv::Blob *mSpirvBlobOut;
// Traversal state:
size_t mCurrentWord = 0;
@@ -1133,10 +1133,10 @@
ASSERT(mCurrentWord == 0);
ASSERT(mIsInFunctionSection == false);
- // Make sure the SpirvBlob is not reused.
+ // Make sure the spirv::Blob is not reused.
ASSERT(mSpirvBlobOut->empty());
- // Copy the header to SpirvBlob, we need that to be defined for SpirvTransformerBase::getNewId
+ // Copy the header to SPIR-V blob, we need that to be defined for SpirvTransformerBase::getNewId
// to work.
mSpirvBlobOut->assign(mSpirvBlobIn.begin(), mSpirvBlobIn.begin() + kHeaderIndexInstructions);
@@ -1162,7 +1162,7 @@
mSpirvBlobOut->insert(mSpirvBlobOut->end(), instruction, instruction + wordCount);
}
-spirv::IdRef SpirvTransformerBase::GetNewId(SpirvBlob *blob)
+spirv::IdRef SpirvTransformerBase::GetNewId(spirv::Blob *blob)
{
return spirv::IdRef((*blob)[kHeaderIndexIndexBound]++);
}
@@ -1217,7 +1217,7 @@
// Helpers:
void visitTypeHelper(spirv::IdResult id, spirv::IdRef typeId);
- void writePendingDeclarations(SpirvBlob *blobOut);
+ void writePendingDeclarations(spirv::Blob *blobOut);
// Getters:
const spirv::LiteralString &getName(spirv::IdRef id) const { return mNamesById[id]; }
@@ -1515,7 +1515,7 @@
return SpirvVariableType::InterfaceVariable;
}
-void SpirvIDDiscoverer::writePendingDeclarations(SpirvBlob *blobOut)
+void SpirvIDDiscoverer::writePendingDeclarations(spirv::Blob *blobOut)
{
if (!mFloatId.valid())
{
@@ -1570,7 +1570,7 @@
TransformationState transformTypeStruct(const SpirvIDDiscoverer &ids,
spirv::IdResult id,
spirv::IdRefList *memberList,
- SpirvBlob *blobOut);
+ spirv::Blob *blobOut);
};
TransformationState SpirvPerVertexTrimmer::transformMemberDecorate(const SpirvIDDiscoverer &ids,
@@ -1603,7 +1603,7 @@
TransformationState SpirvPerVertexTrimmer::transformTypeStruct(const SpirvIDDiscoverer &ids,
spirv::IdResult id,
spirv::IdRefList *memberList,
- SpirvBlob *blobOut)
+ spirv::Blob *blobOut)
{
if (!ids.isPerVertex(id))
{
@@ -1633,22 +1633,22 @@
spirv::IdResult id,
spirv::IdRef baseId,
const spirv::IdRefList &indexList,
- SpirvBlob *blobOut);
+ spirv::Blob *blobOut);
TransformationState transformDecorate(const ShaderInterfaceVariableInfo &info,
gl::ShaderType shaderType,
spirv::IdRef id,
spv::Decoration decoration,
const spirv::LiteralIntegerList &decorationValues,
- SpirvBlob *blobOut);
+ spirv::Blob *blobOut);
TransformationState transformTypePointer(const SpirvIDDiscoverer &ids,
spirv::IdResult id,
spv::StorageClass storageClass,
spirv::IdRef typeId,
- SpirvBlob *blobOut);
+ spirv::Blob *blobOut);
TransformationState transformVariable(spirv::IdResultType typeId,
spirv::IdResult id,
spv::StorageClass storageClass,
- SpirvBlob *blobOut);
+ spirv::Blob *blobOut);
void modifyEntryPointInterfaceList(
const std::vector<const ShaderInterfaceVariableInfo *> &variableInfoById,
@@ -1675,7 +1675,7 @@
spirv::IdResult id,
spirv::IdRef baseId,
const spirv::IdRefList &indexList,
- SpirvBlob *blobOut)
+ spirv::Blob *blobOut)
{
// Modifiy the instruction to use the private type.
ASSERT(typeId < mTypePointerTransformedId.size());
@@ -1692,7 +1692,7 @@
spirv::IdRef id,
spv::Decoration decoration,
const spirv::LiteralIntegerList &decorationValues,
- SpirvBlob *blobOut)
+ spirv::Blob *blobOut)
{
// If it's an inactive varying, remove the decoration altogether.
return info.activeStages[shaderType] ? TransformationState::Unchanged
@@ -1731,7 +1731,7 @@
spirv::IdResult id,
spv::StorageClass storageClass,
spirv::IdRef typeId,
- SpirvBlob *blobOut)
+ spirv::Blob *blobOut)
{
// If the storage class is output, this may be used to create a variable corresponding to an
// inactive varying, or if that varying is a struct, an Op*AccessChain retrieving a field of
@@ -1770,7 +1770,7 @@
TransformationState SpirvInactiveVaryingRemover::transformVariable(spirv::IdResultType typeId,
spirv::IdResult id,
spv::StorageClass storageClass,
- SpirvBlob *blobOut)
+ spirv::Blob *blobOut)
{
ASSERT(storageClass == spv::StorageClassOutput || storageClass == spv::StorageClassInput);
@@ -1796,24 +1796,24 @@
spirv::IdResultType typeId,
spirv::IdResult id,
spv::StorageClass storageClass,
- SpirvBlob *blobOut);
+ spirv::Blob *blobOut);
TransformationState transformVariable(const ShaderInterfaceVariableInfo &info,
spirv::IdResultType typeId,
spirv::IdResult id,
spv::StorageClass storageClass,
- SpirvBlob *blobOut);
+ spirv::Blob *blobOut);
void modifyEntryPointInterfaceList(spirv::IdRefList *interfaceList);
- void addDecorate(spirv::IdRef replacedId, SpirvBlob *blobOut);
+ void addDecorate(spirv::IdRef replacedId, spirv::Blob *blobOut);
void writeInputPreamble(
const std::vector<const ShaderInterfaceVariableInfo *> &variableInfoById,
gl::ShaderType shaderType,
- SpirvBlob *blobOut);
+ spirv::Blob *blobOut);
void writeOutputPrologue(
const std::vector<const ShaderInterfaceVariableInfo *> &variableInfoById,
gl::ShaderType shaderType,
- SpirvBlob *blobOut);
+ spirv::Blob *blobOut);
bool isReplaced(spirv::IdRef id) const { return mFixedVaryingId[id].valid(); }
spirv::IdRef getReplacementId(spirv::IdRef id) const
@@ -1847,7 +1847,7 @@
spirv::IdResultType typeId,
spirv::IdResult id,
spv::StorageClass storageClass,
- SpirvBlob *blobOut)
+ spirv::Blob *blobOut)
{
if (info.useRelaxedPrecision && info.activeStages[shaderType] && !mFixedVaryingId[id].valid())
{
@@ -1861,7 +1861,7 @@
spirv::IdResultType typeId,
spirv::IdResult id,
spv::StorageClass storageClass,
- SpirvBlob *blobOut)
+ spirv::Blob *blobOut)
{
if (info.useRelaxedPrecision &&
(storageClass == spv::StorageClassOutput || storageClass == spv::StorageClassInput))
@@ -1878,7 +1878,7 @@
void SpirvVaryingPrecisionFixer::writeInputPreamble(
const std::vector<const ShaderInterfaceVariableInfo *> &variableInfoById,
gl::ShaderType shaderType,
- SpirvBlob *blobOut)
+ spirv::Blob *blobOut)
{
if (shaderType == gl::ShaderType::Vertex || shaderType == gl::ShaderType::Compute)
{
@@ -1920,7 +1920,7 @@
}
}
-void SpirvVaryingPrecisionFixer::addDecorate(spirv::IdRef replacedId, SpirvBlob *blobOut)
+void SpirvVaryingPrecisionFixer::addDecorate(spirv::IdRef replacedId, spirv::Blob *blobOut)
{
spirv::WriteDecorate(blobOut, replacedId, spv::DecorationRelaxedPrecision, {});
}
@@ -1928,7 +1928,7 @@
void SpirvVaryingPrecisionFixer::writeOutputPrologue(
const std::vector<const ShaderInterfaceVariableInfo *> &variableInfoById,
gl::ShaderType shaderType,
- SpirvBlob *blobOut)
+ spirv::Blob *blobOut)
{
if (shaderType == gl::ShaderType::Fragment || shaderType == gl::ShaderType::Compute)
{
@@ -1979,7 +1979,7 @@
spirv::IdResult id,
spv::StorageClass storageClass);
- TransformationState transformCapability(spv::Capability capability, SpirvBlob *blobOut);
+ TransformationState transformCapability(spv::Capability capability, spirv::Blob *blobOut);
TransformationState transformName(spirv::IdRef id, spirv::LiteralString name);
TransformationState transformVariable(const ShaderInterfaceVariableInfo &info,
const ShaderInterfaceVariableInfoMap &variableInfoMap,
@@ -1991,20 +1991,22 @@
void writePendingDeclarations(
const std::vector<const ShaderInterfaceVariableInfo *> &variableInfoById,
const SpirvIDDiscoverer &ids,
- SpirvBlob *blobOut);
+ spirv::Blob *blobOut);
void writeTransformFeedbackExtensionOutput(const SpirvIDDiscoverer &ids,
spirv::IdRef positionId,
- SpirvBlob *blobOut);
+ spirv::Blob *blobOut);
void writeTransformFeedbackEmulationOutput(
const SpirvIDDiscoverer &ids,
const SpirvVaryingPrecisionFixer &varyingPrecisionFixer,
spirv::IdRef currentFunctionId,
- SpirvBlob *blobOut);
- void addExecutionMode(spirv::IdRef entryPointId, SpirvBlob *blobOut);
+ spirv::Blob *blobOut);
+ void addExecutionMode(spirv::IdRef entryPointId, spirv::Blob *blobOut);
void addMemberDecorate(const ShaderInterfaceVariableInfo &info,
spirv::IdRef id,
- SpirvBlob *blobOut);
- void addDecorate(const ShaderInterfaceVariableInfo &info, spirv::IdRef id, SpirvBlob *blobOut);
+ spirv::Blob *blobOut);
+ void addDecorate(const ShaderInterfaceVariableInfo &info,
+ spirv::IdRef id,
+ spirv::Blob *blobOut);
private:
void gatherXfbVaryings(const ShaderInterfaceVariableInfo &info, spirv::IdRef id);
@@ -2014,13 +2016,13 @@
void writeIntConstant(const SpirvIDDiscoverer &ids,
uint32_t value,
spirv::IdRef intId,
- SpirvBlob *blobOut);
+ spirv::Blob *blobOut);
void getVaryingTypeIds(const SpirvIDDiscoverer &ids,
GLenum componentType,
bool isPrivate,
spirv::IdRef *typeIdOut,
spirv::IdRef *typePtrOut);
- void writeGetOffsetsCall(spirv::IdRef xfbOffsets, SpirvBlob *blobOut);
+ void writeGetOffsetsCall(spirv::IdRef xfbOffsets, spirv::Blob *blobOut);
void writeComponentCapture(const SpirvIDDiscoverer &ids,
uint32_t bufferIndex,
spirv::IdRef xfbOffset,
@@ -2029,7 +2031,7 @@
spirv::IdRef varyingBaseId,
const spirv::IdRefList &accessChainIndices,
GLenum componentType,
- SpirvBlob *blobOut);
+ spirv::Blob *blobOut);
static constexpr size_t kXfbDecorationCount = 3;
static constexpr spv::Decoration kXfbDecorations[kXfbDecorationCount] = {
@@ -2179,7 +2181,7 @@
TransformationState SpirvTransformFeedbackCodeGenerator::transformCapability(
spv::Capability capability,
- SpirvBlob *blobOut)
+ spirv::Blob *blobOut)
{
if (!mHasTransformFeedbackOutput || mIsEmulated)
{
@@ -2276,7 +2278,7 @@
void SpirvTransformFeedbackCodeGenerator::writeIntConstant(const SpirvIDDiscoverer &ids,
uint32_t value,
spirv::IdRef intId,
- SpirvBlob *blobOut)
+ spirv::Blob *blobOut)
{
if (value == ShaderInterfaceVariableXfbInfo::kInvalid)
{
@@ -2300,7 +2302,7 @@
void SpirvTransformFeedbackCodeGenerator::writePendingDeclarations(
const std::vector<const ShaderInterfaceVariableInfo *> &variableInfoById,
const SpirvIDDiscoverer &ids,
- SpirvBlob *blobOut)
+ spirv::Blob *blobOut)
{
if (!mIsEmulated)
{
@@ -2396,7 +2398,7 @@
void SpirvTransformFeedbackCodeGenerator::writeTransformFeedbackExtensionOutput(
const SpirvIDDiscoverer &ids,
spirv::IdRef positionId,
- SpirvBlob *blobOut)
+ spirv::Blob *blobOut)
{
if (mIsEmulated)
{
@@ -2440,7 +2442,7 @@
const SpirvIDDiscoverer &ids,
const SpirvVaryingPrecisionFixer &varyingPrecisionFixer,
spirv::IdRef currentFunctionId,
- SpirvBlob *blobOut)
+ spirv::Blob *blobOut)
{
if (!mIsEmulated || !mXfbCaptureFuncId.valid() || currentFunctionId != mXfbCaptureFuncId)
{
@@ -2649,7 +2651,7 @@
}
void SpirvTransformFeedbackCodeGenerator::writeGetOffsetsCall(spirv::IdRef xfbOffsets,
- SpirvBlob *blobOut)
+ spirv::Blob *blobOut)
{
const spirv::IdRef xfbGetOffsetsParam(SpirvTransformerBase::GetNewId(blobOut));
const spirv::IdRef xfbOffsetsResult(SpirvTransformerBase::GetNewId(blobOut));
@@ -2685,7 +2687,7 @@
spirv::IdRef varyingBaseId,
const spirv::IdRefList &accessChainIndices,
GLenum componentType,
- SpirvBlob *blobOut)
+ spirv::Blob *blobOut)
{
spirv::IdRef component(SpirvTransformerBase::GetNewId(blobOut));
spirv::IdRef xfbOutPtr(SpirvTransformerBase::GetNewId(blobOut));
@@ -2723,7 +2725,7 @@
}
void SpirvTransformFeedbackCodeGenerator::addExecutionMode(spirv::IdRef entryPointId,
- SpirvBlob *blobOut)
+ spirv::Blob *blobOut)
{
if (mIsEmulated)
{
@@ -2738,7 +2740,7 @@
void SpirvTransformFeedbackCodeGenerator::addMemberDecorate(const ShaderInterfaceVariableInfo &info,
spirv::IdRef id,
- SpirvBlob *blobOut)
+ spirv::Blob *blobOut)
{
if (mIsEmulated || info.fieldXfb.empty())
{
@@ -2779,7 +2781,7 @@
void SpirvTransformFeedbackCodeGenerator::addDecorate(const ShaderInterfaceVariableInfo &info,
spirv::IdRef id,
- SpirvBlob *blobOut)
+ spirv::Blob *blobOut)
{
if (mIsEmulated || info.xfb.buffer == ShaderInterfaceVariableXfbInfo::kInvalid)
{
@@ -2816,7 +2818,7 @@
void writePositionTransformation(const SpirvIDDiscoverer &ids,
spirv::IdRef positionPointerId,
spirv::IdRef positionId,
- SpirvBlob *blobOut);
+ spirv::Blob *blobOut);
private:
void preRotateXY(const SpirvIDDiscoverer &ids,
@@ -2824,12 +2826,12 @@
spirv::IdRef yId,
spirv::IdRef *rotatedXIdOut,
spirv::IdRef *rotatedYIdOut,
- SpirvBlob *blobOut);
+ spirv::Blob *blobOut);
void transformZToVulkanClipSpace(const SpirvIDDiscoverer &ids,
spirv::IdRef zId,
spirv::IdRef wId,
spirv::IdRef *correctedZIdOut,
- SpirvBlob *blobOut);
+ spirv::Blob *blobOut);
GlslangSpirvOptions mOptions;
};
@@ -2837,7 +2839,7 @@
void SpirvPositionTransformer::writePositionTransformation(const SpirvIDDiscoverer &ids,
spirv::IdRef positionPointerId,
spirv::IdRef positionId,
- SpirvBlob *blobOut)
+ spirv::Blob *blobOut)
{
// In GL the viewport transformation is slightly different - see the GL 2.0 spec section "2.12.1
// Controlling the Viewport". In Vulkan the corresponding spec section is currently "23.4.
@@ -2902,7 +2904,7 @@
spirv::IdRef yId,
spirv::IdRef *rotatedXIdOut,
spirv::IdRef *rotatedYIdOut,
- SpirvBlob *blobOut)
+ spirv::Blob *blobOut)
{
switch (mOptions.preRotation)
{
@@ -2963,7 +2965,7 @@
spirv::IdRef zId,
spirv::IdRef wId,
spirv::IdRef *correctedZIdOut,
- SpirvBlob *blobOut)
+ spirv::Blob *blobOut)
{
if (!mOptions.transformPositionToVulkanClipSpace)
{
@@ -2986,10 +2988,10 @@
class SpirvTransformer final : public SpirvTransformerBase
{
public:
- SpirvTransformer(const SpirvBlob &spirvBlobIn,
+ SpirvTransformer(const spirv::Blob &spirvBlobIn,
const GlslangSpirvOptions &options,
const ShaderInterfaceVariableInfoMap &variableInfoMap,
- SpirvBlob *spirvBlobOut)
+ spirv::Blob *spirvBlobOut)
: SpirvTransformerBase(spirvBlobIn, variableInfoMap, spirvBlobOut),
mOptions(options),
mXfbCodeGenerator(options.isTransformFeedbackEmulated),
@@ -3832,10 +3834,10 @@
{
public:
SpirvVertexAttributeAliasingTransformer(
- const SpirvBlob &spirvBlobIn,
+ const spirv::Blob &spirvBlobIn,
const ShaderInterfaceVariableInfoMap &variableInfoMap,
std::vector<const ShaderInterfaceVariableInfo *> &&variableInfoById,
- SpirvBlob *spirvBlobOut)
+ spirv::Blob *spirvBlobOut)
: SpirvTransformerBase(spirvBlobIn, variableInfoMap, spirvBlobOut)
{
mVariableInfoById = std::move(variableInfoById);
@@ -5042,8 +5044,8 @@
angle::Result GlslangTransformSpirvCode(const GlslangErrorCallback &callback,
const GlslangSpirvOptions &options,
const ShaderInterfaceVariableInfoMap &variableInfoMap,
- const SpirvBlob &initialSpirvBlob,
- SpirvBlob *spirvBlobOut)
+ const spirv::Blob &initialSpirvBlob,
+ spirv::Blob *spirvBlobOut)
{
if (initialSpirvBlob.empty())
{
@@ -5065,7 +5067,7 @@
// If there are aliasing vertex attributes, transform the SPIR-V again to remove them.
if (options.shaderType == gl::ShaderType::Vertex && HasAliasingAttributes(variableInfoMap))
{
- SpirvBlob preTransformBlob = std::move(*spirvBlobOut);
+ spirv::Blob preTransformBlob = std::move(*spirvBlobOut);
SpirvVertexAttributeAliasingTransformer aliasingTransformer(
preTransformBlob, variableInfoMap, std::move(transformer.getVariableInfoByIdMap()),
spirvBlobOut);
@@ -5081,7 +5083,7 @@
const gl::ShaderBitSet &linkedShaderStages,
const gl::Caps &glCaps,
const gl::ShaderMap<std::string> &shaderSources,
- gl::ShaderMap<SpirvBlob> *spirvBlobsOut)
+ gl::ShaderMap<spirv::Blob> *spirvBlobsOut)
{
TBuiltInResource builtInResources(glslang::DefaultTBuiltInResource);
GetBuiltInResourcesFromCaps(glCaps, &builtInResources);
@@ -5101,8 +5103,6 @@
{gl::ShaderType::Geometry, &geometryShader},
{gl::ShaderType::Compute, &computeShader},
};
- glslang::TProgram program;
-
for (const gl::ShaderType shaderType : linkedShaderStages)
{
if (shaderSources[shaderType].empty())
@@ -5110,18 +5110,12 @@
continue;
}
+ glslang::TProgram program;
+
ANGLE_TRY(CompileShader(callback, builtInResources, shaderType, shaderSources[shaderType],
shaders[shaderType], &program));
- }
- ANGLE_TRY(LinkProgram(callback, &program));
-
- for (const gl::ShaderType shaderType : linkedShaderStages)
- {
- if (shaderSources[shaderType].empty())
- {
- continue;
- }
+ ANGLE_TRY(LinkProgram(callback, &program));
glslang::TIntermediate *intermediate = program.getIntermediate(kShLanguageMap[shaderType]);
glslang::GlslangToSpv(*intermediate, (*spirvBlobsOut)[shaderType]);
@@ -5130,23 +5124,4 @@
return angle::Result::Continue;
}
-angle::Result GlslangCompileShaderOneOff(const GlslangErrorCallback &callback,
- gl::ShaderType shaderType,
- const std::string &shaderSource,
- SpirvBlob *spirvBlobOut)
-{
- const TBuiltInResource builtInResources(glslang::DefaultTBuiltInResource);
-
- glslang::TShader shader(kShLanguageMap[shaderType]);
- glslang::TProgram program;
-
- ANGLE_TRY(
- CompileShader(callback, builtInResources, shaderType, shaderSource, &shader, &program));
- ANGLE_TRY(LinkProgram(callback, &program));
-
- glslang::TIntermediate *intermediate = program.getIntermediate(kShLanguageMap[shaderType]);
- glslang::GlslangToSpv(*intermediate, *spirvBlobOut);
-
- return angle::Result::Continue;
-}
} // namespace rx
diff --git a/src/libANGLE/renderer/glslang_wrapper_utils.h b/src/libANGLE/renderer/glslang_wrapper_utils.h
index fdf2f21..a0cffac 100644
--- a/src/libANGLE/renderer/glslang_wrapper_utils.h
+++ b/src/libANGLE/renderer/glslang_wrapper_utils.h
@@ -11,6 +11,7 @@
#include <functional>
+#include "common/spirv/spirv_types.h"
#include "libANGLE/renderer/ProgramImpl.h"
#include "libANGLE/renderer/renderer_utils.h"
@@ -68,8 +69,6 @@
bool isTransformFeedbackEmulated = false;
};
-using SpirvBlob = std::vector<uint32_t>;
-
using GlslangErrorCallback = std::function<angle::Result(GlslangError)>;
struct ShaderInterfaceVariableXfbInfo
@@ -203,19 +202,14 @@
angle::Result GlslangTransformSpirvCode(const GlslangErrorCallback &callback,
const GlslangSpirvOptions &options,
const ShaderInterfaceVariableInfoMap &variableInfoMap,
- const SpirvBlob &initialSpirvBlob,
- SpirvBlob *spirvBlobOut);
+ const angle::spirv::Blob &initialSpirvBlob,
+ angle::spirv::Blob *spirvBlobOut);
angle::Result GlslangGetShaderSpirvCode(const GlslangErrorCallback &callback,
const gl::ShaderBitSet &linkedShaderStages,
const gl::Caps &glCaps,
const gl::ShaderMap<std::string> &shaderSources,
- gl::ShaderMap<SpirvBlob> *spirvBlobsOut);
-
-angle::Result GlslangCompileShaderOneOff(const GlslangErrorCallback &callback,
- gl::ShaderType shaderType,
- const std::string &shaderSource,
- SpirvBlob *spirvBlobOut);
+ gl::ShaderMap<angle::spirv::Blob> *spirvBlobsOut);
} // namespace rx
diff --git a/src/libANGLE/renderer/metal/DisplayMtl.mm b/src/libANGLE/renderer/metal/DisplayMtl.mm
index 9c9b7fa..72c3409 100644
--- a/src/libANGLE/renderer/metal/DisplayMtl.mm
+++ b/src/libANGLE/renderer/metal/DisplayMtl.mm
@@ -712,11 +712,16 @@
// Re-verify texture extensions.
mNativeExtensions.setTextureExtensionSupport(mNativeTextureCaps);
- // Enable ANGLE-specific ETC2/EAC extension that is not set by the call above.
+ // When ETC2/EAC formats are natively supported, enable ANGLE-specific extension string to
+ // expose them to WebGL. In other case, mark potentially-available ETC1 extension as emulated.
if (supportsAppleGPUFamily(1) && gl::DetermineCompressedTextureETCSupport(mNativeTextureCaps))
{
mNativeExtensions.compressedTextureETC = true;
}
+ else
+ {
+ mNativeLimitations.emulatedEtc1 = true;
+ }
// Enable ASTC sliced 3D, requires MTLGPUFamilyApple3
if (supportsAppleGPUFamily(3) && mNativeExtensions.textureCompressionASTCLDRKHR)
diff --git a/src/libANGLE/renderer/metal/ProgramMtl.mm b/src/libANGLE/renderer/metal/ProgramMtl.mm
index ff596ae..74e877f 100644
--- a/src/libANGLE/renderer/metal/ProgramMtl.mm
+++ b/src/libANGLE/renderer/metal/ProgramMtl.mm
@@ -323,8 +323,8 @@
&xfbOnlyVariableInfoMap);
// Convert GLSL to spirv code
- gl::ShaderMap<std::vector<uint32_t>> shaderCodes;
- gl::ShaderMap<std::vector<uint32_t>> xfbOnlyShaderCodes; // only vertex shader is needed.
+ gl::ShaderMap<angle::spirv::Blob> shaderCodes;
+ gl::ShaderMap<angle::spirv::Blob> xfbOnlyShaderCodes; // only vertex shader is needed.
ANGLE_TRY(mtl::GlslangGetShaderSpirvCode(
contextMtl, mState.getExecutable().getLinkedShaderStages(), contextMtl->getCaps(),
shaderSources, false, variableInfoMap, &shaderCodes));
diff --git a/src/libANGLE/renderer/metal/mtl_glslang_utils.h b/src/libANGLE/renderer/metal/mtl_glslang_utils.h
index 18e7bfc..7346104 100644
--- a/src/libANGLE/renderer/metal/mtl_glslang_utils.h
+++ b/src/libANGLE/renderer/metal/mtl_glslang_utils.h
@@ -54,7 +54,7 @@
const gl::ShaderMap<std::string> &shaderSources,
bool isTransformFeedbackEnabled,
const ShaderInterfaceVariableInfoMap &variableInfoMap,
- gl::ShaderMap<std::vector<uint32_t>> *shaderCodeOut);
+ gl::ShaderMap<angle::spirv::Blob> *shaderCodeOut);
// Translate from SPIR-V code to Metal shader source code.
// - spirvShaderCode is SPIRV code per shader stage when XFB emulation is turned off.
@@ -64,8 +64,8 @@
angle::Result SpirvCodeToMsl(Context *context,
const gl::ProgramState &programState,
const ShaderInterfaceVariableInfoMap &xfbVSVariableInfoMap,
- gl::ShaderMap<std::vector<uint32_t>> *spirvShaderCode,
- std::vector<uint32_t> *xfbOnlySpirvCode /** nullable */,
+ gl::ShaderMap<angle::spirv::Blob> *spirvShaderCode,
+ angle::spirv::Blob *xfbOnlySpirvCode /** nullable */,
gl::ShaderMap<TranslatedShaderInfo> *mslShaderInfoOut,
TranslatedShaderInfo *mslXfbOnlyShaderInfoOut /** nullable */);
diff --git a/src/libANGLE/renderer/metal/mtl_glslang_utils.mm b/src/libANGLE/renderer/metal/mtl_glslang_utils.mm
index 236ad98..d4a8a06 100644
--- a/src/libANGLE/renderer/metal/mtl_glslang_utils.mm
+++ b/src/libANGLE/renderer/metal/mtl_glslang_utils.mm
@@ -272,7 +272,7 @@
class SpirvToMslCompiler : public spirv_cross::CompilerMSL
{
public:
- SpirvToMslCompiler(std::vector<uint32_t> &&spriv) : spirv_cross::CompilerMSL(spriv) {}
+ SpirvToMslCompiler(angle::spirv::Blob &&spriv) : spirv_cross::CompilerMSL(spriv) {}
void compileEx(gl::ShaderType shaderType,
const angle::HashMap<std::string, uint32_t> &uboOriginalBindings,
@@ -358,7 +358,7 @@
const angle::HashMap<uint32_t, uint32_t> &xfbOriginalBindings,
const OriginalSamplerBindingMap &originalSamplerBindings,
bool disableRasterization,
- std::vector<uint32_t> *sprivCode,
+ angle::spirv::Blob *sprivCode,
TranslatedShaderInfo *translatedShaderInfoOut)
{
if (!sprivCode || sprivCode->empty())
@@ -439,9 +439,9 @@
const gl::ShaderMap<std::string> &shaderSources,
bool isTransformFeedbackEnabled,
const ShaderInterfaceVariableInfoMap &variableInfoMap,
- gl::ShaderMap<std::vector<uint32_t>> *shaderCodeOut)
+ gl::ShaderMap<angle::spirv::Blob> *shaderCodeOut)
{
- gl::ShaderMap<SpirvBlob> initialSpirvBlobs;
+ gl::ShaderMap<angle::spirv::Blob> initialSpirvBlobs;
ANGLE_TRY(rx::GlslangGetShaderSpirvCode(
[context](GlslangError error) { return HandleError(context, error); }, linkedShaderStages,
@@ -471,8 +471,8 @@
angle::Result SpirvCodeToMsl(Context *context,
const gl::ProgramState &programState,
const ShaderInterfaceVariableInfoMap &xfbVSVariableInfoMap,
- gl::ShaderMap<std::vector<uint32_t>> *spirvShaderCode,
- std::vector<uint32_t> *xfbOnlySpirvCode /** nullable */,
+ gl::ShaderMap<angle::spirv::Blob> *spirvShaderCode,
+ angle::spirv::Blob *xfbOnlySpirvCode /** nullable */,
gl::ShaderMap<TranslatedShaderInfo> *mslShaderInfoOut,
TranslatedShaderInfo *mslXfbOnlyShaderInfoOut /** nullable */)
{
@@ -518,7 +518,7 @@
// Do the actual translation
for (gl::ShaderType shaderType : gl::kAllGLES2ShaderTypes)
{
- std::vector<uint32_t> &sprivCode = spirvShaderCode->at(shaderType);
+ angle::spirv::Blob &sprivCode = spirvShaderCode->at(shaderType);
ANGLE_TRY(ConvertSpirvToMsl(context, shaderType, uboOriginalBindings, xfbOriginalBindings,
originalSamplerBindings, /* disableRasterization */ false,
&sprivCode, &mslShaderInfoOut->at(shaderType)));
diff --git a/src/libANGLE/renderer/metal/mtl_utils.mm b/src/libANGLE/renderer/metal/mtl_utils.mm
index 076e609..8d2cc50 100644
--- a/src/libANGLE/renderer/metal/mtl_utils.mm
+++ b/src/libANGLE/renderer/metal/mtl_utils.mm
@@ -35,11 +35,10 @@
uint32_t vendorId;
};
- constexpr Vendor kVendors[] = {{@"AMD", angle::kVendorID_AMD},
- {@"Radeon", angle::kVendorID_AMD},
- {@"Intel", angle::kVendorID_Intel},
- {@"Geforce", angle::kVendorID_NVIDIA},
- {@"Quadro", angle::kVendorID_NVIDIA}};
+ constexpr Vendor kVendors[] = {
+ {@"AMD", angle::kVendorID_AMD}, {@"Apple", angle::kVendorID_Apple},
+ {@"Radeon", angle::kVendorID_AMD}, {@"Intel", angle::kVendorID_Intel},
+ {@"Geforce", angle::kVendorID_NVIDIA}, {@"Quadro", angle::kVendorID_NVIDIA}};
ANGLE_MTL_OBJC_SCOPE
{
if (metalDevice)
diff --git a/src/libANGLE/renderer/vulkan/BUILD.gn b/src/libANGLE/renderer/vulkan/BUILD.gn
index 9daac85..a1aee52 100644
--- a/src/libANGLE/renderer/vulkan/BUILD.gn
+++ b/src/libANGLE/renderer/vulkan/BUILD.gn
@@ -221,6 +221,8 @@
"$angle_root:angle_compression",
"$angle_root:angle_gpu_info_util",
"$angle_root:angle_image_util",
+ "$angle_root/src/common/spirv:angle_spirv_builder",
+ "$angle_spirv_headers_dir:spv_headers",
]
public_deps = [
diff --git a/src/libANGLE/renderer/vulkan/BufferVk.cpp b/src/libANGLE/renderer/vulkan/BufferVk.cpp
index c507221..258f184 100644
--- a/src/libANGLE/renderer/vulkan/BufferVk.cpp
+++ b/src/libANGLE/renderer/vulkan/BufferVk.cpp
@@ -111,6 +111,12 @@
// to acquire a new BufferHelper from the pool.
return subDataSize > (bufferSize / 2);
}
+
+ANGLE_INLINE bool IsUsageDynamic(gl::BufferUsage usage)
+{
+ return (usage == gl::BufferUsage::DynamicDraw || usage == gl::BufferUsage::DynamicCopy ||
+ usage == gl::BufferUsage::DynamicRead);
+}
} // namespace
// ConversionBuffer implementation.
@@ -632,7 +638,14 @@
ASSERT(mapPointer);
memcpy(mapPointer, data, size);
- mBuffer->unmap(contextVk->getRenderer());
+
+ // If the buffer has dynamic usage then the intent is frequent client side updates to the
+ // buffer. Don't CPU unmap the buffer, we will take care of unmapping when releasing the buffer
+ // to either the renderer or mBufferFreeList.
+ if (!IsUsageDynamic(mState.getUsage()))
+ {
+ mBuffer->unmap(contextVk->getRenderer());
+ }
ASSERT(mBuffer->isCoherent());
return angle::Result::Continue;
@@ -666,24 +679,25 @@
angle::Result BufferVk::acquireAndUpdate(ContextVk *contextVk,
const uint8_t *data,
- size_t size,
+ size_t updateSize,
size_t offset)
{
// Here we acquire a new BufferHelper and directUpdate() the new buffer.
// If the subData size was less than the buffer's size we additionally enqueue
// a GPU copy of the remaining regions from the old mBuffer to the new one.
vk::BufferHelper *src = mBuffer;
- size_t offsetAfterSubdata = (offset + size);
+ size_t bufferSize = static_cast<size_t>(mState.getSize());
+ size_t offsetAfterSubdata = (offset + updateSize);
bool updateRegionBeforeSubData = (offset > 0);
- bool updateRegionAfterSubData = (offsetAfterSubdata < static_cast<size_t>(mState.getSize()));
+ bool updateRegionAfterSubData = (offsetAfterSubdata < bufferSize);
if (updateRegionBeforeSubData || updateRegionAfterSubData)
{
src->retain(&contextVk->getResourceUseList());
}
- ANGLE_TRY(acquireBufferHelper(contextVk, size, &mBuffer));
- ANGLE_TRY(directUpdate(contextVk, data, size, offset));
+ ANGLE_TRY(acquireBufferHelper(contextVk, bufferSize, &mBuffer));
+ ANGLE_TRY(directUpdate(contextVk, data, updateSize, offset));
constexpr int kMaxCopyRegions = 2;
angle::FixedVector<VkBufferCopy, kMaxCopyRegions> copyRegions;
@@ -694,8 +708,8 @@
}
if (updateRegionAfterSubData)
{
- copyRegions.push_back({offsetAfterSubdata, offsetAfterSubdata,
- (static_cast<size_t>(mState.getSize()) - offsetAfterSubdata)});
+ copyRegions.push_back(
+ {offsetAfterSubdata, offsetAfterSubdata, (bufferSize - offsetAfterSubdata)});
}
if (!copyRegions.empty())
diff --git a/src/libANGLE/renderer/vulkan/BufferVk.h b/src/libANGLE/renderer/vulkan/BufferVk.h
index 1ebfecc..7c37a70 100644
--- a/src/libANGLE/renderer/vulkan/BufferVk.h
+++ b/src/libANGLE/renderer/vulkan/BufferVk.h
@@ -158,7 +158,7 @@
size_t offset);
angle::Result acquireAndUpdate(ContextVk *contextVk,
const uint8_t *data,
- size_t size,
+ size_t updateSize,
size_t offset);
angle::Result setDataWithMemoryType(const gl::Context *context,
gl::BufferBinding target,
diff --git a/src/libANGLE/renderer/vulkan/ContextVk.cpp b/src/libANGLE/renderer/vulkan/ContextVk.cpp
index 50c831d..e90862f 100644
--- a/src/libANGLE/renderer/vulkan/ContextVk.cpp
+++ b/src/libANGLE/renderer/vulkan/ContextVk.cpp
@@ -431,7 +431,7 @@
DIRTY_BIT_DESCRIPTOR_SETS, DIRTY_BIT_DRIVER_UNIFORMS_BINDING};
mGraphicsDirtyBitHandlers[DIRTY_BIT_MEMORY_BARRIER] =
- &ContextVk::handleDirtyGraphicsMemorybarrier;
+ &ContextVk::handleDirtyGraphicsMemoryBarrier;
mGraphicsDirtyBitHandlers[DIRTY_BIT_EVENT_LOG] = &ContextVk::handleDirtyGraphicsEventLog;
mGraphicsDirtyBitHandlers[DIRTY_BIT_DEFAULT_ATTRIBS] =
&ContextVk::handleDirtyGraphicsDefaultAttribs;
@@ -1070,15 +1070,15 @@
return angle::Result::Continue;
}
-angle::Result ContextVk::handleDirtyGraphicsMemorybarrier(DirtyBits::Iterator *dirtyBitsIterator,
+angle::Result ContextVk::handleDirtyGraphicsMemoryBarrier(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{
- return handleDirtyMemorybarrierImpl(dirtyBitsIterator, dirtyBitMask);
+ return handleDirtyMemoryBarrierImpl(dirtyBitsIterator, dirtyBitMask);
}
angle::Result ContextVk::handleDirtyComputeMemoryBarrier()
{
- return handleDirtyMemorybarrierImpl(nullptr, {});
+ return handleDirtyMemoryBarrierImpl(nullptr, {});
}
bool ContextVk::renderPassUsesStorageResources() const
@@ -1173,7 +1173,7 @@
return false;
}
-angle::Result ContextVk::handleDirtyMemorybarrierImpl(DirtyBits::Iterator *dirtyBitsIterator,
+angle::Result ContextVk::handleDirtyMemoryBarrierImpl(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{
const gl::ProgramExecutable *executable = mState.getProgramExecutable();
@@ -1778,11 +1778,43 @@
return mExecutable->updateDescriptorSets(this, commandBuffer);
}
+void ContextVk::syncObjectPerfCounters()
+{
+ uint32_t descriptorSetAllocations = 0;
+
+ // ContextVk's descriptor set allocations
+ for (const uint32_t count : mObjectPerfCounters.descriptorSetsAllocated)
+ {
+ descriptorSetAllocations += count;
+ }
+ // UtilsVk's descriptor set allocations
+ descriptorSetAllocations += mUtils.getObjectPerfCounters().descriptorSetsAllocated;
+ // ProgramExecutableVk's descriptor set allocations
+ const gl::State &state = getState();
+ const gl::ShaderProgramManager &shadersAndPrograms = state.getShaderProgramManagerForCapture();
+ const gl::ResourceMap<gl::Program, gl::ShaderProgramID> &programs =
+ shadersAndPrograms.getProgramsForCaptureAndPerf();
+ for (const std::pair<GLuint, gl::Program *> &resource : programs)
+ {
+ ProgramVk *programVk = vk::GetImpl(resource.second);
+ ProgramExecutablePerfCounters progPerfCounters =
+ programVk->getExecutable().getAndResetObjectPerfCounters();
+
+ for (const uint32_t count : progPerfCounters.descriptorSetsAllocated)
+ {
+ descriptorSetAllocations += count;
+ }
+ }
+ mPerfCounters.descriptorSetAllocations = descriptorSetAllocations;
+}
+
void ContextVk::updateOverlayOnPresent()
{
const gl::OverlayType *overlay = mState.getOverlay();
ASSERT(overlay->isEnabled());
+ syncObjectPerfCounters();
+
// Update overlay if active.
{
gl::RunningGraphWidget *renderPassCount =
@@ -1801,39 +1833,10 @@
}
{
- uint32_t descriptorSetAllocations = 0;
-
- // ContextVk's descriptor set allocations
- for (const uint32_t count : mObjectPerfCounters.descriptorSetsAllocated)
- {
- descriptorSetAllocations += count;
- }
- // UtilsVk's descriptor set allocations
- descriptorSetAllocations += mUtils.getObjectPerfCounters().descriptorSetsAllocated;
- // ProgramExecutableVk's descriptor set allocations
- const gl::State &state = getState();
- const gl::ShaderProgramManager &shadersAndPrograms =
- state.getShaderProgramManagerForCapture();
- const gl::ResourceMap<gl::Program, gl::ShaderProgramID> &programs =
- shadersAndPrograms.getProgramsForCaptureAndPerf();
- for (const std::pair<GLuint, gl::Program *> &resource : programs)
- {
- ProgramVk *programVk = vk::GetImpl(resource.second);
- ProgramExecutableVk::PerfCounters progPerfCounters =
- programVk->getExecutable().getObjectPerfCounters();
-
- for (const uint32_t count : progPerfCounters.descriptorSetsAllocated)
- {
- descriptorSetAllocations += count;
- }
- }
-
gl::RunningGraphWidget *descriptorSetAllocationCount =
overlay->getRunningGraphWidget(gl::WidgetId::VulkanDescriptorSetAllocations);
- descriptorSetAllocationCount->add(descriptorSetAllocations -
- mPerfCounters.descriptorSetAllocations);
+ descriptorSetAllocationCount->add(mPerfCounters.descriptorSetAllocations);
descriptorSetAllocationCount->next();
- mPerfCounters.descriptorSetAllocations = descriptorSetAllocations;
}
{
diff --git a/src/libANGLE/renderer/vulkan/ContextVk.h b/src/libANGLE/renderer/vulkan/ContextVk.h
index 3d34f41..41816af 100644
--- a/src/libANGLE/renderer/vulkan/ContextVk.h
+++ b/src/libANGLE/renderer/vulkan/ContextVk.h
@@ -561,6 +561,7 @@
// Used by QueryVk to share query helpers between transform feedback queries.
QueryVk *getActiveRenderPassQuery(gl::QueryType queryType) const;
+ void syncObjectPerfCounters();
void updateOverlayOnPresent();
void addOverlayUsedBuffersCount(vk::CommandBufferHelper *commandBuffer);
@@ -783,7 +784,7 @@
void invalidateDriverUniforms();
// Handlers for graphics pipeline dirty bits.
- angle::Result handleDirtyGraphicsMemorybarrier(DirtyBits::Iterator *dirtyBitsIterator,
+ angle::Result handleDirtyGraphicsMemoryBarrier(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask);
angle::Result handleDirtyGraphicsEventLog(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask);
@@ -832,7 +833,7 @@
angle::Result handleDirtyComputeDescriptorSets();
// Common parts of the common dirty bit handlers.
- angle::Result handleDirtyMemorybarrierImpl(DirtyBits::Iterator *dirtyBitsIterator,
+ angle::Result handleDirtyMemoryBarrierImpl(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask);
angle::Result handleDirtyEventLogImpl(vk::CommandBuffer *commandBuffer);
angle::Result handleDirtyTexturesImpl(vk::CommandBufferHelper *commandBufferHelper);
diff --git a/src/libANGLE/renderer/vulkan/GlslangWrapperVk.cpp b/src/libANGLE/renderer/vulkan/GlslangWrapperVk.cpp
index b2f4c39..968cd48 100644
--- a/src/libANGLE/renderer/vulkan/GlslangWrapperVk.cpp
+++ b/src/libANGLE/renderer/vulkan/GlslangWrapperVk.cpp
@@ -86,22 +86,11 @@
vk::Context *context,
const GlslangSpirvOptions &options,
const ShaderInterfaceVariableInfoMap &variableInfoMap,
- const SpirvBlob &initialSpirvBlob,
- SpirvBlob *shaderCodeOut)
+ const angle::spirv::Blob &initialSpirvBlob,
+ angle::spirv::Blob *shaderCodeOut)
{
return GlslangTransformSpirvCode(
[context](GlslangError error) { return ErrorHandler(context, error); }, options,
variableInfoMap, initialSpirvBlob, shaderCodeOut);
}
-
-// static
-angle::Result GlslangWrapperVk::CompileShaderOneOff(vk::Context *context,
- gl::ShaderType shaderType,
- const std::string &shaderSource,
- SpirvBlob *spirvBlobOut)
-{
- return GlslangCompileShaderOneOff(
- [context](GlslangError error) { return ErrorHandler(context, error); }, shaderType,
- shaderSource, spirvBlobOut);
-}
} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/GlslangWrapperVk.h b/src/libANGLE/renderer/vulkan/GlslangWrapperVk.h
index 17cbb47..853b9ef 100644
--- a/src/libANGLE/renderer/vulkan/GlslangWrapperVk.h
+++ b/src/libANGLE/renderer/vulkan/GlslangWrapperVk.h
@@ -46,13 +46,8 @@
static angle::Result TransformSpirV(vk::Context *context,
const GlslangSpirvOptions &options,
const ShaderInterfaceVariableInfoMap &variableInfoMap,
- const SpirvBlob &initialSpirvBlob,
- SpirvBlob *shaderCodeOut);
-
- static angle::Result CompileShaderOneOff(vk::Context *context,
- gl::ShaderType shaderType,
- const std::string &shaderSource,
- SpirvBlob *spirvBlobOut);
+ const angle::spirv::Blob &initialSpirvBlob,
+ angle::spirv::Blob *shaderCodeOut);
};
} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp b/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp
index 889ee4c..b7605f5 100644
--- a/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp
+++ b/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp
@@ -63,7 +63,7 @@
bool ValidateTransformedSpirV(ContextVk *contextVk,
const gl::ShaderBitSet &linkedShaderStages,
const ShaderInterfaceVariableInfoMap &variableInfoMap,
- const gl::ShaderMap<SpirvBlob> &spirvBlobs)
+ const gl::ShaderMap<angle::spirv::Blob> &spirvBlobs)
{
const gl::ShaderType lastPreFragmentStage = gl::GetLastPreFragmentStage(linkedShaderStages);
@@ -78,7 +78,7 @@
options.removeDebugInfo = true;
options.isTransformFeedbackStage = shaderType == lastPreFragmentStage;
- SpirvBlob transformed;
+ angle::spirv::Blob transformed;
if (GlslangWrapperVk::TransformSpirV(contextVk, options, variableInfoMap,
spirvBlobs[shaderType],
&transformed) != angle::Result::Continue)
@@ -118,7 +118,7 @@
void ShaderInfo::release(ContextVk *contextVk)
{
- for (SpirvBlob &spirvBlob : mSpirvBlobs)
+ for (angle::spirv::Blob &spirvBlob : mSpirvBlobs)
{
spirvBlob.clear();
}
@@ -130,7 +130,7 @@
// Read in shader codes for all shader types
for (const gl::ShaderType shaderType : gl::AllShaderTypes())
{
- SpirvBlob *spirvBlob = &mSpirvBlobs[shaderType];
+ angle::spirv::Blob *spirvBlob = &mSpirvBlobs[shaderType];
// Read the SPIR-V
stream->readIntVector<uint32_t>(spirvBlob);
@@ -146,7 +146,7 @@
// Write out shader codes for all shader types
for (const gl::ShaderType shaderType : gl::AllShaderTypes())
{
- const SpirvBlob &spirvBlob = mSpirvBlobs[shaderType];
+ const angle::spirv::Blob &spirvBlob = mSpirvBlobs[shaderType];
// Write the SPIR-V
stream->writeIntVector(spirvBlob);
@@ -166,10 +166,10 @@
ProgramTransformOptions optionBits,
const ShaderInterfaceVariableInfoMap &variableInfoMap)
{
- const gl::ShaderMap<SpirvBlob> &originalSpirvBlobs = shaderInfo.getSpirvBlobs();
- const SpirvBlob &originalSpirvBlob = originalSpirvBlobs[shaderType];
- gl::ShaderMap<SpirvBlob> transformedSpirvBlobs;
- SpirvBlob &transformedSpirvBlob = transformedSpirvBlobs[shaderType];
+ const gl::ShaderMap<angle::spirv::Blob> &originalSpirvBlobs = shaderInfo.getSpirvBlobs();
+ const angle::spirv::Blob &originalSpirvBlob = originalSpirvBlobs[shaderType];
+ gl::ShaderMap<angle::spirv::Blob> transformedSpirvBlobs;
+ angle::spirv::Blob &transformedSpirvBlob = transformedSpirvBlobs[shaderType];
GlslangSpirvOptions options;
options.shaderType = shaderType;
@@ -1828,4 +1828,11 @@
}
}
+ProgramExecutablePerfCounters ProgramExecutableVk::getAndResetObjectPerfCounters()
+{
+ ProgramExecutablePerfCounters counters = mObjectPerfCounters;
+ mObjectPerfCounters.descriptorSetsAllocated = {};
+ return counters;
+}
+
} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/ProgramExecutableVk.h b/src/libANGLE/renderer/vulkan/ProgramExecutableVk.h
index 75a37f9..db9dd55 100644
--- a/src/libANGLE/renderer/vulkan/ProgramExecutableVk.h
+++ b/src/libANGLE/renderer/vulkan/ProgramExecutableVk.h
@@ -37,14 +37,14 @@
ANGLE_INLINE bool valid() const { return mIsInitialized; }
- const gl::ShaderMap<SpirvBlob> &getSpirvBlobs() const { return mSpirvBlobs; }
+ const gl::ShaderMap<angle::spirv::Blob> &getSpirvBlobs() const { return mSpirvBlobs; }
// Save and load implementation for GLES Program Binary support.
void load(gl::BinaryInputStream *stream);
void save(gl::BinaryOutputStream *stream);
private:
- gl::ShaderMap<SpirvBlob> mSpirvBlobs;
+ gl::ShaderMap<angle::spirv::Blob> mSpirvBlobs;
bool mIsInitialized = false;
};
@@ -101,6 +101,14 @@
std::vector<sh::BlockMemberInfo> uniformLayout;
};
+// Performance and resource counters.
+using DescriptorSetCountList = std::array<uint32_t, DescriptorSetIndex::EnumCount>;
+
+struct ProgramExecutablePerfCounters
+{
+ DescriptorSetCountList descriptorSetsAllocated;
+};
+
class ProgramExecutableVk
{
public:
@@ -175,14 +183,7 @@
mProgramPipeline = pipeline;
}
- using DescriptorSetCountList = std::array<uint32_t, DescriptorSetIndex::EnumCount>;
- // Performance and resource counters.
- struct PerfCounters
- {
- DescriptorSetCountList descriptorSetsAllocated;
- };
-
- const PerfCounters getObjectPerfCounters() const { return mObjectPerfCounters; }
+ ProgramExecutablePerfCounters getAndResetObjectPerfCounters();
private:
friend class ProgramVk;
@@ -282,7 +283,7 @@
ProgramVk *mProgram;
ProgramPipelineVk *mProgramPipeline;
- PerfCounters mObjectPerfCounters;
+ ProgramExecutablePerfCounters mObjectPerfCounters;
};
} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/RendererVk.cpp b/src/libANGLE/renderer/vulkan/RendererVk.cpp
index d14fa70..ee98d7d 100644
--- a/src/libANGLE/renderer/vulkan/RendererVk.cpp
+++ b/src/libANGLE/renderer/vulkan/RendererVk.cpp
@@ -40,6 +40,13 @@
namespace
{
constexpr VkFormatFeatureFlags kInvalidFormatFeatureFlags = static_cast<VkFormatFeatureFlags>(-1);
+
+#if defined(ANGLE_EXPOSE_NON_CONFORMANT_EXTENSIONS_AND_VERSIONS)
+constexpr bool kExposeNonConformantExtensionsAndVersions = true;
+#else
+constexpr bool kExposeNonConformantExtensionsAndVersions = false;
+#endif
+
} // anonymous namespace
namespace rx
@@ -1935,6 +1942,13 @@
&mFeatures, supportsIncrementalPresent,
ExtensionFound(VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME, deviceExtensionNames));
+ // The Vulkan specification for the VK_KHR_incremental_present extension does not address
+ // rotation. In Android, this extension is implemented on top of the same platform code as
+ // eglSwapBuffersWithDamageKHR(), which code assumes that it should rotate each rectangle. To
+ // avoid double-rotating damage rectangles on Android, we must avoid pre-rotating
+ // application-provided rectangles. See: https://issuetracker.google.com/issues/181796746
+ ANGLE_FEATURE_CONDITION(&mFeatures, disablePreRotateIncrementalPresentRectangles, IsAndroid());
+
#if defined(ANGLE_PLATFORM_ANDROID)
ANGLE_FEATURE_CONDITION(
&mFeatures, supportsAndroidHardwareBuffer,
@@ -2144,6 +2158,10 @@
// Negative viewports are exposed in the Maintenance1 extension and in core Vulkan 1.1+.
ANGLE_FEATURE_CONDITION(&mFeatures, supportsNegativeViewport, supportsNegativeViewport);
+ // Whether non-conformant configurations and extensions should be exposed.
+ ANGLE_FEATURE_CONDITION(&mFeatures, exposeNonConformantExtensionsAndVersions,
+ kExposeNonConformantExtensionsAndVersions);
+
angle::PlatformMethods *platform = ANGLEPlatformCurrent();
platform->overrideFeaturesVk(platform, &mFeatures);
diff --git a/src/libANGLE/renderer/vulkan/SurfaceVk.cpp b/src/libANGLE/renderer/vulkan/SurfaceVk.cpp
index c989902..a986499 100644
--- a/src/libANGLE/renderer/vulkan/SurfaceVk.cpp
+++ b/src/libANGLE/renderer/vulkan/SurfaceVk.cpp
@@ -1253,29 +1253,7 @@
{
DisplayVk *displayVk = vk::GetImpl(context->getDisplay());
angle::Result result;
- if (n_rects == 1 && rects[0] == 0 && rects[1] == 0 && rects[2] == getWidth() &&
- rects[3] == getHeight())
- {
- // Work-around a defect on at least the Pixel 4 family, likely in the hardware composer
- // (HWC) driver that SurfaceFlinger (SF) uses to composite results to the display. When
- // some games switch FROM one EGLSurface and using eglSwapBuffers() TO a new EGLSurface and
- // using eglSwapBuffersWithDamageKHR(), the user will frequently see the right half of the
- // window stick with previous contents. Causing SF to composite the window differently
- // (e.g. swiping to show the nagivation buttons or to show the list of apps) immediately
- // stops the problem, further pointing to a HWC bug.
- //
- // In this case, the "damage area" is the entire window, which means that a normal
- // eglSwapBuffers() should be functionally identical (except for whatever SW/HWC will do
- // differently for compositing).
- //
- // TODO: Remove this work-around when we no longer support affected devices (at least Pixel
- // 4 XL, but not Arm-GPU devices). https://issuetracker.google.com/issues/182213414
- result = swapImpl(context, nullptr, 0, nullptr);
- }
- else
- {
- result = swapImpl(context, rects, n_rects, nullptr);
- }
+ result = swapImpl(context, rects, n_rects, nullptr);
return angle::ToEGL(result, displayVk, EGL_BAD_SURFACE);
}
@@ -1439,7 +1417,8 @@
rect.extent.width = gl::clamp(*eglRects++, 0, width - rect.offset.x);
rect.extent.height = gl::clamp(*eglRects++, 0, height - rect.offset.y);
rect.layer = 0;
- if (Is90DegreeRotation(getPreTransform()))
+ if (Is90DegreeRotation(getPreTransform()) &&
+ !contextVk->getFeatures().disablePreRotateIncrementalPresentRectangles.enabled)
{
std::swap(rect.offset.x, rect.offset.y);
std::swap(rect.extent.width, rect.extent.height);
diff --git a/src/libANGLE/renderer/vulkan/UtilsVk.cpp b/src/libANGLE/renderer/vulkan/UtilsVk.cpp
index 327880f..2f6b6a2 100644
--- a/src/libANGLE/renderer/vulkan/UtilsVk.cpp
+++ b/src/libANGLE/renderer/vulkan/UtilsVk.cpp
@@ -9,10 +9,12 @@
#include "libANGLE/renderer/vulkan/UtilsVk.h"
+#include "common/spirv/spirv_instruction_builder_autogen.h"
+
+#include "libANGLE/renderer/glslang_wrapper_utils.h"
#include "libANGLE/renderer/vulkan/ContextVk.h"
#include "libANGLE/renderer/vulkan/DisplayVk.h"
#include "libANGLE/renderer/vulkan/FramebufferVk.h"
-#include "libANGLE/renderer/vulkan/GlslangWrapperVk.h"
#include "libANGLE/renderer/vulkan/RenderTargetVk.h"
#include "libANGLE/renderer/vulkan/RendererVk.h"
#include "libANGLE/renderer/vulkan/vk_utils.h"
@@ -30,6 +32,8 @@
namespace ConvertIndexIndirectLineLoop_comp = vk::InternalShader::ConvertIndexIndirectLineLoop_comp;
namespace GenerateMipmap_comp = vk::InternalShader::GenerateMipmap_comp;
+namespace spirv = angle::spirv;
+
namespace
{
constexpr uint32_t kConvertIndexDestinationBinding = 0;
@@ -408,7 +412,9 @@
desc->setStencilBackWriteMask(completeMask);
}
-// Creates a shader that looks like the following, based on the number and types of unresolve
+namespace unresolve
+{
+// The unresolve shader looks like the following, based on the number and types of unresolve
// attachments.
//
// #version 450 core
@@ -431,79 +437,545 @@
// gl_FragDepth = subpassLoad(depthIn).x;
// gl_FragStencilRefARB = int(subpassLoad(stencilIn).x);
// }
-angle::Result MakeUnresolveFragShader(
- vk::Context *context,
- uint32_t colorAttachmentCount,
- gl::DrawBuffersArray<UnresolveColorAttachmentType> &colorAttachmentTypes,
- bool unresolveDepth,
- bool unresolveStencil,
- SpirvBlob *spirvBlobOut)
+//
+// This shader compiles to the following SPIR-V:
+//
+// OpCapability Shader \
+// OpCapability InputAttachment \
+// OpCapability StencilExportEXT \ Preamble. Mostly fixed, except
+// OpExtension "SPV_EXT_shader_stencil_export" \ OpEntryPoint should enumerate
+// %1 = OpExtInstImport "GLSL.std.450" \ out variables, stencil export
+// OpMemoryModel Logical GLSL450 / is conditional to stencil
+// OpEntryPoint Fragment %4 "main" %26 %27 %28 %29 %30 / unresolve, and depth replacing
+// OpExecutionMode %4 OriginUpperLeft / conditional to depth unresolve.
+// OpExecutionMode %4 DepthReplacing /
+// OpSource GLSL 450 /
+//
+// OpName %4 "main" \
+// OpName %26 "colorOut0" \
+// OpName %27 "colorOut1" \
+// OpName %28 "colorOut2" \
+// OpName %29 "gl_FragDepth" \ Debug information. Not generated here.
+// OpName %30 "gl_FragStencilRefARB" /
+// OpName %31 "colorIn0" /
+// OpName %32 "colorIn1" /
+// OpName %33 "colorIn2" /
+// OpName %34 "depthIn" /
+// OpName %35 "stencilIn" /
+//
+// OpDecorate %26 Location 0 \
+// OpDecorate %27 Location 1 \ Location decoration of out variables.
+// OpDecorate %28 Location 2 /
+//
+// OpDecorate %29 BuiltIn FragDepth \ Builtin outputs, conditional to depth
+// OpDecorate %30 BuiltIn FragStencilRefEXT / and stencil unresolve.
+//
+// OpDecorate %31 DescriptorSet 0 \
+// OpDecorate %31 Binding 0 \
+// OpDecorate %31 InputAttachmentIndex 0 \
+// OpDecorate %32 DescriptorSet 0 \
+// OpDecorate %32 Binding 1 \
+// OpDecorate %32 InputAttachmentIndex 1 \
+// OpDecorate %33 DescriptorSet 0 \ set, binding and input_attachment
+// OpDecorate %33 Binding 2 \ decorations of the subpassInput
+// OpDecorate %33 InputAttachmentIndex 2 / variables.
+// OpDecorate %34 DescriptorSet 0 /
+// OpDecorate %34 Binding 3 /
+// OpDecorate %34 InputAttachmentIndex 3 /
+// OpDecorate %35 DescriptorSet 0 /
+// OpDecorate %35 Binding 4 /
+// OpDecorate %35 InputAttachmentIndex 3 /
+//
+// %2 = OpTypeVoid \ Type of main(). Fixed.
+// %3 = OpTypeFunction %2 /
+//
+// %6 = OpTypeFloat 32 \
+// %7 = OpTypeVector %6 4 \
+// %8 = OpTypePointer Output %7 \ Type declaration for "out vec4"
+// %9 = OpTypeImage %6 SubpassData 0 0 0 2 Unknown / and "subpassInput". Fixed.
+// %10 = OpTypePointer UniformConstant %9 /
+//
+// %11 = OpTypeInt 32 1 \
+// %12 = OpTypeVector %11 4 \
+// %13 = OpTypePointer Output %12 \ Type declaration for "out ivec4"
+// %14 = OpTypeImage %11 SubpassData 0 0 0 2 Unknown / and "isubpassInput". Fixed.
+// %15 = OpTypePointer UniformConstant %14 /
+//
+// %16 = OpTypeInt 32 0 \
+// %17 = OpTypeVector %16 4 \
+// %18 = OpTypePointer Output %17 \ Type declaration for "out uvec4"
+// %19 = OpTypeImage %16 SubpassData 0 0 0 2 Unknown / and "usubpassInput". Fixed.
+// %20 = OpTypePointer UniformConstant %19 /
+//
+// %21 = OpTypePointer Output %6 \ Type declaraions for depth and stencil. Fixed.
+// %22 = OpTypePointer Output %11 /
+//
+// %23 = OpConstant %11 0 \
+// %24 = OpTypeVector %11 2 \ ivec2(0) for OpImageRead. subpassLoad
+// %25 = OpConstantComposite %22 %21 %21 / doesn't require coordinates. Fixed.
+//
+// %26 = OpVariable %8 Output \
+// %27 = OpVariable %13 Output \
+// %28 = OpVariable %18 Output \
+// %29 = OpVariable %21 Output \
+// %30 = OpVariable %22 Output \ Actual "out" and "*subpassInput"
+// %31 = OpVariable %10 UniformConstant / variable declarations.
+// %32 = OpVariable %15 UniformConstant /
+// %33 = OpVariable %20 UniformConstant /
+// %34 = OpVariable %10 UniformConstant /
+// %35 = OpVariable %20 UniformConstant /
+//
+// %4 = OpFunction %2 None %3 \ Top of main(). Fixed.
+// %5 = OpLabel /
+//
+// %36 = OpLoad %9 %31 \
+// %37 = OpImageRead %7 %36 %23 \ colorOut0 = subpassLoad(colorIn0);
+// OpStore %26 %37 /
+//
+// %38 = OpLoad %14 %32 \
+// %39 = OpImageRead %12 %38 %23 \ colorOut1 = subpassLoad(colorIn1);
+// OpStore %27 %39 /
+//
+// %40 = OpLoad %19 %33 \
+// %41 = OpImageRead %17 %40 %23 \ colorOut2 = subpassLoad(colorIn2);
+// OpStore %28 %41 /
+//
+// %42 = OpLoad %9 %34 \
+// %43 = OpImageRead %7 %42 %23 \ gl_FragDepth = subpassLoad(depthIn).x;
+// %44 = OpCompositeExtract %6 %43 0 /
+// OpStore %29 %44 /
+//
+// %45 = OpLoad %19 %35 \
+// %46 = OpImageRead %17 %45 %23 \
+// %47 = OpCompositeExtract %16 %46 0 \ gl_FragStencilRefARB = int(subpassLoad(stencilIn).x);
+// %48 = OpBitcast %11 %47 /
+// OpStore %30 %48 /
+//
+// OpReturn \ Bottom of main(). Fixed.
+// OpFunctionEnd /
+//
+// What makes the generation of this shader manageable is that the majority of it is constant
+// between the different variations of the shader. The rest are repeating patterns with different
+// ids or indices.
+
+enum
{
- std::ostringstream source;
+ // main() ids
+ kIdExtInstImport = 1,
+ kIdVoid,
+ kIdMainType,
+ kIdMain,
+ kIdMainLabel,
- source << "#version 450 core\n";
+ // Types for "out vec4" and "subpassInput"
+ kIdFloatType,
+ kIdFloat4Type,
+ kIdFloat4OutType,
+ kIdFloatSubpassImageType,
+ kIdFloatSubpassInputType,
+ // Types for "out ivec4" and "isubpassInput"
+ kIdSIntType,
+ kIdSInt4Type,
+ kIdSInt4OutType,
+ kIdSIntSubpassImageType,
+ kIdSIntSubpassInputType,
+
+ // Types for "out uvec4" and "usubpassInput"
+ kIdUIntType,
+ kIdUInt4Type,
+ kIdUInt4OutType,
+ kIdUIntSubpassImageType,
+ kIdUIntSubpassInputType,
+
+ // Types for gl_FragDepth && gl_FragStencilRefARB
+ kIdFloatOutType,
+ kIdSIntOutType,
+
+ // ivec2(0) constant
+ kIdSIntZero,
+ kIdSInt2Type,
+ kIdSInt2Zero,
+
+ // Output variable ids
+ kIdColor0Out,
+ kIdDepthOut = kIdColor0Out + gl::IMPLEMENTATION_MAX_DRAW_BUFFERS,
+ kIdStencilOut,
+
+ // Input variable ids
+ kIdColor0In,
+ kIdDepthIn = kIdColor0In + gl::IMPLEMENTATION_MAX_DRAW_BUFFERS,
+ kIdStencilIn,
+
+ // Ids for temp variables
+ kIdColor0Load,
+ // 2 temp ids per color unresolve
+ kIdDepthLoad = kIdColor0Load + gl::IMPLEMENTATION_MAX_DRAW_BUFFERS * 2,
+ // 3 temp ids for depth unresolve
+ kIdStencilLoad = kIdDepthLoad + 3,
+ // Total number of ids used
+ // 4 temp ids for stencil unresolve
+ kIdCount = kIdStencilLoad + 4,
+};
+
+void InsertPreamble(uint32_t colorAttachmentCount,
+ bool unresolveDepth,
+ bool unresolveStencil,
+ angle::spirv::Blob *blobOut)
+{
+ spirv::WriteCapability(blobOut, spv::CapabilityShader);
+ spirv::WriteCapability(blobOut, spv::CapabilityInputAttachment);
if (unresolveStencil)
{
- source << "#extension GL_ARB_shader_stencil_export : require\n";
+ spirv::WriteCapability(blobOut, spv::CapabilityStencilExportEXT);
+ spirv::WriteExtension(blobOut, "SPV_EXT_shader_stencil_export");
}
+ // OpExtInstImport is actually not needed by this shader. We don't use any instructions from
+ // GLSL.std.450.
+ spirv::WriteMemoryModel(blobOut, spv::AddressingModelLogical, spv::MemoryModelGLSL450);
- for (uint32_t attachmentIndex = 0; attachmentIndex < colorAttachmentCount; ++attachmentIndex)
+ // Create the list of entry point ids, including only the out variables.
+ spirv::IdRefList entryPointIds;
+ for (uint32_t colorIndex = 0; colorIndex < colorAttachmentCount; ++colorIndex)
{
- const UnresolveColorAttachmentType type = colorAttachmentTypes[attachmentIndex];
- ASSERT(type != kUnresolveTypeUnused);
-
- const char *prefix =
- type == kUnresolveTypeUint ? "u" : type == kUnresolveTypeSint ? "i" : "";
-
- source << "layout(location=" << attachmentIndex << ") out " << prefix << "vec4 colorOut"
- << attachmentIndex << ";\n";
- source << "layout(input_attachment_index=" << attachmentIndex
- << ", set=" << DescriptorSetIndex::InternalShader << ", binding=" << attachmentIndex
- << ") uniform " << prefix << "subpassInput colorIn" << attachmentIndex << ";\n";
+ entryPointIds.push_back(spirv::IdRef(kIdColor0Out + colorIndex));
}
-
- const uint32_t depthStencilInputIndex = colorAttachmentCount;
- uint32_t depthStencilBindingIndex = colorAttachmentCount;
if (unresolveDepth)
{
- source << "layout(input_attachment_index=" << depthStencilInputIndex
- << ", set=" << DescriptorSetIndex::InternalShader
- << ", binding=" << depthStencilBindingIndex << ") uniform subpassInput depthIn;\n";
+ entryPointIds.push_back(spirv::IdRef(kIdDepthOut));
+ }
+ if (unresolveStencil)
+ {
+ entryPointIds.push_back(spirv::IdRef(kIdStencilOut));
+ }
+ spirv::WriteEntryPoint(blobOut, spv::ExecutionModelFragment, spirv::IdRef(kIdMain), "main",
+ entryPointIds);
+
+ spirv::WriteExecutionMode(blobOut, spirv::IdRef(kIdMain), spv::ExecutionModeOriginUpperLeft);
+ if (unresolveDepth)
+ {
+ spirv::WriteExecutionMode(blobOut, spirv::IdRef(kIdMain), spv::ExecutionModeDepthReplacing);
+ }
+ spirv::WriteSource(blobOut, spv::SourceLanguageGLSL, spirv::LiteralInteger(450), nullptr,
+ nullptr);
+}
+
+void InsertInputDecorations(spirv::IdRef id,
+ uint32_t attachmentIndex,
+ uint32_t binding,
+ angle::spirv::Blob *blobOut)
+{
+ spirv::WriteDecorate(blobOut, id, spv::DecorationDescriptorSet,
+ {spirv::LiteralInteger(DescriptorSetIndex::InternalShader)});
+ spirv::WriteDecorate(blobOut, id, spv::DecorationBinding, {spirv::LiteralInteger(binding)});
+ spirv::WriteDecorate(blobOut, id, spv::DecorationInputAttachmentIndex,
+ {spirv::LiteralInteger(attachmentIndex)});
+}
+
+void InsertColorDecorations(uint32_t colorIndex, angle::spirv::Blob *blobOut)
+{
+ // Decorate the output color attachment with Location
+ spirv::WriteDecorate(blobOut, spirv::IdRef(kIdColor0Out + colorIndex), spv::DecorationLocation,
+ {spirv::LiteralInteger(colorIndex)});
+ // Decorate the subpasss input color attachment with Set/Binding/InputAttachmentIndex.
+ InsertInputDecorations(spirv::IdRef(kIdColor0In + colorIndex), colorIndex, colorIndex, blobOut);
+}
+
+void InsertDepthStencilDecorations(uint32_t depthStencilInputIndex,
+ uint32_t depthStencilBindingIndex,
+ bool unresolveDepth,
+ bool unresolveStencil,
+ angle::spirv::Blob *blobOut)
+{
+ if (unresolveDepth)
+ {
+ // Decorate the output depth attachment with Location
+ spirv::WriteDecorate(blobOut, spirv::IdRef(kIdDepthOut), spv::DecorationBuiltIn,
+ {spirv::LiteralInteger(spv::BuiltInFragDepth)});
+ // Decorate the subpasss input depth attachment with Set/Binding/InputAttachmentIndex.
+ InsertInputDecorations(spirv::IdRef(kIdDepthIn), depthStencilInputIndex,
+ depthStencilBindingIndex, blobOut);
+ // Advance the binding. Note that the depth/stencil attachment has the same input
+ // attachment index (it's the same attachment in the subpass), but different bindings (one
+ // aspect per image view).
++depthStencilBindingIndex;
}
if (unresolveStencil)
{
- source << "layout(input_attachment_index=" << depthStencilInputIndex
- << ", set=" << DescriptorSetIndex::InternalShader
- << ", binding=" << depthStencilBindingIndex
- << ") uniform usubpassInput stencilIn;\n";
+ // Decorate the output stencil attachment with Location
+ spirv::WriteDecorate(blobOut, spirv::IdRef(kIdStencilOut), spv::DecorationBuiltIn,
+ {spirv::LiteralInteger(spv::BuiltInFragStencilRefEXT)});
+ // Decorate the subpasss input stencil attachment with Set/Binding/InputAttachmentIndex.
+ InsertInputDecorations(spirv::IdRef(kIdStencilIn), depthStencilInputIndex,
+ depthStencilBindingIndex, blobOut);
}
+}
- source << "void main(){\n";
+void InsertDerivativeTypes(spirv::IdRef baseId,
+ spirv::IdRef vec4Id,
+ spirv::IdRef vec4OutId,
+ spirv::IdRef imageTypeId,
+ spirv::IdRef inputTypeId,
+ angle::spirv::Blob *blobOut)
+{
+ spirv::WriteTypeVector(blobOut, vec4Id, baseId, spirv::LiteralInteger(4));
+ spirv::WriteTypePointer(blobOut, vec4OutId, spv::StorageClassOutput, vec4Id);
+ spirv::WriteTypeImage(blobOut, imageTypeId, baseId, spv::DimSubpassData,
+ // Unused with subpass inputs
+ spirv::LiteralInteger(0),
+ // Not arrayed
+ spirv::LiteralInteger(0),
+ // Not multisampled
+ spirv::LiteralInteger(0),
+ // Used without a sampler
+ spirv::LiteralInteger(2), spv::ImageFormatUnknown, nullptr);
+ spirv::WriteTypePointer(blobOut, inputTypeId, spv::StorageClassUniformConstant, imageTypeId);
+}
- for (uint32_t attachmentIndex = 0; attachmentIndex < colorAttachmentCount; ++attachmentIndex)
+void InsertCommonTypes(angle::spirv::Blob *blobOut)
+{
+ // Types to support main().
+ spirv::WriteTypeVoid(blobOut, spirv::IdRef(kIdVoid));
+ spirv::WriteTypeFunction(blobOut, spirv::IdRef(kIdMainType), spirv::IdRef(kIdVoid), {});
+
+ // Float types
+ spirv::WriteTypeFloat(blobOut, spirv::IdRef(kIdFloatType), spirv::LiteralInteger(32));
+ InsertDerivativeTypes(spirv::IdRef(kIdFloatType), spirv::IdRef(kIdFloat4Type),
+ spirv::IdRef(kIdFloat4OutType), spirv::IdRef(kIdFloatSubpassImageType),
+ spirv::IdRef(kIdFloatSubpassInputType), blobOut);
+
+ // Int types
+ spirv::WriteTypeInt(blobOut, spirv::IdRef(kIdSIntType), spirv::LiteralInteger(32),
+ spirv::LiteralInteger(1));
+ InsertDerivativeTypes(spirv::IdRef(kIdSIntType), spirv::IdRef(kIdSInt4Type),
+ spirv::IdRef(kIdSInt4OutType), spirv::IdRef(kIdSIntSubpassImageType),
+ spirv::IdRef(kIdSIntSubpassInputType), blobOut);
+
+ // Unsigned int types
+ spirv::WriteTypeInt(blobOut, spirv::IdRef(kIdUIntType), spirv::LiteralInteger(32),
+ spirv::LiteralInteger(0));
+ InsertDerivativeTypes(spirv::IdRef(kIdUIntType), spirv::IdRef(kIdUInt4Type),
+ spirv::IdRef(kIdUInt4OutType), spirv::IdRef(kIdUIntSubpassImageType),
+ spirv::IdRef(kIdUIntSubpassInputType), blobOut);
+
+ // Types to support depth/stencil
+ spirv::WriteTypePointer(blobOut, spirv::IdRef(kIdFloatOutType), spv::StorageClassOutput,
+ spirv::IdRef(kIdFloatType));
+ spirv::WriteTypePointer(blobOut, spirv::IdRef(kIdSIntOutType), spv::StorageClassOutput,
+ spirv::IdRef(kIdSIntType));
+
+ // Constants used to load from subpass inputs
+ spirv::WriteConstant(blobOut, spirv::IdRef(kIdSIntType), spirv::IdRef(kIdSIntZero),
+ spirv::LiteralInteger(0));
+ spirv::WriteTypeVector(blobOut, spirv::IdRef(kIdSInt2Type), spirv::IdRef(kIdSIntType),
+ spirv::LiteralInteger(2));
+ spirv::WriteConstantComposite(blobOut, spirv::IdRef(kIdSInt2Type), spirv::IdRef(kIdSInt2Zero),
+ {spirv::IdRef(kIdSIntZero), spirv::IdRef(kIdSIntZero)});
+}
+
+void InsertVariableDecl(spirv::IdRef outType,
+ spirv::IdRef outId,
+ spirv::IdRef inType,
+ spirv::IdRef inId,
+ angle::spirv::Blob *blobOut)
+{
+ // Declare both the output and subpass input variables.
+ spirv::WriteVariable(blobOut, outType, outId, spv::StorageClassOutput, nullptr);
+ spirv::WriteVariable(blobOut, inType, inId, spv::StorageClassUniformConstant, nullptr);
+}
+
+void InsertColorVariableDecl(uint32_t colorIndex,
+ UnresolveColorAttachmentType type,
+ angle::spirv::Blob *blobOut)
+{
+ // Find the correct types for color variable declarations.
+ spirv::IdRef outType(kIdFloat4OutType);
+ spirv::IdRef outId(kIdColor0Out + colorIndex);
+ spirv::IdRef inType(kIdFloatSubpassInputType);
+ spirv::IdRef inId(kIdColor0In + colorIndex);
+ switch (type)
{
- source << "colorOut" << attachmentIndex << " = subpassLoad(colorIn" << attachmentIndex
- << ");\n";
+ case kUnresolveTypeSint:
+ outType = spirv::IdRef(kIdSInt4OutType);
+ inType = spirv::IdRef(kIdSIntSubpassInputType);
+ break;
+ case kUnresolveTypeUint:
+ outType = spirv::IdRef(kIdUInt4OutType);
+ inType = spirv::IdRef(kIdUIntSubpassInputType);
+ break;
+ default:
+ break;
}
+ InsertVariableDecl(outType, outId, inType, inId, blobOut);
+}
+void InsertDepthStencilVariableDecl(bool unresolveDepth,
+ bool unresolveStencil,
+ angle::spirv::Blob *blobOut)
+{
if (unresolveDepth)
{
- source << "gl_FragDepth = subpassLoad(depthIn).x;\n";
+ InsertVariableDecl(spirv::IdRef(kIdFloatOutType), spirv::IdRef(kIdDepthOut),
+ spirv::IdRef(kIdFloatSubpassInputType), spirv::IdRef(kIdDepthIn),
+ blobOut);
}
-
if (unresolveStencil)
{
- source << "gl_FragStencilRefARB = int(subpassLoad(stencilIn).x);\n";
+ InsertVariableDecl(spirv::IdRef(kIdSIntOutType), spirv::IdRef(kIdStencilOut),
+ spirv::IdRef(kIdUIntSubpassInputType), spirv::IdRef(kIdStencilIn),
+ blobOut);
+ }
+}
+
+void InsertTopOfMain(angle::spirv::Blob *blobOut)
+{
+ spirv::WriteFunction(blobOut, spirv::IdRef(kIdVoid), spirv::IdRef(kIdMain),
+ spv::FunctionControlMaskNone, spirv::IdRef(kIdMainType));
+ spirv::WriteLabel(blobOut, spirv::IdRef(kIdMainLabel));
+}
+
+void InsertColorUnresolveLoadStore(uint32_t colorIndex,
+ UnresolveColorAttachmentType type,
+ angle::spirv::Blob *blobOut)
+{
+ spirv::IdRef loadResult(kIdColor0Load + colorIndex * 2);
+ spirv::IdRef imageReadResult(loadResult + 1);
+
+ // Find the correct types for load/store.
+ spirv::IdRef loadType(kIdFloatSubpassImageType);
+ spirv::IdRef readType(kIdFloat4Type);
+ spirv::IdRef inId(kIdColor0In + colorIndex);
+ spirv::IdRef outId(kIdColor0Out + colorIndex);
+ switch (type)
+ {
+ case kUnresolveTypeSint:
+ loadType = spirv::IdRef(kIdSIntSubpassImageType);
+ readType = spirv::IdRef(kIdSInt4Type);
+ break;
+ case kUnresolveTypeUint:
+ loadType = spirv::IdRef(kIdUIntSubpassImageType);
+ readType = spirv::IdRef(kIdUInt4Type);
+ break;
+ default:
+ break;
}
- source << "}\n";
-
- return GlslangWrapperVk::CompileShaderOneOff(context, gl::ShaderType::Fragment, source.str(),
- spirvBlobOut);
+ // Load the subpass input image, read from it, and store in output.
+ spirv::WriteLoad(blobOut, loadType, loadResult, inId, nullptr);
+ spirv::WriteImageRead(blobOut, readType, imageReadResult, loadResult,
+ spirv::IdRef(kIdSInt2Zero), nullptr, {});
+ spirv::WriteStore(blobOut, outId, imageReadResult, nullptr);
}
+void InsertDepthStencilUnresolveLoadStore(bool unresolveDepth,
+ bool unresolveStencil,
+ angle::spirv::Blob *blobOut)
+{
+ if (unresolveDepth)
+ {
+ spirv::IdRef loadResult(kIdDepthLoad);
+ spirv::IdRef imageReadResult(loadResult + 1);
+ spirv::IdRef extractResult(imageReadResult + 1);
+
+ spirv::IdRef loadType(kIdFloatSubpassImageType);
+ spirv::IdRef readType(kIdFloat4Type);
+ spirv::IdRef inId(kIdDepthIn);
+ spirv::IdRef outId(kIdDepthOut);
+
+ // Load the subpass input image, read from it, select .x, and store in output.
+ spirv::WriteLoad(blobOut, loadType, loadResult, inId, nullptr);
+ spirv::WriteImageRead(blobOut, readType, imageReadResult, loadResult,
+ spirv::IdRef(kIdSInt2Zero), nullptr, {});
+ spirv::WriteCompositeExtract(blobOut, spirv::IdRef(kIdFloatType), extractResult,
+ imageReadResult, {spirv::LiteralInteger(0)});
+ spirv::WriteStore(blobOut, outId, extractResult, nullptr);
+ }
+ if (unresolveStencil)
+ {
+ spirv::IdRef loadResult(kIdStencilLoad);
+ spirv::IdRef imageReadResult(loadResult + 1);
+ spirv::IdRef extractResult(imageReadResult + 1);
+ spirv::IdRef bitcastResult(extractResult + 1);
+
+ spirv::IdRef loadType(kIdUIntSubpassImageType);
+ spirv::IdRef readType(kIdUInt4Type);
+ spirv::IdRef inId(kIdStencilIn);
+ spirv::IdRef outId(kIdStencilOut);
+
+ // Load the subpass input image, read from it, select .x, and store in output. There's a
+ // bitcast involved since the stencil subpass input has unsigned type, while
+ // gl_FragStencilRefARB is signed!
+ spirv::WriteLoad(blobOut, loadType, loadResult, inId, nullptr);
+ spirv::WriteImageRead(blobOut, readType, imageReadResult, loadResult,
+ spirv::IdRef(kIdSInt2Zero), nullptr, {});
+ spirv::WriteCompositeExtract(blobOut, spirv::IdRef(kIdUIntType), extractResult,
+ imageReadResult, {spirv::LiteralInteger(0)});
+ spirv::WriteBitcast(blobOut, spirv::IdRef(kIdSIntType), bitcastResult, extractResult);
+ spirv::WriteStore(blobOut, outId, bitcastResult, nullptr);
+ }
+}
+
+void InsertBottomOfMain(angle::spirv::Blob *blobOut)
+{
+ spirv::WriteReturn(blobOut);
+ spirv::WriteFunctionEnd(blobOut);
+}
+
+angle::spirv::Blob MakeFragShader(
+ uint32_t colorAttachmentCount,
+ gl::DrawBuffersArray<UnresolveColorAttachmentType> &colorAttachmentTypes,
+ bool unresolveDepth,
+ bool unresolveStencil)
+{
+ angle::spirv::Blob code;
+
+ // Reserve a sensible amount of memory. A single-attachment shader is 169 words.
+ code.reserve(169);
+
+ // Header
+ spirv::WriteSpirvHeader(&code, kIdCount);
+
+ // The preamble
+ InsertPreamble(colorAttachmentCount, unresolveDepth, unresolveStencil, &code);
+
+ // Color attachment decorations
+ for (uint32_t colorIndex = 0; colorIndex < colorAttachmentCount; ++colorIndex)
+ {
+ InsertColorDecorations(colorIndex, &code);
+ }
+
+ const uint32_t depthStencilInputIndex = colorAttachmentCount;
+ uint32_t depthStencilBindingIndex = colorAttachmentCount;
+ InsertDepthStencilDecorations(depthStencilInputIndex, depthStencilBindingIndex, unresolveDepth,
+ unresolveStencil, &code);
+
+ // Common types
+ InsertCommonTypes(&code);
+
+ // Attachment declarations
+ for (uint32_t colorIndex = 0; colorIndex < colorAttachmentCount; ++colorIndex)
+ {
+ InsertColorVariableDecl(colorIndex, colorAttachmentTypes[colorIndex], &code);
+ }
+ InsertDepthStencilVariableDecl(unresolveDepth, unresolveStencil, &code);
+
+ // Top of main
+ InsertTopOfMain(&code);
+
+ // Load and store for each attachment
+ for (uint32_t colorIndex = 0; colorIndex < colorAttachmentCount; ++colorIndex)
+ {
+ InsertColorUnresolveLoadStore(colorIndex, colorAttachmentTypes[colorIndex], &code);
+ }
+ InsertDepthStencilUnresolveLoadStore(unresolveDepth, unresolveStencil, &code);
+
+ // Bottom of main
+ InsertBottomOfMain(&code);
+
+ return code;
+}
+} // namespace unresolve
+
angle::Result GetUnresolveFrag(
vk::Context *context,
uint32_t colorAttachmentCount,
@@ -517,9 +989,10 @@
return angle::Result::Continue;
}
- SpirvBlob shaderCode;
- ANGLE_TRY(MakeUnresolveFragShader(context, colorAttachmentCount, colorAttachmentTypes,
- unresolveDepth, unresolveStencil, &shaderCode));
+ angle::spirv::Blob shaderCode = unresolve::MakeFragShader(
+ colorAttachmentCount, colorAttachmentTypes, unresolveDepth, unresolveStencil);
+
+ ASSERT(spirv::Validate(shaderCode));
// Create shader lazily. Access will need to be locked for multi-threading.
return vk::InitShaderAndSerial(context, &shader->get(), shaderCode.data(),
diff --git a/src/libANGLE/renderer/vulkan/android/HardwareBufferImageSiblingVkAndroid.cpp b/src/libANGLE/renderer/vulkan/android/HardwareBufferImageSiblingVkAndroid.cpp
index c9ae2bd..e9aafde 100644
--- a/src/libANGLE/renderer/vulkan/android/HardwareBufferImageSiblingVkAndroid.cpp
+++ b/src/libANGLE/renderer/vulkan/android/HardwareBufferImageSiblingVkAndroid.cpp
@@ -21,14 +21,54 @@
namespace
{
-
VkImageTiling AhbDescUsageToVkImageTiling(const AHardwareBuffer_Desc &ahbDescription)
{
- if ((ahbDescription.usage & AHARDWAREBUFFER_USAGE_CPU_READ_MASK) != 0 ||
- (ahbDescription.usage & AHARDWAREBUFFER_USAGE_CPU_WRITE_MASK) != 0)
- {
- return VK_IMAGE_TILING_LINEAR;
- }
+ // A note about the choice of OPTIMAL here.
+
+ // When running Android on certain GPUs, there are problems creating Vulkan
+ // image siblings of AHardwareBuffers because it's currently assumed that
+ // the underlying driver can create linear tiling images that have input
+ // attachment usage, which isn't supported on NVIDIA for example, resulting
+ // in failure to create the image siblings. Yet, we don't currently take
+ // advantage of linear elsewhere in ANGLE. To maintain maximum
+ // compatibility on Android for such drivers, use optimal tiling for image
+ // siblings.
+ //
+ // Note that while we have switched to optimal unconditionally in this path
+ // versus linear, it's possible that previously compatible linear usages
+ // might become uncompatible after switching to optimal. However, from what
+ // we've seen on Samsung/NVIDIA/Intel/AMD GPUs so far, formats generally
+ // have more possible usages in optimal tiling versus linear tiling:
+ //
+ // http://vulkan.gpuinfo.org/displayreport.php?id=10804#formats_linear
+ // http://vulkan.gpuinfo.org/displayreport.php?id=10804#formats_optimal
+ //
+ // http://vulkan.gpuinfo.org/displayreport.php?id=10807#formats_linear
+ // http://vulkan.gpuinfo.org/displayreport.php?id=10807#formats_optimal
+ //
+ // http://vulkan.gpuinfo.org/displayreport.php?id=10809#formats_linear
+ // http://vulkan.gpuinfo.org/displayreport.php?id=10809#formats_optimal
+ //
+ // http://vulkan.gpuinfo.org/displayreport.php?id=10787#formats_linear
+ // http://vulkan.gpuinfo.org/displayreport.php?id=10787#formats_optimal
+ //
+ // Also, as an aside, in terms of what's generally expected from the Vulkan
+ // ICD in Android when determining AHB compatibility, if the vendor wants
+ // to declare a particular combinatino of format/tiling/usage/etc as not
+ // supported AHB-wise, it's up to the ICD vendor to zero out bits in
+ // supportedHandleTypes in the vkGetPhysicalDeviceImageFormatProperties2
+ // query:
+ //
+ // ``` *
+ // [VUID-VkImageCreateInfo-pNext-00990](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkImageCreateInfo-pNext-00990)
+ // If the pNext chain includes a VkExternalMemoryImageCreateInfo structure,
+ // its handleTypes member must only contain bits that are also in
+ // VkExternalImageFormatProperties::externalMemoryProperties.compatibleHandleTypes,
+ // as returned by vkGetPhysicalDeviceImageFormatProperties2 with format,
+ // imageType, tiling, usage, and flags equal to those in this structure,
+ // and with a VkPhysicalDeviceExternalImageFormatInfo structure included in
+ // the pNext chain, with a handleType equal to any one of the handle types
+ // specified in VkExternalMemoryImageCreateInfo::handleTypes ```
return VK_IMAGE_TILING_OPTIMAL;
}
diff --git a/src/libANGLE/renderer/vulkan/vk_caps_utils.cpp b/src/libANGLE/renderer/vulkan/vk_caps_utils.cpp
index ff48aec..f508a21 100644
--- a/src/libANGLE/renderer/vulkan/vk_caps_utils.cpp
+++ b/src/libANGLE/renderer/vulkan/vk_caps_utils.cpp
@@ -295,12 +295,17 @@
// Enable GL_EXT_buffer_storage
mNativeExtensions.bufferStorageEXT = true;
- // To ensure that ETC2/EAC formats are enabled only on hardware that supports them natively,
- // this flag is not set by the function above and must be set explicitly. It exposes
- // ANGLE_compressed_texture_etc extension string.
- mNativeExtensions.compressedTextureETC =
- (mPhysicalDeviceFeatures.textureCompressionETC2 == VK_TRUE) &&
- gl::DetermineCompressedTextureETCSupport(mNativeTextureCaps);
+ // When ETC2/EAC formats are natively supported, enable ANGLE-specific extension string to
+ // expose them to WebGL. In other case, mark potentially-available ETC1 extension as emulated.
+ if ((mPhysicalDeviceFeatures.textureCompressionETC2 == VK_TRUE) &&
+ gl::DetermineCompressedTextureETCSupport(mNativeTextureCaps))
+ {
+ mNativeExtensions.compressedTextureETC = true;
+ }
+ else
+ {
+ mNativeLimitations.emulatedEtc1 = true;
+ }
// Vulkan doesn't support ASTC 3D block textures, which are required by
// GL_OES_texture_compression_astc.
diff --git a/src/libANGLE/validationEGL.cpp b/src/libANGLE/validationEGL.cpp
index af013bb..ce1991b 100644
--- a/src/libANGLE/validationEGL.cpp
+++ b/src/libANGLE/validationEGL.cpp
@@ -5038,6 +5038,16 @@
}
break;
+ case EGL_CONTEXT_PRIORITY_LEVEL_IMG:
+ if (!display->getExtensions().contextPriority)
+ {
+ val->setError(EGL_BAD_ATTRIBUTE,
+ "Attribute EGL_CONTEXT_PRIORITY_LEVEL_IMG requires "
+ "extension EGL_IMG_context_priority.");
+ return false;
+ }
+ break;
+
default:
val->setError(EGL_BAD_ATTRIBUTE, "Invalid context attribute.");
return false;
diff --git a/src/libANGLE/validationES2.cpp b/src/libANGLE/validationES2.cpp
index 10c4b08..77d34c5 100644
--- a/src/libANGLE/validationES2.cpp
+++ b/src/libANGLE/validationES2.cpp
@@ -389,6 +389,8 @@
framebuffer->getReadColorAttachment()->getFormat().info->sizedInternalFormat;
const auto &formatInfo = *textureFormat.info;
+ ASSERT(!formatInfo.compressed);
+
// [OpenGL ES 2.0.24] table 3.9
if (isSubImage)
{
@@ -467,22 +469,6 @@
return false;
}
break;
- case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
- case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
- case GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE:
- case GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE:
- case GL_ETC1_RGB8_OES:
- case GL_ETC1_RGB8_LOSSY_DECODE_ANGLE:
- case GL_COMPRESSED_RGB8_LOSSY_DECODE_ETC2_ANGLE:
- case GL_COMPRESSED_SRGB8_LOSSY_DECODE_ETC2_ANGLE:
- case GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE:
- case GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE:
- case GL_COMPRESSED_RGBA_BPTC_UNORM_EXT:
- case GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:
- case GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT:
- case GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT:
- context->validationError(GL_INVALID_OPERATION, kInvalidFormat);
- return false;
case GL_DEPTH_COMPONENT:
case GL_DEPTH_STENCIL_OES:
context->validationError(GL_INVALID_OPERATION, kInvalidFormat);
@@ -558,73 +544,6 @@
return false;
}
break;
- case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
- case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
- if (context->getExtensions().textureCompressionDXT1)
- {
- context->validationError(GL_INVALID_OPERATION, kInvalidFormat);
- return false;
- }
- context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
- return false;
- case GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE:
- if (context->getExtensions().textureCompressionDXT3)
- {
- context->validationError(GL_INVALID_OPERATION, kInvalidFormat);
- return false;
- }
- context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
- return false;
- case GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE:
- if (context->getExtensions().textureCompressionDXT5)
- {
- context->validationError(GL_INVALID_OPERATION, kInvalidFormat);
- return false;
- }
- context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
- return false;
- case GL_ETC1_RGB8_OES:
- if (context->getExtensions().compressedETC1RGB8TextureOES)
- {
- context->validationError(GL_INVALID_OPERATION, kInvalidFormat);
- return false;
- }
- context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
- return false;
- case GL_ETC1_RGB8_LOSSY_DECODE_ANGLE:
- case GL_COMPRESSED_RGB8_LOSSY_DECODE_ETC2_ANGLE:
- case GL_COMPRESSED_SRGB8_LOSSY_DECODE_ETC2_ANGLE:
- case GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE:
- case GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE:
- if (context->getExtensions().lossyETCDecode)
- {
- context->validationError(GL_INVALID_OPERATION, kInvalidFormat);
- return false;
- }
- context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
- return false;
- case GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG:
- case GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG:
- case GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:
- case GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:
- if (context->getExtensions().compressedTexturePVRTC)
- {
- context->validationError(GL_INVALID_OPERATION, kInvalidFormat);
- return false;
- }
- context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
- return false;
- case GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT:
- case GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT:
- case GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT:
- case GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT:
- if (context->getExtensions().compressedTexturePVRTCsRGB)
- {
- context->validationError(GL_INVALID_OPERATION, kInvalidFormat);
- return false;
- }
- context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
- return false;
case GL_DEPTH_COMPONENT:
case GL_DEPTH_COMPONENT16:
case GL_DEPTH_COMPONENT32_OES:
@@ -1312,77 +1231,6 @@
switch (format)
{
- case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
- case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
- if (context->getExtensions().textureCompressionDXT1)
- {
- context->validationError(GL_INVALID_OPERATION, kInvalidFormat);
- return false;
- }
- else
- {
- context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
- return false;
- }
- break;
- case GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE:
- if (context->getExtensions().textureCompressionDXT3)
- {
- context->validationError(GL_INVALID_OPERATION, kInvalidFormat);
- return false;
- }
- context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
- return false;
- case GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE:
- if (context->getExtensions().textureCompressionDXT5)
- {
- context->validationError(GL_INVALID_OPERATION, kInvalidFormat);
- return false;
- }
- context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
- return false;
- case GL_ETC1_RGB8_OES:
- if (context->getExtensions().compressedETC1RGB8TextureOES)
- {
- context->validationError(GL_INVALID_OPERATION, kInvalidFormat);
- return false;
- }
- context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
- return false;
- case GL_ETC1_RGB8_LOSSY_DECODE_ANGLE:
- case GL_COMPRESSED_RGB8_LOSSY_DECODE_ETC2_ANGLE:
- case GL_COMPRESSED_SRGB8_LOSSY_DECODE_ETC2_ANGLE:
- case GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE:
- case GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE:
- if (context->getExtensions().lossyETCDecode)
- {
- context->validationError(GL_INVALID_OPERATION, kInvalidFormat);
- return false;
- }
- context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
- return false;
- case GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG:
- case GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG:
- case GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:
- case GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:
- if (context->getExtensions().compressedTexturePVRTC)
- {
- context->validationError(GL_INVALID_OPERATION, kInvalidFormat);
- return false;
- }
- context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
- return false;
- case GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT:
- case GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT:
- case GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT:
- case GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT:
- if (context->getExtensions().compressedTexturePVRTCsRGB)
- {
- context->validationError(GL_INVALID_OPERATION, kInvalidFormat);
- return false;
- }
- context->validationError(GL_INVALID_ENUM, kEnumNotSupported);
- return false;
case GL_DEPTH_COMPONENT:
case GL_DEPTH_STENCIL_OES:
if (!context->getExtensions().depthTextureANGLE &&
diff --git a/src/libOpenCL/BUILD.gn b/src/libOpenCL/BUILD.gn
index f31e2d2..a13cf4e 100644
--- a/src/libOpenCL/BUILD.gn
+++ b/src/libOpenCL/BUILD.gn
@@ -37,6 +37,7 @@
sources = [
"entry_points_cl_autogen.cpp",
"entry_points_cl_autogen.h",
+ "entry_points_cl_utils.h",
]
deps = [ ":cl_includes" ]
}
diff --git a/src/libOpenCL/entry_points_cl_autogen.cpp b/src/libOpenCL/entry_points_cl_autogen.cpp
index db69c2b..cdcec61 100644
--- a/src/libOpenCL/entry_points_cl_autogen.cpp
+++ b/src/libOpenCL/entry_points_cl_autogen.cpp
@@ -9,6 +9,7 @@
// Defines the CL entry points.
#include "entry_points_cl_autogen.h"
+#include "entry_points_cl_utils.h"
extern "C" {
@@ -17,9 +18,9 @@
cl_platform_id *platforms,
cl_uint *num_platforms)
{
- // TODO: CL_EVENT
- // CL_EVENT(GetPlatformIDs, "num_entries = %u, platforms = 0x%016" PRIxPTR ", num_platforms =
- // 0x%016" PRIxPTR "", num_entries, (uintptr_t)platforms, (uintptr_t)num_platforms);
+ CL_EVENT(GetPlatformIDs,
+ "num_entries = %u, platforms = 0x%016" PRIxPTR ", num_platforms = 0x%016" PRIxPTR "",
+ num_entries, (uintptr_t)platforms, (uintptr_t)num_platforms);
// TODO: GetPlatformIDs
@@ -32,11 +33,12 @@
void *param_value,
size_t *param_value_size_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(GetPlatformInfo, "platform = 0x%016" PRIxPTR ", param_name = %u, param_value_size =
- // %u, param_value = 0x%016" PRIxPTR ", param_value_size_ret = 0x%016" PRIxPTR "",
- // (uintptr_t)platform, param_name, param_value_size, (uintptr_t)param_value,
- // (uintptr_t)param_value_size_ret);
+ CL_EVENT(GetPlatformInfo,
+ "platform = 0x%016" PRIxPTR
+ ", param_name = %u, param_value_size = %zu, param_value = 0x%016" PRIxPTR
+ ", param_value_size_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)platform, param_name, param_value_size, (uintptr_t)param_value,
+ (uintptr_t)param_value_size_ret);
// TODO: GetPlatformInfo
@@ -49,10 +51,12 @@
cl_device_id *devices,
cl_uint *num_devices)
{
- // TODO: CL_EVENT
- // CL_EVENT(GetDeviceIDs, "platform = 0x%016" PRIxPTR ", device_type = %u, num_entries = %u,
- // devices = 0x%016" PRIxPTR ", num_devices = 0x%016" PRIxPTR "", (uintptr_t)platform,
- // device_type, num_entries, (uintptr_t)devices, (uintptr_t)num_devices);
+ CL_EVENT(GetDeviceIDs,
+ "platform = 0x%016" PRIxPTR
+ ", device_type = %lu, num_entries = %u, devices = 0x%016" PRIxPTR
+ ", num_devices = 0x%016" PRIxPTR "",
+ (uintptr_t)platform, device_type, num_entries, (uintptr_t)devices,
+ (uintptr_t)num_devices);
// TODO: GetDeviceIDs
@@ -65,11 +69,12 @@
void *param_value,
size_t *param_value_size_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(GetDeviceInfo, "device = 0x%016" PRIxPTR ", param_name = %u, param_value_size = %u,
- // param_value = 0x%016" PRIxPTR ", param_value_size_ret = 0x%016" PRIxPTR "",
- // (uintptr_t)device, param_name, param_value_size, (uintptr_t)param_value,
- // (uintptr_t)param_value_size_ret);
+ CL_EVENT(GetDeviceInfo,
+ "device = 0x%016" PRIxPTR
+ ", param_name = %u, param_value_size = %zu, param_value = 0x%016" PRIxPTR
+ ", param_value_size_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)device, param_name, param_value_size, (uintptr_t)param_value,
+ (uintptr_t)param_value_size_ret);
// TODO: GetDeviceInfo
@@ -86,11 +91,12 @@
void *user_data,
cl_int *errcode_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(CreateContext, "properties = 0x%016" PRIxPTR ", num_devices = %u, devices = 0x%016"
- // PRIxPTR ", user_data) = 0x%016" PRIxPTR ", user_data = 0x%016" PRIxPTR ", errcode_ret =
- // 0x%016" PRIxPTR "", (uintptr_t)properties, num_devices, (uintptr_t)devices,
- // (uintptr_t)user_data), (uintptr_t)user_data, (uintptr_t)errcode_ret);
+ CL_EVENT(CreateContext,
+ "properties = 0x%016" PRIxPTR ", num_devices = %u, devices = 0x%016" PRIxPTR
+ ", pfn_notify = 0x%016" PRIxPTR ", user_data = 0x%016" PRIxPTR
+ ", errcode_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)properties, num_devices, (uintptr_t)devices, (uintptr_t)pfn_notify,
+ (uintptr_t)user_data, (uintptr_t)errcode_ret);
// TODO: CreateContext
@@ -107,11 +113,11 @@
void *user_data,
cl_int *errcode_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(CreateContextFromType, "properties = 0x%016" PRIxPTR ", device_type = %u, user_data)
- // = 0x%016" PRIxPTR ", user_data = 0x%016" PRIxPTR ", errcode_ret = 0x%016" PRIxPTR "",
- // (uintptr_t)properties, device_type, (uintptr_t)user_data), (uintptr_t)user_data,
- // (uintptr_t)errcode_ret);
+ CL_EVENT(CreateContextFromType,
+ "properties = 0x%016" PRIxPTR ", device_type = %lu, pfn_notify = 0x%016" PRIxPTR
+ ", user_data = 0x%016" PRIxPTR ", errcode_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)properties, device_type, (uintptr_t)pfn_notify, (uintptr_t)user_data,
+ (uintptr_t)errcode_ret);
// TODO: CreateContextFromType
@@ -120,8 +126,7 @@
cl_int CL_API_ENTRY CL_RetainContext(cl_context context)
{
- // TODO: CL_EVENT
- // CL_EVENT(RetainContext, "context = 0x%016" PRIxPTR "", (uintptr_t)context);
+ CL_EVENT(RetainContext, "context = 0x%016" PRIxPTR "", (uintptr_t)context);
// TODO: RetainContext
@@ -130,8 +135,7 @@
cl_int CL_API_ENTRY CL_ReleaseContext(cl_context context)
{
- // TODO: CL_EVENT
- // CL_EVENT(ReleaseContext, "context = 0x%016" PRIxPTR "", (uintptr_t)context);
+ CL_EVENT(ReleaseContext, "context = 0x%016" PRIxPTR "", (uintptr_t)context);
// TODO: ReleaseContext
@@ -144,11 +148,12 @@
void *param_value,
size_t *param_value_size_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(GetContextInfo, "context = 0x%016" PRIxPTR ", param_name = %u, param_value_size =
- // %u, param_value = 0x%016" PRIxPTR ", param_value_size_ret = 0x%016" PRIxPTR "",
- // (uintptr_t)context, param_name, param_value_size, (uintptr_t)param_value,
- // (uintptr_t)param_value_size_ret);
+ CL_EVENT(GetContextInfo,
+ "context = 0x%016" PRIxPTR
+ ", param_name = %u, param_value_size = %zu, param_value = 0x%016" PRIxPTR
+ ", param_value_size_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)context, param_name, param_value_size, (uintptr_t)param_value,
+ (uintptr_t)param_value_size_ret);
// TODO: GetContextInfo
@@ -157,8 +162,7 @@
cl_int CL_API_ENTRY CL_RetainCommandQueue(cl_command_queue command_queue)
{
- // TODO: CL_EVENT
- // CL_EVENT(RetainCommandQueue, "command_queue = 0x%016" PRIxPTR "", (uintptr_t)command_queue);
+ CL_EVENT(RetainCommandQueue, "command_queue = 0x%016" PRIxPTR "", (uintptr_t)command_queue);
// TODO: RetainCommandQueue
@@ -167,8 +171,7 @@
cl_int CL_API_ENTRY CL_ReleaseCommandQueue(cl_command_queue command_queue)
{
- // TODO: CL_EVENT
- // CL_EVENT(ReleaseCommandQueue, "command_queue = 0x%016" PRIxPTR "", (uintptr_t)command_queue);
+ CL_EVENT(ReleaseCommandQueue, "command_queue = 0x%016" PRIxPTR "", (uintptr_t)command_queue);
// TODO: ReleaseCommandQueue
@@ -181,11 +184,12 @@
void *param_value,
size_t *param_value_size_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(GetCommandQueueInfo, "command_queue = 0x%016" PRIxPTR ", param_name = %u,
- // param_value_size = %u, param_value = 0x%016" PRIxPTR ", param_value_size_ret = 0x%016"
- // PRIxPTR "", (uintptr_t)command_queue, param_name, param_value_size, (uintptr_t)param_value,
- // (uintptr_t)param_value_size_ret);
+ CL_EVENT(GetCommandQueueInfo,
+ "command_queue = 0x%016" PRIxPTR
+ ", param_name = %u, param_value_size = %zu, param_value = 0x%016" PRIxPTR
+ ", param_value_size_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)command_queue, param_name, param_value_size, (uintptr_t)param_value,
+ (uintptr_t)param_value_size_ret);
// TODO: GetCommandQueueInfo
@@ -198,10 +202,10 @@
void *host_ptr,
cl_int *errcode_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(CreateBuffer, "context = 0x%016" PRIxPTR ", flags = %u, size = %u, host_ptr =
- // 0x%016" PRIxPTR ", errcode_ret = 0x%016" PRIxPTR "", (uintptr_t)context, flags, size,
- // (uintptr_t)host_ptr, (uintptr_t)errcode_ret);
+ CL_EVENT(CreateBuffer,
+ "context = 0x%016" PRIxPTR ", flags = %lu, size = %zu, host_ptr = 0x%016" PRIxPTR
+ ", errcode_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)context, flags, size, (uintptr_t)host_ptr, (uintptr_t)errcode_ret);
// TODO: CreateBuffer
@@ -210,8 +214,7 @@
cl_int CL_API_ENTRY CL_RetainMemObject(cl_mem memobj)
{
- // TODO: CL_EVENT
- // CL_EVENT(RetainMemObject, "memobj = 0x%016" PRIxPTR "", (uintptr_t)memobj);
+ CL_EVENT(RetainMemObject, "memobj = 0x%016" PRIxPTR "", (uintptr_t)memobj);
// TODO: RetainMemObject
@@ -220,8 +223,7 @@
cl_int CL_API_ENTRY CL_ReleaseMemObject(cl_mem memobj)
{
- // TODO: CL_EVENT
- // CL_EVENT(ReleaseMemObject, "memobj = 0x%016" PRIxPTR "", (uintptr_t)memobj);
+ CL_EVENT(ReleaseMemObject, "memobj = 0x%016" PRIxPTR "", (uintptr_t)memobj);
// TODO: ReleaseMemObject
@@ -235,11 +237,12 @@
cl_image_format *image_formats,
cl_uint *num_image_formats)
{
- // TODO: CL_EVENT
- // CL_EVENT(GetSupportedImageFormats, "context = 0x%016" PRIxPTR ", flags = %u, image_type = %u,
- // num_entries = %u, image_formats = 0x%016" PRIxPTR ", num_image_formats = 0x%016" PRIxPTR "",
- // (uintptr_t)context, flags, image_type, num_entries, (uintptr_t)image_formats,
- // (uintptr_t)num_image_formats);
+ CL_EVENT(GetSupportedImageFormats,
+ "context = 0x%016" PRIxPTR
+ ", flags = %lu, image_type = %u, num_entries = %u, image_formats = 0x%016" PRIxPTR
+ ", num_image_formats = 0x%016" PRIxPTR "",
+ (uintptr_t)context, flags, image_type, num_entries, (uintptr_t)image_formats,
+ (uintptr_t)num_image_formats);
// TODO: GetSupportedImageFormats
@@ -252,11 +255,12 @@
void *param_value,
size_t *param_value_size_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(GetMemObjectInfo, "memobj = 0x%016" PRIxPTR ", param_name = %u, param_value_size =
- // %u, param_value = 0x%016" PRIxPTR ", param_value_size_ret = 0x%016" PRIxPTR "",
- // (uintptr_t)memobj, param_name, param_value_size, (uintptr_t)param_value,
- // (uintptr_t)param_value_size_ret);
+ CL_EVENT(GetMemObjectInfo,
+ "memobj = 0x%016" PRIxPTR
+ ", param_name = %u, param_value_size = %zu, param_value = 0x%016" PRIxPTR
+ ", param_value_size_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)memobj, param_name, param_value_size, (uintptr_t)param_value,
+ (uintptr_t)param_value_size_ret);
// TODO: GetMemObjectInfo
@@ -269,10 +273,12 @@
void *param_value,
size_t *param_value_size_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(GetImageInfo, "image = 0x%016" PRIxPTR ", param_name = %u, param_value_size = %u,
- // param_value = 0x%016" PRIxPTR ", param_value_size_ret = 0x%016" PRIxPTR "", (uintptr_t)image,
- // param_name, param_value_size, (uintptr_t)param_value, (uintptr_t)param_value_size_ret);
+ CL_EVENT(GetImageInfo,
+ "image = 0x%016" PRIxPTR
+ ", param_name = %u, param_value_size = %zu, param_value = 0x%016" PRIxPTR
+ ", param_value_size_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)image, param_name, param_value_size, (uintptr_t)param_value,
+ (uintptr_t)param_value_size_ret);
// TODO: GetImageInfo
@@ -281,8 +287,7 @@
cl_int CL_API_ENTRY CL_RetainSampler(cl_sampler sampler)
{
- // TODO: CL_EVENT
- // CL_EVENT(RetainSampler, "sampler = 0x%016" PRIxPTR "", (uintptr_t)sampler);
+ CL_EVENT(RetainSampler, "sampler = 0x%016" PRIxPTR "", (uintptr_t)sampler);
// TODO: RetainSampler
@@ -291,8 +296,7 @@
cl_int CL_API_ENTRY CL_ReleaseSampler(cl_sampler sampler)
{
- // TODO: CL_EVENT
- // CL_EVENT(ReleaseSampler, "sampler = 0x%016" PRIxPTR "", (uintptr_t)sampler);
+ CL_EVENT(ReleaseSampler, "sampler = 0x%016" PRIxPTR "", (uintptr_t)sampler);
// TODO: ReleaseSampler
@@ -305,11 +309,12 @@
void *param_value,
size_t *param_value_size_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(GetSamplerInfo, "sampler = 0x%016" PRIxPTR ", param_name = %u, param_value_size =
- // %u, param_value = 0x%016" PRIxPTR ", param_value_size_ret = 0x%016" PRIxPTR "",
- // (uintptr_t)sampler, param_name, param_value_size, (uintptr_t)param_value,
- // (uintptr_t)param_value_size_ret);
+ CL_EVENT(GetSamplerInfo,
+ "sampler = 0x%016" PRIxPTR
+ ", param_name = %u, param_value_size = %zu, param_value = 0x%016" PRIxPTR
+ ", param_value_size_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)sampler, param_name, param_value_size, (uintptr_t)param_value,
+ (uintptr_t)param_value_size_ret);
// TODO: GetSamplerInfo
@@ -322,10 +327,11 @@
const size_t *lengths,
cl_int *errcode_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(CreateProgramWithSource, "context = 0x%016" PRIxPTR ", count = %u, strings = 0x%016"
- // PRIxPTR ", lengths = 0x%016" PRIxPTR ", errcode_ret = 0x%016" PRIxPTR "", (uintptr_t)context,
- // count, (uintptr_t)strings, (uintptr_t)lengths, (uintptr_t)errcode_ret);
+ CL_EVENT(CreateProgramWithSource,
+ "context = 0x%016" PRIxPTR ", count = %u, strings = 0x%016" PRIxPTR
+ ", lengths = 0x%016" PRIxPTR ", errcode_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)context, count, (uintptr_t)strings, (uintptr_t)lengths,
+ (uintptr_t)errcode_ret);
// TODO: CreateProgramWithSource
@@ -340,12 +346,12 @@
cl_int *binary_status,
cl_int *errcode_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(CreateProgramWithBinary, "context = 0x%016" PRIxPTR ", num_devices = %u, device_list
- // = 0x%016" PRIxPTR ", lengths = 0x%016" PRIxPTR ", binaries = 0x%016" PRIxPTR ", binary_status
- // = 0x%016" PRIxPTR ", errcode_ret = 0x%016" PRIxPTR "", (uintptr_t)context, num_devices,
- // (uintptr_t)device_list, (uintptr_t)lengths, (uintptr_t)binaries, (uintptr_t)binary_status,
- // (uintptr_t)errcode_ret);
+ CL_EVENT(CreateProgramWithBinary,
+ "context = 0x%016" PRIxPTR ", num_devices = %u, device_list = 0x%016" PRIxPTR
+ ", lengths = 0x%016" PRIxPTR ", binaries = 0x%016" PRIxPTR
+ ", binary_status = 0x%016" PRIxPTR ", errcode_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)context, num_devices, (uintptr_t)device_list, (uintptr_t)lengths,
+ (uintptr_t)binaries, (uintptr_t)binary_status, (uintptr_t)errcode_ret);
// TODO: CreateProgramWithBinary
@@ -354,8 +360,7 @@
cl_int CL_API_ENTRY CL_RetainProgram(cl_program program)
{
- // TODO: CL_EVENT
- // CL_EVENT(RetainProgram, "program = 0x%016" PRIxPTR "", (uintptr_t)program);
+ CL_EVENT(RetainProgram, "program = 0x%016" PRIxPTR "", (uintptr_t)program);
// TODO: RetainProgram
@@ -364,8 +369,7 @@
cl_int CL_API_ENTRY CL_ReleaseProgram(cl_program program)
{
- // TODO: CL_EVENT
- // CL_EVENT(ReleaseProgram, "program = 0x%016" PRIxPTR "", (uintptr_t)program);
+ CL_EVENT(ReleaseProgram, "program = 0x%016" PRIxPTR "", (uintptr_t)program);
// TODO: ReleaseProgram
@@ -380,11 +384,12 @@
void *user_data),
void *user_data)
{
- // TODO: CL_EVENT
- // CL_EVENT(BuildProgram, "program = 0x%016" PRIxPTR ", num_devices = %u, device_list = 0x%016"
- // PRIxPTR ", options = 0x%016" PRIxPTR ", user_data) = 0x%016" PRIxPTR ", user_data = 0x%016"
- // PRIxPTR "", (uintptr_t)program, num_devices, (uintptr_t)device_list, (uintptr_t)options,
- // (uintptr_t)user_data), (uintptr_t)user_data);
+ CL_EVENT(BuildProgram,
+ "program = 0x%016" PRIxPTR ", num_devices = %u, device_list = 0x%016" PRIxPTR
+ ", options = 0x%016" PRIxPTR ", pfn_notify = 0x%016" PRIxPTR
+ ", user_data = 0x%016" PRIxPTR "",
+ (uintptr_t)program, num_devices, (uintptr_t)device_list, (uintptr_t)options,
+ (uintptr_t)pfn_notify, (uintptr_t)user_data);
// TODO: BuildProgram
@@ -397,11 +402,12 @@
void *param_value,
size_t *param_value_size_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(GetProgramInfo, "program = 0x%016" PRIxPTR ", param_name = %u, param_value_size =
- // %u, param_value = 0x%016" PRIxPTR ", param_value_size_ret = 0x%016" PRIxPTR "",
- // (uintptr_t)program, param_name, param_value_size, (uintptr_t)param_value,
- // (uintptr_t)param_value_size_ret);
+ CL_EVENT(GetProgramInfo,
+ "program = 0x%016" PRIxPTR
+ ", param_name = %u, param_value_size = %zu, param_value = 0x%016" PRIxPTR
+ ", param_value_size_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)program, param_name, param_value_size, (uintptr_t)param_value,
+ (uintptr_t)param_value_size_ret);
// TODO: GetProgramInfo
@@ -415,11 +421,12 @@
void *param_value,
size_t *param_value_size_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(GetProgramBuildInfo, "program = 0x%016" PRIxPTR ", device = 0x%016" PRIxPTR ",
- // param_name = %u, param_value_size = %u, param_value = 0x%016" PRIxPTR ", param_value_size_ret
- // = 0x%016" PRIxPTR "", (uintptr_t)program, (uintptr_t)device, param_name, param_value_size,
- // (uintptr_t)param_value, (uintptr_t)param_value_size_ret);
+ CL_EVENT(GetProgramBuildInfo,
+ "program = 0x%016" PRIxPTR ", device = 0x%016" PRIxPTR
+ ", param_name = %u, param_value_size = %zu, param_value = 0x%016" PRIxPTR
+ ", param_value_size_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)program, (uintptr_t)device, param_name, param_value_size,
+ (uintptr_t)param_value, (uintptr_t)param_value_size_ret);
// TODO: GetProgramBuildInfo
@@ -430,10 +437,10 @@
const char *kernel_name,
cl_int *errcode_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(CreateKernel, "program = 0x%016" PRIxPTR ", kernel_name = 0x%016" PRIxPTR ",
- // errcode_ret = 0x%016" PRIxPTR "", (uintptr_t)program, (uintptr_t)kernel_name,
- // (uintptr_t)errcode_ret);
+ CL_EVENT(CreateKernel,
+ "program = 0x%016" PRIxPTR ", kernel_name = 0x%016" PRIxPTR
+ ", errcode_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)program, (uintptr_t)kernel_name, (uintptr_t)errcode_ret);
// TODO: CreateKernel
@@ -445,10 +452,10 @@
cl_kernel *kernels,
cl_uint *num_kernels_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(CreateKernelsInProgram, "program = 0x%016" PRIxPTR ", num_kernels = %u, kernels =
- // 0x%016" PRIxPTR ", num_kernels_ret = 0x%016" PRIxPTR "", (uintptr_t)program, num_kernels,
- // (uintptr_t)kernels, (uintptr_t)num_kernels_ret);
+ CL_EVENT(CreateKernelsInProgram,
+ "program = 0x%016" PRIxPTR ", num_kernels = %u, kernels = 0x%016" PRIxPTR
+ ", num_kernels_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)program, num_kernels, (uintptr_t)kernels, (uintptr_t)num_kernels_ret);
// TODO: CreateKernelsInProgram
@@ -457,8 +464,7 @@
cl_int CL_API_ENTRY CL_RetainKernel(cl_kernel kernel)
{
- // TODO: CL_EVENT
- // CL_EVENT(RetainKernel, "kernel = 0x%016" PRIxPTR "", (uintptr_t)kernel);
+ CL_EVENT(RetainKernel, "kernel = 0x%016" PRIxPTR "", (uintptr_t)kernel);
// TODO: RetainKernel
@@ -467,8 +473,7 @@
cl_int CL_API_ENTRY CL_ReleaseKernel(cl_kernel kernel)
{
- // TODO: CL_EVENT
- // CL_EVENT(ReleaseKernel, "kernel = 0x%016" PRIxPTR "", (uintptr_t)kernel);
+ CL_EVENT(ReleaseKernel, "kernel = 0x%016" PRIxPTR "", (uintptr_t)kernel);
// TODO: ReleaseKernel
@@ -480,9 +485,10 @@
size_t arg_size,
const void *arg_value)
{
- // TODO: CL_EVENT
- // CL_EVENT(SetKernelArg, "kernel = 0x%016" PRIxPTR ", arg_index = %u, arg_size = %u, arg_value
- // = 0x%016" PRIxPTR "", (uintptr_t)kernel, arg_index, arg_size, (uintptr_t)arg_value);
+ CL_EVENT(SetKernelArg,
+ "kernel = 0x%016" PRIxPTR
+ ", arg_index = %u, arg_size = %zu, arg_value = 0x%016" PRIxPTR "",
+ (uintptr_t)kernel, arg_index, arg_size, (uintptr_t)arg_value);
// TODO: SetKernelArg
@@ -495,11 +501,12 @@
void *param_value,
size_t *param_value_size_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(GetKernelInfo, "kernel = 0x%016" PRIxPTR ", param_name = %u, param_value_size = %u,
- // param_value = 0x%016" PRIxPTR ", param_value_size_ret = 0x%016" PRIxPTR "",
- // (uintptr_t)kernel, param_name, param_value_size, (uintptr_t)param_value,
- // (uintptr_t)param_value_size_ret);
+ CL_EVENT(GetKernelInfo,
+ "kernel = 0x%016" PRIxPTR
+ ", param_name = %u, param_value_size = %zu, param_value = 0x%016" PRIxPTR
+ ", param_value_size_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)kernel, param_name, param_value_size, (uintptr_t)param_value,
+ (uintptr_t)param_value_size_ret);
// TODO: GetKernelInfo
@@ -513,11 +520,12 @@
void *param_value,
size_t *param_value_size_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(GetKernelWorkGroupInfo, "kernel = 0x%016" PRIxPTR ", device = 0x%016" PRIxPTR ",
- // param_name = %u, param_value_size = %u, param_value = 0x%016" PRIxPTR ", param_value_size_ret
- // = 0x%016" PRIxPTR "", (uintptr_t)kernel, (uintptr_t)device, param_name, param_value_size,
- // (uintptr_t)param_value, (uintptr_t)param_value_size_ret);
+ CL_EVENT(GetKernelWorkGroupInfo,
+ "kernel = 0x%016" PRIxPTR ", device = 0x%016" PRIxPTR
+ ", param_name = %u, param_value_size = %zu, param_value = 0x%016" PRIxPTR
+ ", param_value_size_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)kernel, (uintptr_t)device, param_name, param_value_size,
+ (uintptr_t)param_value, (uintptr_t)param_value_size_ret);
// TODO: GetKernelWorkGroupInfo
@@ -526,9 +534,8 @@
cl_int CL_API_ENTRY CL_WaitForEvents(cl_uint num_events, const cl_event *event_list)
{
- // TODO: CL_EVENT
- // CL_EVENT(WaitForEvents, "num_events = %u, event_list = 0x%016" PRIxPTR "", num_events,
- // (uintptr_t)event_list);
+ CL_EVENT(WaitForEvents, "num_events = %u, event_list = 0x%016" PRIxPTR "", num_events,
+ (uintptr_t)event_list);
// TODO: WaitForEvents
@@ -541,10 +548,12 @@
void *param_value,
size_t *param_value_size_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(GetEventInfo, "event = 0x%016" PRIxPTR ", param_name = %u, param_value_size = %u,
- // param_value = 0x%016" PRIxPTR ", param_value_size_ret = 0x%016" PRIxPTR "", (uintptr_t)event,
- // param_name, param_value_size, (uintptr_t)param_value, (uintptr_t)param_value_size_ret);
+ CL_EVENT(GetEventInfo,
+ "event = 0x%016" PRIxPTR
+ ", param_name = %u, param_value_size = %zu, param_value = 0x%016" PRIxPTR
+ ", param_value_size_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)event, param_name, param_value_size, (uintptr_t)param_value,
+ (uintptr_t)param_value_size_ret);
// TODO: GetEventInfo
@@ -553,8 +562,7 @@
cl_int CL_API_ENTRY CL_RetainEvent(cl_event event)
{
- // TODO: CL_EVENT
- // CL_EVENT(RetainEvent, "event = 0x%016" PRIxPTR "", (uintptr_t)event);
+ CL_EVENT(RetainEvent, "event = 0x%016" PRIxPTR "", (uintptr_t)event);
// TODO: RetainEvent
@@ -563,8 +571,7 @@
cl_int CL_API_ENTRY CL_ReleaseEvent(cl_event event)
{
- // TODO: CL_EVENT
- // CL_EVENT(ReleaseEvent, "event = 0x%016" PRIxPTR "", (uintptr_t)event);
+ CL_EVENT(ReleaseEvent, "event = 0x%016" PRIxPTR "", (uintptr_t)event);
// TODO: ReleaseEvent
@@ -577,11 +584,12 @@
void *param_value,
size_t *param_value_size_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(GetEventProfilingInfo, "event = 0x%016" PRIxPTR ", param_name = %u, param_value_size
- // = %u, param_value = 0x%016" PRIxPTR ", param_value_size_ret = 0x%016" PRIxPTR "",
- // (uintptr_t)event, param_name, param_value_size, (uintptr_t)param_value,
- // (uintptr_t)param_value_size_ret);
+ CL_EVENT(GetEventProfilingInfo,
+ "event = 0x%016" PRIxPTR
+ ", param_name = %u, param_value_size = %zu, param_value = 0x%016" PRIxPTR
+ ", param_value_size_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)event, param_name, param_value_size, (uintptr_t)param_value,
+ (uintptr_t)param_value_size_ret);
// TODO: GetEventProfilingInfo
@@ -590,8 +598,7 @@
cl_int CL_API_ENTRY CL_Flush(cl_command_queue command_queue)
{
- // TODO: CL_EVENT
- // CL_EVENT(Flush, "command_queue = 0x%016" PRIxPTR "", (uintptr_t)command_queue);
+ CL_EVENT(Flush, "command_queue = 0x%016" PRIxPTR "", (uintptr_t)command_queue);
// TODO: Flush
@@ -600,8 +607,7 @@
cl_int CL_API_ENTRY CL_Finish(cl_command_queue command_queue)
{
- // TODO: CL_EVENT
- // CL_EVENT(Finish, "command_queue = 0x%016" PRIxPTR "", (uintptr_t)command_queue);
+ CL_EVENT(Finish, "command_queue = 0x%016" PRIxPTR "", (uintptr_t)command_queue);
// TODO: Finish
@@ -618,12 +624,13 @@
const cl_event *event_wait_list,
cl_event *event)
{
- // TODO: CL_EVENT
- // CL_EVENT(EnqueueReadBuffer, "command_queue = 0x%016" PRIxPTR ", buffer = 0x%016" PRIxPTR ",
- // blocking_read = %u, offset = %u, size = %u, ptr = 0x%016" PRIxPTR ", num_events_in_wait_list
- // = %u, event_wait_list = 0x%016" PRIxPTR ", event = 0x%016" PRIxPTR "",
- // (uintptr_t)command_queue, (uintptr_t)buffer, blocking_read, offset, size, (uintptr_t)ptr,
- // num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
+ CL_EVENT(EnqueueReadBuffer,
+ "command_queue = 0x%016" PRIxPTR ", buffer = 0x%016" PRIxPTR
+ ", blocking_read = %u, offset = %zu, size = %zu, ptr = 0x%016" PRIxPTR
+ ", num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
+ ", event = 0x%016" PRIxPTR "",
+ (uintptr_t)command_queue, (uintptr_t)buffer, blocking_read, offset, size,
+ (uintptr_t)ptr, num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueReadBuffer
@@ -640,12 +647,13 @@
const cl_event *event_wait_list,
cl_event *event)
{
- // TODO: CL_EVENT
- // CL_EVENT(EnqueueWriteBuffer, "command_queue = 0x%016" PRIxPTR ", buffer = 0x%016" PRIxPTR ",
- // blocking_write = %u, offset = %u, size = %u, ptr = 0x%016" PRIxPTR ", num_events_in_wait_list
- // = %u, event_wait_list = 0x%016" PRIxPTR ", event = 0x%016" PRIxPTR "",
- // (uintptr_t)command_queue, (uintptr_t)buffer, blocking_write, offset, size, (uintptr_t)ptr,
- // num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
+ CL_EVENT(EnqueueWriteBuffer,
+ "command_queue = 0x%016" PRIxPTR ", buffer = 0x%016" PRIxPTR
+ ", blocking_write = %u, offset = %zu, size = %zu, ptr = 0x%016" PRIxPTR
+ ", num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
+ ", event = 0x%016" PRIxPTR "",
+ (uintptr_t)command_queue, (uintptr_t)buffer, blocking_write, offset, size,
+ (uintptr_t)ptr, num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueWriteBuffer
@@ -662,12 +670,14 @@
const cl_event *event_wait_list,
cl_event *event)
{
- // TODO: CL_EVENT
- // CL_EVENT(EnqueueCopyBuffer, "command_queue = 0x%016" PRIxPTR ", src_buffer = 0x%016" PRIxPTR
- // ", dst_buffer = 0x%016" PRIxPTR ", src_offset = %u, dst_offset = %u, size = %u,
- // num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR ", event = 0x%016" PRIxPTR
- // "", (uintptr_t)command_queue, (uintptr_t)src_buffer, (uintptr_t)dst_buffer, src_offset,
- // dst_offset, size, num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
+ CL_EVENT(EnqueueCopyBuffer,
+ "command_queue = 0x%016" PRIxPTR ", src_buffer = 0x%016" PRIxPTR
+ ", dst_buffer = 0x%016" PRIxPTR
+ ", src_offset = %zu, dst_offset = %zu, size = %zu, num_events_in_wait_list = %u, "
+ "event_wait_list = 0x%016" PRIxPTR ", event = 0x%016" PRIxPTR "",
+ (uintptr_t)command_queue, (uintptr_t)src_buffer, (uintptr_t)dst_buffer, src_offset,
+ dst_offset, size, num_events_in_wait_list, (uintptr_t)event_wait_list,
+ (uintptr_t)event);
// TODO: EnqueueCopyBuffer
@@ -686,13 +696,15 @@
const cl_event *event_wait_list,
cl_event *event)
{
- // TODO: CL_EVENT
- // CL_EVENT(EnqueueReadImage, "command_queue = 0x%016" PRIxPTR ", image = 0x%016" PRIxPTR ",
- // blocking_read = %u, origin = 0x%016" PRIxPTR ", region = 0x%016" PRIxPTR ", row_pitch = %u,
- // slice_pitch = %u, ptr = 0x%016" PRIxPTR ", num_events_in_wait_list = %u, event_wait_list =
- // 0x%016" PRIxPTR ", event = 0x%016" PRIxPTR "", (uintptr_t)command_queue, (uintptr_t)image,
- // blocking_read, (uintptr_t)origin, (uintptr_t)region, row_pitch, slice_pitch, (uintptr_t)ptr,
- // num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
+ CL_EVENT(EnqueueReadImage,
+ "command_queue = 0x%016" PRIxPTR ", image = 0x%016" PRIxPTR
+ ", blocking_read = %u, origin = 0x%016" PRIxPTR ", region = 0x%016" PRIxPTR
+ ", row_pitch = %zu, slice_pitch = %zu, ptr = 0x%016" PRIxPTR
+ ", num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
+ ", event = 0x%016" PRIxPTR "",
+ (uintptr_t)command_queue, (uintptr_t)image, blocking_read, (uintptr_t)origin,
+ (uintptr_t)region, row_pitch, slice_pitch, (uintptr_t)ptr, num_events_in_wait_list,
+ (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueReadImage
@@ -711,14 +723,15 @@
const cl_event *event_wait_list,
cl_event *event)
{
- // TODO: CL_EVENT
- // CL_EVENT(EnqueueWriteImage, "command_queue = 0x%016" PRIxPTR ", image = 0x%016" PRIxPTR ",
- // blocking_write = %u, origin = 0x%016" PRIxPTR ", region = 0x%016" PRIxPTR ", input_row_pitch
- // = %u, input_slice_pitch = %u, ptr = 0x%016" PRIxPTR ", num_events_in_wait_list = %u,
- // event_wait_list = 0x%016" PRIxPTR ", event = 0x%016" PRIxPTR "", (uintptr_t)command_queue,
- // (uintptr_t)image, blocking_write, (uintptr_t)origin, (uintptr_t)region, input_row_pitch,
- // input_slice_pitch, (uintptr_t)ptr, num_events_in_wait_list, (uintptr_t)event_wait_list,
- // (uintptr_t)event);
+ CL_EVENT(EnqueueWriteImage,
+ "command_queue = 0x%016" PRIxPTR ", image = 0x%016" PRIxPTR
+ ", blocking_write = %u, origin = 0x%016" PRIxPTR ", region = 0x%016" PRIxPTR
+ ", input_row_pitch = %zu, input_slice_pitch = %zu, ptr = 0x%016" PRIxPTR
+ ", num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
+ ", event = 0x%016" PRIxPTR "",
+ (uintptr_t)command_queue, (uintptr_t)image, blocking_write, (uintptr_t)origin,
+ (uintptr_t)region, input_row_pitch, input_slice_pitch, (uintptr_t)ptr,
+ num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueWriteImage
@@ -735,13 +748,15 @@
const cl_event *event_wait_list,
cl_event *event)
{
- // TODO: CL_EVENT
- // CL_EVENT(EnqueueCopyImage, "command_queue = 0x%016" PRIxPTR ", src_image = 0x%016" PRIxPTR ",
- // dst_image = 0x%016" PRIxPTR ", src_origin = 0x%016" PRIxPTR ", dst_origin = 0x%016" PRIxPTR
- // ", region = 0x%016" PRIxPTR ", num_events_in_wait_list = %u, event_wait_list = 0x%016"
- // PRIxPTR ", event = 0x%016" PRIxPTR "", (uintptr_t)command_queue, (uintptr_t)src_image,
- // (uintptr_t)dst_image, (uintptr_t)src_origin, (uintptr_t)dst_origin, (uintptr_t)region,
- // num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
+ CL_EVENT(EnqueueCopyImage,
+ "command_queue = 0x%016" PRIxPTR ", src_image = 0x%016" PRIxPTR
+ ", dst_image = 0x%016" PRIxPTR ", src_origin = 0x%016" PRIxPTR
+ ", dst_origin = 0x%016" PRIxPTR ", region = 0x%016" PRIxPTR
+ ", num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
+ ", event = 0x%016" PRIxPTR "",
+ (uintptr_t)command_queue, (uintptr_t)src_image, (uintptr_t)dst_image,
+ (uintptr_t)src_origin, (uintptr_t)dst_origin, (uintptr_t)region,
+ num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueCopyImage
@@ -758,13 +773,15 @@
const cl_event *event_wait_list,
cl_event *event)
{
- // TODO: CL_EVENT
- // CL_EVENT(EnqueueCopyImageToBuffer, "command_queue = 0x%016" PRIxPTR ", src_image = 0x%016"
- // PRIxPTR ", dst_buffer = 0x%016" PRIxPTR ", src_origin = 0x%016" PRIxPTR ", region = 0x%016"
- // PRIxPTR ", dst_offset = %u, num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
- // ", event = 0x%016" PRIxPTR "", (uintptr_t)command_queue, (uintptr_t)src_image,
- // (uintptr_t)dst_buffer, (uintptr_t)src_origin, (uintptr_t)region, dst_offset,
- // num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
+ CL_EVENT(EnqueueCopyImageToBuffer,
+ "command_queue = 0x%016" PRIxPTR ", src_image = 0x%016" PRIxPTR
+ ", dst_buffer = 0x%016" PRIxPTR ", src_origin = 0x%016" PRIxPTR
+ ", region = 0x%016" PRIxPTR
+ ", dst_offset = %zu, num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
+ ", event = 0x%016" PRIxPTR "",
+ (uintptr_t)command_queue, (uintptr_t)src_image, (uintptr_t)dst_buffer,
+ (uintptr_t)src_origin, (uintptr_t)region, dst_offset, num_events_in_wait_list,
+ (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueCopyImageToBuffer
@@ -781,13 +798,15 @@
const cl_event *event_wait_list,
cl_event *event)
{
- // TODO: CL_EVENT
- // CL_EVENT(EnqueueCopyBufferToImage, "command_queue = 0x%016" PRIxPTR ", src_buffer = 0x%016"
- // PRIxPTR ", dst_image = 0x%016" PRIxPTR ", src_offset = %u, dst_origin = 0x%016" PRIxPTR ",
- // region = 0x%016" PRIxPTR ", num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
- // ", event = 0x%016" PRIxPTR "", (uintptr_t)command_queue, (uintptr_t)src_buffer,
- // (uintptr_t)dst_image, src_offset, (uintptr_t)dst_origin, (uintptr_t)region,
- // num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
+ CL_EVENT(EnqueueCopyBufferToImage,
+ "command_queue = 0x%016" PRIxPTR ", src_buffer = 0x%016" PRIxPTR
+ ", dst_image = 0x%016" PRIxPTR ", src_offset = %zu, dst_origin = 0x%016" PRIxPTR
+ ", region = 0x%016" PRIxPTR
+ ", num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
+ ", event = 0x%016" PRIxPTR "",
+ (uintptr_t)command_queue, (uintptr_t)src_buffer, (uintptr_t)dst_image, src_offset,
+ (uintptr_t)dst_origin, (uintptr_t)region, num_events_in_wait_list,
+ (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueCopyBufferToImage
@@ -805,13 +824,14 @@
cl_event *event,
cl_int *errcode_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(EnqueueMapBuffer, "command_queue = 0x%016" PRIxPTR ", buffer = 0x%016" PRIxPTR ",
- // blocking_map = %u, map_flags = %u, offset = %u, size = %u, num_events_in_wait_list = %u,
- // event_wait_list = 0x%016" PRIxPTR ", event = 0x%016" PRIxPTR ", errcode_ret = 0x%016" PRIxPTR
- // "", (uintptr_t)command_queue, (uintptr_t)buffer, blocking_map, map_flags, offset, size,
- // num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event,
- // (uintptr_t)errcode_ret);
+ CL_EVENT(EnqueueMapBuffer,
+ "command_queue = 0x%016" PRIxPTR ", buffer = 0x%016" PRIxPTR
+ ", blocking_map = %u, map_flags = %lu, offset = %zu, size = %zu, "
+ "num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
+ ", event = 0x%016" PRIxPTR ", errcode_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)command_queue, (uintptr_t)buffer, blocking_map, map_flags, offset, size,
+ num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event,
+ (uintptr_t)errcode_ret);
// TODO: EnqueueMapBuffer
@@ -831,15 +851,17 @@
cl_event *event,
cl_int *errcode_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(EnqueueMapImage, "command_queue = 0x%016" PRIxPTR ", image = 0x%016" PRIxPTR ",
- // blocking_map = %u, map_flags = %u, origin = 0x%016" PRIxPTR ", region = 0x%016" PRIxPTR ",
- // image_row_pitch = 0x%016" PRIxPTR ", image_slice_pitch = 0x%016" PRIxPTR ",
- // num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR ", event = 0x%016" PRIxPTR ",
- // errcode_ret = 0x%016" PRIxPTR "", (uintptr_t)command_queue, (uintptr_t)image, blocking_map,
- // map_flags, (uintptr_t)origin, (uintptr_t)region, (uintptr_t)image_row_pitch,
- // (uintptr_t)image_slice_pitch, num_events_in_wait_list, (uintptr_t)event_wait_list,
- // (uintptr_t)event, (uintptr_t)errcode_ret);
+ CL_EVENT(EnqueueMapImage,
+ "command_queue = 0x%016" PRIxPTR ", image = 0x%016" PRIxPTR
+ ", blocking_map = %u, map_flags = %lu, origin = 0x%016" PRIxPTR
+ ", region = 0x%016" PRIxPTR ", image_row_pitch = 0x%016" PRIxPTR
+ ", image_slice_pitch = 0x%016" PRIxPTR
+ ", num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
+ ", event = 0x%016" PRIxPTR ", errcode_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)command_queue, (uintptr_t)image, blocking_map, map_flags, (uintptr_t)origin,
+ (uintptr_t)region, (uintptr_t)image_row_pitch, (uintptr_t)image_slice_pitch,
+ num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event,
+ (uintptr_t)errcode_ret);
// TODO: EnqueueMapImage
@@ -853,12 +875,13 @@
const cl_event *event_wait_list,
cl_event *event)
{
- // TODO: CL_EVENT
- // CL_EVENT(EnqueueUnmapMemObject, "command_queue = 0x%016" PRIxPTR ", memobj = 0x%016" PRIxPTR
- // ", mapped_ptr = 0x%016" PRIxPTR ", num_events_in_wait_list = %u, event_wait_list = 0x%016"
- // PRIxPTR ", event = 0x%016" PRIxPTR "", (uintptr_t)command_queue, (uintptr_t)memobj,
- // (uintptr_t)mapped_ptr, num_events_in_wait_list, (uintptr_t)event_wait_list,
- // (uintptr_t)event);
+ CL_EVENT(EnqueueUnmapMemObject,
+ "command_queue = 0x%016" PRIxPTR ", memobj = 0x%016" PRIxPTR
+ ", mapped_ptr = 0x%016" PRIxPTR
+ ", num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
+ ", event = 0x%016" PRIxPTR "",
+ (uintptr_t)command_queue, (uintptr_t)memobj, (uintptr_t)mapped_ptr,
+ num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueUnmapMemObject
@@ -875,14 +898,15 @@
const cl_event *event_wait_list,
cl_event *event)
{
- // TODO: CL_EVENT
- // CL_EVENT(EnqueueNDRangeKernel, "command_queue = 0x%016" PRIxPTR ", kernel = 0x%016" PRIxPTR
- // ", work_dim = %u, global_work_offset = 0x%016" PRIxPTR ", global_work_size = 0x%016" PRIxPTR
- // ", local_work_size = 0x%016" PRIxPTR ", num_events_in_wait_list = %u, event_wait_list =
- // 0x%016" PRIxPTR ", event = 0x%016" PRIxPTR "", (uintptr_t)command_queue, (uintptr_t)kernel,
- // work_dim, (uintptr_t)global_work_offset, (uintptr_t)global_work_size,
- // (uintptr_t)local_work_size, num_events_in_wait_list, (uintptr_t)event_wait_list,
- // (uintptr_t)event);
+ CL_EVENT(EnqueueNDRangeKernel,
+ "command_queue = 0x%016" PRIxPTR ", kernel = 0x%016" PRIxPTR
+ ", work_dim = %u, global_work_offset = 0x%016" PRIxPTR
+ ", global_work_size = 0x%016" PRIxPTR ", local_work_size = 0x%016" PRIxPTR
+ ", num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
+ ", event = 0x%016" PRIxPTR "",
+ (uintptr_t)command_queue, (uintptr_t)kernel, work_dim, (uintptr_t)global_work_offset,
+ (uintptr_t)global_work_size, (uintptr_t)local_work_size, num_events_in_wait_list,
+ (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueNDRangeKernel
@@ -900,13 +924,16 @@
const cl_event *event_wait_list,
cl_event *event)
{
- // TODO: CL_EVENT
- // CL_EVENT(EnqueueNativeKernel, "command_queue = 0x%016" PRIxPTR ", ) = 0x%016" PRIxPTR ", args
- // = 0x%016" PRIxPTR ", cb_args = %u, num_mem_objects = %u, mem_list = 0x%016" PRIxPTR ",
- // args_mem_loc = 0x%016" PRIxPTR ", num_events_in_wait_list = %u, event_wait_list = 0x%016"
- // PRIxPTR ", event = 0x%016" PRIxPTR "", (uintptr_t)command_queue, (uintptr_t)),
- // (uintptr_t)args, cb_args, num_mem_objects, (uintptr_t)mem_list, (uintptr_t)args_mem_loc,
- // num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
+ CL_EVENT(EnqueueNativeKernel,
+ "command_queue = 0x%016" PRIxPTR ", user_func = 0x%016" PRIxPTR
+ ", args = 0x%016" PRIxPTR
+ ", cb_args = %zu, num_mem_objects = %u, mem_list = 0x%016" PRIxPTR
+ ", args_mem_loc = 0x%016" PRIxPTR
+ ", num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
+ ", event = 0x%016" PRIxPTR "",
+ (uintptr_t)command_queue, (uintptr_t)user_func, (uintptr_t)args, cb_args,
+ num_mem_objects, (uintptr_t)mem_list, (uintptr_t)args_mem_loc, num_events_in_wait_list,
+ (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueNativeKernel
@@ -918,10 +945,10 @@
cl_bool enable,
cl_command_queue_properties *old_properties)
{
- // TODO: CL_EVENT
- // CL_EVENT(SetCommandQueueProperty, "command_queue = 0x%016" PRIxPTR ", properties = %u, enable
- // = %u, old_properties = 0x%016" PRIxPTR "", (uintptr_t)command_queue, properties, enable,
- // (uintptr_t)old_properties);
+ CL_EVENT(SetCommandQueueProperty,
+ "command_queue = 0x%016" PRIxPTR
+ ", properties = %lu, enable = %u, old_properties = 0x%016" PRIxPTR "",
+ (uintptr_t)command_queue, properties, enable, (uintptr_t)old_properties);
// TODO: SetCommandQueueProperty
@@ -937,12 +964,13 @@
void *host_ptr,
cl_int *errcode_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(CreateImage2D, "context = 0x%016" PRIxPTR ", flags = %u, image_format = 0x%016"
- // PRIxPTR ", image_width = %u, image_height = %u, image_row_pitch = %u, host_ptr = 0x%016"
- // PRIxPTR ", errcode_ret = 0x%016" PRIxPTR "", (uintptr_t)context, flags,
- // (uintptr_t)image_format, image_width, image_height, image_row_pitch, (uintptr_t)host_ptr,
- // (uintptr_t)errcode_ret);
+ CL_EVENT(
+ CreateImage2D,
+ "context = 0x%016" PRIxPTR ", flags = %lu, image_format = 0x%016" PRIxPTR
+ ", image_width = %zu, image_height = %zu, image_row_pitch = %zu, host_ptr = 0x%016" PRIxPTR
+ ", errcode_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)context, flags, (uintptr_t)image_format, image_width, image_height,
+ image_row_pitch, (uintptr_t)host_ptr, (uintptr_t)errcode_ret);
// TODO: CreateImage2D
@@ -960,12 +988,13 @@
void *host_ptr,
cl_int *errcode_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(CreateImage3D, "context = 0x%016" PRIxPTR ", flags = %u, image_format = 0x%016"
- // PRIxPTR ", image_width = %u, image_height = %u, image_depth = %u, image_row_pitch = %u,
- // image_slice_pitch = %u, host_ptr = 0x%016" PRIxPTR ", errcode_ret = 0x%016" PRIxPTR "",
- // (uintptr_t)context, flags, (uintptr_t)image_format, image_width, image_height, image_depth,
- // image_row_pitch, image_slice_pitch, (uintptr_t)host_ptr, (uintptr_t)errcode_ret);
+ CL_EVENT(
+ CreateImage3D,
+ "context = 0x%016" PRIxPTR ", flags = %lu, image_format = 0x%016" PRIxPTR
+ ", image_width = %zu, image_height = %zu, image_depth = %zu, image_row_pitch = %zu, "
+ "image_slice_pitch = %zu, host_ptr = 0x%016" PRIxPTR ", errcode_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)context, flags, (uintptr_t)image_format, image_width, image_height, image_depth,
+ image_row_pitch, image_slice_pitch, (uintptr_t)host_ptr, (uintptr_t)errcode_ret);
// TODO: CreateImage3D
@@ -974,9 +1003,8 @@
cl_int CL_API_ENTRY CL_EnqueueMarker(cl_command_queue command_queue, cl_event *event)
{
- // TODO: CL_EVENT
- // CL_EVENT(EnqueueMarker, "command_queue = 0x%016" PRIxPTR ", event = 0x%016" PRIxPTR "",
- // (uintptr_t)command_queue, (uintptr_t)event);
+ CL_EVENT(EnqueueMarker, "command_queue = 0x%016" PRIxPTR ", event = 0x%016" PRIxPTR "",
+ (uintptr_t)command_queue, (uintptr_t)event);
// TODO: EnqueueMarker
@@ -987,10 +1015,9 @@
cl_uint num_events,
const cl_event *event_list)
{
- // TODO: CL_EVENT
- // CL_EVENT(EnqueueWaitForEvents, "command_queue = 0x%016" PRIxPTR ", num_events = %u,
- // event_list = 0x%016" PRIxPTR "", (uintptr_t)command_queue, num_events,
- // (uintptr_t)event_list);
+ CL_EVENT(EnqueueWaitForEvents,
+ "command_queue = 0x%016" PRIxPTR ", num_events = %u, event_list = 0x%016" PRIxPTR "",
+ (uintptr_t)command_queue, num_events, (uintptr_t)event_list);
// TODO: EnqueueWaitForEvents
@@ -999,8 +1026,7 @@
cl_int CL_API_ENTRY CL_EnqueueBarrier(cl_command_queue command_queue)
{
- // TODO: CL_EVENT
- // CL_EVENT(EnqueueBarrier, "command_queue = 0x%016" PRIxPTR "", (uintptr_t)command_queue);
+ CL_EVENT(EnqueueBarrier, "command_queue = 0x%016" PRIxPTR "", (uintptr_t)command_queue);
// TODO: EnqueueBarrier
@@ -1009,8 +1035,7 @@
cl_int CL_API_ENTRY CL_UnloadCompiler()
{
- // TODO: CL_EVENT
- // CL_EVENT(UnloadCompiler, "");
+ CL_EVENT(UnloadCompiler, "");
// TODO: UnloadCompiler
@@ -1019,8 +1044,7 @@
void *CL_API_ENTRY CL_GetExtensionFunctionAddress(const char *func_name)
{
- // TODO: CL_EVENT
- // CL_EVENT(GetExtensionFunctionAddress, "func_name = 0x%016" PRIxPTR "", (uintptr_t)func_name);
+ CL_EVENT(GetExtensionFunctionAddress, "func_name = 0x%016" PRIxPTR "", (uintptr_t)func_name);
// TODO: GetExtensionFunctionAddress
@@ -1032,10 +1056,10 @@
cl_command_queue_properties properties,
cl_int *errcode_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(CreateCommandQueue, "context = 0x%016" PRIxPTR ", device = 0x%016" PRIxPTR ",
- // properties = %u, errcode_ret = 0x%016" PRIxPTR "", (uintptr_t)context, (uintptr_t)device,
- // properties, (uintptr_t)errcode_ret);
+ CL_EVENT(CreateCommandQueue,
+ "context = 0x%016" PRIxPTR ", device = 0x%016" PRIxPTR
+ ", properties = %lu, errcode_ret = 0x%016" PRIxPTR "",
+ (uintptr_t)context, (uintptr_t)device, properties, (uintptr_t)errcode_ret);
// TODO: CreateCommandQueue
@@ -1048,10 +1072,12 @@
cl_filter_mode filter_mode,
cl_int *errcode_ret)
{
- // TODO: CL_EVENT
- // CL_EVENT(CreateSampler, "context = 0x%016" PRIxPTR ", normalized_coords = %u, addressing_mode
- // = %u, filter_mode = %u, errcode_ret = 0x%016" PRIxPTR "", (uintptr_t)context,
- // normalized_coords, addressing_mode, filter_mode, (uintptr_t)errcode_ret);
+ CL_EVENT(CreateSampler,
+ "context = 0x%016" PRIxPTR
+ ", normalized_coords = %u, addressing_mode = %u, filter_mode = %u, errcode_ret = "
+ "0x%016" PRIxPTR "",
+ (uintptr_t)context, normalized_coords, addressing_mode, filter_mode,
+ (uintptr_t)errcode_ret);
// TODO: CreateSampler
@@ -1064,11 +1090,12 @@
const cl_event *event_wait_list,
cl_event *event)
{
- // TODO: CL_EVENT
- // CL_EVENT(EnqueueTask, "command_queue = 0x%016" PRIxPTR ", kernel = 0x%016" PRIxPTR ",
- // num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR ", event = 0x%016" PRIxPTR
- // "", (uintptr_t)command_queue, (uintptr_t)kernel, num_events_in_wait_list,
- // (uintptr_t)event_wait_list, (uintptr_t)event);
+ CL_EVENT(EnqueueTask,
+ "command_queue = 0x%016" PRIxPTR ", kernel = 0x%016" PRIxPTR
+ ", num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
+ ", event = 0x%016" PRIxPTR "",
+ (uintptr_t)command_queue, (uintptr_t)kernel, num_events_in_wait_list,
+ (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueTask
diff --git a/src/libOpenCL/entry_points_cl_utils.h b/src/libOpenCL/entry_points_cl_utils.h
new file mode 100644
index 0000000..ca13917
--- /dev/null
+++ b/src/libOpenCL/entry_points_cl_utils.h
@@ -0,0 +1,23 @@
+//
+// Copyright 2021 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// entry_points_cl_utils.h:
+// These helpers are used in CL entry point routines.
+
+#ifndef LIBOPENCL_ENTRY_POINTS_CL_UTILS_H_
+#define LIBOPENCL_ENTRY_POINTS_CL_UTILS_H_
+
+#include <cinttypes>
+#include <cstdio>
+
+#if defined(ANGLE_TRACE_ENABLED)
+# define CL_EVENT(entryPoint, ...) \
+ std::printf("CL " #entryPoint ": " __VA_ARGS__); \
+ std::printf("\n")
+#else
+# define CL_EVENT(entryPoint, ...) (void(0))
+#endif
+
+#endif // LIBOPENCL_ENTRY_POINTS_CL_UTILS_H_
diff --git a/src/tests/capture_replay_tests.py b/src/tests/capture_replay_tests.py
index 5416d5b..4590dd8 100755
--- a/src/tests/capture_replay_tests.py
+++ b/src/tests/capture_replay_tests.py
@@ -252,22 +252,22 @@
depot_tools_path)
def RunSubprocess(self, command, env=None, pipe_stdout=True, timeout=None):
- subprocess = SubProcess(command, env, pipe_stdout)
- debug('Creating subprocess: %s with pid %d' % (' '.join(command), subprocess.Pid()))
- self.subprocesses[subprocess.Pid()] = subprocess
+ proc = SubProcess(command, env, pipe_stdout)
+ debug('Creating subprocess: %s with pid %d' % (' '.join(command), proc.Pid()))
+ self.subprocesses[proc.Pid()] = proc
try:
- returncode, output = self.subprocesses[subprocess.Pid()].Join(timeout)
- self.RemoveSubprocess(subprocess.Pid())
+ returncode, output = self.subprocesses[proc.Pid()].Join(timeout)
+ self.RemoveSubprocess(proc.Pid())
if returncode != 0:
return -1, output
return returncode, output
except KeyboardInterrupt:
raise
except subprocess.TimeoutExpired as e:
- self.RemoveSubprocess(subprocess.Pid())
+ self.RemoveSubprocess(proc.Pid())
return -2, str(e)
except Exception as e:
- self.RemoveSubprocess(subprocess.Pid())
+ self.RemoveSubprocess(proc.Pid())
return -1, str(e)
def RemoveSubprocess(self, subprocess_id):
diff --git a/src/tests/capture_replay_tests/capture_replay_expectations.txt b/src/tests/capture_replay_tests/capture_replay_expectations.txt
index 6ef7552..323859a 100644
--- a/src/tests/capture_replay_tests/capture_replay_expectations.txt
+++ b/src/tests/capture_replay_tests/capture_replay_expectations.txt
@@ -26,7 +26,6 @@
EGLContextASANTest.*
EGLContextSharingTest.TextureLifetime/*
FramebufferTest.MultiContextNoRenderingFeedbackLoops/*
-GetTexLevelParameterTest.ExtensionStringExposed/*
GLSLTest.InactiveVaryingInVertexActiveInFragment/*
InstancingTest.LineLoop/*
MaxTextureSizeTest.*
@@ -81,7 +80,8 @@
OcclusionQueriesTest.*
PBOExtensionTest.*
PixmapTest.Clearing/*
-SemaphoreTest.SemaphoreShouldBeSemaphore/*
+RobustClientMemoryTest.*
+SemaphoreTest.*
SRGBFramebufferTest.Validation/*
StateChangeRenderTest.GenerateMipmap/*
SyncQueriesTest.*
@@ -94,6 +94,13 @@
VertexAttributeOORTest.*
VertexAttributeTest.*
ViewportTest.*
+VulkanExternalImageTest.ShouldClearMutableNoStorageUsageOpaqueFdRGBA8/*
+VulkanExternalImageTest.ShouldClearOpaqueFdWithSemaphores/*
+VulkanExternalImageTest.ShouldClearZirconVmoRGBA8/*
+VulkanExternalImageTest.ShouldClearZirconWithFlagsVmoRGBA8/*
+VulkanExternalImageTest.ShouldImportSemaphoreOpaqueFd/*
+VulkanExternalImageTest.TextureFormatCompatChromiumMutableNoStorageZirconVmo/*
+VulkanExternalImageTest.TextureFormatCompatChromiumZirconVmo/*
WebGLCompatibilityTest.*
WebGLFramebufferTest.*
@@ -105,8 +112,4 @@
# Compile failed tests
GetImageTest.*
-GetTexLevelParameterTest.Queries/*
-RobustClientMemoryTest.*
RobustResourceInitTest.*
-SemaphoreTest.*
-VulkanExternalImageTest.*
diff --git a/src/tests/deqp_support/deqp_egl_test_expectations.txt b/src/tests/deqp_support/deqp_egl_test_expectations.txt
index e9b3757..601168b 100644
--- a/src/tests/deqp_support/deqp_egl_test_expectations.txt
+++ b/src/tests/deqp_support/deqp_egl_test_expectations.txt
@@ -118,6 +118,7 @@
2715 LINUX VULKAN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgb888_depth_stencil = FAIL
2715 LINUX VULKAN : dEQP-EGL.functional.query_surface.simple.pbuffer.rgb888_no_depth_no_stencil = FAIL
2716 LINUX VULKAN : dEQP-EGL.functional.preserve_swap.no_preserve.* = FAIL
+5753 LINUX VULKAN NVIDIA : dEQP-EGL.functional.resize.surface_size.grow = FAIL
// Mac failures
2546 MAC : dEQP-EGL.functional.native_color_mapping.native_window.* = FAIL
diff --git a/src/tests/deqp_support/deqp_gles31_test_expectations.txt b/src/tests/deqp_support/deqp_gles31_test_expectations.txt
index f4c8169..b31cd0f 100644
--- a/src/tests/deqp_support/deqp_gles31_test_expectations.txt
+++ b/src/tests/deqp_support/deqp_gles31_test_expectations.txt
@@ -171,6 +171,9 @@
5662 SWIFTSHADER : dEQP-GLES31.functional.copy_image.compressed.* = FAIL
5662 SWIFTSHADER : dEQP-GLES31.functional.copy_image.mixed.* = FAIL
+// Flaky timeouts on SwANGLE
+1173237 SWIFTSHADER : dEQP-GLES31.functional.shaders.builtin_functions.precision.refract.lowp_compute.vec4 = SKIP
+
////
//// General Vulkan expectations
////
diff --git a/src/tests/deqp_support/deqp_gles3_test_expectations.txt b/src/tests/deqp_support/deqp_gles3_test_expectations.txt
index 59b3c57..ec9f702 100644
--- a/src/tests/deqp_support/deqp_gles3_test_expectations.txt
+++ b/src/tests/deqp_support/deqp_gles3_test_expectations.txt
@@ -634,6 +634,12 @@
// Fails on SwANGLE bots
4418 SWIFTSHADER : dEQP-GLES3.functional.negative_api.buffer.framebuffer_texture_layer = FAIL
+// Flaky timeouts on SwANGLE
+1173237 SWIFTSHADER : dEQP-GLES3.functional.shaders.builtin_functions.precision.faceforward.lowp_fragment.vec4 = SKIP
+1173237 SWIFTSHADER : dEQP-GLES3.functional.shaders.builtin_functions.precision.faceforward.lowp_vertex.vec4 = SKIP
+1173237 SWIFTSHADER : dEQP-GLES3.functional.shaders.builtin_functions.precision.refract.lowp_fragment.vec4 = SKIP
+1173237 SWIFTSHADER : dEQP-GLES3.functional.shaders.builtin_functions.precision.refract.lowp_vertex.vec4 = SKIP
+
// AddressSanitizer:DEADLYSIGNAL on Nexus 5X
5665 NEXUS5X : dEQP-GLES3.functional.attribute_location.bind_aliasing.cond_mat3_offset_1 = SKIP
5665 NEXUS5X : dEQP-GLES3.functional.attribute_location.bind_aliasing.cond_mat4 = SKIP
diff --git a/src/tests/deqp_support/deqp_khr_gles31_test_expectations.txt b/src/tests/deqp_support/deqp_khr_gles31_test_expectations.txt
index bfac637..cd4cf99 100644
--- a/src/tests/deqp_support/deqp_khr_gles31_test_expectations.txt
+++ b/src/tests/deqp_support/deqp_khr_gles31_test_expectations.txt
@@ -83,6 +83,9 @@
4128 VULKAN NVIDIA : KHR-GLES31.core.shader_storage_buffer_object.advanced-unsizedArrayLength-vs-*-matR* = SKIP
4128 VULKAN NVIDIA : KHR-GLES31.core.shader_storage_buffer_object.advanced-unsizedArrayLength-fs-*-matR* = SKIP
+// Flaky on Windows SwiftShader
+5755 WIN SWIFTSHADER : KHR-GLES31.core.arrays_of_arrays.SizedDeclarationsPrimitive = FAIL
+
////
//// Android (i.e. Pixel*) Vulkan expectations
diff --git a/src/tests/egl_tests/EGLCreateContextAttribsTest.cpp b/src/tests/egl_tests/EGLCreateContextAttribsTest.cpp
index ffa512d..2b6b5b9 100644
--- a/src/tests/egl_tests/EGLCreateContextAttribsTest.cpp
+++ b/src/tests/egl_tests/EGLCreateContextAttribsTest.cpp
@@ -158,6 +158,61 @@
eglTerminate(mDisplay);
}
+// EGL_IMG_context_priority - set and get attribute
+TEST_P(EGLCreateContextAttribsTest, IMGContextPriorityExtension)
+{
+ const EGLint configAttributes[] = {EGL_RED_SIZE, 8, EGL_GREEN_SIZE, 8,
+ EGL_BLUE_SIZE, 8, EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
+ EGL_NONE};
+
+ // Get all the configs
+ EGLint count;
+ EGLConfig config;
+ EXPECT_EGL_TRUE(eglChooseConfig(mDisplay, configAttributes, &config, 1, &count));
+ EXPECT_TRUE(count == 1);
+
+ EGLContext context = EGL_NO_CONTEXT;
+ EGLint contextAttribs[] = {EGL_CONTEXT_MAJOR_VERSION,
+ 2,
+ EGL_CONTEXT_MINOR_VERSION,
+ 0,
+ EGL_CONTEXT_PRIORITY_LEVEL_IMG,
+ EGL_CONTEXT_PRIORITY_HIGH_IMG,
+ EGL_NONE};
+
+ if (IsEGLDisplayExtensionEnabled(mDisplay, "EGL_IMG_context_priority"))
+ {
+ context = eglCreateContext(mDisplay, config, nullptr, contextAttribs);
+ EXPECT_NE(context, EGL_NO_CONTEXT);
+ ASSERT_EGL_ERROR(EGL_SUCCESS);
+
+ EGLint value = 0;
+ EXPECT_EGL_TRUE(eglQueryContext(mDisplay, context, EGL_CONTEXT_PRIORITY_LEVEL_IMG, &value));
+ ASSERT_EGL_ERROR(EGL_SUCCESS);
+ }
+ else // Not supported so should get EGL_BAD_ATTRIBUTE
+ {
+ context = eglCreateContext(mDisplay, config, nullptr, contextAttribs);
+ EXPECT_EQ(context, EGL_NO_CONTEXT);
+ ASSERT_EGL_ERROR(EGL_BAD_ATTRIBUTE);
+
+ EGLint contextAttribs[] = {EGL_CONTEXT_MAJOR_VERSION, 2, EGL_CONTEXT_MINOR_VERSION, 0,
+ EGL_NONE};
+
+ context = eglCreateContext(mDisplay, config, nullptr, contextAttribs);
+ EXPECT_NE(context, EGL_NO_CONTEXT);
+ ASSERT_EGL_ERROR(EGL_SUCCESS);
+
+ EGLint value = 0;
+ EXPECT_EGL_FALSE(
+ eglQueryContext(mDisplay, context, EGL_CONTEXT_PRIORITY_LEVEL_IMG, &value));
+ ASSERT_EGL_ERROR(EGL_BAD_ATTRIBUTE);
+ }
+
+ // Cleanup contexts
+ eglTerminate(mDisplay);
+}
+
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(EGLCreateContextAttribsTest);
ANGLE_INSTANTIATE_TEST(EGLCreateContextAttribsTest,
WithNoFixture(ES2_D3D9()),
diff --git a/src/tests/gl_tests/BPTCCompressedTextureTest.cpp b/src/tests/gl_tests/BPTCCompressedTextureTest.cpp
index 6953ebf..91b570a 100644
--- a/src/tests/gl_tests/BPTCCompressedTextureTest.cpp
+++ b/src/tests/gl_tests/BPTCCompressedTextureTest.cpp
@@ -21,7 +21,10 @@
const std::array<GLubyte, 16> kBC7Data4x4 = {0x50, 0x1f, 0xfc, 0xf, 0x0, 0xf0, 0xe3, 0xe1,
0xe1, 0xe1, 0xc1, 0xf, 0xfc, 0xc0, 0xf, 0xfc};
-const std::array<GLubyte, 16> kBC7BlackData4x4 = {};
+// The pixel data represents a 4x4 pixel image with the transparent black solid color.
+// Sampling from a zero-filled block is undefined, so use a valid one.
+const std::array<GLubyte, 16> kBC7BlackData4x4 = {0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
} // anonymous namespace
class BPTCCompressedTextureTest : public ANGLETest
@@ -273,9 +276,6 @@
// Test uploading texture data from a PBO to a texture.
TEST_P(BPTCCompressedTextureTestES3, PBOCompressedTexImage)
{
- // TODO(anglebug.com/5360): Failing on ARM-based Apple DTKs.
- ANGLE_SKIP_TEST_IF(IsOSX() && IsARM64() && IsMetal());
-
ANGLE_SKIP_TEST_IF(!IsGLExtensionEnabled("GL_EXT_texture_compression_bptc"));
GLTexture texture;
@@ -327,9 +327,6 @@
// Test uploading texture data from a PBO to a non-zero base texture.
TEST_P(BPTCCompressedTextureTestES3, PBOCompressedTexImageNonZeroBase)
{
- // TODO(anglebug.com/5360): Failing on ARM-based Apple DTKs.
- ANGLE_SKIP_TEST_IF(IsOSX() && IsARM64() && IsMetal());
-
ANGLE_SKIP_TEST_IF(!IsGLExtensionEnabled("GL_EXT_texture_compression_bptc"));
GLTexture texture;
diff --git a/src/tests/gl_tests/MultithreadingTest.cpp b/src/tests/gl_tests/MultithreadingTest.cpp
index bae3a22..9c88f5c 100644
--- a/src/tests/gl_tests/MultithreadingTest.cpp
+++ b/src/tests/gl_tests/MultithreadingTest.cpp
@@ -269,6 +269,8 @@
// http://anglebug.com/5099
ANGLE_SKIP_TEST_IF(IsAndroid() && IsOpenGLES());
+ // http://anglebug.com/5099
+ ANGLE_SKIP_TEST_IF(IsWindows() && isSwiftshader());
EGLWindow *window = getEGLWindow();
EGLDisplay dpy = window->getDisplay();
diff --git a/src/tests/gl_tests/ProgramPipelineTest.cpp b/src/tests/gl_tests/ProgramPipelineTest.cpp
index 7aa8f4d..ceab5b5 100644
--- a/src/tests/gl_tests/ProgramPipelineTest.cpp
+++ b/src/tests/gl_tests/ProgramPipelineTest.cpp
@@ -650,6 +650,48 @@
EXPECT_GL_ERROR(GL_INVALID_OPERATION);
}
+// Test that a shader IO block varying with separable program links
+// successfully.
+TEST_P(ProgramPipelineTest31, VaryingIOBlockSeparableProgram)
+{
+ // Only the Vulkan backend supports PPOs
+ ANGLE_SKIP_TEST_IF(!IsVulkan());
+ ANGLE_SKIP_TEST_IF(!IsGLExtensionEnabled("GL_EXT_shader_io_blocks"));
+
+ constexpr char kVS[] =
+ R"(#version 310 es
+ #extension GL_EXT_shader_io_blocks : require
+
+ precision highp float;
+ in vec4 inputAttribute;
+ out Block_inout { vec4 value; } user_out;
+
+ void main()
+ {
+ gl_Position = inputAttribute;
+ user_out.value = vec4(4.0, 5.0, 6.0, 7.0);
+ })";
+
+ constexpr char kFS[] =
+ R"(#version 310 es
+ #extension GL_EXT_shader_io_blocks : require
+
+ precision highp float;
+ layout(location = 0) out mediump vec4 color;
+ in Block_inout { vec4 value; } user_in;
+
+ void main()
+ {
+ color = vec4(1, 0, 0, 1);
+ })";
+
+ bindProgramPipeline(kVS, kFS);
+
+ drawQuadWithPPO("inputAttribute", 0.5f, 1.0f);
+ ASSERT_GL_NO_ERROR();
+ EXPECT_PIXEL_COLOR_EQ(0, 0, GLColor::red);
+}
+
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(ProgramPipelineTest);
ANGLE_INSTANTIATE_TEST_ES3_AND_ES31(ProgramPipelineTest);
diff --git a/src/tests/gl_tests/VulkanPerformanceCounterTest.cpp b/src/tests/gl_tests/VulkanPerformanceCounterTest.cpp
index 2f60d09..7c0d641 100644
--- a/src/tests/gl_tests/VulkanPerformanceCounterTest.cpp
+++ b/src/tests/gl_tests/VulkanPerformanceCounterTest.cpp
@@ -43,7 +43,10 @@
{
// Hack the angle!
const gl::Context *context = static_cast<const gl::Context *>(getEGLWindow()->getContext());
- return rx::GetImplAs<const rx::ContextVk>(context)->getPerfCounters();
+ rx::ContextVk *contextVk = rx::GetImplAs<rx::ContextVk>(context);
+ // This will be implicitly called when using the extension.
+ contextVk->syncObjectPerfCounters();
+ return contextVk->getPerfCounters();
}
static constexpr GLsizei kInvalidateTestSize = 16;
@@ -2919,6 +2922,129 @@
GLColor::transparentBlack);
}
+// Tests that changing UBO bindings does not allocate new descriptor sets.
+TEST_P(VulkanPerformanceCounterTest, ChangingUBOsHitsDescriptorSetCache)
+{
+ // Set up two UBOs, one filled with "1" and the second with "2".
+ constexpr GLsizei kCount = 64;
+ std::vector<GLint> data1(kCount, 1);
+ std::vector<GLint> data2(kCount, 2);
+
+ GLBuffer ubo1;
+ glBindBuffer(GL_UNIFORM_BUFFER, ubo1);
+ glBufferData(GL_UNIFORM_BUFFER, kCount * sizeof(data1[0]), data1.data(), GL_STATIC_DRAW);
+
+ GLBuffer ubo2;
+ glBindBuffer(GL_UNIFORM_BUFFER, ubo2);
+ glBufferData(GL_UNIFORM_BUFFER, kCount * sizeof(data2[0]), data2.data(), GL_STATIC_DRAW);
+
+ // Set up a program that verifies the contents of uniform blocks.
+ constexpr char kVS[] = R"(#version 300 es
+precision mediump float;
+in vec4 position;
+void main()
+{
+ gl_Position = position;
+})";
+
+ constexpr char kFS[] = R"(#version 300 es
+precision mediump float;
+uniform buf {
+ int data[64/4];
+};
+uniform int checkValue;
+out vec4 outColor;
+
+void main()
+{
+ for (int i = 0; i < 64/4; ++i) {
+ if (data[i] != checkValue) {
+ outColor = vec4(1, 0, 0, 1);
+ return;
+ }
+ }
+ outColor = vec4(0, 1, 0, 1);
+})";
+
+ ANGLE_GL_PROGRAM(program, kVS, kFS);
+ glUseProgram(program);
+ ASSERT_GL_NO_ERROR();
+
+ GLint uniLoc = glGetUniformLocation(program, "checkValue");
+ ASSERT_NE(-1, uniLoc);
+
+ GLuint blockIndex = glGetUniformBlockIndex(program, "buf");
+ ASSERT_NE(blockIndex, GL_INVALID_INDEX);
+
+ glUniformBlockBinding(program, blockIndex, 0);
+ ASSERT_GL_NO_ERROR();
+
+ // Set up the rest of the GL state.
+ auto quadVerts = GetQuadVertices();
+ GLBuffer vertexBuffer;
+ glBindBuffer(GL_ARRAY_BUFFER, vertexBuffer);
+ glBufferData(GL_ARRAY_BUFFER, quadVerts.size() * sizeof(quadVerts[0]), quadVerts.data(),
+ GL_STATIC_DRAW);
+
+ GLint posLoc = glGetAttribLocation(program, "position");
+ ASSERT_NE(-1, posLoc);
+
+ glVertexAttribPointer(posLoc, 3, GL_FLOAT, GL_FALSE, 0, 0);
+ glEnableVertexAttribArray(posLoc);
+
+ // Draw a few times with each UBO. Stream out one pixel for post-render verification.
+ constexpr int kIterations = 5;
+ constexpr GLsizei kPackBufferSize = sizeof(GLColor) * kIterations * 2;
+
+ GLBuffer packBuffer;
+ glBindBuffer(GL_PIXEL_PACK_BUFFER, packBuffer);
+ glBufferData(GL_PIXEL_PACK_BUFFER, kPackBufferSize, nullptr, GL_STREAM_READ);
+
+ GLsizei offset = 0;
+
+ uint32_t descriptorSetAllocationsBefore = 0;
+
+ for (int iteration = 0; iteration < kIterations; ++iteration)
+ {
+ glUniform1i(uniLoc, 1);
+ glBindBufferBase(GL_UNIFORM_BUFFER, 0, ubo1);
+ glDrawArrays(GL_TRIANGLES, 0, 6);
+ glReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, reinterpret_cast<GLvoid *>(offset));
+ offset += sizeof(GLColor);
+ glUniform1i(uniLoc, 2);
+ glBindBufferBase(GL_UNIFORM_BUFFER, 0, ubo2);
+ glDrawArrays(GL_TRIANGLES, 0, 6);
+ glReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, reinterpret_cast<GLvoid *>(offset));
+ offset += sizeof(GLColor);
+
+ // Capture the allocations counter after the first run.
+ if (iteration == 0)
+ {
+ descriptorSetAllocationsBefore = hackANGLE().descriptorSetAllocations;
+ }
+ }
+
+ ASSERT_GL_NO_ERROR();
+
+ // Verify correctness first.
+ std::vector<GLColor> expectedData(kIterations * 2, GLColor::green);
+ std::vector<GLColor> actualData(kIterations * 2, GLColor::black);
+
+ void *mapPtr = glMapBufferRange(GL_PIXEL_PACK_BUFFER, 0, kPackBufferSize, GL_MAP_READ_BIT);
+ ASSERT_NE(nullptr, mapPtr);
+ memcpy(actualData.data(), mapPtr, kPackBufferSize);
+
+ glUnmapBuffer(GL_PIXEL_PACK_BUFFER);
+
+ EXPECT_EQ(expectedData, actualData);
+
+ // Check for unnecessary descriptor set allocations.
+ uint32_t descriptorSetAllocationsAfter = hackANGLE().descriptorSetAllocations;
+
+ // TODO(jmadill): http://anglebug.com/5736 change to EXPECT_EQ.
+ EXPECT_NE(descriptorSetAllocationsBefore, descriptorSetAllocationsAfter);
+}
+
ANGLE_INSTANTIATE_TEST(VulkanPerformanceCounterTest, ES3_VULKAN());
ANGLE_INSTANTIATE_TEST(VulkanPerformanceCounterTest_ES31, ES31_VULKAN());
diff --git a/src/tests/perf_tests/TracePerfTest.cpp b/src/tests/perf_tests/TracePerfTest.cpp
index a5153e8..db44175 100644
--- a/src/tests/perf_tests/TracePerfTest.cpp
+++ b/src/tests/perf_tests/TracePerfTest.cpp
@@ -408,6 +408,20 @@
}
}
+ if (param.testID == RestrictedTraceID::extreme_car_driving_simulator)
+ {
+ addExtensionPrerequisite("GL_KHR_texture_compression_astc_ldr");
+ }
+
+ if (param.testID == RestrictedTraceID::lineage_m)
+ {
+ // TODO: http://anglebug.com/5748 Vulkan device is lost on Nvidia Linux
+ if (IsLinux() && IsNVIDIA() && param.getRenderer() == EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE)
+ {
+ mSkipTest = true;
+ }
+ }
+
// We already swap in TracePerfTest::drawBenchmark, no need to swap again in the harness.
disableTestHarnessSwap();
diff --git a/src/tests/restricted_traces/.gitignore b/src/tests/restricted_traces/.gitignore
index 016f246..ae68a9f 100644
--- a/src/tests/restricted_traces/.gitignore
+++ b/src/tests/restricted_traces/.gitignore
@@ -32,6 +32,8 @@
egypt_1500/
eight_ball_pool.tar.gz
eight_ball_pool/
+extreme_car_driving_simulator.tar.gz
+extreme_car_driving_simulator/
fallout_shelter_online.tar.gz
fallout_shelter_online/
fate_grand_order.tar.gz
@@ -56,6 +58,8 @@
klondike_adventures/
lego_legacy.tar.gz
lego_legacy/
+lineage_m.tar.gz
+lineage_m/
magic_tiles_3.tar.gz
magic_tiles_3/
manhattan_10.tar.gz
@@ -74,6 +78,8 @@
nba2k20_800/
one_punch_man.tar.gz
one_punch_man/
+plants_vs_zombies_2.tar.gz
+plants_vs_zombies_2/
pubg_mobile_lite.tar.gz
pubg_mobile_lite/
raid_shadow_legends.tar.gz
diff --git a/src/tests/restricted_traces/extreme_car_driving_simulator.tar.gz.sha1 b/src/tests/restricted_traces/extreme_car_driving_simulator.tar.gz.sha1
new file mode 100644
index 0000000..423d558
--- /dev/null
+++ b/src/tests/restricted_traces/extreme_car_driving_simulator.tar.gz.sha1
@@ -0,0 +1 @@
+3640aa7efa16972968f4c5e71ddf76ea8d9681c2
\ No newline at end of file
diff --git a/src/tests/restricted_traces/lineage_m.tar.gz.sha1 b/src/tests/restricted_traces/lineage_m.tar.gz.sha1
new file mode 100644
index 0000000..39b2bc2
--- /dev/null
+++ b/src/tests/restricted_traces/lineage_m.tar.gz.sha1
@@ -0,0 +1 @@
+879a935c39e609d85122e0fb6240f5a90ef77c00
\ No newline at end of file
diff --git a/src/tests/restricted_traces/plants_vs_zombies_2.tar.gz.sha1 b/src/tests/restricted_traces/plants_vs_zombies_2.tar.gz.sha1
new file mode 100644
index 0000000..f38d5a2
--- /dev/null
+++ b/src/tests/restricted_traces/plants_vs_zombies_2.tar.gz.sha1
@@ -0,0 +1 @@
+e2db39e5a073c34a69986537684de2512ccb0602
\ No newline at end of file
diff --git a/src/tests/restricted_traces/restricted_traces.json b/src/tests/restricted_traces/restricted_traces.json
index 6b0a747..397add9 100644
--- a/src/tests/restricted_traces/restricted_traces.json
+++ b/src/tests/restricted_traces/restricted_traces.json
@@ -24,6 +24,7 @@
"efootball_pes_2021",
"egypt_1500",
"eight_ball_pool",
+ "extreme_car_driving_simulator",
"fallout_shelter_online",
"fate_grand_order",
"fifa_mobile",
@@ -36,6 +37,7 @@
"kartrider_rush",
"klondike_adventures",
"lego_legacy",
+ "lineage_m",
"magic_tiles_3",
"manhattan_10",
"manhattan_31",
@@ -45,6 +47,7 @@
"mobile_legends",
"nba2k20_800",
"one_punch_man",
+ "plants_vs_zombies_2",
"pubg_mobile_lite",
"raid_shadow_legends",
"real_commando_secret_mission",
diff --git a/src/tests/restricted_traces/restricted_traces_autogen.cpp b/src/tests/restricted_traces/restricted_traces_autogen.cpp
index b80be06..60f8356 100644
--- a/src/tests/restricted_traces/restricted_traces_autogen.cpp
+++ b/src/tests/restricted_traces/restricted_traces_autogen.cpp
@@ -28,6 +28,7 @@
#include "efootball_pes_2021/efootball_pes_2021_capture_context7.h"
#include "egypt_1500/egypt_1500_capture_context1.h"
#include "eight_ball_pool/eight_ball_pool_capture_context2.h"
+#include "extreme_car_driving_simulator/extreme_car_driving_simulator_capture_context3.h"
#include "fallout_shelter_online/fallout_shelter_online_capture_context3.h"
#include "fate_grand_order/fate_grand_order_capture_context1.h"
#include "fifa_mobile/fifa_mobile_capture_context2.h"
@@ -40,6 +41,7 @@
#include "kartrider_rush/kartrider_rush_capture_context1.h"
#include "klondike_adventures/klondike_adventures_capture_context2.h"
#include "lego_legacy/lego_legacy_capture_context2.h"
+#include "lineage_m/lineage_m_capture_context2.h"
#include "magic_tiles_3/magic_tiles_3_capture_context2.h"
#include "manhattan_10/manhattan_10_capture_context1.h"
#include "manhattan_31/manhattan_31_capture_context6.h"
@@ -49,6 +51,7 @@
#include "mobile_legends/mobile_legends_capture_context1.h"
#include "nba2k20_800/nba2k20_800_capture_context1.h"
#include "one_punch_man/one_punch_man_capture_context3.h"
+#include "plants_vs_zombies_2/plants_vs_zombies_2_capture_context1.h"
#include "pubg_mobile_lite/pubg_mobile_lite_capture_context1.h"
#include "raid_shadow_legends/raid_shadow_legends_capture_context2.h"
#include "real_commando_secret_mission/real_commando_secret_mission_capture_context1.h"
@@ -155,6 +158,13 @@
eight_ball_pool::kReplayContextClientMinorVersion, eight_ball_pool::kReplayFrameStart,
eight_ball_pool::kReplayFrameEnd, eight_ball_pool::kReplayDrawSurfaceWidth,
eight_ball_pool::kReplayDrawSurfaceHeight, "eight_ball_pool"}},
+ {RestrictedTraceID::extreme_car_driving_simulator,
+ {extreme_car_driving_simulator::kReplayContextClientMajorVersion,
+ extreme_car_driving_simulator::kReplayContextClientMinorVersion,
+ extreme_car_driving_simulator::kReplayFrameStart,
+ extreme_car_driving_simulator::kReplayFrameEnd,
+ extreme_car_driving_simulator::kReplayDrawSurfaceWidth,
+ extreme_car_driving_simulator::kReplayDrawSurfaceHeight, "extreme_car_driving_simulator"}},
{RestrictedTraceID::fallout_shelter_online,
{fallout_shelter_online::kReplayContextClientMajorVersion,
fallout_shelter_online::kReplayContextClientMinorVersion,
@@ -209,6 +219,10 @@
{kDefaultReplayContextClientMajorVersion, kDefaultReplayContextClientMinorVersion,
lego_legacy::kReplayFrameStart, lego_legacy::kReplayFrameEnd,
lego_legacy::kReplayDrawSurfaceWidth, lego_legacy::kReplayDrawSurfaceHeight, "lego_legacy"}},
+ {RestrictedTraceID::lineage_m,
+ {lineage_m::kReplayContextClientMajorVersion, lineage_m::kReplayContextClientMinorVersion,
+ lineage_m::kReplayFrameStart, lineage_m::kReplayFrameEnd, lineage_m::kReplayDrawSurfaceWidth,
+ lineage_m::kReplayDrawSurfaceHeight, "lineage_m"}},
{RestrictedTraceID::magic_tiles_3,
{kDefaultReplayContextClientMajorVersion, kDefaultReplayContextClientMinorVersion,
magic_tiles_3::kReplayFrameStart, magic_tiles_3::kReplayFrameEnd,
@@ -252,6 +266,11 @@
one_punch_man::kReplayContextClientMinorVersion, one_punch_man::kReplayFrameStart,
one_punch_man::kReplayFrameEnd, one_punch_man::kReplayDrawSurfaceWidth,
one_punch_man::kReplayDrawSurfaceHeight, "one_punch_man"}},
+ {RestrictedTraceID::plants_vs_zombies_2,
+ {plants_vs_zombies_2::kReplayContextClientMajorVersion,
+ plants_vs_zombies_2::kReplayContextClientMinorVersion, plants_vs_zombies_2::kReplayFrameStart,
+ plants_vs_zombies_2::kReplayFrameEnd, plants_vs_zombies_2::kReplayDrawSurfaceWidth,
+ plants_vs_zombies_2::kReplayDrawSurfaceHeight, "plants_vs_zombies_2"}},
{RestrictedTraceID::pubg_mobile_lite,
{kDefaultReplayContextClientMajorVersion, kDefaultReplayContextClientMinorVersion,
pubg_mobile_lite::kReplayFrameStart, pubg_mobile_lite::kReplayFrameEnd,
@@ -412,6 +431,9 @@
case RestrictedTraceID::eight_ball_pool:
eight_ball_pool::ReplayContext2Frame(frameIndex);
break;
+ case RestrictedTraceID::extreme_car_driving_simulator:
+ extreme_car_driving_simulator::ReplayContext3Frame(frameIndex);
+ break;
case RestrictedTraceID::fallout_shelter_online:
fallout_shelter_online::ReplayContext3Frame(frameIndex);
break;
@@ -448,6 +470,9 @@
case RestrictedTraceID::lego_legacy:
lego_legacy::ReplayContext2Frame(frameIndex);
break;
+ case RestrictedTraceID::lineage_m:
+ lineage_m::ReplayContext2Frame(frameIndex);
+ break;
case RestrictedTraceID::magic_tiles_3:
magic_tiles_3::ReplayContext2Frame(frameIndex);
break;
@@ -475,6 +500,9 @@
case RestrictedTraceID::one_punch_man:
one_punch_man::ReplayContext3Frame(frameIndex);
break;
+ case RestrictedTraceID::plants_vs_zombies_2:
+ plants_vs_zombies_2::ReplayContext1Frame(frameIndex);
+ break;
case RestrictedTraceID::pubg_mobile_lite:
pubg_mobile_lite::ReplayContext1Frame(frameIndex);
break;
@@ -597,6 +625,9 @@
case RestrictedTraceID::eight_ball_pool:
eight_ball_pool::ResetContext2Replay();
break;
+ case RestrictedTraceID::extreme_car_driving_simulator:
+ extreme_car_driving_simulator::ResetContext3Replay();
+ break;
case RestrictedTraceID::fallout_shelter_online:
fallout_shelter_online::ResetContext3Replay();
break;
@@ -633,6 +664,9 @@
case RestrictedTraceID::lego_legacy:
lego_legacy::ResetContext2Replay();
break;
+ case RestrictedTraceID::lineage_m:
+ lineage_m::ResetContext2Replay();
+ break;
case RestrictedTraceID::magic_tiles_3:
magic_tiles_3::ResetContext2Replay();
break;
@@ -660,6 +694,9 @@
case RestrictedTraceID::one_punch_man:
one_punch_man::ResetContext3Replay();
break;
+ case RestrictedTraceID::plants_vs_zombies_2:
+ plants_vs_zombies_2::ResetContext1Replay();
+ break;
case RestrictedTraceID::pubg_mobile_lite:
pubg_mobile_lite::ResetContext1Replay();
break;
@@ -782,6 +819,9 @@
case RestrictedTraceID::eight_ball_pool:
eight_ball_pool::SetupContext2Replay();
break;
+ case RestrictedTraceID::extreme_car_driving_simulator:
+ extreme_car_driving_simulator::SetupContext3Replay();
+ break;
case RestrictedTraceID::fallout_shelter_online:
fallout_shelter_online::SetupContext3Replay();
break;
@@ -818,6 +858,9 @@
case RestrictedTraceID::lego_legacy:
lego_legacy::SetupContext2Replay();
break;
+ case RestrictedTraceID::lineage_m:
+ lineage_m::SetupContext2Replay();
+ break;
case RestrictedTraceID::magic_tiles_3:
magic_tiles_3::SetupContext2Replay();
break;
@@ -845,6 +888,9 @@
case RestrictedTraceID::one_punch_man:
one_punch_man::SetupContext3Replay();
break;
+ case RestrictedTraceID::plants_vs_zombies_2:
+ plants_vs_zombies_2::SetupContext1Replay();
+ break;
case RestrictedTraceID::pubg_mobile_lite:
pubg_mobile_lite::SetupContext1Replay();
break;
@@ -967,6 +1013,9 @@
case RestrictedTraceID::eight_ball_pool:
eight_ball_pool::SetBinaryDataDir(dataDir);
break;
+ case RestrictedTraceID::extreme_car_driving_simulator:
+ extreme_car_driving_simulator::SetBinaryDataDir(dataDir);
+ break;
case RestrictedTraceID::fallout_shelter_online:
fallout_shelter_online::SetBinaryDataDir(dataDir);
break;
@@ -1003,6 +1052,9 @@
case RestrictedTraceID::lego_legacy:
lego_legacy::SetBinaryDataDir(dataDir);
break;
+ case RestrictedTraceID::lineage_m:
+ lineage_m::SetBinaryDataDir(dataDir);
+ break;
case RestrictedTraceID::magic_tiles_3:
magic_tiles_3::SetBinaryDataDir(dataDir);
break;
@@ -1030,6 +1082,9 @@
case RestrictedTraceID::one_punch_man:
one_punch_man::SetBinaryDataDir(dataDir);
break;
+ case RestrictedTraceID::plants_vs_zombies_2:
+ plants_vs_zombies_2::SetBinaryDataDir(dataDir);
+ break;
case RestrictedTraceID::pubg_mobile_lite:
pubg_mobile_lite::SetBinaryDataDir(dataDir);
break;
@@ -1152,6 +1207,9 @@
case RestrictedTraceID::eight_ball_pool:
eight_ball_pool::SetBinaryDataDecompressCallback(callback);
break;
+ case RestrictedTraceID::extreme_car_driving_simulator:
+ extreme_car_driving_simulator::SetBinaryDataDecompressCallback(callback);
+ break;
case RestrictedTraceID::fallout_shelter_online:
fallout_shelter_online::SetBinaryDataDecompressCallback(callback);
break;
@@ -1188,6 +1246,9 @@
case RestrictedTraceID::lego_legacy:
lego_legacy::SetBinaryDataDecompressCallback(callback);
break;
+ case RestrictedTraceID::lineage_m:
+ lineage_m::SetBinaryDataDecompressCallback(callback);
+ break;
case RestrictedTraceID::magic_tiles_3:
magic_tiles_3::SetBinaryDataDecompressCallback(callback);
break;
@@ -1215,6 +1276,9 @@
case RestrictedTraceID::one_punch_man:
one_punch_man::SetBinaryDataDecompressCallback(callback);
break;
+ case RestrictedTraceID::plants_vs_zombies_2:
+ plants_vs_zombies_2::SetBinaryDataDecompressCallback(callback);
+ break;
case RestrictedTraceID::pubg_mobile_lite:
pubg_mobile_lite::SetBinaryDataDecompressCallback(callback);
break;
diff --git a/src/tests/restricted_traces/restricted_traces_autogen.gni b/src/tests/restricted_traces/restricted_traces_autogen.gni
index 66d97d0..f6a0aec 100644
--- a/src/tests/restricted_traces/restricted_traces_autogen.gni
+++ b/src/tests/restricted_traces/restricted_traces_autogen.gni
@@ -26,6 +26,7 @@
"efootball_pes_2021 7",
"egypt_1500 1",
"eight_ball_pool 2",
+ "extreme_car_driving_simulator 3",
"fallout_shelter_online 3",
"fate_grand_order 1",
"fifa_mobile 2",
@@ -38,6 +39,7 @@
"kartrider_rush 1",
"klondike_adventures 2",
"lego_legacy 2",
+ "lineage_m 2",
"magic_tiles_3 2",
"manhattan_10 1",
"manhattan_31 6",
@@ -47,6 +49,7 @@
"mobile_legends 1",
"nba2k20_800 1",
"one_punch_man 3",
+ "plants_vs_zombies_2 1",
"pubg_mobile_lite 1",
"raid_shadow_legends 2",
"real_commando_secret_mission 1",
diff --git a/src/tests/restricted_traces/restricted_traces_autogen.h b/src/tests/restricted_traces/restricted_traces_autogen.h
index e5874ed..81ee679 100644
--- a/src/tests/restricted_traces/restricted_traces_autogen.h
+++ b/src/tests/restricted_traces/restricted_traces_autogen.h
@@ -71,6 +71,7 @@
efootball_pes_2021,
egypt_1500,
eight_ball_pool,
+ extreme_car_driving_simulator,
fallout_shelter_online,
fate_grand_order,
fifa_mobile,
@@ -83,6 +84,7 @@
kartrider_rush,
klondike_adventures,
lego_legacy,
+ lineage_m,
magic_tiles_3,
manhattan_10,
manhattan_31,
@@ -92,6 +94,7 @@
mobile_legends,
nba2k20_800,
one_punch_man,
+ plants_vs_zombies_2,
pubg_mobile_lite,
raid_shadow_legends,
real_commando_secret_mission,
diff --git a/third_party/abseil-cpp/CMake/AbseilDll.cmake b/third_party/abseil-cpp/CMake/AbseilDll.cmake
index 47707df..39f85f2 100644
--- a/third_party/abseil-cpp/CMake/AbseilDll.cmake
+++ b/third_party/abseil-cpp/CMake/AbseilDll.cmake
@@ -131,6 +131,7 @@
"numeric/int128.cc"
"numeric/int128.h"
"numeric/internal/bits.h"
+ "numeric/internal/representation.h"
"random/bernoulli_distribution.h"
"random/beta_distribution.h"
"random/bit_gen_ref.h"
diff --git a/third_party/abseil-cpp/README.chromium b/third_party/abseil-cpp/README.chromium
index 17bcd56..492340d 100644
--- a/third_party/abseil-cpp/README.chromium
+++ b/third_party/abseil-cpp/README.chromium
@@ -4,7 +4,7 @@
License: Apache 2.0
License File: LICENSE
Version: 0
-Revision: b0735979d778a768caee207f01f327535cbd2140
+Revision: ab21820d47e4f83875dda008b600514d3520fd35
Security Critical: yes
Description:
diff --git a/third_party/abseil-cpp/absl/container/btree_benchmark.cc b/third_party/abseil-cpp/absl/container/btree_benchmark.cc
index 4679867..41f13f5 100644
--- a/third_party/abseil-cpp/absl/container/btree_benchmark.cc
+++ b/third_party/abseil-cpp/absl/container/btree_benchmark.cc
@@ -101,39 +101,6 @@
BM_InsertImpl<T>(state, true);
}
-// container::insert sometimes returns a pair<iterator, bool> and sometimes
-// returns an iterator (for multi- containers).
-template <typename Iter>
-Iter GetIterFromInsert(const std::pair<Iter, bool>& pair) {
- return pair.first;
-}
-template <typename Iter>
-Iter GetIterFromInsert(const Iter iter) {
- return iter;
-}
-
-// Benchmark insertion of values into a container at the end.
-template <typename T>
-void BM_InsertEnd(benchmark::State& state) {
- using V = typename remove_pair_const<typename T::value_type>::type;
- typename KeyOfValue<typename T::key_type, V>::type key_of_value;
-
- T container;
- const int kSize = 10000;
- for (int i = 0; i < kSize; ++i) {
- container.insert(Generator<V>(kSize)(i));
- }
- V v = Generator<V>(kSize)(kSize - 1);
- typename T::key_type k = key_of_value(v);
-
- auto it = container.find(k);
- while (state.KeepRunning()) {
- // Repeatedly removing then adding v.
- container.erase(it);
- it = GetIterFromInsert(container.insert(v));
- }
-}
-
// Benchmark inserting the first few elements in a container. In b-tree, this is
// when the root node grows.
template <typename T>
@@ -513,7 +480,6 @@
#define MY_BENCHMARK3(type) \
MY_BENCHMARK4(type, Insert); \
MY_BENCHMARK4(type, InsertSorted); \
- MY_BENCHMARK4(type, InsertEnd); \
MY_BENCHMARK4(type, InsertSmall); \
MY_BENCHMARK4(type, Lookup); \
MY_BENCHMARK4(type, FullLookup); \
diff --git a/third_party/abseil-cpp/absl/numeric/BUILD.bazel b/third_party/abseil-cpp/absl/numeric/BUILD.bazel
index 5d7b185..ea587bf 100644
--- a/third_party/abseil-cpp/absl/numeric/BUILD.bazel
+++ b/third_party/abseil-cpp/absl/numeric/BUILD.bazel
@@ -101,3 +101,15 @@
"@com_github_google_benchmark//:benchmark_main",
],
)
+
+cc_library(
+ name = "representation",
+ hdrs = [
+ "internal/representation.h",
+ ],
+ copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
+ deps = [
+ "//absl/base:config",
+ ],
+)
diff --git a/third_party/abseil-cpp/absl/numeric/BUILD.gn b/third_party/abseil-cpp/absl/numeric/BUILD.gn
index 5e2558a..6368869 100644
--- a/third_party/abseil-cpp/absl/numeric/BUILD.gn
+++ b/third_party/abseil-cpp/absl/numeric/BUILD.gn
@@ -28,3 +28,8 @@
"//third_party/abseil-cpp/absl/base:core_headers",
]
}
+
+absl_source_set("representation") {
+ public = [ "internal/representation.h" ]
+ deps = [ "//third_party/abseil-cpp/absl/base:config" ]
+}
diff --git a/third_party/abseil-cpp/absl/numeric/CMakeLists.txt b/third_party/abseil-cpp/absl/numeric/CMakeLists.txt
index be94352..781987d 100644
--- a/third_party/abseil-cpp/absl/numeric/CMakeLists.txt
+++ b/third_party/abseil-cpp/absl/numeric/CMakeLists.txt
@@ -86,3 +86,15 @@
absl::int128
PUBLIC
)
+
+absl_cc_library(
+ NAME
+ numeric_representation
+ HDRS
+ "internal/representation.h"
+ COPTS
+ ${ABSL_DEFAULT_COPTS}
+ DEPS
+ absl::config
+ PUBLIC
+)
diff --git a/third_party/abseil-cpp/absl/numeric/internal/representation.h b/third_party/abseil-cpp/absl/numeric/internal/representation.h
new file mode 100644
index 0000000..82d332f
--- /dev/null
+++ b/third_party/abseil-cpp/absl/numeric/internal/representation.h
@@ -0,0 +1,55 @@
+// Copyright 2021 The Abseil Authors
+//
+// 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
+//
+// https://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.
+
+#ifndef ABSL_NUMERIC_INTERNAL_REPRESENTATION_H_
+#define ABSL_NUMERIC_INTERNAL_REPRESENTATION_H_
+
+#include <limits>
+
+#include "absl/base/config.h"
+
+namespace absl {
+ABSL_NAMESPACE_BEGIN
+namespace numeric_internal {
+
+// Returns true iff long double is represented as a pair of doubles added
+// together.
+inline constexpr bool IsDoubleDouble() {
+ // A double-double value always has exactly twice the precision of a double
+ // value--one double carries the high digits and one double carries the low
+ // digits. This property is not shared with any other common floating-point
+ // representation, so this test won't trigger false positives. For reference,
+ // this table gives the number of bits of precision of each common
+ // floating-point representation:
+ //
+ // type precision
+ // IEEE single 24 b
+ // IEEE double 53
+ // x86 long double 64
+ // double-double 106
+ // IEEE quadruple 113
+ //
+ // Note in particular that a quadruple-precision float has greater precision
+ // than a double-double float despite taking up the same amount of memory; the
+ // quad has more of its bits allocated to the mantissa than the double-double
+ // has.
+ return std::numeric_limits<long double>::digits ==
+ 2 * std::numeric_limits<double>::digits;
+}
+
+} // namespace numeric_internal
+ABSL_NAMESPACE_END
+} // namespace absl
+
+#endif // ABSL_NUMERIC_INTERNAL_REPRESENTATION_H_
diff --git a/third_party/abseil-cpp/absl/random/BUILD.bazel b/third_party/abseil-cpp/absl/random/BUILD.bazel
index d97b2c4..66ffcbc 100644
--- a/third_party/abseil-cpp/absl/random/BUILD.bazel
+++ b/third_party/abseil-cpp/absl/random/BUILD.bazel
@@ -188,6 +188,7 @@
":distributions",
":random",
"//absl/base:raw_logging_internal",
+ "//absl/numeric:representation",
"//absl/random/internal:distribution_test_util",
"//absl/random/internal:pcg_engine",
"//absl/random/internal:sequence_urbg",
@@ -308,6 +309,7 @@
":random",
"//absl/base:core_headers",
"//absl/base:raw_logging_internal",
+ "//absl/numeric:representation",
"//absl/random/internal:distribution_test_util",
"//absl/random/internal:pcg_engine",
"//absl/random/internal:sequence_urbg",
@@ -331,6 +333,7 @@
":random",
"//absl/base:core_headers",
"//absl/base:raw_logging_internal",
+ "//absl/numeric:representation",
"//absl/random/internal:distribution_test_util",
"//absl/random/internal:sequence_urbg",
"//absl/strings",
@@ -377,6 +380,7 @@
":distributions",
":random",
"//absl/base:raw_logging_internal",
+ "//absl/numeric:representation",
"//absl/random/internal:distribution_test_util",
"//absl/random/internal:pcg_engine",
"//absl/random/internal:sequence_urbg",
diff --git a/third_party/abseil-cpp/absl/random/CMakeLists.txt b/third_party/abseil-cpp/absl/random/CMakeLists.txt
index 13093d6..3009a03 100644
--- a/third_party/abseil-cpp/absl/random/CMakeLists.txt
+++ b/third_party/abseil-cpp/absl/random/CMakeLists.txt
@@ -259,6 +259,7 @@
LINKOPTS
${ABSL_DEFAULT_LINKOPTS}
DEPS
+ absl::numeric_representation
absl::random_distributions
absl::random_random
absl::random_internal_distribution_test_util
@@ -381,6 +382,7 @@
${ABSL_DEFAULT_LINKOPTS}
DEPS
absl::core_headers
+ absl::numeric_representation
absl::random_distributions
absl::random_internal_distribution_test_util
absl::random_internal_pcg_engine
@@ -404,6 +406,7 @@
${ABSL_DEFAULT_LINKOPTS}
DEPS
absl::core_headers
+ absl::numeric_representation
absl::random_distributions
absl::random_internal_distribution_test_util
absl::random_internal_sequence_urbg
@@ -446,6 +449,7 @@
LINKOPTS
${ABSL_DEFAULT_LINKOPTS}
DEPS
+ absl::numeric_representation
absl::random_distributions
absl::random_internal_distribution_test_util
absl::random_internal_pcg_engine
diff --git a/third_party/abseil-cpp/absl/random/beta_distribution_test.cc b/third_party/abseil-cpp/absl/random/beta_distribution_test.cc
index 277e4dc..44cdfdd 100644
--- a/third_party/abseil-cpp/absl/random/beta_distribution_test.cc
+++ b/third_party/abseil-cpp/absl/random/beta_distribution_test.cc
@@ -21,12 +21,14 @@
#include <random>
#include <sstream>
#include <string>
+#include <type_traits>
#include <unordered_map>
#include <vector>
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "absl/base/internal/raw_logging.h"
+#include "absl/numeric/internal/representation.h"
#include "absl/random/internal/chi_square.h"
#include "absl/random/internal/distribution_test_util.h"
#include "absl/random/internal/pcg_engine.h"
@@ -42,7 +44,15 @@
template <typename IntType>
class BetaDistributionInterfaceTest : public ::testing::Test {};
-using RealTypes = ::testing::Types<float, double, long double>;
+// double-double arithmetic is not supported well by either GCC or Clang; see
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99048,
+// https://bugs.llvm.org/show_bug.cgi?id=49131, and
+// https://bugs.llvm.org/show_bug.cgi?id=49132. Don't bother running these tests
+// with double doubles until compiler support is better.
+using RealTypes =
+ std::conditional<absl::numeric_internal::IsDoubleDouble(),
+ ::testing::Types<float, double>,
+ ::testing::Types<float, double, long double>>::type;
TYPED_TEST_CASE(BetaDistributionInterfaceTest, RealTypes);
TYPED_TEST(BetaDistributionInterfaceTest, SerializeTest) {
@@ -53,9 +63,6 @@
const TypeParam kLargeA =
std::exp(std::log((std::numeric_limits<TypeParam>::max)()) -
std::log(std::log((std::numeric_limits<TypeParam>::max)())));
- const TypeParam kLargeAPPC = std::exp(
- std::log((std::numeric_limits<TypeParam>::max)()) -
- std::log(std::log((std::numeric_limits<TypeParam>::max)())) - 10.0f);
using param_type = typename absl::beta_distribution<TypeParam>::param_type;
constexpr int kCount = 1000;
@@ -76,9 +83,6 @@
kLargeA, //
std::nextafter(kLargeA, TypeParam(0)), //
std::nextafter(kLargeA, std::numeric_limits<TypeParam>::max()),
- kLargeAPPC, //
- std::nextafter(kLargeAPPC, TypeParam(0)),
- std::nextafter(kLargeAPPC, std::numeric_limits<TypeParam>::max()),
// Boundary cases.
std::numeric_limits<TypeParam>::max(),
std::numeric_limits<TypeParam>::epsilon(),
@@ -125,28 +129,6 @@
ss >> after;
-#if defined(__powerpc64__) || defined(__PPC64__) || defined(__powerpc__) || \
- defined(__ppc__) || defined(__PPC__)
- if (std::is_same<TypeParam, long double>::value) {
- // Roundtripping floating point values requires sufficient precision
- // to reconstruct the exact value. It turns out that long double
- // has some errors doing this on ppc.
- if (alpha <= std::numeric_limits<double>::max() &&
- alpha >= std::numeric_limits<double>::lowest()) {
- EXPECT_EQ(static_cast<double>(before.alpha()),
- static_cast<double>(after.alpha()))
- << ss.str();
- }
- if (beta <= std::numeric_limits<double>::max() &&
- beta >= std::numeric_limits<double>::lowest()) {
- EXPECT_EQ(static_cast<double>(before.beta()),
- static_cast<double>(after.beta()))
- << ss.str();
- }
- continue;
- }
-#endif
-
EXPECT_EQ(before.alpha(), after.alpha());
EXPECT_EQ(before.beta(), after.beta());
EXPECT_EQ(before, after) //
diff --git a/third_party/abseil-cpp/absl/random/exponential_distribution_test.cc b/third_party/abseil-cpp/absl/random/exponential_distribution_test.cc
index 5a8afde..af11d61 100644
--- a/third_party/abseil-cpp/absl/random/exponential_distribution_test.cc
+++ b/third_party/abseil-cpp/absl/random/exponential_distribution_test.cc
@@ -30,6 +30,7 @@
#include "gtest/gtest.h"
#include "absl/base/internal/raw_logging.h"
#include "absl/base/macros.h"
+#include "absl/numeric/internal/representation.h"
#include "absl/random/internal/chi_square.h"
#include "absl/random/internal/distribution_test_util.h"
#include "absl/random/internal/pcg_engine.h"
@@ -47,7 +48,15 @@
template <typename RealType>
class ExponentialDistributionTypedTest : public ::testing::Test {};
-using RealTypes = ::testing::Types<float, double, long double>;
+// double-double arithmetic is not supported well by either GCC or Clang; see
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99048,
+// https://bugs.llvm.org/show_bug.cgi?id=49131, and
+// https://bugs.llvm.org/show_bug.cgi?id=49132. Don't bother running these tests
+// with double doubles until compiler support is better.
+using RealTypes =
+ std::conditional<absl::numeric_internal::IsDoubleDouble(),
+ ::testing::Types<float, double>,
+ ::testing::Types<float, double, long double>>::type;
TYPED_TEST_CASE(ExponentialDistributionTypedTest, RealTypes);
TYPED_TEST(ExponentialDistributionTypedTest, SerializeTest) {
@@ -126,23 +135,6 @@
ss >> after;
-#if defined(__powerpc64__) || defined(__PPC64__) || defined(__powerpc__) || \
- defined(__ppc__) || defined(__PPC__)
- if (std::is_same<TypeParam, long double>::value) {
- // Roundtripping floating point values requires sufficient precision to
- // reconstruct the exact value. It turns out that long double has some
- // errors doing this on ppc, particularly for values
- // near {1.0 +/- epsilon}.
- if (lambda <= std::numeric_limits<double>::max() &&
- lambda >= std::numeric_limits<double>::lowest()) {
- EXPECT_EQ(static_cast<double>(before.lambda()),
- static_cast<double>(after.lambda()))
- << ss.str();
- }
- continue;
- }
-#endif
-
EXPECT_EQ(before.lambda(), after.lambda()) //
<< ss.str() << " " //
<< (ss.good() ? "good " : "") //
diff --git a/third_party/abseil-cpp/absl/random/gaussian_distribution_test.cc b/third_party/abseil-cpp/absl/random/gaussian_distribution_test.cc
index 2aa7caf..c0bac2b 100644
--- a/third_party/abseil-cpp/absl/random/gaussian_distribution_test.cc
+++ b/third_party/abseil-cpp/absl/random/gaussian_distribution_test.cc
@@ -21,12 +21,14 @@
#include <iterator>
#include <random>
#include <string>
+#include <type_traits>
#include <vector>
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "absl/base/internal/raw_logging.h"
#include "absl/base/macros.h"
+#include "absl/numeric/internal/representation.h"
#include "absl/random/internal/chi_square.h"
#include "absl/random/internal/distribution_test_util.h"
#include "absl/random/internal/sequence_urbg.h"
@@ -43,7 +45,15 @@
template <typename RealType>
class GaussianDistributionInterfaceTest : public ::testing::Test {};
-using RealTypes = ::testing::Types<float, double, long double>;
+// double-double arithmetic is not supported well by either GCC or Clang; see
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99048,
+// https://bugs.llvm.org/show_bug.cgi?id=49131, and
+// https://bugs.llvm.org/show_bug.cgi?id=49132. Don't bother running these tests
+// with double doubles until compiler support is better.
+using RealTypes =
+ std::conditional<absl::numeric_internal::IsDoubleDouble(),
+ ::testing::Types<float, double>,
+ ::testing::Types<float, double, long double>>::type;
TYPED_TEST_CASE(GaussianDistributionInterfaceTest, RealTypes);
TYPED_TEST(GaussianDistributionInterfaceTest, SerializeTest) {
@@ -129,29 +139,6 @@
ss >> after;
-#if defined(__powerpc64__) || defined(__PPC64__) || defined(__powerpc__) || \
- defined(__ppc__) || defined(__PPC__)
- if (std::is_same<TypeParam, long double>::value) {
- // Roundtripping floating point values requires sufficient precision
- // to reconstruct the exact value. It turns out that long double
- // has some errors doing this on ppc, particularly for values
- // near {1.0 +/- epsilon}.
- if (mean <= std::numeric_limits<double>::max() &&
- mean >= std::numeric_limits<double>::lowest()) {
- EXPECT_EQ(static_cast<double>(before.mean()),
- static_cast<double>(after.mean()))
- << ss.str();
- }
- if (stddev <= std::numeric_limits<double>::max() &&
- stddev >= std::numeric_limits<double>::lowest()) {
- EXPECT_EQ(static_cast<double>(before.stddev()),
- static_cast<double>(after.stddev()))
- << ss.str();
- }
- continue;
- }
-#endif
-
EXPECT_EQ(before.mean(), after.mean());
EXPECT_EQ(before.stddev(), after.stddev()) //
<< ss.str() << " " //
diff --git a/third_party/abseil-cpp/absl/random/uniform_real_distribution_test.cc b/third_party/abseil-cpp/absl/random/uniform_real_distribution_test.cc
index 8cf874d..18bcd3b 100644
--- a/third_party/abseil-cpp/absl/random/uniform_real_distribution_test.cc
+++ b/third_party/abseil-cpp/absl/random/uniform_real_distribution_test.cc
@@ -20,11 +20,13 @@
#include <random>
#include <sstream>
#include <string>
+#include <type_traits>
#include <vector>
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "absl/base/internal/raw_logging.h"
+#include "absl/numeric/internal/representation.h"
#include "absl/random/internal/chi_square.h"
#include "absl/random/internal/distribution_test_util.h"
#include "absl/random/internal/pcg_engine.h"
@@ -55,7 +57,15 @@
template <typename RealType>
class UniformRealDistributionTest : public ::testing::Test {};
-using RealTypes = ::testing::Types<float, double, long double>;
+// double-double arithmetic is not supported well by either GCC or Clang; see
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99048,
+// https://bugs.llvm.org/show_bug.cgi?id=49131, and
+// https://bugs.llvm.org/show_bug.cgi?id=49132. Don't bother running these tests
+// with double doubles until compiler support is better.
+using RealTypes =
+ std::conditional<absl::numeric_internal::IsDoubleDouble(),
+ ::testing::Types<float, double>,
+ ::testing::Types<float, double, long double>>::type;
TYPED_TEST_SUITE(UniformRealDistributionTest, RealTypes);
diff --git a/third_party/abseil-cpp/absl/strings/BUILD.bazel b/third_party/abseil-cpp/absl/strings/BUILD.bazel
index 5efaf89..123b5ef 100644
--- a/third_party/abseil-cpp/absl/strings/BUILD.bazel
+++ b/third_party/abseil-cpp/absl/strings/BUILD.bazel
@@ -709,6 +709,7 @@
"//absl/meta:type_traits",
"//absl/numeric:bits",
"//absl/numeric:int128",
+ "//absl/numeric:representation",
"//absl/types:optional",
"//absl/types:span",
],
diff --git a/third_party/abseil-cpp/absl/strings/BUILD.gn b/third_party/abseil-cpp/absl/strings/BUILD.gn
index d9d2769..404cc03 100644
--- a/third_party/abseil-cpp/absl/strings/BUILD.gn
+++ b/third_party/abseil-cpp/absl/strings/BUILD.gn
@@ -111,6 +111,7 @@
"//third_party/abseil-cpp/absl/meta:type_traits",
"//third_party/abseil-cpp/absl/numeric:bits",
"//third_party/abseil-cpp/absl/numeric:int128",
+ "//third_party/abseil-cpp/absl/numeric:representation",
"//third_party/abseil-cpp/absl/types:optional",
"//third_party/abseil-cpp/absl/types:span",
]
diff --git a/third_party/abseil-cpp/absl/strings/CMakeLists.txt b/third_party/abseil-cpp/absl/strings/CMakeLists.txt
index 12f322a..3b7ae63 100644
--- a/third_party/abseil-cpp/absl/strings/CMakeLists.txt
+++ b/third_party/abseil-cpp/absl/strings/CMakeLists.txt
@@ -410,6 +410,7 @@
absl::strings
absl::config
absl::core_headers
+ absl::numeric_representation
absl::type_traits
absl::int128
absl::span
diff --git a/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc b/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc
index 2b1fd8c..b1c4068 100644
--- a/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc
+++ b/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc
@@ -29,6 +29,7 @@
#include "absl/meta/type_traits.h"
#include "absl/numeric/bits.h"
#include "absl/numeric/int128.h"
+#include "absl/numeric/internal/representation.h"
#include "absl/strings/numbers.h"
#include "absl/types/optional.h"
#include "absl/types/span.h"
@@ -39,6 +40,8 @@
namespace {
+using ::absl::numeric_internal::IsDoubleDouble;
+
// The code below wants to avoid heap allocations.
// To do so it needs to allocate memory on the stack.
// `StackArray` will allocate memory on the stack in the form of a uint32_t
@@ -112,13 +115,6 @@
return next_carry % divisor;
}
-constexpr bool IsDoubleDouble() {
- // This is the `double-double` representation of `long double`.
- // We do not handle it natively. Fallback to snprintf.
- return std::numeric_limits<long double>::digits ==
- 2 * std::numeric_limits<double>::digits;
-}
-
using MaxFloatType =
typename std::conditional<IsDoubleDouble(), double, long double>::type;
@@ -1404,6 +1400,8 @@
bool ConvertFloatImpl(long double v, const FormatConversionSpecImpl &conv,
FormatSinkImpl *sink) {
if (IsDoubleDouble()) {
+ // This is the `double-double` representation of `long double`. We do not
+ // handle it natively. Fallback to snprintf.
return FallbackToSnprintf(v, conv, sink);
}
diff --git a/third_party/vulkan-deps/glslang/src/SPIRV/GlslangToSpv.cpp b/third_party/vulkan-deps/glslang/src/SPIRV/GlslangToSpv.cpp
index 6d9c7cf..8eb06b7 100644
--- a/third_party/vulkan-deps/glslang/src/SPIRV/GlslangToSpv.cpp
+++ b/third_party/vulkan-deps/glslang/src/SPIRV/GlslangToSpv.cpp
@@ -2784,7 +2784,6 @@
break;
case glslang::EOpAtomicAdd:
- case glslang::EOpAtomicSubtract:
case glslang::EOpAtomicMin:
case glslang::EOpAtomicMax:
case glslang::EOpAtomicAnd:
@@ -2956,7 +2955,6 @@
break;
case glslang::EOpAtomicAdd:
- case glslang::EOpAtomicSubtract:
case glslang::EOpAtomicMin:
case glslang::EOpAtomicMax:
case glslang::EOpAtomicAnd:
@@ -6896,7 +6894,6 @@
builder.addCapability(spv::CapabilityAtomicFloat64AddEXT);
}
break;
- case glslang::EOpAtomicSubtract:
case glslang::EOpAtomicCounterSubtract:
opCode = spv::OpAtomicISub;
break;
diff --git a/third_party/vulkan-deps/glslang/src/StandAlone/StandAlone.cpp b/third_party/vulkan-deps/glslang/src/StandAlone/StandAlone.cpp
index 923ded3..fdbf027 100644
--- a/third_party/vulkan-deps/glslang/src/StandAlone/StandAlone.cpp
+++ b/third_party/vulkan-deps/glslang/src/StandAlone/StandAlone.cpp
@@ -110,7 +110,6 @@
bool NaNClamp = false;
bool stripDebugInfo = false;
bool beQuiet = false;
-bool VulkanRulesRelaxed = false;
//
// Return codes from main/exit().
@@ -196,17 +195,6 @@
std::array<std::array<TPerSetBaseBinding, EShLangCount>, glslang::EResCount> baseBindingForSet;
std::array<std::vector<std::string>, EShLangCount> baseResourceSetBinding;
-std::vector<std::pair<std::string, glslang::TBlockStorageClass>> blockStorageOverrides;
-
-bool setGlobalUniformBlock = false;
-std::string globalUniformName;
-unsigned int globalUniformBinding;
-unsigned int globalUniformSet;
-
-bool setGlobalBufferBlock = false;
-std::string atomicCounterBlockName;
-unsigned int atomicCounterBlockSet;
-
// Add things like "#define ..." to a preamble to use in the beginning of the shader.
class TPreamble {
public:
@@ -409,115 +397,6 @@
}
//
-// Process an optional binding base of one the forms:
-// --argname name {uniform|buffer|push_constant}
-void ProcessBlockStorage(int& argc, char**& argv, std::vector<std::pair<std::string, glslang::TBlockStorageClass>>& storage)
-{
- if (argc < 3)
- usage();
-
- glslang::TBlockStorageClass blockStorage = glslang::EbsNone;
-
- std::string strBacking(argv[2]);
- if (strBacking == "uniform")
- blockStorage = glslang::EbsUniform;
- else if (strBacking == "buffer")
- blockStorage = glslang::EbsStorageBuffer;
- else if (strBacking == "push_constant")
- blockStorage = glslang::EbsPushConstant;
- else {
- printf("%s: invalid block storage\n", strBacking.c_str());
- usage();
- }
-
- storage.push_back(std::make_pair(std::string(argv[1]), blockStorage));
-
- argc -= 2;
- argv += 2;
-}
-
-inline bool isNonDigit(char c) {
- // a non-digit character valid in a glsl identifier
- return (c == '_') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
-}
-
-// whether string isa valid identifier to be used in glsl
-bool isValidIdentifier(const char* str) {
- std::string idn(str);
-
- if (idn.length() == 0) {
- return false;
- }
-
- if (idn.length() >= 3 && idn.substr(0, 3) == "gl_") {
- // identifiers startin with "gl_" are reserved
- return false;
- }
-
- if (!isNonDigit(idn[0])) {
- return false;
- }
-
- for (unsigned int i = 1; i < idn.length(); ++i) {
- if (!(isdigit(idn[i]) || isNonDigit(idn[i]))) {
- return false;
- }
- }
-
- return true;
-}
-
-// Process settings for either the global buffer block or global unfirom block
-// of the form:
-// --argname name set binding
-void ProcessGlobalBlockSettings(int& argc, char**& argv, std::string* name, unsigned int* set, unsigned int* binding)
-{
- if (argc < 4)
- usage();
-
- unsigned int curArg = 1;
-
- assert(name || set || binding);
-
- if (name) {
- if (!isValidIdentifier(argv[curArg])) {
- printf("%s: invalid identifier\n", argv[curArg]);
- usage();
- }
- *name = argv[curArg];
-
- curArg++;
- }
-
- if (set) {
- errno = 0;
- int setVal = ::strtol(argv[curArg], NULL, 10);
- if (errno || setVal < 0) {
- printf("%s: invalid set\n", argv[curArg]);
- usage();
- }
- *set = setVal;
-
- curArg++;
- }
-
- if (binding) {
- errno = 0;
- int bindingVal = ::strtol(argv[curArg], NULL, 10);
- if (errno || bindingVal < 0) {
- printf("%s: invalid binding\n", argv[curArg]);
- usage();
- }
- *binding = bindingVal;
-
- curArg++;
- }
-
- argc -= (curArg - 1);
- argv += (curArg - 1);
-}
-
-//
// Do all command-line argument parsing. This includes building up the work-items
// to be processed later, and saving all the command-line options.
//
@@ -690,17 +569,6 @@
lowerword == "resource-set-binding" ||
lowerword == "rsb") {
ProcessResourceSetBindingBase(argc, argv, baseResourceSetBinding);
- } else if (lowerword == "set-block-storage" ||
- lowerword == "sbs") {
- ProcessBlockStorage(argc, argv, blockStorageOverrides);
- } else if (lowerword == "set-atomic-counter-block" ||
- lowerword == "sacb") {
- ProcessGlobalBlockSettings(argc, argv, &atomicCounterBlockName, &atomicCounterBlockSet, nullptr);
- setGlobalBufferBlock = true;
- } else if (lowerword == "set-default-uniform-block" ||
- lowerword == "sdub") {
- ProcessGlobalBlockSettings(argc, argv, &globalUniformName, &globalUniformSet, &globalUniformBinding);
- setGlobalUniformBlock = true;
} else if (lowerword == "shift-image-bindings" || // synonyms
lowerword == "shift-image-binding" ||
lowerword == "sib") {
@@ -853,9 +721,6 @@
else
Error("unknown -O option");
break;
- case 'R':
- VulkanRulesRelaxed = true;
- break;
case 'S':
if (argc <= 1)
Error("no <stage> specified for -S");
@@ -1203,24 +1068,6 @@
shader->setUniformLocationBase(uniformBase);
#endif
- if (VulkanRulesRelaxed) {
- for (auto& storageOverride : blockStorageOverrides) {
- shader->addBlockStorageOverride(storageOverride.first.c_str(),
- storageOverride.second);
- }
-
- if (setGlobalBufferBlock) {
- shader->setAtomicCounterBlockName(atomicCounterBlockName.c_str());
- shader->setAtomicCounterBlockSet(atomicCounterBlockSet);
- }
-
- if (setGlobalUniformBlock) {
- shader->setGlobalUniformBlockName(globalUniformName.c_str());
- shader->setGlobalUniformSet(globalUniformSet);
- shader->setGlobalUniformBinding(globalUniformBinding);
- }
- }
-
shader->setNanMinMaxClamp(NaNClamp);
#ifdef ENABLE_HLSL
@@ -1244,8 +1091,6 @@
if (targetHlslFunctionality1)
shader->setEnvTargetHlslFunctionality1();
#endif
- if (VulkanRulesRelaxed)
- shader->setEnvInputVulkanRulesRelaxed();
}
shaders.push_back(shader);
@@ -1727,9 +1572,6 @@
" is searched first, followed by left-to-right order of -I\n"
" -Od disables optimization; may cause illegal SPIR-V for HLSL\n"
" -Os optimizes SPIR-V to minimize size\n"
- " -R use relaxed verification rules for generating Vulkan SPIR-V,\n"
- " allowing the use of default uniforms, atomic_uints, and\n"
- " gl_VertexID and gl_InstanceID keywords.\n"
" -S <stage> uses specified stage rather than parsing the file extension\n"
" choices for <stage> are vert, tesc, tese, geom, frag, or comp\n"
" -U<name> | --undef-macro <name> | --U <name>\n"
@@ -1807,22 +1649,6 @@
" --resource-set-binding [stage] set\n"
" set descriptor set for all resources\n"
" --rsb synonym for --resource-set-binding\n"
- " --set-block-backing name {uniform|buffer|push_constant}\n"
- " changes the backing type of a uniform, buffer,\n"
- " or push_constant block declared in\n"
- " in the program, when using -R option.\n"
- " This can be used to change the backing\n"
- " for existing blocks as well as implicit ones\n"
- " such as 'gl_DefaultUniformBlock'.\n"
- " --sbs synonym for set-block-storage\n"
- " --set-atomic-counter-block name set\n"
- " set name, and descriptor set for\n"
- " atomic counter blocks, with -R opt\n"
- " --sacb synonym for set-atomic-counter-block\n"
- " --set-default-uniform-block name set binding\n"
- " set name, descriptor set, and binding for\n"
- " global default-uniform-block, with -R opt\n"
- " --sdub synonym for set-default-uniform-block\n"
" --shift-image-binding [stage] num\n"
" base binding number for images (uav)\n"
" --shift-image-binding [stage] [num set]...\n"
diff --git a/third_party/vulkan-deps/glslang/src/Test/baseResults/iomap.crossStage.2.vert.out b/third_party/vulkan-deps/glslang/src/Test/baseResults/iomap.crossStage.2.vert.out
deleted file mode 100644
index 325c1b4..0000000
--- a/third_party/vulkan-deps/glslang/src/Test/baseResults/iomap.crossStage.2.vert.out
+++ /dev/null
@@ -1,787 +0,0 @@
-iomap.crossStage.2.vert
-Shader version: 460
-0:? Sequence
-0:32 Function Definition: main( ( global void)
-0:32 Function Parameters:
-0:34 Sequence
-0:34 move second child to first child ( temp 4-component vector of float)
-0:34 'vgo1' ( smooth out 4-component vector of float)
-0:34 Constant:
-0:34 0.000000
-0:34 0.000000
-0:34 0.000000
-0:34 0.000000
-0:35 move second child to first child ( temp 2-component vector of float)
-0:35 'vgo2' ( smooth out 2-component vector of float)
-0:35 Constant:
-0:35 0.000000
-0:35 0.000000
-0:36 move second child to first child ( temp 4-component vector of float)
-0:36 o3: direct index for structure ( out 4-component vector of float)
-0:36 'anon@0' (layout( location=5) out block{ out 4-component vector of float o3})
-0:36 Constant:
-0:36 0 (const uint)
-0:36 Constant:
-0:36 0.000000
-0:36 0.000000
-0:36 0.000000
-0:36 0.000000
-0:? Linker Objects
-0:? 'vgo1' ( smooth out 4-component vector of float)
-0:? 'vgo2' ( smooth out 2-component vector of float)
-0:? 'anon@0' (layout( location=5) out block{ out 4-component vector of float o3})
-0:? 'u1' ( uniform 2-component vector of float)
-0:? 'u2' ( uniform 3-component vector of float)
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 'u3' ( uniform 4-component vector of float)
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 'um2' ( uniform 2X2 matrix of float)
-0:? 4.000000
-0:? 0.000000
-0:? 0.000000
-0:? 4.000000
-0:? 'glass' (layout( location=0 binding=0) uniform sampler2D)
-0:? 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 4-component vector of float b})
-0:? 'anon@2' (layout( column_major std430) buffer block{layout( column_major std430) buffer 2-component vector of float vb1})
-0:? 'blockName1' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b})
-0:? 'gl_VertexID' ( gl_VertexId int VertexId)
-0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
-
-iomap.crossStage.2.geom
-Shader version: 460
-invocations = -1
-max_vertices = 3
-input primitive = points
-output primitive = triangle_strip
-0:? Sequence
-0:29 Function Definition: main( ( global void)
-0:29 Function Parameters:
-0:31 Sequence
-0:31 Sequence
-0:31 Sequence
-0:31 move second child to first child ( temp int)
-0:31 'i' ( temp int)
-0:31 Constant:
-0:31 0 (const int)
-0:31 Loop with condition tested first
-0:31 Loop Condition
-0:31 Compare Less Than ( temp bool)
-0:31 'i' ( temp int)
-0:31 Constant:
-0:31 3 (const int)
-0:31 Loop Body
-0:32 Sequence
-0:32 move second child to first child ( temp 4-component vector of float)
-0:32 'gfo1' (layout( stream=0) out 4-component vector of float)
-0:32 Constant:
-0:32 0.000000
-0:32 0.000000
-0:32 0.000000
-0:32 0.000000
-0:33 move second child to first child ( temp 2-component vector of float)
-0:33 'gfo2' (layout( stream=0) out 2-component vector of float)
-0:33 Constant:
-0:33 0.000000
-0:33 0.000000
-0:34 move second child to first child ( temp 4-component vector of float)
-0:34 o3: direct index for structure (layout( stream=0) out 4-component vector of float)
-0:34 'gf_out' (layout( location=5 stream=0) out block{layout( stream=0) out 4-component vector of float o3})
-0:34 Constant:
-0:34 0 (const int)
-0:34 o3: direct index for structure ( in 4-component vector of float)
-0:34 indirect index (layout( location=5) temp block{ in 4-component vector of float o3})
-0:34 'inBlock' (layout( location=5) in 1-element array of block{ in 4-component vector of float o3})
-0:34 'i' ( temp int)
-0:34 Constant:
-0:34 0 (const int)
-0:35 EmitVertex ( global void)
-0:31 Loop Terminal Expression
-0:31 Post-Increment ( temp int)
-0:31 'i' ( temp int)
-0:37 EndPrimitive ( global void)
-0:? Linker Objects
-0:? 'vgo1' ( in 1-element array of 4-component vector of float)
-0:? 'vgo2' ( in 1-element array of 2-component vector of float)
-0:? 'inBlock' (layout( location=5) in 1-element array of block{ in 4-component vector of float o3})
-0:? 'gfo1' (layout( stream=0) out 4-component vector of float)
-0:? 'gfo2' (layout( stream=0) out 2-component vector of float)
-0:? 'gf_out' (layout( location=5 stream=0) out block{layout( stream=0) out 4-component vector of float o3})
-0:? 'u1' ( uniform 2-component vector of float)
-0:? 'u2' ( uniform 3-component vector of float)
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 'u3' ( uniform 4-component vector of float)
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 'blockName1' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b})
-
-iomap.crossStage.2.frag
-Shader version: 460
-0:? Sequence
-0:37 Function Definition: main( ( global void)
-0:37 Function Parameters:
-0:39 Sequence
-0:39 Sequence
-0:39 move second child to first child ( temp 4-component vector of float)
-0:39 'color' ( temp 4-component vector of float)
-0:39 component-wise multiply ( temp 4-component vector of float)
-0:39 component-wise multiply ( temp 4-component vector of float)
-0:39 component-wise multiply ( temp 4-component vector of float)
-0:39 'gfo1' ( smooth in 4-component vector of float)
-0:39 vector swizzle ( temp 4-component vector of float)
-0:39 'u1' ( uniform 2-component vector of float)
-0:39 Sequence
-0:39 Constant:
-0:39 0 (const int)
-0:39 Constant:
-0:39 1 (const int)
-0:39 Constant:
-0:39 0 (const int)
-0:39 Constant:
-0:39 1 (const int)
-0:39 vector swizzle ( temp 4-component vector of float)
-0:39 'u2' ( uniform 3-component vector of float)
-0:39 Sequence
-0:39 Constant:
-0:39 0 (const int)
-0:39 Constant:
-0:39 1 (const int)
-0:39 Constant:
-0:39 2 (const int)
-0:39 Constant:
-0:39 0 (const int)
-0:39 vector swizzle ( temp 4-component vector of float)
-0:39 'u3' ( uniform 4-component vector of float)
-0:39 0.000000
-0:39 0.000000
-0:39 0.000000
-0:39 0.000000
-0:39 Sequence
-0:39 Constant:
-0:39 0 (const int)
-0:39 Constant:
-0:39 1 (const int)
-0:39 Constant:
-0:39 2 (const int)
-0:39 Constant:
-0:39 3 (const int)
-0:40 move second child to first child ( temp 4-component vector of float)
-0:40 'outColor' ( out 4-component vector of float)
-0:40 'color' ( temp 4-component vector of float)
-0:? Linker Objects
-0:? 'anon@0' (layout( location=5) in block{ in 4-component vector of float o3})
-0:? 'gfo1' ( smooth in 4-component vector of float)
-0:? 'gfo2' ( smooth in 2-component vector of float)
-0:? 'outColor' ( out 4-component vector of float)
-0:? 'u1' ( uniform 2-component vector of float)
-0:? 'u2' ( uniform 3-component vector of float)
-0:? 'u3' ( uniform 4-component vector of float)
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 'um2' ( uniform 2X2 matrix of float)
-0:? 4.000000
-0:? 0.000000
-0:? 0.000000
-0:? 4.000000
-0:? 'glass' (layout( location=0 binding=0) uniform sampler2D)
-0:? 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 4-component vector of float b})
-0:? 'anon@2' (layout( column_major std430) buffer block{layout( column_major std430) buffer 2-component vector of float fb1})
-0:? 'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b})
-
-
-Linked vertex stage:
-
-
-Linked geometry stage:
-
-
-Linked fragment stage:
-
-WARNING: Linking unknown stage stage: Matched shader interfaces are using different instance names.
- blockName1: "layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b}" versus blockName2: "layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b}"
-
-Shader version: 460
-0:? Sequence
-0:32 Function Definition: main( ( global void)
-0:32 Function Parameters:
-0:34 Sequence
-0:34 move second child to first child ( temp 4-component vector of float)
-0:34 'vgo1' ( smooth out 4-component vector of float)
-0:34 Constant:
-0:34 0.000000
-0:34 0.000000
-0:34 0.000000
-0:34 0.000000
-0:35 move second child to first child ( temp 2-component vector of float)
-0:35 'vgo2' ( smooth out 2-component vector of float)
-0:35 Constant:
-0:35 0.000000
-0:35 0.000000
-0:36 move second child to first child ( temp 4-component vector of float)
-0:36 o3: direct index for structure ( out 4-component vector of float)
-0:36 'anon@0' (layout( location=5) out block{ out 4-component vector of float o3})
-0:36 Constant:
-0:36 0 (const uint)
-0:36 Constant:
-0:36 0.000000
-0:36 0.000000
-0:36 0.000000
-0:36 0.000000
-0:? Linker Objects
-0:? 'vgo1' ( smooth out 4-component vector of float)
-0:? 'vgo2' ( smooth out 2-component vector of float)
-0:? 'anon@0' (layout( location=5) out block{ out 4-component vector of float o3})
-0:? 'u1' ( uniform 2-component vector of float)
-0:? 'u2' ( uniform 3-component vector of float)
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 'u3' ( uniform 4-component vector of float)
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 'um2' ( uniform 2X2 matrix of float)
-0:? 4.000000
-0:? 0.000000
-0:? 0.000000
-0:? 4.000000
-0:? 'glass' (layout( location=0 binding=0) uniform sampler2D)
-0:? 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 4-component vector of float b})
-0:? 'anon@2' (layout( column_major std430) buffer block{layout( column_major std430) buffer 2-component vector of float vb1})
-0:? 'blockName1' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b})
-0:? 'gl_VertexID' ( gl_VertexId int VertexId)
-0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
-Shader version: 460
-invocations = 1
-max_vertices = 3
-input primitive = points
-output primitive = triangle_strip
-0:? Sequence
-0:29 Function Definition: main( ( global void)
-0:29 Function Parameters:
-0:31 Sequence
-0:31 Sequence
-0:31 Sequence
-0:31 move second child to first child ( temp int)
-0:31 'i' ( temp int)
-0:31 Constant:
-0:31 0 (const int)
-0:31 Loop with condition tested first
-0:31 Loop Condition
-0:31 Compare Less Than ( temp bool)
-0:31 'i' ( temp int)
-0:31 Constant:
-0:31 3 (const int)
-0:31 Loop Body
-0:32 Sequence
-0:32 move second child to first child ( temp 4-component vector of float)
-0:32 'gfo1' (layout( stream=0) out 4-component vector of float)
-0:32 Constant:
-0:32 0.000000
-0:32 0.000000
-0:32 0.000000
-0:32 0.000000
-0:33 move second child to first child ( temp 2-component vector of float)
-0:33 'gfo2' (layout( stream=0) out 2-component vector of float)
-0:33 Constant:
-0:33 0.000000
-0:33 0.000000
-0:34 move second child to first child ( temp 4-component vector of float)
-0:34 o3: direct index for structure (layout( stream=0) out 4-component vector of float)
-0:34 'gf_out' (layout( location=5 stream=0) out block{layout( stream=0) out 4-component vector of float o3})
-0:34 Constant:
-0:34 0 (const int)
-0:34 o3: direct index for structure ( in 4-component vector of float)
-0:34 indirect index (layout( location=5) temp block{ in 4-component vector of float o3})
-0:34 'inBlock' (layout( location=5) in 1-element array of block{ in 4-component vector of float o3})
-0:34 'i' ( temp int)
-0:34 Constant:
-0:34 0 (const int)
-0:35 EmitVertex ( global void)
-0:31 Loop Terminal Expression
-0:31 Post-Increment ( temp int)
-0:31 'i' ( temp int)
-0:37 EndPrimitive ( global void)
-0:? Linker Objects
-0:? 'vgo1' ( in 1-element array of 4-component vector of float)
-0:? 'vgo2' ( in 1-element array of 2-component vector of float)
-0:? 'inBlock' (layout( location=5) in 1-element array of block{ in 4-component vector of float o3})
-0:? 'gfo1' (layout( stream=0) out 4-component vector of float)
-0:? 'gfo2' (layout( stream=0) out 2-component vector of float)
-0:? 'gf_out' (layout( location=5 stream=0) out block{layout( stream=0) out 4-component vector of float o3})
-0:? 'u1' ( uniform 2-component vector of float)
-0:? 'u2' ( uniform 3-component vector of float)
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 'u3' ( uniform 4-component vector of float)
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 'blockName1' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b})
-Shader version: 460
-0:? Sequence
-0:37 Function Definition: main( ( global void)
-0:37 Function Parameters:
-0:39 Sequence
-0:39 Sequence
-0:39 move second child to first child ( temp 4-component vector of float)
-0:39 'color' ( temp 4-component vector of float)
-0:39 component-wise multiply ( temp 4-component vector of float)
-0:39 component-wise multiply ( temp 4-component vector of float)
-0:39 component-wise multiply ( temp 4-component vector of float)
-0:39 'gfo1' ( smooth in 4-component vector of float)
-0:39 vector swizzle ( temp 4-component vector of float)
-0:39 'u1' ( uniform 2-component vector of float)
-0:39 Sequence
-0:39 Constant:
-0:39 0 (const int)
-0:39 Constant:
-0:39 1 (const int)
-0:39 Constant:
-0:39 0 (const int)
-0:39 Constant:
-0:39 1 (const int)
-0:39 vector swizzle ( temp 4-component vector of float)
-0:39 'u2' ( uniform 3-component vector of float)
-0:39 Sequence
-0:39 Constant:
-0:39 0 (const int)
-0:39 Constant:
-0:39 1 (const int)
-0:39 Constant:
-0:39 2 (const int)
-0:39 Constant:
-0:39 0 (const int)
-0:39 vector swizzle ( temp 4-component vector of float)
-0:39 'u3' ( uniform 4-component vector of float)
-0:39 0.000000
-0:39 0.000000
-0:39 0.000000
-0:39 0.000000
-0:39 Sequence
-0:39 Constant:
-0:39 0 (const int)
-0:39 Constant:
-0:39 1 (const int)
-0:39 Constant:
-0:39 2 (const int)
-0:39 Constant:
-0:39 3 (const int)
-0:40 move second child to first child ( temp 4-component vector of float)
-0:40 'outColor' ( out 4-component vector of float)
-0:40 'color' ( temp 4-component vector of float)
-0:? Linker Objects
-0:? 'anon@0' (layout( location=5) in block{ in 4-component vector of float o3})
-0:? 'gfo1' ( smooth in 4-component vector of float)
-0:? 'gfo2' ( smooth in 2-component vector of float)
-0:? 'outColor' ( out 4-component vector of float)
-0:? 'u1' ( uniform 2-component vector of float)
-0:? 'u2' ( uniform 3-component vector of float)
-0:? 'u3' ( uniform 4-component vector of float)
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 'um2' ( uniform 2X2 matrix of float)
-0:? 4.000000
-0:? 0.000000
-0:? 0.000000
-0:? 4.000000
-0:? 'glass' (layout( location=0 binding=0) uniform sampler2D)
-0:? 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 4-component vector of float b})
-0:? 'anon@2' (layout( column_major std430) buffer block{layout( column_major std430) buffer 2-component vector of float fb1})
-0:? 'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b})
-
-// Module Version 10000
-// Generated by (magic number): 8000a
-// Id's are bound by 56
-
- Capability Shader
- 1: ExtInstImport "GLSL.std.450"
- MemoryModel Logical GLSL450
- EntryPoint Vertex 4 "main" 9 14 18 54 55
- Source GLSL 460
- Name 4 "main"
- Name 9 "vgo1"
- Name 14 "vgo2"
- Name 16 "outBlock"
- MemberName 16(outBlock) 0 "o3"
- Name 18 ""
- Name 23 "u1"
- Name 27 "u2"
- Name 29 "u3"
- Name 36 "um2"
- Name 40 "glass"
- Name 41 "crossStageBlock1"
- MemberName 41(crossStageBlock1) 0 "a"
- MemberName 41(crossStageBlock1) 1 "b"
- Name 43 ""
- Name 44 "vertOnlyBlock"
- MemberName 44(vertOnlyBlock) 0 "vb1"
- Name 46 ""
- Name 47 "crossStageBlock2"
- MemberName 47(crossStageBlock2) 0 "a"
- MemberName 47(crossStageBlock2) 1 "b"
- Name 52 "blockName1"
- Name 54 "gl_VertexID"
- Name 55 "gl_InstanceID"
- Decorate 9(vgo1) Location 0
- Decorate 14(vgo2) Location 1
- Decorate 16(outBlock) Block
- Decorate 18 Location 5
- Decorate 23(u1) Location 1
- Decorate 23(u1) DescriptorSet 0
- Decorate 27(u2) Location 2
- Decorate 27(u2) DescriptorSet 0
- Decorate 29(u3) Location 3
- Decorate 29(u3) DescriptorSet 0
- Decorate 36(um2) Location 4
- Decorate 36(um2) DescriptorSet 0
- Decorate 40(glass) Location 0
- Decorate 40(glass) DescriptorSet 0
- Decorate 40(glass) Binding 0
- MemberDecorate 41(crossStageBlock1) 0 Offset 0
- MemberDecorate 41(crossStageBlock1) 1 Offset 16
- Decorate 41(crossStageBlock1) Block
- Decorate 43 DescriptorSet 0
- Decorate 43 Binding 0
- MemberDecorate 44(vertOnlyBlock) 0 Offset 0
- Decorate 44(vertOnlyBlock) BufferBlock
- Decorate 46 DescriptorSet 0
- Decorate 46 Binding 0
- MemberDecorate 47(crossStageBlock2) 0 Offset 0
- MemberDecorate 47(crossStageBlock2) 1 Offset 16
- Decorate 47(crossStageBlock2) Block
- Decorate 52(blockName1) DescriptorSet 0
- Decorate 52(blockName1) Binding 0
- Decorate 54(gl_VertexID) BuiltIn VertexId
- Decorate 55(gl_InstanceID) BuiltIn InstanceId
- 2: TypeVoid
- 3: TypeFunction 2
- 6: TypeFloat 32
- 7: TypeVector 6(float) 4
- 8: TypePointer Output 7(fvec4)
- 9(vgo1): 8(ptr) Variable Output
- 10: 6(float) Constant 0
- 11: 7(fvec4) ConstantComposite 10 10 10 10
- 12: TypeVector 6(float) 2
- 13: TypePointer Output 12(fvec2)
- 14(vgo2): 13(ptr) Variable Output
- 15: 12(fvec2) ConstantComposite 10 10
- 16(outBlock): TypeStruct 7(fvec4)
- 17: TypePointer Output 16(outBlock)
- 18: 17(ptr) Variable Output
- 19: TypeInt 32 1
- 20: 19(int) Constant 0
- 22: TypePointer UniformConstant 12(fvec2)
- 23(u1): 22(ptr) Variable UniformConstant
- 24: TypeVector 6(float) 3
- 25: 24(fvec3) ConstantComposite 10 10 10
- 26: TypePointer UniformConstant 24(fvec3)
- 27(u2): 26(ptr) Variable UniformConstant 25
- 28: TypePointer UniformConstant 7(fvec4)
- 29(u3): 28(ptr) Variable UniformConstant 11
- 30: TypeMatrix 12(fvec2) 2
- 31: 6(float) Constant 1082130432
- 32: 12(fvec2) ConstantComposite 31 10
- 33: 12(fvec2) ConstantComposite 10 31
- 34: 30 ConstantComposite 32 33
- 35: TypePointer UniformConstant 30
- 36(um2): 35(ptr) Variable UniformConstant 34
- 37: TypeImage 6(float) 2D sampled format:Unknown
- 38: TypeSampledImage 37
- 39: TypePointer UniformConstant 38
- 40(glass): 39(ptr) Variable UniformConstant
-41(crossStageBlock1): TypeStruct 7(fvec4) 7(fvec4)
- 42: TypePointer Uniform 41(crossStageBlock1)
- 43: 42(ptr) Variable Uniform
-44(vertOnlyBlock): TypeStruct 12(fvec2)
- 45: TypePointer Uniform 44(vertOnlyBlock)
- 46: 45(ptr) Variable Uniform
-47(crossStageBlock2): TypeStruct 7(fvec4) 12(fvec2)
- 48: TypeInt 32 0
- 49: 48(int) Constant 2
- 50: TypeArray 47(crossStageBlock2) 49
- 51: TypePointer Uniform 50
- 52(blockName1): 51(ptr) Variable Uniform
- 53: TypePointer Input 19(int)
- 54(gl_VertexID): 53(ptr) Variable Input
-55(gl_InstanceID): 53(ptr) Variable Input
- 4(main): 2 Function None 3
- 5: Label
- Store 9(vgo1) 11
- Store 14(vgo2) 15
- 21: 8(ptr) AccessChain 18 20
- Store 21 11
- Return
- FunctionEnd
-// Module Version 10000
-// Generated by (magic number): 8000a
-// Id's are bound by 65
-
- Capability Geometry
- 1: ExtInstImport "GLSL.std.450"
- MemoryModel Logical GLSL450
- EntryPoint Geometry 4 "main" 22 27 31 37 48 51
- ExecutionMode 4 InputPoints
- ExecutionMode 4 Invocations 1
- ExecutionMode 4 OutputTriangleStrip
- ExecutionMode 4 OutputVertices 3
- Source GLSL 460
- Name 4 "main"
- Name 8 "i"
- Name 22 "gfo1"
- Name 27 "gfo2"
- Name 29 "outBlock"
- MemberName 29(outBlock) 0 "o3"
- Name 31 "gf_out"
- Name 32 "outBlock"
- MemberName 32(outBlock) 0 "o3"
- Name 37 "inBlock"
- Name 48 "vgo1"
- Name 51 "vgo2"
- Name 53 "u1"
- Name 57 "u2"
- Name 59 "u3"
- Name 60 "crossStageBlock2"
- MemberName 60(crossStageBlock2) 0 "a"
- MemberName 60(crossStageBlock2) 1 "b"
- Name 64 "blockName1"
- Decorate 22(gfo1) Location 0
- Decorate 27(gfo2) Location 1
- Decorate 29(outBlock) Block
- Decorate 31(gf_out) Location 5
- Decorate 32(outBlock) Block
- Decorate 37(inBlock) Location 5
- Decorate 48(vgo1) Location 0
- Decorate 51(vgo2) Location 1
- Decorate 53(u1) Location 1
- Decorate 53(u1) DescriptorSet 0
- Decorate 57(u2) Location 2
- Decorate 57(u2) DescriptorSet 0
- Decorate 59(u3) Location 3
- Decorate 59(u3) DescriptorSet 0
- MemberDecorate 60(crossStageBlock2) 0 Offset 0
- MemberDecorate 60(crossStageBlock2) 1 Offset 16
- Decorate 60(crossStageBlock2) Block
- Decorate 64(blockName1) DescriptorSet 0
- Decorate 64(blockName1) Binding 0
- 2: TypeVoid
- 3: TypeFunction 2
- 6: TypeInt 32 1
- 7: TypePointer Function 6(int)
- 9: 6(int) Constant 0
- 16: 6(int) Constant 3
- 17: TypeBool
- 19: TypeFloat 32
- 20: TypeVector 19(float) 4
- 21: TypePointer Output 20(fvec4)
- 22(gfo1): 21(ptr) Variable Output
- 23: 19(float) Constant 0
- 24: 20(fvec4) ConstantComposite 23 23 23 23
- 25: TypeVector 19(float) 2
- 26: TypePointer Output 25(fvec2)
- 27(gfo2): 26(ptr) Variable Output
- 28: 25(fvec2) ConstantComposite 23 23
- 29(outBlock): TypeStruct 20(fvec4)
- 30: TypePointer Output 29(outBlock)
- 31(gf_out): 30(ptr) Variable Output
- 32(outBlock): TypeStruct 20(fvec4)
- 33: TypeInt 32 0
- 34: 33(int) Constant 1
- 35: TypeArray 32(outBlock) 34
- 36: TypePointer Input 35
- 37(inBlock): 36(ptr) Variable Input
- 39: TypePointer Input 20(fvec4)
- 44: 6(int) Constant 1
- 46: TypeArray 20(fvec4) 34
- 47: TypePointer Input 46
- 48(vgo1): 47(ptr) Variable Input
- 49: TypeArray 25(fvec2) 34
- 50: TypePointer Input 49
- 51(vgo2): 50(ptr) Variable Input
- 52: TypePointer UniformConstant 25(fvec2)
- 53(u1): 52(ptr) Variable UniformConstant
- 54: TypeVector 19(float) 3
- 55: 54(fvec3) ConstantComposite 23 23 23
- 56: TypePointer UniformConstant 54(fvec3)
- 57(u2): 56(ptr) Variable UniformConstant 55
- 58: TypePointer UniformConstant 20(fvec4)
- 59(u3): 58(ptr) Variable UniformConstant 24
-60(crossStageBlock2): TypeStruct 20(fvec4) 25(fvec2)
- 61: 33(int) Constant 2
- 62: TypeArray 60(crossStageBlock2) 61
- 63: TypePointer Uniform 62
- 64(blockName1): 63(ptr) Variable Uniform
- 4(main): 2 Function None 3
- 5: Label
- 8(i): 7(ptr) Variable Function
- Store 8(i) 9
- Branch 10
- 10: Label
- LoopMerge 12 13 None
- Branch 14
- 14: Label
- 15: 6(int) Load 8(i)
- 18: 17(bool) SLessThan 15 16
- BranchConditional 18 11 12
- 11: Label
- Store 22(gfo1) 24
- Store 27(gfo2) 28
- 38: 6(int) Load 8(i)
- 40: 39(ptr) AccessChain 37(inBlock) 38 9
- 41: 20(fvec4) Load 40
- 42: 21(ptr) AccessChain 31(gf_out) 9
- Store 42 41
- EmitVertex
- Branch 13
- 13: Label
- 43: 6(int) Load 8(i)
- 45: 6(int) IAdd 43 44
- Store 8(i) 45
- Branch 10
- 12: Label
- EndPrimitive
- Return
- FunctionEnd
-// Module Version 10000
-// Generated by (magic number): 8000a
-// Id's are bound by 62
-
- Capability Shader
- 1: ExtInstImport "GLSL.std.450"
- MemoryModel Logical GLSL450
- EntryPoint Fragment 4 "main" 11 32 36 38
- ExecutionMode 4 OriginLowerLeft
- Source GLSL 460
- Name 4 "main"
- Name 9 "color"
- Name 11 "gfo1"
- Name 15 "u1"
- Name 21 "u2"
- Name 28 "u3"
- Name 32 "outColor"
- Name 34 "outBlock"
- MemberName 34(outBlock) 0 "o3"
- Name 36 ""
- Name 38 "gfo2"
- Name 45 "um2"
- Name 49 "glass"
- Name 50 "crossStageBlock1"
- MemberName 50(crossStageBlock1) 0 "a"
- MemberName 50(crossStageBlock1) 1 "b"
- Name 52 ""
- Name 53 "fragOnlyBlock"
- MemberName 53(fragOnlyBlock) 0 "fb1"
- Name 55 ""
- Name 56 "crossStageBlock2"
- MemberName 56(crossStageBlock2) 0 "a"
- MemberName 56(crossStageBlock2) 1 "b"
- Name 61 "blockName2"
- Decorate 11(gfo1) Location 0
- Decorate 15(u1) Location 1
- Decorate 15(u1) DescriptorSet 0
- Decorate 21(u2) Location 2
- Decorate 21(u2) DescriptorSet 0
- Decorate 28(u3) Location 3
- Decorate 28(u3) DescriptorSet 0
- Decorate 32(outColor) Location 0
- Decorate 34(outBlock) Block
- Decorate 36 Location 5
- Decorate 38(gfo2) Location 1
- Decorate 45(um2) Location 4
- Decorate 45(um2) DescriptorSet 0
- Decorate 49(glass) Location 0
- Decorate 49(glass) DescriptorSet 0
- Decorate 49(glass) Binding 0
- MemberDecorate 50(crossStageBlock1) 0 Offset 0
- MemberDecorate 50(crossStageBlock1) 1 Offset 16
- Decorate 50(crossStageBlock1) Block
- Decorate 52 DescriptorSet 0
- Decorate 52 Binding 0
- MemberDecorate 53(fragOnlyBlock) 0 Offset 0
- Decorate 53(fragOnlyBlock) BufferBlock
- Decorate 55 DescriptorSet 0
- Decorate 55 Binding 0
- MemberDecorate 56(crossStageBlock2) 0 Offset 0
- MemberDecorate 56(crossStageBlock2) 1 Offset 16
- Decorate 56(crossStageBlock2) Block
- Decorate 61(blockName2) DescriptorSet 0
- Decorate 61(blockName2) Binding 0
- 2: TypeVoid
- 3: TypeFunction 2
- 6: TypeFloat 32
- 7: TypeVector 6(float) 4
- 8: TypePointer Function 7(fvec4)
- 10: TypePointer Input 7(fvec4)
- 11(gfo1): 10(ptr) Variable Input
- 13: TypeVector 6(float) 2
- 14: TypePointer UniformConstant 13(fvec2)
- 15(u1): 14(ptr) Variable UniformConstant
- 19: TypeVector 6(float) 3
- 20: TypePointer UniformConstant 19(fvec3)
- 21(u2): 20(ptr) Variable UniformConstant
- 25: 6(float) Constant 0
- 26: 7(fvec4) ConstantComposite 25 25 25 25
- 27: TypePointer UniformConstant 7(fvec4)
- 28(u3): 27(ptr) Variable UniformConstant 26
- 31: TypePointer Output 7(fvec4)
- 32(outColor): 31(ptr) Variable Output
- 34(outBlock): TypeStruct 7(fvec4)
- 35: TypePointer Input 34(outBlock)
- 36: 35(ptr) Variable Input
- 37: TypePointer Input 13(fvec2)
- 38(gfo2): 37(ptr) Variable Input
- 39: TypeMatrix 13(fvec2) 2
- 40: 6(float) Constant 1082130432
- 41: 13(fvec2) ConstantComposite 40 25
- 42: 13(fvec2) ConstantComposite 25 40
- 43: 39 ConstantComposite 41 42
- 44: TypePointer UniformConstant 39
- 45(um2): 44(ptr) Variable UniformConstant 43
- 46: TypeImage 6(float) 2D sampled format:Unknown
- 47: TypeSampledImage 46
- 48: TypePointer UniformConstant 47
- 49(glass): 48(ptr) Variable UniformConstant
-50(crossStageBlock1): TypeStruct 7(fvec4) 7(fvec4)
- 51: TypePointer Uniform 50(crossStageBlock1)
- 52: 51(ptr) Variable Uniform
-53(fragOnlyBlock): TypeStruct 13(fvec2)
- 54: TypePointer Uniform 53(fragOnlyBlock)
- 55: 54(ptr) Variable Uniform
-56(crossStageBlock2): TypeStruct 7(fvec4) 13(fvec2)
- 57: TypeInt 32 0
- 58: 57(int) Constant 2
- 59: TypeArray 56(crossStageBlock2) 58
- 60: TypePointer Uniform 59
- 61(blockName2): 60(ptr) Variable Uniform
- 4(main): 2 Function None 3
- 5: Label
- 9(color): 8(ptr) Variable Function
- 12: 7(fvec4) Load 11(gfo1)
- 16: 13(fvec2) Load 15(u1)
- 17: 7(fvec4) VectorShuffle 16 16 0 1 0 1
- 18: 7(fvec4) FMul 12 17
- 22: 19(fvec3) Load 21(u2)
- 23: 7(fvec4) VectorShuffle 22 22 0 1 2 0
- 24: 7(fvec4) FMul 18 23
- 29: 7(fvec4) Load 28(u3)
- 30: 7(fvec4) FMul 24 29
- Store 9(color) 30
- 33: 7(fvec4) Load 9(color)
- Store 32(outColor) 33
- Return
- FunctionEnd
diff --git a/third_party/vulkan-deps/glslang/src/Test/baseResults/iomap.crossStage.vert.out b/third_party/vulkan-deps/glslang/src/Test/baseResults/iomap.crossStage.vert.out
deleted file mode 100644
index 5338b80..0000000
--- a/third_party/vulkan-deps/glslang/src/Test/baseResults/iomap.crossStage.vert.out
+++ /dev/null
@@ -1,515 +0,0 @@
-iomap.crossStage.vert
-Shader version: 460
-0:? Sequence
-0:32 Function Definition: main( ( global void)
-0:32 Function Parameters:
-0:34 Sequence
-0:34 move second child to first child ( temp 4-component vector of float)
-0:34 'o1' ( smooth out 4-component vector of float)
-0:34 Constant:
-0:34 0.000000
-0:34 0.000000
-0:34 0.000000
-0:34 0.000000
-0:35 move second child to first child ( temp 2-component vector of float)
-0:35 'o2' ( smooth out 2-component vector of float)
-0:35 Constant:
-0:35 0.000000
-0:35 0.000000
-0:36 move second child to first child ( temp 4-component vector of float)
-0:36 o3: direct index for structure ( out 4-component vector of float)
-0:36 'anon@0' (layout( location=5) out block{ out 4-component vector of float o3})
-0:36 Constant:
-0:36 0 (const uint)
-0:36 Constant:
-0:36 0.000000
-0:36 0.000000
-0:36 0.000000
-0:36 0.000000
-0:? Linker Objects
-0:? 'o1' ( smooth out 4-component vector of float)
-0:? 'o2' ( smooth out 2-component vector of float)
-0:? 'anon@0' (layout( location=5) out block{ out 4-component vector of float o3})
-0:? 'u1' ( uniform 2-component vector of float)
-0:? 'u2' ( uniform 3-component vector of float)
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 'u3' ( uniform 4-component vector of float)
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 'um2' ( uniform 2X2 matrix of float)
-0:? 4.000000
-0:? 0.000000
-0:? 0.000000
-0:? 4.000000
-0:? 'glass' (layout( location=0 binding=0) uniform sampler2D)
-0:? 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 4-component vector of float b})
-0:? 'anon@2' (layout( column_major std430) buffer block{layout( column_major std430) buffer 2-component vector of float vb1})
-0:? 'blockName1' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b})
-0:? 'gl_VertexID' ( gl_VertexId int VertexId)
-0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
-
-iomap.crossStage.frag
-Shader version: 460
-0:? Sequence
-0:36 Function Definition: main( ( global void)
-0:36 Function Parameters:
-0:38 Sequence
-0:38 Sequence
-0:38 move second child to first child ( temp 4-component vector of float)
-0:38 'color' ( temp 4-component vector of float)
-0:38 component-wise multiply ( temp 4-component vector of float)
-0:38 component-wise multiply ( temp 4-component vector of float)
-0:38 component-wise multiply ( temp 4-component vector of float)
-0:38 'o1' ( smooth in 4-component vector of float)
-0:38 vector swizzle ( temp 4-component vector of float)
-0:38 'u1' ( uniform 2-component vector of float)
-0:38 Sequence
-0:38 Constant:
-0:38 0 (const int)
-0:38 Constant:
-0:38 1 (const int)
-0:38 Constant:
-0:38 0 (const int)
-0:38 Constant:
-0:38 1 (const int)
-0:38 vector swizzle ( temp 4-component vector of float)
-0:38 'u2' ( uniform 3-component vector of float)
-0:38 Sequence
-0:38 Constant:
-0:38 0 (const int)
-0:38 Constant:
-0:38 1 (const int)
-0:38 Constant:
-0:38 2 (const int)
-0:38 Constant:
-0:38 0 (const int)
-0:38 vector swizzle ( temp 4-component vector of float)
-0:38 'u3' ( uniform 4-component vector of float)
-0:38 0.000000
-0:38 0.000000
-0:38 0.000000
-0:38 0.000000
-0:38 Sequence
-0:38 Constant:
-0:38 0 (const int)
-0:38 Constant:
-0:38 1 (const int)
-0:38 Constant:
-0:38 2 (const int)
-0:38 Constant:
-0:38 3 (const int)
-0:39 move second child to first child ( temp 4-component vector of float)
-0:39 'outColor' ( out 4-component vector of float)
-0:39 'color' ( temp 4-component vector of float)
-0:? Linker Objects
-0:? 'anon@0' (layout( location=5) in block{ in 4-component vector of float o3})
-0:? 'o2' ( smooth in 2-component vector of float)
-0:? 'o1' ( smooth in 4-component vector of float)
-0:? 'outColor' ( out 4-component vector of float)
-0:? 'u1' ( uniform 2-component vector of float)
-0:? 'u2' ( uniform 3-component vector of float)
-0:? 'u3' ( uniform 4-component vector of float)
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 'um2' ( uniform 2X2 matrix of float)
-0:? 4.000000
-0:? 0.000000
-0:? 0.000000
-0:? 4.000000
-0:? 'glass' (layout( location=0 binding=0) uniform sampler2D)
-0:? 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 4-component vector of float b})
-0:? 'anon@2' (layout( column_major std430) buffer block{layout( column_major std430) buffer 2-component vector of float fb1})
-0:? 'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b})
-
-
-Linked vertex stage:
-
-
-Linked fragment stage:
-
-WARNING: Linking unknown stage stage: Matched shader interfaces are using different instance names.
- blockName1: "layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b}" versus blockName2: "layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b}"
-
-Shader version: 460
-0:? Sequence
-0:32 Function Definition: main( ( global void)
-0:32 Function Parameters:
-0:34 Sequence
-0:34 move second child to first child ( temp 4-component vector of float)
-0:34 'o1' ( smooth out 4-component vector of float)
-0:34 Constant:
-0:34 0.000000
-0:34 0.000000
-0:34 0.000000
-0:34 0.000000
-0:35 move second child to first child ( temp 2-component vector of float)
-0:35 'o2' ( smooth out 2-component vector of float)
-0:35 Constant:
-0:35 0.000000
-0:35 0.000000
-0:36 move second child to first child ( temp 4-component vector of float)
-0:36 o3: direct index for structure ( out 4-component vector of float)
-0:36 'anon@0' (layout( location=5) out block{ out 4-component vector of float o3})
-0:36 Constant:
-0:36 0 (const uint)
-0:36 Constant:
-0:36 0.000000
-0:36 0.000000
-0:36 0.000000
-0:36 0.000000
-0:? Linker Objects
-0:? 'o1' ( smooth out 4-component vector of float)
-0:? 'o2' ( smooth out 2-component vector of float)
-0:? 'anon@0' (layout( location=5) out block{ out 4-component vector of float o3})
-0:? 'u1' ( uniform 2-component vector of float)
-0:? 'u2' ( uniform 3-component vector of float)
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 'u3' ( uniform 4-component vector of float)
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 'um2' ( uniform 2X2 matrix of float)
-0:? 4.000000
-0:? 0.000000
-0:? 0.000000
-0:? 4.000000
-0:? 'glass' (layout( location=0 binding=0) uniform sampler2D)
-0:? 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 4-component vector of float b})
-0:? 'anon@2' (layout( column_major std430) buffer block{layout( column_major std430) buffer 2-component vector of float vb1})
-0:? 'blockName1' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b})
-0:? 'gl_VertexID' ( gl_VertexId int VertexId)
-0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
-Shader version: 460
-0:? Sequence
-0:36 Function Definition: main( ( global void)
-0:36 Function Parameters:
-0:38 Sequence
-0:38 Sequence
-0:38 move second child to first child ( temp 4-component vector of float)
-0:38 'color' ( temp 4-component vector of float)
-0:38 component-wise multiply ( temp 4-component vector of float)
-0:38 component-wise multiply ( temp 4-component vector of float)
-0:38 component-wise multiply ( temp 4-component vector of float)
-0:38 'o1' ( smooth in 4-component vector of float)
-0:38 vector swizzle ( temp 4-component vector of float)
-0:38 'u1' ( uniform 2-component vector of float)
-0:38 Sequence
-0:38 Constant:
-0:38 0 (const int)
-0:38 Constant:
-0:38 1 (const int)
-0:38 Constant:
-0:38 0 (const int)
-0:38 Constant:
-0:38 1 (const int)
-0:38 vector swizzle ( temp 4-component vector of float)
-0:38 'u2' ( uniform 3-component vector of float)
-0:38 Sequence
-0:38 Constant:
-0:38 0 (const int)
-0:38 Constant:
-0:38 1 (const int)
-0:38 Constant:
-0:38 2 (const int)
-0:38 Constant:
-0:38 0 (const int)
-0:38 vector swizzle ( temp 4-component vector of float)
-0:38 'u3' ( uniform 4-component vector of float)
-0:38 0.000000
-0:38 0.000000
-0:38 0.000000
-0:38 0.000000
-0:38 Sequence
-0:38 Constant:
-0:38 0 (const int)
-0:38 Constant:
-0:38 1 (const int)
-0:38 Constant:
-0:38 2 (const int)
-0:38 Constant:
-0:38 3 (const int)
-0:39 move second child to first child ( temp 4-component vector of float)
-0:39 'outColor' ( out 4-component vector of float)
-0:39 'color' ( temp 4-component vector of float)
-0:? Linker Objects
-0:? 'anon@0' (layout( location=5) in block{ in 4-component vector of float o3})
-0:? 'o2' ( smooth in 2-component vector of float)
-0:? 'o1' ( smooth in 4-component vector of float)
-0:? 'outColor' ( out 4-component vector of float)
-0:? 'u1' ( uniform 2-component vector of float)
-0:? 'u2' ( uniform 3-component vector of float)
-0:? 'u3' ( uniform 4-component vector of float)
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 0.000000
-0:? 'um2' ( uniform 2X2 matrix of float)
-0:? 4.000000
-0:? 0.000000
-0:? 0.000000
-0:? 4.000000
-0:? 'glass' (layout( location=0 binding=0) uniform sampler2D)
-0:? 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 4-component vector of float b})
-0:? 'anon@2' (layout( column_major std430) buffer block{layout( column_major std430) buffer 2-component vector of float fb1})
-0:? 'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b})
-
-// Module Version 10000
-// Generated by (magic number): 8000a
-// Id's are bound by 56
-
- Capability Shader
- 1: ExtInstImport "GLSL.std.450"
- MemoryModel Logical GLSL450
- EntryPoint Vertex 4 "main" 9 14 18 54 55
- Source GLSL 460
- Name 4 "main"
- Name 9 "o1"
- Name 14 "o2"
- Name 16 "outBlock"
- MemberName 16(outBlock) 0 "o3"
- Name 18 ""
- Name 23 "u1"
- Name 27 "u2"
- Name 29 "u3"
- Name 36 "um2"
- Name 40 "glass"
- Name 41 "crossStageBlock1"
- MemberName 41(crossStageBlock1) 0 "a"
- MemberName 41(crossStageBlock1) 1 "b"
- Name 43 ""
- Name 44 "vertOnlyBlock"
- MemberName 44(vertOnlyBlock) 0 "vb1"
- Name 46 ""
- Name 47 "crossStageBlock2"
- MemberName 47(crossStageBlock2) 0 "a"
- MemberName 47(crossStageBlock2) 1 "b"
- Name 52 "blockName1"
- Name 54 "gl_VertexID"
- Name 55 "gl_InstanceID"
- Decorate 9(o1) Location 0
- Decorate 14(o2) Location 1
- Decorate 16(outBlock) Block
- Decorate 18 Location 5
- Decorate 23(u1) Location 1
- Decorate 23(u1) DescriptorSet 0
- Decorate 27(u2) Location 2
- Decorate 27(u2) DescriptorSet 0
- Decorate 29(u3) Location 3
- Decorate 29(u3) DescriptorSet 0
- Decorate 36(um2) Location 4
- Decorate 36(um2) DescriptorSet 0
- Decorate 40(glass) Location 0
- Decorate 40(glass) DescriptorSet 0
- Decorate 40(glass) Binding 0
- MemberDecorate 41(crossStageBlock1) 0 Offset 0
- MemberDecorate 41(crossStageBlock1) 1 Offset 16
- Decorate 41(crossStageBlock1) Block
- Decorate 43 DescriptorSet 0
- Decorate 43 Binding 0
- MemberDecorate 44(vertOnlyBlock) 0 Offset 0
- Decorate 44(vertOnlyBlock) BufferBlock
- Decorate 46 DescriptorSet 0
- Decorate 46 Binding 0
- MemberDecorate 47(crossStageBlock2) 0 Offset 0
- MemberDecorate 47(crossStageBlock2) 1 Offset 16
- Decorate 47(crossStageBlock2) Block
- Decorate 52(blockName1) DescriptorSet 0
- Decorate 52(blockName1) Binding 0
- Decorate 54(gl_VertexID) BuiltIn VertexId
- Decorate 55(gl_InstanceID) BuiltIn InstanceId
- 2: TypeVoid
- 3: TypeFunction 2
- 6: TypeFloat 32
- 7: TypeVector 6(float) 4
- 8: TypePointer Output 7(fvec4)
- 9(o1): 8(ptr) Variable Output
- 10: 6(float) Constant 0
- 11: 7(fvec4) ConstantComposite 10 10 10 10
- 12: TypeVector 6(float) 2
- 13: TypePointer Output 12(fvec2)
- 14(o2): 13(ptr) Variable Output
- 15: 12(fvec2) ConstantComposite 10 10
- 16(outBlock): TypeStruct 7(fvec4)
- 17: TypePointer Output 16(outBlock)
- 18: 17(ptr) Variable Output
- 19: TypeInt 32 1
- 20: 19(int) Constant 0
- 22: TypePointer UniformConstant 12(fvec2)
- 23(u1): 22(ptr) Variable UniformConstant
- 24: TypeVector 6(float) 3
- 25: 24(fvec3) ConstantComposite 10 10 10
- 26: TypePointer UniformConstant 24(fvec3)
- 27(u2): 26(ptr) Variable UniformConstant 25
- 28: TypePointer UniformConstant 7(fvec4)
- 29(u3): 28(ptr) Variable UniformConstant 11
- 30: TypeMatrix 12(fvec2) 2
- 31: 6(float) Constant 1082130432
- 32: 12(fvec2) ConstantComposite 31 10
- 33: 12(fvec2) ConstantComposite 10 31
- 34: 30 ConstantComposite 32 33
- 35: TypePointer UniformConstant 30
- 36(um2): 35(ptr) Variable UniformConstant 34
- 37: TypeImage 6(float) 2D sampled format:Unknown
- 38: TypeSampledImage 37
- 39: TypePointer UniformConstant 38
- 40(glass): 39(ptr) Variable UniformConstant
-41(crossStageBlock1): TypeStruct 7(fvec4) 7(fvec4)
- 42: TypePointer Uniform 41(crossStageBlock1)
- 43: 42(ptr) Variable Uniform
-44(vertOnlyBlock): TypeStruct 12(fvec2)
- 45: TypePointer Uniform 44(vertOnlyBlock)
- 46: 45(ptr) Variable Uniform
-47(crossStageBlock2): TypeStruct 7(fvec4) 12(fvec2)
- 48: TypeInt 32 0
- 49: 48(int) Constant 2
- 50: TypeArray 47(crossStageBlock2) 49
- 51: TypePointer Uniform 50
- 52(blockName1): 51(ptr) Variable Uniform
- 53: TypePointer Input 19(int)
- 54(gl_VertexID): 53(ptr) Variable Input
-55(gl_InstanceID): 53(ptr) Variable Input
- 4(main): 2 Function None 3
- 5: Label
- Store 9(o1) 11
- Store 14(o2) 15
- 21: 8(ptr) AccessChain 18 20
- Store 21 11
- Return
- FunctionEnd
-// Module Version 10000
-// Generated by (magic number): 8000a
-// Id's are bound by 62
-
- Capability Shader
- 1: ExtInstImport "GLSL.std.450"
- MemoryModel Logical GLSL450
- EntryPoint Fragment 4 "main" 11 32 36 38
- ExecutionMode 4 OriginLowerLeft
- Source GLSL 460
- Name 4 "main"
- Name 9 "color"
- Name 11 "o1"
- Name 15 "u1"
- Name 21 "u2"
- Name 28 "u3"
- Name 32 "outColor"
- Name 34 "outBlock"
- MemberName 34(outBlock) 0 "o3"
- Name 36 ""
- Name 38 "o2"
- Name 45 "um2"
- Name 49 "glass"
- Name 50 "crossStageBlock1"
- MemberName 50(crossStageBlock1) 0 "a"
- MemberName 50(crossStageBlock1) 1 "b"
- Name 52 ""
- Name 53 "fragOnlyBlock"
- MemberName 53(fragOnlyBlock) 0 "fb1"
- Name 55 ""
- Name 56 "crossStageBlock2"
- MemberName 56(crossStageBlock2) 0 "a"
- MemberName 56(crossStageBlock2) 1 "b"
- Name 61 "blockName2"
- Decorate 11(o1) Location 0
- Decorate 15(u1) Location 1
- Decorate 15(u1) DescriptorSet 0
- Decorate 21(u2) Location 2
- Decorate 21(u2) DescriptorSet 0
- Decorate 28(u3) Location 3
- Decorate 28(u3) DescriptorSet 0
- Decorate 32(outColor) Location 0
- Decorate 34(outBlock) Block
- Decorate 36 Location 5
- Decorate 38(o2) Location 1
- Decorate 45(um2) Location 4
- Decorate 45(um2) DescriptorSet 0
- Decorate 49(glass) Location 0
- Decorate 49(glass) DescriptorSet 0
- Decorate 49(glass) Binding 0
- MemberDecorate 50(crossStageBlock1) 0 Offset 0
- MemberDecorate 50(crossStageBlock1) 1 Offset 16
- Decorate 50(crossStageBlock1) Block
- Decorate 52 DescriptorSet 0
- Decorate 52 Binding 0
- MemberDecorate 53(fragOnlyBlock) 0 Offset 0
- Decorate 53(fragOnlyBlock) BufferBlock
- Decorate 55 DescriptorSet 0
- Decorate 55 Binding 0
- MemberDecorate 56(crossStageBlock2) 0 Offset 0
- MemberDecorate 56(crossStageBlock2) 1 Offset 16
- Decorate 56(crossStageBlock2) Block
- Decorate 61(blockName2) DescriptorSet 0
- Decorate 61(blockName2) Binding 0
- 2: TypeVoid
- 3: TypeFunction 2
- 6: TypeFloat 32
- 7: TypeVector 6(float) 4
- 8: TypePointer Function 7(fvec4)
- 10: TypePointer Input 7(fvec4)
- 11(o1): 10(ptr) Variable Input
- 13: TypeVector 6(float) 2
- 14: TypePointer UniformConstant 13(fvec2)
- 15(u1): 14(ptr) Variable UniformConstant
- 19: TypeVector 6(float) 3
- 20: TypePointer UniformConstant 19(fvec3)
- 21(u2): 20(ptr) Variable UniformConstant
- 25: 6(float) Constant 0
- 26: 7(fvec4) ConstantComposite 25 25 25 25
- 27: TypePointer UniformConstant 7(fvec4)
- 28(u3): 27(ptr) Variable UniformConstant 26
- 31: TypePointer Output 7(fvec4)
- 32(outColor): 31(ptr) Variable Output
- 34(outBlock): TypeStruct 7(fvec4)
- 35: TypePointer Input 34(outBlock)
- 36: 35(ptr) Variable Input
- 37: TypePointer Input 13(fvec2)
- 38(o2): 37(ptr) Variable Input
- 39: TypeMatrix 13(fvec2) 2
- 40: 6(float) Constant 1082130432
- 41: 13(fvec2) ConstantComposite 40 25
- 42: 13(fvec2) ConstantComposite 25 40
- 43: 39 ConstantComposite 41 42
- 44: TypePointer UniformConstant 39
- 45(um2): 44(ptr) Variable UniformConstant 43
- 46: TypeImage 6(float) 2D sampled format:Unknown
- 47: TypeSampledImage 46
- 48: TypePointer UniformConstant 47
- 49(glass): 48(ptr) Variable UniformConstant
-50(crossStageBlock1): TypeStruct 7(fvec4) 7(fvec4)
- 51: TypePointer Uniform 50(crossStageBlock1)
- 52: 51(ptr) Variable Uniform
-53(fragOnlyBlock): TypeStruct 13(fvec2)
- 54: TypePointer Uniform 53(fragOnlyBlock)
- 55: 54(ptr) Variable Uniform
-56(crossStageBlock2): TypeStruct 7(fvec4) 13(fvec2)
- 57: TypeInt 32 0
- 58: 57(int) Constant 2
- 59: TypeArray 56(crossStageBlock2) 58
- 60: TypePointer Uniform 59
- 61(blockName2): 60(ptr) Variable Uniform
- 4(main): 2 Function None 3
- 5: Label
- 9(color): 8(ptr) Variable Function
- 12: 7(fvec4) Load 11(o1)
- 16: 13(fvec2) Load 15(u1)
- 17: 7(fvec4) VectorShuffle 16 16 0 1 0 1
- 18: 7(fvec4) FMul 12 17
- 22: 19(fvec3) Load 21(u2)
- 23: 7(fvec4) VectorShuffle 22 22 0 1 2 0
- 24: 7(fvec4) FMul 18 23
- 29: 7(fvec4) Load 28(u3)
- 30: 7(fvec4) FMul 24 29
- Store 9(color) 30
- 33: 7(fvec4) Load 9(color)
- Store 32(outColor) 33
- Return
- FunctionEnd
diff --git a/third_party/vulkan-deps/glslang/src/Test/baseResults/iomap.crossStage.vk.vert.out b/third_party/vulkan-deps/glslang/src/Test/baseResults/iomap.crossStage.vk.vert.out
deleted file mode 100644
index e137bdf..0000000
--- a/third_party/vulkan-deps/glslang/src/Test/baseResults/iomap.crossStage.vk.vert.out
+++ /dev/null
@@ -1,720 +0,0 @@
-iomap.crossStage.vk.vert
-Shader version: 460
-0:? Sequence
-0:26 Function Definition: main( ( global void)
-0:26 Function Parameters:
-0:28 Sequence
-0:28 move second child to first child ( temp highp 4-component vector of float)
-0:28 'vgo1' ( smooth out highp 4-component vector of float)
-0:28 Constant:
-0:28 0.000000
-0:28 0.000000
-0:28 0.000000
-0:28 0.000000
-0:29 move second child to first child ( temp highp 2-component vector of float)
-0:29 'vgo2' ( smooth out highp 2-component vector of float)
-0:29 Constant:
-0:29 0.000000
-0:29 0.000000
-0:30 move second child to first child ( temp highp 4-component vector of float)
-0:30 o3: direct index for structure ( out highp 4-component vector of float)
-0:30 'anon@0' (layout( location=5) out block{ out highp 4-component vector of float o3})
-0:30 Constant:
-0:30 0 (const uint)
-0:30 Constant:
-0:30 0.000000
-0:30 0.000000
-0:30 0.000000
-0:30 0.000000
-0:? Linker Objects
-0:? 'vgo1' ( smooth out highp 4-component vector of float)
-0:? 'vgo2' ( smooth out highp 2-component vector of float)
-0:? 'anon@0' (layout( location=5) out block{ out highp 4-component vector of float o3})
-0:? 'glass' (layout( binding=0) uniform highp sampler2D)
-0:? 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 4-component vector of float b})
-0:? 'anon@2' (layout( column_major std430) readonly buffer block{layout( column_major std430) readonly buffer highp 2-component vector of float vb1})
-0:? 'blockName1' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
-
-iomap.crossStage.vk.geom
-Shader version: 460
-invocations = -1
-max_vertices = 3
-input primitive = points
-output primitive = triangle_strip
-0:? Sequence
-0:25 Function Definition: main( ( global void)
-0:25 Function Parameters:
-0:27 Sequence
-0:27 Sequence
-0:27 Sequence
-0:27 move second child to first child ( temp highp int)
-0:27 'i' ( temp highp int)
-0:27 Constant:
-0:27 0 (const int)
-0:27 Loop with condition tested first
-0:27 Loop Condition
-0:27 Compare Less Than ( temp bool)
-0:27 'i' ( temp highp int)
-0:27 Constant:
-0:27 3 (const int)
-0:27 Loop Body
-0:28 Sequence
-0:28 move second child to first child ( temp highp 4-component vector of float)
-0:28 'gfo1' (layout( stream=0) out highp 4-component vector of float)
-0:28 Constant:
-0:28 0.000000
-0:28 0.000000
-0:28 0.000000
-0:28 0.000000
-0:29 move second child to first child ( temp highp 2-component vector of float)
-0:29 'gfo2' (layout( stream=0) out highp 2-component vector of float)
-0:29 Constant:
-0:29 0.000000
-0:29 0.000000
-0:30 move second child to first child ( temp highp 4-component vector of float)
-0:30 o3: direct index for structure (layout( stream=0) out highp 4-component vector of float)
-0:30 'gf_out' (layout( location=5 stream=0) out block{layout( stream=0) out highp 4-component vector of float o3})
-0:30 Constant:
-0:30 0 (const int)
-0:30 o3: direct index for structure ( in highp 4-component vector of float)
-0:30 indirect index (layout( location=5) temp block{ in highp 4-component vector of float o3})
-0:30 'inBlock' (layout( location=5) in 1-element array of block{ in highp 4-component vector of float o3})
-0:30 'i' ( temp highp int)
-0:30 Constant:
-0:30 0 (const int)
-0:31 EmitVertex ( global void)
-0:27 Loop Terminal Expression
-0:27 Post-Increment ( temp highp int)
-0:27 'i' ( temp highp int)
-0:33 EndPrimitive ( global void)
-0:? Linker Objects
-0:? 'vgo1' ( in 1-element array of highp 4-component vector of float)
-0:? 'vgo2' ( in 1-element array of highp 2-component vector of float)
-0:? 'inBlock' (layout( location=5) in 1-element array of block{ in highp 4-component vector of float o3})
-0:? 'gfo1' (layout( stream=0) out highp 4-component vector of float)
-0:? 'gfo2' (layout( stream=0) out highp 2-component vector of float)
-0:? 'gf_out' (layout( location=5 stream=0) out block{layout( stream=0) out highp 4-component vector of float o3})
-0:? 'blockName1' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
-
-iomap.crossStage.vk.frag
-Shader version: 460
-gl_FragCoord origin is upper left
-0:? Sequence
-0:30 Function Definition: Bar( ( global highp 2-component vector of float)
-0:30 Function Parameters:
-0:31 Sequence
-0:31 Branch: Return with expression
-0:32 add ( temp highp 2-component vector of float)
-0:31 add ( temp highp 2-component vector of float)
-0:31 fb1: direct index for structure (layout( column_major std430) readonly buffer highp 2-component vector of float)
-0:31 'anon@2' (layout( column_major std430) readonly buffer block{layout( column_major std430) readonly buffer highp 2-component vector of float fb1})
-0:31 Constant:
-0:31 0 (const uint)
-0:32 b: direct index for structure (layout( column_major std140) uniform highp 2-component vector of float)
-0:32 direct index (layout( column_major std140) temp block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
-0:32 'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
-0:32 Constant:
-0:32 0 (const int)
-0:32 Constant:
-0:32 1 (const int)
-0:33 b: direct index for structure (layout( column_major std140) uniform highp 2-component vector of float)
-0:33 direct index (layout( column_major std140) temp block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
-0:33 'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
-0:33 Constant:
-0:33 1 (const int)
-0:33 Constant:
-0:33 1 (const int)
-0:36 Function Definition: Foo( ( global highp 4-component vector of float)
-0:36 Function Parameters:
-0:37 Sequence
-0:37 Branch: Return with expression
-0:40 add ( temp highp 4-component vector of float)
-0:39 add ( temp highp 4-component vector of float)
-0:38 add ( temp highp 4-component vector of float)
-0:37 add ( temp highp 4-component vector of float)
-0:37 a: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float)
-0:37 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 4-component vector of float b})
-0:37 Constant:
-0:37 0 (const uint)
-0:38 b: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float)
-0:38 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 4-component vector of float b})
-0:38 Constant:
-0:38 1 (const uint)
-0:39 a: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float)
-0:39 direct index (layout( column_major std140) temp block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
-0:39 'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
-0:39 Constant:
-0:39 0 (const int)
-0:39 Constant:
-0:39 0 (const int)
-0:40 a: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float)
-0:40 direct index (layout( column_major std140) temp block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
-0:40 'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
-0:40 Constant:
-0:40 1 (const int)
-0:40 Constant:
-0:40 0 (const int)
-0:41 Construct vec4 ( temp highp 4-component vector of float)
-0:41 Function Call: Bar( ( global highp 2-component vector of float)
-0:41 Constant:
-0:41 0.000000
-0:41 Constant:
-0:41 0.000000
-0:44 Function Definition: main( ( global void)
-0:44 Function Parameters:
-0:46 Sequence
-0:46 Sequence
-0:46 move second child to first child ( temp highp 4-component vector of float)
-0:46 'color' ( temp highp 4-component vector of float)
-0:46 'gfo1' ( smooth in highp 4-component vector of float)
-0:47 move second child to first child ( temp highp 4-component vector of float)
-0:47 'color' ( temp highp 4-component vector of float)
-0:47 add ( temp highp 4-component vector of float)
-0:47 'color' ( temp highp 4-component vector of float)
-0:47 Function Call: Foo( ( global highp 4-component vector of float)
-0:48 move second child to first child ( temp highp 4-component vector of float)
-0:48 'outColor' ( out highp 4-component vector of float)
-0:48 'color' ( temp highp 4-component vector of float)
-0:? Linker Objects
-0:? 'anon@0' (layout( location=5) in block{ in highp 4-component vector of float o3})
-0:? 'gfo1' ( smooth in highp 4-component vector of float)
-0:? 'gfo2' ( smooth in highp 2-component vector of float)
-0:? 'outColor' ( out highp 4-component vector of float)
-0:? 'glass' (layout( binding=0) uniform highp sampler2D)
-0:? 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 4-component vector of float b})
-0:? 'anon@2' (layout( column_major std430) readonly buffer block{layout( column_major std430) readonly buffer highp 2-component vector of float fb1})
-0:? 'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
-
-
-Linked vertex stage:
-
-
-Linked geometry stage:
-
-
-Linked fragment stage:
-
-WARNING: Linking unknown stage stage: Matched shader interfaces are using different instance names.
- blockName1: "layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b}" versus blockName2: "layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b}"
-
-Shader version: 460
-0:? Sequence
-0:26 Function Definition: main( ( global void)
-0:26 Function Parameters:
-0:28 Sequence
-0:28 move second child to first child ( temp highp 4-component vector of float)
-0:28 'vgo1' ( smooth out highp 4-component vector of float)
-0:28 Constant:
-0:28 0.000000
-0:28 0.000000
-0:28 0.000000
-0:28 0.000000
-0:29 move second child to first child ( temp highp 2-component vector of float)
-0:29 'vgo2' ( smooth out highp 2-component vector of float)
-0:29 Constant:
-0:29 0.000000
-0:29 0.000000
-0:30 move second child to first child ( temp highp 4-component vector of float)
-0:30 o3: direct index for structure ( out highp 4-component vector of float)
-0:30 'anon@0' (layout( location=5) out block{ out highp 4-component vector of float o3})
-0:30 Constant:
-0:30 0 (const uint)
-0:30 Constant:
-0:30 0.000000
-0:30 0.000000
-0:30 0.000000
-0:30 0.000000
-0:? Linker Objects
-0:? 'vgo1' ( smooth out highp 4-component vector of float)
-0:? 'vgo2' ( smooth out highp 2-component vector of float)
-0:? 'anon@0' (layout( location=5) out block{ out highp 4-component vector of float o3})
-0:? 'glass' (layout( binding=0) uniform highp sampler2D)
-0:? 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 4-component vector of float b})
-0:? 'anon@2' (layout( column_major std430) readonly buffer block{layout( column_major std430) readonly buffer highp 2-component vector of float vb1})
-0:? 'blockName1' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
-Shader version: 460
-invocations = 1
-max_vertices = 3
-input primitive = points
-output primitive = triangle_strip
-0:? Sequence
-0:25 Function Definition: main( ( global void)
-0:25 Function Parameters:
-0:27 Sequence
-0:27 Sequence
-0:27 Sequence
-0:27 move second child to first child ( temp highp int)
-0:27 'i' ( temp highp int)
-0:27 Constant:
-0:27 0 (const int)
-0:27 Loop with condition tested first
-0:27 Loop Condition
-0:27 Compare Less Than ( temp bool)
-0:27 'i' ( temp highp int)
-0:27 Constant:
-0:27 3 (const int)
-0:27 Loop Body
-0:28 Sequence
-0:28 move second child to first child ( temp highp 4-component vector of float)
-0:28 'gfo1' (layout( stream=0) out highp 4-component vector of float)
-0:28 Constant:
-0:28 0.000000
-0:28 0.000000
-0:28 0.000000
-0:28 0.000000
-0:29 move second child to first child ( temp highp 2-component vector of float)
-0:29 'gfo2' (layout( stream=0) out highp 2-component vector of float)
-0:29 Constant:
-0:29 0.000000
-0:29 0.000000
-0:30 move second child to first child ( temp highp 4-component vector of float)
-0:30 o3: direct index for structure (layout( stream=0) out highp 4-component vector of float)
-0:30 'gf_out' (layout( location=5 stream=0) out block{layout( stream=0) out highp 4-component vector of float o3})
-0:30 Constant:
-0:30 0 (const int)
-0:30 o3: direct index for structure ( in highp 4-component vector of float)
-0:30 indirect index (layout( location=5) temp block{ in highp 4-component vector of float o3})
-0:30 'inBlock' (layout( location=5) in 1-element array of block{ in highp 4-component vector of float o3})
-0:30 'i' ( temp highp int)
-0:30 Constant:
-0:30 0 (const int)
-0:31 EmitVertex ( global void)
-0:27 Loop Terminal Expression
-0:27 Post-Increment ( temp highp int)
-0:27 'i' ( temp highp int)
-0:33 EndPrimitive ( global void)
-0:? Linker Objects
-0:? 'vgo1' ( in 1-element array of highp 4-component vector of float)
-0:? 'vgo2' ( in 1-element array of highp 2-component vector of float)
-0:? 'inBlock' (layout( location=5) in 1-element array of block{ in highp 4-component vector of float o3})
-0:? 'gfo1' (layout( stream=0) out highp 4-component vector of float)
-0:? 'gfo2' (layout( stream=0) out highp 2-component vector of float)
-0:? 'gf_out' (layout( location=5 stream=0) out block{layout( stream=0) out highp 4-component vector of float o3})
-0:? 'blockName1' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
-Shader version: 460
-gl_FragCoord origin is upper left
-0:? Sequence
-0:30 Function Definition: Bar( ( global highp 2-component vector of float)
-0:30 Function Parameters:
-0:31 Sequence
-0:31 Branch: Return with expression
-0:32 add ( temp highp 2-component vector of float)
-0:31 add ( temp highp 2-component vector of float)
-0:31 fb1: direct index for structure (layout( column_major std430) readonly buffer highp 2-component vector of float)
-0:31 'anon@2' (layout( column_major std430) readonly buffer block{layout( column_major std430) readonly buffer highp 2-component vector of float fb1})
-0:31 Constant:
-0:31 0 (const uint)
-0:32 b: direct index for structure (layout( column_major std140) uniform highp 2-component vector of float)
-0:32 direct index (layout( column_major std140) temp block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
-0:32 'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
-0:32 Constant:
-0:32 0 (const int)
-0:32 Constant:
-0:32 1 (const int)
-0:33 b: direct index for structure (layout( column_major std140) uniform highp 2-component vector of float)
-0:33 direct index (layout( column_major std140) temp block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
-0:33 'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
-0:33 Constant:
-0:33 1 (const int)
-0:33 Constant:
-0:33 1 (const int)
-0:36 Function Definition: Foo( ( global highp 4-component vector of float)
-0:36 Function Parameters:
-0:37 Sequence
-0:37 Branch: Return with expression
-0:40 add ( temp highp 4-component vector of float)
-0:39 add ( temp highp 4-component vector of float)
-0:38 add ( temp highp 4-component vector of float)
-0:37 add ( temp highp 4-component vector of float)
-0:37 a: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float)
-0:37 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 4-component vector of float b})
-0:37 Constant:
-0:37 0 (const uint)
-0:38 b: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float)
-0:38 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 4-component vector of float b})
-0:38 Constant:
-0:38 1 (const uint)
-0:39 a: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float)
-0:39 direct index (layout( column_major std140) temp block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
-0:39 'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
-0:39 Constant:
-0:39 0 (const int)
-0:39 Constant:
-0:39 0 (const int)
-0:40 a: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float)
-0:40 direct index (layout( column_major std140) temp block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
-0:40 'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
-0:40 Constant:
-0:40 1 (const int)
-0:40 Constant:
-0:40 0 (const int)
-0:41 Construct vec4 ( temp highp 4-component vector of float)
-0:41 Function Call: Bar( ( global highp 2-component vector of float)
-0:41 Constant:
-0:41 0.000000
-0:41 Constant:
-0:41 0.000000
-0:44 Function Definition: main( ( global void)
-0:44 Function Parameters:
-0:46 Sequence
-0:46 Sequence
-0:46 move second child to first child ( temp highp 4-component vector of float)
-0:46 'color' ( temp highp 4-component vector of float)
-0:46 'gfo1' ( smooth in highp 4-component vector of float)
-0:47 move second child to first child ( temp highp 4-component vector of float)
-0:47 'color' ( temp highp 4-component vector of float)
-0:47 add ( temp highp 4-component vector of float)
-0:47 'color' ( temp highp 4-component vector of float)
-0:47 Function Call: Foo( ( global highp 4-component vector of float)
-0:48 move second child to first child ( temp highp 4-component vector of float)
-0:48 'outColor' ( out highp 4-component vector of float)
-0:48 'color' ( temp highp 4-component vector of float)
-0:? Linker Objects
-0:? 'anon@0' (layout( location=5) in block{ in highp 4-component vector of float o3})
-0:? 'gfo1' ( smooth in highp 4-component vector of float)
-0:? 'gfo2' ( smooth in highp 2-component vector of float)
-0:? 'outColor' ( out highp 4-component vector of float)
-0:? 'glass' (layout( binding=0) uniform highp sampler2D)
-0:? 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 4-component vector of float b})
-0:? 'anon@2' (layout( column_major std430) readonly buffer block{layout( column_major std430) readonly buffer highp 2-component vector of float fb1})
-0:? 'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b})
-
-// Module Version 10000
-// Generated by (magic number): 8000a
-// Id's are bound by 38
-
- Capability Shader
- 1: ExtInstImport "GLSL.std.450"
- MemoryModel Logical GLSL450
- EntryPoint Vertex 4 "main" 9 14 18
- Source GLSL 460
- Name 4 "main"
- Name 9 "vgo1"
- Name 14 "vgo2"
- Name 16 "outBlock"
- MemberName 16(outBlock) 0 "o3"
- Name 18 ""
- Name 25 "glass"
- Name 26 "crossStageBlock1"
- MemberName 26(crossStageBlock1) 0 "a"
- MemberName 26(crossStageBlock1) 1 "b"
- Name 28 ""
- Name 29 "vertOnlyBlock"
- MemberName 29(vertOnlyBlock) 0 "vb1"
- Name 31 ""
- Name 32 "crossStageBlock2"
- MemberName 32(crossStageBlock2) 0 "a"
- MemberName 32(crossStageBlock2) 1 "b"
- Name 37 "blockName1"
- Decorate 9(vgo1) Location 0
- Decorate 14(vgo2) Location 1
- Decorate 16(outBlock) Block
- Decorate 18 Location 5
- Decorate 25(glass) DescriptorSet 0
- Decorate 25(glass) Binding 0
- MemberDecorate 26(crossStageBlock1) 0 Offset 0
- MemberDecorate 26(crossStageBlock1) 1 Offset 16
- Decorate 26(crossStageBlock1) Block
- Decorate 28 DescriptorSet 0
- Decorate 28 Binding 1
- MemberDecorate 29(vertOnlyBlock) 0 NonWritable
- MemberDecorate 29(vertOnlyBlock) 0 Offset 0
- Decorate 29(vertOnlyBlock) BufferBlock
- Decorate 31 DescriptorSet 0
- Decorate 31 Binding 0
- MemberDecorate 32(crossStageBlock2) 0 Offset 0
- MemberDecorate 32(crossStageBlock2) 1 Offset 16
- Decorate 32(crossStageBlock2) Block
- Decorate 37(blockName1) DescriptorSet 0
- Decorate 37(blockName1) Binding 3
- 2: TypeVoid
- 3: TypeFunction 2
- 6: TypeFloat 32
- 7: TypeVector 6(float) 4
- 8: TypePointer Output 7(fvec4)
- 9(vgo1): 8(ptr) Variable Output
- 10: 6(float) Constant 0
- 11: 7(fvec4) ConstantComposite 10 10 10 10
- 12: TypeVector 6(float) 2
- 13: TypePointer Output 12(fvec2)
- 14(vgo2): 13(ptr) Variable Output
- 15: 12(fvec2) ConstantComposite 10 10
- 16(outBlock): TypeStruct 7(fvec4)
- 17: TypePointer Output 16(outBlock)
- 18: 17(ptr) Variable Output
- 19: TypeInt 32 1
- 20: 19(int) Constant 0
- 22: TypeImage 6(float) 2D sampled format:Unknown
- 23: TypeSampledImage 22
- 24: TypePointer UniformConstant 23
- 25(glass): 24(ptr) Variable UniformConstant
-26(crossStageBlock1): TypeStruct 7(fvec4) 7(fvec4)
- 27: TypePointer Uniform 26(crossStageBlock1)
- 28: 27(ptr) Variable Uniform
-29(vertOnlyBlock): TypeStruct 12(fvec2)
- 30: TypePointer Uniform 29(vertOnlyBlock)
- 31: 30(ptr) Variable Uniform
-32(crossStageBlock2): TypeStruct 7(fvec4) 12(fvec2)
- 33: TypeInt 32 0
- 34: 33(int) Constant 2
- 35: TypeArray 32(crossStageBlock2) 34
- 36: TypePointer Uniform 35
- 37(blockName1): 36(ptr) Variable Uniform
- 4(main): 2 Function None 3
- 5: Label
- Store 9(vgo1) 11
- Store 14(vgo2) 15
- 21: 8(ptr) AccessChain 18 20
- Store 21 11
- Return
- FunctionEnd
-// Module Version 10000
-// Generated by (magic number): 8000a
-// Id's are bound by 57
-
- Capability Geometry
- 1: ExtInstImport "GLSL.std.450"
- MemoryModel Logical GLSL450
- EntryPoint Geometry 4 "main" 22 27 31 37 48 51
- ExecutionMode 4 InputPoints
- ExecutionMode 4 Invocations 1
- ExecutionMode 4 OutputTriangleStrip
- ExecutionMode 4 OutputVertices 3
- Source GLSL 460
- Name 4 "main"
- Name 8 "i"
- Name 22 "gfo1"
- Name 27 "gfo2"
- Name 29 "outBlock"
- MemberName 29(outBlock) 0 "o3"
- Name 31 "gf_out"
- Name 32 "outBlock"
- MemberName 32(outBlock) 0 "o3"
- Name 37 "inBlock"
- Name 48 "vgo1"
- Name 51 "vgo2"
- Name 52 "crossStageBlock2"
- MemberName 52(crossStageBlock2) 0 "a"
- MemberName 52(crossStageBlock2) 1 "b"
- Name 56 "blockName1"
- Decorate 22(gfo1) Location 0
- Decorate 27(gfo2) Location 1
- Decorate 29(outBlock) Block
- Decorate 31(gf_out) Location 5
- Decorate 32(outBlock) Block
- Decorate 37(inBlock) Location 5
- Decorate 48(vgo1) Location 0
- Decorate 51(vgo2) Location 1
- MemberDecorate 52(crossStageBlock2) 0 Offset 0
- MemberDecorate 52(crossStageBlock2) 1 Offset 16
- Decorate 52(crossStageBlock2) Block
- Decorate 56(blockName1) DescriptorSet 0
- Decorate 56(blockName1) Binding 3
- 2: TypeVoid
- 3: TypeFunction 2
- 6: TypeInt 32 1
- 7: TypePointer Function 6(int)
- 9: 6(int) Constant 0
- 16: 6(int) Constant 3
- 17: TypeBool
- 19: TypeFloat 32
- 20: TypeVector 19(float) 4
- 21: TypePointer Output 20(fvec4)
- 22(gfo1): 21(ptr) Variable Output
- 23: 19(float) Constant 0
- 24: 20(fvec4) ConstantComposite 23 23 23 23
- 25: TypeVector 19(float) 2
- 26: TypePointer Output 25(fvec2)
- 27(gfo2): 26(ptr) Variable Output
- 28: 25(fvec2) ConstantComposite 23 23
- 29(outBlock): TypeStruct 20(fvec4)
- 30: TypePointer Output 29(outBlock)
- 31(gf_out): 30(ptr) Variable Output
- 32(outBlock): TypeStruct 20(fvec4)
- 33: TypeInt 32 0
- 34: 33(int) Constant 1
- 35: TypeArray 32(outBlock) 34
- 36: TypePointer Input 35
- 37(inBlock): 36(ptr) Variable Input
- 39: TypePointer Input 20(fvec4)
- 44: 6(int) Constant 1
- 46: TypeArray 20(fvec4) 34
- 47: TypePointer Input 46
- 48(vgo1): 47(ptr) Variable Input
- 49: TypeArray 25(fvec2) 34
- 50: TypePointer Input 49
- 51(vgo2): 50(ptr) Variable Input
-52(crossStageBlock2): TypeStruct 20(fvec4) 25(fvec2)
- 53: 33(int) Constant 2
- 54: TypeArray 52(crossStageBlock2) 53
- 55: TypePointer Uniform 54
- 56(blockName1): 55(ptr) Variable Uniform
- 4(main): 2 Function None 3
- 5: Label
- 8(i): 7(ptr) Variable Function
- Store 8(i) 9
- Branch 10
- 10: Label
- LoopMerge 12 13 None
- Branch 14
- 14: Label
- 15: 6(int) Load 8(i)
- 18: 17(bool) SLessThan 15 16
- BranchConditional 18 11 12
- 11: Label
- Store 22(gfo1) 24
- Store 27(gfo2) 28
- 38: 6(int) Load 8(i)
- 40: 39(ptr) AccessChain 37(inBlock) 38 9
- 41: 20(fvec4) Load 40
- 42: 21(ptr) AccessChain 31(gf_out) 9
- Store 42 41
- EmitVertex
- Branch 13
- 13: Label
- 43: 6(int) Load 8(i)
- 45: 6(int) IAdd 43 44
- Store 8(i) 45
- Branch 10
- 12: Label
- EndPrimitive
- Return
- FunctionEnd
-// Module Version 10000
-// Generated by (magic number): 8000a
-// Id's are bound by 81
-
- Capability Shader
- 1: ExtInstImport "GLSL.std.450"
- MemoryModel Logical GLSL450
- EntryPoint Fragment 4 "main" 64 70 74 76
- ExecutionMode 4 OriginUpperLeft
- Source GLSL 460
- Name 4 "main"
- Name 9 "Bar("
- Name 13 "Foo("
- Name 15 "fragOnlyBlock"
- MemberName 15(fragOnlyBlock) 0 "fb1"
- Name 17 ""
- Name 23 "crossStageBlock2"
- MemberName 23(crossStageBlock2) 0 "a"
- MemberName 23(crossStageBlock2) 1 "b"
- Name 28 "blockName2"
- Name 38 "crossStageBlock1"
- MemberName 38(crossStageBlock1) 0 "a"
- MemberName 38(crossStageBlock1) 1 "b"
- Name 40 ""
- Name 62 "color"
- Name 64 "gfo1"
- Name 70 "outColor"
- Name 72 "outBlock"
- MemberName 72(outBlock) 0 "o3"
- Name 74 ""
- Name 76 "gfo2"
- Name 80 "glass"
- MemberDecorate 15(fragOnlyBlock) 0 NonWritable
- MemberDecorate 15(fragOnlyBlock) 0 Offset 0
- Decorate 15(fragOnlyBlock) BufferBlock
- Decorate 17 DescriptorSet 0
- Decorate 17 Binding 2
- MemberDecorate 23(crossStageBlock2) 0 Offset 0
- MemberDecorate 23(crossStageBlock2) 1 Offset 16
- Decorate 23(crossStageBlock2) Block
- Decorate 28(blockName2) DescriptorSet 0
- Decorate 28(blockName2) Binding 3
- MemberDecorate 38(crossStageBlock1) 0 Offset 0
- MemberDecorate 38(crossStageBlock1) 1 Offset 16
- Decorate 38(crossStageBlock1) Block
- Decorate 40 DescriptorSet 0
- Decorate 40 Binding 1
- Decorate 64(gfo1) Location 0
- Decorate 70(outColor) Location 0
- Decorate 72(outBlock) Block
- Decorate 74 Location 5
- Decorate 76(gfo2) Location 1
- Decorate 80(glass) DescriptorSet 0
- Decorate 80(glass) Binding 0
- 2: TypeVoid
- 3: TypeFunction 2
- 6: TypeFloat 32
- 7: TypeVector 6(float) 2
- 8: TypeFunction 7(fvec2)
- 11: TypeVector 6(float) 4
- 12: TypeFunction 11(fvec4)
-15(fragOnlyBlock): TypeStruct 7(fvec2)
- 16: TypePointer Uniform 15(fragOnlyBlock)
- 17: 16(ptr) Variable Uniform
- 18: TypeInt 32 1
- 19: 18(int) Constant 0
- 20: TypePointer Uniform 7(fvec2)
-23(crossStageBlock2): TypeStruct 11(fvec4) 7(fvec2)
- 24: TypeInt 32 0
- 25: 24(int) Constant 2
- 26: TypeArray 23(crossStageBlock2) 25
- 27: TypePointer Uniform 26
- 28(blockName2): 27(ptr) Variable Uniform
- 29: 18(int) Constant 1
-38(crossStageBlock1): TypeStruct 11(fvec4) 11(fvec4)
- 39: TypePointer Uniform 38(crossStageBlock1)
- 40: 39(ptr) Variable Uniform
- 41: TypePointer Uniform 11(fvec4)
- 54: 6(float) Constant 0
- 61: TypePointer Function 11(fvec4)
- 63: TypePointer Input 11(fvec4)
- 64(gfo1): 63(ptr) Variable Input
- 69: TypePointer Output 11(fvec4)
- 70(outColor): 69(ptr) Variable Output
- 72(outBlock): TypeStruct 11(fvec4)
- 73: TypePointer Input 72(outBlock)
- 74: 73(ptr) Variable Input
- 75: TypePointer Input 7(fvec2)
- 76(gfo2): 75(ptr) Variable Input
- 77: TypeImage 6(float) 2D sampled format:Unknown
- 78: TypeSampledImage 77
- 79: TypePointer UniformConstant 78
- 80(glass): 79(ptr) Variable UniformConstant
- 4(main): 2 Function None 3
- 5: Label
- 62(color): 61(ptr) Variable Function
- 65: 11(fvec4) Load 64(gfo1)
- Store 62(color) 65
- 66: 11(fvec4) Load 62(color)
- 67: 11(fvec4) FunctionCall 13(Foo()
- 68: 11(fvec4) FAdd 66 67
- Store 62(color) 68
- 71: 11(fvec4) Load 62(color)
- Store 70(outColor) 71
- Return
- FunctionEnd
- 9(Bar(): 7(fvec2) Function None 8
- 10: Label
- 21: 20(ptr) AccessChain 17 19
- 22: 7(fvec2) Load 21
- 30: 20(ptr) AccessChain 28(blockName2) 19 29
- 31: 7(fvec2) Load 30
- 32: 7(fvec2) FAdd 22 31
- 33: 20(ptr) AccessChain 28(blockName2) 29 29
- 34: 7(fvec2) Load 33
- 35: 7(fvec2) FAdd 32 34
- ReturnValue 35
- FunctionEnd
- 13(Foo(): 11(fvec4) Function None 12
- 14: Label
- 42: 41(ptr) AccessChain 40 19
- 43: 11(fvec4) Load 42
- 44: 41(ptr) AccessChain 40 29
- 45: 11(fvec4) Load 44
- 46: 11(fvec4) FAdd 43 45
- 47: 41(ptr) AccessChain 28(blockName2) 19 19
- 48: 11(fvec4) Load 47
- 49: 11(fvec4) FAdd 46 48
- 50: 41(ptr) AccessChain 28(blockName2) 29 19
- 51: 11(fvec4) Load 50
- 52: 11(fvec4) FAdd 49 51
- 53: 7(fvec2) FunctionCall 9(Bar()
- 55: 6(float) CompositeExtract 53 0
- 56: 6(float) CompositeExtract 53 1
- 57: 11(fvec4) CompositeConstruct 55 56 54 54
- 58: 11(fvec4) FAdd 52 57
- ReturnValue 58
- FunctionEnd
diff --git a/third_party/vulkan-deps/glslang/src/Test/baseResults/vk.relaxed.errorcheck.vert.out b/third_party/vulkan-deps/glslang/src/Test/baseResults/vk.relaxed.errorcheck.vert.out
deleted file mode 100644
index f19eae6..0000000
--- a/third_party/vulkan-deps/glslang/src/Test/baseResults/vk.relaxed.errorcheck.vert.out
+++ /dev/null
@@ -1,124 +0,0 @@
-vk.relaxed.errorcheck.vert
-Shader version: 460
-0:? Sequence
-0:9 Function Definition: foo( ( global highp 4-component vector of float)
-0:9 Function Parameters:
-0:10 Sequence
-0:10 Branch: Return with expression
-0:10 vector swizzle ( temp highp 4-component vector of float)
-0:10 a: direct index for structure ( uniform highp 2-component vector of float)
-0:10 'anon@0' (layout( column_major std140) uniform block{ uniform highp 2-component vector of float a})
-0:10 Constant:
-0:10 0 (const uint)
-0:10 Sequence
-0:10 Constant:
-0:10 0 (const int)
-0:10 Constant:
-0:10 1 (const int)
-0:10 Constant:
-0:10 0 (const int)
-0:10 Constant:
-0:10 1 (const int)
-0:13 Function Definition: main( ( global void)
-0:13 Function Parameters:
-0:14 Sequence
-0:14 move second child to first child ( temp highp 4-component vector of float)
-0:14 'io' (layout( location=0) smooth out highp 4-component vector of float)
-0:14 Function Call: foo( ( global highp 4-component vector of float)
-0:? Linker Objects
-0:? 'io' (layout( location=0) smooth out highp 4-component vector of float)
-0:? 'anon@0' (layout( column_major std140) uniform block{ uniform highp 2-component vector of float a})
-0:? 'gl_VertexID' ( in int VertexIndex)
-0:? 'gl_InstanceID' ( in int InstanceIndex)
-
-vk.relaxed.errorcheck.frag
-Shader version: 460
-gl_FragCoord origin is upper left
-0:? Sequence
-0:10 Function Definition: foo( ( global highp 4-component vector of float)
-0:10 Function Parameters:
-0:11 Sequence
-0:11 Branch: Return with expression
-0:11 a: direct index for structure ( uniform highp 4-component vector of float)
-0:11 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a})
-0:11 Constant:
-0:11 0 (const uint)
-0:14 Function Definition: main( ( global void)
-0:14 Function Parameters:
-0:15 Sequence
-0:15 move second child to first child ( temp highp 4-component vector of float)
-0:15 'o' ( out highp 4-component vector of float)
-0:15 add ( temp highp 4-component vector of float)
-0:15 'io' (layout( location=0) smooth in highp 4-component vector of float)
-0:15 Function Call: foo( ( global highp 4-component vector of float)
-0:? Linker Objects
-0:? 'io' (layout( location=0) smooth in highp 4-component vector of float)
-0:? 'o' ( out highp 4-component vector of float)
-0:? 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a})
-
-
-Linked vertex stage:
-
-
-Linked fragment stage:
-
-ERROR: Linking unknown stage stage: Types must match:
- a: " uniform highp 2-component vector of float" versus " uniform highp 4-component vector of float"
-
-Shader version: 460
-0:? Sequence
-0:9 Function Definition: foo( ( global highp 4-component vector of float)
-0:9 Function Parameters:
-0:10 Sequence
-0:10 Branch: Return with expression
-0:10 vector swizzle ( temp highp 4-component vector of float)
-0:10 a: direct index for structure ( uniform highp 2-component vector of float)
-0:10 'anon@0' (layout( column_major std140) uniform block{ uniform highp 2-component vector of float a})
-0:10 Constant:
-0:10 0 (const uint)
-0:10 Sequence
-0:10 Constant:
-0:10 0 (const int)
-0:10 Constant:
-0:10 1 (const int)
-0:10 Constant:
-0:10 0 (const int)
-0:10 Constant:
-0:10 1 (const int)
-0:13 Function Definition: main( ( global void)
-0:13 Function Parameters:
-0:14 Sequence
-0:14 move second child to first child ( temp highp 4-component vector of float)
-0:14 'io' (layout( location=0) smooth out highp 4-component vector of float)
-0:14 Function Call: foo( ( global highp 4-component vector of float)
-0:? Linker Objects
-0:? 'io' (layout( location=0) smooth out highp 4-component vector of float)
-0:? 'anon@0' (layout( column_major std140) uniform block{ uniform highp 2-component vector of float a})
-0:? 'gl_VertexID' ( in int VertexIndex)
-0:? 'gl_InstanceID' ( in int InstanceIndex)
-Shader version: 460
-gl_FragCoord origin is upper left
-0:? Sequence
-0:10 Function Definition: foo( ( global highp 4-component vector of float)
-0:10 Function Parameters:
-0:11 Sequence
-0:11 Branch: Return with expression
-0:11 a: direct index for structure ( uniform highp 4-component vector of float)
-0:11 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a})
-0:11 Constant:
-0:11 0 (const uint)
-0:14 Function Definition: main( ( global void)
-0:14 Function Parameters:
-0:15 Sequence
-0:15 move second child to first child ( temp highp 4-component vector of float)
-0:15 'o' ( out highp 4-component vector of float)
-0:15 add ( temp highp 4-component vector of float)
-0:15 'io' (layout( location=0) smooth in highp 4-component vector of float)
-0:15 Function Call: foo( ( global highp 4-component vector of float)
-0:? Linker Objects
-0:? 'io' (layout( location=0) smooth in highp 4-component vector of float)
-0:? 'o' ( out highp 4-component vector of float)
-0:? 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a})
-
-Validation failed
-SPIR-V is not generated for failed compile or link
diff --git a/third_party/vulkan-deps/glslang/src/Test/baseResults/vk.relaxed.frag.out b/third_party/vulkan-deps/glslang/src/Test/baseResults/vk.relaxed.frag.out
deleted file mode 100644
index d98910e..0000000
--- a/third_party/vulkan-deps/glslang/src/Test/baseResults/vk.relaxed.frag.out
+++ /dev/null
@@ -1,826 +0,0 @@
-vk.relaxed.frag
-WARNING: 0:7: 'b' : Ignoring initializer for uniform
-WARNING: 0:8: 'c' : ignoring layout qualifier for uniform location
-
-Shader version: 460
-gl_FragCoord origin is upper left
-0:? Sequence
-0:36 Function Definition: bar( ( global highp uint)
-0:36 Function Parameters:
-0:37 Sequence
-0:37 Sequence
-0:37 move second child to first child ( temp highp uint)
-0:37 'j' ( temp highp uint)
-0:37 Constant:
-0:37 0 (const uint)
-0:38 move second child to first child ( temp highp uint)
-0:38 'j' ( temp highp uint)
-0:38 AtomicAdd ( global highp uint)
-0:38 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:38 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:38 Constant:
-0:38 0 (const uint)
-0:38 Constant:
-0:38 1 (const uint)
-0:39 move second child to first child ( temp highp uint)
-0:39 'j' ( temp highp uint)
-0:39 subtract ( temp highp uint)
-0:39 AtomicAdd ( global highp uint)
-0:39 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:39 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:39 Constant:
-0:39 0 (const uint)
-0:39 Constant:
-0:39 4294967295 (const uint)
-0:39 Constant:
-0:39 1 (const uint)
-0:40 move second child to first child ( temp highp uint)
-0:40 'j' ( temp highp uint)
-0:40 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:40 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:40 Constant:
-0:40 0 (const uint)
-0:42 move second child to first child ( temp highp uint)
-0:42 'j' ( temp highp uint)
-0:42 AtomicAdd ( global highp uint)
-0:42 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:42 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:42 Constant:
-0:42 0 (const uint)
-0:42 Constant:
-0:42 1 (const uint)
-0:43 move second child to first child ( temp highp uint)
-0:43 'j' ( temp highp uint)
-0:43 AtomicAdd ( global highp uint)
-0:43 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:43 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:43 Constant:
-0:43 0 (const uint)
-0:43 Constant:
-0:43 4294967295 (const uint)
-0:44 move second child to first child ( temp highp uint)
-0:44 'j' ( temp highp uint)
-0:44 AtomicSubtract ( global highp uint)
-0:44 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:44 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:44 Constant:
-0:44 0 (const uint)
-0:44 Constant:
-0:44 1 (const uint)
-0:46 move second child to first child ( temp highp uint)
-0:46 'j' ( temp highp uint)
-0:46 AtomicMin ( global highp uint)
-0:46 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:46 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:46 Constant:
-0:46 0 (const uint)
-0:46 'j' ( temp highp uint)
-0:47 move second child to first child ( temp highp uint)
-0:47 'j' ( temp highp uint)
-0:47 AtomicMax ( global highp uint)
-0:47 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:47 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:47 Constant:
-0:47 0 (const uint)
-0:47 'j' ( temp highp uint)
-0:48 move second child to first child ( temp highp uint)
-0:48 'j' ( temp highp uint)
-0:48 AtomicAnd ( global highp uint)
-0:48 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:48 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:48 Constant:
-0:48 0 (const uint)
-0:48 'j' ( temp highp uint)
-0:50 move second child to first child ( temp highp uint)
-0:50 'j' ( temp highp uint)
-0:50 AtomicOr ( global highp uint)
-0:50 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:50 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:50 Constant:
-0:50 0 (const uint)
-0:50 'j' ( temp highp uint)
-0:51 move second child to first child ( temp highp uint)
-0:51 'j' ( temp highp uint)
-0:51 AtomicXor ( global highp uint)
-0:51 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:51 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:51 Constant:
-0:51 0 (const uint)
-0:51 'j' ( temp highp uint)
-0:53 move second child to first child ( temp highp uint)
-0:53 'j' ( temp highp uint)
-0:53 AtomicExchange ( global highp uint)
-0:53 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:53 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:53 Constant:
-0:53 0 (const uint)
-0:53 'j' ( temp highp uint)
-0:54 move second child to first child ( temp highp uint)
-0:54 'j' ( temp highp uint)
-0:54 AtomicCompSwap ( global highp uint)
-0:54 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:54 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:54 Constant:
-0:54 0 (const uint)
-0:54 Constant:
-0:54 0 (const uint)
-0:54 'j' ( temp highp uint)
-0:56 AtomicAdd ( global highp uint)
-0:56 counter2: direct index for structure ( coherent volatile buffer highp uint)
-0:56 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:56 Constant:
-0:56 1 (const uint)
-0:56 Constant:
-0:56 1 (const uint)
-0:57 AtomicAdd ( global highp uint)
-0:57 counter3: direct index for structure ( coherent volatile buffer highp uint)
-0:57 'anon@3' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3})
-0:57 Constant:
-0:57 0 (const uint)
-0:57 Constant:
-0:57 1 (const uint)
-0:59 MemoryBarrierBuffer ( global void)
-0:61 Branch: Return with expression
-0:61 'j' ( temp highp uint)
-0:64 Function Definition: foo( ( global highp 4-component vector of float)
-0:64 Function Parameters:
-0:65 Sequence
-0:65 Sequence
-0:65 move second child to first child ( temp highp float)
-0:65 'f' ( temp highp float)
-0:65 add ( temp highp float)
-0:65 add ( temp highp float)
-0:65 add ( temp highp float)
-0:65 j: direct index for structure (layout( column_major std140) uniform highp float)
-0:65 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp float j, layout( column_major std140) uniform highp 4-component vector of float k})
-0:65 Constant:
-0:65 0 (const uint)
-0:65 j: direct index for structure (layout( column_major std430) buffer highp float)
-0:65 'bufferInstance' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float j, layout( column_major std430) buffer highp 4-component vector of float k})
-0:65 Constant:
-0:65 0 (const int)
-0:65 y: direct index for structure ( global highp float)
-0:65 structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z})
-0:65 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform})
-0:65 Constant:
-0:65 4 (const uint)
-0:65 Constant:
-0:65 1 (const int)
-0:65 Convert uint to float ( temp highp float)
-0:65 z: direct index for structure ( global highp uint)
-0:65 structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z})
-0:65 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform})
-0:65 Constant:
-0:65 4 (const uint)
-0:65 Constant:
-0:65 2 (const int)
-0:66 Sequence
-0:66 move second child to first child ( temp highp 2-component vector of float)
-0:66 'v2' ( temp highp 2-component vector of float)
-0:66 add ( temp highp 2-component vector of float)
-0:66 add ( temp highp 2-component vector of float)
-0:66 b: direct index for structure ( uniform highp 2-component vector of float)
-0:66 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform})
-0:66 Constant:
-0:66 1 (const uint)
-0:66 c: direct index for structure ( uniform highp 2-component vector of float)
-0:66 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform})
-0:66 Constant:
-0:66 2 (const uint)
-0:66 x: direct index for structure ( global highp 2-component vector of float)
-0:66 structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z})
-0:66 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform})
-0:66 Constant:
-0:66 4 (const uint)
-0:66 Constant:
-0:66 0 (const int)
-0:67 Sequence
-0:67 move second child to first child ( temp highp 4-component vector of float)
-0:67 'v4' ( temp highp 4-component vector of float)
-0:67 add ( temp highp 4-component vector of float)
-0:67 add ( temp highp 4-component vector of float)
-0:67 add ( temp highp 4-component vector of float)
-0:67 add ( temp highp 4-component vector of float)
-0:67 add ( temp highp 4-component vector of float)
-0:67 add ( temp highp 4-component vector of float)
-0:67 a: direct index for structure ( uniform highp 4-component vector of float)
-0:67 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform})
-0:67 Constant:
-0:67 0 (const uint)
-0:67 direct index ( temp highp 4-component vector of float)
-0:67 d: direct index for structure ( uniform 10-element array of highp 4-component vector of float)
-0:67 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform})
-0:67 Constant:
-0:67 3 (const uint)
-0:67 Constant:
-0:67 0 (const int)
-0:67 direct index ( temp highp 4-component vector of float)
-0:67 d: direct index for structure ( uniform 10-element array of highp 4-component vector of float)
-0:67 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform})
-0:67 Constant:
-0:67 3 (const uint)
-0:67 Constant:
-0:67 1 (const int)
-0:67 direct index ( temp highp 4-component vector of float)
-0:67 d: direct index for structure ( uniform 10-element array of highp 4-component vector of float)
-0:67 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform})
-0:67 Constant:
-0:67 3 (const uint)
-0:67 Constant:
-0:67 2 (const int)
-0:67 k: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float)
-0:67 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp float j, layout( column_major std140) uniform highp 4-component vector of float k})
-0:67 Constant:
-0:67 1 (const uint)
-0:67 k: direct index for structure (layout( column_major std430) buffer highp 4-component vector of float)
-0:67 'bufferInstance' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float j, layout( column_major std430) buffer highp 4-component vector of float k})
-0:67 Constant:
-0:67 1 (const int)
-0:67 texture ( global highp 4-component vector of float)
-0:67 't1' ( uniform highp sampler2D)
-0:67 Constant:
-0:67 0.000000
-0:67 0.000000
-0:68 Branch: Return with expression
-0:68 component-wise multiply ( temp highp 4-component vector of float)
-0:68 component-wise multiply ( temp highp 4-component vector of float)
-0:68 Construct vec4 ( temp highp 4-component vector of float)
-0:68 'f' ( temp highp float)
-0:68 Construct vec4 ( temp highp 4-component vector of float)
-0:68 'v2' ( temp highp 2-component vector of float)
-0:68 Constant:
-0:68 1.000000
-0:68 Constant:
-0:68 1.000000
-0:68 'v4' ( temp highp 4-component vector of float)
-0:71 Function Definition: main( ( global void)
-0:71 Function Parameters:
-0:72 Sequence
-0:72 Sequence
-0:72 move second child to first child ( temp highp float)
-0:72 'j' ( temp highp float)
-0:72 Convert uint to float ( temp highp float)
-0:72 Function Call: bar( ( global highp uint)
-0:73 move second child to first child ( temp highp 4-component vector of float)
-0:73 'o' ( out highp 4-component vector of float)
-0:73 vector-scale ( temp highp 4-component vector of float)
-0:73 'j' ( temp highp float)
-0:73 Function Call: foo( ( global highp 4-component vector of float)
-0:? Linker Objects
-0:? 'o' ( out highp 4-component vector of float)
-0:? 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform})
-0:? 't1' ( uniform highp sampler2D)
-0:? 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp float j, layout( column_major std140) uniform highp 4-component vector of float k})
-0:? 'bufferInstance' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float j, layout( column_major std430) buffer highp 4-component vector of float k})
-0:? 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:? 'anon@3' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3})
-
-
-Linked fragment stage:
-
-
-Shader version: 460
-gl_FragCoord origin is upper left
-0:? Sequence
-0:36 Function Definition: bar( ( global highp uint)
-0:36 Function Parameters:
-0:37 Sequence
-0:37 Sequence
-0:37 move second child to first child ( temp highp uint)
-0:37 'j' ( temp highp uint)
-0:37 Constant:
-0:37 0 (const uint)
-0:38 move second child to first child ( temp highp uint)
-0:38 'j' ( temp highp uint)
-0:38 AtomicAdd ( global highp uint)
-0:38 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:38 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:38 Constant:
-0:38 0 (const uint)
-0:38 Constant:
-0:38 1 (const uint)
-0:39 move second child to first child ( temp highp uint)
-0:39 'j' ( temp highp uint)
-0:39 subtract ( temp highp uint)
-0:39 AtomicAdd ( global highp uint)
-0:39 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:39 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:39 Constant:
-0:39 0 (const uint)
-0:39 Constant:
-0:39 4294967295 (const uint)
-0:39 Constant:
-0:39 1 (const uint)
-0:40 move second child to first child ( temp highp uint)
-0:40 'j' ( temp highp uint)
-0:40 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:40 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:40 Constant:
-0:40 0 (const uint)
-0:42 move second child to first child ( temp highp uint)
-0:42 'j' ( temp highp uint)
-0:42 AtomicAdd ( global highp uint)
-0:42 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:42 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:42 Constant:
-0:42 0 (const uint)
-0:42 Constant:
-0:42 1 (const uint)
-0:43 move second child to first child ( temp highp uint)
-0:43 'j' ( temp highp uint)
-0:43 AtomicAdd ( global highp uint)
-0:43 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:43 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:43 Constant:
-0:43 0 (const uint)
-0:43 Constant:
-0:43 4294967295 (const uint)
-0:44 move second child to first child ( temp highp uint)
-0:44 'j' ( temp highp uint)
-0:44 AtomicSubtract ( global highp uint)
-0:44 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:44 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:44 Constant:
-0:44 0 (const uint)
-0:44 Constant:
-0:44 1 (const uint)
-0:46 move second child to first child ( temp highp uint)
-0:46 'j' ( temp highp uint)
-0:46 AtomicMin ( global highp uint)
-0:46 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:46 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:46 Constant:
-0:46 0 (const uint)
-0:46 'j' ( temp highp uint)
-0:47 move second child to first child ( temp highp uint)
-0:47 'j' ( temp highp uint)
-0:47 AtomicMax ( global highp uint)
-0:47 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:47 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:47 Constant:
-0:47 0 (const uint)
-0:47 'j' ( temp highp uint)
-0:48 move second child to first child ( temp highp uint)
-0:48 'j' ( temp highp uint)
-0:48 AtomicAnd ( global highp uint)
-0:48 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:48 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:48 Constant:
-0:48 0 (const uint)
-0:48 'j' ( temp highp uint)
-0:50 move second child to first child ( temp highp uint)
-0:50 'j' ( temp highp uint)
-0:50 AtomicOr ( global highp uint)
-0:50 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:50 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:50 Constant:
-0:50 0 (const uint)
-0:50 'j' ( temp highp uint)
-0:51 move second child to first child ( temp highp uint)
-0:51 'j' ( temp highp uint)
-0:51 AtomicXor ( global highp uint)
-0:51 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:51 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:51 Constant:
-0:51 0 (const uint)
-0:51 'j' ( temp highp uint)
-0:53 move second child to first child ( temp highp uint)
-0:53 'j' ( temp highp uint)
-0:53 AtomicExchange ( global highp uint)
-0:53 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:53 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:53 Constant:
-0:53 0 (const uint)
-0:53 'j' ( temp highp uint)
-0:54 move second child to first child ( temp highp uint)
-0:54 'j' ( temp highp uint)
-0:54 AtomicCompSwap ( global highp uint)
-0:54 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:54 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:54 Constant:
-0:54 0 (const uint)
-0:54 Constant:
-0:54 0 (const uint)
-0:54 'j' ( temp highp uint)
-0:56 AtomicAdd ( global highp uint)
-0:56 counter2: direct index for structure ( coherent volatile buffer highp uint)
-0:56 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:56 Constant:
-0:56 1 (const uint)
-0:56 Constant:
-0:56 1 (const uint)
-0:57 AtomicAdd ( global highp uint)
-0:57 counter3: direct index for structure ( coherent volatile buffer highp uint)
-0:57 'anon@3' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3})
-0:57 Constant:
-0:57 0 (const uint)
-0:57 Constant:
-0:57 1 (const uint)
-0:59 MemoryBarrierBuffer ( global void)
-0:61 Branch: Return with expression
-0:61 'j' ( temp highp uint)
-0:64 Function Definition: foo( ( global highp 4-component vector of float)
-0:64 Function Parameters:
-0:65 Sequence
-0:65 Sequence
-0:65 move second child to first child ( temp highp float)
-0:65 'f' ( temp highp float)
-0:65 add ( temp highp float)
-0:65 add ( temp highp float)
-0:65 add ( temp highp float)
-0:65 j: direct index for structure (layout( column_major std140) uniform highp float)
-0:65 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp float j, layout( column_major std140) uniform highp 4-component vector of float k})
-0:65 Constant:
-0:65 0 (const uint)
-0:65 j: direct index for structure (layout( column_major std430) buffer highp float)
-0:65 'bufferInstance' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float j, layout( column_major std430) buffer highp 4-component vector of float k})
-0:65 Constant:
-0:65 0 (const int)
-0:65 y: direct index for structure ( global highp float)
-0:65 structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z})
-0:65 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform})
-0:65 Constant:
-0:65 4 (const uint)
-0:65 Constant:
-0:65 1 (const int)
-0:65 Convert uint to float ( temp highp float)
-0:65 z: direct index for structure ( global highp uint)
-0:65 structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z})
-0:65 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform})
-0:65 Constant:
-0:65 4 (const uint)
-0:65 Constant:
-0:65 2 (const int)
-0:66 Sequence
-0:66 move second child to first child ( temp highp 2-component vector of float)
-0:66 'v2' ( temp highp 2-component vector of float)
-0:66 add ( temp highp 2-component vector of float)
-0:66 add ( temp highp 2-component vector of float)
-0:66 b: direct index for structure ( uniform highp 2-component vector of float)
-0:66 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform})
-0:66 Constant:
-0:66 1 (const uint)
-0:66 c: direct index for structure ( uniform highp 2-component vector of float)
-0:66 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform})
-0:66 Constant:
-0:66 2 (const uint)
-0:66 x: direct index for structure ( global highp 2-component vector of float)
-0:66 structUniform: direct index for structure ( uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z})
-0:66 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform})
-0:66 Constant:
-0:66 4 (const uint)
-0:66 Constant:
-0:66 0 (const int)
-0:67 Sequence
-0:67 move second child to first child ( temp highp 4-component vector of float)
-0:67 'v4' ( temp highp 4-component vector of float)
-0:67 add ( temp highp 4-component vector of float)
-0:67 add ( temp highp 4-component vector of float)
-0:67 add ( temp highp 4-component vector of float)
-0:67 add ( temp highp 4-component vector of float)
-0:67 add ( temp highp 4-component vector of float)
-0:67 add ( temp highp 4-component vector of float)
-0:67 a: direct index for structure ( uniform highp 4-component vector of float)
-0:67 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform})
-0:67 Constant:
-0:67 0 (const uint)
-0:67 direct index ( temp highp 4-component vector of float)
-0:67 d: direct index for structure ( uniform 10-element array of highp 4-component vector of float)
-0:67 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform})
-0:67 Constant:
-0:67 3 (const uint)
-0:67 Constant:
-0:67 0 (const int)
-0:67 direct index ( temp highp 4-component vector of float)
-0:67 d: direct index for structure ( uniform 10-element array of highp 4-component vector of float)
-0:67 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform})
-0:67 Constant:
-0:67 3 (const uint)
-0:67 Constant:
-0:67 1 (const int)
-0:67 direct index ( temp highp 4-component vector of float)
-0:67 d: direct index for structure ( uniform 10-element array of highp 4-component vector of float)
-0:67 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform})
-0:67 Constant:
-0:67 3 (const uint)
-0:67 Constant:
-0:67 2 (const int)
-0:67 k: direct index for structure (layout( column_major std140) uniform highp 4-component vector of float)
-0:67 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp float j, layout( column_major std140) uniform highp 4-component vector of float k})
-0:67 Constant:
-0:67 1 (const uint)
-0:67 k: direct index for structure (layout( column_major std430) buffer highp 4-component vector of float)
-0:67 'bufferInstance' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float j, layout( column_major std430) buffer highp 4-component vector of float k})
-0:67 Constant:
-0:67 1 (const int)
-0:67 texture ( global highp 4-component vector of float)
-0:67 't1' ( uniform highp sampler2D)
-0:67 Constant:
-0:67 0.000000
-0:67 0.000000
-0:68 Branch: Return with expression
-0:68 component-wise multiply ( temp highp 4-component vector of float)
-0:68 component-wise multiply ( temp highp 4-component vector of float)
-0:68 Construct vec4 ( temp highp 4-component vector of float)
-0:68 'f' ( temp highp float)
-0:68 Construct vec4 ( temp highp 4-component vector of float)
-0:68 'v2' ( temp highp 2-component vector of float)
-0:68 Constant:
-0:68 1.000000
-0:68 Constant:
-0:68 1.000000
-0:68 'v4' ( temp highp 4-component vector of float)
-0:71 Function Definition: main( ( global void)
-0:71 Function Parameters:
-0:72 Sequence
-0:72 Sequence
-0:72 move second child to first child ( temp highp float)
-0:72 'j' ( temp highp float)
-0:72 Convert uint to float ( temp highp float)
-0:72 Function Call: bar( ( global highp uint)
-0:73 move second child to first child ( temp highp 4-component vector of float)
-0:73 'o' ( out highp 4-component vector of float)
-0:73 vector-scale ( temp highp 4-component vector of float)
-0:73 'j' ( temp highp float)
-0:73 Function Call: foo( ( global highp 4-component vector of float)
-0:? Linker Objects
-0:? 'o' ( out highp 4-component vector of float)
-0:? 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b, uniform highp 2-component vector of float c, uniform 10-element array of highp 4-component vector of float d, uniform structure{ global highp 2-component vector of float x, global highp float y, global highp uint z} structUniform})
-0:? 't1' ( uniform highp sampler2D)
-0:? 'anon@1' (layout( column_major std140) uniform block{layout( column_major std140) uniform highp float j, layout( column_major std140) uniform highp 4-component vector of float k})
-0:? 'bufferInstance' (layout( column_major std430) buffer block{layout( column_major std430) buffer highp float j, layout( column_major std430) buffer highp 4-component vector of float k})
-0:? 'anon@2' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:? 'anon@3' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3})
-
-// Module Version 10000
-// Generated by (magic number): 8000a
-// Id's are bound by 163
-
- Capability Shader
- 1: ExtInstImport "GLSL.std.450"
- MemoryModel Logical GLSL450
- EntryPoint Fragment 4 "main" 159
- ExecutionMode 4 OriginUpperLeft
- Source GLSL 460
- Name 4 "main"
- Name 8 "bar("
- Name 13 "foo("
- Name 16 "j"
- Name 18 "gl_AtomicCounterBlock_0"
- MemberName 18(gl_AtomicCounterBlock_0) 0 "counter1"
- MemberName 18(gl_AtomicCounterBlock_0) 1 "counter2"
- Name 20 ""
- Name 63 "gl_AtomicCounterBlock_1"
- MemberName 63(gl_AtomicCounterBlock_1) 0 "counter3"
- Name 65 ""
- Name 73 "f"
- Name 74 "UniformBlock"
- MemberName 74(UniformBlock) 0 "j"
- MemberName 74(UniformBlock) 1 "k"
- Name 76 ""
- Name 80 "BufferBlock"
- MemberName 80(BufferBlock) 0 "j"
- MemberName 80(BufferBlock) 1 "k"
- Name 82 "bufferInstance"
- Name 89 "e"
- MemberName 89(e) 0 "x"
- MemberName 89(e) 1 "y"
- MemberName 89(e) 2 "z"
- Name 90 "gl_DefaultUniformBlock"
- MemberName 90(gl_DefaultUniformBlock) 0 "a"
- MemberName 90(gl_DefaultUniformBlock) 1 "b"
- MemberName 90(gl_DefaultUniformBlock) 2 "c"
- MemberName 90(gl_DefaultUniformBlock) 3 "d"
- MemberName 90(gl_DefaultUniformBlock) 4 "structUniform"
- Name 92 ""
- Name 103 "v2"
- Name 114 "v4"
- Name 137 "t1"
- Name 155 "j"
- Name 159 "o"
- MemberDecorate 18(gl_AtomicCounterBlock_0) 0 Coherent
- MemberDecorate 18(gl_AtomicCounterBlock_0) 0 Volatile
- MemberDecorate 18(gl_AtomicCounterBlock_0) 0 Coherent
- MemberDecorate 18(gl_AtomicCounterBlock_0) 0 Offset 0
- MemberDecorate 18(gl_AtomicCounterBlock_0) 1 Coherent
- MemberDecorate 18(gl_AtomicCounterBlock_0) 1 Volatile
- MemberDecorate 18(gl_AtomicCounterBlock_0) 1 Coherent
- MemberDecorate 18(gl_AtomicCounterBlock_0) 1 Offset 4
- Decorate 18(gl_AtomicCounterBlock_0) BufferBlock
- Decorate 20 DescriptorSet 0
- Decorate 20 Binding 4
- MemberDecorate 63(gl_AtomicCounterBlock_1) 0 Coherent
- MemberDecorate 63(gl_AtomicCounterBlock_1) 0 Volatile
- MemberDecorate 63(gl_AtomicCounterBlock_1) 0 Coherent
- MemberDecorate 63(gl_AtomicCounterBlock_1) 0 Offset 0
- Decorate 63(gl_AtomicCounterBlock_1) BufferBlock
- Decorate 65 DescriptorSet 0
- Decorate 65 Binding 5
- MemberDecorate 74(UniformBlock) 0 Offset 0
- MemberDecorate 74(UniformBlock) 1 Offset 16
- Decorate 74(UniformBlock) Block
- Decorate 76 DescriptorSet 0
- Decorate 76 Binding 2
- MemberDecorate 80(BufferBlock) 0 Offset 0
- MemberDecorate 80(BufferBlock) 1 Offset 16
- Decorate 80(BufferBlock) BufferBlock
- Decorate 82(bufferInstance) DescriptorSet 0
- Decorate 82(bufferInstance) Binding 3
- Decorate 88 ArrayStride 16
- MemberDecorate 89(e) 0 Offset 0
- MemberDecorate 89(e) 1 Offset 8
- MemberDecorate 89(e) 2 Offset 12
- MemberDecorate 90(gl_DefaultUniformBlock) 0 Offset 0
- MemberDecorate 90(gl_DefaultUniformBlock) 1 Offset 16
- MemberDecorate 90(gl_DefaultUniformBlock) 2 Offset 24
- MemberDecorate 90(gl_DefaultUniformBlock) 3 Offset 32
- MemberDecorate 90(gl_DefaultUniformBlock) 4 Offset 192
- Decorate 90(gl_DefaultUniformBlock) Block
- Decorate 92 DescriptorSet 0
- Decorate 92 Binding 0
- Decorate 137(t1) DescriptorSet 0
- Decorate 137(t1) Binding 1
- Decorate 159(o) Location 0
- 2: TypeVoid
- 3: TypeFunction 2
- 6: TypeInt 32 0
- 7: TypeFunction 6(int)
- 10: TypeFloat 32
- 11: TypeVector 10(float) 4
- 12: TypeFunction 11(fvec4)
- 15: TypePointer Function 6(int)
- 17: 6(int) Constant 0
-18(gl_AtomicCounterBlock_0): TypeStruct 6(int) 6(int)
- 19: TypePointer Uniform 18(gl_AtomicCounterBlock_0)
- 20: 19(ptr) Variable Uniform
- 21: TypeInt 32 1
- 22: 21(int) Constant 0
- 23: TypePointer Uniform 6(int)
- 25: 6(int) Constant 1
- 28: 6(int) Constant 4294967295
- 60: 21(int) Constant 1
-63(gl_AtomicCounterBlock_1): TypeStruct 6(int)
- 64: TypePointer Uniform 63(gl_AtomicCounterBlock_1)
- 65: 64(ptr) Variable Uniform
- 68: 6(int) Constant 72
- 72: TypePointer Function 10(float)
-74(UniformBlock): TypeStruct 10(float) 11(fvec4)
- 75: TypePointer Uniform 74(UniformBlock)
- 76: 75(ptr) Variable Uniform
- 77: TypePointer Uniform 10(float)
- 80(BufferBlock): TypeStruct 10(float) 11(fvec4)
- 81: TypePointer Uniform 80(BufferBlock)
-82(bufferInstance): 81(ptr) Variable Uniform
- 86: TypeVector 10(float) 2
- 87: 6(int) Constant 10
- 88: TypeArray 11(fvec4) 87
- 89(e): TypeStruct 86(fvec2) 10(float) 6(int)
-90(gl_DefaultUniformBlock): TypeStruct 11(fvec4) 86(fvec2) 86(fvec2) 88 89(e)
- 91: TypePointer Uniform 90(gl_DefaultUniformBlock)
- 92: 91(ptr) Variable Uniform
- 93: 21(int) Constant 4
- 97: 21(int) Constant 2
- 102: TypePointer Function 86(fvec2)
- 104: TypePointer Uniform 86(fvec2)
- 113: TypePointer Function 11(fvec4)
- 115: TypePointer Uniform 11(fvec4)
- 118: 21(int) Constant 3
- 134: TypeImage 10(float) 2D sampled format:Unknown
- 135: TypeSampledImage 134
- 136: TypePointer UniformConstant 135
- 137(t1): 136(ptr) Variable UniformConstant
- 139: 10(float) Constant 0
- 140: 86(fvec2) ConstantComposite 139 139
- 146: 10(float) Constant 1065353216
- 158: TypePointer Output 11(fvec4)
- 159(o): 158(ptr) Variable Output
- 4(main): 2 Function None 3
- 5: Label
- 155(j): 72(ptr) Variable Function
- 156: 6(int) FunctionCall 8(bar()
- 157: 10(float) ConvertUToF 156
- Store 155(j) 157
- 160: 10(float) Load 155(j)
- 161: 11(fvec4) FunctionCall 13(foo()
- 162: 11(fvec4) VectorTimesScalar 161 160
- Store 159(o) 162
- Return
- FunctionEnd
- 8(bar(): 6(int) Function None 7
- 9: Label
- 16(j): 15(ptr) Variable Function
- Store 16(j) 17
- 24: 23(ptr) AccessChain 20 22
- 26: 6(int) AtomicIAdd 24 25 17 25
- Store 16(j) 26
- 27: 23(ptr) AccessChain 20 22
- 29: 6(int) AtomicIAdd 27 25 17 28
- 30: 6(int) ISub 29 25
- Store 16(j) 30
- 31: 23(ptr) AccessChain 20 22
- 32: 6(int) Load 31
- Store 16(j) 32
- 33: 23(ptr) AccessChain 20 22
- 34: 6(int) AtomicIAdd 33 25 17 25
- Store 16(j) 34
- 35: 23(ptr) AccessChain 20 22
- 36: 6(int) AtomicIAdd 35 25 17 28
- Store 16(j) 36
- 37: 23(ptr) AccessChain 20 22
- 38: 6(int) AtomicISub 37 25 17 25
- Store 16(j) 38
- 39: 23(ptr) AccessChain 20 22
- 40: 6(int) Load 16(j)
- 41: 6(int) AtomicUMin 39 25 17 40
- Store 16(j) 41
- 42: 23(ptr) AccessChain 20 22
- 43: 6(int) Load 16(j)
- 44: 6(int) AtomicUMax 42 25 17 43
- Store 16(j) 44
- 45: 23(ptr) AccessChain 20 22
- 46: 6(int) Load 16(j)
- 47: 6(int) AtomicAnd 45 25 17 46
- Store 16(j) 47
- 48: 23(ptr) AccessChain 20 22
- 49: 6(int) Load 16(j)
- 50: 6(int) AtomicOr 48 25 17 49
- Store 16(j) 50
- 51: 23(ptr) AccessChain 20 22
- 52: 6(int) Load 16(j)
- 53: 6(int) AtomicXor 51 25 17 52
- Store 16(j) 53
- 54: 23(ptr) AccessChain 20 22
- 55: 6(int) Load 16(j)
- 56: 6(int) AtomicExchange 54 25 17 55
- Store 16(j) 56
- 57: 23(ptr) AccessChain 20 22
- 58: 6(int) Load 16(j)
- 59: 6(int) AtomicCompareExchange 57 25 17 17 58 17
- Store 16(j) 59
- 61: 23(ptr) AccessChain 20 60
- 62: 6(int) AtomicIAdd 61 25 17 25
- 66: 23(ptr) AccessChain 65 22
- 67: 6(int) AtomicIAdd 66 25 17 25
- MemoryBarrier 25 68
- 69: 6(int) Load 16(j)
- ReturnValue 69
- FunctionEnd
- 13(foo(): 11(fvec4) Function None 12
- 14: Label
- 73(f): 72(ptr) Variable Function
- 103(v2): 102(ptr) Variable Function
- 114(v4): 113(ptr) Variable Function
- 78: 77(ptr) AccessChain 76 22
- 79: 10(float) Load 78
- 83: 77(ptr) AccessChain 82(bufferInstance) 22
- 84: 10(float) Load 83
- 85: 10(float) FAdd 79 84
- 94: 77(ptr) AccessChain 92 93 60
- 95: 10(float) Load 94
- 96: 10(float) FAdd 85 95
- 98: 23(ptr) AccessChain 92 93 97
- 99: 6(int) Load 98
- 100: 10(float) ConvertUToF 99
- 101: 10(float) FAdd 96 100
- Store 73(f) 101
- 105: 104(ptr) AccessChain 92 60
- 106: 86(fvec2) Load 105
- 107: 104(ptr) AccessChain 92 97
- 108: 86(fvec2) Load 107
- 109: 86(fvec2) FAdd 106 108
- 110: 104(ptr) AccessChain 92 93 22
- 111: 86(fvec2) Load 110
- 112: 86(fvec2) FAdd 109 111
- Store 103(v2) 112
- 116: 115(ptr) AccessChain 92 22
- 117: 11(fvec4) Load 116
- 119: 115(ptr) AccessChain 92 118 22
- 120: 11(fvec4) Load 119
- 121: 11(fvec4) FAdd 117 120
- 122: 115(ptr) AccessChain 92 118 60
- 123: 11(fvec4) Load 122
- 124: 11(fvec4) FAdd 121 123
- 125: 115(ptr) AccessChain 92 118 97
- 126: 11(fvec4) Load 125
- 127: 11(fvec4) FAdd 124 126
- 128: 115(ptr) AccessChain 76 60
- 129: 11(fvec4) Load 128
- 130: 11(fvec4) FAdd 127 129
- 131: 115(ptr) AccessChain 82(bufferInstance) 60
- 132: 11(fvec4) Load 131
- 133: 11(fvec4) FAdd 130 132
- 138: 135 Load 137(t1)
- 141: 11(fvec4) ImageSampleImplicitLod 138 140
- 142: 11(fvec4) FAdd 133 141
- Store 114(v4) 142
- 143: 10(float) Load 73(f)
- 144: 11(fvec4) CompositeConstruct 143 143 143 143
- 145: 86(fvec2) Load 103(v2)
- 147: 10(float) CompositeExtract 145 0
- 148: 10(float) CompositeExtract 145 1
- 149: 11(fvec4) CompositeConstruct 147 148 146 146
- 150: 11(fvec4) FMul 144 149
- 151: 11(fvec4) Load 114(v4)
- 152: 11(fvec4) FMul 150 151
- ReturnValue 152
- FunctionEnd
diff --git a/third_party/vulkan-deps/glslang/src/Test/baseResults/vk.relaxed.link1.frag.out b/third_party/vulkan-deps/glslang/src/Test/baseResults/vk.relaxed.link1.frag.out
deleted file mode 100644
index 9dac4c6..0000000
--- a/third_party/vulkan-deps/glslang/src/Test/baseResults/vk.relaxed.link1.frag.out
+++ /dev/null
@@ -1,515 +0,0 @@
-vk.relaxed.link1.frag
-Shader version: 460
-gl_FragCoord origin is upper left
-0:? Sequence
-0:19 Function Definition: bar( ( global highp 4-component vector of float)
-0:19 Function Parameters:
-0:20 Sequence
-0:20 Sequence
-0:20 move second child to first child ( temp highp uint)
-0:20 'j' ( temp highp uint)
-0:20 add ( temp highp uint)
-0:20 AtomicAdd ( global highp uint)
-0:20 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:20 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:20 Constant:
-0:20 0 (const uint)
-0:20 Constant:
-0:20 1 (const uint)
-0:20 subtract ( temp highp uint)
-0:20 AtomicAdd ( global highp uint)
-0:20 counter2: direct index for structure ( coherent volatile buffer highp uint)
-0:20 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:20 Constant:
-0:20 1 (const uint)
-0:20 Constant:
-0:20 4294967295 (const uint)
-0:20 Constant:
-0:20 1 (const uint)
-0:21 Sequence
-0:21 move second child to first child ( temp highp 4-component vector of float)
-0:21 'v' ( temp highp 4-component vector of float)
-0:21 add ( temp highp 4-component vector of float)
-0:21 add ( temp highp 4-component vector of float)
-0:21 add ( temp highp 4-component vector of float)
-0:21 a: direct index for structure ( uniform highp 4-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:21 Constant:
-0:21 0 (const uint)
-0:21 Construct vec4 ( temp highp 4-component vector of float)
-0:21 direct index ( temp highp float)
-0:21 b1: direct index for structure ( uniform highp 2-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:21 Constant:
-0:21 1 (const uint)
-0:21 Constant:
-0:21 0 (const int)
-0:21 direct index ( temp highp float)
-0:21 b1: direct index for structure ( uniform highp 2-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:21 Constant:
-0:21 1 (const uint)
-0:21 Constant:
-0:21 1 (const int)
-0:21 direct index ( temp highp float)
-0:21 b2: direct index for structure ( uniform highp 2-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:21 Constant:
-0:21 2 (const uint)
-0:21 Constant:
-0:21 0 (const int)
-0:21 direct index ( temp highp float)
-0:21 b2: direct index for structure ( uniform highp 2-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:21 Constant:
-0:21 2 (const uint)
-0:21 Constant:
-0:21 1 (const int)
-0:21 c1: direct index for structure ( uniform highp 4-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:21 Constant:
-0:21 3 (const uint)
-0:21 d: direct index for structure ( uniform highp 4-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:21 Constant:
-0:21 4 (const uint)
-0:23 Branch: Return with expression
-0:23 vector-scale ( temp highp 4-component vector of float)
-0:23 Convert uint to float ( temp highp float)
-0:23 'j' ( temp highp uint)
-0:23 'v' ( temp highp 4-component vector of float)
-0:26 Function Definition: main( ( global void)
-0:26 Function Parameters:
-0:27 Sequence
-0:27 move second child to first child ( temp highp 4-component vector of float)
-0:27 'o' ( out highp 4-component vector of float)
-0:27 add ( temp highp 4-component vector of float)
-0:27 Function Call: foo( ( global highp 4-component vector of float)
-0:27 Function Call: bar( ( global highp 4-component vector of float)
-0:? Linker Objects
-0:? 'o' ( out highp 4-component vector of float)
-0:? 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:? 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-
-vk.relaxed.link2.frag
-Shader version: 460
-gl_FragCoord origin is upper left
-0:? Sequence
-0:14 Function Definition: foo( ( global highp 4-component vector of float)
-0:14 Function Parameters:
-0:15 Sequence
-0:15 Sequence
-0:15 move second child to first child ( temp highp uint)
-0:15 'j' ( temp highp uint)
-0:15 add ( temp highp uint)
-0:15 AtomicAdd ( global highp uint)
-0:15 counter2: direct index for structure ( coherent volatile buffer highp uint)
-0:15 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3, coherent volatile buffer highp uint counter2})
-0:15 Constant:
-0:15 1 (const uint)
-0:15 Constant:
-0:15 1 (const uint)
-0:15 subtract ( temp highp uint)
-0:15 AtomicAdd ( global highp uint)
-0:15 counter3: direct index for structure ( coherent volatile buffer highp uint)
-0:15 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3, coherent volatile buffer highp uint counter2})
-0:15 Constant:
-0:15 0 (const uint)
-0:15 Constant:
-0:15 4294967295 (const uint)
-0:15 Constant:
-0:15 1 (const uint)
-0:16 Sequence
-0:16 move second child to first child ( temp highp 4-component vector of float)
-0:16 'v' ( temp highp 4-component vector of float)
-0:16 add ( temp highp 4-component vector of float)
-0:16 add ( temp highp 4-component vector of float)
-0:16 add ( temp highp 4-component vector of float)
-0:16 a: direct index for structure ( uniform highp 4-component vector of float)
-0:16 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d})
-0:16 Constant:
-0:16 0 (const uint)
-0:16 Construct vec4 ( temp highp 4-component vector of float)
-0:16 direct index ( temp highp float)
-0:16 b1: direct index for structure ( uniform highp 2-component vector of float)
-0:16 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d})
-0:16 Constant:
-0:16 2 (const uint)
-0:16 Constant:
-0:16 0 (const int)
-0:16 direct index ( temp highp float)
-0:16 b1: direct index for structure ( uniform highp 2-component vector of float)
-0:16 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d})
-0:16 Constant:
-0:16 2 (const uint)
-0:16 Constant:
-0:16 1 (const int)
-0:16 direct index ( temp highp float)
-0:16 b2: direct index for structure ( uniform highp 2-component vector of float)
-0:16 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d})
-0:16 Constant:
-0:16 1 (const uint)
-0:16 Constant:
-0:16 0 (const int)
-0:16 direct index ( temp highp float)
-0:16 b2: direct index for structure ( uniform highp 2-component vector of float)
-0:16 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d})
-0:16 Constant:
-0:16 1 (const uint)
-0:16 Constant:
-0:16 1 (const int)
-0:16 c2: direct index for structure ( uniform highp 4-component vector of float)
-0:16 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d})
-0:16 Constant:
-0:16 3 (const uint)
-0:16 d: direct index for structure ( uniform highp 4-component vector of float)
-0:16 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d})
-0:16 Constant:
-0:16 4 (const uint)
-0:18 Branch: Return with expression
-0:18 vector-scale ( temp highp 4-component vector of float)
-0:18 Convert uint to float ( temp highp float)
-0:18 'j' ( temp highp uint)
-0:18 'v' ( temp highp 4-component vector of float)
-0:? Linker Objects
-0:? 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d})
-0:? 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3, coherent volatile buffer highp uint counter2})
-
-
-Linked fragment stage:
-
-
-Shader version: 460
-gl_FragCoord origin is upper left
-0:? Sequence
-0:19 Function Definition: bar( ( global highp 4-component vector of float)
-0:19 Function Parameters:
-0:20 Sequence
-0:20 Sequence
-0:20 move second child to first child ( temp highp uint)
-0:20 'j' ( temp highp uint)
-0:20 add ( temp highp uint)
-0:20 AtomicAdd ( global highp uint)
-0:20 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:20 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2, coherent volatile buffer highp uint counter3})
-0:20 Constant:
-0:20 0 (const uint)
-0:20 Constant:
-0:20 1 (const uint)
-0:20 subtract ( temp highp uint)
-0:20 AtomicAdd ( global highp uint)
-0:20 counter2: direct index for structure ( coherent volatile buffer highp uint)
-0:20 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2, coherent volatile buffer highp uint counter3})
-0:20 Constant:
-0:20 1 (const uint)
-0:20 Constant:
-0:20 4294967295 (const uint)
-0:20 Constant:
-0:20 1 (const uint)
-0:21 Sequence
-0:21 move second child to first child ( temp highp 4-component vector of float)
-0:21 'v' ( temp highp 4-component vector of float)
-0:21 add ( temp highp 4-component vector of float)
-0:21 add ( temp highp 4-component vector of float)
-0:21 add ( temp highp 4-component vector of float)
-0:21 a: direct index for structure ( uniform highp 4-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d, uniform highp 4-component vector of float c2})
-0:21 Constant:
-0:21 0 (const uint)
-0:21 Construct vec4 ( temp highp 4-component vector of float)
-0:21 direct index ( temp highp float)
-0:21 b1: direct index for structure ( uniform highp 2-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d, uniform highp 4-component vector of float c2})
-0:21 Constant:
-0:21 1 (const uint)
-0:21 Constant:
-0:21 0 (const int)
-0:21 direct index ( temp highp float)
-0:21 b1: direct index for structure ( uniform highp 2-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d, uniform highp 4-component vector of float c2})
-0:21 Constant:
-0:21 1 (const uint)
-0:21 Constant:
-0:21 1 (const int)
-0:21 direct index ( temp highp float)
-0:21 b2: direct index for structure ( uniform highp 2-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d, uniform highp 4-component vector of float c2})
-0:21 Constant:
-0:21 2 (const uint)
-0:21 Constant:
-0:21 0 (const int)
-0:21 direct index ( temp highp float)
-0:21 b2: direct index for structure ( uniform highp 2-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d, uniform highp 4-component vector of float c2})
-0:21 Constant:
-0:21 2 (const uint)
-0:21 Constant:
-0:21 1 (const int)
-0:21 c1: direct index for structure ( uniform highp 4-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d, uniform highp 4-component vector of float c2})
-0:21 Constant:
-0:21 3 (const uint)
-0:21 d: direct index for structure ( uniform highp 4-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d, uniform highp 4-component vector of float c2})
-0:21 Constant:
-0:21 4 (const uint)
-0:23 Branch: Return with expression
-0:23 vector-scale ( temp highp 4-component vector of float)
-0:23 Convert uint to float ( temp highp float)
-0:23 'j' ( temp highp uint)
-0:23 'v' ( temp highp 4-component vector of float)
-0:26 Function Definition: main( ( global void)
-0:26 Function Parameters:
-0:27 Sequence
-0:27 move second child to first child ( temp highp 4-component vector of float)
-0:27 'o' ( out highp 4-component vector of float)
-0:27 add ( temp highp 4-component vector of float)
-0:27 Function Call: foo( ( global highp 4-component vector of float)
-0:27 Function Call: bar( ( global highp 4-component vector of float)
-0:14 Function Definition: foo( ( global highp 4-component vector of float)
-0:14 Function Parameters:
-0:15 Sequence
-0:15 Sequence
-0:15 move second child to first child ( temp highp uint)
-0:15 'j' ( temp highp uint)
-0:15 add ( temp highp uint)
-0:15 AtomicAdd ( global highp uint)
-0:15 counter2: direct index for structure ( coherent volatile buffer highp uint)
-0:15 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2, coherent volatile buffer highp uint counter3})
-0:15 Constant:
-0:15 1 (const uint)
-0:15 Constant:
-0:15 1 (const uint)
-0:15 subtract ( temp highp uint)
-0:15 AtomicAdd ( global highp uint)
-0:15 counter3: direct index for structure ( coherent volatile buffer highp uint)
-0:15 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2, coherent volatile buffer highp uint counter3})
-0:15 Constant:
-0:15 2 (const uint)
-0:15 Constant:
-0:15 4294967295 (const uint)
-0:15 Constant:
-0:15 1 (const uint)
-0:16 Sequence
-0:16 move second child to first child ( temp highp 4-component vector of float)
-0:16 'v' ( temp highp 4-component vector of float)
-0:16 add ( temp highp 4-component vector of float)
-0:16 add ( temp highp 4-component vector of float)
-0:16 add ( temp highp 4-component vector of float)
-0:16 a: direct index for structure ( uniform highp 4-component vector of float)
-0:16 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d, uniform highp 4-component vector of float c2})
-0:16 Constant:
-0:16 0 (const uint)
-0:16 Construct vec4 ( temp highp 4-component vector of float)
-0:16 direct index ( temp highp float)
-0:16 b1: direct index for structure ( uniform highp 2-component vector of float)
-0:16 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d, uniform highp 4-component vector of float c2})
-0:16 Constant:
-0:16 1 (const uint)
-0:16 Constant:
-0:16 0 (const int)
-0:16 direct index ( temp highp float)
-0:16 b1: direct index for structure ( uniform highp 2-component vector of float)
-0:16 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d, uniform highp 4-component vector of float c2})
-0:16 Constant:
-0:16 1 (const uint)
-0:16 Constant:
-0:16 1 (const int)
-0:16 direct index ( temp highp float)
-0:16 b2: direct index for structure ( uniform highp 2-component vector of float)
-0:16 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d, uniform highp 4-component vector of float c2})
-0:16 Constant:
-0:16 2 (const uint)
-0:16 Constant:
-0:16 0 (const int)
-0:16 direct index ( temp highp float)
-0:16 b2: direct index for structure ( uniform highp 2-component vector of float)
-0:16 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d, uniform highp 4-component vector of float c2})
-0:16 Constant:
-0:16 2 (const uint)
-0:16 Constant:
-0:16 1 (const int)
-0:16 c2: direct index for structure ( uniform highp 4-component vector of float)
-0:16 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d, uniform highp 4-component vector of float c2})
-0:16 Constant:
-0:16 5 (const uint)
-0:16 d: direct index for structure ( uniform highp 4-component vector of float)
-0:16 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d, uniform highp 4-component vector of float c2})
-0:16 Constant:
-0:16 4 (const uint)
-0:18 Branch: Return with expression
-0:18 vector-scale ( temp highp 4-component vector of float)
-0:18 Convert uint to float ( temp highp float)
-0:18 'j' ( temp highp uint)
-0:18 'v' ( temp highp 4-component vector of float)
-0:? Linker Objects
-0:? 'o' ( out highp 4-component vector of float)
-0:? 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d, uniform highp 4-component vector of float c2})
-0:? 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2, coherent volatile buffer highp uint counter3})
-
-// Module Version 10000
-// Generated by (magic number): 8000a
-// Id's are bound by 105
-
- Capability Shader
- 1: ExtInstImport "GLSL.std.450"
- MemoryModel Logical GLSL450
- EntryPoint Fragment 4 "main" 68
- ExecutionMode 4 OriginUpperLeft
- Source GLSL 460
- Name 4 "main"
- Name 9 "bar("
- Name 11 "foo("
- Name 15 "j"
- Name 16 "gl_AtomicCounterBlock_0"
- MemberName 16(gl_AtomicCounterBlock_0) 0 "counter1"
- MemberName 16(gl_AtomicCounterBlock_0) 1 "counter2"
- MemberName 16(gl_AtomicCounterBlock_0) 2 "counter3"
- Name 18 ""
- Name 33 "v"
- Name 35 "gl_DefaultUniformBlock"
- MemberName 35(gl_DefaultUniformBlock) 0 "a"
- MemberName 35(gl_DefaultUniformBlock) 1 "b1"
- MemberName 35(gl_DefaultUniformBlock) 2 "b2"
- MemberName 35(gl_DefaultUniformBlock) 3 "c1"
- MemberName 35(gl_DefaultUniformBlock) 4 "d"
- MemberName 35(gl_DefaultUniformBlock) 5 "c2"
- Name 37 ""
- Name 68 "o"
- Name 72 "j"
- Name 79 "v"
- MemberDecorate 16(gl_AtomicCounterBlock_0) 0 Coherent
- MemberDecorate 16(gl_AtomicCounterBlock_0) 0 Volatile
- MemberDecorate 16(gl_AtomicCounterBlock_0) 0 Coherent
- MemberDecorate 16(gl_AtomicCounterBlock_0) 0 Offset 0
- MemberDecorate 16(gl_AtomicCounterBlock_0) 1 Coherent
- MemberDecorate 16(gl_AtomicCounterBlock_0) 1 Volatile
- MemberDecorate 16(gl_AtomicCounterBlock_0) 1 Coherent
- MemberDecorate 16(gl_AtomicCounterBlock_0) 1 Offset 4
- MemberDecorate 16(gl_AtomicCounterBlock_0) 2 Coherent
- MemberDecorate 16(gl_AtomicCounterBlock_0) 2 Volatile
- MemberDecorate 16(gl_AtomicCounterBlock_0) 2 Coherent
- MemberDecorate 16(gl_AtomicCounterBlock_0) 2 Offset 8
- Decorate 16(gl_AtomicCounterBlock_0) BufferBlock
- Decorate 18 DescriptorSet 0
- Decorate 18 Binding 1
- MemberDecorate 35(gl_DefaultUniformBlock) 0 Offset 0
- MemberDecorate 35(gl_DefaultUniformBlock) 1 Offset 16
- MemberDecorate 35(gl_DefaultUniformBlock) 2 Offset 24
- MemberDecorate 35(gl_DefaultUniformBlock) 3 Offset 32
- MemberDecorate 35(gl_DefaultUniformBlock) 4 Offset 48
- MemberDecorate 35(gl_DefaultUniformBlock) 5 Offset 64
- Decorate 35(gl_DefaultUniformBlock) Block
- Decorate 37 DescriptorSet 0
- Decorate 37 Binding 0
- Decorate 68(o) Location 0
- 2: TypeVoid
- 3: TypeFunction 2
- 6: TypeFloat 32
- 7: TypeVector 6(float) 4
- 8: TypeFunction 7(fvec4)
- 13: TypeInt 32 0
- 14: TypePointer Function 13(int)
-16(gl_AtomicCounterBlock_0): TypeStruct 13(int) 13(int) 13(int)
- 17: TypePointer Uniform 16(gl_AtomicCounterBlock_0)
- 18: 17(ptr) Variable Uniform
- 19: TypeInt 32 1
- 20: 19(int) Constant 0
- 21: TypePointer Uniform 13(int)
- 23: 13(int) Constant 1
- 24: 13(int) Constant 0
- 26: 19(int) Constant 1
- 28: 13(int) Constant 4294967295
- 32: TypePointer Function 7(fvec4)
- 34: TypeVector 6(float) 2
-35(gl_DefaultUniformBlock): TypeStruct 7(fvec4) 34(fvec2) 34(fvec2) 7(fvec4) 7(fvec4) 7(fvec4)
- 36: TypePointer Uniform 35(gl_DefaultUniformBlock)
- 37: 36(ptr) Variable Uniform
- 38: TypePointer Uniform 7(fvec4)
- 41: TypePointer Uniform 6(float)
- 46: 19(int) Constant 2
- 53: 19(int) Constant 3
- 57: 19(int) Constant 4
- 67: TypePointer Output 7(fvec4)
- 68(o): 67(ptr) Variable Output
- 92: 19(int) Constant 5
- 4(main): 2 Function None 3
- 5: Label
- 69: 7(fvec4) FunctionCall 11(foo()
- 70: 7(fvec4) FunctionCall 9(bar()
- 71: 7(fvec4) FAdd 69 70
- Store 68(o) 71
- Return
- FunctionEnd
- 9(bar(): 7(fvec4) Function None 8
- 10: Label
- 15(j): 14(ptr) Variable Function
- 33(v): 32(ptr) Variable Function
- 22: 21(ptr) AccessChain 18 20
- 25: 13(int) AtomicIAdd 22 23 24 23
- 27: 21(ptr) AccessChain 18 26
- 29: 13(int) AtomicIAdd 27 23 24 28
- 30: 13(int) ISub 29 23
- 31: 13(int) IAdd 25 30
- Store 15(j) 31
- 39: 38(ptr) AccessChain 37 20
- 40: 7(fvec4) Load 39
- 42: 41(ptr) AccessChain 37 26 24
- 43: 6(float) Load 42
- 44: 41(ptr) AccessChain 37 26 23
- 45: 6(float) Load 44
- 47: 41(ptr) AccessChain 37 46 24
- 48: 6(float) Load 47
- 49: 41(ptr) AccessChain 37 46 23
- 50: 6(float) Load 49
- 51: 7(fvec4) CompositeConstruct 43 45 48 50
- 52: 7(fvec4) FAdd 40 51
- 54: 38(ptr) AccessChain 37 53
- 55: 7(fvec4) Load 54
- 56: 7(fvec4) FAdd 52 55
- 58: 38(ptr) AccessChain 37 57
- 59: 7(fvec4) Load 58
- 60: 7(fvec4) FAdd 56 59
- Store 33(v) 60
- 61: 13(int) Load 15(j)
- 62: 6(float) ConvertUToF 61
- 63: 7(fvec4) Load 33(v)
- 64: 7(fvec4) VectorTimesScalar 63 62
- ReturnValue 64
- FunctionEnd
- 11(foo(): 7(fvec4) Function None 8
- 12: Label
- 72(j): 14(ptr) Variable Function
- 79(v): 32(ptr) Variable Function
- 73: 21(ptr) AccessChain 18 26
- 74: 13(int) AtomicIAdd 73 23 24 23
- 75: 21(ptr) AccessChain 18 46
- 76: 13(int) AtomicIAdd 75 23 24 28
- 77: 13(int) ISub 76 23
- 78: 13(int) IAdd 74 77
- Store 72(j) 78
- 80: 38(ptr) AccessChain 37 20
- 81: 7(fvec4) Load 80
- 82: 41(ptr) AccessChain 37 26 24
- 83: 6(float) Load 82
- 84: 41(ptr) AccessChain 37 26 23
- 85: 6(float) Load 84
- 86: 41(ptr) AccessChain 37 46 24
- 87: 6(float) Load 86
- 88: 41(ptr) AccessChain 37 46 23
- 89: 6(float) Load 88
- 90: 7(fvec4) CompositeConstruct 83 85 87 89
- 91: 7(fvec4) FAdd 81 90
- 93: 38(ptr) AccessChain 37 92
- 94: 7(fvec4) Load 93
- 95: 7(fvec4) FAdd 91 94
- 96: 38(ptr) AccessChain 37 57
- 97: 7(fvec4) Load 96
- 98: 7(fvec4) FAdd 95 97
- Store 79(v) 98
- 99: 13(int) Load 72(j)
- 100: 6(float) ConvertUToF 99
- 101: 7(fvec4) Load 79(v)
- 102: 7(fvec4) VectorTimesScalar 101 100
- ReturnValue 102
- FunctionEnd
diff --git a/third_party/vulkan-deps/glslang/src/Test/baseResults/vk.relaxed.stagelink.vert.out b/third_party/vulkan-deps/glslang/src/Test/baseResults/vk.relaxed.stagelink.vert.out
deleted file mode 100644
index a63f10c..0000000
--- a/third_party/vulkan-deps/glslang/src/Test/baseResults/vk.relaxed.stagelink.vert.out
+++ /dev/null
@@ -1,717 +0,0 @@
-vk.relaxed.stagelink.vert
-Shader version: 460
-0:? Sequence
-0:18 Function Definition: foo( ( global highp 4-component vector of float)
-0:18 Function Parameters:
-0:19 Sequence
-0:19 Sequence
-0:19 move second child to first child ( temp highp uint)
-0:19 'j' ( temp highp uint)
-0:19 add ( temp highp uint)
-0:19 AtomicAdd ( global highp uint)
-0:19 counter2: direct index for structure ( coherent volatile buffer highp uint)
-0:19 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3, coherent volatile buffer highp uint counter2})
-0:19 Constant:
-0:19 1 (const uint)
-0:19 Constant:
-0:19 1 (const uint)
-0:19 subtract ( temp highp uint)
-0:19 AtomicAdd ( global highp uint)
-0:19 counter3: direct index for structure ( coherent volatile buffer highp uint)
-0:19 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3, coherent volatile buffer highp uint counter2})
-0:19 Constant:
-0:19 0 (const uint)
-0:19 Constant:
-0:19 4294967295 (const uint)
-0:19 Constant:
-0:19 1 (const uint)
-0:20 Sequence
-0:20 move second child to first child ( temp highp 4-component vector of float)
-0:20 'v' ( temp highp 4-component vector of float)
-0:20 add ( temp highp 4-component vector of float)
-0:20 add ( temp highp 4-component vector of float)
-0:20 add ( temp highp 4-component vector of float)
-0:20 a: direct index for structure ( uniform highp 4-component vector of float)
-0:20 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d, uniform 4-element array of highp 4-component vector of float s})
-0:20 Constant:
-0:20 0 (const uint)
-0:20 Construct vec4 ( temp highp 4-component vector of float)
-0:20 direct index ( temp highp float)
-0:20 b1: direct index for structure ( uniform highp 2-component vector of float)
-0:20 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d, uniform 4-element array of highp 4-component vector of float s})
-0:20 Constant:
-0:20 2 (const uint)
-0:20 Constant:
-0:20 0 (const int)
-0:20 direct index ( temp highp float)
-0:20 b1: direct index for structure ( uniform highp 2-component vector of float)
-0:20 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d, uniform 4-element array of highp 4-component vector of float s})
-0:20 Constant:
-0:20 2 (const uint)
-0:20 Constant:
-0:20 1 (const int)
-0:20 direct index ( temp highp float)
-0:20 b2: direct index for structure ( uniform highp 2-component vector of float)
-0:20 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d, uniform 4-element array of highp 4-component vector of float s})
-0:20 Constant:
-0:20 1 (const uint)
-0:20 Constant:
-0:20 0 (const int)
-0:20 direct index ( temp highp float)
-0:20 b2: direct index for structure ( uniform highp 2-component vector of float)
-0:20 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d, uniform 4-element array of highp 4-component vector of float s})
-0:20 Constant:
-0:20 1 (const uint)
-0:20 Constant:
-0:20 1 (const int)
-0:20 c2: direct index for structure ( uniform highp 4-component vector of float)
-0:20 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d, uniform 4-element array of highp 4-component vector of float s})
-0:20 Constant:
-0:20 3 (const uint)
-0:20 d: direct index for structure ( uniform highp 4-component vector of float)
-0:20 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d, uniform 4-element array of highp 4-component vector of float s})
-0:20 Constant:
-0:20 4 (const uint)
-0:22 Branch: Return with expression
-0:22 vector-scale ( temp highp 4-component vector of float)
-0:22 Convert uint to float ( temp highp float)
-0:22 'j' ( temp highp uint)
-0:22 'v' ( temp highp 4-component vector of float)
-0:25 Function Definition: main( ( global void)
-0:25 Function Parameters:
-0:27 Sequence
-0:27 Sequence
-0:27 move second child to first child ( temp highp 4-component vector of float)
-0:27 'v' ( temp highp 4-component vector of float)
-0:27 Function Call: foo( ( global highp 4-component vector of float)
-0:28 move second child to first child ( temp highp 4-component vector of float)
-0:28 'v' ( temp highp 4-component vector of float)
-0:28 add ( temp highp 4-component vector of float)
-0:28 'v' ( temp highp 4-component vector of float)
-0:28 indirect index ( temp highp 4-component vector of float)
-0:28 s: direct index for structure ( uniform 4-element array of highp 4-component vector of float)
-0:28 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d, uniform 4-element array of highp 4-component vector of float s})
-0:28 Constant:
-0:28 5 (const uint)
-0:28 'gl_VertexID' ( in int VertexIndex)
-0:29 move second child to first child ( temp highp float)
-0:29 direct index ( temp highp float)
-0:29 'v' ( temp highp 4-component vector of float)
-0:29 Constant:
-0:29 0 (const int)
-0:29 subtract ( temp highp float)
-0:29 direct index ( temp highp float)
-0:29 'v' ( temp highp 4-component vector of float)
-0:29 Constant:
-0:29 0 (const int)
-0:29 Convert int to float ( temp highp float)
-0:29 'gl_InstanceID' ( in highp int InstanceIndex)
-0:30 move second child to first child ( temp highp 4-component vector of float)
-0:30 'io' (layout( location=0) smooth out highp 4-component vector of float)
-0:30 'v' ( temp highp 4-component vector of float)
-0:? Linker Objects
-0:? 'io' (layout( location=0) smooth out highp 4-component vector of float)
-0:? 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d, uniform 4-element array of highp 4-component vector of float s})
-0:? 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3, coherent volatile buffer highp uint counter2})
-0:? 'gl_VertexID' ( in int VertexIndex)
-0:? 'gl_InstanceID' ( in int InstanceIndex)
-
-vk.relaxed.stagelink.frag
-Shader version: 460
-gl_FragCoord origin is upper left
-0:? Sequence
-0:19 Function Definition: foo( ( global highp 4-component vector of float)
-0:19 Function Parameters:
-0:20 Sequence
-0:20 Sequence
-0:20 move second child to first child ( temp highp uint)
-0:20 'j' ( temp highp uint)
-0:20 add ( temp highp uint)
-0:20 AtomicAdd ( global highp uint)
-0:20 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:20 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:20 Constant:
-0:20 0 (const uint)
-0:20 Constant:
-0:20 1 (const uint)
-0:20 subtract ( temp highp uint)
-0:20 AtomicAdd ( global highp uint)
-0:20 counter2: direct index for structure ( coherent volatile buffer highp uint)
-0:20 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:20 Constant:
-0:20 1 (const uint)
-0:20 Constant:
-0:20 4294967295 (const uint)
-0:20 Constant:
-0:20 1 (const uint)
-0:21 Sequence
-0:21 move second child to first child ( temp highp 4-component vector of float)
-0:21 'v' ( temp highp 4-component vector of float)
-0:21 add ( temp highp 4-component vector of float)
-0:21 add ( temp highp 4-component vector of float)
-0:21 add ( temp highp 4-component vector of float)
-0:21 a: direct index for structure ( uniform highp 4-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:21 Constant:
-0:21 0 (const uint)
-0:21 Construct vec4 ( temp highp 4-component vector of float)
-0:21 direct index ( temp highp float)
-0:21 b1: direct index for structure ( uniform highp 2-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:21 Constant:
-0:21 1 (const uint)
-0:21 Constant:
-0:21 0 (const int)
-0:21 direct index ( temp highp float)
-0:21 b1: direct index for structure ( uniform highp 2-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:21 Constant:
-0:21 1 (const uint)
-0:21 Constant:
-0:21 1 (const int)
-0:21 direct index ( temp highp float)
-0:21 b2: direct index for structure ( uniform highp 2-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:21 Constant:
-0:21 2 (const uint)
-0:21 Constant:
-0:21 0 (const int)
-0:21 direct index ( temp highp float)
-0:21 b2: direct index for structure ( uniform highp 2-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:21 Constant:
-0:21 2 (const uint)
-0:21 Constant:
-0:21 1 (const int)
-0:21 c1: direct index for structure ( uniform highp 4-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:21 Constant:
-0:21 3 (const uint)
-0:21 d: direct index for structure ( uniform highp 4-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:21 Constant:
-0:21 4 (const uint)
-0:23 Branch: Return with expression
-0:23 vector-scale ( temp highp 4-component vector of float)
-0:23 Convert uint to float ( temp highp float)
-0:23 'j' ( temp highp uint)
-0:23 'v' ( temp highp 4-component vector of float)
-0:26 Function Definition: main( ( global void)
-0:26 Function Parameters:
-0:27 Sequence
-0:27 move second child to first child ( temp highp 4-component vector of float)
-0:27 'o' ( out highp 4-component vector of float)
-0:27 add ( temp highp 4-component vector of float)
-0:27 'io' (layout( location=0) smooth in highp 4-component vector of float)
-0:27 Function Call: foo( ( global highp 4-component vector of float)
-0:? Linker Objects
-0:? 'io' (layout( location=0) smooth in highp 4-component vector of float)
-0:? 'o' ( out highp 4-component vector of float)
-0:? 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:? 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-
-
-Linked vertex stage:
-
-
-Linked fragment stage:
-
-
-Shader version: 460
-0:? Sequence
-0:18 Function Definition: foo( ( global highp 4-component vector of float)
-0:18 Function Parameters:
-0:19 Sequence
-0:19 Sequence
-0:19 move second child to first child ( temp highp uint)
-0:19 'j' ( temp highp uint)
-0:19 add ( temp highp uint)
-0:19 AtomicAdd ( global highp uint)
-0:19 counter2: direct index for structure ( coherent volatile buffer highp uint)
-0:19 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3, coherent volatile buffer highp uint counter2})
-0:19 Constant:
-0:19 1 (const uint)
-0:19 Constant:
-0:19 1 (const uint)
-0:19 subtract ( temp highp uint)
-0:19 AtomicAdd ( global highp uint)
-0:19 counter3: direct index for structure ( coherent volatile buffer highp uint)
-0:19 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3, coherent volatile buffer highp uint counter2})
-0:19 Constant:
-0:19 0 (const uint)
-0:19 Constant:
-0:19 4294967295 (const uint)
-0:19 Constant:
-0:19 1 (const uint)
-0:20 Sequence
-0:20 move second child to first child ( temp highp 4-component vector of float)
-0:20 'v' ( temp highp 4-component vector of float)
-0:20 add ( temp highp 4-component vector of float)
-0:20 add ( temp highp 4-component vector of float)
-0:20 add ( temp highp 4-component vector of float)
-0:20 a: direct index for structure ( uniform highp 4-component vector of float)
-0:20 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d, uniform 4-element array of highp 4-component vector of float s})
-0:20 Constant:
-0:20 0 (const uint)
-0:20 Construct vec4 ( temp highp 4-component vector of float)
-0:20 direct index ( temp highp float)
-0:20 b1: direct index for structure ( uniform highp 2-component vector of float)
-0:20 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d, uniform 4-element array of highp 4-component vector of float s})
-0:20 Constant:
-0:20 2 (const uint)
-0:20 Constant:
-0:20 0 (const int)
-0:20 direct index ( temp highp float)
-0:20 b1: direct index for structure ( uniform highp 2-component vector of float)
-0:20 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d, uniform 4-element array of highp 4-component vector of float s})
-0:20 Constant:
-0:20 2 (const uint)
-0:20 Constant:
-0:20 1 (const int)
-0:20 direct index ( temp highp float)
-0:20 b2: direct index for structure ( uniform highp 2-component vector of float)
-0:20 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d, uniform 4-element array of highp 4-component vector of float s})
-0:20 Constant:
-0:20 1 (const uint)
-0:20 Constant:
-0:20 0 (const int)
-0:20 direct index ( temp highp float)
-0:20 b2: direct index for structure ( uniform highp 2-component vector of float)
-0:20 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d, uniform 4-element array of highp 4-component vector of float s})
-0:20 Constant:
-0:20 1 (const uint)
-0:20 Constant:
-0:20 1 (const int)
-0:20 c2: direct index for structure ( uniform highp 4-component vector of float)
-0:20 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d, uniform 4-element array of highp 4-component vector of float s})
-0:20 Constant:
-0:20 3 (const uint)
-0:20 d: direct index for structure ( uniform highp 4-component vector of float)
-0:20 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d, uniform 4-element array of highp 4-component vector of float s})
-0:20 Constant:
-0:20 4 (const uint)
-0:22 Branch: Return with expression
-0:22 vector-scale ( temp highp 4-component vector of float)
-0:22 Convert uint to float ( temp highp float)
-0:22 'j' ( temp highp uint)
-0:22 'v' ( temp highp 4-component vector of float)
-0:25 Function Definition: main( ( global void)
-0:25 Function Parameters:
-0:27 Sequence
-0:27 Sequence
-0:27 move second child to first child ( temp highp 4-component vector of float)
-0:27 'v' ( temp highp 4-component vector of float)
-0:27 Function Call: foo( ( global highp 4-component vector of float)
-0:28 move second child to first child ( temp highp 4-component vector of float)
-0:28 'v' ( temp highp 4-component vector of float)
-0:28 add ( temp highp 4-component vector of float)
-0:28 'v' ( temp highp 4-component vector of float)
-0:28 indirect index ( temp highp 4-component vector of float)
-0:28 s: direct index for structure ( uniform 4-element array of highp 4-component vector of float)
-0:28 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d, uniform 4-element array of highp 4-component vector of float s})
-0:28 Constant:
-0:28 5 (const uint)
-0:28 'gl_VertexID' ( in int VertexIndex)
-0:29 move second child to first child ( temp highp float)
-0:29 direct index ( temp highp float)
-0:29 'v' ( temp highp 4-component vector of float)
-0:29 Constant:
-0:29 0 (const int)
-0:29 subtract ( temp highp float)
-0:29 direct index ( temp highp float)
-0:29 'v' ( temp highp 4-component vector of float)
-0:29 Constant:
-0:29 0 (const int)
-0:29 Convert int to float ( temp highp float)
-0:29 'gl_InstanceID' ( in highp int InstanceIndex)
-0:30 move second child to first child ( temp highp 4-component vector of float)
-0:30 'io' (layout( location=0) smooth out highp 4-component vector of float)
-0:30 'v' ( temp highp 4-component vector of float)
-0:? Linker Objects
-0:? 'io' (layout( location=0) smooth out highp 4-component vector of float)
-0:? 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b2, uniform highp 2-component vector of float b1, uniform highp 4-component vector of float c2, uniform highp 4-component vector of float d, uniform 4-element array of highp 4-component vector of float s})
-0:? 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3, coherent volatile buffer highp uint counter2})
-0:? 'gl_VertexID' ( in int VertexIndex)
-0:? 'gl_InstanceID' ( in int InstanceIndex)
-Shader version: 460
-gl_FragCoord origin is upper left
-0:? Sequence
-0:19 Function Definition: foo( ( global highp 4-component vector of float)
-0:19 Function Parameters:
-0:20 Sequence
-0:20 Sequence
-0:20 move second child to first child ( temp highp uint)
-0:20 'j' ( temp highp uint)
-0:20 add ( temp highp uint)
-0:20 AtomicAdd ( global highp uint)
-0:20 counter1: direct index for structure ( coherent volatile buffer highp uint)
-0:20 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:20 Constant:
-0:20 0 (const uint)
-0:20 Constant:
-0:20 1 (const uint)
-0:20 subtract ( temp highp uint)
-0:20 AtomicAdd ( global highp uint)
-0:20 counter2: direct index for structure ( coherent volatile buffer highp uint)
-0:20 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-0:20 Constant:
-0:20 1 (const uint)
-0:20 Constant:
-0:20 4294967295 (const uint)
-0:20 Constant:
-0:20 1 (const uint)
-0:21 Sequence
-0:21 move second child to first child ( temp highp 4-component vector of float)
-0:21 'v' ( temp highp 4-component vector of float)
-0:21 add ( temp highp 4-component vector of float)
-0:21 add ( temp highp 4-component vector of float)
-0:21 add ( temp highp 4-component vector of float)
-0:21 a: direct index for structure ( uniform highp 4-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:21 Constant:
-0:21 0 (const uint)
-0:21 Construct vec4 ( temp highp 4-component vector of float)
-0:21 direct index ( temp highp float)
-0:21 b1: direct index for structure ( uniform highp 2-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:21 Constant:
-0:21 1 (const uint)
-0:21 Constant:
-0:21 0 (const int)
-0:21 direct index ( temp highp float)
-0:21 b1: direct index for structure ( uniform highp 2-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:21 Constant:
-0:21 1 (const uint)
-0:21 Constant:
-0:21 1 (const int)
-0:21 direct index ( temp highp float)
-0:21 b2: direct index for structure ( uniform highp 2-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:21 Constant:
-0:21 2 (const uint)
-0:21 Constant:
-0:21 0 (const int)
-0:21 direct index ( temp highp float)
-0:21 b2: direct index for structure ( uniform highp 2-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:21 Constant:
-0:21 2 (const uint)
-0:21 Constant:
-0:21 1 (const int)
-0:21 c1: direct index for structure ( uniform highp 4-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:21 Constant:
-0:21 3 (const uint)
-0:21 d: direct index for structure ( uniform highp 4-component vector of float)
-0:21 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:21 Constant:
-0:21 4 (const uint)
-0:23 Branch: Return with expression
-0:23 vector-scale ( temp highp 4-component vector of float)
-0:23 Convert uint to float ( temp highp float)
-0:23 'j' ( temp highp uint)
-0:23 'v' ( temp highp 4-component vector of float)
-0:26 Function Definition: main( ( global void)
-0:26 Function Parameters:
-0:27 Sequence
-0:27 move second child to first child ( temp highp 4-component vector of float)
-0:27 'o' ( out highp 4-component vector of float)
-0:27 add ( temp highp 4-component vector of float)
-0:27 'io' (layout( location=0) smooth in highp 4-component vector of float)
-0:27 Function Call: foo( ( global highp 4-component vector of float)
-0:? Linker Objects
-0:? 'io' (layout( location=0) smooth in highp 4-component vector of float)
-0:? 'o' ( out highp 4-component vector of float)
-0:? 'anon@0' (layout( column_major std140) uniform block{ uniform highp 4-component vector of float a, uniform highp 2-component vector of float b1, uniform highp 2-component vector of float b2, uniform highp 4-component vector of float c1, uniform highp 4-component vector of float d})
-0:? 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2})
-
-// Module Version 10000
-// Generated by (magic number): 8000a
-// Id's are bound by 88
-
- Capability Shader
- 1: ExtInstImport "GLSL.std.450"
- MemoryModel Logical GLSL450
- EntryPoint Vertex 4 "main" 72 80 86
- Source GLSL 460
- Name 4 "main"
- Name 9 "foo("
- Name 13 "j"
- Name 14 "gl_AtomicCounterBlock_0"
- MemberName 14(gl_AtomicCounterBlock_0) 0 "counter3"
- MemberName 14(gl_AtomicCounterBlock_0) 1 "counter2"
- MemberName 14(gl_AtomicCounterBlock_0) 2 "counter1"
- Name 16 ""
- Name 31 "v"
- Name 35 "gl_DefaultUniformBlock"
- MemberName 35(gl_DefaultUniformBlock) 0 "a"
- MemberName 35(gl_DefaultUniformBlock) 1 "b2"
- MemberName 35(gl_DefaultUniformBlock) 2 "b1"
- MemberName 35(gl_DefaultUniformBlock) 3 "c2"
- MemberName 35(gl_DefaultUniformBlock) 4 "d"
- MemberName 35(gl_DefaultUniformBlock) 5 "s"
- MemberName 35(gl_DefaultUniformBlock) 6 "c1"
- Name 37 ""
- Name 67 "v"
- Name 72 "gl_VertexID"
- Name 80 "gl_InstanceID"
- Name 86 "io"
- MemberDecorate 14(gl_AtomicCounterBlock_0) 0 Coherent
- MemberDecorate 14(gl_AtomicCounterBlock_0) 0 Volatile
- MemberDecorate 14(gl_AtomicCounterBlock_0) 0 Coherent
- MemberDecorate 14(gl_AtomicCounterBlock_0) 0 Offset 0
- MemberDecorate 14(gl_AtomicCounterBlock_0) 1 Coherent
- MemberDecorate 14(gl_AtomicCounterBlock_0) 1 Volatile
- MemberDecorate 14(gl_AtomicCounterBlock_0) 1 Coherent
- MemberDecorate 14(gl_AtomicCounterBlock_0) 1 Offset 4
- MemberDecorate 14(gl_AtomicCounterBlock_0) 2 Coherent
- MemberDecorate 14(gl_AtomicCounterBlock_0) 2 Volatile
- MemberDecorate 14(gl_AtomicCounterBlock_0) 2 Coherent
- MemberDecorate 14(gl_AtomicCounterBlock_0) 2 Offset 8
- Decorate 14(gl_AtomicCounterBlock_0) BufferBlock
- Decorate 16 DescriptorSet 0
- Decorate 16 Binding 1
- Decorate 34 ArrayStride 16
- MemberDecorate 35(gl_DefaultUniformBlock) 0 Offset 0
- MemberDecorate 35(gl_DefaultUniformBlock) 1 Offset 16
- MemberDecorate 35(gl_DefaultUniformBlock) 2 Offset 24
- MemberDecorate 35(gl_DefaultUniformBlock) 3 Offset 32
- MemberDecorate 35(gl_DefaultUniformBlock) 4 Offset 48
- MemberDecorate 35(gl_DefaultUniformBlock) 5 Offset 64
- MemberDecorate 35(gl_DefaultUniformBlock) 6 Offset 128
- Decorate 35(gl_DefaultUniformBlock) Block
- Decorate 37 DescriptorSet 0
- Decorate 37 Binding 0
- Decorate 72(gl_VertexID) BuiltIn VertexIndex
- Decorate 80(gl_InstanceID) BuiltIn InstanceIndex
- Decorate 86(io) Location 0
- 2: TypeVoid
- 3: TypeFunction 2
- 6: TypeFloat 32
- 7: TypeVector 6(float) 4
- 8: TypeFunction 7(fvec4)
- 11: TypeInt 32 0
- 12: TypePointer Function 11(int)
-14(gl_AtomicCounterBlock_0): TypeStruct 11(int) 11(int) 11(int)
- 15: TypePointer Uniform 14(gl_AtomicCounterBlock_0)
- 16: 15(ptr) Variable Uniform
- 17: TypeInt 32 1
- 18: 17(int) Constant 1
- 19: TypePointer Uniform 11(int)
- 21: 11(int) Constant 1
- 22: 11(int) Constant 0
- 24: 17(int) Constant 0
- 26: 11(int) Constant 4294967295
- 30: TypePointer Function 7(fvec4)
- 32: TypeVector 6(float) 2
- 33: 11(int) Constant 4
- 34: TypeArray 7(fvec4) 33
-35(gl_DefaultUniformBlock): TypeStruct 7(fvec4) 32(fvec2) 32(fvec2) 7(fvec4) 7(fvec4) 34 7(fvec4)
- 36: TypePointer Uniform 35(gl_DefaultUniformBlock)
- 37: 36(ptr) Variable Uniform
- 38: TypePointer Uniform 7(fvec4)
- 41: 17(int) Constant 2
- 42: TypePointer Uniform 6(float)
- 53: 17(int) Constant 3
- 57: 17(int) Constant 4
- 70: 17(int) Constant 5
- 71: TypePointer Input 17(int)
- 72(gl_VertexID): 71(ptr) Variable Input
- 77: TypePointer Function 6(float)
-80(gl_InstanceID): 71(ptr) Variable Input
- 85: TypePointer Output 7(fvec4)
- 86(io): 85(ptr) Variable Output
- 4(main): 2 Function None 3
- 5: Label
- 67(v): 30(ptr) Variable Function
- 68: 7(fvec4) FunctionCall 9(foo()
- Store 67(v) 68
- 69: 7(fvec4) Load 67(v)
- 73: 17(int) Load 72(gl_VertexID)
- 74: 38(ptr) AccessChain 37 70 73
- 75: 7(fvec4) Load 74
- 76: 7(fvec4) FAdd 69 75
- Store 67(v) 76
- 78: 77(ptr) AccessChain 67(v) 22
- 79: 6(float) Load 78
- 81: 17(int) Load 80(gl_InstanceID)
- 82: 6(float) ConvertSToF 81
- 83: 6(float) FSub 79 82
- 84: 77(ptr) AccessChain 67(v) 22
- Store 84 83
- 87: 7(fvec4) Load 67(v)
- Store 86(io) 87
- Return
- FunctionEnd
- 9(foo(): 7(fvec4) Function None 8
- 10: Label
- 13(j): 12(ptr) Variable Function
- 31(v): 30(ptr) Variable Function
- 20: 19(ptr) AccessChain 16 18
- 23: 11(int) AtomicIAdd 20 21 22 21
- 25: 19(ptr) AccessChain 16 24
- 27: 11(int) AtomicIAdd 25 21 22 26
- 28: 11(int) ISub 27 21
- 29: 11(int) IAdd 23 28
- Store 13(j) 29
- 39: 38(ptr) AccessChain 37 24
- 40: 7(fvec4) Load 39
- 43: 42(ptr) AccessChain 37 41 22
- 44: 6(float) Load 43
- 45: 42(ptr) AccessChain 37 41 21
- 46: 6(float) Load 45
- 47: 42(ptr) AccessChain 37 18 22
- 48: 6(float) Load 47
- 49: 42(ptr) AccessChain 37 18 21
- 50: 6(float) Load 49
- 51: 7(fvec4) CompositeConstruct 44 46 48 50
- 52: 7(fvec4) FAdd 40 51
- 54: 38(ptr) AccessChain 37 53
- 55: 7(fvec4) Load 54
- 56: 7(fvec4) FAdd 52 55
- 58: 38(ptr) AccessChain 37 57
- 59: 7(fvec4) Load 58
- 60: 7(fvec4) FAdd 56 59
- Store 31(v) 60
- 61: 11(int) Load 13(j)
- 62: 6(float) ConvertUToF 61
- 63: 7(fvec4) Load 31(v)
- 64: 7(fvec4) VectorTimesScalar 63 62
- ReturnValue 64
- FunctionEnd
-// Module Version 10000
-// Generated by (magic number): 8000a
-// Id's are bound by 74
-
- Capability Shader
- 1: ExtInstImport "GLSL.std.450"
- MemoryModel Logical GLSL450
- EntryPoint Fragment 4 "main" 68 70
- ExecutionMode 4 OriginUpperLeft
- Source GLSL 460
- Name 4 "main"
- Name 9 "foo("
- Name 13 "j"
- Name 14 "gl_AtomicCounterBlock_0"
- MemberName 14(gl_AtomicCounterBlock_0) 0 "counter3"
- MemberName 14(gl_AtomicCounterBlock_0) 1 "counter2"
- MemberName 14(gl_AtomicCounterBlock_0) 2 "counter1"
- Name 16 ""
- Name 31 "v"
- Name 35 "gl_DefaultUniformBlock"
- MemberName 35(gl_DefaultUniformBlock) 0 "a"
- MemberName 35(gl_DefaultUniformBlock) 1 "b2"
- MemberName 35(gl_DefaultUniformBlock) 2 "b1"
- MemberName 35(gl_DefaultUniformBlock) 3 "c2"
- MemberName 35(gl_DefaultUniformBlock) 4 "d"
- MemberName 35(gl_DefaultUniformBlock) 5 "s"
- MemberName 35(gl_DefaultUniformBlock) 6 "c1"
- Name 37 ""
- Name 68 "o"
- Name 70 "io"
- MemberDecorate 14(gl_AtomicCounterBlock_0) 0 Coherent
- MemberDecorate 14(gl_AtomicCounterBlock_0) 0 Volatile
- MemberDecorate 14(gl_AtomicCounterBlock_0) 0 Coherent
- MemberDecorate 14(gl_AtomicCounterBlock_0) 0 Offset 0
- MemberDecorate 14(gl_AtomicCounterBlock_0) 1 Coherent
- MemberDecorate 14(gl_AtomicCounterBlock_0) 1 Volatile
- MemberDecorate 14(gl_AtomicCounterBlock_0) 1 Coherent
- MemberDecorate 14(gl_AtomicCounterBlock_0) 1 Offset 4
- MemberDecorate 14(gl_AtomicCounterBlock_0) 2 Coherent
- MemberDecorate 14(gl_AtomicCounterBlock_0) 2 Volatile
- MemberDecorate 14(gl_AtomicCounterBlock_0) 2 Coherent
- MemberDecorate 14(gl_AtomicCounterBlock_0) 2 Offset 8
- Decorate 14(gl_AtomicCounterBlock_0) BufferBlock
- Decorate 16 DescriptorSet 0
- Decorate 16 Binding 1
- Decorate 34 ArrayStride 16
- MemberDecorate 35(gl_DefaultUniformBlock) 0 Offset 0
- MemberDecorate 35(gl_DefaultUniformBlock) 1 Offset 16
- MemberDecorate 35(gl_DefaultUniformBlock) 2 Offset 24
- MemberDecorate 35(gl_DefaultUniformBlock) 3 Offset 32
- MemberDecorate 35(gl_DefaultUniformBlock) 4 Offset 48
- MemberDecorate 35(gl_DefaultUniformBlock) 5 Offset 64
- MemberDecorate 35(gl_DefaultUniformBlock) 6 Offset 128
- Decorate 35(gl_DefaultUniformBlock) Block
- Decorate 37 DescriptorSet 0
- Decorate 37 Binding 0
- Decorate 68(o) Location 0
- Decorate 70(io) Location 0
- 2: TypeVoid
- 3: TypeFunction 2
- 6: TypeFloat 32
- 7: TypeVector 6(float) 4
- 8: TypeFunction 7(fvec4)
- 11: TypeInt 32 0
- 12: TypePointer Function 11(int)
-14(gl_AtomicCounterBlock_0): TypeStruct 11(int) 11(int) 11(int)
- 15: TypePointer Uniform 14(gl_AtomicCounterBlock_0)
- 16: 15(ptr) Variable Uniform
- 17: TypeInt 32 1
- 18: 17(int) Constant 2
- 19: TypePointer Uniform 11(int)
- 21: 11(int) Constant 1
- 22: 11(int) Constant 0
- 24: 17(int) Constant 1
- 26: 11(int) Constant 4294967295
- 30: TypePointer Function 7(fvec4)
- 32: TypeVector 6(float) 2
- 33: 11(int) Constant 4
- 34: TypeArray 7(fvec4) 33
-35(gl_DefaultUniformBlock): TypeStruct 7(fvec4) 32(fvec2) 32(fvec2) 7(fvec4) 7(fvec4) 34 7(fvec4)
- 36: TypePointer Uniform 35(gl_DefaultUniformBlock)
- 37: 36(ptr) Variable Uniform
- 38: 17(int) Constant 0
- 39: TypePointer Uniform 7(fvec4)
- 42: TypePointer Uniform 6(float)
- 53: 17(int) Constant 6
- 57: 17(int) Constant 4
- 67: TypePointer Output 7(fvec4)
- 68(o): 67(ptr) Variable Output
- 69: TypePointer Input 7(fvec4)
- 70(io): 69(ptr) Variable Input
- 4(main): 2 Function None 3
- 5: Label
- 71: 7(fvec4) Load 70(io)
- 72: 7(fvec4) FunctionCall 9(foo()
- 73: 7(fvec4) FAdd 71 72
- Store 68(o) 73
- Return
- FunctionEnd
- 9(foo(): 7(fvec4) Function None 8
- 10: Label
- 13(j): 12(ptr) Variable Function
- 31(v): 30(ptr) Variable Function
- 20: 19(ptr) AccessChain 16 18
- 23: 11(int) AtomicIAdd 20 21 22 21
- 25: 19(ptr) AccessChain 16 24
- 27: 11(int) AtomicIAdd 25 21 22 26
- 28: 11(int) ISub 27 21
- 29: 11(int) IAdd 23 28
- Store 13(j) 29
- 40: 39(ptr) AccessChain 37 38
- 41: 7(fvec4) Load 40
- 43: 42(ptr) AccessChain 37 18 22
- 44: 6(float) Load 43
- 45: 42(ptr) AccessChain 37 18 21
- 46: 6(float) Load 45
- 47: 42(ptr) AccessChain 37 24 22
- 48: 6(float) Load 47
- 49: 42(ptr) AccessChain 37 24 21
- 50: 6(float) Load 49
- 51: 7(fvec4) CompositeConstruct 44 46 48 50
- 52: 7(fvec4) FAdd 41 51
- 54: 39(ptr) AccessChain 37 53
- 55: 7(fvec4) Load 54
- 56: 7(fvec4) FAdd 52 55
- 58: 39(ptr) AccessChain 37 57
- 59: 7(fvec4) Load 58
- 60: 7(fvec4) FAdd 56 59
- Store 31(v) 60
- 61: 11(int) Load 13(j)
- 62: 6(float) ConvertUToF 61
- 63: 7(fvec4) Load 31(v)
- 64: 7(fvec4) VectorTimesScalar 63 62
- ReturnValue 64
- FunctionEnd
diff --git a/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.2.frag b/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.2.frag
deleted file mode 100644
index 25756a6..0000000
--- a/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.2.frag
+++ /dev/null
@@ -1,42 +0,0 @@
-#version 460
-
-
-layout(location = 5) in outBlock {
- vec4 o3;
-};
-
-
-in vec4 gfo1;
-in vec2 gfo2;
-
-out vec4 outColor;
-
-uniform vec2 u1;
-uniform vec3 u2; // initializer present in vertex stage
-uniform vec4 u3 = vec4(0); // initializer matches initializer in vertex stage
-
-uniform mat2 um2 = mat2(4.0);
-
-layout (location = 0, binding = 0) uniform sampler2D glass;
-
-uniform crossStageBlock1 {
- uniform vec4 a;
- vec4 b;
-};
-
-buffer fragOnlyBlock {
- vec2 fb1;
-};
-
-uniform crossStageBlock2 {
- uniform vec4 a;
- vec2 b;
-} blockName2 [2]; // instance name different from vert
-
-
-void main()
-{
- vec4 color = gfo1 * u1.rgrg * u2.rgbr * u3.rgba; // o1 is statically used
- outColor = color;
-}
-
diff --git a/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.2.geom b/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.2.geom
deleted file mode 100644
index 91508ab..0000000
--- a/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.2.geom
+++ /dev/null
@@ -1,39 +0,0 @@
-#version 460
-
-layout(points) in;
-layout(triangle_strip, max_vertices=3) out;
-
-in vec4 vgo1[];
-in vec2 vgo2[];
-
-layout(location = 5) in outBlock {
- vec4 o3;
-} inBlock[];
-
-out vec4 gfo1;
-out vec2 gfo2;
-
-layout(location = 5) out outBlock {
- vec4 o3;
-} gf_out;
-
-uniform vec2 u1;
-uniform vec3 u2 = vec3(0); // initializer not present in fragment stage
-uniform vec4 u3 = vec4(0); // initializer matches initializer in fragment stage
-
-uniform crossStageBlock2 {
- uniform vec4 a;
- vec2 b;
-} blockName1 [2]; // instance name different from frag
-
-void main()
-{
- for (int i = 0; i < 3; i++) {
- gfo1 = vec4(0);
- gfo2 = vec2(0);
- gf_out.o3 = inBlock[i].o3;
- EmitVertex();
- }
- EndPrimitive();
-}
-
diff --git a/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.2.vert b/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.2.vert
deleted file mode 100644
index ebb0d9d..0000000
--- a/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.2.vert
+++ /dev/null
@@ -1,38 +0,0 @@
-#version 460
-
-out vec4 vgo1; // declaration order different than fragment shader
-out vec2 vgo2; // declaration order different than fragment shader
-
-layout(location = 5) out outBlock {
- vec4 o3;
-};
-
-uniform vec2 u1;
-uniform vec3 u2 = vec3(0); // initializer not present in fragment stage
-uniform vec4 u3 = vec4(0); // initializer matches initializer in fragment stage
-
-uniform mat2 um2 = mat2(4.0);
-
-layout (location = 0, binding = 0) uniform sampler2D glass;
-
-uniform crossStageBlock1 {
- uniform vec4 a;
- vec4 b;
-};
-
-buffer vertOnlyBlock {
- vec2 vb1;
-};
-
-uniform crossStageBlock2 {
- uniform vec4 a;
- vec2 b;
-} blockName1 [2]; // instance name different from frag
-
-void main()
-{
- vgo1 = vec4(0);
- vgo2 = vec2(0);
- o3 = vec4(0);
-}
-
diff --git a/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.frag b/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.frag
deleted file mode 100644
index 1624703..0000000
--- a/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.frag
+++ /dev/null
@@ -1,41 +0,0 @@
-#version 460
-
-
-layout(location = 5) in outBlock {
- vec4 o3;
-};
-
-in vec2 o2; // declaration order different than vertex shader
-in vec4 o1; // declaration order different than vertex shader
-
-out vec4 outColor;
-
-uniform vec2 u1;
-uniform vec3 u2; // initializer present in vertex stage
-uniform vec4 u3 = vec4(0); // initializer matches initializer in vertex stage
-
-uniform mat2 um2 = mat2(4.0);
-
-layout (location = 0, binding = 0) uniform sampler2D glass;
-
-uniform crossStageBlock1 {
- uniform vec4 a;
- vec4 b;
-};
-
-buffer fragOnlyBlock {
- vec2 fb1;
-};
-
-uniform crossStageBlock2 {
- uniform vec4 a;
- vec2 b;
-} blockName2 [2]; // instance name different from vert
-
-
-void main()
-{
- vec4 color = o1 * u1.rgrg * u2.rgbr * u3.rgba; // o1 is statically used
- outColor = color;
-}
-
diff --git a/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.vert b/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.vert
deleted file mode 100644
index d05874f..0000000
--- a/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.vert
+++ /dev/null
@@ -1,38 +0,0 @@
-#version 460
-
-out vec4 o1; // declaration order different than fragment shader
-out vec2 o2; // declaration order different than fragment shader
-
-layout(location = 5) out outBlock {
- vec4 o3;
-};
-
-uniform vec2 u1;
-uniform vec3 u2 = vec3(0); // initializer not present in fragment stage
-uniform vec4 u3 = vec4(0); // initializer matches initializer in fragment stage
-
-uniform mat2 um2 = mat2(4.0);
-
-layout (location = 0, binding = 0) uniform sampler2D glass;
-
-uniform crossStageBlock1 {
- uniform vec4 a;
- vec4 b;
-};
-
-buffer vertOnlyBlock {
- vec2 vb1;
-};
-
-uniform crossStageBlock2 {
- uniform vec4 a;
- vec2 b;
-} blockName1 [2]; // instance name different from frag
-
-void main()
-{
- o1 = vec4(0);
- o2 = vec2(0);
- o3 = vec4(0);
-}
-
diff --git a/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.vk.frag b/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.vk.frag
deleted file mode 100644
index d09e687..0000000
--- a/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.vk.frag
+++ /dev/null
@@ -1,50 +0,0 @@
-#version 460
-
-
-layout(location = 5) in outBlock {
- vec4 o3;
-};
-
-
-in vec4 gfo1;
-in vec2 gfo2;
-
-out vec4 outColor;
-
-layout (binding = 0) uniform sampler2D glass;
-
-uniform crossStageBlock1 {
- uniform vec4 a;
- vec4 b;
-};
-
-readonly buffer fragOnlyBlock {
- vec2 fb1;
-};
-
-uniform crossStageBlock2 {
- uniform vec4 a;
- vec2 b;
-} blockName2 [2]; // instance name different from vert
-
-vec2 Bar() {
- return fb1 +
- blockName2[0].b +
- blockName2[1].b;
-}
-
-vec4 Foo() {
- return a +
- b +
- blockName2[0].a +
- blockName2[1].a +
- vec4(Bar(), 0.0, 0.0);
-}
-
-void main()
-{
- vec4 color = gfo1; // o1 is statically used
- color = color + Foo();
- outColor = color;
-}
-
diff --git a/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.vk.geom b/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.vk.geom
deleted file mode 100644
index b951737..0000000
--- a/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.vk.geom
+++ /dev/null
@@ -1,35 +0,0 @@
-#version 460
-
-layout(points) in;
-layout(triangle_strip, max_vertices=3) out;
-
-in vec4 vgo1[];
-in vec2 vgo2[];
-
-layout(location = 5) in outBlock {
- vec4 o3;
-} inBlock[];
-
-out vec4 gfo1;
-out vec2 gfo2;
-
-layout(location = 5) out outBlock {
- vec4 o3;
-} gf_out;
-
-uniform crossStageBlock2 {
- uniform vec4 a;
- vec2 b;
-} blockName1 [2]; // instance name different from frag
-
-void main()
-{
- for (int i = 0; i < 3; i++) {
- gfo1 = vec4(0);
- gfo2 = vec2(0);
- gf_out.o3 = inBlock[i].o3;
- EmitVertex();
- }
- EndPrimitive();
-}
-
diff --git a/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.vk.vert b/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.vk.vert
deleted file mode 100644
index e422131..0000000
--- a/third_party/vulkan-deps/glslang/src/Test/iomap.crossStage.vk.vert
+++ /dev/null
@@ -1,32 +0,0 @@
-#version 460
-
-out vec4 vgo1; // declaration order different than fragment shader
-out vec2 vgo2; // declaration order different than fragment shader
-
-layout(location = 5) out outBlock {
- vec4 o3;
-};
-
-layout (binding = 0) uniform sampler2D glass;
-
-uniform crossStageBlock1 {
- uniform vec4 a;
- vec4 b;
-};
-
-readonly buffer vertOnlyBlock {
- vec2 vb1;
-};
-
-uniform crossStageBlock2 {
- uniform vec4 a;
- vec2 b;
-} blockName1 [2]; // instance name different from frag
-
-void main()
-{
- vgo1 = vec4(0);
- vgo2 = vec2(0);
- o3 = vec4(0);
-}
-
diff --git a/third_party/vulkan-deps/glslang/src/Test/vk.relaxed.errorcheck.frag b/third_party/vulkan-deps/glslang/src/Test/vk.relaxed.errorcheck.frag
deleted file mode 100644
index b75b50b..0000000
--- a/third_party/vulkan-deps/glslang/src/Test/vk.relaxed.errorcheck.frag
+++ /dev/null
@@ -1,16 +0,0 @@
-#version 460
-
-layout (location = 0) in vec4 io;
-
-out vec4 o;
-
-// default uniforms will be gathered into a uniform block
-uniform vec4 a; // declared in both stages with different types
-
-vec4 foo() {
- return a;
-}
-
-void main() {
- o = io + foo();
-}
\ No newline at end of file
diff --git a/third_party/vulkan-deps/glslang/src/Test/vk.relaxed.errorcheck.vert b/third_party/vulkan-deps/glslang/src/Test/vk.relaxed.errorcheck.vert
deleted file mode 100644
index b1bdbbe..0000000
--- a/third_party/vulkan-deps/glslang/src/Test/vk.relaxed.errorcheck.vert
+++ /dev/null
@@ -1,15 +0,0 @@
-#version 460
-
-layout (location = 0) out vec4 io;
-
-// default uniforms will be gathered into a uniform block
-// final global block will merge uniforms from all linked files
-uniform vec2 a; // declared in both stages with different type
-
-vec4 foo() {
- return a.xyxy;
-}
-
-void main() {
- io = foo();
-}
\ No newline at end of file
diff --git a/third_party/vulkan-deps/glslang/src/Test/vk.relaxed.frag b/third_party/vulkan-deps/glslang/src/Test/vk.relaxed.frag
deleted file mode 100644
index d43416e..0000000
--- a/third_party/vulkan-deps/glslang/src/Test/vk.relaxed.frag
+++ /dev/null
@@ -1,74 +0,0 @@
-#version 460
-
-out vec4 o;
-
-// default uniforms will be gathered into a uniform block
-uniform vec4 a;
-uniform vec2 b = vec2(0, 0); // initializer will be ignored
-layout(location = 0) uniform vec2 c; // location qualifier will be ignored
-uniform vec4 d[10];
-uniform struct e {
- vec2 x;
- float y;
- uint z;
-} structUniform;
-
-// opaque types will not be grouped into uniform block
-uniform sampler2D t1;
-
-// shared and packed layout qualifier are silently ignored
-layout(shared) uniform UniformBlock {
- float j;
- vec4 k;
-};
-
-layout(packed) buffer BufferBlock {
- float j;
- vec4 k;
-} bufferInstance;
-
-// atomic_uint will be converted to uint and gathered in a buffer block
-layout(binding = 0) uniform atomic_uint counter1; // offset not used
-layout(binding = 0) uniform atomic_uint counter2; // offset not used
-layout(binding = 1) uniform atomic_uint counter3; // offset not used
-
-// atomic counter functions will be converted to equivalent integer atomic operations
-uint bar() {
- uint j = 0;
- j = atomicCounterIncrement(counter1);
- j = atomicCounterDecrement(counter1);
- j = atomicCounter(counter1);
-
- j = atomicCounterAdd(counter1, 1);
- j = atomicCounterAdd(counter1, -1);
- j = atomicCounterSubtract(counter1, 1);
-
- j = atomicCounterMin(counter1, j);
- j = atomicCounterMax(counter1, j);
- j = atomicCounterAnd(counter1, j);
-
- j = atomicCounterOr(counter1, j);
- j = atomicCounterXor(counter1, j);
-
- j = atomicCounterExchange(counter1, j);
- j = atomicCounterCompSwap(counter1, 0, j);
-
- atomicCounterIncrement(counter2);
- atomicCounterIncrement(counter3);
-
- memoryBarrierAtomicCounter();
-
- return j;
-}
-
-vec4 foo() {
- float f = j + bufferInstance.j + structUniform.y + structUniform.z;
- vec2 v2 = b + c + structUniform.x;
- vec4 v4 = a + d[0] + d[1] + d[2] + k + bufferInstance.k + texture(t1, vec2(0, 0));
- return vec4(f) * vec4(v2, 1, 1) * v4;
-}
-
-void main() {
- float j = float(bar());
- o = j * foo();
-}
\ No newline at end of file
diff --git a/third_party/vulkan-deps/glslang/src/Test/vk.relaxed.link1.frag b/third_party/vulkan-deps/glslang/src/Test/vk.relaxed.link1.frag
deleted file mode 100644
index 95b609f..0000000
--- a/third_party/vulkan-deps/glslang/src/Test/vk.relaxed.link1.frag
+++ /dev/null
@@ -1,28 +0,0 @@
-#version 460
-
-out vec4 o;
-
-// default uniforms will be gathered into a uniform block
-// final global block will merge uniforms from all linked files
-uniform vec4 a; // declared in both stages
-uniform vec2 b1; // declaration order swapped in other stage
-uniform vec2 b2;
-uniform vec4 c1; // not delcared in other file
-uniform vec4 d;
-
-// final global buffer will berge buffers from all linked files
-layout (binding = 0) uniform atomic_uint counter1;
-layout (binding = 0) uniform atomic_uint counter2;
-
-vec4 foo();
-
-vec4 bar() {
- uint j = atomicCounterIncrement(counter1) + atomicCounterDecrement(counter2);
- vec4 v = a + vec4(b1.x, b1.y, b2.x, b2.y) + c1 + d;
-
- return float(j) * v;
-}
-
-void main() {
- o = foo() + bar();
-}
\ No newline at end of file
diff --git a/third_party/vulkan-deps/glslang/src/Test/vk.relaxed.link2.frag b/third_party/vulkan-deps/glslang/src/Test/vk.relaxed.link2.frag
deleted file mode 100644
index a4f468a..0000000
--- a/third_party/vulkan-deps/glslang/src/Test/vk.relaxed.link2.frag
+++ /dev/null
@@ -1,19 +0,0 @@
-#version 460
-
-// default uniforms will be gathered into a uniform block
-// final global block will merge uniforms from all linked files
-uniform vec4 a; // declared in both stages
-uniform vec2 b2; // declaration order swapped in other stage
-uniform vec2 b1;
-uniform vec4 c2; // not delcared in other file
-uniform vec4 d;
-
-layout (binding = 0) uniform atomic_uint counter3;
-layout (binding = 0) uniform atomic_uint counter2;
-
-vec4 foo() {
- uint j = atomicCounterIncrement(counter2) + atomicCounterDecrement(counter3);
- vec4 v = a + vec4(b1.x, b1.y, b2.x, b2.y) + c2 + d;
-
- return float(j) * v;
-}
\ No newline at end of file
diff --git a/third_party/vulkan-deps/glslang/src/Test/vk.relaxed.stagelink.frag b/third_party/vulkan-deps/glslang/src/Test/vk.relaxed.stagelink.frag
deleted file mode 100644
index d1eebba..0000000
--- a/third_party/vulkan-deps/glslang/src/Test/vk.relaxed.stagelink.frag
+++ /dev/null
@@ -1,28 +0,0 @@
-#version 460
-
-layout (location = 0) in vec4 io;
-
-out vec4 o;
-
-// default uniforms will be gathered into a uniform block
-// final global block will merge uniforms from all linked files
-uniform vec4 a; // declared in both stages
-uniform vec2 b1; // declaration order swapped in other stage
-uniform vec2 b2;
-uniform vec4 c1; // not delcared in other file
-uniform vec4 d;
-
-// final global buffer will berge buffers from all linked files
-layout (binding = 0) uniform atomic_uint counter1;
-layout (binding = 0) uniform atomic_uint counter2;
-
-vec4 foo() {
- uint j = atomicCounterIncrement(counter1) + atomicCounterDecrement(counter2);
- vec4 v = a + vec4(b1.x, b1.y, b2.x, b2.y) + c1 + d;
-
- return float(j) * v;
-}
-
-void main() {
- o = io + foo();
-}
\ No newline at end of file
diff --git a/third_party/vulkan-deps/glslang/src/Test/vk.relaxed.stagelink.vert b/third_party/vulkan-deps/glslang/src/Test/vk.relaxed.stagelink.vert
deleted file mode 100644
index 52396ac..0000000
--- a/third_party/vulkan-deps/glslang/src/Test/vk.relaxed.stagelink.vert
+++ /dev/null
@@ -1,31 +0,0 @@
-#version 460
-
-layout (location = 0) out vec4 io;
-
-// default uniforms will be gathered into a uniform block
-// final global block will merge uniforms from all linked files
-uniform vec4 a; // declared in both stages
-uniform vec2 b2; // declaration order swapped in other stage
-uniform vec2 b1;
-uniform vec4 c2; // not delcared in other file
-uniform vec4 d;
-
-uniform vec4 s[4];
-
-layout (binding = 0) uniform atomic_uint counter3;
-layout (binding = 0) uniform atomic_uint counter2;
-
-vec4 foo() {
- uint j = atomicCounterIncrement(counter2) + atomicCounterDecrement(counter3);
- vec4 v = a + vec4(b1.x, b1.y, b2.x, b2.y) + c2 + d;
-
- return float(j) * v;
-}
-
-void main() {
-
- vec4 v = foo();
- v = v + s[gl_VertexID];
- v.x = v.x - float(gl_InstanceID);
- io = v;
-}
\ No newline at end of file
diff --git a/third_party/vulkan-deps/glslang/src/glslang/Include/Types.h b/third_party/vulkan-deps/glslang/src/glslang/Include/Types.h
index bb6d0bd..603203d 100644
--- a/third_party/vulkan-deps/glslang/src/glslang/Include/Types.h
+++ b/third_party/vulkan-deps/glslang/src/glslang/Include/Types.h
@@ -501,7 +501,6 @@
noContraction = false;
nullInit = false;
#endif
- defaultBlock = false;
}
// drop qualifiers that don't belong in a temporary variable
@@ -515,7 +514,6 @@
specConstant = false;
nonUniform = false;
nullInit = false;
- defaultBlock = false;
clearLayout();
}
@@ -574,7 +572,6 @@
bool specConstant : 1;
bool nonUniform : 1;
bool explicitOffset : 1;
- bool defaultBlock : 1; // default blocks with matching names have structures merged when linking
#ifdef GLSLANG_WEB
bool isWriteOnly() const { return false; }
@@ -759,46 +756,6 @@
}
}
- TBlockStorageClass getBlockStorage() const {
- if (storage == EvqUniform && !isPushConstant()) {
- return EbsUniform;
- }
- else if (storage == EvqUniform) {
- return EbsPushConstant;
- }
- else if (storage == EvqBuffer) {
- return EbsStorageBuffer;
- }
- return EbsNone;
- }
-
- void setBlockStorage(TBlockStorageClass newBacking) {
-#ifndef GLSLANG_WEB
- layoutPushConstant = (newBacking == EbsPushConstant);
-#endif
- switch (newBacking) {
- case EbsUniform :
- if (layoutPacking == ElpStd430) {
- // std430 would not be valid
- layoutPacking = ElpStd140;
- }
- storage = EvqUniform;
- break;
- case EbsStorageBuffer :
- storage = EvqBuffer;
- break;
-#ifndef GLSLANG_WEB
- case EbsPushConstant :
- storage = EvqUniform;
- layoutSet = TQualifier::layoutSetEnd;
- layoutBinding = TQualifier::layoutBindingEnd;
- break;
-#endif
- default:
- break;
- }
- }
-
#ifdef GLSLANG_WEB
bool isPerView() const { return false; }
bool isTaskMemory() const { return false; }
@@ -895,7 +852,6 @@
return hasNonXfbLayout() ||
hasXfb();
}
-
TLayoutMatrix layoutMatrix : 3;
TLayoutPacking layoutPacking : 4;
int layoutOffset;
diff --git a/third_party/vulkan-deps/glslang/src/glslang/Include/intermediate.h b/third_party/vulkan-deps/glslang/src/glslang/Include/intermediate.h
index 1440c20..85edd63 100644
--- a/third_party/vulkan-deps/glslang/src/glslang/Include/intermediate.h
+++ b/third_party/vulkan-deps/glslang/src/glslang/Include/intermediate.h
@@ -593,7 +593,6 @@
EOpTime,
EOpAtomicAdd,
- EOpAtomicSubtract,
EOpAtomicMin,
EOpAtomicMax,
EOpAtomicAnd,
@@ -1136,8 +1135,6 @@
virtual TBasicType getBasicType() const { return type.getBasicType(); }
virtual TQualifier& getQualifier() { return type.getQualifier(); }
virtual const TQualifier& getQualifier() const { return type.getQualifier(); }
- virtual TArraySizes* getArraySizes() { return type.getArraySizes(); }
- virtual const TArraySizes* getArraySizes() const { return type.getArraySizes(); }
virtual void propagatePrecision(TPrecisionQualifier);
virtual int getVectorSize() const { return type.getVectorSize(); }
virtual int getMatrixCols() const { return type.getMatrixCols(); }
diff --git a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/Initialize.cpp b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/Initialize.cpp
index a9e5af4..c94a8a4 100644
--- a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/Initialize.cpp
+++ b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/Initialize.cpp
@@ -1630,36 +1630,6 @@
"\n");
}
}
- else if (spvVersion.vulkanRelaxed) {
- //
- // Atomic counter functions act as aliases to normal atomic functions.
- // replace definitions to take 'volatile coherent uint' instead of 'atomic_uint'
- // and map to equivalent non-counter atomic op
- //
- if ((profile != EEsProfile && version >= 300) ||
- (profile == EEsProfile && version >= 310)) {
- commonBuiltins.append(
- "uint atomicCounterIncrement(volatile coherent uint);"
- "uint atomicCounterDecrement(volatile coherent uint);"
- "uint atomicCounter(volatile coherent uint);"
-
- "\n");
- }
- if (profile != EEsProfile && version >= 460) {
- commonBuiltins.append(
- "uint atomicCounterAdd(volatile coherent uint, uint);"
- "uint atomicCounterSubtract(volatile coherent uint, uint);"
- "uint atomicCounterMin(volatile coherent uint, uint);"
- "uint atomicCounterMax(volatile coherent uint, uint);"
- "uint atomicCounterAnd(volatile coherent uint, uint);"
- "uint atomicCounterOr(volatile coherent uint, uint);"
- "uint atomicCounterXor(volatile coherent uint, uint);"
- "uint atomicCounterExchange(volatile coherent uint, uint);"
- "uint atomicCounterCompSwap(volatile coherent uint, uint, uint);"
-
- "\n");
- }
- }
#endif // !GLSLANG_ANGLE
// Bitfield
@@ -4154,7 +4124,7 @@
}
#ifndef GLSLANG_WEB
if ((profile != EEsProfile && version >= 420) || esBarrier) {
- if (spvVersion.vulkan == 0 || spvVersion.vulkanRelaxed) {
+ if (spvVersion.vulkan == 0) {
commonBuiltins.append("void memoryBarrierAtomicCounter();");
}
commonBuiltins.append("void memoryBarrierImage();");
@@ -4878,13 +4848,6 @@
"in int gl_VertexIndex;"
"in int gl_InstanceIndex;"
);
-
- if (spvVersion.vulkan > 0 && version >= 140 && spvVersion.vulkanRelaxed)
- stageBuiltins[EShLangVertex].append(
- "in int gl_VertexID;" // declare with 'in' qualifier
- "in int gl_InstanceID;"
- );
-
if (version >= 440) {
stageBuiltins[EShLangVertex].append(
"in int gl_BaseVertexARB;"
@@ -4922,7 +4885,7 @@
"mediump float gl_PointSize;" // needs qualifier fixed later
);
} else {
- if (spvVersion.vulkan == 0 || spvVersion.vulkanRelaxed)
+ if (spvVersion.vulkan == 0)
stageBuiltins[EShLangVertex].append(
"in highp int gl_VertexID;" // needs qualifier fixed later
"in highp int gl_InstanceID;" // needs qualifier fixed later
@@ -7473,12 +7436,6 @@
SpecialQualifier("gl_InstanceID", EvqInstanceId, EbvInstanceId, symbolTable);
}
- if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) {
- // treat these built-ins as aliases of VertexIndex and InstanceIndex
- BuiltInVariable("gl_VertexID", EbvVertexIndex, symbolTable);
- BuiltInVariable("gl_InstanceID", EbvInstanceIndex, symbolTable);
- }
-
if (profile != EEsProfile) {
if (version >= 440) {
symbolTable.setVariableExtensions("gl_BaseVertexARB", 1, &E_GL_ARB_shader_draw_parameters);
@@ -8955,14 +8912,6 @@
symbolTable.relateToOperator("memoryBarrierAtomicCounter", EOpMemoryBarrierAtomicCounter);
symbolTable.relateToOperator("memoryBarrierImage", EOpMemoryBarrierImage);
- if (spvVersion.vulkanRelaxed) {
- //
- // functions signature have been replaced to take uint operations on buffer variables
- // remap atomic counter functions to atomic operations
- //
- symbolTable.relateToOperator("memoryBarrierAtomicCounter", EOpMemoryBarrierBuffer);
- }
-
symbolTable.relateToOperator("atomicLoad", EOpAtomicLoad);
symbolTable.relateToOperator("atomicStore", EOpAtomicStore);
@@ -8970,20 +8919,6 @@
symbolTable.relateToOperator("atomicCounterDecrement", EOpAtomicCounterDecrement);
symbolTable.relateToOperator("atomicCounter", EOpAtomicCounter);
- if (spvVersion.vulkanRelaxed) {
- //
- // functions signature have been replaced to take uint operations
- // remap atomic counter functions to atomic operations
- //
- // these atomic counter functions do not match signatures of glsl
- // atomic functions, so they will be remapped to semantically
- // equivalent functions in the parser
- //
- symbolTable.relateToOperator("atomicCounterIncrement", EOpNull);
- symbolTable.relateToOperator("atomicCounterDecrement", EOpNull);
- symbolTable.relateToOperator("atomicCounter", EOpNull);
- }
-
symbolTable.relateToOperator("clockARB", EOpReadClockSubgroupKHR);
symbolTable.relateToOperator("clock2x32ARB", EOpReadClockSubgroupKHR);
@@ -9002,23 +8937,6 @@
symbolTable.relateToOperator("atomicCounterCompSwap", EOpAtomicCounterCompSwap);
}
- if (spvVersion.vulkanRelaxed) {
- //
- // functions signature have been replaced to take 'uint' instead of 'atomic_uint'
- // remap atomic counter functions to non-counter atomic ops so
- // functions act as aliases to non-counter atomic ops
- //
- symbolTable.relateToOperator("atomicCounterAdd", EOpAtomicAdd);
- symbolTable.relateToOperator("atomicCounterSubtract", EOpAtomicSubtract);
- symbolTable.relateToOperator("atomicCounterMin", EOpAtomicMin);
- symbolTable.relateToOperator("atomicCounterMax", EOpAtomicMax);
- symbolTable.relateToOperator("atomicCounterAnd", EOpAtomicAnd);
- symbolTable.relateToOperator("atomicCounterOr", EOpAtomicOr);
- symbolTable.relateToOperator("atomicCounterXor", EOpAtomicXor);
- symbolTable.relateToOperator("atomicCounterExchange", EOpAtomicExchange);
- symbolTable.relateToOperator("atomicCounterCompSwap", EOpAtomicCompSwap);
- }
-
symbolTable.relateToOperator("fma", EOpFma);
symbolTable.relateToOperator("frexp", EOpFrexp);
symbolTable.relateToOperator("ldexp", EOpLdexp);
diff --git a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/ParseContextBase.cpp b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/ParseContextBase.cpp
index 02cca40..3efa27a 100644
--- a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/ParseContextBase.cpp
+++ b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/ParseContextBase.cpp
@@ -601,6 +601,7 @@
selector.push_back(0);
}
+#ifdef ENABLE_HLSL
//
// Make the passed-in variable information become a member of the
// global uniform block. If this doesn't exist yet, make it.
@@ -645,67 +646,7 @@
++firstNewMember;
}
-
-void TParseContextBase::growAtomicCounterBlock(int binding, const TSourceLoc& loc, TType& memberType, const TString& memberName, TTypeList* typeList) {
- // Make the atomic counter block, if not yet made.
- const auto &at = atomicCounterBuffers.find(binding);
- if (at == atomicCounterBuffers.end()) {
- atomicCounterBuffers.insert({binding, (TVariable*)nullptr });
- atomicCounterBlockFirstNewMember.insert({binding, 0});
- }
-
- TVariable*& atomicCounterBuffer = atomicCounterBuffers[binding];
- int& bufferNewMember = atomicCounterBlockFirstNewMember[binding];
-
- if (atomicCounterBuffer == nullptr) {
- TQualifier blockQualifier;
- blockQualifier.clear();
- blockQualifier.storage = EvqBuffer;
-
- char charBuffer[512];
- if (binding != TQualifier::layoutBindingEnd) {
- snprintf(charBuffer, 512, "%s_%d", getAtomicCounterBlockName(), binding);
- } else {
- snprintf(charBuffer, 512, "%s_0", getAtomicCounterBlockName());
- }
-
- TType blockType(new TTypeList, *NewPoolTString(charBuffer), blockQualifier);
- setUniformBlockDefaults(blockType);
- blockType.getQualifier().layoutPacking = ElpStd430;
- atomicCounterBuffer = new TVariable(NewPoolTString(""), blockType, true);
- // If we arn't auto mapping bindings then set the block to use the same
- // binding as what the atomic was set to use
- if (!intermediate.getAutoMapBindings()) {
- atomicCounterBuffer->getWritableType().getQualifier().layoutBinding = binding;
- }
- bufferNewMember = 0;
-
- atomicCounterBuffer->getWritableType().getQualifier().layoutSet = atomicCounterBlockSet;
- }
-
- // Add the requested member as a member to the global block.
- TType* type = new TType;
- type->shallowCopy(memberType);
- type->setFieldName(memberName);
- if (typeList)
- type->setStruct(typeList);
- TTypeLoc typeLoc = {type, loc};
- atomicCounterBuffer->getType().getWritableStruct()->push_back(typeLoc);
-
- // Insert into the symbol table.
- if (bufferNewMember == 0) {
- // This is the first request; we need a normal symbol table insert
- if (symbolTable.insert(*atomicCounterBuffer))
- trackLinkage(*atomicCounterBuffer);
- else
- error(loc, "failed to insert the global constant buffer", "buffer", "");
- } else {
- // This is a follow-on request; we need to amend the first insert
- symbolTable.amend(*atomicCounterBuffer, bufferNewMember);
- }
-
- ++bufferNewMember;
-}
+#endif
void TParseContextBase::finish()
{
diff --git a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/ParseHelper.cpp b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/ParseHelper.cpp
index 550fce6..12d68a3 100644
--- a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/ParseHelper.cpp
+++ b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/ParseHelper.cpp
@@ -225,108 +225,6 @@
error(getCurrentLoc(), "compilation terminated", "", "");
}
-void TParseContext::growGlobalUniformBlock(const TSourceLoc& loc, TType& memberType, const TString& memberName, TTypeList* typeList)
-{
- bool createBlock = globalUniformBlock == nullptr;
-
- if (createBlock) {
- globalUniformBinding = intermediate.getGlobalUniformBinding();
- globalUniformSet = intermediate.getGlobalUniformSet();
- }
-
- // use base class function to create/expand block
- TParseContextBase::growGlobalUniformBlock(loc, memberType, memberName, typeList);
-
- if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) {
- // check for a block storage override
- TBlockStorageClass storageOverride = intermediate.getBlockStorageOverride(getGlobalUniformBlockName());
- TQualifier& qualifier = globalUniformBlock->getWritableType().getQualifier();
- qualifier.defaultBlock = true;
-
- if (storageOverride != EbsNone) {
- if (createBlock) {
- // Remap block storage
- qualifier.setBlockStorage(storageOverride);
-
- // check that the change didn't create errors
- blockQualifierCheck(loc, qualifier, false);
- }
-
- // remap meber storage as well
- memberType.getQualifier().setBlockStorage(storageOverride);
- }
- }
-}
-
-void TParseContext::growAtomicCounterBlock(int binding, const TSourceLoc& loc, TType& memberType, const TString& memberName, TTypeList* typeList)
-{
- bool createBlock = atomicCounterBuffers.find(binding) == atomicCounterBuffers.end();
-
- if (createBlock) {
- atomicCounterBlockSet = intermediate.getAtomicCounterBlockSet();
- }
-
- // use base class function to create/expand block
- TParseContextBase::growAtomicCounterBlock(binding, loc, memberType, memberName, typeList);
- TQualifier& qualifier = atomicCounterBuffers[binding]->getWritableType().getQualifier();
- qualifier.defaultBlock = true;
-
- if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) {
- // check for a Block storage override
- TBlockStorageClass storageOverride = intermediate.getBlockStorageOverride(getAtomicCounterBlockName());
-
- if (storageOverride != EbsNone) {
- if (createBlock) {
- // Remap block storage
-
- qualifier.setBlockStorage(storageOverride);
-
- // check that the change didn't create errors
- blockQualifierCheck(loc, qualifier, false);
- }
-
- // remap meber storage as well
- memberType.getQualifier().setBlockStorage(storageOverride);
- }
- }
-}
-
-const char* TParseContext::getGlobalUniformBlockName() const
-{
- const char* name = intermediate.getGlobalUniformBlockName();
- if (std::string(name) == "")
- return "gl_DefaultUniformBlock";
- else
- return name;
-}
-void TParseContext::finalizeGlobalUniformBlockLayout(TVariable&)
-{
-}
-void TParseContext::setUniformBlockDefaults(TType& block) const
-{
- block.getQualifier().layoutPacking = ElpStd140;
- block.getQualifier().layoutMatrix = ElmColumnMajor;
-}
-
-
-const char* TParseContext::getAtomicCounterBlockName() const
-{
- const char* name = intermediate.getAtomicCounterBlockName();
- if (std::string(name) == "")
- return "gl_AtomicCounterBlock";
- else
- return name;
-}
-void TParseContext::finalizeAtomicCounterBlockLayout(TVariable&)
-{
-}
-
-void TParseContext::setAtomicCounterBlockDefaults(TType& block) const
-{
- block.getQualifier().layoutPacking = ElpStd430;
- block.getQualifier().layoutMatrix = ElmRowMajor;
-}
-
void TParseContext::handlePragma(const TSourceLoc& loc, const TVector<TString>& tokens)
{
#ifndef GLSLANG_WEB
@@ -1237,14 +1135,6 @@
{
TIntermTyped* result = nullptr;
- if (spvVersion.vulkan != 0 && spvVersion.vulkanRelaxed) {
- // allow calls that are invalid in Vulkan Semantics to be invisibily
- // remapped to equivalent valid functions
- result = vkRelaxedRemapFunctionCall(loc, function, arguments);
- if (result)
- return result;
- }
-
if (function->getBuiltInOp() == EOpArrayLength)
result = handleLengthMethod(loc, function, arguments);
else if (function->getBuiltInOp() != EOpNull) {
@@ -1837,7 +1727,6 @@
// Grab the semantics and storage class semantics from the operands, based on opcode
switch (callNode.getOp()) {
case EOpAtomicAdd:
- case EOpAtomicSubtract:
case EOpAtomicMin:
case EOpAtomicMax:
case EOpAtomicAnd:
@@ -2287,7 +2176,6 @@
}
case EOpAtomicAdd:
- case EOpAtomicSubtract:
case EOpAtomicMin:
case EOpAtomicMax:
case EOpAtomicAnd:
@@ -3500,7 +3388,7 @@
if (type.containsNonOpaque()) {
// Vulkan doesn't allow transparent uniforms outside of blocks
- if (spvVersion.vulkan > 0 && !spvVersion.vulkanRelaxed)
+ if (spvVersion.vulkan > 0)
vulkanRemoved(loc, "non-opaque uniforms outside a block");
// OpenGL wants locations on these (unless they are getting automapped)
if (spvVersion.openGl > 0 && !type.getQualifier().hasLocation() && !intermediate.getAutoMapLocations())
@@ -5131,22 +5019,14 @@
return;
}
if (id == TQualifier::getLayoutPackingString(ElpPacked)) {
- if (spvVersion.spv != 0) {
- if (spvVersion.vulkanRelaxed)
- return; // silently ignore qualifier
- else
- spvRemoved(loc, "packed");
- }
+ if (spvVersion.spv != 0)
+ spvRemoved(loc, "packed");
publicType.qualifier.layoutPacking = ElpPacked;
return;
}
if (id == TQualifier::getLayoutPackingString(ElpShared)) {
- if (spvVersion.spv != 0) {
- if (spvVersion.vulkanRelaxed)
- return; // silently ignore qualifier
- else
- spvRemoved(loc, "shared");
- }
+ if (spvVersion.spv != 0)
+ spvRemoved(loc, "shared");
publicType.qualifier.layoutPacking = ElpShared;
return;
}
@@ -6048,7 +5928,7 @@
error(loc, "sampler binding not less than gl_MaxCombinedTextureImageUnits", "binding", type.isArray() ? "(using array)" : "");
#endif
}
- if (type.isAtomic() && !spvVersion.vulkanRelaxed) {
+ if (type.isAtomic()) {
if (qualifier.layoutBinding >= (unsigned int)resources.maxAtomicCounterBindings) {
error(loc, "atomic_uint binding is too large; see gl_MaxAtomicCounterBindings", "binding", "");
return;
@@ -6718,68 +6598,6 @@
return bestMatch;
}
-//
-// Adjust function calls that aren't declared in Vulkan to a
-// calls with equivalent effects
-//
-TIntermTyped* TParseContext::vkRelaxedRemapFunctionCall(const TSourceLoc& loc, TFunction* function, TIntermNode* arguments)
-{
- TIntermTyped* result = nullptr;
-
-#ifndef GLSLANG_WEB
- if (function->getBuiltInOp() != EOpNull) {
- return nullptr;
- }
-
- if (function->getName() == "atomicCounterIncrement") {
- // change atomicCounterIncrement into an atomicAdd of 1
- TString name("atomicAdd");
- TType uintType(EbtUint);
-
- TFunction realFunc(&name, function->getType());
-
- for (int i = 0; i < function->getParamCount(); ++i) {
- realFunc.addParameter((*function)[i]);
- }
-
- TParameter tmpP = { 0, &uintType };
- realFunc.addParameter(tmpP);
- arguments = intermediate.growAggregate(arguments, intermediate.addConstantUnion(1, loc, true));
-
- result = handleFunctionCall(loc, &realFunc, arguments);
- } else if (function->getName() == "atomicCounterDecrement") {
- // change atomicCounterDecrement into an atomicAdd with -1
- // and subtract 1 from result, to return post-decrement value
- TString name("atomicAdd");
- TType uintType(EbtUint);
-
- TFunction realFunc(&name, function->getType());
-
- for (int i = 0; i < function->getParamCount(); ++i) {
- realFunc.addParameter((*function)[i]);
- }
-
- TParameter tmpP = { 0, &uintType };
- realFunc.addParameter(tmpP);
- arguments = intermediate.growAggregate(arguments, intermediate.addConstantUnion(-1, loc, true));
-
- result = handleFunctionCall(loc, &realFunc, arguments);
-
- // post decrement, so that it matches AtomicCounterDecrement semantics
- if (result) {
- result = handleBinaryMath(loc, "-", EOpSub, result, intermediate.addConstantUnion(1, loc, true));
- }
- } else if (function->getName() == "atomicCounter") {
- // change atomicCounter into a direct read of the variable
- if (arguments->getAsTyped()) {
- result = arguments->getAsTyped();
- }
- }
-#endif
-
- return result;
-}
-
// When a declaration includes a type, but not a variable name, it can be used
// to establish defaults.
void TParseContext::declareTypeDefaults(const TSourceLoc& loc, const TPublicType& publicType)
@@ -6804,91 +6622,6 @@
#endif
}
-bool TParseContext::vkRelaxedRemapUniformVariable(const TSourceLoc& loc, TString& identifier, const TPublicType&,
- TArraySizes*, TIntermTyped* initializer, TType& type)
-{
- if (parsingBuiltins || symbolTable.atBuiltInLevel() || !symbolTable.atGlobalLevel() ||
- type.getQualifier().storage != EvqUniform ||
- !(type.containsNonOpaque()
-#ifndef GLSLANG_WEB
- || type.getBasicType() == EbtAtomicUint
-#endif
- )) {
- return false;
- }
-
- if (type.getQualifier().hasLocation()) {
- warn(loc, "ignoring layout qualifier for uniform", identifier.c_str(), "location");
- type.getQualifier().layoutLocation = TQualifier::layoutLocationEnd;
- }
-
- if (initializer) {
- warn(loc, "Ignoring initializer for uniform", identifier.c_str(), "");
- initializer = nullptr;
- }
-
- if (type.isArray()) {
- // do array size checks here
- arraySizesCheck(loc, type.getQualifier(), type.getArraySizes(), initializer, false);
-
- if (arrayQualifierError(loc, type.getQualifier()) || arrayError(loc, type)) {
- error(loc, "array param error", identifier.c_str(), "");
- }
- }
-
- // do some checking on the type as it was declared
- layoutTypeCheck(loc, type);
-
- int bufferBinding = TQualifier::layoutBindingEnd;
- TVariable* updatedBlock = nullptr;
-
-#ifndef GLSLANG_WEB
- // Convert atomic_uint into members of a buffer block
- if (type.isAtomic()) {
- type.setBasicType(EbtUint);
- type.getQualifier().storage = EvqBuffer;
-
- type.getQualifier().volatil = true;
- type.getQualifier().coherent = true;
-
- // xxTODO: use logic from fixOffset() to apply explicit member offset
- bufferBinding = type.getQualifier().layoutBinding;
- type.getQualifier().layoutBinding = TQualifier::layoutBindingEnd;
- type.getQualifier().explicitOffset = false;
- growAtomicCounterBlock(bufferBinding, loc, type, identifier, nullptr);
- updatedBlock = atomicCounterBuffers[bufferBinding];
- }
-#endif
-
- if (!updatedBlock) {
- growGlobalUniformBlock(loc, type, identifier, nullptr);
- updatedBlock = globalUniformBlock;
- }
-
- //
- // don't assign explicit member offsets here
- // if any are assigned, need to be updated here and in the merge/link step
- // fixBlockUniformOffsets(updatedBlock->getWritableType().getQualifier(), *updatedBlock->getWritableType().getWritableStruct());
-
- // checks on update buffer object
- layoutObjectCheck(loc, *updatedBlock);
-
- TSymbol* symbol = symbolTable.find(identifier);
-
- if (!symbol) {
- if (updatedBlock == globalUniformBlock)
- error(loc, "error adding uniform to default uniform block", identifier.c_str(), "");
- else
- error(loc, "error adding atomic counter to atomic counter block", identifier.c_str(), "");
- return false;
- }
-
- // merge qualifiers
- mergeObjectLayoutQualifiers(updatedBlock->getWritableType().getQualifier(), type.getQualifier(), true);
-
- return true;
-}
-
//
// Do everything necessary to handle a variable (non-block) declaration.
// Either redeclaring a variable, or making a new one, updating the symbol
@@ -7000,14 +6733,6 @@
if (symbol == nullptr)
reservedErrorCheck(loc, identifier);
- if (symbol == nullptr && spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) {
- bool remapped = vkRelaxedRemapUniformVariable(loc, identifier, publicType, arraySizes, initializer, type);
-
- if (remapped) {
- return nullptr;
- }
- }
-
inheritGlobalDefaults(type.getQualifier());
// Declare the variable
@@ -7900,8 +7625,6 @@
void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, const TString* instanceName,
TArraySizes* arraySizes)
{
- if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed)
- blockStorageRemap(loc, blockName, currentBlockQualifier);
blockStageIoCheck(loc, currentBlockQualifier);
blockQualifierCheck(loc, currentBlockQualifier, instanceName != nullptr);
if (arraySizes != nullptr) {
@@ -8191,17 +7914,6 @@
trackLinkage(variable);
}
-//
-// allow storage type of block to be remapped at compile time
-//
-void TParseContext::blockStorageRemap(const TSourceLoc&, const TString* instanceName, TQualifier& qualifier)
-{
- TBlockStorageClass type = intermediate.getBlockStorageOverride(instanceName->c_str());
- if (type != EbsNone) {
- qualifier.setBlockStorage(type);
- }
-}
-
// Do all block-declaration checking regarding the combination of in/out/uniform/buffer
// with a particular stage.
void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& qualifier)
diff --git a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/ParseHelper.h b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/ParseHelper.h
index 6f00621..ad9b8d6 100644
--- a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/ParseHelper.h
+++ b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/ParseHelper.h
@@ -92,8 +92,7 @@
limits(resources.limits),
globalUniformBlock(nullptr),
globalUniformBinding(TQualifier::layoutBindingEnd),
- globalUniformSet(TQualifier::layoutSetEnd),
- atomicCounterBlockSet(TQualifier::layoutSetEnd)
+ globalUniformSet(TQualifier::layoutSetEnd)
{
if (entryPoint != nullptr)
sourceEntryPointName = *entryPoint;
@@ -155,11 +154,10 @@
extensionCallback(line, extension, behavior);
}
+#ifdef ENABLE_HLSL
// Manage the global uniform block (default uniforms in GLSL, $Global in HLSL)
virtual void growGlobalUniformBlock(const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr);
-
- // Manage global buffer (used for backing atomic counters in GLSL when using relaxed Vulkan semantics)
- virtual void growAtomicCounterBlock(int binding, const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr);
+#endif
// Potentially rename shader entry point function
void renameShaderFunction(TString*& name) const
@@ -232,24 +230,7 @@
// override this to set the language-specific name
virtual const char* getGlobalUniformBlockName() const { return ""; }
virtual void setUniformBlockDefaults(TType&) const { }
- virtual void finalizeGlobalUniformBlockLayout(TVariable&) {}
-
- // Manage the atomic counter block (used for atomic_uints with Vulkan-Relaxed)
- TMap<int, TVariable*> atomicCounterBuffers;
- unsigned int atomicCounterBlockSet;
- TMap<int, int> atomicCounterBlockFirstNewMember;
- // override this to set the language-specific name
- virtual const char* getAtomicCounterBlockName() const { return ""; }
- virtual void setAtomicCounterBlockDefaults(TType&) const {}
- virtual void finalizeAtomicCounterBlockLayout(TVariable&) {}
- bool isAtomicCounterBlock(const TSymbol& symbol) {
- const TVariable* var = symbol.getAsVariable();
- if (!var)
- return false;
- const auto& at = atomicCounterBuffers.find(var->getType().getQualifier().layoutBinding);
- return (at != atomicCounterBuffers.end() && (*at).second->getType() == var->getType());
- }
-
+ virtual void finalizeGlobalUniformBlockLayout(TVariable&) { }
virtual void outputMessage(const TSourceLoc&, const char* szReason, const char* szToken,
const char* szExtraInfoFormat, TPrefixType prefix,
va_list args);
@@ -312,9 +293,6 @@
bool parseShaderStrings(TPpContext&, TInputScanner& input, bool versionWillBeError = false) override;
void parserError(const char* s); // for bison's yyerror
- virtual void growGlobalUniformBlock(const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr) override;
- virtual void growAtomicCounterBlock(int binding, const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr) override;
-
void reservedErrorCheck(const TSourceLoc&, const TString&);
void reservedPpErrorCheck(const TSourceLoc&, const char* name, const char* op) override;
bool lineContinuationCheck(const TSourceLoc&, bool endOfComment) override;
@@ -362,10 +340,6 @@
void checkPrecisionQualifier(const TSourceLoc&, TPrecisionQualifier);
void memorySemanticsCheck(const TSourceLoc&, const TFunction&, const TIntermOperator& callNode);
- TIntermTyped* vkRelaxedRemapFunctionCall(const TSourceLoc&, TFunction*, TIntermNode*);
- // returns true if the variable was remapped to something else
- bool vkRelaxedRemapUniformVariable(const TSourceLoc&, TString&, const TPublicType&, TArraySizes*, TIntermTyped*, TType&);
-
void assignError(const TSourceLoc&, const char* op, TString left, TString right);
void unaryOpError(const TSourceLoc&, const char* op, TString operand);
void binaryOpError(const TSourceLoc&, const char* op, TString left, TString right);
@@ -443,7 +417,6 @@
TIntermTyped* constructBuiltIn(const TType&, TOperator, TIntermTyped*, const TSourceLoc&, bool subset);
void inheritMemoryQualifiers(const TQualifier& from, TQualifier& to);
void declareBlock(const TSourceLoc&, TTypeList& typeList, const TString* instanceName = 0, TArraySizes* arraySizes = 0);
- void blockStorageRemap(const TSourceLoc&, const TString*, TQualifier&);
void blockStageIoCheck(const TSourceLoc&, const TQualifier&);
void blockQualifierCheck(const TSourceLoc&, const TQualifier&, bool instanceName);
void fixBlockLocations(const TSourceLoc&, TQualifier&, TTypeList&, bool memberWithLocation, bool memberWithoutLocation);
@@ -488,14 +461,6 @@
void finish() override;
#endif
- virtual const char* getGlobalUniformBlockName() const override;
- virtual void finalizeGlobalUniformBlockLayout(TVariable&) override;
- virtual void setUniformBlockDefaults(TType& block) const override;
-
- virtual const char* getAtomicCounterBlockName() const override;
- virtual void finalizeAtomicCounterBlockLayout(TVariable&) override;
- virtual void setAtomicCounterBlockDefaults(TType& block) const override;
-
public:
//
// Generally, bison productions, the scanner, and the PP need read/write access to these; just give them direct access
diff --git a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/ShaderLang.cpp b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/ShaderLang.cpp
index 4b340ea..3f793a7 100644
--- a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/ShaderLang.cpp
+++ b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/ShaderLang.cpp
@@ -159,7 +159,7 @@
return index;
}
-const int SpvVersionCount = 4; // index range in MapSpvVersionToIndex
+const int SpvVersionCount = 3; // index range in MapSpvVersionToIndex
int MapSpvVersionToIndex(const SpvVersion& spvVersion)
{
@@ -167,12 +167,8 @@
if (spvVersion.openGl > 0)
index = 1;
- else if (spvVersion.vulkan > 0) {
- if (!spvVersion.vulkanRelaxed)
- index = 2;
- else
- index = 3;
- }
+ else if (spvVersion.vulkan > 0)
+ index = 2;
assert(index < SpvVersionCount);
@@ -727,7 +723,6 @@
break;
case EShClientVulkan:
spvVersion.vulkanGlsl = environment->input.dialectVersion;
- spvVersion.vulkanRelaxed = environment->input.VulkanRulesRelaxed;
break;
case EShClientOpenGL:
spvVersion.openGl = environment->input.dialectVersion;
@@ -1873,15 +1868,6 @@
void TShader::setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { intermediate->setTextureSamplerTransformMode(mode); }
#endif
-void TShader::addBlockStorageOverride(const char* nameStr, TBlockStorageClass backing) { intermediate->addBlockStorageOverride(nameStr, backing); }
-
-void TShader::setGlobalUniformBlockName(const char* name) { intermediate->setGlobalUniformBlockName(name); }
-void TShader::setGlobalUniformSet(unsigned int set) { intermediate->setGlobalUniformSet(set); }
-void TShader::setGlobalUniformBinding(unsigned int binding) { intermediate->setGlobalUniformBinding(binding); }
-
-void TShader::setAtomicCounterBlockName(const char* name) { intermediate->setAtomicCounterBlockName(name); }
-void TShader::setAtomicCounterBlockSet(unsigned int set) { intermediate->setAtomicCounterBlockSet(set); }
-
#ifdef ENABLE_HLSL
// See comment above TDefaultHlslIoMapper in iomapper.cpp:
void TShader::setHlslIoMapping(bool hlslIoMap) { intermediate->setHlslIoMapping(hlslIoMap); }
@@ -1997,10 +1983,7 @@
error = true;
}
- if (!error) {
- if (! crossStageCheck(messages))
- error = true;
- }
+ // TODO: Link: cross-stage error checking
return ! error;
}
@@ -2077,64 +2060,6 @@
return intermediate[stage]->getNumErrors() == 0;
}
-//
-// Check that there are no errors in linker objects accross stages
-//
-// Return true if no errors.
-//
-bool TProgram::crossStageCheck(EShMessages) {
-
- // make temporary intermediates to hold the linkage symbols for each linking interface
- // while we do the checks
- // Independent interfaces are:
- // all uniform variables and blocks
- // all buffer blocks
- // all in/out on a stage boundary
-
- TVector<TIntermediate*> activeStages;
- for (int s = 0; s < EShLangCount; ++s) {
- if (intermediate[s])
- activeStages.push_back(intermediate[s]);
- }
-
- // no extra linking if there is only one stage
- if (! (activeStages.size() > 1))
- return true;
-
- // setup temporary tree to hold unfirom objects from different stages
- TIntermediate* firstIntermediate = activeStages.front();
- TIntermediate uniforms(EShLangCount,
- firstIntermediate->getVersion(),
- firstIntermediate->getProfile());
- uniforms.setSpv(firstIntermediate->getSpv());
-
- TIntermAggregate uniformObjects(EOpLinkerObjects);
- TIntermAggregate root(EOpSequence);
- root.getSequence().push_back(&uniformObjects);
- uniforms.setTreeRoot(&root);
-
- bool error = false;
-
- // merge uniforms from all stages into a single intermediate
- for (unsigned int i = 0; i < activeStages.size(); ++i) {
- uniforms.mergeUniformObjects(*infoSink, *activeStages[i]);
- }
- error |= uniforms.getNumErrors() != 0;
-
- // copy final definition of global block back into each stage
- for (unsigned int i = 0; i < activeStages.size(); ++i) {
- activeStages[i]->mergeGlobalUniformBlocks(*infoSink, uniforms);
- }
-
- // compare cross stage symbols for each stage boundary
- for (unsigned int i = 1; i < activeStages.size(); ++i) {
- activeStages[i - 1]->checkStageIO(*infoSink, *activeStages[i]);
- error |= (activeStages[i - 1]->getNumErrors() != 0);
- }
-
- return !error;
-}
-
const char* TProgram::getInfoLog()
{
return infoSink->info.c_str();
diff --git a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/Versions.cpp b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/Versions.cpp
index 7554bfd..488c98c 100644
--- a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/Versions.cpp
+++ b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/Versions.cpp
@@ -1273,7 +1273,7 @@
// Call for any operation removed because Vulkan SPIR-V is being generated.
void TParseVersions::vulkanRemoved(const TSourceLoc& loc, const char* op)
{
- if (spvVersion.vulkan > 0 && !spvVersion.vulkanRelaxed)
+ if (spvVersion.vulkan > 0)
error(loc, "not allowed when using GLSL for Vulkan", op, "");
}
diff --git a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/Versions.h b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/Versions.h
index 25feb0b..f377973 100644
--- a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/Versions.h
+++ b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/Versions.h
@@ -87,12 +87,11 @@
// The union of all requested rule sets will be applied.
//
struct SpvVersion {
- SpvVersion() : spv(0), vulkanGlsl(0), vulkan(0), openGl(0), vulkanRelaxed(false) {}
+ SpvVersion() : spv(0), vulkanGlsl(0), vulkan(0), openGl(0) {}
unsigned int spv; // the version of SPIR-V to target, as defined by "word 1" of the SPIR-V binary header
int vulkanGlsl; // the version of GLSL semantics for Vulkan, from GL_KHR_vulkan_glsl, for "#define VULKAN XXX"
int vulkan; // the version of Vulkan, for which SPIR-V execution environment rules to use
int openGl; // the version of GLSL semantics for OpenGL, from GL_ARB_gl_spirv, for "#define GL_SPIRV XXX"
- bool vulkanRelaxed; // relax changes to GLSL for Vulkan, allowing some GL-specific to be compiled to Vulkan SPIR-V target
};
//
diff --git a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/intermOut.cpp b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/intermOut.cpp
index c718f94..5ce3e47 100644
--- a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/intermOut.cpp
+++ b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/intermOut.cpp
@@ -886,7 +886,6 @@
case EOpTime: out.debug << "time"; break;
case EOpAtomicAdd: out.debug << "AtomicAdd"; break;
- case EOpAtomicSubtract: out.debug << "AtomicSubtract"; break;
case EOpAtomicMin: out.debug << "AtomicMin"; break;
case EOpAtomicMax: out.debug << "AtomicMax"; break;
case EOpAtomicAnd: out.debug << "AtomicAnd"; break;
diff --git a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/iomapper.cpp b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/iomapper.cpp
index 7e12864..c42e74f 100644
--- a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/iomapper.cpp
+++ b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/iomapper.cpp
@@ -210,8 +210,8 @@
ent.newIndex = -1;
const bool isValid = resolver.validateBinding(stage, ent);
if (isValid) {
- resolver.resolveSet(ent.stage, ent);
resolver.resolveBinding(ent.stage, ent);
+ resolver.resolveSet(ent.stage, ent);
resolver.resolveUniformLocation(ent.stage, ent);
if (ent.newBinding != -1) {
@@ -317,13 +317,15 @@
};
// The class is used for reserving explicit uniform locations and ubo/ssbo/opaque bindings
-// xxTODO: maybe this logic should be moved into the resolver's "validateInOut" and "validateUniform"
struct TSymbolValidater
{
TSymbolValidater(TIoMapResolver& r, TInfoSink& i, TVarLiveMap* in[EShLangCount], TVarLiveMap* out[EShLangCount],
TVarLiveMap* uniform[EShLangCount], bool& hadError, EProfile profile, int version)
- : resolver(r)
+ : preStage(EShLangCount)
+ , currentStage(EShLangCount)
+ , nextStage(EShLangCount)
+ , resolver(r)
, infoSink(i)
, hadError(hadError)
, profile(profile)
@@ -436,23 +438,17 @@
TIntermSymbol* base = ent1.symbol;
const TType& type = ent1.symbol->getType();
const TString& name = entKey.first;
- TString mangleName1, mangleName2;
EShLanguage stage = ent1.stage;
- EShLanguage preStage, currentStage, nextStage;
-
- preStage = EShLangCount;
- for (int i = stage - 1; i >= 0; i--) {
- if (inVarMaps[i] != nullptr) {
- preStage = static_cast<EShLanguage>(i);
- break;
- }
- }
- currentStage = stage;
- nextStage = EShLangCount;
- for (int i = stage + 1; i < EShLangCount; i++) {
- if (inVarMaps[i] != nullptr) {
- nextStage = static_cast<EShLanguage>(i);
- break;
+ TString mangleName1, mangleName2;
+ if (currentStage != stage) {
+ preStage = currentStage;
+ currentStage = stage;
+ nextStage = EShLangCount;
+ for (int i = currentStage + 1; i < EShLangCount; i++) {
+ if (inVarMaps[i] != nullptr) {
+ nextStage = static_cast<EShLanguage>(i);
+ break;
+ }
}
}
@@ -463,9 +459,6 @@
type.appendMangledName(mangleName1);
}
-
- // basic checking that symbols match
- // more extensive checking in the link stage
if (base->getQualifier().storage == EvqVaryingIn) {
// validate stage in;
if (preStage == EShLangCount)
@@ -491,7 +484,8 @@
if (ent2->second.symbol->getType().getQualifier().isArrayedIo(preStage)) {
TType subType(ent2->second.symbol->getType(), 0);
subType.appendMangledName(mangleName2);
- } else {
+ }
+ else {
ent2->second.symbol->getType().appendMangledName(mangleName2);
}
@@ -542,7 +536,8 @@
if (ent2->second.symbol->getType().getQualifier().isArrayedIo(nextStage)) {
TType subType(ent2->second.symbol->getType(), 0);
subType.appendMangledName(mangleName2);
- } else {
+ }
+ else {
ent2->second.symbol->getType().appendMangledName(mangleName2);
}
if (mangleName1 == mangleName2)
@@ -555,7 +550,7 @@
}
return;
}
- } else if (base->getQualifier().isUniformOrBuffer() && !base->getQualifier().isPushConstant()) {
+ } else if (base->getQualifier().isUniformOrBuffer() && ! base->getQualifier().isPushConstant()) {
// validate uniform type;
for (int i = 0; i < EShLangCount; i++) {
if (i != currentStage && outVarMaps[i] != nullptr) {
@@ -563,7 +558,6 @@
if (ent2 != uniformVarMap[i]->end()) {
ent2->second.symbol->getType().appendMangledName(mangleName2);
if (mangleName1 != mangleName2) {
- ent2->second.symbol->getType().sameElementType(type);
TString err = "Invalid Uniform variable type : " + entKey.first;
infoSink.info.message(EPrefixInternalError, err.c_str());
hadError = true;
@@ -614,7 +608,8 @@
}
TVarLiveMap *inVarMaps[EShLangCount], *outVarMaps[EShLangCount], *uniformVarMap[EShLangCount];
-
+ // Use for mark pre stage, to get more interface symbol information.
+ EShLanguage preStage, currentStage, nextStage;
// Use for mark current shader stage for resolver
TIoMapResolver& resolver;
TInfoSink& infoSink;
@@ -754,18 +749,14 @@
, nextOutputLocation(0)
{
memset(stageMask, false, sizeof(bool) * (EShLangCount + 1));
- memset(stageIntermediates, 0, sizeof(TIntermediate*) * (EShLangCount));
- stageIntermediates[intermediate.getStage()] = &intermediate;
}
-int TDefaultIoResolverBase::getBaseBinding(EShLanguage stage, TResourceType res, unsigned int set) const {
- return stageIntermediates[stage] ? selectBaseBinding(stageIntermediates[stage]->getShiftBinding(res), stageIntermediates[stage]->getShiftBindingForSet(res, set))
- : selectBaseBinding(intermediate.getShiftBinding(res), intermediate.getShiftBindingForSet(res, set));
+int TDefaultIoResolverBase::getBaseBinding(TResourceType res, unsigned int set) const {
+ return selectBaseBinding(intermediate.getShiftBinding(res), intermediate.getShiftBindingForSet(res, set));
}
-const std::vector<std::string>& TDefaultIoResolverBase::getResourceSetBinding(EShLanguage stage) const {
- return stageIntermediates[stage] ? stageIntermediates[stage]->getResourceSetBinding()
- : intermediate.getResourceSetBinding();
+const std::vector<std::string>& TDefaultIoResolverBase::getResourceSetBinding() const {
+ return intermediate.getResourceSetBinding();
}
bool TDefaultIoResolverBase::doAutoBindingMapping() const { return intermediate.getAutoMapBindings(); }
@@ -806,14 +797,14 @@
return reserveSlot(set, base, size);
}
-int TDefaultIoResolverBase::resolveSet(EShLanguage stage, TVarEntryInfo& ent) {
+int TDefaultIoResolverBase::resolveSet(EShLanguage /*stage*/, TVarEntryInfo& ent) {
const TType& type = ent.symbol->getType();
if (type.getQualifier().hasSet()) {
return ent.newSet = type.getQualifier().layoutSet;
}
// If a command line or API option requested a single descriptor set, use that (if not overrided by spaceN)
- if (getResourceSetBinding(stage).size() == 1) {
- return ent.newSet = atoi(getResourceSetBinding(stage)[0].c_str());
+ if (getResourceSetBinding().size() == 1) {
+ return ent.newSet = atoi(getResourceSetBinding()[0].c_str());
}
return ent.newSet = 0;
}
@@ -934,7 +925,7 @@
preStage = currentStage;
currentStage = stage;
}
- // kick out if not doing this
+ // kick out of not doing this
if (! doAutoLocationMapping()) {
return ent.newLocation = -1;
}
@@ -1082,7 +1073,7 @@
return ent.newLocation = location;
}
-int TDefaultGlslIoResolver::resolveBinding(EShLanguage stage, TVarEntryInfo& ent) {
+int TDefaultGlslIoResolver::resolveBinding(EShLanguage /*stage*/, TVarEntryInfo& ent) {
const TType& type = ent.symbol->getType();
const TString& name = ent.symbol->getAccessName();
// On OpenGL arrays of opaque types take a separate binding for each element
@@ -1095,32 +1086,30 @@
// There is no 'set' qualifier in OpenGL shading language, each resource has its own
// binding name space, so remap the 'set' to resource type which make each resource
// binding is valid from 0 to MAX_XXRESOURCE_BINDINGS
- int set = intermediate.getSpv().openGl != 0 ? resource : ent.newSet;
- int resourceKey = set;
+ int set = resource;
if (resource < EResCount) {
if (type.getQualifier().hasBinding()) {
- int newBinding = reserveSlot(resourceKey, getBaseBinding(stage, resource, set) + type.getQualifier().layoutBinding, numBindings);
- return ent.newBinding = newBinding;
-
- } else {
+ ent.newBinding = reserveSlot(set, getBaseBinding(resource, set) + type.getQualifier().layoutBinding, numBindings);
+ return ent.newBinding;
+ } else if (ent.live && doAutoBindingMapping()) {
// The resource in current stage is not declared with binding, but it is possible declared
// with explicit binding in other stages, find the resourceSlotMap firstly to check whether
// the resource has binding, don't need to allocate if it already has a binding
bool hasBinding = false;
- ent.newBinding = -1; // leave as -1 if it isn't set below
-
- if (! resourceSlotMap[resourceKey].empty()) {
- TVarSlotMap::iterator iter = resourceSlotMap[resourceKey].find(name);
- if (iter != resourceSlotMap[resourceKey].end()) {
+ if (! resourceSlotMap[resource].empty()) {
+ TVarSlotMap::iterator iter = resourceSlotMap[resource].find(name);
+ if (iter != resourceSlotMap[resource].end()) {
hasBinding = true;
ent.newBinding = iter->second;
}
}
- if (!hasBinding && (ent.live && doAutoBindingMapping())) {
+ if (! hasBinding) {
+ TVarSlotMap varSlotMap;
// find free slot, the caller did make sure it passes all vars with binding
// first and now all are passed that do not have a binding and needs one
- int binding = getFreeSlot(resourceKey, getBaseBinding(stage, resource, set), numBindings);
- resourceSlotMap[resourceKey][name] = binding;
+ int binding = getFreeSlot(resource, getBaseBinding(resource, set), numBindings);
+ varSlotMap[name] = binding;
+ resourceSlotMap[resource] = varSlotMap;
ent.newBinding = binding;
}
return ent.newBinding;
@@ -1222,20 +1211,16 @@
void TDefaultGlslIoResolver::reserverResourceSlot(TVarEntryInfo& ent, TInfoSink& infoSink) {
const TType& type = ent.symbol->getType();
const TString& name = ent.symbol->getAccessName();
- TResourceType resource = getResourceType(type);
- int set = intermediate.getSpv().openGl != 0 ? resource : resolveSet(ent.stage, ent);
- int resourceKey = set;
-
+ int resource = getResourceType(type);
if (type.getQualifier().hasBinding()) {
- TVarSlotMap& varSlotMap = resourceSlotMap[resourceKey];
+ TVarSlotMap& varSlotMap = resourceSlotMap[resource];
TVarSlotMap::iterator iter = varSlotMap.find(name);
- int binding = type.getQualifier().layoutBinding + getBaseBinding(ent.stage, resource, set);
-
+ int binding = type.getQualifier().layoutBinding;
if (iter == varSlotMap.end()) {
// Reserve the slots for the ubo, ssbo and opaques who has explicit binding
- int numBindings = intermediate.getSpv().openGl != 0 && type.isSizedArray() ? type.getCumulativeArraySize() : 1;
+ int numBindings = type.isSizedArray() ? type.getCumulativeArraySize() : 1;
varSlotMap[name] = binding;
- reserveSlot(resourceKey, binding, numBindings);
+ reserveSlot(resource, binding, numBindings);
} else {
// Allocate binding by name for OpenGL driver, so the resource in different
// stages should be declared with the same binding
@@ -1284,7 +1269,7 @@
return EResCount;
}
- int resolveBinding(EShLanguage stage, TVarEntryInfo& ent) override {
+ int resolveBinding(EShLanguage /*stage*/, TVarEntryInfo& ent) override {
const TType& type = ent.symbol->getType();
const int set = getLayoutSet(type);
// On OpenGL arrays of opaque types take a seperate binding for each element
@@ -1293,11 +1278,11 @@
if (resource < EResCount) {
if (type.getQualifier().hasBinding()) {
return ent.newBinding = reserveSlot(
- set, getBaseBinding(stage, resource, set) + type.getQualifier().layoutBinding, numBindings);
+ set, getBaseBinding(resource, set) + type.getQualifier().layoutBinding, numBindings);
} else if (ent.live && doAutoBindingMapping()) {
// find free slot, the caller did make sure it passes all vars with binding
// first and now all are passed that do not have a binding and needs one
- return ent.newBinding = getFreeSlot(set, getBaseBinding(stage, resource, set), numBindings);
+ return ent.newBinding = getFreeSlot(set, getBaseBinding(resource, set), numBindings);
}
}
return ent.newBinding = -1;
@@ -1369,17 +1354,17 @@
return EResCount;
}
- int resolveBinding(EShLanguage stage, TVarEntryInfo& ent) override {
+ int resolveBinding(EShLanguage /*stage*/, TVarEntryInfo& ent) override {
const TType& type = ent.symbol->getType();
const int set = getLayoutSet(type);
TResourceType resource = getResourceType(type);
if (resource < EResCount) {
if (type.getQualifier().hasBinding()) {
- return ent.newBinding = reserveSlot(set, getBaseBinding(stage, resource, set) + type.getQualifier().layoutBinding);
+ return ent.newBinding = reserveSlot(set, getBaseBinding(resource, set) + type.getQualifier().layoutBinding);
} else if (ent.live && doAutoBindingMapping()) {
// find free slot, the caller did make sure it passes all vars with binding
// first and now all are passed that do not have a binding and needs one
- return ent.newBinding = getFreeSlot(set, getBaseBinding(stage, resource, set));
+ return ent.newBinding = getFreeSlot(set, getBaseBinding(resource, set));
}
}
return ent.newBinding = -1;
@@ -1418,10 +1403,10 @@
else
resolver = &defaultResolver;
}
+ resolver->addStage(stage);
#else
resolver = &defaultResolver;
#endif
- resolver->addStage(stage, intermediate);
TVarLiveMap inVarMap, outVarMap, uniformVarMap;
TVarLiveVector inVector, outVector, uniformVector;
@@ -1517,21 +1502,10 @@
}
// if no resolver is provided, use the default resolver with the given shifts and auto map settings
TDefaultGlslIoResolver defaultResolver(intermediate);
-#ifdef ENABLE_HLSL
- TDefaultHlslIoResolver defaultHlslResolver(intermediate);
- if (resolver == nullptr) {
- // TODO: use a passed in IO mapper for this
- if (intermediate.usingHlslIoMapping())
- resolver = &defaultHlslResolver;
- else
- resolver = &defaultResolver;
- }
-#else
if (resolver == nullptr) {
resolver = &defaultResolver;
}
-#endif
- resolver->addStage(stage, intermediate);
+ resolver->addStage(stage);
inVarMaps[stage] = new TVarLiveMap(); outVarMaps[stage] = new TVarLiveMap(); uniformVarMap[stage] = new TVarLiveMap();
TVarGatherTraverser iter_binding_all(intermediate, true, *inVarMaps[stage], *outVarMaps[stage],
*uniformVarMap[stage]);
@@ -1573,51 +1547,15 @@
TResolverInOutAdaptor inOutResolve(EShLangCount, *resolver, infoSink, hadError);
TSymbolValidater symbolValidater(*resolver, infoSink, inVarMaps,
outVarMaps, uniformVarMap, hadError, profile, version);
-
- TVarLiveVector inVectors[EShLangCount];
- TVarLiveVector outVectors[EShLangCount];
TVarLiveVector uniformVector;
-
resolver->beginResolve(EShLangCount);
for (int stage = EShLangVertex; stage < EShLangCount; stage++) {
if (inVarMaps[stage] != nullptr) {
inOutResolve.setStage(EShLanguage(stage));
-
- // copy vars into a sorted list
- std::for_each(inVarMaps[stage]->begin(), inVarMaps[stage]->end(),
- [&inVectors, stage](TVarLivePair p) { inVectors[stage].push_back(p); });
- std::sort(inVectors[stage].begin(), inVectors[stage].end(),
- [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool {
- return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second);
- });
-
- std::for_each(outVarMaps[stage]->begin(), outVarMaps[stage]->end(),
- [&outVectors, stage](TVarLivePair p) { outVectors[stage].push_back(p); });
- std::sort(outVectors[stage].begin(), outVectors[stage].end(),
- [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool {
- return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second);
- });
-
- for (auto& var : inVectors[stage]) { symbolValidater(var); }
- for (auto& var : inVectors[stage]) { inOutResolve(var); }
- for (auto& var : outVectors[stage]) { symbolValidater(var); }
- for (auto& var : outVectors[stage]) { inOutResolve(var); }
-
- // copy results back into maps
- std::for_each(inVectors[stage].begin(), inVectors[stage].end(),
- [this, stage](TVarLivePair p) {
- auto at = inVarMaps[stage]->find(p.first);
- if (at != inVarMaps[stage]->end())
- at->second = p.second;
- });
-
- std::for_each(outVectors[stage].begin(), outVectors[stage].end(),
- [this, stage](TVarLivePair p) {
- auto at = outVarMaps[stage]->find(p.first);
- if (at != outVarMaps[stage]->end())
- at->second = p.second;
- });
-
+ for (auto& var : *(inVarMaps[stage])) { symbolValidater(var); }
+ for (auto& var : *(inVarMaps[stage])) { inOutResolve(var); }
+ for (auto& var : *(outVarMaps[stage])) { symbolValidater(var); }
+ for (auto& var : *(outVarMaps[stage])) { inOutResolve(var); }
}
if (uniformVarMap[stage] != nullptr) {
uniformResolve.setStage(EShLanguage(stage));
@@ -1625,7 +1563,7 @@
}
}
std::sort(uniformVector.begin(), uniformVector.end(), [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool {
- return TVarEntryInfo::TOrderByPriorityAndLive()(p1.second, p2.second);
+ return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second);
});
for (auto& var : uniformVector) { symbolValidater(var); }
for (auto& var : uniformVector) { uniformResolve(var); }
diff --git a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/iomapper.h b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/iomapper.h
index 07357c2..1dce8ff 100644
--- a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/iomapper.h
+++ b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/iomapper.h
@@ -87,35 +87,6 @@
return lPoints > rPoints;
}
};
-
- struct TOrderByPriorityAndLive {
- // ordering:
- // 1) do live variables first
- // 2) has both binding and set
- // 3) has binding but no set
- // 4) has no binding but set
- // 5) has no binding and no set
- inline bool operator()(const TVarEntryInfo& l, const TVarEntryInfo& r) {
-
- const TQualifier& lq = l.symbol->getQualifier();
- const TQualifier& rq = r.symbol->getQualifier();
-
- // simple rules:
- // has binding gives 2 points
- // has set gives 1 point
- // who has the most points is more important.
- int lPoints = (lq.hasBinding() ? 2 : 0) + (lq.hasSet() ? 1 : 0);
- int rPoints = (rq.hasBinding() ? 2 : 0) + (rq.hasSet() ? 1 : 0);
-
- if (l.live != r.live)
- return l.live > r.live;
-
- if (lPoints != rPoints)
- return lPoints > rPoints;
-
- return l.id < r.id;
- }
- };
};
// Base class for shared TIoMapResolver services, used by several derivations.
@@ -136,8 +107,8 @@
void endCollect(EShLanguage) override {}
void reserverResourceSlot(TVarEntryInfo& /*ent*/, TInfoSink& /*infoSink*/) override {}
void reserverStorageSlot(TVarEntryInfo& /*ent*/, TInfoSink& /*infoSink*/) override {}
- int getBaseBinding(EShLanguage stage, TResourceType res, unsigned int set) const;
- const std::vector<std::string>& getResourceSetBinding(EShLanguage stage) const;
+ int getBaseBinding(TResourceType res, unsigned int set) const;
+ const std::vector<std::string>& getResourceSetBinding() const;
virtual TResourceType getResourceType(const glslang::TType& type) = 0;
bool doAutoBindingMapping() const;
bool doAutoLocationMapping() const;
@@ -151,11 +122,9 @@
int resolveInOutLocation(EShLanguage stage, TVarEntryInfo& ent) override;
int resolveInOutComponent(EShLanguage /*stage*/, TVarEntryInfo& ent) override;
int resolveInOutIndex(EShLanguage /*stage*/, TVarEntryInfo& ent) override;
- void addStage(EShLanguage stage, TIntermediate& stageIntermediate) override {
- if (stage < EShLangCount) {
+ void addStage(EShLanguage stage) override {
+ if (stage < EShLangCount)
stageMask[stage] = true;
- stageIntermediates[stage] = &stageIntermediate;
- }
}
uint32_t computeTypeLocationSize(const TType& type, EShLanguage stage);
@@ -170,8 +139,6 @@
int nextInputLocation;
int nextOutputLocation;
bool stageMask[EShLangCount + 1];
- const TIntermediate* stageIntermediates[EShLangCount];
-
// Return descriptor set specific base if there is one, and the generic base otherwise.
int selectBaseBinding(int base, int descriptorSetBase) const {
return descriptorSetBase != -1 ? descriptorSetBase : base;
diff --git a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/linkValidate.cpp b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/linkValidate.cpp
index 789dc3c..3f3a312 100644
--- a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/linkValidate.cpp
+++ b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/linkValidate.cpp
@@ -90,55 +90,6 @@
#endif
}
-//
-// check that link objects between stages
-//
-void TIntermediate::mergeUniformObjects(TInfoSink& infoSink, TIntermediate& unit) {
- if (unit.treeRoot == nullptr || treeRoot == nullptr)
- return;
-
- // Get the linker-object lists
- TIntermSequence& linkerObjects = findLinkerObjects()->getSequence();
- TIntermSequence unitLinkerObjects = unit.findLinkerObjects()->getSequence();
-
- // filter unitLinkerObjects to only contain uniforms
- auto end = std::remove_if(unitLinkerObjects.begin(), unitLinkerObjects.end(),
- [](TIntermNode* node) {return node->getAsSymbolNode()->getQualifier().storage != EvqUniform &&
- node->getAsSymbolNode()->getQualifier().storage != EvqBuffer; });
- unitLinkerObjects.resize(end - unitLinkerObjects.begin());
-
- // merge uniforms and do error checking
- mergeGlobalUniformBlocks(infoSink, unit);
- mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects, unit.getStage());
-}
-
-//
-// do error checking on the shader boundary in / out vars
-//
-void TIntermediate::checkStageIO(TInfoSink& infoSink, TIntermediate& unit) {
- if (unit.treeRoot == nullptr || treeRoot == nullptr)
- return;
-
- // Get copies of the linker-object lists
- TIntermSequence linkerObjects = findLinkerObjects()->getSequence();
- TIntermSequence unitLinkerObjects = unit.findLinkerObjects()->getSequence();
-
- // filter linkerObjects to only contain out variables
- auto end = std::remove_if(linkerObjects.begin(), linkerObjects.end(),
- [](TIntermNode* node) {return node->getAsSymbolNode()->getQualifier().storage != EvqVaryingOut; });
- linkerObjects.resize(end - linkerObjects.begin());
-
- // filter unitLinkerObjects to only contain in variables
- auto unitEnd = std::remove_if(unitLinkerObjects.begin(), unitLinkerObjects.end(),
- [](TIntermNode* node) {return node->getAsSymbolNode()->getQualifier().storage != EvqVaryingIn; });
- unitLinkerObjects.resize(unitEnd - unitLinkerObjects.begin());
-
- // do matching and error checking
- mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects, unit.getStage());
-
- // TODO: final check; make sure that any statically used `in` have matching `out` written to
-}
-
void TIntermediate::mergeCallGraphs(TInfoSink& infoSink, TIntermediate& unit)
{
if (unit.getNumEntryPoints() > 0) {
@@ -186,7 +137,6 @@
MERGE_MAX(spvVersion.vulkanGlsl);
MERGE_MAX(spvVersion.vulkan);
MERGE_MAX(spvVersion.openGl);
- MERGE_TRUE(spvVersion.vulkanRelaxed);
numErrors += unit.getNumErrors();
// Only one push_constant is allowed, mergeLinkerObjects() will ensure the push_constant
@@ -362,8 +312,7 @@
remapIds(idMaps, idShift + 1, unit);
mergeBodies(infoSink, globals, unitGlobals);
- mergeGlobalUniformBlocks(infoSink, unit);
- mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects, unit.getStage());
+ mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects);
ioAccessed.insert(unit.ioAccessed.begin(), unit.ioAccessed.end());
}
@@ -507,193 +456,11 @@
globals.insert(globals.end() - 1, unitGlobals.begin(), unitGlobals.end() - 1);
}
-static inline bool isSameInterface(TIntermSymbol* symbol, EShLanguage stage, TIntermSymbol* unitSymbol, EShLanguage unitStage) {
- return // 1) same stage and same shader interface
- (stage == unitStage && symbol->getType().getShaderInterface() == unitSymbol->getType().getShaderInterface()) ||
- // 2) accross stages and both are uniform or buffer
- (symbol->getQualifier().storage == EvqUniform && unitSymbol->getQualifier().storage == EvqUniform) ||
- (symbol->getQualifier().storage == EvqBuffer && unitSymbol->getQualifier().storage == EvqBuffer) ||
- // 3) in/out matched across stage boundary
- (stage < unitStage && symbol->getQualifier().storage == EvqVaryingOut && unitSymbol->getQualifier().storage == EvqVaryingIn) ||
- (unitStage < stage && symbol->getQualifier().storage == EvqVaryingIn && unitSymbol->getQualifier().storage == EvqVaryingOut);
-}
-
-//
-// Global Unfiform block stores any default uniforms (i.e. uniforms without a block)
-// If two linked stages declare the same member, they are meant to be the same uniform
-// and need to be in the same block
-// merge the members of different stages to allow them to be linked properly
-// as a single block
-//
-void TIntermediate::mergeGlobalUniformBlocks(TInfoSink& infoSink, TIntermediate& unit)
-{
- TIntermSequence& linkerObjects = findLinkerObjects()->getSequence();
- TIntermSequence& unitLinkerObjects = unit.findLinkerObjects()->getSequence();
-
- // build lists of default blocks from the intermediates
- TIntermSequence defaultBlocks;
- TIntermSequence unitDefaultBlocks;
-
- auto filter = [](TIntermSequence& list, TIntermNode* node) {
- if (node->getAsSymbolNode()->getQualifier().defaultBlock) {
- list.push_back(node);
- }
- };
-
- std::for_each(linkerObjects.begin(), linkerObjects.end(),
- [&defaultBlocks, &filter](TIntermNode* node) {
- filter(defaultBlocks, node);
- });
- std::for_each(unitLinkerObjects.begin(), unitLinkerObjects.end(),
- [&unitDefaultBlocks, &filter](TIntermNode* node) {
- filter(unitDefaultBlocks, node);
- });
-
- auto itUnitBlock = unitDefaultBlocks.begin();
- for (; itUnitBlock != unitDefaultBlocks.end(); itUnitBlock++) {
-
- bool add = true;
- auto itBlock = defaultBlocks.begin();
-
- for (; itBlock != defaultBlocks.end(); itBlock++) {
- TIntermSymbol* block = (*itBlock)->getAsSymbolNode();
- TIntermSymbol* unitBlock = (*itUnitBlock)->getAsSymbolNode();
-
- assert(block && unitBlock);
-
- // if the two default blocks match, then merge their definitions
- if (block->getType().getTypeName() == unitBlock->getType().getTypeName() &&
- block->getQualifier().storage == unitBlock->getQualifier().storage) {
- add = false;
- mergeBlockDefinitions(infoSink, block, unitBlock, &unit);
- }
- }
- if (add) {
- // push back on original list; won't change the size of the list we're iterating over
- linkerObjects.push_back(*itUnitBlock);
- }
- }
-}
-
-void TIntermediate::mergeBlockDefinitions(TInfoSink& infoSink, TIntermSymbol* block, TIntermSymbol* unitBlock, TIntermediate* unit) {
- if (block->getType() == unitBlock->getType()) {
- return;
- }
-
- if (block->getType().getTypeName() != unitBlock->getType().getTypeName() ||
- block->getType().getBasicType() != unitBlock->getType().getBasicType() ||
- block->getQualifier().storage != unitBlock->getQualifier().storage ||
- block->getQualifier().layoutSet != unitBlock->getQualifier().layoutSet) {
- // different block names likely means different blocks
- return;
- }
-
- // merge the struct
- // order of declarations doesn't matter and they matched based on member name
- TTypeList* memberList = block->getType().getWritableStruct();
- TTypeList* unitMemberList = unitBlock->getType().getWritableStruct();
-
- // keep track of which members have changed position
- // so we don't have to search the array again
- std::map<unsigned int, unsigned int> memberIndexUpdates;
-
- size_t memberListStartSize = memberList->size();
- for (unsigned int i = 0; i < unitMemberList->size(); ++i) {
- bool merge = true;
- for (unsigned int j = 0; j < memberListStartSize; ++j) {
- if ((*memberList)[j].type->getFieldName() == (*unitMemberList)[i].type->getFieldName()) {
- merge = false;
- const TType* memberType = (*memberList)[j].type;
- const TType* unitMemberType = (*unitMemberList)[i].type;
-
- // compare types
- // don't need as many checks as when merging symbols, since
- // initializers and most qualifiers are stripped when the member is moved into the block
- if ((*memberType) != (*unitMemberType)) {
- error(infoSink, "Types must match:");
- infoSink.info << " " << memberType->getFieldName() << ": ";
- infoSink.info << "\"" << memberType->getCompleteString() << "\" versus ";
- infoSink.info << "\"" << unitMemberType->getCompleteString() << "\"\n";
- }
-
- memberIndexUpdates[i] = j;
- }
- }
- if (merge) {
- memberList->push_back((*unitMemberList)[i]);
- memberIndexUpdates[i] = (unsigned int)memberList->size() - 1;
- }
- }
-
- TType unitType;
- unitType.shallowCopy(unitBlock->getType());
-
- // update symbol node in unit tree,
- // and other nodes that may reference it
- class TMergeBlockTraverser : public TIntermTraverser {
- public:
- TMergeBlockTraverser(const glslang::TType &type, const glslang::TType& unitType,
- glslang::TIntermediate& unit,
- const std::map<unsigned int, unsigned int>& memberIdxUpdates) :
- newType(type), unitType(unitType), unit(unit), memberIndexUpdates(memberIdxUpdates)
- { }
- virtual ~TMergeBlockTraverser() { }
-
- const glslang::TType& newType; // type with modifications
- const glslang::TType& unitType; // copy of original type
- glslang::TIntermediate& unit; // intermediate that is being updated
- const std::map<unsigned int, unsigned int>& memberIndexUpdates;
-
- virtual void visitSymbol(TIntermSymbol* symbol)
- {
- glslang::TType& symType = symbol->getWritableType();
-
- if (symType == unitType) {
- // each symbol node has a local copy of the unitType
- // if merging involves changing properties that aren't shared objects
- // they should be updated in all instances
-
- // e.g. the struct list is a ptr to an object, so it can be updated
- // once, outside the traverser
- //*symType.getWritableStruct() = *newType.getStruct();
- }
-
- }
-
- virtual bool visitBinary(TVisit, glslang::TIntermBinary* node)
- {
- if (node->getOp() == EOpIndexDirectStruct && node->getLeft()->getType() == unitType) {
- // this is a dereference to a member of the block since the
- // member list changed, need to update this to point to the
- // right index
- assert(node->getRight()->getAsConstantUnion());
-
- glslang::TIntermConstantUnion* constNode = node->getRight()->getAsConstantUnion();
- unsigned int memberIdx = constNode->getConstArray()[0].getUConst();
- unsigned int newIdx = memberIndexUpdates.at(memberIdx);
- TIntermTyped* newConstNode = unit.addConstantUnion(newIdx, node->getRight()->getLoc());
-
- node->setRight(newConstNode);
- delete constNode;
-
- return true;
- }
- return true;
- }
- } finalLinkTraverser(block->getType(), unitType, *unit, memberIndexUpdates);
-
- // update the tree to use the new type
- unit->getTreeRoot()->traverse(&finalLinkTraverser);
-
- // update the member list
- (*unitMemberList) = (*memberList);
-}
-
//
// Merge the linker objects from unitLinkerObjects into linkerObjects.
// Duplication is expected and filtered out, but contradictions are an error.
//
-void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects, EShLanguage unitStage)
+void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects)
{
// Error check and merge the linker objects (duplicates should not be created)
std::size_t initialNumLinkerObjects = linkerObjects.size();
@@ -708,7 +475,7 @@
// If they are both blocks in the same shader interface,
// match by the block-name, not the identifier name.
if (symbol->getType().getBasicType() == EbtBlock && unitSymbol->getType().getBasicType() == EbtBlock) {
- if (isSameInterface(symbol, getStage(), unitSymbol, unitStage)) {
+ if (symbol->getType().getShaderInterface() == unitSymbol->getType().getShaderInterface()) {
isSameSymbol = symbol->getType().getTypeName() == unitSymbol->getType().getTypeName();
}
}
@@ -728,54 +495,18 @@
if (! symbol->getQualifier().hasBinding() && unitSymbol->getQualifier().hasBinding())
symbol->getQualifier().layoutBinding = unitSymbol->getQualifier().layoutBinding;
- // Similarly for location
- if (!symbol->getQualifier().hasLocation() && unitSymbol->getQualifier().hasLocation()) {
- symbol->getQualifier().layoutLocation = unitSymbol->getQualifier().layoutLocation;
- }
-
// Update implicit array sizes
mergeImplicitArraySizes(symbol->getWritableType(), unitSymbol->getType());
// Check for consistent types/qualification/initializers etc.
- mergeErrorCheck(infoSink, *symbol, *unitSymbol, unitStage);
+ mergeErrorCheck(infoSink, *symbol, *unitSymbol, false);
}
// If different symbols, verify they arn't push_constant since there can only be one per stage
- else if (symbol->getQualifier().isPushConstant() && unitSymbol->getQualifier().isPushConstant() && getStage() == unitStage)
+ else if (symbol->getQualifier().isPushConstant() && unitSymbol->getQualifier().isPushConstant())
error(infoSink, "Only one push_constant block is allowed per stage");
}
- if (merge) {
+ if (merge)
linkerObjects.push_back(unitLinkerObjects[unitLinkObj]);
-
- // for anonymous blocks, check that their members don't conflict with other names
- if (unitLinkerObjects[unitLinkObj]->getAsSymbolNode()->getBasicType() == EbtBlock &&
- IsAnonymous(unitLinkerObjects[unitLinkObj]->getAsSymbolNode()->getName())) {
- for (std::size_t linkObj = 0; linkObj < initialNumLinkerObjects; ++linkObj) {
- TIntermSymbol* symbol = linkerObjects[linkObj]->getAsSymbolNode();
- TIntermSymbol* unitSymbol = unitLinkerObjects[unitLinkObj]->getAsSymbolNode();
- assert(symbol && unitSymbol);
-
- auto checkName = [this, unitSymbol, &infoSink](const TString& name) {
- for (unsigned int i = 0; i < unitSymbol->getType().getStruct()->size(); ++i) {
- if (name == (*unitSymbol->getType().getStruct())[i].type->getFieldName()) {
- error(infoSink, "Anonymous member name used for global variable or other anonymous member: ");
- infoSink.info << (*unitSymbol->getType().getStruct())[i].type->getCompleteString() << "\n";
- }
- }
- };
-
- if (isSameInterface(symbol, getStage(), unitSymbol, unitStage)) {
- checkName(symbol->getName());
-
- // check members of other anonymous blocks
- if (symbol->getBasicType() == EbtBlock && IsAnonymous(symbol->getName())) {
- for (unsigned int i = 0; i < symbol->getType().getStruct()->size(); ++i) {
- checkName((*symbol->getType().getStruct())[i].type->getFieldName());
- }
- }
- }
- }
- }
- }
}
}
@@ -807,74 +538,26 @@
//
// This function only does one of intra- or cross-stage matching per call.
//
-void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& symbol, const TIntermSymbol& unitSymbol, EShLanguage unitStage)
+void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& symbol, const TIntermSymbol& unitSymbol, bool crossStage)
{
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
- bool crossStage = getStage() != unitStage;
bool writeTypeComparison = false;
// Types have to match
- {
+ if (symbol.getType() != unitSymbol.getType()) {
// but, we make an exception if one is an implicit array and the other is sized
- // or if the array sizes differ because of the extra array dimension on some in/out boundaries
- bool arraysMatch = false;
- if (isIoResizeArray(symbol.getType(), getStage()) || isIoResizeArray(unitSymbol.getType(), unitStage)) {
- // if the arrays have an extra dimension because of the stage.
- // compare dimensions while ignoring the outer dimension
- unsigned int firstDim = isIoResizeArray(symbol.getType(), getStage()) ? 1 : 0;
- unsigned int numDim = symbol.getArraySizes()
- ? symbol.getArraySizes()->getNumDims() : 0;
- unsigned int unitFirstDim = isIoResizeArray(unitSymbol.getType(), unitStage) ? 1 : 0;
- unsigned int unitNumDim = unitSymbol.getArraySizes()
- ? unitSymbol.getArraySizes()->getNumDims() : 0;
- arraysMatch = (numDim - firstDim) == (unitNumDim - unitFirstDim);
- // check that array sizes match as well
- for (unsigned int i = 0; i < (numDim - firstDim) && arraysMatch; i++) {
- if (symbol.getArraySizes()->getDimSize(firstDim + i) !=
- unitSymbol.getArraySizes()->getDimSize(unitFirstDim + i)) {
- arraysMatch = false;
- break;
- }
- }
- }
- else {
- arraysMatch = symbol.getType().sameArrayness(unitSymbol.getType()) ||
- (symbol.getType().isArray() && unitSymbol.getType().isArray() &&
- (symbol.getType().isUnsizedArray() || unitSymbol.getType().isUnsizedArray()));
- }
-
- if (!symbol.getType().sameElementType(unitSymbol.getType()) ||
- !symbol.getType().sameTypeParameters(unitSymbol.getType()) ||
- !arraysMatch ) {
- writeTypeComparison = true;
+ if (! (symbol.getType().isArray() && unitSymbol.getType().isArray() &&
+ symbol.getType().sameElementType(unitSymbol.getType()) &&
+ (symbol.getType().isUnsizedArray() || unitSymbol.getType().isUnsizedArray()))) {
error(infoSink, "Types must match:");
- }
- }
-
- // Interface block member-wise layout qualifiers have to match
- if (symbol.getType().getBasicType() == EbtBlock && unitSymbol.getType().getBasicType() == EbtBlock &&
- symbol.getType().getStruct() && unitSymbol.getType().getStruct() &&
- symbol.getType().sameStructType(unitSymbol.getType())) {
- for (unsigned int i = 0; i < symbol.getType().getStruct()->size(); ++i) {
- const TQualifier& qualifier = (*symbol.getType().getStruct())[i].type->getQualifier();
- const TQualifier& unitQualifier = (*unitSymbol.getType().getStruct())[i].type->getQualifier();
- if (qualifier.layoutMatrix != unitQualifier.layoutMatrix ||
- qualifier.layoutOffset != unitQualifier.layoutOffset ||
- qualifier.layoutAlign != unitQualifier.layoutAlign ||
- qualifier.layoutLocation != unitQualifier.layoutLocation ||
- qualifier.layoutComponent != unitQualifier.layoutComponent) {
- error(infoSink, "Interface block member layout qualifiers must match:");
- writeTypeComparison = true;
- }
+ writeTypeComparison = true;
}
}
// Qualifiers have to (almost) match
// Storage...
- if (symbol.getQualifier().storage != unitSymbol.getQualifier().storage &&
- !((crossStage && symbol.getQualifier().storage == EvqVaryingIn && unitSymbol.getQualifier().storage == EvqVaryingOut) ||
- (crossStage && symbol.getQualifier().storage == EvqVaryingOut && unitSymbol.getQualifier().storage == EvqVaryingIn))) {
+ if (symbol.getQualifier().storage != unitSymbol.getQualifier().storage) {
error(infoSink, "Storage qualifiers must match:");
writeTypeComparison = true;
}
@@ -914,16 +597,12 @@
}
// Auxiliary and interpolation...
- // "interpolation qualification (e.g., flat) and auxiliary qualification (e.g. centroid) may differ.
- // These mismatches are allowed between any pair of stages ...
- // those provided in the fragment shader supersede those provided in previous stages."
- if (!crossStage &&
- (symbol.getQualifier().centroid != unitSymbol.getQualifier().centroid ||
+ if (symbol.getQualifier().centroid != unitSymbol.getQualifier().centroid ||
symbol.getQualifier().smooth != unitSymbol.getQualifier().smooth ||
symbol.getQualifier().flat != unitSymbol.getQualifier().flat ||
symbol.getQualifier().isSample()!= unitSymbol.getQualifier().isSample() ||
symbol.getQualifier().isPatch() != unitSymbol.getQualifier().isPatch() ||
- symbol.getQualifier().isNonPerspective() != unitSymbol.getQualifier().isNonPerspective())) {
+ symbol.getQualifier().isNonPerspective() != unitSymbol.getQualifier().isNonPerspective()) {
error(infoSink, "Interpolation and auxiliary storage qualifiers must match:");
writeTypeComparison = true;
}
@@ -2151,17 +1830,4 @@
return size;
}
-#ifndef GLSLANG_WEB
-bool TIntermediate::isIoResizeArray(const TType& type, EShLanguage language) {
- return type.isArray() &&
- ((language == EShLangGeometry && type.getQualifier().storage == EvqVaryingIn) ||
- (language == EShLangTessControl && type.getQualifier().storage == EvqVaryingOut &&
- ! type.getQualifier().patch) ||
- (language == EShLangFragment && type.getQualifier().storage == EvqVaryingIn &&
- type.getQualifier().pervertexNV) ||
- (language == EShLangMeshNV && type.getQualifier().storage == EvqVaryingOut &&
- !type.getQualifier().perTaskNV));
-}
-#endif // not GLSLANG_WEB
-
} // end namespace glslang
diff --git a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/localintermediate.h b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/localintermediate.h
index 9bfa35c..9fe684a 100644
--- a/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/localintermediate.h
+++ b/third_party/vulkan-deps/glslang/src/glslang/MachineIndependent/localintermediate.h
@@ -293,12 +293,7 @@
useStorageBuffer(false),
nanMinMaxClamp(false),
depthReplacing(false),
- uniqueId(0),
- globalUniformBlockName(""),
- atomicCounterBlockName(""),
- globalUniformBlockSet(TQualifier::layoutSetEnd),
- globalUniformBlockBinding(TQualifier::layoutBindingEnd),
- atomicCounterBlockSet(TQualifier::layoutSetEnd)
+ uniqueId(0)
#ifndef GLSLANG_WEB
,
implicitThisName("@this"), implicitCounterName("@count"),
@@ -542,19 +537,6 @@
void addSymbolLinkageNode(TIntermAggregate*& linkage, const TSymbol&);
TIntermAggregate* findLinkerObjects() const;
- void setGlobalUniformBlockName(const char* name) { globalUniformBlockName = std::string(name); }
- const char* getGlobalUniformBlockName() const { return globalUniformBlockName.c_str(); }
- void setGlobalUniformSet(unsigned int set) { globalUniformBlockSet = set; }
- unsigned int getGlobalUniformSet() const { return globalUniformBlockSet; }
- void setGlobalUniformBinding(unsigned int binding) { globalUniformBlockBinding = binding; }
- unsigned int getGlobalUniformBinding() const { return globalUniformBlockBinding; }
-
- void setAtomicCounterBlockName(const char* name) { atomicCounterBlockName = std::string(name); }
- const char* getAtomicCounterBlockName() const { return atomicCounterBlockName.c_str(); }
- void setAtomicCounterBlockSet(unsigned int set) { atomicCounterBlockSet = set; }
- unsigned int getAtomicCounterBlockSet() const { return atomicCounterBlockSet; }
-
-
void setUseStorageBuffer() { useStorageBuffer = true; }
bool usingStorageBuffer() const { return useStorageBuffer; }
void setDepthReplacing() { depthReplacing = true; }
@@ -866,20 +848,6 @@
bool getBinaryDoubleOutput() { return binaryDoubleOutput; }
#endif // GLSLANG_WEB
- void addBlockStorageOverride(const char* nameStr, TBlockStorageClass backing)
- {
- std::string name(nameStr);
- blockBackingOverrides[name] = backing;
- }
- TBlockStorageClass getBlockStorageOverride(const char* nameStr) const
- {
- std::string name = nameStr;
- auto pos = blockBackingOverrides.find(name);
- if (pos == blockBackingOverrides.end())
- return EbsNone;
- else
- return pos->second;
- }
#ifdef ENABLE_HLSL
void setHlslFunctionality1() { hlslFunctionality1 = true; }
bool getHlslFunctionality1() const { return hlslFunctionality1; }
@@ -915,10 +883,6 @@
void merge(TInfoSink&, TIntermediate&);
void finalCheck(TInfoSink&, bool keepUncalled);
- void mergeGlobalUniformBlocks(TInfoSink& infoSink, TIntermediate& unit);
- void mergeUniformObjects(TInfoSink& infoSink, TIntermediate& unit);
- void checkStageIO(TInfoSink&, TIntermediate&);
-
bool buildConvertOp(TBasicType dst, TBasicType src, TOperator& convertOp) const;
TIntermTyped* createConversion(TBasicType convertTo, TIntermTyped* node) const;
@@ -942,8 +906,6 @@
static int getOffset(const TType& type, int index);
static int getBlockSize(const TType& blockType);
static int computeBufferReferenceTypeSize(const TType&);
- static bool isIoResizeArray(const TType& type, EShLanguage language);
-
bool promote(TIntermOperator*);
void setNanMinMaxClamp(bool setting) { nanMinMaxClamp = setting; }
bool getNanMinMaxClamp() const { return nanMinMaxClamp; }
@@ -1001,10 +963,9 @@
void seedIdMap(TIdMaps& idMaps, long long& IdShift);
void remapIds(const TIdMaps& idMaps, long long idShift, TIntermediate&);
void mergeBodies(TInfoSink&, TIntermSequence& globals, const TIntermSequence& unitGlobals);
- void mergeLinkerObjects(TInfoSink&, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects, EShLanguage);
- void mergeBlockDefinitions(TInfoSink&, TIntermSymbol* block, TIntermSymbol* unitBlock, TIntermediate* unitRoot);
+ void mergeLinkerObjects(TInfoSink&, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects);
void mergeImplicitArraySizes(TType&, const TType&);
- void mergeErrorCheck(TInfoSink&, const TIntermSymbol&, const TIntermSymbol&, EShLanguage);
+ void mergeErrorCheck(TInfoSink&, const TIntermSymbol&, const TIntermSymbol&, bool crossStage);
void checkCallGraphCycles(TInfoSink&);
void checkCallGraphBodies(TInfoSink&, bool keepUncalled);
void inOutLocationCheck(TInfoSink&);
@@ -1054,13 +1015,6 @@
bool localSizeNotDefault[3];
int localSizeSpecId[3];
unsigned long long uniqueId;
-
- std::string globalUniformBlockName;
- std::string atomicCounterBlockName;
- unsigned int globalUniformBlockSet;
- unsigned int globalUniformBlockBinding;
- unsigned int atomicCounterBlockSet;
-
#ifndef GLSLANG_WEB
public:
const char* const implicitThisName;
@@ -1121,7 +1075,6 @@
int uniformLocationBase;
TNumericFeatures numericFeatures;
#endif
- std::unordered_map<std::string, TBlockStorageClass> blockBackingOverrides;
std::unordered_set<int> usedConstantId; // specialization constant ids used
std::vector<TOffsetRange> usedAtomics; // sets of bindings used by atomic counters
diff --git a/third_party/vulkan-deps/glslang/src/glslang/Public/ShaderLang.h b/third_party/vulkan-deps/glslang/src/glslang/Public/ShaderLang.h
index 74b9f3e..e147b0d 100644
--- a/third_party/vulkan-deps/glslang/src/glslang/Public/ShaderLang.h
+++ b/third_party/vulkan-deps/glslang/src/glslang/Public/ShaderLang.h
@@ -187,7 +187,6 @@
EShLanguage stage; // redundant information with other input, this one overrides when not EShSourceNone
EShClient dialect;
int dialectVersion; // version of client's language definition, not the client (when not EShClientNone)
- bool VulkanRulesRelaxed = false;
};
struct TClient {
@@ -428,14 +427,6 @@
EResCount
};
-enum TBlockStorageClass
-{
- EbsUniform = 0,
- EbsStorageBuffer,
- EbsPushConstant,
- EbsNone, // not a uniform or buffer variable
- EbsCount,
-};
// Make one TShader per shader that you will link into a program. Then
// - provide the shader through setStrings() or setStringsWithLengths()
@@ -492,14 +483,6 @@
GLSLANG_EXPORT void setNoStorageFormat(bool useUnknownFormat);
GLSLANG_EXPORT void setNanMinMaxClamp(bool nanMinMaxClamp);
GLSLANG_EXPORT void setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode);
- GLSLANG_EXPORT void addBlockStorageOverride(const char* nameStr, glslang::TBlockStorageClass backing);
-
- GLSLANG_EXPORT void setGlobalUniformBlockName(const char* name);
- GLSLANG_EXPORT void setAtomicCounterBlockName(const char* name);
- GLSLANG_EXPORT void setGlobalUniformSet(unsigned int set);
- GLSLANG_EXPORT void setGlobalUniformBinding(unsigned int binding);
- GLSLANG_EXPORT void setAtomicCounterBlockSet(unsigned int set);
- GLSLANG_EXPORT void setAtomicCounterBlockBinding(unsigned int binding);
// For setting up the environment (cleared to nothingness in the constructor).
// These must be called so that parsing is done for the right source language and
@@ -556,9 +539,6 @@
bool getEnvTargetHlslFunctionality1() const { return false; }
#endif
- void setEnvInputVulkanRulesRelaxed() { environment.input.VulkanRulesRelaxed = true; }
- bool getEnvInputVulkanRulesRelaxed() const { return environment.input.VulkanRulesRelaxed; }
-
// Interface to #include handlers.
//
// To support #include, a client of Glslang does the following:
@@ -826,7 +806,7 @@
// Called by TSlotCollector to resolve resource locations or bindings
virtual void reserverResourceSlot(TVarEntryInfo& ent, TInfoSink& infoSink) = 0;
// Called by mapIO.addStage to set shader stage mask to mark a stage be added to this pipeline
- virtual void addStage(EShLanguage stage, TIntermediate& stageIntermediate) = 0;
+ virtual void addStage(EShLanguage stage) = 0;
};
#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
@@ -948,7 +928,6 @@
protected:
GLSLANG_EXPORT bool linkStage(EShLanguage, EShMessages);
- GLSLANG_EXPORT bool crossStageCheck(EShMessages);
TPoolAllocator* pool;
std::list<TShader*> stages[EShLangCount];
diff --git a/third_party/vulkan-deps/glslang/src/gtests/CMakeLists.txt b/third_party/vulkan-deps/glslang/src/gtests/CMakeLists.txt
index 74c9809..0617ff8 100644
--- a/third_party/vulkan-deps/glslang/src/gtests/CMakeLists.txt
+++ b/third_party/vulkan-deps/glslang/src/gtests/CMakeLists.txt
@@ -53,9 +53,7 @@
${CMAKE_CURRENT_SOURCE_DIR}/Link.FromFile.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Link.FromFile.Vk.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Pp.FromFile.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/Spv.FromFile.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/VkRelaxed.FromFile.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/GlslMapIO.FromFile.cpp)
+ ${CMAKE_CURRENT_SOURCE_DIR}/Spv.FromFile.cpp)
if(ENABLE_SPVREMAPPER)
set(TEST_SOURCES ${TEST_SOURCES}
diff --git a/third_party/vulkan-deps/glslang/src/gtests/GlslMapIO.FromFile.cpp b/third_party/vulkan-deps/glslang/src/gtests/GlslMapIO.FromFile.cpp
deleted file mode 100644
index 574e905..0000000
--- a/third_party/vulkan-deps/glslang/src/gtests/GlslMapIO.FromFile.cpp
+++ /dev/null
@@ -1,306 +0,0 @@
-//
-// Copyright (C) 2016-2017 Google, Inc.
-// 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 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.
-//
-#include <algorithm>
-
-#include <gtest/gtest.h>
-
-#include "TestFixture.h"
-
-#include "glslang/MachineIndependent/iomapper.h"
-#include "glslang/MachineIndependent/reflection.h"
-
-#ifndef GLSLANG_WEB
-namespace glslangtest {
-namespace {
-
-struct IoMapData {
- std::vector<std::string> fileNames;
- Semantics semantics;
-};
-
-using GlslMapIOTest = GlslangTest <::testing::TestWithParam<IoMapData>>;
-
-template<class T>
-std::string interfaceName(T symbol) {
- return symbol.getType()->getBasicType() == glslang::EbtBlock ? std::string(symbol.getType()->getTypeName().c_str()) : symbol.name;
-}
-
-bool verifyIOMapping(std::string& linkingError, glslang::TProgram& program) {
- bool success = true;
-
- // Verify IO Mapping by generating reflection for each stage individually
- // and comparing layout qualifiers on the results
-
-
- int reflectionOptions = EShReflectionDefault;
- //reflectionOptions |= EShReflectionStrictArraySuffix;
- //reflectionOptions |= EShReflectionBasicArraySuffix;
- reflectionOptions |= EShReflectionIntermediateIO;
- reflectionOptions |= EShReflectionSeparateBuffers;
- reflectionOptions |= EShReflectionAllBlockVariables;
- //reflectionOptions |= EShReflectionUnwrapIOBlocks;
-
- success &= program.buildReflection(reflectionOptions);
-
- // check that the reflection output from the individual stages all makes sense..
- std::vector<glslang::TReflection> stageReflections;
- for (int s = 0; s < EShLangCount; ++s) {
- if (program.getIntermediate((EShLanguage)s)) {
- stageReflections.emplace_back((EShReflectionOptions)reflectionOptions, (EShLanguage)s, (EShLanguage)s);
- success &= stageReflections.back().addStage((EShLanguage)s, *program.getIntermediate((EShLanguage)s));
- }
- }
-
- // check that input/output locations match between stages
- auto it = stageReflections.begin();
- auto nextIt = it + 1;
- for (; nextIt != stageReflections.end(); it++, nextIt++) {
- int numOut = it->getNumPipeOutputs();
- std::map<std::string, const glslang::TObjectReflection*> pipeOut;
-
- for (int i = 0; i < numOut; i++) {
- const glslang::TObjectReflection& out = it->getPipeOutput(i);
- std::string name = interfaceName(out);
- pipeOut[name] = &out;
- }
-
- int numIn = nextIt->getNumPipeInputs();
- for (int i = 0; i < numIn; i++) {
- auto in = nextIt->getPipeInput(i);
- std::string name = interfaceName(in);
- auto out = pipeOut.find(name);
-
- if (out != pipeOut.end()) {
- auto inQualifier = in.getType()->getQualifier();
- auto outQualifier = out->second->getType()->getQualifier();
- success &= outQualifier.layoutLocation == inQualifier.layoutLocation;
- }
- else {
- success &= false;
- }
- }
- }
-
- // compare uniforms in each stage to the program
- {
- int totalUniforms = program.getNumUniformVariables();
- std::map<std::string, const glslang::TObjectReflection*> programUniforms;
- for (int i = 0; i < totalUniforms; i++) {
- const glslang::TObjectReflection& uniform = program.getUniform(i);
- std::string name = interfaceName(uniform);
- programUniforms[name] = &uniform;
- }
- it = stageReflections.begin();
- for (; it != stageReflections.end(); it++) {
- int numUniform = it->getNumUniforms();
- std::map<std::string, glslang::TObjectReflection> uniforms;
-
- for (int i = 0; i < numUniform; i++) {
- glslang::TObjectReflection uniform = it->getUniform(i);
- std::string name = interfaceName(uniform);
- auto programUniform = programUniforms.find(name);
-
- if (programUniform != programUniforms.end()) {
- auto stageQualifier = uniform.getType()->getQualifier();
- auto programQualifier = programUniform->second->getType()->getQualifier();
-
- success &= stageQualifier.layoutLocation == programQualifier.layoutLocation;
- success &= stageQualifier.layoutBinding == programQualifier.layoutBinding;
- success &= stageQualifier.layoutSet == programQualifier.layoutSet;
- }
- else {
- success &= false;
- }
- }
- }
- }
-
- // compare uniform blocks in each stage to the program table
- {
- int totalUniforms = program.getNumUniformBlocks();
- std::map<std::string, const glslang::TObjectReflection*> programUniforms;
- for (int i = 0; i < totalUniforms; i++) {
- const glslang::TObjectReflection& uniform = program.getUniformBlock(i);
- std::string name = interfaceName(uniform);
- programUniforms[name] = &uniform;
- }
- it = stageReflections.begin();
- for (; it != stageReflections.end(); it++) {
- int numUniform = it->getNumUniformBlocks();
- std::map<std::string, glslang::TObjectReflection> uniforms;
-
- for (int i = 0; i < numUniform; i++) {
- glslang::TObjectReflection uniform = it->getUniformBlock(i);
- std::string name = interfaceName(uniform);
- auto programUniform = programUniforms.find(name);
-
- if (programUniform != programUniforms.end()) {
- auto stageQualifier = uniform.getType()->getQualifier();
- auto programQualifier = programUniform->second->getType()->getQualifier();
-
- success &= stageQualifier.layoutLocation == programQualifier.layoutLocation;
- success &= stageQualifier.layoutBinding == programQualifier.layoutBinding;
- success &= stageQualifier.layoutSet == programQualifier.layoutSet;
- }
- else {
- success &= false;
- }
- }
- }
- }
-
- if (!success) {
- linkingError += "Mismatched cross-stage IO\n";
- }
-
- return success;
-}
-
-TEST_P(GlslMapIOTest, FromFile)
-{
- const auto& fileNames = GetParam().fileNames;
- Semantics semantics = GetParam().semantics;
- const size_t fileCount = fileNames.size();
- const EShMessages controls = DeriveOptions(Source::GLSL, semantics, Target::BothASTAndSpv);
- GlslangResult result;
-
- // Compile each input shader file.
- bool success = true;
- std::vector<std::unique_ptr<glslang::TShader>> shaders;
- for (size_t i = 0; i < fileCount; ++i) {
- std::string contents;
- tryLoadFile(GlobalTestSettings.testRoot + "/" + fileNames[i],
- "input", &contents);
- shaders.emplace_back(
- new glslang::TShader(GetShaderStage(GetSuffix(fileNames[i]))));
- auto* shader = shaders.back().get();
-
- shader->setAutoMapLocations(true);
- shader->setAutoMapBindings(true);
-
- if (controls & EShMsgSpvRules) {
- if (controls & EShMsgVulkanRules) {
- shader->setEnvInput((controls & EShMsgReadHlsl) ? glslang::EShSourceHlsl
- : glslang::EShSourceGlsl,
- shader->getStage(), glslang::EShClientVulkan, 100);
- shader->setEnvClient(glslang::EShClientVulkan, glslang::EShTargetVulkan_1_1);
- shader->setEnvTarget(glslang::EShTargetSpv, glslang::EShTargetSpv_1_0);
- } else {
- shader->setEnvInput((controls & EShMsgReadHlsl) ? glslang::EShSourceHlsl
- : glslang::EShSourceGlsl,
- shader->getStage(), glslang::EShClientOpenGL, 100);
- shader->setEnvClient(glslang::EShClientOpenGL, glslang::EShTargetOpenGL_450);
- shader->setEnvTarget(glslang::EshTargetSpv, glslang::EShTargetSpv_1_0);
- }
- }
-
- success &= compile(shader, contents, "", controls);
-
- result.shaderResults.push_back(
- { fileNames[i], shader->getInfoLog(), shader->getInfoDebugLog() });
- }
-
- // Link all of them.
- glslang::TProgram program;
- for (const auto& shader : shaders) program.addShader(shader.get());
- success &= program.link(controls);
- result.linkingOutput = program.getInfoLog();
- result.linkingError = program.getInfoDebugLog();
-
- unsigned int stage = 0;
- glslang::TIntermediate* firstIntermediate = nullptr;
- while (!program.getIntermediate((EShLanguage)stage) && stage < EShLangCount) { stage++; }
- firstIntermediate = program.getIntermediate((EShLanguage)stage);
-
- glslang::TDefaultGlslIoResolver resolver(*firstIntermediate);
- glslang::TGlslIoMapper ioMapper;
-
- if (success) {
- success &= program.mapIO(&resolver, &ioMapper);
- result.linkingOutput = program.getInfoLog();
- result.linkingError = program.getInfoDebugLog();
- }
-
- success &= verifyIOMapping(result.linkingError, program);
- result.validationResult = success;
-
- if (success && (controls & EShMsgSpvRules)) {
- for (int stage = 0; stage < EShLangCount; ++stage) {
- if (program.getIntermediate((EShLanguage)stage)) {
- spv::SpvBuildLogger logger;
- std::vector<uint32_t> spirv_binary;
- options().disableOptimizer = false;
- glslang::GlslangToSpv(*program.getIntermediate((EShLanguage)stage),
- spirv_binary, &logger, &options());
-
- std::ostringstream disassembly_stream;
- spv::Parameterize();
- spv::Disassemble(disassembly_stream, spirv_binary);
- result.spirvWarningsErrors += logger.getAllMessages();
- result.spirv += disassembly_stream.str();
- result.validationResult &= !options().validate || logger.getAllMessages().empty();
- }
- }
- }
-
- std::ostringstream stream;
- outputResultToStream(&stream, result, controls);
-
- // Check with expected results.
- const std::string expectedOutputFname =
- GlobalTestSettings.testRoot + "/baseResults/" + fileNames.front() + ".out";
- std::string expectedOutput;
- tryLoadFile(expectedOutputFname, "expected output", &expectedOutput);
-
- checkEqAndUpdateIfRequested(expectedOutput, stream.str(), expectedOutputFname,
- result.spirvWarningsErrors);
-}
-
-// clang-format off
-INSTANTIATE_TEST_SUITE_P(
- Glsl, GlslMapIOTest,
- ::testing::ValuesIn(std::vector<IoMapData>({
- {{"iomap.crossStage.vert", "iomap.crossStage.frag" }, Semantics::OpenGL},
- {{"iomap.crossStage.2.vert", "iomap.crossStage.2.geom", "iomap.crossStage.2.frag" }, Semantics::OpenGL},
- // vulkan semantics
- {{"iomap.crossStage.vk.vert", "iomap.crossStage.vk.geom", "iomap.crossStage.vk.frag" }, Semantics::Vulkan},
- }))
-);
-// clang-format on
-
-} // anonymous namespace
-} // namespace glslangtest
-#endif
\ No newline at end of file
diff --git a/third_party/vulkan-deps/glslang/src/gtests/Link.FromFile.Vk.cpp b/third_party/vulkan-deps/glslang/src/gtests/Link.FromFile.Vk.cpp
index 5e005a4..2909a9c 100644
--- a/third_party/vulkan-deps/glslang/src/gtests/Link.FromFile.Vk.cpp
+++ b/third_party/vulkan-deps/glslang/src/gtests/Link.FromFile.Vk.cpp
@@ -114,12 +114,12 @@
::testing::ValuesIn(std::vector<std::vector<std::string>>({
{"link1.vk.frag", "link2.vk.frag"},
{"spv.unit1.frag", "spv.unit2.frag", "spv.unit3.frag"},
- {"link.vk.matchingPC.0.0.frag", "link.vk.matchingPC.0.1.frag",
- "link.vk.matchingPC.0.2.frag"},
- {"link.vk.differentPC.0.0.frag", "link.vk.differentPC.0.1.frag",
- "link.vk.differentPC.0.2.frag"},
- {"link.vk.differentPC.1.0.frag", "link.vk.differentPC.1.1.frag",
- "link.vk.differentPC.1.2.frag"},
+ {"link.vk.matchingPC.0.0.frag", "link.vk.matchingPC.0.1.frag",
+ "link.vk.matchingPC.0.2.frag"},
+ {"link.vk.differentPC.0.0.frag", "link.vk.differentPC.0.1.frag",
+ "link.vk.differentPC.0.2.frag"},
+ {"link.vk.differentPC.1.0.frag", "link.vk.differentPC.1.1.frag",
+ "link.vk.differentPC.1.2.frag"},
{"link.vk.pcNamingValid.0.0.vert", "link.vk.pcNamingValid.0.1.vert"},
{"link.vk.pcNamingInvalid.0.0.vert", "link.vk.pcNamingInvalid.0.1.vert"},
{"link.vk.multiBlocksValid.0.0.vert", "link.vk.multiBlocksValid.0.1.vert"},
diff --git a/third_party/vulkan-deps/glslang/src/gtests/VkRelaxed.FromFile.cpp b/third_party/vulkan-deps/glslang/src/gtests/VkRelaxed.FromFile.cpp
deleted file mode 100644
index d791d6c..0000000
--- a/third_party/vulkan-deps/glslang/src/gtests/VkRelaxed.FromFile.cpp
+++ /dev/null
@@ -1,296 +0,0 @@
-//
-// Copyright (C) 2016-2017 Google, Inc.
-// 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 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.
-//
-#include <algorithm>
-
-#include <gtest/gtest.h>
-
-#include "TestFixture.h"
-
-#include "glslang/MachineIndependent/iomapper.h"
-#include "glslang/MachineIndependent/reflection.h"
-
-#ifndef GLSLANG_WEB
-namespace glslangtest {
-namespace {
-
-struct vkRelaxedData {
- std::vector<std::string> fileNames;
-};
-
-using VulkanRelaxedTest = GlslangTest <::testing::TestWithParam<vkRelaxedData>>;
-
-template<class T>
-std::string interfaceName(T symbol) {
- return symbol.getType()->getBasicType() == glslang::EbtBlock ? std::string(symbol.getType()->getTypeName().c_str()) : symbol.name;
-}
-
-bool verifyIOMapping(std::string& linkingError, glslang::TProgram& program) {
- bool success = true;
-
- // Verify IO Mapping by generating reflection for each stage individually
- // and comparing layout qualifiers on the results
-
-
- int reflectionOptions = EShReflectionDefault;
- //reflectionOptions |= EShReflectionStrictArraySuffix;
- //reflectionOptions |= EShReflectionBasicArraySuffix;
- reflectionOptions |= EShReflectionIntermediateIO;
- reflectionOptions |= EShReflectionSeparateBuffers;
- reflectionOptions |= EShReflectionAllBlockVariables;
- //reflectionOptions |= EShReflectionUnwrapIOBlocks;
-
- success &= program.buildReflection(reflectionOptions);
-
- // check that the reflection output from the individual stages all makes sense..
- std::vector<glslang::TReflection> stageReflections;
- for (int s = 0; s < EShLangCount; ++s) {
- if (program.getIntermediate((EShLanguage)s)) {
- stageReflections.emplace_back((EShReflectionOptions)reflectionOptions, (EShLanguage)s, (EShLanguage)s);
- success &= stageReflections.back().addStage((EShLanguage)s, *program.getIntermediate((EShLanguage)s));
- }
- }
-
- // check that input/output locations match between stages
- auto it = stageReflections.begin();
- auto nextIt = it + 1;
- for (; nextIt != stageReflections.end(); it++, nextIt++) {
- int numOut = it->getNumPipeOutputs();
- std::map<std::string, const glslang::TObjectReflection*> pipeOut;
-
- for (int i = 0; i < numOut; i++) {
- const glslang::TObjectReflection& out = it->getPipeOutput(i);
- std::string name = interfaceName(out);
- pipeOut[name] = &out;
- }
-
- int numIn = nextIt->getNumPipeInputs();
- for (int i = 0; i < numIn; i++) {
- auto in = nextIt->getPipeInput(i);
- std::string name = interfaceName(in);
- auto out = pipeOut.find(name);
-
- if (out != pipeOut.end()) {
- auto inQualifier = in.getType()->getQualifier();
- auto outQualifier = out->second->getType()->getQualifier();
- success &= outQualifier.layoutLocation == inQualifier.layoutLocation;
- }
- else {
- success &= false;
- }
- }
- }
-
- // compare uniforms in each stage to the program
- {
- int totalUniforms = program.getNumUniformVariables();
- std::map<std::string, const glslang::TObjectReflection*> programUniforms;
- for (int i = 0; i < totalUniforms; i++) {
- const glslang::TObjectReflection& uniform = program.getUniform(i);
- std::string name = interfaceName(uniform);
- programUniforms[name] = &uniform;
- }
- it = stageReflections.begin();
- for (; it != stageReflections.end(); it++) {
- int numUniform = it->getNumUniforms();
- std::map<std::string, glslang::TObjectReflection> uniforms;
-
- for (int i = 0; i < numUniform; i++) {
- glslang::TObjectReflection uniform = it->getUniform(i);
- std::string name = interfaceName(uniform);
- auto programUniform = programUniforms.find(name);
-
- if (programUniform != programUniforms.end()) {
- auto stageQualifier = uniform.getType()->getQualifier();
- auto programQualifier = programUniform->second->getType()->getQualifier();
-
- success &= stageQualifier.layoutLocation == programQualifier.layoutLocation;
- success &= stageQualifier.layoutBinding == programQualifier.layoutBinding;
- success &= stageQualifier.layoutSet == programQualifier.layoutSet;
- }
- else {
- success &= false;
- }
- }
- }
- }
-
- // compare uniform blocks in each stage to the program table
- {
- int totalUniforms = program.getNumUniformBlocks();
- std::map<std::string, const glslang::TObjectReflection*> programUniforms;
- for (int i = 0; i < totalUniforms; i++) {
- const glslang::TObjectReflection& uniform = program.getUniformBlock(i);
- std::string name = interfaceName(uniform);
- programUniforms[name] = &uniform;
- }
- it = stageReflections.begin();
- for (; it != stageReflections.end(); it++) {
- int numUniform = it->getNumUniformBlocks();
- std::map<std::string, glslang::TObjectReflection> uniforms;
-
- for (int i = 0; i < numUniform; i++) {
- glslang::TObjectReflection uniform = it->getUniformBlock(i);
- std::string name = interfaceName(uniform);
- auto programUniform = programUniforms.find(name);
-
- if (programUniform != programUniforms.end()) {
- auto stageQualifier = uniform.getType()->getQualifier();
- auto programQualifier = programUniform->second->getType()->getQualifier();
-
- success &= stageQualifier.layoutLocation == programQualifier.layoutLocation;
- success &= stageQualifier.layoutBinding == programQualifier.layoutBinding;
- success &= stageQualifier.layoutSet == programQualifier.layoutSet;
- }
- else {
- success &= false;
- }
- }
- }
- }
-
- if (!success) {
- linkingError += "Mismatched cross-stage IO\n";
- }
-
- return success;
-}
-
-TEST_P(VulkanRelaxedTest, FromFile)
-{
- const auto& fileNames = GetParam().fileNames;
- Semantics semantics = Semantics::Vulkan;
- const size_t fileCount = fileNames.size();
- const EShMessages controls = DeriveOptions(Source::GLSL, semantics, Target::BothASTAndSpv);
- GlslangResult result;
-
- // Compile each input shader file.
- bool success = true;
- std::vector<std::unique_ptr<glslang::TShader>> shaders;
- for (size_t i = 0; i < fileCount; ++i) {
- std::string contents;
- tryLoadFile(GlobalTestSettings.testRoot + "/" + fileNames[i],
- "input", &contents);
- shaders.emplace_back(
- new glslang::TShader(GetShaderStage(GetSuffix(fileNames[i]))));
- auto* shader = shaders.back().get();
-
- shader->setAutoMapLocations(true);
- shader->setAutoMapBindings(true);
-
- shader->setEnvInput(glslang::EShSourceGlsl, shader->getStage(), glslang::EShClientVulkan, 100);
- shader->setEnvClient(glslang::EShClientVulkan, glslang::EShTargetVulkan_1_1);
- shader->setEnvTarget(glslang::EShTargetSpv, glslang::EShTargetSpv_1_0);
-
- // Use vulkan relaxed option
- shader->setEnvInputVulkanRulesRelaxed();
-
- success &= compile(shader, contents, "", controls);
-
- result.shaderResults.push_back(
- { fileNames[i], shader->getInfoLog(), shader->getInfoDebugLog() });
- }
-
- // Link all of them.
- glslang::TProgram program;
- for (const auto& shader : shaders) program.addShader(shader.get());
- success &= program.link(controls);
- result.linkingOutput = program.getInfoLog();
- result.linkingError = program.getInfoDebugLog();
-
- unsigned int stage = 0;
- glslang::TIntermediate* firstIntermediate = nullptr;
- while (!program.getIntermediate((EShLanguage)stage) && stage < EShLangCount) { stage++; }
- firstIntermediate = program.getIntermediate((EShLanguage)stage);
-
- glslang::TDefaultGlslIoResolver resolver(*firstIntermediate);
- glslang::TGlslIoMapper ioMapper;
-
- if (success) {
- success &= program.mapIO(&resolver, &ioMapper);
- result.linkingOutput = program.getInfoLog();
- result.linkingError = program.getInfoDebugLog();
- }
-
- success &= verifyIOMapping(result.linkingError, program);
- result.validationResult = success;
-
- if (success && (controls & EShMsgSpvRules)) {
- for (int stage = 0; stage < EShLangCount; ++stage) {
- if (program.getIntermediate((EShLanguage)stage)) {
- spv::SpvBuildLogger logger;
- std::vector<uint32_t> spirv_binary;
- options().disableOptimizer = false;
- glslang::GlslangToSpv(*program.getIntermediate((EShLanguage)stage),
- spirv_binary, &logger, &options());
-
- std::ostringstream disassembly_stream;
- spv::Parameterize();
- spv::Disassemble(disassembly_stream, spirv_binary);
- result.spirvWarningsErrors += logger.getAllMessages();
- result.spirv += disassembly_stream.str();
- result.validationResult &= !options().validate || logger.getAllMessages().empty();
- }
- }
- }
-
- std::ostringstream stream;
- outputResultToStream(&stream, result, controls);
-
- // Check with expected results.
- const std::string expectedOutputFname =
- GlobalTestSettings.testRoot + "/baseResults/" + fileNames.front() + ".out";
- std::string expectedOutput;
- tryLoadFile(expectedOutputFname, "expected output", &expectedOutput);
-
- checkEqAndUpdateIfRequested(expectedOutput, stream.str(), expectedOutputFname,
- result.spirvWarningsErrors);
-}
-
-// clang-format off
-INSTANTIATE_TEST_SUITE_P(
- Glsl, VulkanRelaxedTest,
- ::testing::ValuesIn(std::vector<vkRelaxedData>({
- {{"vk.relaxed.frag"}},
- {{"vk.relaxed.link1.frag", "vk.relaxed.link2.frag"}},
- {{"vk.relaxed.stagelink.vert", "vk.relaxed.stagelink.frag"}},
- {{"vk.relaxed.errorcheck.vert", "vk.relaxed.errorcheck.frag"}},
- }))
-);
-// clang-format on
-
-} // anonymous namespace
-} // namespace glslangtest
-#endif
\ No newline at end of file
diff --git a/third_party/vulkan-deps/spirv-tools/src/BUILD.gn b/third_party/vulkan-deps/spirv-tools/src/BUILD.gn
index 845eb29..9f07c94 100644
--- a/third_party/vulkan-deps/spirv-tools/src/BUILD.gn
+++ b/third_party/vulkan-deps/spirv-tools/src/BUILD.gn
@@ -32,13 +32,14 @@
"${spirv_headers}/include/spirv/$version/spirv.core.grammar.json"
core_insts_file = "${target_gen_dir}/core.insts-$version.inc"
operand_kinds_file = "${target_gen_dir}/operand.kinds-$version.inc"
- debuginfo_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json"
+ debuginfo_insts_file =
+ "${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json"
cldebuginfo100_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json"
sources = [
+ cldebuginfo100_insts_file,
core_json_file,
debuginfo_insts_file,
- cldebuginfo100_insts_file,
]
outputs = [
core_insts_file,
@@ -69,7 +70,8 @@
core_json_file =
"${spirv_headers}/include/spirv/$version/spirv.core.grammar.json"
- debuginfo_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json"
+ debuginfo_insts_file =
+ "${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json"
cldebuginfo100_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json"
extension_enum_file = "${target_gen_dir}/extension_enum.inc"
@@ -110,7 +112,8 @@
core_json_file =
"${spirv_headers}/include/spirv/$version/spirv.core.grammar.json"
glsl_json_file = "${spirv_headers}/include/spirv/${version}/extinst.glsl.std.450.grammar.json"
- debuginfo_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json"
+ debuginfo_insts_file =
+ "${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json"
cldebuginfo100_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json"
glsl_insts_file = "${target_gen_dir}/glsl.std.450.insts.inc"
@@ -133,9 +136,7 @@
debuginfo_insts_file,
cldebuginfo100_insts_file,
]
- outputs = [
- glsl_insts_file,
- ]
+ outputs = [ glsl_insts_file ]
}
}
@@ -150,7 +151,8 @@
core_json_file =
"${spirv_headers}/include/spirv/$version/spirv.core.grammar.json"
opencl_json_file = "${spirv_headers}/include/spirv/${version}/extinst.opencl.std.100.grammar.json"
- debuginfo_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json"
+ debuginfo_insts_file =
+ "${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json"
cldebuginfo100_insts_file = "${spirv_headers}/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json"
opencl_insts_file = "${target_gen_dir}/opencl.std.insts.inc"
@@ -173,9 +175,7 @@
debuginfo_insts_file,
cldebuginfo100_insts_file,
]
- outputs = [
- opencl_insts_file,
- ]
+ outputs = [ opencl_insts_file ]
}
}
@@ -194,12 +194,8 @@
"--extinst-output-path",
rebase_path(extinst_output_path, root_build_dir),
]
- inputs = [
- invoker.grammar_file,
- ]
- outputs = [
- "${extinst_output_path}",
- ]
+ inputs = [ invoker.grammar_file ]
+ outputs = [ "${extinst_output_path}" ]
}
}
@@ -210,7 +206,8 @@
script = "utils/generate_grammar_tables.py"
name = invoker.name
- extinst_vendor_grammar = "${spirv_headers}/include/spirv/unified1/extinst.${name}.grammar.json"
+ extinst_vendor_grammar =
+ "${spirv_headers}/include/spirv/unified1/extinst.${name}.grammar.json"
extinst_file = "${target_gen_dir}/${name}.insts.inc"
args = [
@@ -219,14 +216,10 @@
"--vendor-insts-output",
rebase_path(extinst_file, root_build_dir),
"--vendor-operand-kind-prefix",
- invoker.operand_kind_prefix
+ invoker.operand_kind_prefix,
]
- inputs = [
- extinst_vendor_grammar,
- ]
- outputs = [
- extinst_file,
- ]
+ inputs = [ extinst_vendor_grammar ]
+ outputs = [ extinst_file ]
}
}
@@ -237,12 +230,8 @@
xml_file = "${spirv_headers}/include/spirv/spir-v.xml"
inc_file = "${target_gen_dir}/generators.inc"
- sources = [
- xml_file,
- ]
- outputs = [
- inc_file,
- ]
+ sources = [ xml_file ]
+ outputs = [ inc_file ]
args = [
"--xml",
rebase_path(xml_file, root_build_dir),
@@ -257,9 +246,7 @@
src_dir = "."
inc_file = "${target_gen_dir}/build-version.inc"
- outputs = [
- inc_file,
- ]
+ outputs = [ inc_file ]
args = [
rebase_path(src_dir, root_build_dir),
rebase_path(inc_file, root_build_dir),
@@ -280,7 +267,8 @@
}
spvtools_language_header("debuginfo") {
name = "DebugInfo"
- grammar_file = "${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json"
+ grammar_file =
+ "${spirv_headers}/include/spirv/unified1/extinst.debuginfo.grammar.json"
}
spvtools_language_header("cldebuginfo100") {
name = "OpenCLDebugInfo100"
@@ -288,13 +276,34 @@
}
spvtools_vendor_tables = [
- ["spv-amd-shader-explicit-vertex-parameter", "...nil..."],
- ["spv-amd-shader-trinary-minmax", "...nil..."],
- ["spv-amd-gcn-shader", "...nil..."],
- ["spv-amd-shader-ballot", "...nil..."],
- ["debuginfo", "...nil..."],
- ["opencl.debuginfo.100", "CLDEBUG100_"],
- ["nonsemantic.clspvreflection", "...nil..."],
+ [
+ "spv-amd-shader-explicit-vertex-parameter",
+ "...nil...",
+ ],
+ [
+ "spv-amd-shader-trinary-minmax",
+ "...nil...",
+ ],
+ [
+ "spv-amd-gcn-shader",
+ "...nil...",
+ ],
+ [
+ "spv-amd-shader-ballot",
+ "...nil...",
+ ],
+ [
+ "debuginfo",
+ "...nil...",
+ ],
+ [
+ "opencl.debuginfo.100",
+ "CLDEBUG100_",
+ ],
+ [
+ "nonsemantic.clspvreflection",
+ "...nil...",
+ ],
]
foreach(table_def, spvtools_vendor_tables) {
@@ -317,11 +326,15 @@
configs = [ ":spvtools_public_config" ]
+ cflags = []
if (is_clang) {
- cflags = [
+ cflags += [
"-Wno-implicit-fallthrough",
"-Wno-newline-eof",
]
+ } else if (!is_win) {
+ # Work around a false-positive on a Skia GCC 10 builder.
+ cflags += [ "-Wno-format-truncation" ]
}
}
@@ -342,8 +355,8 @@
":spvtools_core_tables_unified1",
":spvtools_generators_inc",
":spvtools_glsl_tables_glsl1-0",
- ":spvtools_language_header_debuginfo",
":spvtools_language_header_cldebuginfo100",
+ ":spvtools_language_header_debuginfo",
":spvtools_opencl_tables_opencl1-0",
]
foreach(table_def, spvtools_vendor_tables) {
@@ -486,9 +499,7 @@
":spvtools_language_header_cldebuginfo100",
":spvtools_language_header_debuginfo",
]
- public_deps = [
- ":spvtools_headers",
- ]
+ public_deps = [ ":spvtools_headers" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
@@ -539,10 +550,10 @@
"source/opt/dead_insert_elim_pass.h",
"source/opt/dead_variable_elimination.cpp",
"source/opt/dead_variable_elimination.h",
- "source/opt/decoration_manager.cpp",
- "source/opt/decoration_manager.h",
"source/opt/debug_info_manager.cpp",
"source/opt/debug_info_manager.h",
+ "source/opt/decoration_manager.cpp",
+ "source/opt/decoration_manager.h",
"source/opt/def_use_manager.cpp",
"source/opt/def_use_manager.h",
"source/opt/desc_sroa.cpp",
@@ -709,9 +720,7 @@
":spvtools_language_header_debuginfo",
":spvtools_vendor_tables_spv-amd-shader-ballot",
]
- public_deps = [
- ":spvtools_headers",
- ]
+ public_deps = [ ":spvtools_headers" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
@@ -721,17 +730,13 @@
}
static_library("spvtools_link") {
- sources = [
- "source/link/linker.cpp",
- ]
+ sources = [ "source/link/linker.cpp" ]
deps = [
":spvtools",
":spvtools_opt",
":spvtools_val",
]
- public_deps = [
- ":spvtools_headers",
- ]
+ public_deps = [ ":spvtools_headers" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
@@ -804,9 +809,7 @@
":spvtools",
":spvtools_opt",
]
- public_deps = [
- ":spvtools_headers",
- ]
+ public_deps = [ ":spvtools_headers" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
@@ -841,10 +844,10 @@
"test/comment_test.cpp",
"test/enum_set_test.cpp",
"test/enum_string_mapping_test.cpp",
+ "test/ext_inst.cldebug100_test.cpp",
"test/ext_inst.debuginfo_test.cpp",
"test/ext_inst.glsl_test.cpp",
"test/ext_inst.opencl_test.cpp",
- "test/ext_inst.cldebug100_test.cpp",
"test/fix_word_test.cpp",
"test/generator_magic_number_test.cpp",
"test/hex_float_test.cpp",
@@ -891,8 +894,8 @@
deps = [
":spvtools",
- ":spvtools_language_header_debuginfo",
":spvtools_language_header_cldebuginfo100",
+ ":spvtools_language_header_debuginfo",
":spvtools_val",
"//testing/gmock",
"//testing/gtest",
@@ -912,9 +915,7 @@
if (spirv_tools_standalone) {
group("fuzzers") {
testonly = true
- deps = [
- "test/fuzzers",
- ]
+ deps = [ "test/fuzzers" ]
}
}
@@ -923,16 +924,12 @@
"tools/util/cli_consumer.cpp",
"tools/util/cli_consumer.h",
]
- deps = [
- ":spvtools_headers",
- ]
+ deps = [ ":spvtools_headers" ]
configs += [ ":spvtools_internal_config" ]
}
source_set("spvtools_software_version") {
- sources = [
- "source/software_version.cpp",
- ]
+ sources = [ "source/software_version.cpp" ]
deps = [
":spvtools_build_version",
":spvtools_headers",
@@ -941,9 +938,7 @@
}
executable("spirv-as") {
- sources = [
- "tools/as/as.cpp",
- ]
+ sources = [ "tools/as/as.cpp" ]
deps = [
":spvtools",
":spvtools_software_version",
@@ -952,9 +947,7 @@
}
executable("spirv-dis") {
- sources = [
- "tools/dis/dis.cpp",
- ]
+ sources = [ "tools/dis/dis.cpp" ]
deps = [
":spvtools",
":spvtools_software_version",
@@ -963,9 +956,7 @@
}
executable("spirv-val") {
- sources = [
- "tools/val/val.cpp",
- ]
+ sources = [ "tools/val/val.cpp" ]
deps = [
":spvtools",
":spvtools_software_version",
@@ -989,9 +980,7 @@
}
executable("spirv-opt") {
- sources = [
- "tools/opt/opt.cpp",
- ]
+ sources = [ "tools/opt/opt.cpp" ]
deps = [
":spvtools",
":spvtools_opt",
@@ -1003,9 +992,7 @@
}
executable("spirv-link") {
- sources = [
- "tools/link/linker.cpp",
- ]
+ sources = [ "tools/link/linker.cpp" ]
deps = [
":spvtools",
":spvtools_link",
@@ -1019,9 +1006,7 @@
if (!is_ios) {
# iOS does not allow std::system calls which spirv-reduce requires
executable("spirv-reduce") {
- sources = [
- "tools/reduce/reduce.cpp",
- ]
+ sources = [ "tools/reduce/reduce.cpp" ]
deps = [
":spvtools",
":spvtools_opt",
diff --git a/third_party/vulkan-deps/spirv-tools/src/include/spirv-tools/libspirv.h b/third_party/vulkan-deps/spirv-tools/src/include/spirv-tools/libspirv.h
index 658c4dd..2891cbe 100644
--- a/third_party/vulkan-deps/spirv-tools/src/include/spirv-tools/libspirv.h
+++ b/third_party/vulkan-deps/spirv-tools/src/include/spirv-tools/libspirv.h
@@ -671,7 +671,7 @@
// Creates a reducer options object with default options. Returns a valid
// options object. The object remains valid until it is passed into
// |spvReducerOptionsDestroy|.
-SPIRV_TOOLS_EXPORT spv_reducer_options spvReducerOptionsCreate();
+SPIRV_TOOLS_EXPORT spv_reducer_options spvReducerOptionsCreate(void);
// Destroys the given reducer options object.
SPIRV_TOOLS_EXPORT void spvReducerOptionsDestroy(spv_reducer_options options);
@@ -698,7 +698,7 @@
// Creates a fuzzer options object with default options. Returns a valid
// options object. The object remains valid until it is passed into
// |spvFuzzerOptionsDestroy|.
-SPIRV_TOOLS_EXPORT spv_fuzzer_options spvFuzzerOptionsCreate();
+SPIRV_TOOLS_EXPORT spv_fuzzer_options spvFuzzerOptionsCreate(void);
// Destroys the given fuzzer options object.
SPIRV_TOOLS_EXPORT void spvFuzzerOptionsDestroy(spv_fuzzer_options options);
diff --git a/third_party/vulkan-deps/spirv-tools/src/source/fuzz/force_render_red.cpp b/third_party/vulkan-deps/spirv-tools/src/source/fuzz/force_render_red.cpp
index fd0587a..3267487 100644
--- a/third_party/vulkan-deps/spirv-tools/src/source/fuzz/force_render_red.cpp
+++ b/third_party/vulkan-deps/spirv-tools/src/source/fuzz/force_render_red.cpp
@@ -19,12 +19,10 @@
#include "source/fuzz/protobufs/spirvfuzz_protobufs.h"
#include "source/fuzz/transformation_context.h"
#include "source/fuzz/transformation_replace_constant_with_uniform.h"
-#include "source/fuzz/uniform_buffer_element_descriptor.h"
#include "source/opt/build_module.h"
#include "source/opt/ir_context.h"
#include "source/opt/types.h"
#include "source/util/make_unique.h"
-#include "tools/util/cli_consumer.h"
namespace spvtools {
namespace fuzz {
@@ -160,8 +158,8 @@
const spv_target_env& target_env, spv_validator_options validator_options,
const std::vector<uint32_t>& binary_in,
const spvtools::fuzz::protobufs::FactSequence& initial_facts,
+ const MessageConsumer& message_consumer,
std::vector<uint32_t>* binary_out) {
- auto message_consumer = spvtools::utils::CLIMessageConsumer;
spvtools::SpirvTools tools(target_env);
if (!tools.IsValid()) {
message_consumer(SPV_MSG_ERROR, nullptr, {},
diff --git a/third_party/vulkan-deps/spirv-tools/src/source/fuzz/force_render_red.h b/third_party/vulkan-deps/spirv-tools/src/source/fuzz/force_render_red.h
index b51c72b..5b8eab1 100644
--- a/third_party/vulkan-deps/spirv-tools/src/source/fuzz/force_render_red.h
+++ b/third_party/vulkan-deps/spirv-tools/src/source/fuzz/force_render_red.h
@@ -41,7 +41,7 @@
const spv_target_env& target_env, spv_validator_options validator_options,
const std::vector<uint32_t>& binary_in,
const spvtools::fuzz::protobufs::FactSequence& initial_facts,
- std::vector<uint32_t>* binary_out);
+ const MessageConsumer& message_consumer, std::vector<uint32_t>* binary_out);
} // namespace fuzz
} // namespace spvtools
diff --git a/third_party/vulkan-deps/spirv-tools/src/source/opt/constants.h b/third_party/vulkan-deps/spirv-tools/src/source/opt/constants.h
index e17ae6b..5bd0ae3 100644
--- a/third_party/vulkan-deps/spirv-tools/src/source/opt/constants.h
+++ b/third_party/vulkan-deps/spirv-tools/src/source/opt/constants.h
@@ -58,7 +58,7 @@
class Constant {
public:
Constant() = delete;
- virtual ~Constant() {}
+ virtual ~Constant() = default;
// Make a deep copy of this constant.
virtual std::unique_ptr<Constant> Copy() const = 0;
diff --git a/third_party/vulkan-deps/spirv-tools/src/source/opt/folding_rules.cpp b/third_party/vulkan-deps/spirv-tools/src/source/opt/folding_rules.cpp
index 010eec9..1e7c424 100644
--- a/third_party/vulkan-deps/spirv-tools/src/source/opt/folding_rules.cpp
+++ b/third_party/vulkan-deps/spirv-tools/src/source/opt/folding_rules.cpp
@@ -470,7 +470,7 @@
float fval = val.getAsFloat(); \
if (!IsValidResult(fval)) return 0; \
words = val.GetWords(); \
- }
+ } static_assert(true, "require extra semicolon")
switch (opcode) {
case SpvOpFMul:
FOLD_OP(*);
@@ -522,7 +522,7 @@
uint32_t val = input1->GetU32() op input2->GetU32(); \
words.push_back(val); \
} \
- }
+ } static_assert(true, "require extra semicalon")
switch (opcode) {
case SpvOpIMul:
FOLD_OP(*);
diff --git a/third_party/vulkan-deps/spirv-tools/src/source/opt/inline_pass.h b/third_party/vulkan-deps/spirv-tools/src/source/opt/inline_pass.h
index abe773a..9a5429b 100644
--- a/third_party/vulkan-deps/spirv-tools/src/source/opt/inline_pass.h
+++ b/third_party/vulkan-deps/spirv-tools/src/source/opt/inline_pass.h
@@ -37,7 +37,7 @@
using cbb_ptr = const BasicBlock*;
public:
- virtual ~InlinePass() = default;
+ virtual ~InlinePass() override = default;
protected:
InlinePass();
diff --git a/third_party/vulkan-deps/spirv-tools/src/source/opt/mem_pass.h b/third_party/vulkan-deps/spirv-tools/src/source/opt/mem_pass.h
index dcc16b6..5a77670 100644
--- a/third_party/vulkan-deps/spirv-tools/src/source/opt/mem_pass.h
+++ b/third_party/vulkan-deps/spirv-tools/src/source/opt/mem_pass.h
@@ -38,7 +38,7 @@
// utility functions and supporting state.
class MemPass : public Pass {
public:
- virtual ~MemPass() = default;
+ virtual ~MemPass() override = default;
// Returns an undef value for the given |var_id|'s type.
uint32_t GetUndefVal(uint32_t var_id) {
diff --git a/third_party/vulkan-deps/spirv-tools/src/source/opt/type_manager.cpp b/third_party/vulkan-deps/spirv-tools/src/source/opt/type_manager.cpp
index ce9c2c1..7935ad3 100644
--- a/third_party/vulkan-deps/spirv-tools/src/source/opt/type_manager.cpp
+++ b/third_party/vulkan-deps/spirv-tools/src/source/opt/type_manager.cpp
@@ -223,7 +223,7 @@
case Type::k##kind: \
typeInst = MakeUnique<Instruction>(context(), SpvOpType##kind, 0, id, \
std::initializer_list<Operand>{}); \
- break;
+ break
DefineParameterlessCase(Void);
DefineParameterlessCase(Bool);
DefineParameterlessCase(Sampler);
@@ -513,7 +513,7 @@
#define DefineNoSubtypeCase(kind) \
case Type::k##kind: \
rebuilt_ty.reset(type.Clone().release()); \
- return type_pool_.insert(std::move(rebuilt_ty)).first->get();
+ return type_pool_.insert(std::move(rebuilt_ty)).first->get()
DefineNoSubtypeCase(Void);
DefineNoSubtypeCase(Bool);
diff --git a/third_party/vulkan-deps/spirv-tools/src/source/opt/types.h b/third_party/vulkan-deps/spirv-tools/src/source/opt/types.h
index d5be9be..9ecd41a 100644
--- a/third_party/vulkan-deps/spirv-tools/src/source/opt/types.h
+++ b/third_party/vulkan-deps/spirv-tools/src/source/opt/types.h
@@ -101,7 +101,7 @@
Type(Kind k) : kind_(k) {}
- virtual ~Type() {}
+ virtual ~Type() = default;
// Attaches a decoration directly on this type.
void AddDecoration(std::vector<uint32_t>&& d) {
diff --git a/third_party/vulkan-deps/spirv-tools/src/source/val/validate_decorations.cpp b/third_party/vulkan-deps/spirv-tools/src/source/val/validate_decorations.cpp
index ed336b4..f076b04 100644
--- a/third_party/vulkan-deps/spirv-tools/src/source/val/validate_decorations.cpp
+++ b/third_party/vulkan-deps/spirv-tools/src/source/val/validate_decorations.cpp
@@ -1619,7 +1619,7 @@
{ \
spv_result_t e##LINE = (X); \
if (e##LINE != SPV_SUCCESS) return e##LINE; \
- }
+ } static_assert(true, "require extra semicolon")
#define PASS_OR_BAIL(X) PASS_OR_BAIL_AT_LINE(X, __LINE__)
// Check rules for decorations where we start from the decoration rather
diff --git a/third_party/vulkan-deps/spirv-tools/src/source/val/validate_logicals.cpp b/third_party/vulkan-deps/spirv-tools/src/source/val/validate_logicals.cpp
index 5886dbf..bb35f55 100644
--- a/third_party/vulkan-deps/spirv-tools/src/source/val/validate_logicals.cpp
+++ b/third_party/vulkan-deps/spirv-tools/src/source/val/validate_logicals.cpp
@@ -188,7 +188,7 @@
case SpvOpTypeStruct: {
if (!composites) return fail();
break;
- };
+ }
default:
return fail();
diff --git a/third_party/vulkan-deps/spirv-tools/src/source/val/validation_state.cpp b/third_party/vulkan-deps/spirv-tools/src/source/val/validation_state.cpp
index 6dfc7bf..f0ac032 100644
--- a/third_party/vulkan-deps/spirv-tools/src/source/val/validation_state.cpp
+++ b/third_party/vulkan-deps/spirv-tools/src/source/val/validation_state.cpp
@@ -1736,7 +1736,7 @@
return VUID_WRAP(VUID-StandaloneSpirv-OpMemoryBarrier-04733);
default:
return ""; // unknown id
- };
+ }
// clang-format on
}
diff --git a/third_party/vulkan-deps/spirv-tools/src/test/binary_parse_test.cpp b/third_party/vulkan-deps/spirv-tools/src/test/binary_parse_test.cpp
index 93e87bd..9a13f22 100644
--- a/third_party/vulkan-deps/spirv-tools/src/test/binary_parse_test.cpp
+++ b/third_party/vulkan-deps/spirv-tools/src/test/binary_parse_test.cpp
@@ -198,7 +198,7 @@
class BinaryParseTest : public spvtest::TextToBinaryTestBase<::testing::Test> {
protected:
- ~BinaryParseTest() { spvDiagnosticDestroy(diagnostic_); }
+ ~BinaryParseTest() override { spvDiagnosticDestroy(diagnostic_); }
void Parse(const SpirvVector& words, spv_result_t expected_result,
bool flip_words = false) {
diff --git a/third_party/vulkan-deps/spirv-tools/src/test/binary_to_text_test.cpp b/third_party/vulkan-deps/spirv-tools/src/test/binary_to_text_test.cpp
index e8a02fd..9cad966 100644
--- a/third_party/vulkan-deps/spirv-tools/src/test/binary_to_text_test.cpp
+++ b/third_party/vulkan-deps/spirv-tools/src/test/binary_to_text_test.cpp
@@ -36,12 +36,12 @@
public:
BinaryToText()
: context(spvContextCreate(SPV_ENV_UNIVERSAL_1_0)), binary(nullptr) {}
- ~BinaryToText() {
+ ~BinaryToText() override {
spvBinaryDestroy(binary);
spvContextDestroy(context);
}
- virtual void SetUp() {
+ void SetUp() override {
const char* textStr = R"(
OpSource OpenCL_C 12
OpMemoryModel Physical64 OpenCL
@@ -72,7 +72,7 @@
ASSERT_EQ(SPV_SUCCESS, error);
}
- virtual void TearDown() {
+ void TearDown() override {
spvBinaryDestroy(binary);
binary = nullptr;
}
diff --git a/third_party/vulkan-deps/spirv-tools/src/test/opt/instruction_list_test.cpp b/third_party/vulkan-deps/spirv-tools/src/test/opt/instruction_list_test.cpp
index e745790..2c3c242 100644
--- a/third_party/vulkan-deps/spirv-tools/src/test/opt/instruction_list_test.cpp
+++ b/third_party/vulkan-deps/spirv-tools/src/test/opt/instruction_list_test.cpp
@@ -35,7 +35,7 @@
public:
TestInstruction() : Instruction() { created_instructions_.push_back(this); }
- ~TestInstruction() { deleted_instructions_.push_back(this); }
+ ~TestInstruction() override{ deleted_instructions_.push_back(this); }
static std::vector<TestInstruction*> created_instructions_;
static std::vector<TestInstruction*> deleted_instructions_;
diff --git a/third_party/vulkan-deps/spirv-tools/src/test/test_fixture.h b/third_party/vulkan-deps/spirv-tools/src/test/test_fixture.h
index 436993e..0c5bfc9 100644
--- a/third_party/vulkan-deps/spirv-tools/src/test/test_fixture.h
+++ b/third_party/vulkan-deps/spirv-tools/src/test/test_fixture.h
@@ -46,7 +46,7 @@
text = {textStr, strlen(textStr)};
}
- virtual ~TextToBinaryTestBase() {
+ ~TextToBinaryTestBase() override {
DestroyBinary();
if (diagnostic) spvDiagnosticDestroy(diagnostic);
}
diff --git a/third_party/vulkan-deps/spirv-tools/src/test/val/val_id_test.cpp b/third_party/vulkan-deps/spirv-tools/src/test/val/val_id_test.cpp
index c65d171..25c9e54 100644
--- a/third_party/vulkan-deps/spirv-tools/src/test/val/val_id_test.cpp
+++ b/third_party/vulkan-deps/spirv-tools/src/test/val/val_id_test.cpp
@@ -835,7 +835,7 @@
position_(spv_position_t{0, 0, 0}),
diagnostic_(spvDiagnosticCreate(&position_, "")) {}
- ~OpTypeArrayLengthTest() { spvDiagnosticDestroy(diagnostic_); }
+ ~OpTypeArrayLengthTest() override { spvDiagnosticDestroy(diagnostic_); }
// Runs spvValidate() on v, printing any errors via spvDiagnosticPrint().
spv_result_t Val(const SpirvVector& v, const std::string& expected_err = "") {
diff --git a/third_party/vulkan-deps/spirv-tools/src/test/val/val_state_test.cpp b/third_party/vulkan-deps/spirv-tools/src/test/val/val_state_test.cpp
index b2d2604..65cb1c3 100644
--- a/third_party/vulkan-deps/spirv-tools/src/test/val/val_state_test.cpp
+++ b/third_party/vulkan-deps/spirv-tools/src/test/val/val_state_test.cpp
@@ -43,7 +43,7 @@
options_(spvValidatorOptionsCreate()),
state_(context_, options_, kFakeBinary, 0, 1) {}
- ~ValidationStateTest() {
+ ~ValidationStateTest() override {
spvContextDestroy(context_);
spvValidatorOptionsDestroy(options_);
}
diff --git a/third_party/vulkan-deps/spirv-tools/src/tools/fuzz/fuzz.cpp b/third_party/vulkan-deps/spirv-tools/src/tools/fuzz/fuzz.cpp
index a93d26a..4400e0c 100644
--- a/third_party/vulkan-deps/spirv-tools/src/tools/fuzz/fuzz.cpp
+++ b/third_party/vulkan-deps/spirv-tools/src/tools/fuzz/fuzz.cpp
@@ -721,9 +721,9 @@
switch (status.action) {
case FuzzActions::FORCE_RENDER_RED:
- if (!spvtools::fuzz::ForceRenderRed(target_env, validator_options,
- binary_in, initial_facts,
- &binary_out)) {
+ if (!spvtools::fuzz::ForceRenderRed(
+ target_env, validator_options, binary_in, initial_facts,
+ spvtools::utils::CLIMessageConsumer, &binary_out)) {
return 1;
}
break;
diff --git a/third_party/vulkan-deps/spirv-tools/src/utils/generate_grammar_tables.py b/third_party/vulkan-deps/spirv-tools/src/utils/generate_grammar_tables.py
index 2a67733..c4ed180 100755
--- a/third_party/vulkan-deps/spirv-tools/src/utils/generate_grammar_tables.py
+++ b/third_party/vulkan-deps/spirv-tools/src/utils/generate_grammar_tables.py
@@ -601,7 +601,7 @@
' return "{extension}";\n'
function += ''.join([template.format(extension=extension)
for extension in extensions])
- function += ' };\n\n return "";\n}'
+ function += ' }\n\n return "";\n}'
return function
@@ -647,7 +647,7 @@
function += ' case SpvCapabilityMax:\n' \
' assert(0 && "Attempting to convert SpvCapabilityMax to string");\n' \
' return "";\n'
- function += ' };\n\n return "";\n}'
+ function += ' }\n\n return "";\n}'
return function
diff --git a/third_party/zlib/google/zip_reader.cc b/third_party/zlib/google/zip_reader.cc
index 1e86afe..1910cf2 100644
--- a/third_party/zlib/google/zip_reader.cc
+++ b/third_party/zlib/google/zip_reader.cc
@@ -101,7 +101,7 @@
is_unsafe_ = file_path_.ReferencesParent();
// We also consider that the file name is unsafe, if it's invalid UTF-8.
- base::string16 file_name_utf16;
+ std::u16string file_name_utf16;
if (!base::UTF8ToUTF16(file_name_in_zip.data(), file_name_in_zip.size(),
&file_name_utf16)) {
is_unsafe_ = true;