Update spirv-tools to v2021.4 (#4862)

This commit is contained in:
Ben Doherty
2021-11-16 17:13:42 -08:00
committed by GitHub
parent a29b438161
commit 9d29d2e32c
529 changed files with 26362 additions and 5854 deletions
-90
View File
@@ -1,90 +0,0 @@
# Windows Build Configuration for AppVeyor
# http://www.appveyor.com/docs/appveyor-yml
# version format
version: "{build}"
# The most recent compiler gives the most interesting new results.
# Put it first so we get its feedback first.
os:
- Visual Studio 2017
#- Visual Studio 2013
platform:
- x64
configuration:
- Debug
#- Release
branches:
only:
- master
# Travis advances the master-tot tag to current top of the tree after
# each push into the master branch, because it relies on that tag to
# upload build artifacts to the master-tot release. This will cause
# double testing for each push on Appveyor: one for the push, one for
# the tag advance. Disable testing tags.
skip_tags: true
clone_depth: 1
matrix:
fast_finish: true # Show final status immediately if a test fails.
#exclude:
# - os: Visual Studio 2013
# configuration: Debug
# scripts that run after cloning repository
install:
# Install ninja
- set NINJA_URL="https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip"
- appveyor DownloadFile %NINJA_URL% -FileName ninja.zip
- 7z x ninja.zip -oC:\ninja > nul
- set PATH=C:\ninja;C:\Python36;%PATH%
before_build:
- git clone --depth=1 https://github.com/KhronosGroup/SPIRV-Headers.git external/spirv-headers
- git clone https://github.com/google/googletest.git external/googletest
- cd external && cd googletest && git reset --hard 1fb1bb23bb8418dc73a5a9a82bbed31dc610fec7 && cd .. && cd ..
- git clone --depth=1 https://github.com/google/effcee.git external/effcee
- git clone --depth=1 https://github.com/google/re2.git external/re2
# Set path and environment variables for the current Visual Studio version
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2013" (call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64)
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" (call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64)
build:
parallel: true # enable MSBuild parallel builds
verbosity: minimal
build_script:
- mkdir build && cd build
- cmake -GNinja -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DCMAKE_INSTALL_PREFIX=install -DRE2_BUILD_TESTING=OFF ..
- ninja install
test_script:
- ctest -C %CONFIGURATION% --output-on-failure --timeout 310
after_test:
# Zip build artifacts for uploading and deploying
- cd install
- 7z a SPIRV-Tools-master-windows-"%PLATFORM%"-"%CONFIGURATION%".zip *\*
artifacts:
- path: build\install\*.zip
name: artifacts-zip
deploy:
- provider: GitHub
auth_token:
secure: TMfcScKzzFIm1YgeV/PwCRXFDCw8Xm0wY2Vb2FU6WKlbzb5eUITTpr6I5vHPnAxS
release: master-tot
description: "Continuous build of the latest master branch by Appveyor and Travis CI"
artifact: artifacts-zip
draft: false
prerelease: false
force_update: true
on:
branch: master
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+14
View File
@@ -0,0 +1,14 @@
name: Wasm Build
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build web
run: docker-compose up
- name: Run tests
run: node test/wasm/test.js
-2
View File
@@ -5,8 +5,6 @@ compile_commands.json
/build/
/buildtools/
/external/googletest
/external/SPIRV-Headers
/external/spirv-headers
/external/effcee
/external/re2
/external/protobuf
+9
View File
@@ -88,8 +88,11 @@ SPVTOOLS_OPT_SRC_FILES := \
source/opt/composite.cpp \
source/opt/const_folding_rules.cpp \
source/opt/constants.cpp \
source/opt/control_dependence.cpp \
source/opt/convert_to_sampled_image_pass.cpp \
source/opt/convert_to_half_pass.cpp \
source/opt/copy_prop_arrays.cpp \
source/opt/dataflow.cpp \
source/opt/dead_branch_elim_pass.cpp \
source/opt/dead_insert_elim_pass.cpp \
source/opt/dead_variable_elimination.cpp \
@@ -97,6 +100,7 @@ SPVTOOLS_OPT_SRC_FILES := \
source/opt/debug_info_manager.cpp \
source/opt/def_use_manager.cpp \
source/opt/desc_sroa.cpp \
source/opt/desc_sroa_util.cpp \
source/opt/dominator_analysis.cpp \
source/opt/dominator_tree.cpp \
source/opt/eliminate_dead_constant_pass.cpp \
@@ -154,6 +158,7 @@ SPVTOOLS_OPT_SRC_FILES := \
source/opt/relax_float_ops_pass.cpp \
source/opt/remove_duplicates_pass.cpp \
source/opt/remove_unused_interface_variables_pass.cpp \
source/opt/replace_desc_array_access_using_var_index.cpp \
source/opt/replace_invalid_opc.cpp \
source/opt/scalar_analysis.cpp \
source/opt/scalar_analysis_simplification.cpp \
@@ -181,6 +186,7 @@ SPV_GLSL_GRAMMAR=$(SPVHEADERS_LOCAL_PATH)/include/spirv/unified1/extinst.glsl.st
SPV_OPENCL_GRAMMAR=$(SPVHEADERS_LOCAL_PATH)/include/spirv/unified1/extinst.opencl.std.100.grammar.json
SPV_DEBUGINFO_GRAMMAR=$(SPVHEADERS_LOCAL_PATH)/include/spirv/unified1/extinst.debuginfo.grammar.json
SPV_CLDEBUGINFO100_GRAMMAR=$(SPVHEADERS_LOCAL_PATH)/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json
SPV_VKDEBUGINFO100_GRAMMAR=$(SPVHEADERS_LOCAL_PATH)/include/spirv/unified1/extinst.nonsemantic.shader.debuginfo.100.grammar.json
define gen_spvtools_grammar_tables
$(call generate-file-dir,$(1)/core.insts-unified1.inc)
@@ -212,6 +218,7 @@ $(LOCAL_PATH)/source/ext_inst.cpp: \
$(1)/opencl.std.insts.inc \
$(1)/debuginfo.insts.inc \
$(1)/opencl.debuginfo.100.insts.inc \
$(1)/nonsemantic.shader.debuginfo.100.insts.inc \
$(1)/spv-amd-gcn-shader.insts.inc \
$(1)/spv-amd-shader-ballot.insts.inc \
$(1)/spv-amd-shader-explicit-vertex-parameter.insts.inc \
@@ -241,6 +248,7 @@ endef
# We generate language-specific headers for DebugInfo and OpenCL.DebugInfo.100
$(eval $(call gen_spvtools_lang_headers,$(SPVTOOLS_OUT_PATH),DebugInfo,$(SPV_DEBUGINFO_GRAMMAR)))
$(eval $(call gen_spvtools_lang_headers,$(SPVTOOLS_OUT_PATH),OpenCLDebugInfo100,$(SPV_CLDEBUGINFO100_GRAMMAR)))
$(eval $(call gen_spvtools_lang_headers,$(SPVTOOLS_OUT_PATH),NonSemanticShaderDebugInfo100,$(SPV_VKDEBUGINFO100_GRAMMAR)))
define gen_spvtools_vendor_tables
@@ -258,6 +266,7 @@ endef
# Vendor and debug extended instruction sets, with grammars from SPIRV-Tools source tree.
$(eval $(call gen_spvtools_vendor_tables,$(SPVTOOLS_OUT_PATH),debuginfo,""))
$(eval $(call gen_spvtools_vendor_tables,$(SPVTOOLS_OUT_PATH),opencl.debuginfo.100,"CLDEBUG100_"))
$(eval $(call gen_spvtools_vendor_tables,$(SPVTOOLS_OUT_PATH),nonsemantic.shader.debuginfo.100,"SHDEBUG100_"))
$(eval $(call gen_spvtools_vendor_tables,$(SPVTOOLS_OUT_PATH),spv-amd-gcn-shader,""))
$(eval $(call gen_spvtools_vendor_tables,$(SPVTOOLS_OUT_PATH),spv-amd-shader-ballot,""))
$(eval $(call gen_spvtools_vendor_tables,$(SPVTOOLS_OUT_PATH),spv-amd-shader-explicit-vertex-parameter,""))
+43
View File
@@ -3,6 +3,7 @@ load(
"COMMON_COPTS",
"DEBUGINFO_GRAMMAR_JSON_FILE",
"CLDEBUGINFO100_GRAMMAR_JSON_FILE",
"SHDEBUGINFO100_GRAMMAR_JSON_FILE",
"TEST_COPTS",
"base_test",
"generate_core_tables",
@@ -12,6 +13,7 @@ load(
"generate_opencl_tables",
"generate_vendor_tables",
"link_test",
"lint_test",
"opt_test",
"reduce_test",
"util_test",
@@ -59,12 +61,16 @@ generate_vendor_tables("debuginfo")
generate_vendor_tables("opencl.debuginfo.100", "CLDEBUG100_")
generate_vendor_tables("nonsemantic.shader.debuginfo.100", "SHDEBUG100_")
generate_vendor_tables("nonsemantic.clspvreflection")
generate_extinst_lang_headers("DebugInfo", DEBUGINFO_GRAMMAR_JSON_FILE)
generate_extinst_lang_headers("OpenCLDebugInfo100", CLDEBUGINFO100_GRAMMAR_JSON_FILE)
generate_extinst_lang_headers("NonSemanticShaderDebugInfo100", SHDEBUGINFO100_GRAMMAR_JSON_FILE)
py_binary(
name = "generate_registry_tables",
srcs = ["utils/generate_registry_tables.py"],
@@ -101,12 +107,14 @@ cc_library(
":gen_enum_string_mapping",
":gen_extinst_lang_headers_DebugInfo",
":gen_extinst_lang_headers_OpenCLDebugInfo100",
":gen_extinst_lang_headers_NonSemanticShaderDebugInfo100",
":gen_glsl_tables_unified1",
":gen_opencl_tables_unified1",
":gen_registry_tables",
":gen_vendor_tables_debuginfo",
":gen_vendor_tables_nonsemantic_clspvreflection",
":gen_vendor_tables_opencl_debuginfo_100",
":gen_vendor_tables_nonsemantic_shader_debuginfo_100",
":gen_vendor_tables_spv_amd_gcn_shader",
":gen_vendor_tables_spv_amd_shader_ballot",
":gen_vendor_tables_spv_amd_shader_explicit_vertex_parameter",
@@ -225,6 +233,19 @@ cc_library(
],
)
cc_library(
name = "spirv_tools_lint",
srcs = glob(["source/lint/*.cpp", "source/lint/*.h"]),
hdrs = ["include/spirv-tools/linter.hpp"],
copts = COMMON_COPTS,
linkstatic = 1,
visibility = ["//visibility:public"],
deps = [
":spirv_tools",
":spirv_tools_opt",
],
)
cc_library(
name = "tools_util",
srcs = glob(["tools/util/*.cpp"]),
@@ -322,6 +343,21 @@ cc_binary(
],
)
cc_binary(
name = "spirv-lint",
srcs = [
"tools/io.h",
"tools/lint/lint.cpp",
],
copts = COMMON_COPTS,
visibility = ["//visibility:public"],
deps = [
":spirv_tools",
":spirv_tools_lint",
":tools_util",
],
)
cc_binary(
name = "spirv-cfg",
srcs = [
@@ -465,6 +501,13 @@ base_test(
["test/link/*.cpp"],
)]
[lint_test(
name = f[10:-4], # strip test/lint/, .cpp
srcs = [f],
) for f in glob(
["test/lint/*.cpp"],
)]
[opt_test(
name = f[9:-4], # strip test/opt/, .cpp
srcs = [f],
+494 -7
View File
@@ -16,6 +16,7 @@ import("//build_overrides/build.gni")
import("//build_overrides/spirv_tools.gni")
if (build_with_chromium) {
import("//testing/test.gni")
import("//third_party/protobuf/proto_library.gni")
}
spirv_headers = spirv_tools_spirv_headers_dir
@@ -275,6 +276,10 @@ spvtools_language_header("cldebuginfo100") {
name = "OpenCLDebugInfo100"
grammar_file = "${spirv_headers}/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json"
}
spvtools_language_header("vkdebuginfo100") {
name = "NonSemanticShaderDebugInfo100"
grammar_file = "${spirv_headers}/include/spirv/unified1/extinst.nonsemantic.shader.debuginfo.100.grammar.json"
}
spvtools_vendor_tables = [
[
@@ -305,6 +310,10 @@ spvtools_vendor_tables = [
"nonsemantic.clspvreflection",
"...nil...",
],
[
"nonsemantic.shader.debuginfo.100",
"SHDEBUG100_",
],
]
foreach(table_def, spvtools_vendor_tables) {
@@ -318,20 +327,28 @@ config("spvtools_public_config") {
include_dirs = [ "include" ]
}
config("spvtools_include_gen_dirs") {
include_dirs = [ "$target_gen_dir" ]
}
config("spvtools_internal_config") {
include_dirs = [
".",
"$target_gen_dir",
"${spirv_headers}/include",
]
configs = [ ":spvtools_public_config" ]
configs = [
":spvtools_public_config",
":spvtools_include_gen_dirs",
]
cflags = []
if (is_clang) {
cflags += [
"-Wno-implicit-fallthrough",
"-Wno-newline-eof",
"-Wno-unreachable-code-break",
"-Wno-unreachable-code-return",
]
} else if (!is_win) {
# Work around a false-positive on a Skia GCC 10 builder.
@@ -351,6 +368,14 @@ source_set("spvtools_headers") {
public_configs = [ ":spvtools_public_config" ]
}
group("spvtools_language_headers") {
public_deps = [
":spvtools_language_header_cldebuginfo100",
":spvtools_language_header_debuginfo",
":spvtools_language_header_vkdebuginfo100",
]
}
static_library("spvtools") {
deps = [
":spvtools_core_tables_unified1",
@@ -358,6 +383,7 @@ static_library("spvtools") {
":spvtools_glsl_tables_glsl1-0",
":spvtools_language_header_cldebuginfo100",
":spvtools_language_header_debuginfo",
":spvtools_language_header_vkdebuginfo100",
":spvtools_opencl_tables_opencl1-0",
]
foreach(table_def, spvtools_vendor_tables) {
@@ -371,6 +397,7 @@ static_library("spvtools") {
"source/binary.cpp",
"source/binary.h",
"source/cfa.h",
"source/common_debug_info.h",
"source/diagnostic.cpp",
"source/diagnostic.h",
"source/disassemble.cpp",
@@ -402,8 +429,12 @@ static_library("spvtools") {
"source/spirv_definition.h",
"source/spirv_endian.cpp",
"source/spirv_endian.h",
"source/spirv_fuzzer_options.cpp",
"source/spirv_fuzzer_options.h",
"source/spirv_optimizer_options.cpp",
"source/spirv_optimizer_options.h",
"source/spirv_reducer_options.cpp",
"source/spirv_reducer_options.h",
"source/spirv_target_env.cpp",
"source/spirv_target_env.h",
"source/spirv_validator_options.cpp",
@@ -499,6 +530,7 @@ static_library("spvtools_val") {
":spvtools",
":spvtools_language_header_cldebuginfo100",
":spvtools_language_header_debuginfo",
":spvtools_language_header_vkdebuginfo100",
]
public_deps = [ ":spvtools_headers" ]
@@ -541,10 +573,16 @@ static_library("spvtools_opt") {
"source/opt/const_folding_rules.h",
"source/opt/constants.cpp",
"source/opt/constants.h",
"source/opt/control_dependence.cpp",
"source/opt/control_dependence.h",
"source/opt/convert_to_half_pass.cpp",
"source/opt/convert_to_half_pass.h",
"source/opt/convert_to_sampled_image_pass.cpp",
"source/opt/convert_to_sampled_image_pass.h",
"source/opt/copy_prop_arrays.cpp",
"source/opt/copy_prop_arrays.h",
"source/opt/dataflow.cpp",
"source/opt/dataflow.h",
"source/opt/dead_branch_elim_pass.cpp",
"source/opt/dead_branch_elim_pass.h",
"source/opt/dead_insert_elim_pass.cpp",
@@ -559,6 +597,8 @@ static_library("spvtools_opt") {
"source/opt/def_use_manager.h",
"source/opt/desc_sroa.cpp",
"source/opt/desc_sroa.h",
"source/opt/desc_sroa_util.cpp",
"source/opt/desc_sroa_util.h",
"source/opt/dominator_analysis.cpp",
"source/opt/dominator_analysis.h",
"source/opt/dominator_tree.cpp",
@@ -678,6 +718,8 @@ static_library("spvtools_opt") {
"source/opt/remove_duplicates_pass.h",
"source/opt/remove_unused_interface_variables_pass.cpp",
"source/opt/remove_unused_interface_variables_pass.h",
"source/opt/replace_desc_array_access_using_var_index.cpp",
"source/opt/replace_desc_array_access_using_var_index.h",
"source/opt/replace_invalid_opc.cpp",
"source/opt/replace_invalid_opc.h",
"source/opt/scalar_analysis.cpp",
@@ -721,11 +763,14 @@ static_library("spvtools_opt") {
deps = [
":spvtools",
":spvtools_language_header_cldebuginfo100",
":spvtools_language_header_debuginfo",
":spvtools_vendor_tables_spv-amd-shader-ballot",
]
public_deps = [ ":spvtools_headers" ]
public_deps = [
":spvtools_headers",
":spvtools_language_header_cldebuginfo100",
":spvtools_language_header_vkdebuginfo100",
]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
@@ -811,8 +856,6 @@ static_library("spvtools_reduce") {
"source/reduce/structured_loop_to_selection_reduction_opportunity.h",
"source/reduce/structured_loop_to_selection_reduction_opportunity_finder.cpp",
"source/reduce/structured_loop_to_selection_reduction_opportunity_finder.h",
"source/spirv_reducer_options.cpp",
"source/spirv_reducer_options.h",
]
deps = [
":spvtools",
@@ -826,6 +869,423 @@ static_library("spvtools_reduce") {
configs += [ ":spvtools_internal_config" ]
}
if (build_with_chromium) {
# The spirv-fuzz library is only built when in a Chromium checkout
# due to its dependency on protobuf.
proto_library("spvtools_fuzz_proto") {
sources = [ "source/fuzz/protobufs/spvtoolsfuzz.proto" ]
generate_python = false
use_protobuf_full = true
}
static_library("spvtools_fuzz") {
sources = [
"source/fuzz/added_function_reducer.cpp",
"source/fuzz/added_function_reducer.h",
"source/fuzz/available_instructions.cpp",
"source/fuzz/available_instructions.h",
"source/fuzz/call_graph.cpp",
"source/fuzz/call_graph.h",
"source/fuzz/comparator_deep_blocks_first.h",
"source/fuzz/counter_overflow_id_source.cpp",
"source/fuzz/counter_overflow_id_source.h",
"source/fuzz/data_descriptor.cpp",
"source/fuzz/data_descriptor.h",
"source/fuzz/equivalence_relation.h",
"source/fuzz/fact_manager/constant_uniform_facts.cpp",
"source/fuzz/fact_manager/constant_uniform_facts.h",
"source/fuzz/fact_manager/data_synonym_and_id_equation_facts.cpp",
"source/fuzz/fact_manager/data_synonym_and_id_equation_facts.h",
"source/fuzz/fact_manager/dead_block_facts.cpp",
"source/fuzz/fact_manager/dead_block_facts.h",
"source/fuzz/fact_manager/fact_manager.cpp",
"source/fuzz/fact_manager/fact_manager.h",
"source/fuzz/fact_manager/irrelevant_value_facts.cpp",
"source/fuzz/fact_manager/irrelevant_value_facts.h",
"source/fuzz/fact_manager/livesafe_function_facts.cpp",
"source/fuzz/fact_manager/livesafe_function_facts.h",
"source/fuzz/force_render_red.cpp",
"source/fuzz/force_render_red.h",
"source/fuzz/fuzzer.cpp",
"source/fuzz/fuzzer.h",
"source/fuzz/fuzzer_context.cpp",
"source/fuzz/fuzzer_context.h",
"source/fuzz/fuzzer_pass.cpp",
"source/fuzz/fuzzer_pass.h",
"source/fuzz/fuzzer_pass_add_access_chains.cpp",
"source/fuzz/fuzzer_pass_add_access_chains.h",
"source/fuzz/fuzzer_pass_add_bit_instruction_synonyms.cpp",
"source/fuzz/fuzzer_pass_add_bit_instruction_synonyms.h",
"source/fuzz/fuzzer_pass_add_composite_extract.cpp",
"source/fuzz/fuzzer_pass_add_composite_extract.h",
"source/fuzz/fuzzer_pass_add_composite_inserts.cpp",
"source/fuzz/fuzzer_pass_add_composite_inserts.h",
"source/fuzz/fuzzer_pass_add_composite_types.cpp",
"source/fuzz/fuzzer_pass_add_composite_types.h",
"source/fuzz/fuzzer_pass_add_copy_memory.cpp",
"source/fuzz/fuzzer_pass_add_copy_memory.h",
"source/fuzz/fuzzer_pass_add_dead_blocks.cpp",
"source/fuzz/fuzzer_pass_add_dead_blocks.h",
"source/fuzz/fuzzer_pass_add_dead_breaks.cpp",
"source/fuzz/fuzzer_pass_add_dead_breaks.h",
"source/fuzz/fuzzer_pass_add_dead_continues.cpp",
"source/fuzz/fuzzer_pass_add_dead_continues.h",
"source/fuzz/fuzzer_pass_add_equation_instructions.cpp",
"source/fuzz/fuzzer_pass_add_equation_instructions.h",
"source/fuzz/fuzzer_pass_add_function_calls.cpp",
"source/fuzz/fuzzer_pass_add_function_calls.h",
"source/fuzz/fuzzer_pass_add_global_variables.cpp",
"source/fuzz/fuzzer_pass_add_global_variables.h",
"source/fuzz/fuzzer_pass_add_image_sample_unused_components.cpp",
"source/fuzz/fuzzer_pass_add_image_sample_unused_components.h",
"source/fuzz/fuzzer_pass_add_loads.cpp",
"source/fuzz/fuzzer_pass_add_loads.h",
"source/fuzz/fuzzer_pass_add_local_variables.cpp",
"source/fuzz/fuzzer_pass_add_local_variables.h",
"source/fuzz/fuzzer_pass_add_loop_preheaders.cpp",
"source/fuzz/fuzzer_pass_add_loop_preheaders.h",
"source/fuzz/fuzzer_pass_add_loops_to_create_int_constant_synonyms.cpp",
"source/fuzz/fuzzer_pass_add_loops_to_create_int_constant_synonyms.h",
"source/fuzz/fuzzer_pass_add_no_contraction_decorations.cpp",
"source/fuzz/fuzzer_pass_add_no_contraction_decorations.h",
"source/fuzz/fuzzer_pass_add_opphi_synonyms.cpp",
"source/fuzz/fuzzer_pass_add_opphi_synonyms.h",
"source/fuzz/fuzzer_pass_add_parameters.cpp",
"source/fuzz/fuzzer_pass_add_parameters.h",
"source/fuzz/fuzzer_pass_add_relaxed_decorations.cpp",
"source/fuzz/fuzzer_pass_add_relaxed_decorations.h",
"source/fuzz/fuzzer_pass_add_stores.cpp",
"source/fuzz/fuzzer_pass_add_stores.h",
"source/fuzz/fuzzer_pass_add_synonyms.cpp",
"source/fuzz/fuzzer_pass_add_synonyms.h",
"source/fuzz/fuzzer_pass_add_vector_shuffle_instructions.cpp",
"source/fuzz/fuzzer_pass_add_vector_shuffle_instructions.h",
"source/fuzz/fuzzer_pass_adjust_branch_weights.cpp",
"source/fuzz/fuzzer_pass_adjust_branch_weights.h",
"source/fuzz/fuzzer_pass_adjust_function_controls.cpp",
"source/fuzz/fuzzer_pass_adjust_function_controls.h",
"source/fuzz/fuzzer_pass_adjust_loop_controls.cpp",
"source/fuzz/fuzzer_pass_adjust_loop_controls.h",
"source/fuzz/fuzzer_pass_adjust_memory_operands_masks.cpp",
"source/fuzz/fuzzer_pass_adjust_memory_operands_masks.h",
"source/fuzz/fuzzer_pass_adjust_selection_controls.cpp",
"source/fuzz/fuzzer_pass_adjust_selection_controls.h",
"source/fuzz/fuzzer_pass_apply_id_synonyms.cpp",
"source/fuzz/fuzzer_pass_apply_id_synonyms.h",
"source/fuzz/fuzzer_pass_construct_composites.cpp",
"source/fuzz/fuzzer_pass_construct_composites.h",
"source/fuzz/fuzzer_pass_copy_objects.cpp",
"source/fuzz/fuzzer_pass_copy_objects.h",
"source/fuzz/fuzzer_pass_donate_modules.cpp",
"source/fuzz/fuzzer_pass_donate_modules.h",
"source/fuzz/fuzzer_pass_duplicate_regions_with_selections.cpp",
"source/fuzz/fuzzer_pass_duplicate_regions_with_selections.h",
"source/fuzz/fuzzer_pass_expand_vector_reductions.cpp",
"source/fuzz/fuzzer_pass_expand_vector_reductions.h",
"source/fuzz/fuzzer_pass_flatten_conditional_branches.cpp",
"source/fuzz/fuzzer_pass_flatten_conditional_branches.h",
"source/fuzz/fuzzer_pass_inline_functions.cpp",
"source/fuzz/fuzzer_pass_inline_functions.h",
"source/fuzz/fuzzer_pass_interchange_signedness_of_integer_operands.cpp",
"source/fuzz/fuzzer_pass_interchange_signedness_of_integer_operands.h",
"source/fuzz/fuzzer_pass_interchange_zero_like_constants.cpp",
"source/fuzz/fuzzer_pass_interchange_zero_like_constants.h",
"source/fuzz/fuzzer_pass_invert_comparison_operators.cpp",
"source/fuzz/fuzzer_pass_invert_comparison_operators.h",
"source/fuzz/fuzzer_pass_make_vector_operations_dynamic.cpp",
"source/fuzz/fuzzer_pass_make_vector_operations_dynamic.h",
"source/fuzz/fuzzer_pass_merge_blocks.cpp",
"source/fuzz/fuzzer_pass_merge_blocks.h",
"source/fuzz/fuzzer_pass_merge_function_returns.cpp",
"source/fuzz/fuzzer_pass_merge_function_returns.h",
"source/fuzz/fuzzer_pass_mutate_pointers.cpp",
"source/fuzz/fuzzer_pass_mutate_pointers.h",
"source/fuzz/fuzzer_pass_obfuscate_constants.cpp",
"source/fuzz/fuzzer_pass_obfuscate_constants.h",
"source/fuzz/fuzzer_pass_outline_functions.cpp",
"source/fuzz/fuzzer_pass_outline_functions.h",
"source/fuzz/fuzzer_pass_permute_blocks.cpp",
"source/fuzz/fuzzer_pass_permute_blocks.h",
"source/fuzz/fuzzer_pass_permute_function_parameters.cpp",
"source/fuzz/fuzzer_pass_permute_function_parameters.h",
"source/fuzz/fuzzer_pass_permute_function_variables.cpp",
"source/fuzz/fuzzer_pass_permute_function_variables.h",
"source/fuzz/fuzzer_pass_permute_instructions.cpp",
"source/fuzz/fuzzer_pass_permute_instructions.h",
"source/fuzz/fuzzer_pass_permute_phi_operands.cpp",
"source/fuzz/fuzzer_pass_permute_phi_operands.h",
"source/fuzz/fuzzer_pass_propagate_instructions_down.cpp",
"source/fuzz/fuzzer_pass_propagate_instructions_down.h",
"source/fuzz/fuzzer_pass_propagate_instructions_up.cpp",
"source/fuzz/fuzzer_pass_propagate_instructions_up.h",
"source/fuzz/fuzzer_pass_push_ids_through_variables.cpp",
"source/fuzz/fuzzer_pass_push_ids_through_variables.h",
"source/fuzz/fuzzer_pass_replace_adds_subs_muls_with_carrying_extended.cpp",
"source/fuzz/fuzzer_pass_replace_adds_subs_muls_with_carrying_extended.h",
"source/fuzz/fuzzer_pass_replace_branches_from_dead_blocks_with_exits.cpp",
"source/fuzz/fuzzer_pass_replace_branches_from_dead_blocks_with_exits.h",
"source/fuzz/fuzzer_pass_replace_copy_memories_with_loads_stores.cpp",
"source/fuzz/fuzzer_pass_replace_copy_memories_with_loads_stores.h",
"source/fuzz/fuzzer_pass_replace_copy_objects_with_stores_loads.cpp",
"source/fuzz/fuzzer_pass_replace_copy_objects_with_stores_loads.h",
"source/fuzz/fuzzer_pass_replace_irrelevant_ids.cpp",
"source/fuzz/fuzzer_pass_replace_irrelevant_ids.h",
"source/fuzz/fuzzer_pass_replace_linear_algebra_instructions.cpp",
"source/fuzz/fuzzer_pass_replace_linear_algebra_instructions.h",
"source/fuzz/fuzzer_pass_replace_loads_stores_with_copy_memories.cpp",
"source/fuzz/fuzzer_pass_replace_loads_stores_with_copy_memories.h",
"source/fuzz/fuzzer_pass_replace_opphi_ids_from_dead_predecessors.cpp",
"source/fuzz/fuzzer_pass_replace_opphi_ids_from_dead_predecessors.h",
"source/fuzz/fuzzer_pass_replace_opselects_with_conditional_branches.cpp",
"source/fuzz/fuzzer_pass_replace_opselects_with_conditional_branches.h",
"source/fuzz/fuzzer_pass_replace_parameter_with_global.cpp",
"source/fuzz/fuzzer_pass_replace_parameter_with_global.h",
"source/fuzz/fuzzer_pass_replace_params_with_struct.cpp",
"source/fuzz/fuzzer_pass_replace_params_with_struct.h",
"source/fuzz/fuzzer_pass_split_blocks.cpp",
"source/fuzz/fuzzer_pass_split_blocks.h",
"source/fuzz/fuzzer_pass_swap_commutable_operands.cpp",
"source/fuzz/fuzzer_pass_swap_commutable_operands.h",
"source/fuzz/fuzzer_pass_swap_conditional_branch_operands.cpp",
"source/fuzz/fuzzer_pass_swap_conditional_branch_operands.h",
"source/fuzz/fuzzer_pass_swap_functions.cpp",
"source/fuzz/fuzzer_pass_swap_functions.h",
"source/fuzz/fuzzer_pass_toggle_access_chain_instruction.cpp",
"source/fuzz/fuzzer_pass_toggle_access_chain_instruction.h",
"source/fuzz/fuzzer_pass_wrap_regions_in_selections.cpp",
"source/fuzz/fuzzer_pass_wrap_regions_in_selections.h",
"source/fuzz/fuzzer_pass_wrap_vector_synonym.cpp",
"source/fuzz/fuzzer_pass_wrap_vector_synonym.h",
"source/fuzz/fuzzer_util.cpp",
"source/fuzz/fuzzer_util.h",
"source/fuzz/id_use_descriptor.cpp",
"source/fuzz/id_use_descriptor.h",
"source/fuzz/instruction_descriptor.cpp",
"source/fuzz/instruction_descriptor.h",
"source/fuzz/instruction_message.cpp",
"source/fuzz/instruction_message.h",
"source/fuzz/overflow_id_source.cpp",
"source/fuzz/overflow_id_source.h",
"source/fuzz/pass_management/repeated_pass_instances.h",
"source/fuzz/pass_management/repeated_pass_manager.cpp",
"source/fuzz/pass_management/repeated_pass_manager.h",
"source/fuzz/pass_management/repeated_pass_manager_looped_with_recommendations.cpp",
"source/fuzz/pass_management/repeated_pass_manager_looped_with_recommendations.h",
"source/fuzz/pass_management/repeated_pass_manager_random_with_recommendations.cpp",
"source/fuzz/pass_management/repeated_pass_manager_random_with_recommendations.h",
"source/fuzz/pass_management/repeated_pass_manager_simple.cpp",
"source/fuzz/pass_management/repeated_pass_manager_simple.h",
"source/fuzz/pass_management/repeated_pass_recommender.cpp",
"source/fuzz/pass_management/repeated_pass_recommender.h",
"source/fuzz/pass_management/repeated_pass_recommender_standard.cpp",
"source/fuzz/pass_management/repeated_pass_recommender_standard.h",
"source/fuzz/protobufs/spirvfuzz_protobufs.h",
"source/fuzz/pseudo_random_generator.cpp",
"source/fuzz/pseudo_random_generator.h",
"source/fuzz/random_generator.cpp",
"source/fuzz/random_generator.h",
"source/fuzz/replayer.cpp",
"source/fuzz/replayer.h",
"source/fuzz/shrinker.cpp",
"source/fuzz/shrinker.h",
"source/fuzz/transformation.cpp",
"source/fuzz/transformation.h",
"source/fuzz/transformation_access_chain.cpp",
"source/fuzz/transformation_access_chain.h",
"source/fuzz/transformation_add_bit_instruction_synonym.cpp",
"source/fuzz/transformation_add_bit_instruction_synonym.h",
"source/fuzz/transformation_add_constant_boolean.cpp",
"source/fuzz/transformation_add_constant_boolean.h",
"source/fuzz/transformation_add_constant_composite.cpp",
"source/fuzz/transformation_add_constant_composite.h",
"source/fuzz/transformation_add_constant_null.cpp",
"source/fuzz/transformation_add_constant_null.h",
"source/fuzz/transformation_add_constant_scalar.cpp",
"source/fuzz/transformation_add_constant_scalar.h",
"source/fuzz/transformation_add_copy_memory.cpp",
"source/fuzz/transformation_add_copy_memory.h",
"source/fuzz/transformation_add_dead_block.cpp",
"source/fuzz/transformation_add_dead_block.h",
"source/fuzz/transformation_add_dead_break.cpp",
"source/fuzz/transformation_add_dead_break.h",
"source/fuzz/transformation_add_dead_continue.cpp",
"source/fuzz/transformation_add_dead_continue.h",
"source/fuzz/transformation_add_early_terminator_wrapper.cpp",
"source/fuzz/transformation_add_early_terminator_wrapper.h",
"source/fuzz/transformation_add_function.cpp",
"source/fuzz/transformation_add_function.h",
"source/fuzz/transformation_add_global_undef.cpp",
"source/fuzz/transformation_add_global_undef.h",
"source/fuzz/transformation_add_global_variable.cpp",
"source/fuzz/transformation_add_global_variable.h",
"source/fuzz/transformation_add_image_sample_unused_components.cpp",
"source/fuzz/transformation_add_image_sample_unused_components.h",
"source/fuzz/transformation_add_local_variable.cpp",
"source/fuzz/transformation_add_local_variable.h",
"source/fuzz/transformation_add_loop_preheader.cpp",
"source/fuzz/transformation_add_loop_preheader.h",
"source/fuzz/transformation_add_loop_to_create_int_constant_synonym.cpp",
"source/fuzz/transformation_add_loop_to_create_int_constant_synonym.h",
"source/fuzz/transformation_add_no_contraction_decoration.cpp",
"source/fuzz/transformation_add_no_contraction_decoration.h",
"source/fuzz/transformation_add_opphi_synonym.cpp",
"source/fuzz/transformation_add_opphi_synonym.h",
"source/fuzz/transformation_add_parameter.cpp",
"source/fuzz/transformation_add_parameter.h",
"source/fuzz/transformation_add_relaxed_decoration.cpp",
"source/fuzz/transformation_add_relaxed_decoration.h",
"source/fuzz/transformation_add_spec_constant_op.cpp",
"source/fuzz/transformation_add_spec_constant_op.h",
"source/fuzz/transformation_add_synonym.cpp",
"source/fuzz/transformation_add_synonym.h",
"source/fuzz/transformation_add_type_array.cpp",
"source/fuzz/transformation_add_type_array.h",
"source/fuzz/transformation_add_type_boolean.cpp",
"source/fuzz/transformation_add_type_boolean.h",
"source/fuzz/transformation_add_type_float.cpp",
"source/fuzz/transformation_add_type_float.h",
"source/fuzz/transformation_add_type_function.cpp",
"source/fuzz/transformation_add_type_function.h",
"source/fuzz/transformation_add_type_int.cpp",
"source/fuzz/transformation_add_type_int.h",
"source/fuzz/transformation_add_type_matrix.cpp",
"source/fuzz/transformation_add_type_matrix.h",
"source/fuzz/transformation_add_type_pointer.cpp",
"source/fuzz/transformation_add_type_pointer.h",
"source/fuzz/transformation_add_type_struct.cpp",
"source/fuzz/transformation_add_type_struct.h",
"source/fuzz/transformation_add_type_vector.cpp",
"source/fuzz/transformation_add_type_vector.h",
"source/fuzz/transformation_adjust_branch_weights.cpp",
"source/fuzz/transformation_adjust_branch_weights.h",
"source/fuzz/transformation_composite_construct.cpp",
"source/fuzz/transformation_composite_construct.h",
"source/fuzz/transformation_composite_extract.cpp",
"source/fuzz/transformation_composite_extract.h",
"source/fuzz/transformation_composite_insert.cpp",
"source/fuzz/transformation_composite_insert.h",
"source/fuzz/transformation_compute_data_synonym_fact_closure.cpp",
"source/fuzz/transformation_compute_data_synonym_fact_closure.h",
"source/fuzz/transformation_context.cpp",
"source/fuzz/transformation_context.h",
"source/fuzz/transformation_duplicate_region_with_selection.cpp",
"source/fuzz/transformation_duplicate_region_with_selection.h",
"source/fuzz/transformation_equation_instruction.cpp",
"source/fuzz/transformation_equation_instruction.h",
"source/fuzz/transformation_expand_vector_reduction.cpp",
"source/fuzz/transformation_expand_vector_reduction.h",
"source/fuzz/transformation_flatten_conditional_branch.cpp",
"source/fuzz/transformation_flatten_conditional_branch.h",
"source/fuzz/transformation_function_call.cpp",
"source/fuzz/transformation_function_call.h",
"source/fuzz/transformation_inline_function.cpp",
"source/fuzz/transformation_inline_function.h",
"source/fuzz/transformation_invert_comparison_operator.cpp",
"source/fuzz/transformation_invert_comparison_operator.h",
"source/fuzz/transformation_load.cpp",
"source/fuzz/transformation_load.h",
"source/fuzz/transformation_make_vector_operation_dynamic.cpp",
"source/fuzz/transformation_make_vector_operation_dynamic.h",
"source/fuzz/transformation_merge_blocks.cpp",
"source/fuzz/transformation_merge_blocks.h",
"source/fuzz/transformation_merge_function_returns.cpp",
"source/fuzz/transformation_merge_function_returns.h",
"source/fuzz/transformation_move_block_down.cpp",
"source/fuzz/transformation_move_block_down.h",
"source/fuzz/transformation_move_instruction_down.cpp",
"source/fuzz/transformation_move_instruction_down.h",
"source/fuzz/transformation_mutate_pointer.cpp",
"source/fuzz/transformation_mutate_pointer.h",
"source/fuzz/transformation_outline_function.cpp",
"source/fuzz/transformation_outline_function.h",
"source/fuzz/transformation_permute_function_parameters.cpp",
"source/fuzz/transformation_permute_function_parameters.h",
"source/fuzz/transformation_permute_phi_operands.cpp",
"source/fuzz/transformation_permute_phi_operands.h",
"source/fuzz/transformation_propagate_instruction_down.cpp",
"source/fuzz/transformation_propagate_instruction_down.h",
"source/fuzz/transformation_propagate_instruction_up.cpp",
"source/fuzz/transformation_propagate_instruction_up.h",
"source/fuzz/transformation_push_id_through_variable.cpp",
"source/fuzz/transformation_push_id_through_variable.h",
"source/fuzz/transformation_record_synonymous_constants.cpp",
"source/fuzz/transformation_record_synonymous_constants.h",
"source/fuzz/transformation_replace_add_sub_mul_with_carrying_extended.cpp",
"source/fuzz/transformation_replace_add_sub_mul_with_carrying_extended.h",
"source/fuzz/transformation_replace_boolean_constant_with_constant_binary.cpp",
"source/fuzz/transformation_replace_boolean_constant_with_constant_binary.h",
"source/fuzz/transformation_replace_branch_from_dead_block_with_exit.cpp",
"source/fuzz/transformation_replace_branch_from_dead_block_with_exit.h",
"source/fuzz/transformation_replace_constant_with_uniform.cpp",
"source/fuzz/transformation_replace_constant_with_uniform.h",
"source/fuzz/transformation_replace_copy_memory_with_load_store.cpp",
"source/fuzz/transformation_replace_copy_memory_with_load_store.h",
"source/fuzz/transformation_replace_copy_object_with_store_load.cpp",
"source/fuzz/transformation_replace_copy_object_with_store_load.h",
"source/fuzz/transformation_replace_id_with_synonym.cpp",
"source/fuzz/transformation_replace_id_with_synonym.h",
"source/fuzz/transformation_replace_irrelevant_id.cpp",
"source/fuzz/transformation_replace_irrelevant_id.h",
"source/fuzz/transformation_replace_linear_algebra_instruction.cpp",
"source/fuzz/transformation_replace_linear_algebra_instruction.h",
"source/fuzz/transformation_replace_load_store_with_copy_memory.cpp",
"source/fuzz/transformation_replace_load_store_with_copy_memory.h",
"source/fuzz/transformation_replace_opphi_id_from_dead_predecessor.cpp",
"source/fuzz/transformation_replace_opphi_id_from_dead_predecessor.h",
"source/fuzz/transformation_replace_opselect_with_conditional_branch.cpp",
"source/fuzz/transformation_replace_opselect_with_conditional_branch.h",
"source/fuzz/transformation_replace_parameter_with_global.cpp",
"source/fuzz/transformation_replace_parameter_with_global.h",
"source/fuzz/transformation_replace_params_with_struct.cpp",
"source/fuzz/transformation_replace_params_with_struct.h",
"source/fuzz/transformation_set_function_control.cpp",
"source/fuzz/transformation_set_function_control.h",
"source/fuzz/transformation_set_loop_control.cpp",
"source/fuzz/transformation_set_loop_control.h",
"source/fuzz/transformation_set_memory_operands_mask.cpp",
"source/fuzz/transformation_set_memory_operands_mask.h",
"source/fuzz/transformation_set_selection_control.cpp",
"source/fuzz/transformation_set_selection_control.h",
"source/fuzz/transformation_split_block.cpp",
"source/fuzz/transformation_split_block.h",
"source/fuzz/transformation_store.cpp",
"source/fuzz/transformation_store.h",
"source/fuzz/transformation_swap_commutable_operands.cpp",
"source/fuzz/transformation_swap_commutable_operands.h",
"source/fuzz/transformation_swap_conditional_branch_operands.cpp",
"source/fuzz/transformation_swap_conditional_branch_operands.h",
"source/fuzz/transformation_swap_function_variables.cpp",
"source/fuzz/transformation_swap_function_variables.h",
"source/fuzz/transformation_swap_two_functions.cpp",
"source/fuzz/transformation_swap_two_functions.h",
"source/fuzz/transformation_toggle_access_chain_instruction.cpp",
"source/fuzz/transformation_toggle_access_chain_instruction.h",
"source/fuzz/transformation_vector_shuffle.cpp",
"source/fuzz/transformation_vector_shuffle.h",
"source/fuzz/transformation_wrap_early_terminator_in_function.cpp",
"source/fuzz/transformation_wrap_early_terminator_in_function.h",
"source/fuzz/transformation_wrap_region_in_selection.cpp",
"source/fuzz/transformation_wrap_region_in_selection.h",
"source/fuzz/transformation_wrap_vector_synonym.cpp",
"source/fuzz/transformation_wrap_vector_synonym.h",
"source/fuzz/uniform_buffer_element_descriptor.cpp",
"source/fuzz/uniform_buffer_element_descriptor.h",
]
deps = [
":spvtools",
":spvtools_fuzz_proto",
":spvtools_opt",
":spvtools_reduce",
"//third_party/protobuf:protobuf_full",
]
public_deps = [ ":spvtools_headers" ]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
configs += [ ":spvtools_internal_config" ]
}
}
group("SPIRV-Tools") {
public_deps = [
":spvtools",
@@ -905,6 +1365,7 @@ if (build_with_chromium) {
":spvtools",
":spvtools_language_header_cldebuginfo100",
":spvtools_language_header_debuginfo",
":spvtools_language_header_vkdebuginfo100",
":spvtools_val",
"//testing/gmock",
"//testing/gtest",
@@ -1012,8 +1473,31 @@ executable("spirv-link") {
configs += [ ":spvtools_internal_config" ]
}
if (!is_ios && !spirv_is_winuwp && build_with_chromium) {
# iOS and UWP do not allow std::system calls which spirv-fuzz
# requires. Additionally, spirv-fuzz is only built when in a
# Chromium checkout due to its dependency on protobuf.
executable("spirv-fuzz") {
sources = [ "tools/fuzz/fuzz.cpp" ]
deps = [
":spvtools",
":spvtools_fuzz",
":spvtools_opt",
":spvtools_reduce",
":spvtools_software_version",
":spvtools_util_cli_consumer",
":spvtools_val",
"//third_party/protobuf:protobuf_full",
]
configs += [ ":spvtools_internal_config" ]
}
}
if (!is_ios && !spirv_is_winuwp) {
# iOS and UWP do not allow std::system calls which spirv-reduce requires
# iOS and UWP do not allow std::system calls which spirv-reduce
# requires.
executable("spirv-reduce") {
sources = [ "tools/reduce/reduce.cpp" ]
deps = [
@@ -1037,6 +1521,9 @@ group("all_spirv_tools") {
":spirv-opt",
":spirv-val",
]
if (!is_ios && !spirv_is_winuwp && build_with_chromium) {
deps += [ ":spirv-fuzz" ]
}
if (!is_ios && !spirv_is_winuwp) {
deps += [ ":spirv-reduce" ]
}
+39 -2
View File
@@ -1,7 +1,44 @@
Revision history for SPIRV-Tools
v2021.3-dev 2021-06-22
- Start v2021.3-dev
v2021.4 2021-11-11
- General
- Add a WebAssembly build (#3752)
- Make cxx exceptions controllable (#4591)
- Validator
- Improve decoration validation (#4490)
- Optimizer
- Add spirv-opt pass to replace descriptor accesses based on variable indices (#4574)
- Do not fold snegate feeding sdiv (#4600)
- Handle overflowing id in merge return (#4606)
- Fuzzer
- Add libFuzzer target for spirv-fuzz (#4434)
- Linter
v2021.3 2021-08-24
- General
- Initial support for SPV_KHR_integer_dot_product (#4327)
- Add non-semantic vulkan extended instruction set (#4362)
- Add common enum for debug info instructions from either opencl or vulkan (#4377)
- Validator
- Add validation for SPV_EXT_shader_atomic_float16_add (#4325)
- Disallow loading a runtime-sized array (#4473)
- spirv-val: Validate vulkan debug info similarly to opencl debug info (#4466)
- Optimizer
- spirv-opt: support SPV_EXT_shader_image_int64 (#4379)
- spirv-opt: Add dataflow analysis framework (#4402)
- Add control dependence analysis to opt (#4380)
- Add spirv-opt convert-to-sampled-image pass (#4340)
- spirv-opt: Add handling of vulkan debug info to DebugInfoManager (#4423)
- Fuzz
- spirv-fuzz: support AtomicLoad (#4330)
- spirv-fuzz: Support AtomicStore (#4440)
- spirv-fuzz: TransformationWrapVectorSynonym that rewrites scalar operations using vectors (#4376)
- spirv-fuzz: Add minimal SPIR-V example to test shaders (#4415)
- spirv-fuzz: support building using gn (#4365)
- Linter
- Add new target for spirv-lint (#4446)
- spirv-lint: add basic CLI argument handling (#4478)
- Add divergence analysis to linter (#4465)
v2021.2 2021-06-18
- General
+20 -7
View File
@@ -44,6 +44,7 @@ include(GNUInstallDirs)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CXX_STANDARD 11)
option(ENABLE_RTTI "Enables RTTI" OFF)
option(SPIRV_ALLOW_TIMERS "Allow timers via clock_gettime on supported platforms" ON)
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
@@ -96,6 +97,10 @@ endif(SPIRV_BUILD_COMPRESSION)
option(SPIRV_BUILD_FUZZER "Build spirv-fuzz" OFF)
set(SPIRV_LIB_FUZZING_ENGINE_LINK_OPTIONS "" CACHE STRING "Used by OSS-Fuzz to control, via link options, which fuzzing engine should be used")
option(SPIRV_BUILD_LIBFUZZER_TARGETS "Build libFuzzer targets" OFF)
# Filament specific changes
# option(SPIRV_WERROR "Enable error on warning" ON)
set(SPIRV_WERROR OFF)
@@ -175,6 +180,7 @@ endif()
# Note this target provides no API stability guarantees.
#
# Ideally, all of these will go away - see https://github.com/KhronosGroup/SPIRV-Tools/issues/3909.
option(ENABLE_EXCEPTIONS_ON_MSVC "Build SPIRV-TOOLS with c++ exceptions enabled in MSVC" ON)
option(SPIRV_TOOLS_BUILD_STATIC "Build ${SPIRV_TOOLS}-static target. ${SPIRV_TOOLS} will alias to ${SPIRV_TOOLS}-static or ${SPIRV_TOOLS}-shared based on BUILD_SHARED_LIBS" ON)
if(SPIRV_TOOLS_BUILD_STATIC)
set(SPIRV_TOOLS_FULL_VISIBILITY ${SPIRV_TOOLS}-static)
@@ -194,11 +200,14 @@ function(spvtools_default_compile_options TARGET)
target_compile_options(${TARGET} PRIVATE ${SPIRV_WARNINGS})
if (${COMPILER_IS_LIKE_GNU})
target_compile_options(${TARGET} PRIVATE
-std=c++11 -fno-exceptions -fno-rtti)
target_compile_options(${TARGET} PRIVATE -std=c++11 -fno-exceptions)
target_compile_options(${TARGET} PRIVATE
-Wall -Wextra -Wno-long-long -Wshadow -Wundef -Wconversion
-Wno-sign-conversion)
if(NOT ENABLE_RTTI)
add_compile_options(-fno-rtti)
endif()
# For good call stacks in profiles, keep the frame pointers.
if(NOT "${SPIRV_PERF}" STREQUAL "")
target_compile_options(${TARGET} PRIVATE -fno-omit-frame-pointer)
@@ -223,7 +232,9 @@ function(spvtools_default_compile_options TARGET)
if (MSVC)
# Specify /EHs for exception handling. This makes using SPIRV-Tools as
# dependencies in other projects easier.
target_compile_options(${TARGET} PRIVATE /EHs)
if(ENABLE_EXCEPTIONS_ON_MSVC)
target_compile_options(${TARGET} PRIVATE /EHs)
endif()
endif()
# For MinGW cross compile, statically link to the C++ runtime.
@@ -248,11 +259,13 @@ if(NOT COMMAND find_host_program)
endif()
# Tests require Python3
# Filament specific changes
if(CMAKE_VERSION VERSION_LESS "3.12" OR ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
find_host_package(PythonInterp 3 REQUIRED)
else()
find_package(Python3 COMPONENTS Interpreter)
endif()
# End Filament specific changes
# Check for symbol exports on Linux.
# At the moment, this check will fail on the OSX build machines for the Android NDK.
@@ -296,10 +309,10 @@ endif()
# Defaults to OFF if the user didn't set it.
# Filament specific changes
option(SPIRV_SKIP_EXECUTABLES
"Skip building the executable and tests along with the library"
option(SPIRV_SKIP_EXECUTABLES
"Skip building the executable and tests along with the library"
${SPIRV_SKIP_EXECUTABLES_OPTION})
option(SPIRV_SKIP_TESTS
option(SPIRV_SKIP_TESTS
"Skip building tests along with the library" ${SPIRV_SKIP_TESTS_OPTION})
# End Filament specific changes
if ("${SPIRV_SKIP_EXECUTABLES}")
@@ -310,7 +323,7 @@ endif()
# Turn off if they take too long.
option(SPIRV_CHECK_CONTEXT "In a debug build, check if the IR context is in a valid state." ON)
if (${SPIRV_CHECK_CONTEXT})
add_definitions(-DSPIRV_CHECK_CONTEXT)
add_compile_options($<$<CONFIG:Debug>:-DSPIRV_CHECK_CONTEXT>)
endif()
# Precompiled header macro. Parameters are source file list and filename for pch cpp file.
-7
View File
@@ -98,13 +98,6 @@ should pay particular attention to:
scenarios? The respective SPIR-V dialects are slightly different.
* Changes are made to a container while iterating through it. You have to be
careful that iterators are not invalidated or that elements are not skipped.
* C++11 and VS2013. We generally assume that we have a C++11 compliant
compiler. However, on Windows, we still support Visual Studio 2013, which is
not fully C++11 compliant. See
[here](https://msdn.microsoft.com/en-us/library/hh567368.aspx). In
particular, note that it does not provide default move-constructors or
move-assignments for classes. In general, r-value references do not work the
way you might assume they do.
* For SPIR-V transforms: The module is changed, but the analyses are not
updated. For example, a new instruction is added, but the def-use manager is
not updated. Later on, it is possible that the def-use manager will be used,
+4 -4
View File
@@ -3,10 +3,10 @@ use_relative_paths = True
vars = {
'github': 'https://github.com',
'effcee_revision': '2ec8f8738118cc483b67c04a759fee53496c5659',
'googletest_revision': 'b7d472f1225c5a64943821d8483fecb469d3f382',
're2_revision': 'f8e389f3acdc2517562924239e2a188037393683',
'spirv_headers_revision': 'ddf3230c14c71e81fc0eae9b781cc4bcc2d1f0f5',
'effcee_revision': 'ddf5e2bb92957dc8a12c5392f8495333d6844133',
'googletest_revision': 'bf0701daa9f5b30e5882e2f8f9a5280bcba87e77',
're2_revision': '4244cd1cb492fa1d10986ec67f862964c073f844',
'spirv_headers_revision': '814e728b30ddd0f4509233099a3ad96fd4318c07',
}
deps = {
+30
View File
@@ -0,0 +1,30 @@
When updating spirv-tools to a new version, make sure to preserve all the changes marked with
the following in `CMakeLists.txt` and `source/CMakeLists.txt`:
`# Filament specific changes`
You can easily apply these changes by running the following command at Filament's root:
```
git apply third_party/spirv-tools/filament-specific-changes.patch
```
The following procedure can be used to update spirv-tools. Note that there is a secondary repository
that needs to be downloaded (spirv-headers).
```
curl -L https://github.com/KhronosGroup/spirv-tools/archive/master.zip > master.zip
unzip master.zip
rsync -r SPIRV-Tools-master/ spirv-tools/ --delete
rm -rf SPIRV-Tools-master master.zip
curl -L https://github.com/KhronosGroup/spirv-headers/archive/master.zip > master.zip
unzip master.zip
mv SPIRV-Headers-master/ spirv-tools/external/spirv-headers
rm master.zip
git add spirv-tools
```
Edit the .gitignore so it doesn't prevent `spirv-headers` from being committed.
Finally, remember to bring back the Filament-specific changes in CMakeLists.
+108 -59
View File
@@ -21,7 +21,6 @@ headers, and XML registry.
## Downloads
[![Build status](https://ci.appveyor.com/api/projects/status/gpue87cesrx3pi0d/branch/master?svg=true)](https://ci.appveyor.com/project/Khronoswebmaster/spirv-tools/branch/master)
<img alt="Linux" src="kokoro/img/linux.png" width="20px" height="20px" hspace="2px"/>[![Linux Build Status](https://storage.googleapis.com/spirv-tools/badges/build_status_linux_clang_release.svg)](https://storage.googleapis.com/spirv-tools/badges/build_link_linux_clang_release.html)
<img alt="MacOS" src="kokoro/img/macos.png" width="20px" height="20px" hspace="2px"/>[![MacOS Build Status](https://storage.googleapis.com/spirv-tools/badges/build_status_macos_clang_release.svg)](https://storage.googleapis.com/spirv-tools/badges/build_link_macos_clang_release.html)
<img alt="Windows" src="kokoro/img/windows.png" width="20px" height="20px" hspace="2px"/>[![Windows Build Status](https://storage.googleapis.com/spirv-tools/badges/build_status_windows_release.svg)](https://storage.googleapis.com/spirv-tools/badges/build_link_windows_vs2017_release.html)
@@ -45,6 +44,20 @@ following versions are ordered from oldest to newest:
Use the `--version` option on each command line tool to see the software
version. An API call reports the software version as a C-style string.
## Releases
Some versions of SPIRV-Tools are tagged as stable releases (see
[tags](https://github.com/KhronosGroup/SPIRV-Tools/tags) on github).
These versions undergo extra testing.
Releases are not directly related to releases (or versions) of
[SPIRV-Headers][spirv-headers].
Releases of SPIRV-Tools are tested against the version of SPIRV-Headers listed
in the [DEPS](DEPS) file.
The release generally uses the most recent compatible version of SPIRV-Headers
available at the time of release.
No version of SPIRV-Headers other than the one listed in the DEPS file is
guaranteed to work with the SPIRV-Tools release.
## Supported features
### Assembler, binary parser, and disassembler
@@ -242,6 +255,34 @@ Contributions via merge request are welcome. Changes should:
We intend to maintain a linear history on the GitHub `master` branch.
### Getting the source
Example of getting sources, assuming SPIRV-Tools is configured as a standalone project:
git clone https://github.com/KhronosGroup/SPIRV-Tools.git spirv-tools
cd spirv-tools
# Check out sources for dependencies, at versions known to work together,
# as listed in the DEPS file.
python3 utils/git-sync-deps
For some kinds of development, you may need the latest sources from the third-party projects:
git clone https://github.com/KhronosGroup/SPIRV-Headers.git spirv-tools/external/spirv-headers
git clone https://github.com/google/googletest.git spirv-tools/external/googletest
git clone https://github.com/google/effcee.git spirv-tools/external/effcee
git clone https://github.com/google/re2.git spirv-tools/external/re2
#### Dependency on Effcee
Some tests depend on the [Effcee][effcee] library for stateful matching.
Effcee itself depends on [RE2][re2].
* If SPIRV-Tools is configured as part of a larger project that already uses
Effcee, then that project should include Effcee before SPIRV-Tools.
* Otherwise, SPIRV-Tools expects Effcee sources to appear in `external/effcee`
and RE2 sources to appear in `external/re2`.
### Source code organization
* `example`: demo code of using SPIRV-Tools APIs
@@ -260,14 +301,6 @@ We intend to maintain a linear history on the GitHub `master` branch.
* `test/`: Tests, using the [googletest][googletest] framework
* `tools/`: Command line executables
Example of getting sources, assuming SPIRV-Tools is configured as a standalone project:
git clone https://github.com/KhronosGroup/SPIRV-Tools.git spirv-tools
git clone https://github.com/KhronosGroup/SPIRV-Headers.git spirv-tools/external/spirv-headers
git clone https://github.com/google/googletest.git spirv-tools/external/googletest
git clone https://github.com/google/effcee.git spirv-tools/external/effcee
git clone https://github.com/google/re2.git spirv-tools/external/re2
### Tests
The project contains a number of tests, used to drive development
@@ -281,46 +314,12 @@ tests:
`googletest` source into the `<spirv-dir>/external/googletest` directory before
configuring and building the project.
*Note*: You must use a version of googletest that includes
[a fix][googletest-pull-612] for [googletest issue 610][googletest-issue-610].
The fix is included on the googletest master branch any time after 2015-11-10.
In particular, googletest must be newer than version 1.7.0.
### Dependency on Effcee
Some tests depend on the [Effcee][effcee] library for stateful matching.
Effcee itself depends on [RE2][re2].
* If SPIRV-Tools is configured as part of a larger project that already uses
Effcee, then that project should include Effcee before SPIRV-Tools.
* Otherwise, SPIRV-Tools expects Effcee sources to appear in `external/effcee`
and RE2 sources to appear in `external/re2`.
## Build
Instead of building manually, you can also download the binaries for your
platform directly from the [master-tot release][master-tot-release] on GitHub.
Those binaries are automatically uploaded by the buildbots after successful
testing and they always reflect the current top of the tree of the master
branch.
*Note*: Prebuilt binaries are available from the [downloads](docs/downloads.md) page.
In order to build the code, you first need to sync the external repositories
that it depends on. Assume that `<spirv-dir>` is the root directory of the
checked out code:
```sh
cd <spirv-dir>
git clone https://github.com/KhronosGroup/SPIRV-Headers.git external/spirv-headers
git clone https://github.com/google/effcee.git external/effcee
git clone https://github.com/google/re2.git external/re2
git clone https://github.com/google/googletest.git external/googletest # optional
```
*Note*:
The script `utils/git-sync-deps` can be used to checkout and/or update the
contents of the repos under `external/` instead of manually maintaining them.
First [get the sources](#getting-the-source).
Then build using CMake, Bazel, Android ndk-build, or the Emscripten SDK.
### Build using CMake
You can build the project using [CMake][cmake]:
@@ -348,7 +347,7 @@ option, like so:
```sh
# In <spirv-dir> (the SPIRV-Tools repo root):
git clone --depth=1 --branch v3.13.0 https://github.com/protocolbuffers/protobuf external/protobuf
git clone --depth=1 --branch v3.13.0.1 https://github.com/protocolbuffers/protobuf external/protobuf
# In your build directory:
cmake [-G <platform-generator>] <spirv-dir> -DSPIRV_BUILD_FUZZER=ON
@@ -365,6 +364,30 @@ You can also use [Bazel](https://bazel.build/) to build the project.
cd <spirv-dir>
bazel build :all
```
### Build a node.js package using Emscripten
The SPIRV-Tools core library can be built to a WebAssembly [node.js](https://nodejs.org)
module. The resulting `SpirvTools` WebAssembly module only exports methods to
assemble and disassemble SPIR-V modules.
First, make sure you have the [Emscripten SDK](https://emscripten.org).
Then:
```sh
cd <spirv-dir>
./source/wasm/build.sh
```
The resulting node package, with JavaScript and TypeScript bindings, is
written to `<spirv-dir>/out/web`.
Note: This builds the package locally. It does *not* publish it to [npm](https://npmjs.org).
To test the result:
```sh
node ./test/wasm/test.js
```
### Tools you'll need
@@ -378,15 +401,17 @@ suite.
- [Bazel](https://bazel.build/) (optional): if building the source with Bazel,
you need to install Bazel Version 0.29.1 on your machine. Other versions may
also work, but are not verified.
- [Emscripten SDK](https://emscripten.org) (optional): if building the
WebAssembly module.
SPIRV-Tools is regularly tested with the following compilers:
On Linux
- GCC version 4.8.5
- Clang version 3.8
- GCC version 9.3
- Clang version 10.0
On MacOS
- AppleClang 10.0
- AppleClang 11.0
On Windows
- Visual Studio 2015
@@ -421,7 +446,7 @@ via setting `SPIRV_TOOLS_EXTRA_DEFINITIONS`. For example, by setting it to
`/D_ITERATOR_DEBUG_LEVEL=0` on Windows, you can disable checked iterators and
iterator debugging.
### Android
### Android ndk-build
SPIR-V Tools supports building static libraries `libSPIRV-Tools.a` and
`libSPIRV-Tools-opt.a` for Android:
@@ -442,11 +467,12 @@ $ANDROID_NDK/ndk-build -C ../android_test \
```
### Updating DEPS
Occasionally the entries in DEPS will need to be updated. This is done on demand
when there is a request to do this, often due to downstream breakages. There is
a script `utils/roll_deps.sh` provided, which will generate a patch with the
updated DEPS values. This will still need to be tested in your checkout to
confirm that there are no integration issues that need to be resolved.
Occasionally the entries in [DEPS](DEPS) will need to be updated. This is done on
demand when there is a request to do this, often due to downstream breakages.
To update `DEPS`, run `utils/roll_deps.sh` and confirm that tests pass.
The script requires Chromium's
[`depot_tools`](https://chromium.googlesource.com/chromium/tools/depot_tools).
## Library
@@ -643,8 +669,32 @@ This is experimental.
### Tests
Tests are only built when googletest is found. Use `ctest` to run all the
tests.
Tests are only built when googletest is found.
#### Running test with CMake
Use `ctest -j <num threads>` to run all the tests. To run tests using all threads:
```shell
ctest -j$(nproc)
```
To run a single test target, use `ctest [-j <N>] -R <test regex>`. For example,
you can run all `opt` tests with:
```shell
ctest -R 'spirv-tools-test_opt'
```
#### Running test with Bazel
Use `bazel test :all` to run all tests. This will run tests in parallel by default.
To run a single test target, specify `:my_test_target` instead of `:all`. Test target
names get printed when you run `bazel test :all`. For example, you can run
`opt_def_use_test` with:
```shell
bazel test :opt_def_use_test
```
## Future Work
<a name="future"></a>
@@ -705,4 +755,3 @@ limitations under the License.
[CMake]: https://cmake.org/
[cpp-style-guide]: https://google.github.io/styleguide/cppguide.html
[clang-sanitizers]: http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
[master-tot-release]: https://github.com/KhronosGroup/SPIRV-Tools/releases/tag/master-tot
+18
View File
@@ -41,6 +41,7 @@ TEST_COPTS = COMMON_COPTS + select({
DEBUGINFO_GRAMMAR_JSON_FILE = "@spirv_headers//:spirv_ext_inst_debuginfo_grammar_unified1"
CLDEBUGINFO100_GRAMMAR_JSON_FILE = "@spirv_headers//:spirv_ext_inst_opencl_debuginfo_100_grammar_unified1"
SHDEBUGINFO100_GRAMMAR_JSON_FILE = "@spirv_headers//:spirv_ext_inst_nonsemantic_shader_debuginfo_100_grammar_unified1"
def generate_core_tables(version = None):
if not version:
@@ -201,6 +202,23 @@ def base_test(name, srcs, deps = []):
] + deps,
)
def lint_test(name, srcs, deps = []):
if name[-5:] != "_test":
name = name + "_test"
native.cc_test(
name = "lint_" + name,
srcs = srcs,
compatible_with = [],
copts = TEST_COPTS,
size = "large",
deps = [
":spirv_tools_lint",
"@com_google_googletest//:gtest_main",
"@com_google_googletest//:gtest",
"@com_google_effcee//:effcee",
] + deps,
)
def link_test(name, srcs, deps = []):
if name[-5:] != "_test":
name = name + "_test"
+10
View File
@@ -0,0 +1,10 @@
version: "3"
services:
build:
image: emscripten/emsdk:2.0.2
environment:
GITHUB_RUN_NUMBER: ${GITHUB_RUN_NUMBER:-}
working_dir: /app
command: ./source/wasm/build.sh
volumes:
- ./:/app
+17 -3
View File
@@ -1,14 +1,28 @@
# Downloads
Download the latest builds.
## Release
## Latest builds
Download the latest builds of the [master](https://github.com/KhronosGroup/SPIRV-Tools/tree/master) branch.
### Release build
| Windows | Linux | MacOS |
| --- | --- | --- |
| [MSVC 2017](https://storage.googleapis.com/spirv-tools/badges/build_link_windows_vs2017_release.html) | [clang](https://storage.googleapis.com/spirv-tools/badges/build_link_linux_clang_release.html) | [clang](https://storage.googleapis.com/spirv-tools/badges/build_link_macos_clang_release.html) |
| | [gcc](https://storage.googleapis.com/spirv-tools/badges/build_link_linux_gcc_release.html) | |
## Debug
### Debug build
| Windows | Linux | MacOS |
| --- | --- | --- |
| [MSVC 2017](https://storage.googleapis.com/spirv-tools/badges/build_link_windows_vs2017_debug.html) | [clang](https://storage.googleapis.com/spirv-tools/badges/build_link_linux_clang_debug.html) | [clang](https://storage.googleapis.com/spirv-tools/badges/build_link_macos_clang_debug.html) |
| | [gcc](https://storage.googleapis.com/spirv-tools/badges/build_link_linux_gcc_debug.html) | |
## Vulkan SDK
SPIRV-Tools is published as part of the [LunarG Vulkan SDK](https://www.lunarg.com/vulkan-sdk/).
The Vulkan SDK is updated approximately every six weeks.
## Android NDK
SPIRV-Tools host executables, and library sources are published as
part of the [Android NDK](https://developer.android.com/ndk/downloads).
@@ -0,0 +1,37 @@
name: Presubmit
on: [push, pull_request]
jobs:
build:
name: Build ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Install Ubuntu packages
if: matrix.os == 'ubuntu-latest'
run: sudo apt install -y dos2unix
- name: Install macOS packages
if: matrix.os == 'macos-latest'
run: brew install dos2unix
- name: Build
run: |
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=install ..
cmake --build . --target install
- name: Build spec tools
run: |
cd tools/buildHeaders
mkdir build
cd build
cmake ..
cmake --build . --target install
- name: Build headers
run: |
cd tools/buildHeaders
./bin/makeHeaders
- name: Check generated headers
run: git diff --exit-code
@@ -91,6 +91,11 @@ filegroup(
srcs = ["include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json"],
)
filegroup(
name = "spirv_ext_inst_nonsemantic_shader_debuginfo_100_grammar_unified1",
srcs = ["include/spirv/unified1/extinst.nonsemantic.shader.debuginfo.100.grammar.json"],
)
filegroup(
name = "spirv_ext_inst_spv_amd_gcn_shader_grammar_unified1",
srcs = ["include/spirv/unified1/extinst.spv-amd-gcn-shader.grammar.json"],
@@ -29,7 +29,7 @@
# https://www.khronos.org/registry/spir-v/
#
cmake_minimum_required(VERSION 3.0)
project(SPIRV-Headers VERSION 1.5.1)
project(SPIRV-Headers VERSION 1.5.5)
# There are two ways to use this project.
#
@@ -124,4 +124,10 @@ if (SPIRV_HEADERS_ENABLE_INSTALL)
NAMESPACE "${namespace}"
DESTINATION "${config_install_dir}"
)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/SPIRV-Headers.pc.in ${CMAKE_BINARY_DIR}/SPIRV-Headers.pc @ONLY)
install(
FILES "${CMAKE_BINARY_DIR}/SPIRV-Headers.pc"
DESTINATION ${CMAKE_INSTALL_DATADIR}/pkgconfig
)
endif()
@@ -0,0 +1,9 @@
prefix=@CMAKE_INSTALL_PREFIX@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
Name: SPIRV-Headers
Description: Header files from the SPIR-V registry
Version: @CMAKE_PROJECT_VERSION@
Requires:
Libs:
Cflags: -I${includedir}
@@ -69,7 +69,7 @@
<id value="16" vendor="X-LEGEND" tool="Mesa-IR/SPIR-V Translator" comment="Contact Metora Wang, github:metora/MesaGLSLCompiler"/>
<id value="17" vendor="Khronos" tool="SPIR-V Tools Linker" comment="Contact David Neto, dneto@google.com"/>
<id value="18" vendor="Wine" tool="VKD3D Shader Compiler" comment="Contact wine-devel@winehq.org"/>
<id value="19" vendor="Clay" tool="Clay Shader Compiler" comment="Contact info@clayengine.com"/>
<id value="19" vendor="Tellusim" tool="Clay Shader Compiler" comment="Contact info@tellusim.com"/>
<id value="20" vendor="W3C WebGPU Group" tool="WHLSL Shader Translator" comment="https://github.com/gpuweb/WHLSL"/>
<id value="21" vendor="Google" tool="Clspv" comment="Contact David Neto, dneto@google.com"/>
<id value="22" vendor="Google" tool="MLIR SPIR-V Serializer" comment="Contact Lei Zhang, antiagainst@google.com"/>
@@ -81,7 +81,8 @@
<id value="28" vendor="gfx-rs community" tool="Naga" comment="https://github.com/gfx-rs/naga"/>
<id value="29" vendor="Mikkosoft Productions" tool="MSP Shader Compiler" comment="Contact Mikko Rasa, tdb@tdb.fi"/>
<id value="30" vendor="SpvGenTwo community" tool="SpvGenTwo SPIR-V IR Tools" comment="https://github.com/rAzoR8/SpvGenTwo"/>
<unused start="31" end="0xFFFF" comment="Tool ID range reservable for future use by vendors"/>
<id value="31" vendor="Google" tool="Skia SkSL" comment="Contact Ethan Nicholas, ethannicholas@google.com"/>
<unused start="32" end="0xFFFF" comment="Tool ID range reservable for future use by vendors"/>
</ids>
<!-- SECTION: SPIR-V Opcodes and Enumerants -->
@@ -133,13 +134,14 @@
<ids type="opcode" start="6080" end="6143" vendor="Intel" comment="Contact mariusz.merecki@intel.com"/>
<ids type="opcode" start="6144" end="6271" vendor="Intel" comment="Contact michael.kinsner@intel.com"/>
<ids type="opcode" start="6272" end="6399" vendor="Huawei" comment="Contact wanghuilong2@xunweitech.com"/>
<ids type="opcode" start="6400" end="6463" vendor="Intel" comment="Contact ben.ashbaugh@intel.com"/>
<!-- Opcode enumerants to reserve for future use. To get a block, allocate
multiples of 64 starting at the lowest available point in this
block and add a corresponding <ids> tag immediately above. Make
sure to fill in the vendor attribute, and preferably add a contact
person/address in a comment attribute. -->
<!-- Example new block: <ids type="opcode" start="XXXX" end="XXXX+64n-1" vendor="Add vendor" comment="Contact TBD"/> -->
<ids type="opcode" start="6400" end="65535" comment="Opcode range reservable for future use by vendors"/>
<ids type="opcode" start="6464" end="65535" comment="Opcode range reservable for future use by vendors"/>
<!-- End reservations of opcodes -->
@@ -161,13 +163,14 @@
<ids type="enumerant" start="6080" end="6143" vendor="Intel" comment="Contact mariusz.merecki@intel.com"/>
<ids type="enumerant" start="6144" end="6271" vendor="Intel" comment="Contact michael.kinsner@intel.com"/>
<ids type="enumerant" start="6272" end="6399" vendor="Huawei" comment="Contact wanghuilong2@xunweitech.com"/>
<ids type="enumerant" start="6400" end="6463" vendor="Intel" comment="Contact ben.ashbaugh@intel.com"/>
<!-- Enumerants to reserve for future use. To get a block, allocate
multiples of 64 starting at the lowest available point in this
block and add a corresponding <ids> tag immediately above. Make
sure to fill in the vendor attribute, and preferably add a contact
person/address in a comment attribute. -->
<!-- Example new block: <ids type="enumerant" start="XXXX" end="XXXX+64n-1" vendor="Add vendor" comment="Contact TBD"/> -->
<ids type="enumerant" start="6400" end="4294967295" comment="Enumerant range reservable for future use by vendors"/>
<ids type="enumerant" start="6464" end="4294967295" comment="Enumerant range reservable for future use by vendors"/>
<!-- End reservations of enumerants -->
@@ -251,4 +254,24 @@
<ids type="MemoryOperand" start="18" end="30" comment="Unreserved bits reservable for use by vendors"/>
<ids type="MemoryOperand" start="31" end="31" vendor="Khronos" comment="Reserved MemoryOperand bit, not available to vendors"/>
<!-- SECTION: SPIR-V Image Operand Bit Reservations -->
<!-- Reserve ranges of bits in the image operands bitfield.
Each vendor determines the use of values in their own ranges.
Vendors are not required to disclose those uses. If the use of a
value is included in an extension that is adopted by a Khronos
extension or specification, then that value's use may be permanently
fixed as if originally reserved in a Khronos range.
The SPIR Working Group strongly recommends:
- Each value is used for only one purpose.
- All values in a range should be used before allocating a new range.
-->
<!-- Reserved image operand bits -->
<ids type="ImageOperand" start="0" end="15" vendor="Khronos" comment="Reserved ImageOperand bits, not available to vendors - see the SPIR-V Specification"/>
<ids type="ImageOperand" start="16" end="16" vendor="Nvidia" comment="Contact pmistry@nvidia.com"/>
<ids type="ImageOperand" start="17" end="30" comment="Unreserved bits reservable for use by vendors"/>
<ids type="ImageOperand" start="31" end="31" vendor="Khronos" comment="Reserved ImageOperand bit, not available to vendors"/>
</registry>
@@ -33,7 +33,7 @@ extern "C" {
#endif
enum {
NonSemanticClspvReflectionRevision = 1,
NonSemanticClspvReflectionRevision = 2,
NonSemanticClspvReflectionRevision_BitWidthPadding = 0x7fffffff
};
@@ -62,6 +62,7 @@ enum NonSemanticClspvReflectionInstructions {
NonSemanticClspvReflectionConstantDataUniform = 22,
NonSemanticClspvReflectionLiteralSampler = 23,
NonSemanticClspvReflectionPropertyRequiredWorkgroupSize = 24,
NonSemanticClspvReflectionSpecConstantSubgroupMaxSize = 25,
NonSemanticClspvReflectionInstructionsMax = 0x7fffffff
};
@@ -0,0 +1,171 @@
// Copyright (c) 2018 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and/or associated documentation files (the "Materials"),
// to deal in the Materials without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Materials, and to permit persons to whom the
// Materials are furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Materials.
//
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
//
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
// IN THE MATERIALS.
#ifndef SPIRV_UNIFIED1_NonSemanticShaderDebugInfo100_H_
#define SPIRV_UNIFIED1_NonSemanticShaderDebugInfo100_H_
#ifdef __cplusplus
extern "C" {
#endif
enum {
NonSemanticShaderDebugInfo100Version = 100,
NonSemanticShaderDebugInfo100Version_BitWidthPadding = 0x7fffffff
};
enum {
NonSemanticShaderDebugInfo100Revision = 6,
NonSemanticShaderDebugInfo100Revision_BitWidthPadding = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100Instructions {
NonSemanticShaderDebugInfo100DebugInfoNone = 0,
NonSemanticShaderDebugInfo100DebugCompilationUnit = 1,
NonSemanticShaderDebugInfo100DebugTypeBasic = 2,
NonSemanticShaderDebugInfo100DebugTypePointer = 3,
NonSemanticShaderDebugInfo100DebugTypeQualifier = 4,
NonSemanticShaderDebugInfo100DebugTypeArray = 5,
NonSemanticShaderDebugInfo100DebugTypeVector = 6,
NonSemanticShaderDebugInfo100DebugTypedef = 7,
NonSemanticShaderDebugInfo100DebugTypeFunction = 8,
NonSemanticShaderDebugInfo100DebugTypeEnum = 9,
NonSemanticShaderDebugInfo100DebugTypeComposite = 10,
NonSemanticShaderDebugInfo100DebugTypeMember = 11,
NonSemanticShaderDebugInfo100DebugTypeInheritance = 12,
NonSemanticShaderDebugInfo100DebugTypePtrToMember = 13,
NonSemanticShaderDebugInfo100DebugTypeTemplate = 14,
NonSemanticShaderDebugInfo100DebugTypeTemplateParameter = 15,
NonSemanticShaderDebugInfo100DebugTypeTemplateTemplateParameter = 16,
NonSemanticShaderDebugInfo100DebugTypeTemplateParameterPack = 17,
NonSemanticShaderDebugInfo100DebugGlobalVariable = 18,
NonSemanticShaderDebugInfo100DebugFunctionDeclaration = 19,
NonSemanticShaderDebugInfo100DebugFunction = 20,
NonSemanticShaderDebugInfo100DebugLexicalBlock = 21,
NonSemanticShaderDebugInfo100DebugLexicalBlockDiscriminator = 22,
NonSemanticShaderDebugInfo100DebugScope = 23,
NonSemanticShaderDebugInfo100DebugNoScope = 24,
NonSemanticShaderDebugInfo100DebugInlinedAt = 25,
NonSemanticShaderDebugInfo100DebugLocalVariable = 26,
NonSemanticShaderDebugInfo100DebugInlinedVariable = 27,
NonSemanticShaderDebugInfo100DebugDeclare = 28,
NonSemanticShaderDebugInfo100DebugValue = 29,
NonSemanticShaderDebugInfo100DebugOperation = 30,
NonSemanticShaderDebugInfo100DebugExpression = 31,
NonSemanticShaderDebugInfo100DebugMacroDef = 32,
NonSemanticShaderDebugInfo100DebugMacroUndef = 33,
NonSemanticShaderDebugInfo100DebugImportedEntity = 34,
NonSemanticShaderDebugInfo100DebugSource = 35,
NonSemanticShaderDebugInfo100DebugFunctionDefinition = 101,
NonSemanticShaderDebugInfo100DebugSourceContinued = 102,
NonSemanticShaderDebugInfo100DebugLine = 103,
NonSemanticShaderDebugInfo100DebugNoLine = 104,
NonSemanticShaderDebugInfo100DebugBuildIdentifier = 105,
NonSemanticShaderDebugInfo100DebugStoragePath = 106,
NonSemanticShaderDebugInfo100DebugEntryPoint = 107,
NonSemanticShaderDebugInfo100DebugTypeMatrix = 108,
NonSemanticShaderDebugInfo100InstructionsMax = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100DebugInfoFlags {
NonSemanticShaderDebugInfo100None = 0x0000,
NonSemanticShaderDebugInfo100FlagIsProtected = 0x01,
NonSemanticShaderDebugInfo100FlagIsPrivate = 0x02,
NonSemanticShaderDebugInfo100FlagIsPublic = 0x03,
NonSemanticShaderDebugInfo100FlagIsLocal = 0x04,
NonSemanticShaderDebugInfo100FlagIsDefinition = 0x08,
NonSemanticShaderDebugInfo100FlagFwdDecl = 0x10,
NonSemanticShaderDebugInfo100FlagArtificial = 0x20,
NonSemanticShaderDebugInfo100FlagExplicit = 0x40,
NonSemanticShaderDebugInfo100FlagPrototyped = 0x80,
NonSemanticShaderDebugInfo100FlagObjectPointer = 0x100,
NonSemanticShaderDebugInfo100FlagStaticMember = 0x200,
NonSemanticShaderDebugInfo100FlagIndirectVariable = 0x400,
NonSemanticShaderDebugInfo100FlagLValueReference = 0x800,
NonSemanticShaderDebugInfo100FlagRValueReference = 0x1000,
NonSemanticShaderDebugInfo100FlagIsOptimized = 0x2000,
NonSemanticShaderDebugInfo100FlagIsEnumClass = 0x4000,
NonSemanticShaderDebugInfo100FlagTypePassByValue = 0x8000,
NonSemanticShaderDebugInfo100FlagTypePassByReference = 0x10000,
NonSemanticShaderDebugInfo100FlagUnknownPhysicalLayout = 0x20000,
NonSemanticShaderDebugInfo100DebugInfoFlagsMax = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100BuildIdentifierFlags {
NonSemanticShaderDebugInfo100IdentifierPossibleDuplicates = 0x01,
NonSemanticShaderDebugInfo100BuildIdentifierFlagsMax = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100DebugBaseTypeAttributeEncoding {
NonSemanticShaderDebugInfo100Unspecified = 0,
NonSemanticShaderDebugInfo100Address = 1,
NonSemanticShaderDebugInfo100Boolean = 2,
NonSemanticShaderDebugInfo100Float = 3,
NonSemanticShaderDebugInfo100Signed = 4,
NonSemanticShaderDebugInfo100SignedChar = 5,
NonSemanticShaderDebugInfo100Unsigned = 6,
NonSemanticShaderDebugInfo100UnsignedChar = 7,
NonSemanticShaderDebugInfo100DebugBaseTypeAttributeEncodingMax = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100DebugCompositeType {
NonSemanticShaderDebugInfo100Class = 0,
NonSemanticShaderDebugInfo100Structure = 1,
NonSemanticShaderDebugInfo100Union = 2,
NonSemanticShaderDebugInfo100DebugCompositeTypeMax = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100DebugTypeQualifier {
NonSemanticShaderDebugInfo100ConstType = 0,
NonSemanticShaderDebugInfo100VolatileType = 1,
NonSemanticShaderDebugInfo100RestrictType = 2,
NonSemanticShaderDebugInfo100AtomicType = 3,
NonSemanticShaderDebugInfo100DebugTypeQualifierMax = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100DebugOperation {
NonSemanticShaderDebugInfo100Deref = 0,
NonSemanticShaderDebugInfo100Plus = 1,
NonSemanticShaderDebugInfo100Minus = 2,
NonSemanticShaderDebugInfo100PlusUconst = 3,
NonSemanticShaderDebugInfo100BitPiece = 4,
NonSemanticShaderDebugInfo100Swap = 5,
NonSemanticShaderDebugInfo100Xderef = 6,
NonSemanticShaderDebugInfo100StackValue = 7,
NonSemanticShaderDebugInfo100Constu = 8,
NonSemanticShaderDebugInfo100Fragment = 9,
NonSemanticShaderDebugInfo100DebugOperationMax = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100DebugImportedEntity {
NonSemanticShaderDebugInfo100ImportedModule = 0,
NonSemanticShaderDebugInfo100ImportedDeclaration = 1,
NonSemanticShaderDebugInfo100DebugImportedEntityMax = 0x7fffffff
};
#ifdef __cplusplus
}
#endif
#endif // SPIRV_UNIFIED1_NonSemanticShaderDebugInfo100_H_
@@ -1,5 +1,5 @@
{
"revision" : 1,
"revision" : 2,
"instructions" : [
{
"opname" : "Kernel",
@@ -232,6 +232,13 @@
{ "kind" : "IdRef", "name" : "Y" },
{ "kind" : "IdRef", "name" : "Z" }
]
},
{
"opname" : "SpecConstantSubgroupMaxSize",
"opcode" : 25,
"operands" : [
{ "kind" : "IdRef", "name" : "Size" }
]
}
]
}
@@ -0,0 +1,713 @@
{
"copyright" : [
"Copyright (c) 2018 The Khronos Group Inc.",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy",
"of this software and/or associated documentation files (the \"Materials\"),",
"to deal in the Materials without restriction, including without limitation",
"the rights to use, copy, modify, merge, publish, distribute, sublicense,",
"and/or sell copies of the Materials, and to permit persons to whom the",
"Materials are furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in",
"all copies or substantial portions of the Materials.",
"",
"MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS",
"STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND",
"HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ",
"",
"THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS",
"OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL",
"THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING",
"FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS",
"IN THE MATERIALS."
],
"version" : 100,
"revision" : 6,
"instructions" : [
{
"opname" : "DebugInfoNone",
"opcode" : 0
},
{
"opname" : "DebugCompilationUnit",
"opcode" : 1,
"operands" : [
{ "kind" : "IdRef", "name" : "'Version'" },
{ "kind" : "IdRef", "name" : "'DWARF Version'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Language'" }
]
},
{
"opname" : "DebugTypeBasic",
"opcode" : 2,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "IdRef", "name" : "'Encoding'" },
{ "kind" : "IdRef", "name" : "'Flags'" }
]
},
{
"opname" : "DebugTypePointer",
"opcode" : 3,
"operands" : [
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "IdRef", "name" : "'Storage Class'" },
{ "kind" : "IdRef", "name" : "'Flags'" }
]
},
{
"opname" : "DebugTypeQualifier",
"opcode" : 4,
"operands" : [
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "IdRef", "name" : "'Type Qualifier'" }
]
},
{
"opname" : "DebugTypeArray",
"opcode" : 5,
"operands" : [
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "IdRef", "name" : "'Component Counts'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeVector",
"opcode" : 6,
"operands" : [
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "IdRef", "name" : "'Component Count'" }
]
},
{
"opname" : "DebugTypedef",
"opcode" : 7,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" }
]
},
{
"opname" : "DebugTypeFunction",
"opcode" : 8,
"operands" : [
{ "kind" : "IdRef", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Return Type'" },
{ "kind" : "IdRef", "name" : "'Parameter Types'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeEnum",
"opcode" : 9,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Underlying Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "IdRef", "name" : "'Flags'" },
{ "kind" : "PairIdRefIdRef", "name" : "'Value, Name, Value, Name, ...'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeComposite",
"opcode" : 10,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Tag'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Linkage Name'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "IdRef", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Members'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeMember",
"opcode" : 11,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Offset'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "IdRef", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Value'", "quantifier" : "?" }
]
},
{
"opname" : "DebugTypeInheritance",
"opcode" : 12,
"operands" : [
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Offset'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "IdRef", "name" : "'Flags'" }
]
},
{
"opname" : "DebugTypePtrToMember",
"opcode" : 13,
"operands" : [
{ "kind" : "IdRef", "name" : "'Member Type'" },
{ "kind" : "IdRef", "name" : "'Parent'" }
]
},
{
"opname" : "DebugTypeTemplate",
"opcode" : 14,
"operands" : [
{ "kind" : "IdRef", "name" : "'Target'" },
{ "kind" : "IdRef", "name" : "'Parameters'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeTemplateParameter",
"opcode" : 15,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Actual Type'" },
{ "kind" : "IdRef", "name" : "'Value'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" }
]
},
{
"opname" : "DebugTypeTemplateTemplateParameter",
"opcode" : 16,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Template Name'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" }
]
},
{
"opname" : "DebugTypeTemplateParameterPack",
"opcode" : 17,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Template Parameters'", "quantifier" : "*" }
]
},
{
"opname" : "DebugGlobalVariable",
"opcode" : 18,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Linkage Name'" },
{ "kind" : "IdRef", "name" : "'Variable'" },
{ "kind" : "IdRef", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Static Member Declaration'", "quantifier" : "?" }
]
},
{
"opname" : "DebugFunctionDeclaration",
"opcode" : 19,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Linkage Name'" },
{ "kind" : "IdRef", "name" : "'Flags'" }
]
},
{
"opname" : "DebugFunction",
"opcode" : 20,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Linkage Name'" },
{ "kind" : "IdRef", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Scope Line'" },
{ "kind" : "IdRef", "name" : "'Declaration'", "quantifier" : "?" }
]
},
{
"opname" : "DebugLexicalBlock",
"opcode" : 21,
"operands" : [
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Name'", "quantifier" : "?" }
]
},
{
"opname" : "DebugLexicalBlockDiscriminator",
"opcode" : 22,
"operands" : [
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Discriminator'" },
{ "kind" : "IdRef", "name" : "'Parent'" }
]
},
{
"opname" : "DebugScope",
"opcode" : 23,
"operands" : [
{ "kind" : "IdRef", "name" : "'Scope'" },
{ "kind" : "IdRef", "name" : "'Inlined At'", "quantifier" : "?" }
]
},
{
"opname" : "DebugNoScope",
"opcode" : 24
},
{
"opname" : "DebugInlinedAt",
"opcode" : 25,
"operands" : [
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Scope'" },
{ "kind" : "IdRef", "name" : "'Inlined'", "quantifier" : "?" }
]
},
{
"opname" : "DebugLocalVariable",
"opcode" : 26,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Arg Number'", "quantifier" : "?" }
]
},
{
"opname" : "DebugInlinedVariable",
"opcode" : 27,
"operands" : [
{ "kind" : "IdRef", "name" : "'Variable'" },
{ "kind" : "IdRef", "name" : "'Inlined'" }
]
},
{
"opname" : "DebugDeclare",
"opcode" : 28,
"operands" : [
{ "kind" : "IdRef", "name" : "'Local Variable'" },
{ "kind" : "IdRef", "name" : "'Variable'" },
{ "kind" : "IdRef", "name" : "'Expression'" },
{ "kind" : "IdRef", "name" : "'Indexes'", "quantifier" : "*" }
]
},
{
"opname" : "DebugValue",
"opcode" : 29,
"operands" : [
{ "kind" : "IdRef", "name" : "'Local Variable'" },
{ "kind" : "IdRef", "name" : "'Value'" },
{ "kind" : "IdRef", "name" : "'Expression'" },
{ "kind" : "IdRef", "name" : "'Indexes'", "quantifier" : "*" }
]
},
{
"opname" : "DebugOperation",
"opcode" : 30,
"operands" : [
{ "kind" : "IdRef", "name" : "'OpCode'" },
{ "kind" : "IdRef", "name" : "'Operands ...'", "quantifier" : "*" }
]
},
{
"opname" : "DebugExpression",
"opcode" : 31,
"operands" : [
{ "kind" : "IdRef", "name" : "'Operands ...'", "quantifier" : "*" }
]
},
{
"opname" : "DebugMacroDef",
"opcode" : 32,
"operands" : [
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Value'", "quantifier" : "?" }
]
},
{
"opname" : "DebugMacroUndef",
"opcode" : 33,
"operands" : [
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Macro'" }
]
},
{
"opname" : "DebugImportedEntity",
"opcode" : 34,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Tag'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Entity'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" }
]
},
{
"opname" : "DebugSource",
"opcode" : 35,
"operands" : [
{ "kind" : "IdRef", "name" : "'File'" },
{ "kind" : "IdRef", "name" : "'Text'", "quantifier" : "?" }
]
},
{
"opname" : "DebugFunctionDefinition",
"opcode" : 101,
"operands" : [
{ "kind" : "IdRef", "name" : "'Function'" },
{ "kind" : "IdRef", "name" : "'Definition'" }
]
},
{
"opname" : "DebugSourceContinued",
"opcode" : 102,
"operands" : [
{ "kind" : "IdRef", "name" : "'Text'" }
]
},
{
"opname" : "DebugLine",
"opcode" : 103,
"operands" : [
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line Start'" },
{ "kind" : "IdRef", "name" : "'Line End'" },
{ "kind" : "IdRef", "name" : "'Column Start'" },
{ "kind" : "IdRef", "name" : "'Column End'" }
]
},
{
"opname" : "DebugNoLine",
"opcode" : 104
},
{
"opname" : "DebugBuildIdentifier",
"opcode" : 105,
"operands" : [
{ "kind" : "IdRef", "name" : "'Identifier'" },
{ "kind" : "IdRef", "name" : "'Flags'" }
]
},
{
"opname" : "DebugStoragePath",
"opcode" : 106,
"operands" : [
{ "kind" : "IdRef", "name" : "'Path'" }
]
},
{
"opname" : "DebugEntryPoint",
"opcode" : 107,
"operands" : [
{ "kind" : "IdRef", "name" : "'Entry Point'" },
{ "kind" : "IdRef", "name" : "'Compilation Unit'" },
{ "kind" : "IdRef", "name" : "'Compiler Signature'" },
{ "kind" : "IdRef", "name" : "'Command-line Arguments'" }
]
},
{
"opname" : "DebugTypeMatrix",
"opcode" : 108,
"operands" : [
{ "kind" : "IdRef", "name" : "'Vector Type'" },
{ "kind" : "IdRef", "name" : "'Vector Count'" },
{ "kind" : "IdRef", "name" : "'Column Major'" }
]
}
],
"operand_kinds" : [
{
"category" : "BitEnum",
"kind" : "DebugInfoFlags",
"enumerants" : [
{
"enumerant" : "None",
"value" : "0x0000"
},
{
"enumerant" : "FlagIsProtected",
"value" : "0x01"
},
{
"enumerant" : "FlagIsPrivate",
"value" : "0x02"
},
{
"enumerant" : "FlagIsPublic",
"value" : "0x03"
},
{
"enumerant" : "FlagIsLocal",
"value" : "0x04"
},
{
"enumerant" : "FlagIsDefinition",
"value" : "0x08"
},
{
"enumerant" : "FlagFwdDecl",
"value" : "0x10"
},
{
"enumerant" : "FlagArtificial",
"value" : "0x20"
},
{
"enumerant" : "FlagExplicit",
"value" : "0x40"
},
{
"enumerant" : "FlagPrototyped",
"value" : "0x80"
},
{
"enumerant" : "FlagObjectPointer",
"value" : "0x100"
},
{
"enumerant" : "FlagStaticMember",
"value" : "0x200"
},
{
"enumerant" : "FlagIndirectVariable",
"value" : "0x400"
},
{
"enumerant" : "FlagLValueReference",
"value" : "0x800"
},
{
"enumerant" : "FlagRValueReference",
"value" : "0x1000"
},
{
"enumerant" : "FlagIsOptimized",
"value" : "0x2000"
},
{
"enumerant" : "FlagIsEnumClass",
"value" : "0x4000"
},
{
"enumerant" : "FlagTypePassByValue",
"value" : "0x8000"
},
{
"enumerant" : "FlagTypePassByReference",
"value" : "0x10000"
},
{
"enumerant" : "FlagUnknownPhysicalLayout",
"value" : "0x20000"
}
]
},
{
"category" : "BitEnum",
"kind" : "BuildIdentifierFlags",
"enumerants" : [
{
"enumerant" : "IdentifierPossibleDuplicates",
"value" : "0x01"
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugBaseTypeAttributeEncoding",
"enumerants" : [
{
"enumerant" : "Unspecified",
"value" : "0"
},
{
"enumerant" : "Address",
"value" : "1"
},
{
"enumerant" : "Boolean",
"value" : "2"
},
{
"enumerant" : "Float",
"value" : "3"
},
{
"enumerant" : "Signed",
"value" : "4"
},
{
"enumerant" : "SignedChar",
"value" : "5"
},
{
"enumerant" : "Unsigned",
"value" : "6"
},
{
"enumerant" : "UnsignedChar",
"value" : "7"
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugCompositeType",
"enumerants" : [
{
"enumerant" : "Class",
"value" : "0"
},
{
"enumerant" : "Structure",
"value" : "1"
},
{
"enumerant" : "Union",
"value" : "2"
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugTypeQualifier",
"enumerants" : [
{
"enumerant" : "ConstType",
"value" : "0"
},
{
"enumerant" : "VolatileType",
"value" : "1"
},
{
"enumerant" : "RestrictType",
"value" : "2"
},
{
"enumerant" : "AtomicType",
"value" : "3"
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugOperation",
"enumerants" : [
{
"enumerant" : "Deref",
"value" : "0"
},
{
"enumerant" : "Plus",
"value" : "1"
},
{
"enumerant" : "Minus",
"value" : "2"
},
{
"enumerant" : "PlusUconst",
"value" : "3",
"parameters" : [
{ "kind" : "IdRef" }
]
},
{
"enumerant" : "BitPiece",
"value" : "4",
"parameters" : [
{ "kind" : "IdRef" },
{ "kind" : "IdRef" }
]
},
{
"enumerant" : "Swap",
"value" : "5"
},
{
"enumerant" : "Xderef",
"value" : "6"
},
{
"enumerant" : "StackValue",
"value" : "7"
},
{
"enumerant" : "Constu",
"value" : "8",
"parameters" : [
{ "kind" : "IdRef" }
]
},
{
"enumerant" : "Fragment",
"value" : "9",
"parameters" : [
{ "kind" : "IdRef" },
{ "kind" : "IdRef" }
]
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugImportedEntity",
"enumerants" : [
{
"enumerant" : "ImportedModule",
"value" : "0"
},
{
"enumerant" : "ImportedDeclaration",
"value" : "1"
}
]
}
]
}
@@ -4753,6 +4753,52 @@
"extensions" : [ "SPV_NV_ray_tracing" ],
"version" : "None"
},
{
"opname" : "OpTraceMotionNV",
"class" : "Reserved",
"opcode" : 5338,
"operands" : [
{ "kind" : "IdRef", "name" : "'Accel'" },
{ "kind" : "IdRef", "name" : "'Ray Flags'" },
{ "kind" : "IdRef", "name" : "'Cull Mask'" },
{ "kind" : "IdRef", "name" : "'SBT Offset'" },
{ "kind" : "IdRef", "name" : "'SBT Stride'" },
{ "kind" : "IdRef", "name" : "'Miss Index'" },
{ "kind" : "IdRef", "name" : "'Ray Origin'" },
{ "kind" : "IdRef", "name" : "'Ray Tmin'" },
{ "kind" : "IdRef", "name" : "'Ray Direction'" },
{ "kind" : "IdRef", "name" : "'Ray Tmax'" },
{ "kind" : "IdRef", "name" : "'Time'" },
{ "kind" : "IdRef", "name" : "'PayloadId'" }
],
"capabilities" : [ "RayTracingMotionBlurNV" ],
"extensions" : [ "SPV_NV_ray_tracing_motion_blur" ],
"version" : "None"
},
{
"opname" : "OpTraceRayMotionNV",
"class" : "Reserved",
"opcode" : 5339,
"operands" : [
{ "kind" : "IdRef", "name" : "'Accel'" },
{ "kind" : "IdRef", "name" : "'Ray Flags'" },
{ "kind" : "IdRef", "name" : "'Cull Mask'" },
{ "kind" : "IdRef", "name" : "'SBT Offset'" },
{ "kind" : "IdRef", "name" : "'SBT Stride'" },
{ "kind" : "IdRef", "name" : "'Miss Index'" },
{ "kind" : "IdRef", "name" : "'Ray Origin'" },
{ "kind" : "IdRef", "name" : "'Ray Tmin'" },
{ "kind" : "IdRef", "name" : "'Ray Direction'" },
{ "kind" : "IdRef", "name" : "'Ray Tmax'" },
{ "kind" : "IdRef", "name" : "'Time'" },
{ "kind" : "IdRef", "name" : "'Payload'" }
],
"capabilities" : [ "RayTracingMotionBlurNV" ],
"extensions" : [ "SPV_NV_ray_tracing_motion_blur" ],
"version" : "None"
},
{
"opname" : "OpTypeAccelerationStructureNV",
"class" : "Reserved",
@@ -4898,6 +4944,88 @@
"extensions" : [ "SPV_EXT_demote_to_helper_invocation" ],
"version" : "None"
},
{
"opname" : "OpConvertUToImageNV",
"class" : "Reserved",
"opcode" : 5391,
"operands" : [
{ "kind" : "IdResultType" },
{ "kind" : "IdResult" },
{ "kind" : "IdRef", "name" : "'Operand'" }
],
"capabilities" : [ "BindlessTextureNV" ],
"version" : "None"
},
{
"opname" : "OpConvertUToSamplerNV",
"class" : "Reserved",
"opcode" : 5392,
"operands" : [
{ "kind" : "IdResultType" },
{ "kind" : "IdResult" },
{ "kind" : "IdRef", "name" : "'Operand'" }
],
"capabilities" : [ "BindlessTextureNV" ],
"version" : "None"
},
{
"opname" : "OpConvertImageToUNV",
"class" : "Reserved",
"opcode" : 5393,
"operands" : [
{ "kind" : "IdResultType" },
{ "kind" : "IdResult" },
{ "kind" : "IdRef", "name" : "'Operand'" }
],
"capabilities" : [ "BindlessTextureNV" ],
"version" : "None"
},
{
"opname" : "OpConvertSamplerToUNV",
"class" : "Reserved",
"opcode" : 5394,
"operands" : [
{ "kind" : "IdResultType" },
{ "kind" : "IdResult" },
{ "kind" : "IdRef", "name" : "'Operand'" }
],
"capabilities" : [ "BindlessTextureNV" ],
"version" : "None"
},
{
"opname" : "OpConvertUToSampledImageNV",
"class" : "Reserved",
"opcode" : 5395,
"operands" : [
{ "kind" : "IdResultType" },
{ "kind" : "IdResult" },
{ "kind" : "IdRef", "name" : "'Operand'" }
],
"capabilities" : [ "BindlessTextureNV" ],
"version" : "None"
},
{
"opname" : "OpConvertSampledImageToUNV",
"class" : "Reserved",
"opcode" : 5396,
"operands" : [
{ "kind" : "IdResultType" },
{ "kind" : "IdResult" },
{ "kind" : "IdRef", "name" : "'Operand'" }
],
"capabilities" : [ "BindlessTextureNV" ],
"version" : "None"
},
{
"opname" : "OpSamplerImageAddressingModeNV",
"class" : "Reserved",
"opcode" : 5397,
"operands" : [
{ "kind" : "LiteralInteger", "name" : "'Bit Width'" }
],
"capabilities" : [ "BindlessTextureNV" ],
"version" : "None"
},
{
"opname" : "OpSubgroupShuffleINTEL",
"class" : "Group",
@@ -5210,7 +5338,7 @@
"version" : "None"
},
{
"opname" : "OpConstFunctionPointerINTEL",
"opname" : "OpConstantFunctionPointerINTEL",
"class" : "@exclude",
"opcode" : 5600,
"operands" : [
@@ -7630,24 +7758,6 @@
"capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ],
"version" : "None"
},
{
"opname" : "OpArbitraryFloatPowNINTEL",
"class" : "@exclude",
"opcode" : 5882,
"operands" : [
{ "kind" : "IdResultType" },
{ "kind" : "IdResult" },
{ "kind" : "IdRef", "name" : "'A'" },
{ "kind" : "LiteralInteger", "name" : "'M1'" },
{ "kind" : "IdRef", "name" : "'B'" },
{ "kind" : "LiteralInteger", "name" : "'Mout'" },
{ "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" },
{ "kind" : "LiteralInteger", "name" : "'RoundingMode'" },
{ "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" }
],
"capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ],
"version" : "None"
},
{
"opname" : "OpLoopControlINTEL",
"class" : "Reserved",
@@ -8447,6 +8557,13 @@
"enumerant" : "ZeroExtend",
"value" : "0x2000",
"version" : "1.4"
},
{
"enumerant" : "Offsets",
"value" : "0x10000",
"parameters" : [
{ "kind" : "IdRef" }
]
}
]
},
@@ -8460,40 +8577,35 @@
},
{
"enumerant" : "NotNaN",
"value" : "0x0001",
"capabilities" : [ "Kernel" ]
"value" : "0x0001"
},
{
"enumerant" : "NotInf",
"value" : "0x0002",
"capabilities" : [ "Kernel" ]
"value" : "0x0002"
},
{
"enumerant" : "NSZ",
"value" : "0x0004",
"capabilities" : [ "Kernel" ]
"value" : "0x0004"
},
{
"enumerant" : "AllowRecip",
"value" : "0x0008",
"capabilities" : [ "Kernel" ]
"value" : "0x0008"
},
{
"enumerant" : "Fast",
"value" : "0x0010",
"capabilities" : [ "Kernel" ]
"value" : "0x0010"
},
{
"enumerant" : "AllowContractFastINTEL",
"value" : "0x10000",
"capabilities" : [ "FPFastMathModeINTEL" ],
"version" : "None"
"version" : "None"
},
{
"enumerant" : "AllowReassocINTEL",
"value" : "0x20000",
"capabilities" : [ "FPFastMathModeINTEL" ],
"version" : "None"
"version" : "None"
}
]
},
@@ -8689,6 +8801,12 @@
{
"enumerant" : "Const",
"value" : "0x0008"
},
{
"enumerant" : "OptNoneINTEL",
"value" : "0x10000",
"capabilities" : [ "OptNoneINTEL" ],
"version" : "None"
}
]
},
@@ -9445,7 +9563,9 @@
"value" : 39,
"capabilities" : [ "Kernel" ],
"parameters" : [
{ "kind" : "IdRef", "name" : "'Local Size Hint'" }
{ "kind" : "IdRef", "name" : "'x size hint'" },
{ "kind" : "IdRef", "name" : "'y size hint'" },
{ "kind" : "IdRef", "name" : "'z size hint'" }
],
"version" : "1.2"
},
@@ -10433,35 +10553,51 @@
"enumerants" : [
{
"enumerant" : "TRN",
"value" : 0
"value" : 0,
"capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"],
"version" : "None"
},
{
"enumerant" : "TRN_ZERO",
"value" : 1
"value" : 1,
"capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"],
"version" : "None"
},
{
"enumerant" : "RND",
"value" : 2
"value" : 2,
"capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"],
"version" : "None"
},
{
"enumerant" : "RND_ZERO",
"value" : 3
"value" : 3,
"capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"],
"version" : "None"
},
{
"enumerant" : "RND_INF",
"value" : 4
"value" : 4,
"capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"],
"version" : "None"
},
{
"enumerant" : "RND_MIN_INF",
"value" : 5
"value" : 5,
"capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"],
"version" : "None"
},
{
"enumerant" : "RND_CONV",
"value" : 6
"value" : 6,
"capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"],
"version" : "None"
},
{
"enumerant" : "RND_CONV_ODD",
"value" : 7
"value" : 7,
"capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"],
"version" : "None"
}
]
},
@@ -10489,19 +10625,27 @@
"enumerants" : [
{
"enumerant" : "WRAP",
"value" : 0
"value" : 0,
"capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"],
"version" : "None"
},
{
"enumerant" : "SAT",
"value" : 1
"value" : 1,
"capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"],
"version" : "None"
},
{
"enumerant" : "SAT_ZERO",
"value" : 2
"value" : 2,
"capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"],
"version" : "None"
},
{
"enumerant" : "SAT_SYM",
"value" : 3
"value" : 3,
"capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"],
"version" : "None"
}
]
},
@@ -11018,6 +11162,30 @@
"extensions" : [ "SPV_EXT_physical_storage_buffer" ],
"version" : "1.5"
},
{
"enumerant" : "BindlessSamplerNV",
"value" : 5398,
"capabilities" : [ "BindlessTextureNV" ],
"version" : "None"
},
{
"enumerant" : "BindlessImageNV",
"value" : 5399,
"capabilities" : [ "BindlessTextureNV" ],
"version" : "None"
},
{
"enumerant" : "BoundSamplerNV",
"value" : 5400,
"capabilities" : [ "BindlessTextureNV" ],
"version" : "None"
},
{
"enumerant" : "BoundImageNV",
"value" : 5401,
"capabilities" : [ "BindlessTextureNV" ],
"version" : "None"
},
{
"enumerant" : "SIMTCallINTEL",
"value" : 5599,
@@ -12022,6 +12190,13 @@
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
"enumerant" : "CurrentRayTimeNV",
"value" : 5334,
"capabilities" : [ "RayTracingMotionBlurNV" ],
"extensions" : [ "SPV_NV_ray_tracing_motion_blur" ],
"version" : "None"
},
{
"enumerant" : "IncomingRayFlagsNV",
"value" : 5351,
@@ -13054,6 +13229,13 @@
"extensions" : [ "SPV_NV_ray_tracing" ],
"version" : "None"
},
{
"enumerant" : "RayTracingMotionBlurNV",
"value" : 5341,
"capabilities" : [ "Shader" ],
"extensions" : [ "SPV_NV_ray_tracing_motion_blur" ],
"version" : "None"
},
{
"enumerant" : "VulkanMemoryModel",
"value" : 5345,
@@ -13145,6 +13327,12 @@
"extensions" : [ "SPV_EXT_demote_to_helper_invocation" ],
"version" : "None"
},
{
"enumerant" : "BindlessTextureNV",
"value" : 5390,
"extensions" : [ "SPV_NV_bindless_texture" ],
"version" : "None"
},
{
"enumerant" : "SubgroupShuffleINTEL",
"value" : 5568,
@@ -13427,6 +13615,12 @@
"extensions" : [ "SPV_INTEL_long_constant_composite" ],
"version" : "None"
},
{
"enumerant" : "OptNoneINTEL",
"value" : 6094,
"extensions" : [ "SPV_INTEL_optnone" ],
"version" : "None"
},
{
"enumerant" : "AtomicFloat16AddEXT",
"value" : 6095,
@@ -13509,7 +13703,7 @@
{
"enumerant" : "PackedVectorFormat4x8BitKHR",
"value" : 0,
"capabilities" : [ "DotProductInput4x8BitPackedKHR" ],
"extensions" : [ "SPV_KHR_integer_dot_product" ],
"version" : "None"
}
]
@@ -349,6 +349,7 @@ namespace Spv
VolatileTexelKHR = 11,
SignExtend = 12,
ZeroExtend = 13,
Offsets = 16,
}
public enum ImageOperandsMask
@@ -372,6 +373,7 @@ namespace Spv
VolatileTexelKHR = 0x00000800,
SignExtend = 0x00001000,
ZeroExtend = 0x00002000,
Offsets = 0x00010000,
}
public enum FPFastMathModeShift
@@ -497,6 +499,10 @@ namespace Spv
RestrictPointerEXT = 5355,
AliasedPointer = 5356,
AliasedPointerEXT = 5356,
BindlessSamplerNV = 5398,
BindlessImageNV = 5399,
BoundSamplerNV = 5400,
BoundImageNV = 5401,
SIMTCallINTEL = 5599,
ReferencedIndirectlyINTEL = 5602,
ClobberINTEL = 5607,
@@ -651,6 +657,7 @@ namespace Spv
HitTNV = 5332,
HitKindKHR = 5333,
HitKindNV = 5333,
CurrentRayTimeNV = 5334,
IncomingRayFlagsKHR = 5351,
IncomingRayFlagsNV = 5351,
RayGeometryIndexKHR = 5352,
@@ -722,6 +729,7 @@ namespace Spv
DontInline = 1,
Pure = 2,
Const = 3,
OptNoneINTEL = 16,
}
public enum FunctionControlMask
@@ -731,6 +739,7 @@ namespace Spv
DontInline = 0x00000002,
Pure = 0x00000004,
Const = 0x00000008,
OptNoneINTEL = 0x00010000,
}
public enum MemorySemanticsShift
@@ -993,6 +1002,7 @@ namespace Spv
StorageTexelBufferArrayNonUniformIndexing = 5312,
StorageTexelBufferArrayNonUniformIndexingEXT = 5312,
RayTracingNV = 5340,
RayTracingMotionBlurNV = 5341,
VulkanMemoryModel = 5345,
VulkanMemoryModelKHR = 5345,
VulkanMemoryModelDeviceScope = 5346,
@@ -1007,6 +1017,7 @@ namespace Spv
ShaderSMBuiltinsNV = 5373,
FragmentShaderPixelInterlockEXT = 5378,
DemoteToHelperInvocationEXT = 5379,
BindlessTextureNV = 5390,
SubgroupShuffleINTEL = 5568,
SubgroupBufferBlockIOINTEL = 5569,
SubgroupImageBlockIOINTEL = 5570,
@@ -1053,6 +1064,7 @@ namespace Spv
AtomicFloat32AddEXT = 6033,
AtomicFloat64AddEXT = 6034,
LongConstantCompositeINTEL = 6089,
OptNoneINTEL = 6094,
AtomicFloat16AddEXT = 6095,
DebugInfoModuleINTEL = 6114,
}
@@ -1549,6 +1561,8 @@ namespace Spv
OpIgnoreIntersectionNV = 5335,
OpTerminateRayNV = 5336,
OpTraceNV = 5337,
OpTraceMotionNV = 5338,
OpTraceRayMotionNV = 5339,
OpTypeAccelerationStructureKHR = 5341,
OpTypeAccelerationStructureNV = 5341,
OpExecuteCallableNV = 5344,
@@ -1561,6 +1575,13 @@ namespace Spv
OpEndInvocationInterlockEXT = 5365,
OpDemoteToHelperInvocationEXT = 5380,
OpIsHelperInvocationEXT = 5381,
OpConvertUToImageNV = 5391,
OpConvertUToSamplerNV = 5392,
OpConvertImageToUNV = 5393,
OpConvertSamplerToUNV = 5394,
OpConvertUToSampledImageNV = 5395,
OpConvertSampledImageToUNV = 5396,
OpSamplerImageAddressingModeNV = 5397,
OpSubgroupShuffleINTEL = 5571,
OpSubgroupShuffleDownINTEL = 5572,
OpSubgroupShuffleUpINTEL = 5573,
@@ -1585,7 +1606,7 @@ namespace Spv
OpUSubSatINTEL = 5596,
OpIMul32x16INTEL = 5597,
OpUMul32x16INTEL = 5598,
OpConstFunctionPointerINTEL = 5600,
OpConstantFunctionPointerINTEL = 5600,
OpFunctionPointerCallINTEL = 5601,
OpAsmTargetINTEL = 5609,
OpAsmINTEL = 5610,
@@ -357,6 +357,7 @@ typedef enum SpvImageOperandsShift_ {
SpvImageOperandsVolatileTexelKHRShift = 11,
SpvImageOperandsSignExtendShift = 12,
SpvImageOperandsZeroExtendShift = 13,
SpvImageOperandsOffsetsShift = 16,
SpvImageOperandsMax = 0x7fffffff,
} SpvImageOperandsShift;
@@ -380,6 +381,7 @@ typedef enum SpvImageOperandsMask_ {
SpvImageOperandsVolatileTexelKHRMask = 0x00000800,
SpvImageOperandsSignExtendMask = 0x00001000,
SpvImageOperandsZeroExtendMask = 0x00002000,
SpvImageOperandsOffsetsMask = 0x00010000,
} SpvImageOperandsMask;
typedef enum SpvFPFastMathModeShift_ {
@@ -503,6 +505,10 @@ typedef enum SpvDecoration_ {
SpvDecorationRestrictPointerEXT = 5355,
SpvDecorationAliasedPointer = 5356,
SpvDecorationAliasedPointerEXT = 5356,
SpvDecorationBindlessSamplerNV = 5398,
SpvDecorationBindlessImageNV = 5399,
SpvDecorationBoundSamplerNV = 5400,
SpvDecorationBoundImageNV = 5401,
SpvDecorationSIMTCallINTEL = 5599,
SpvDecorationReferencedIndirectlyINTEL = 5602,
SpvDecorationClobberINTEL = 5607,
@@ -657,6 +663,7 @@ typedef enum SpvBuiltIn_ {
SpvBuiltInHitTNV = 5332,
SpvBuiltInHitKindKHR = 5333,
SpvBuiltInHitKindNV = 5333,
SpvBuiltInCurrentRayTimeNV = 5334,
SpvBuiltInIncomingRayFlagsKHR = 5351,
SpvBuiltInIncomingRayFlagsNV = 5351,
SpvBuiltInRayGeometryIndexKHR = 5352,
@@ -726,6 +733,7 @@ typedef enum SpvFunctionControlShift_ {
SpvFunctionControlDontInlineShift = 1,
SpvFunctionControlPureShift = 2,
SpvFunctionControlConstShift = 3,
SpvFunctionControlOptNoneINTELShift = 16,
SpvFunctionControlMax = 0x7fffffff,
} SpvFunctionControlShift;
@@ -735,6 +743,7 @@ typedef enum SpvFunctionControlMask_ {
SpvFunctionControlDontInlineMask = 0x00000002,
SpvFunctionControlPureMask = 0x00000004,
SpvFunctionControlConstMask = 0x00000008,
SpvFunctionControlOptNoneINTELMask = 0x00010000,
} SpvFunctionControlMask;
typedef enum SpvMemorySemanticsShift_ {
@@ -993,6 +1002,7 @@ typedef enum SpvCapability_ {
SpvCapabilityStorageTexelBufferArrayNonUniformIndexing = 5312,
SpvCapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312,
SpvCapabilityRayTracingNV = 5340,
SpvCapabilityRayTracingMotionBlurNV = 5341,
SpvCapabilityVulkanMemoryModel = 5345,
SpvCapabilityVulkanMemoryModelKHR = 5345,
SpvCapabilityVulkanMemoryModelDeviceScope = 5346,
@@ -1007,6 +1017,7 @@ typedef enum SpvCapability_ {
SpvCapabilityShaderSMBuiltinsNV = 5373,
SpvCapabilityFragmentShaderPixelInterlockEXT = 5378,
SpvCapabilityDemoteToHelperInvocationEXT = 5379,
SpvCapabilityBindlessTextureNV = 5390,
SpvCapabilitySubgroupShuffleINTEL = 5568,
SpvCapabilitySubgroupBufferBlockIOINTEL = 5569,
SpvCapabilitySubgroupImageBlockIOINTEL = 5570,
@@ -1053,6 +1064,7 @@ typedef enum SpvCapability_ {
SpvCapabilityAtomicFloat32AddEXT = 6033,
SpvCapabilityAtomicFloat64AddEXT = 6034,
SpvCapabilityLongConstantCompositeINTEL = 6089,
SpvCapabilityOptNoneINTEL = 6094,
SpvCapabilityAtomicFloat16AddEXT = 6095,
SpvCapabilityDebugInfoModuleINTEL = 6114,
SpvCapabilityMax = 0x7fffffff,
@@ -1547,6 +1559,8 @@ typedef enum SpvOp_ {
SpvOpIgnoreIntersectionNV = 5335,
SpvOpTerminateRayNV = 5336,
SpvOpTraceNV = 5337,
SpvOpTraceMotionNV = 5338,
SpvOpTraceRayMotionNV = 5339,
SpvOpTypeAccelerationStructureKHR = 5341,
SpvOpTypeAccelerationStructureNV = 5341,
SpvOpExecuteCallableNV = 5344,
@@ -1559,6 +1573,13 @@ typedef enum SpvOp_ {
SpvOpEndInvocationInterlockEXT = 5365,
SpvOpDemoteToHelperInvocationEXT = 5380,
SpvOpIsHelperInvocationEXT = 5381,
SpvOpConvertUToImageNV = 5391,
SpvOpConvertUToSamplerNV = 5392,
SpvOpConvertImageToUNV = 5393,
SpvOpConvertSamplerToUNV = 5394,
SpvOpConvertUToSampledImageNV = 5395,
SpvOpConvertSampledImageToUNV = 5396,
SpvOpSamplerImageAddressingModeNV = 5397,
SpvOpSubgroupShuffleINTEL = 5571,
SpvOpSubgroupShuffleDownINTEL = 5572,
SpvOpSubgroupShuffleUpINTEL = 5573,
@@ -1583,7 +1604,7 @@ typedef enum SpvOp_ {
SpvOpUSubSatINTEL = 5596,
SpvOpIMul32x16INTEL = 5597,
SpvOpUMul32x16INTEL = 5598,
SpvOpConstFunctionPointerINTEL = 5600,
SpvOpConstantFunctionPointerINTEL = 5600,
SpvOpFunctionPointerCallINTEL = 5601,
SpvOpAsmTargetINTEL = 5609,
SpvOpAsmINTEL = 5610,
@@ -2192,6 +2213,8 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
case SpvOpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break;
case SpvOpTerminateRayNV: *hasResult = false; *hasResultType = false; break;
case SpvOpTraceNV: *hasResult = false; *hasResultType = false; break;
case SpvOpTraceMotionNV: *hasResult = false; *hasResultType = false; break;
case SpvOpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break;
case SpvOpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break;
case SpvOpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
case SpvOpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
@@ -2203,6 +2226,13 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
case SpvOpEndInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break;
case SpvOpDemoteToHelperInvocationEXT: *hasResult = false; *hasResultType = false; break;
case SpvOpIsHelperInvocationEXT: *hasResult = true; *hasResultType = true; break;
case SpvOpConvertUToImageNV: *hasResult = true; *hasResultType = true; break;
case SpvOpConvertUToSamplerNV: *hasResult = true; *hasResultType = true; break;
case SpvOpConvertImageToUNV: *hasResult = true; *hasResultType = true; break;
case SpvOpConvertSamplerToUNV: *hasResult = true; *hasResultType = true; break;
case SpvOpConvertUToSampledImageNV: *hasResult = true; *hasResultType = true; break;
case SpvOpConvertSampledImageToUNV: *hasResult = true; *hasResultType = true; break;
case SpvOpSamplerImageAddressingModeNV: *hasResult = false; *hasResultType = false; break;
case SpvOpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break;
case SpvOpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break;
case SpvOpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break;
@@ -2227,7 +2257,7 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
case SpvOpUSubSatINTEL: *hasResult = true; *hasResultType = true; break;
case SpvOpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
case SpvOpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
case SpvOpConstFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break;
case SpvOpConstantFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break;
case SpvOpFunctionPointerCallINTEL: *hasResult = true; *hasResultType = true; break;
case SpvOpAsmTargetINTEL: *hasResult = true; *hasResultType = true; break;
case SpvOpAsmINTEL: *hasResult = true; *hasResultType = true; break;
@@ -353,6 +353,7 @@ enum ImageOperandsShift {
ImageOperandsVolatileTexelKHRShift = 11,
ImageOperandsSignExtendShift = 12,
ImageOperandsZeroExtendShift = 13,
ImageOperandsOffsetsShift = 16,
ImageOperandsMax = 0x7fffffff,
};
@@ -376,6 +377,7 @@ enum ImageOperandsMask {
ImageOperandsVolatileTexelKHRMask = 0x00000800,
ImageOperandsSignExtendMask = 0x00001000,
ImageOperandsZeroExtendMask = 0x00002000,
ImageOperandsOffsetsMask = 0x00010000,
};
enum FPFastMathModeShift {
@@ -499,6 +501,10 @@ enum Decoration {
DecorationRestrictPointerEXT = 5355,
DecorationAliasedPointer = 5356,
DecorationAliasedPointerEXT = 5356,
DecorationBindlessSamplerNV = 5398,
DecorationBindlessImageNV = 5399,
DecorationBoundSamplerNV = 5400,
DecorationBoundImageNV = 5401,
DecorationSIMTCallINTEL = 5599,
DecorationReferencedIndirectlyINTEL = 5602,
DecorationClobberINTEL = 5607,
@@ -653,6 +659,7 @@ enum BuiltIn {
BuiltInHitTNV = 5332,
BuiltInHitKindKHR = 5333,
BuiltInHitKindNV = 5333,
BuiltInCurrentRayTimeNV = 5334,
BuiltInIncomingRayFlagsKHR = 5351,
BuiltInIncomingRayFlagsNV = 5351,
BuiltInRayGeometryIndexKHR = 5352,
@@ -722,6 +729,7 @@ enum FunctionControlShift {
FunctionControlDontInlineShift = 1,
FunctionControlPureShift = 2,
FunctionControlConstShift = 3,
FunctionControlOptNoneINTELShift = 16,
FunctionControlMax = 0x7fffffff,
};
@@ -731,6 +739,7 @@ enum FunctionControlMask {
FunctionControlDontInlineMask = 0x00000002,
FunctionControlPureMask = 0x00000004,
FunctionControlConstMask = 0x00000008,
FunctionControlOptNoneINTELMask = 0x00010000,
};
enum MemorySemanticsShift {
@@ -989,6 +998,7 @@ enum Capability {
CapabilityStorageTexelBufferArrayNonUniformIndexing = 5312,
CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312,
CapabilityRayTracingNV = 5340,
CapabilityRayTracingMotionBlurNV = 5341,
CapabilityVulkanMemoryModel = 5345,
CapabilityVulkanMemoryModelKHR = 5345,
CapabilityVulkanMemoryModelDeviceScope = 5346,
@@ -1003,6 +1013,7 @@ enum Capability {
CapabilityShaderSMBuiltinsNV = 5373,
CapabilityFragmentShaderPixelInterlockEXT = 5378,
CapabilityDemoteToHelperInvocationEXT = 5379,
CapabilityBindlessTextureNV = 5390,
CapabilitySubgroupShuffleINTEL = 5568,
CapabilitySubgroupBufferBlockIOINTEL = 5569,
CapabilitySubgroupImageBlockIOINTEL = 5570,
@@ -1049,6 +1060,7 @@ enum Capability {
CapabilityAtomicFloat32AddEXT = 6033,
CapabilityAtomicFloat64AddEXT = 6034,
CapabilityLongConstantCompositeINTEL = 6089,
CapabilityOptNoneINTEL = 6094,
CapabilityAtomicFloat16AddEXT = 6095,
CapabilityDebugInfoModuleINTEL = 6114,
CapabilityMax = 0x7fffffff,
@@ -1543,6 +1555,8 @@ enum Op {
OpIgnoreIntersectionNV = 5335,
OpTerminateRayNV = 5336,
OpTraceNV = 5337,
OpTraceMotionNV = 5338,
OpTraceRayMotionNV = 5339,
OpTypeAccelerationStructureKHR = 5341,
OpTypeAccelerationStructureNV = 5341,
OpExecuteCallableNV = 5344,
@@ -1555,6 +1569,13 @@ enum Op {
OpEndInvocationInterlockEXT = 5365,
OpDemoteToHelperInvocationEXT = 5380,
OpIsHelperInvocationEXT = 5381,
OpConvertUToImageNV = 5391,
OpConvertUToSamplerNV = 5392,
OpConvertImageToUNV = 5393,
OpConvertSamplerToUNV = 5394,
OpConvertUToSampledImageNV = 5395,
OpConvertSampledImageToUNV = 5396,
OpSamplerImageAddressingModeNV = 5397,
OpSubgroupShuffleINTEL = 5571,
OpSubgroupShuffleDownINTEL = 5572,
OpSubgroupShuffleUpINTEL = 5573,
@@ -1579,7 +1600,7 @@ enum Op {
OpUSubSatINTEL = 5596,
OpIMul32x16INTEL = 5597,
OpUMul32x16INTEL = 5598,
OpConstFunctionPointerINTEL = 5600,
OpConstantFunctionPointerINTEL = 5600,
OpFunctionPointerCallINTEL = 5601,
OpAsmTargetINTEL = 5609,
OpAsmINTEL = 5610,
@@ -2188,6 +2209,8 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break;
case OpTerminateRayNV: *hasResult = false; *hasResultType = false; break;
case OpTraceNV: *hasResult = false; *hasResultType = false; break;
case OpTraceMotionNV: *hasResult = false; *hasResultType = false; break;
case OpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break;
case OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break;
case OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
@@ -2199,6 +2222,13 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpEndInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break;
case OpDemoteToHelperInvocationEXT: *hasResult = false; *hasResultType = false; break;
case OpIsHelperInvocationEXT: *hasResult = true; *hasResultType = true; break;
case OpConvertUToImageNV: *hasResult = true; *hasResultType = true; break;
case OpConvertUToSamplerNV: *hasResult = true; *hasResultType = true; break;
case OpConvertImageToUNV: *hasResult = true; *hasResultType = true; break;
case OpConvertSamplerToUNV: *hasResult = true; *hasResultType = true; break;
case OpConvertUToSampledImageNV: *hasResult = true; *hasResultType = true; break;
case OpConvertSampledImageToUNV: *hasResult = true; *hasResultType = true; break;
case OpSamplerImageAddressingModeNV: *hasResult = false; *hasResultType = false; break;
case OpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break;
case OpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break;
case OpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break;
@@ -2223,7 +2253,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpUSubSatINTEL: *hasResult = true; *hasResultType = true; break;
case OpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
case OpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
case OpConstFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break;
case OpConstantFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break;
case OpFunctionPointerCallINTEL: *hasResult = true; *hasResultType = true; break;
case OpAsmTargetINTEL: *hasResult = true; *hasResultType = true; break;
case OpAsmINTEL: *hasResult = true; *hasResultType = true; break;
@@ -353,6 +353,7 @@ enum class ImageOperandsShift : unsigned {
VolatileTexelKHR = 11,
SignExtend = 12,
ZeroExtend = 13,
Offsets = 16,
Max = 0x7fffffff,
};
@@ -376,6 +377,7 @@ enum class ImageOperandsMask : unsigned {
VolatileTexelKHR = 0x00000800,
SignExtend = 0x00001000,
ZeroExtend = 0x00002000,
Offsets = 0x00010000,
};
enum class FPFastMathModeShift : unsigned {
@@ -499,6 +501,10 @@ enum class Decoration : unsigned {
RestrictPointerEXT = 5355,
AliasedPointer = 5356,
AliasedPointerEXT = 5356,
BindlessSamplerNV = 5398,
BindlessImageNV = 5399,
BoundSamplerNV = 5400,
BoundImageNV = 5401,
SIMTCallINTEL = 5599,
ReferencedIndirectlyINTEL = 5602,
ClobberINTEL = 5607,
@@ -653,6 +659,7 @@ enum class BuiltIn : unsigned {
HitTNV = 5332,
HitKindKHR = 5333,
HitKindNV = 5333,
CurrentRayTimeNV = 5334,
IncomingRayFlagsKHR = 5351,
IncomingRayFlagsNV = 5351,
RayGeometryIndexKHR = 5352,
@@ -722,6 +729,7 @@ enum class FunctionControlShift : unsigned {
DontInline = 1,
Pure = 2,
Const = 3,
OptNoneINTEL = 16,
Max = 0x7fffffff,
};
@@ -731,6 +739,7 @@ enum class FunctionControlMask : unsigned {
DontInline = 0x00000002,
Pure = 0x00000004,
Const = 0x00000008,
OptNoneINTEL = 0x00010000,
};
enum class MemorySemanticsShift : unsigned {
@@ -989,6 +998,7 @@ enum class Capability : unsigned {
StorageTexelBufferArrayNonUniformIndexing = 5312,
StorageTexelBufferArrayNonUniformIndexingEXT = 5312,
RayTracingNV = 5340,
RayTracingMotionBlurNV = 5341,
VulkanMemoryModel = 5345,
VulkanMemoryModelKHR = 5345,
VulkanMemoryModelDeviceScope = 5346,
@@ -1003,6 +1013,7 @@ enum class Capability : unsigned {
ShaderSMBuiltinsNV = 5373,
FragmentShaderPixelInterlockEXT = 5378,
DemoteToHelperInvocationEXT = 5379,
BindlessTextureNV = 5390,
SubgroupShuffleINTEL = 5568,
SubgroupBufferBlockIOINTEL = 5569,
SubgroupImageBlockIOINTEL = 5570,
@@ -1049,6 +1060,7 @@ enum class Capability : unsigned {
AtomicFloat32AddEXT = 6033,
AtomicFloat64AddEXT = 6034,
LongConstantCompositeINTEL = 6089,
OptNoneINTEL = 6094,
AtomicFloat16AddEXT = 6095,
DebugInfoModuleINTEL = 6114,
Max = 0x7fffffff,
@@ -1543,6 +1555,8 @@ enum class Op : unsigned {
OpIgnoreIntersectionNV = 5335,
OpTerminateRayNV = 5336,
OpTraceNV = 5337,
OpTraceMotionNV = 5338,
OpTraceRayMotionNV = 5339,
OpTypeAccelerationStructureKHR = 5341,
OpTypeAccelerationStructureNV = 5341,
OpExecuteCallableNV = 5344,
@@ -1555,6 +1569,13 @@ enum class Op : unsigned {
OpEndInvocationInterlockEXT = 5365,
OpDemoteToHelperInvocationEXT = 5380,
OpIsHelperInvocationEXT = 5381,
OpConvertUToImageNV = 5391,
OpConvertUToSamplerNV = 5392,
OpConvertImageToUNV = 5393,
OpConvertSamplerToUNV = 5394,
OpConvertUToSampledImageNV = 5395,
OpConvertSampledImageToUNV = 5396,
OpSamplerImageAddressingModeNV = 5397,
OpSubgroupShuffleINTEL = 5571,
OpSubgroupShuffleDownINTEL = 5572,
OpSubgroupShuffleUpINTEL = 5573,
@@ -1579,7 +1600,7 @@ enum class Op : unsigned {
OpUSubSatINTEL = 5596,
OpIMul32x16INTEL = 5597,
OpUMul32x16INTEL = 5598,
OpConstFunctionPointerINTEL = 5600,
OpConstantFunctionPointerINTEL = 5600,
OpFunctionPointerCallINTEL = 5601,
OpAsmTargetINTEL = 5609,
OpAsmINTEL = 5610,
@@ -2188,6 +2209,8 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case Op::OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break;
case Op::OpTerminateRayNV: *hasResult = false; *hasResultType = false; break;
case Op::OpTraceNV: *hasResult = false; *hasResultType = false; break;
case Op::OpTraceMotionNV: *hasResult = false; *hasResultType = false; break;
case Op::OpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break;
case Op::OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break;
case Op::OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
case Op::OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
@@ -2199,6 +2222,13 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case Op::OpEndInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break;
case Op::OpDemoteToHelperInvocationEXT: *hasResult = false; *hasResultType = false; break;
case Op::OpIsHelperInvocationEXT: *hasResult = true; *hasResultType = true; break;
case Op::OpConvertUToImageNV: *hasResult = true; *hasResultType = true; break;
case Op::OpConvertUToSamplerNV: *hasResult = true; *hasResultType = true; break;
case Op::OpConvertImageToUNV: *hasResult = true; *hasResultType = true; break;
case Op::OpConvertSamplerToUNV: *hasResult = true; *hasResultType = true; break;
case Op::OpConvertUToSampledImageNV: *hasResult = true; *hasResultType = true; break;
case Op::OpConvertSampledImageToUNV: *hasResult = true; *hasResultType = true; break;
case Op::OpSamplerImageAddressingModeNV: *hasResult = false; *hasResultType = false; break;
case Op::OpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break;
case Op::OpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break;
case Op::OpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break;
@@ -2223,7 +2253,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case Op::OpUSubSatINTEL: *hasResult = true; *hasResultType = true; break;
case Op::OpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
case Op::OpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
case Op::OpConstFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break;
case Op::OpConstantFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break;
case Op::OpFunctionPointerCallINTEL: *hasResult = true; *hasResultType = true; break;
case Op::OpAsmTargetINTEL: *hasResult = true; *hasResultType = true; break;
case Op::OpAsmINTEL: *hasResult = true; *hasResultType = true; break;
@@ -395,7 +395,8 @@
"VolatileTexel": 11,
"VolatileTexelKHR": 11,
"SignExtend": 12,
"ZeroExtend": 13
"ZeroExtend": 13,
"Offsets": 16
}
},
{
@@ -527,6 +528,10 @@
"RestrictPointerEXT": 5355,
"AliasedPointer": 5356,
"AliasedPointerEXT": 5356,
"BindlessSamplerNV": 5398,
"BindlessImageNV": 5399,
"BoundSamplerNV": 5400,
"BoundImageNV": 5401,
"SIMTCallINTEL": 5599,
"ReferencedIndirectlyINTEL": 5602,
"ClobberINTEL": 5607,
@@ -684,6 +689,7 @@
"HitTNV": 5332,
"HitKindKHR": 5333,
"HitKindNV": 5333,
"CurrentRayTimeNV": 5334,
"IncomingRayFlagsKHR": 5351,
"IncomingRayFlagsNV": 5351,
"RayGeometryIndexKHR": 5352,
@@ -734,7 +740,8 @@
"Inline": 0,
"DontInline": 1,
"Pure": 2,
"Const": 3
"Const": 3,
"OptNoneINTEL": 16
}
},
{
@@ -976,6 +983,7 @@
"StorageTexelBufferArrayNonUniformIndexing": 5312,
"StorageTexelBufferArrayNonUniformIndexingEXT": 5312,
"RayTracingNV": 5340,
"RayTracingMotionBlurNV": 5341,
"VulkanMemoryModel": 5345,
"VulkanMemoryModelKHR": 5345,
"VulkanMemoryModelDeviceScope": 5346,
@@ -990,6 +998,7 @@
"ShaderSMBuiltinsNV": 5373,
"FragmentShaderPixelInterlockEXT": 5378,
"DemoteToHelperInvocationEXT": 5379,
"BindlessTextureNV": 5390,
"SubgroupShuffleINTEL": 5568,
"SubgroupBufferBlockIOINTEL": 5569,
"SubgroupImageBlockIOINTEL": 5570,
@@ -1036,6 +1045,7 @@
"AtomicFloat32AddEXT": 6033,
"AtomicFloat64AddEXT": 6034,
"LongConstantCompositeINTEL": 6089,
"OptNoneINTEL": 6094,
"AtomicFloat16AddEXT": 6095,
"DebugInfoModuleINTEL": 6114
}
@@ -1541,6 +1551,8 @@
"OpIgnoreIntersectionNV": 5335,
"OpTerminateRayNV": 5336,
"OpTraceNV": 5337,
"OpTraceMotionNV": 5338,
"OpTraceRayMotionNV": 5339,
"OpTypeAccelerationStructureKHR": 5341,
"OpTypeAccelerationStructureNV": 5341,
"OpExecuteCallableNV": 5344,
@@ -1553,6 +1565,13 @@
"OpEndInvocationInterlockEXT": 5365,
"OpDemoteToHelperInvocationEXT": 5380,
"OpIsHelperInvocationEXT": 5381,
"OpConvertUToImageNV": 5391,
"OpConvertUToSamplerNV": 5392,
"OpConvertImageToUNV": 5393,
"OpConvertSamplerToUNV": 5394,
"OpConvertUToSampledImageNV": 5395,
"OpConvertSampledImageToUNV": 5396,
"OpSamplerImageAddressingModeNV": 5397,
"OpSubgroupShuffleINTEL": 5571,
"OpSubgroupShuffleDownINTEL": 5572,
"OpSubgroupShuffleUpINTEL": 5573,
@@ -1577,7 +1596,7 @@
"OpUSubSatINTEL": 5596,
"OpIMul32x16INTEL": 5597,
"OpUMul32x16INTEL": 5598,
"OpConstFunctionPointerINTEL": 5600,
"OpConstantFunctionPointerINTEL": 5600,
"OpFunctionPointerCallINTEL": 5601,
"OpAsmTargetINTEL": 5609,
"OpAsmINTEL": 5610,
@@ -332,6 +332,7 @@ spv = {
VolatileTexelKHR = 11,
SignExtend = 12,
ZeroExtend = 13,
Offsets = 16,
},
ImageOperandsMask = {
@@ -354,6 +355,7 @@ spv = {
VolatileTexelKHR = 0x00000800,
SignExtend = 0x00001000,
ZeroExtend = 0x00002000,
Offsets = 0x00010000,
},
FPFastMathModeShift = {
@@ -472,6 +474,10 @@ spv = {
RestrictPointerEXT = 5355,
AliasedPointer = 5356,
AliasedPointerEXT = 5356,
BindlessSamplerNV = 5398,
BindlessImageNV = 5399,
BoundSamplerNV = 5400,
BoundImageNV = 5401,
SIMTCallINTEL = 5599,
ReferencedIndirectlyINTEL = 5602,
ClobberINTEL = 5607,
@@ -625,6 +631,7 @@ spv = {
HitTNV = 5332,
HitKindKHR = 5333,
HitKindNV = 5333,
CurrentRayTimeNV = 5334,
IncomingRayFlagsKHR = 5351,
IncomingRayFlagsNV = 5351,
RayGeometryIndexKHR = 5352,
@@ -691,6 +698,7 @@ spv = {
DontInline = 1,
Pure = 2,
Const = 3,
OptNoneINTEL = 16,
},
FunctionControlMask = {
@@ -699,6 +707,7 @@ spv = {
DontInline = 0x00000002,
Pure = 0x00000004,
Const = 0x00000008,
OptNoneINTEL = 0x00010000,
},
MemorySemanticsShift = {
@@ -951,6 +960,7 @@ spv = {
StorageTexelBufferArrayNonUniformIndexing = 5312,
StorageTexelBufferArrayNonUniformIndexingEXT = 5312,
RayTracingNV = 5340,
RayTracingMotionBlurNV = 5341,
VulkanMemoryModel = 5345,
VulkanMemoryModelKHR = 5345,
VulkanMemoryModelDeviceScope = 5346,
@@ -965,6 +975,7 @@ spv = {
ShaderSMBuiltinsNV = 5373,
FragmentShaderPixelInterlockEXT = 5378,
DemoteToHelperInvocationEXT = 5379,
BindlessTextureNV = 5390,
SubgroupShuffleINTEL = 5568,
SubgroupBufferBlockIOINTEL = 5569,
SubgroupImageBlockIOINTEL = 5570,
@@ -1011,6 +1022,7 @@ spv = {
AtomicFloat32AddEXT = 6033,
AtomicFloat64AddEXT = 6034,
LongConstantCompositeINTEL = 6089,
OptNoneINTEL = 6094,
AtomicFloat16AddEXT = 6095,
DebugInfoModuleINTEL = 6114,
},
@@ -1494,6 +1506,8 @@ spv = {
OpIgnoreIntersectionNV = 5335,
OpTerminateRayNV = 5336,
OpTraceNV = 5337,
OpTraceMotionNV = 5338,
OpTraceRayMotionNV = 5339,
OpTypeAccelerationStructureKHR = 5341,
OpTypeAccelerationStructureNV = 5341,
OpExecuteCallableNV = 5344,
@@ -1506,6 +1520,13 @@ spv = {
OpEndInvocationInterlockEXT = 5365,
OpDemoteToHelperInvocationEXT = 5380,
OpIsHelperInvocationEXT = 5381,
OpConvertUToImageNV = 5391,
OpConvertUToSamplerNV = 5392,
OpConvertImageToUNV = 5393,
OpConvertSamplerToUNV = 5394,
OpConvertUToSampledImageNV = 5395,
OpConvertSampledImageToUNV = 5396,
OpSamplerImageAddressingModeNV = 5397,
OpSubgroupShuffleINTEL = 5571,
OpSubgroupShuffleDownINTEL = 5572,
OpSubgroupShuffleUpINTEL = 5573,
@@ -1530,7 +1551,7 @@ spv = {
OpUSubSatINTEL = 5596,
OpIMul32x16INTEL = 5597,
OpUMul32x16INTEL = 5598,
OpConstFunctionPointerINTEL = 5600,
OpConstantFunctionPointerINTEL = 5600,
OpFunctionPointerCallINTEL = 5601,
OpAsmTargetINTEL = 5609,
OpAsmINTEL = 5610,
@@ -332,6 +332,7 @@ spv = {
'VolatileTexelKHR' : 11,
'SignExtend' : 12,
'ZeroExtend' : 13,
'Offsets' : 16,
},
'ImageOperandsMask' : {
@@ -354,6 +355,7 @@ spv = {
'VolatileTexelKHR' : 0x00000800,
'SignExtend' : 0x00001000,
'ZeroExtend' : 0x00002000,
'Offsets' : 0x00010000,
},
'FPFastMathModeShift' : {
@@ -472,6 +474,10 @@ spv = {
'RestrictPointerEXT' : 5355,
'AliasedPointer' : 5356,
'AliasedPointerEXT' : 5356,
'BindlessSamplerNV' : 5398,
'BindlessImageNV' : 5399,
'BoundSamplerNV' : 5400,
'BoundImageNV' : 5401,
'SIMTCallINTEL' : 5599,
'ReferencedIndirectlyINTEL' : 5602,
'ClobberINTEL' : 5607,
@@ -625,6 +631,7 @@ spv = {
'HitTNV' : 5332,
'HitKindKHR' : 5333,
'HitKindNV' : 5333,
'CurrentRayTimeNV' : 5334,
'IncomingRayFlagsKHR' : 5351,
'IncomingRayFlagsNV' : 5351,
'RayGeometryIndexKHR' : 5352,
@@ -691,6 +698,7 @@ spv = {
'DontInline' : 1,
'Pure' : 2,
'Const' : 3,
'OptNoneINTEL' : 16,
},
'FunctionControlMask' : {
@@ -699,6 +707,7 @@ spv = {
'DontInline' : 0x00000002,
'Pure' : 0x00000004,
'Const' : 0x00000008,
'OptNoneINTEL' : 0x00010000,
},
'MemorySemanticsShift' : {
@@ -951,6 +960,7 @@ spv = {
'StorageTexelBufferArrayNonUniformIndexing' : 5312,
'StorageTexelBufferArrayNonUniformIndexingEXT' : 5312,
'RayTracingNV' : 5340,
'RayTracingMotionBlurNV' : 5341,
'VulkanMemoryModel' : 5345,
'VulkanMemoryModelKHR' : 5345,
'VulkanMemoryModelDeviceScope' : 5346,
@@ -965,6 +975,7 @@ spv = {
'ShaderSMBuiltinsNV' : 5373,
'FragmentShaderPixelInterlockEXT' : 5378,
'DemoteToHelperInvocationEXT' : 5379,
'BindlessTextureNV' : 5390,
'SubgroupShuffleINTEL' : 5568,
'SubgroupBufferBlockIOINTEL' : 5569,
'SubgroupImageBlockIOINTEL' : 5570,
@@ -1011,6 +1022,7 @@ spv = {
'AtomicFloat32AddEXT' : 6033,
'AtomicFloat64AddEXT' : 6034,
'LongConstantCompositeINTEL' : 6089,
'OptNoneINTEL' : 6094,
'AtomicFloat16AddEXT' : 6095,
'DebugInfoModuleINTEL' : 6114,
},
@@ -1494,6 +1506,8 @@ spv = {
'OpIgnoreIntersectionNV' : 5335,
'OpTerminateRayNV' : 5336,
'OpTraceNV' : 5337,
'OpTraceMotionNV' : 5338,
'OpTraceRayMotionNV' : 5339,
'OpTypeAccelerationStructureKHR' : 5341,
'OpTypeAccelerationStructureNV' : 5341,
'OpExecuteCallableNV' : 5344,
@@ -1506,6 +1520,13 @@ spv = {
'OpEndInvocationInterlockEXT' : 5365,
'OpDemoteToHelperInvocationEXT' : 5380,
'OpIsHelperInvocationEXT' : 5381,
'OpConvertUToImageNV' : 5391,
'OpConvertUToSamplerNV' : 5392,
'OpConvertImageToUNV' : 5393,
'OpConvertSamplerToUNV' : 5394,
'OpConvertUToSampledImageNV' : 5395,
'OpConvertSampledImageToUNV' : 5396,
'OpSamplerImageAddressingModeNV' : 5397,
'OpSubgroupShuffleINTEL' : 5571,
'OpSubgroupShuffleDownINTEL' : 5572,
'OpSubgroupShuffleUpINTEL' : 5573,
@@ -1530,7 +1551,7 @@ spv = {
'OpUSubSatINTEL' : 5596,
'OpIMul32x16INTEL' : 5597,
'OpUMul32x16INTEL' : 5598,
'OpConstFunctionPointerINTEL' : 5600,
'OpConstantFunctionPointerINTEL' : 5600,
'OpFunctionPointerCallINTEL' : 5601,
'OpAsmTargetINTEL' : 5609,
'OpAsmINTEL' : 5610,
@@ -352,6 +352,7 @@ enum ImageOperandsShift : uint
VolatileTexelKHR = 11,
SignExtend = 12,
ZeroExtend = 13,
Offsets = 16,
}
enum ImageOperandsMask : uint
@@ -375,6 +376,7 @@ enum ImageOperandsMask : uint
VolatileTexelKHR = 0x00000800,
SignExtend = 0x00001000,
ZeroExtend = 0x00002000,
Offsets = 0x00010000,
}
enum FPFastMathModeShift : uint
@@ -500,6 +502,10 @@ enum Decoration : uint
RestrictPointerEXT = 5355,
AliasedPointer = 5356,
AliasedPointerEXT = 5356,
BindlessSamplerNV = 5398,
BindlessImageNV = 5399,
BoundSamplerNV = 5400,
BoundImageNV = 5401,
SIMTCallINTEL = 5599,
ReferencedIndirectlyINTEL = 5602,
ClobberINTEL = 5607,
@@ -654,6 +660,7 @@ enum BuiltIn : uint
HitTNV = 5332,
HitKindKHR = 5333,
HitKindNV = 5333,
CurrentRayTimeNV = 5334,
IncomingRayFlagsKHR = 5351,
IncomingRayFlagsNV = 5351,
RayGeometryIndexKHR = 5352,
@@ -725,6 +732,7 @@ enum FunctionControlShift : uint
DontInline = 1,
Pure = 2,
Const = 3,
OptNoneINTEL = 16,
}
enum FunctionControlMask : uint
@@ -734,6 +742,7 @@ enum FunctionControlMask : uint
DontInline = 0x00000002,
Pure = 0x00000004,
Const = 0x00000008,
OptNoneINTEL = 0x00010000,
}
enum MemorySemanticsShift : uint
@@ -996,6 +1005,7 @@ enum Capability : uint
StorageTexelBufferArrayNonUniformIndexing = 5312,
StorageTexelBufferArrayNonUniformIndexingEXT = 5312,
RayTracingNV = 5340,
RayTracingMotionBlurNV = 5341,
VulkanMemoryModel = 5345,
VulkanMemoryModelKHR = 5345,
VulkanMemoryModelDeviceScope = 5346,
@@ -1010,6 +1020,7 @@ enum Capability : uint
ShaderSMBuiltinsNV = 5373,
FragmentShaderPixelInterlockEXT = 5378,
DemoteToHelperInvocationEXT = 5379,
BindlessTextureNV = 5390,
SubgroupShuffleINTEL = 5568,
SubgroupBufferBlockIOINTEL = 5569,
SubgroupImageBlockIOINTEL = 5570,
@@ -1056,6 +1067,7 @@ enum Capability : uint
AtomicFloat32AddEXT = 6033,
AtomicFloat64AddEXT = 6034,
LongConstantCompositeINTEL = 6089,
OptNoneINTEL = 6094,
AtomicFloat16AddEXT = 6095,
DebugInfoModuleINTEL = 6114,
}
@@ -1552,6 +1564,8 @@ enum Op : uint
OpIgnoreIntersectionNV = 5335,
OpTerminateRayNV = 5336,
OpTraceNV = 5337,
OpTraceMotionNV = 5338,
OpTraceRayMotionNV = 5339,
OpTypeAccelerationStructureKHR = 5341,
OpTypeAccelerationStructureNV = 5341,
OpExecuteCallableNV = 5344,
@@ -1564,6 +1578,13 @@ enum Op : uint
OpEndInvocationInterlockEXT = 5365,
OpDemoteToHelperInvocationEXT = 5380,
OpIsHelperInvocationEXT = 5381,
OpConvertUToImageNV = 5391,
OpConvertUToSamplerNV = 5392,
OpConvertImageToUNV = 5393,
OpConvertSamplerToUNV = 5394,
OpConvertUToSampledImageNV = 5395,
OpConvertSampledImageToUNV = 5396,
OpSamplerImageAddressingModeNV = 5397,
OpSubgroupShuffleINTEL = 5571,
OpSubgroupShuffleDownINTEL = 5572,
OpSubgroupShuffleUpINTEL = 5573,
@@ -1588,7 +1609,7 @@ enum Op : uint
OpUSubSatINTEL = 5596,
OpIMul32x16INTEL = 5597,
OpUMul32x16INTEL = 5598,
OpConstFunctionPointerINTEL = 5600,
OpConstantFunctionPointerINTEL = 5600,
OpFunctionPointerCallINTEL = 5601,
OpAsmTargetINTEL = 5609,
OpAsmINTEL = 5610,
+28 -23
View File
@@ -1,17 +1,17 @@
From f2c7730fd3246c70c6cb23f1637aa05a3a8b517a Mon Sep 17 00:00:00 2001
From 468f1935352773b5f9975cae8800ed148b0c8bf3 Mon Sep 17 00:00:00 2001
From: Benjamin Doherty <bendoherty@google.com>
Date: Tue, 1 Jun 2021 23:31:16 -0700
Date: Tue, 2 Nov 2021 14:48:14 -0700
Subject: [PATCH] Filament specific changes
---
third_party/spirv-tools/CMakeLists.txt | 86 ++++++++++++-------
third_party/spirv-tools/CMakeLists.txt | 94 ++++++++++++-------
.../spirv-tools/external/CMakeLists.txt | 6 +-
.../external/spirv-headers/CMakeLists.txt | 8 +-
third_party/spirv-tools/source/CMakeLists.txt | 26 ++++--
4 files changed, 81 insertions(+), 45 deletions(-)
third_party/spirv-tools/source/CMakeLists.txt | 26 +++--
4 files changed, 86 insertions(+), 48 deletions(-)
diff --git a/third_party/spirv-tools/CMakeLists.txt b/third_party/spirv-tools/CMakeLists.txt
index 55f84e6d8..41ae7897c 100755
index 70caf857a..3991bf660 100755
--- a/third_party/spirv-tools/CMakeLists.txt
+++ b/third_party/spirv-tools/CMakeLists.txt
@@ -24,8 +24,19 @@ if (POLICY CMP0054)
@@ -35,7 +35,7 @@ index 55f84e6d8..41ae7897c 100755
set(SPIRV_TOOLS "SPIRV-Tools")
include(GNUInstallDirs)
@@ -68,7 +79,9 @@ if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
@@ -71,7 +82,9 @@ if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
set(CMAKE_BUILD_TYPE "Debug")
endif()
@@ -46,9 +46,9 @@ index 55f84e6d8..41ae7897c 100755
if(NOT ${SKIP_SPIRV_TOOLS_INSTALL})
set(ENABLE_SPIRV_TOOLS_INSTALL ON)
endif()
@@ -81,7 +94,10 @@ endif(SPIRV_BUILD_COMPRESSION)
@@ -88,7 +101,10 @@ set(SPIRV_LIB_FUZZING_ENGINE_LINK_OPTIONS "" CACHE STRING "Used by OSS-Fuzz to c
option(SPIRV_BUILD_FUZZER "Build spirv-fuzz" OFF)
option(SPIRV_BUILD_LIBFUZZER_TARGETS "Build libFuzzer targets" OFF)
-option(SPIRV_WERROR "Enable error on warning" ON)
+# Filament specific changes
@@ -58,36 +58,41 @@ index 55f84e6d8..41ae7897c 100755
if(("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR (("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") AND (NOT CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")))
set(COMPILER_IS_LIKE_GNU TRUE)
endif()
@@ -230,7 +246,11 @@ if(NOT COMMAND find_host_program)
@@ -243,7 +259,13 @@ if(NOT COMMAND find_host_program)
endif()
# Tests require Python3
-find_host_package(PythonInterp 3 REQUIRED)
+# Filament specific changes
+if(CMAKE_VERSION VERSION_LESS "3.12" OR ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
+ find_host_package(PythonInterp 3 REQUIRED)
+else()
+ find_package(Python3 COMPONENTS Interpreter)
+endif()
+# End Filament specific changes
# Check for symbol exports on Linux.
# At the moment, this check will fail on the OSX build machines for the Android NDK.
@@ -273,11 +293,13 @@ if(ENABLE_SPIRV_TOOLS_INSTALL)
@@ -286,11 +308,13 @@ if(ENABLE_SPIRV_TOOLS_INSTALL)
endif()
# Defaults to OFF if the user didn't set it.
+# Filament specific changes
option(SPIRV_SKIP_EXECUTABLES
"Skip building the executable and tests along with the library"
-option(SPIRV_SKIP_EXECUTABLES
- "Skip building the executable and tests along with the library"
- ${SPIRV_SKIP_EXECUTABLES})
+ ${SPIRV_SKIP_EXECUTABLES_OPTION})
option(SPIRV_SKIP_TESTS
-option(SPIRV_SKIP_TESTS
- "Skip building tests along with the library" ${SPIRV_SKIP_TESTS})
+# Filament specific changes
+ option(SPIRV_SKIP_EXECUTABLES
+ "Skip building the executable and tests along with the library"
+ ${SPIRV_SKIP_EXECUTABLES_OPTION})
+ option(SPIRV_SKIP_TESTS
+ "Skip building tests along with the library" ${SPIRV_SKIP_TESTS_OPTION})
+# End Filament specific changes
if ("${SPIRV_SKIP_EXECUTABLES}")
set(SPIRV_SKIP_TESTS ON)
endif()
@@ -321,8 +343,10 @@ endif()
@@ -334,8 +358,10 @@ endif()
add_subdirectory(source)
add_subdirectory(tools)
@@ -100,7 +105,7 @@ index 55f84e6d8..41ae7897c 100755
if(ENABLE_SPIRV_TOOLS_INSTALL)
install(
@@ -347,28 +371,30 @@ set(SPIRV_SHARED_LIBRARIES "-lSPIRV-Tools-shared")
@@ -360,28 +386,30 @@ set(SPIRV_SHARED_LIBRARIES "-lSPIRV-Tools-shared")
# Build pkg-config file
# Use a first-class target so it's regenerated when relevant files are updated.
@@ -171,7 +176,7 @@ index 179a4012f..152cfc421 100644
endif()
else()
diff --git a/third_party/spirv-tools/external/spirv-headers/CMakeLists.txt b/third_party/spirv-tools/external/spirv-headers/CMakeLists.txt
index 6f01ef098..ef2e56606 100644
index c11150008..1a1fe9548 100644
--- a/third_party/spirv-tools/external/spirv-headers/CMakeLists.txt
+++ b/third_party/spirv-tools/external/spirv-headers/CMakeLists.txt
@@ -49,11 +49,11 @@ add_custom_target(install-headers
@@ -191,10 +196,10 @@ index 6f01ef098..ef2e56606 100644
if(NOT ${SPIRV_HEADERS_SKIP_EXAMPLES})
set(SPIRV_HEADERS_ENABLE_EXAMPLES ON)
diff --git a/third_party/spirv-tools/source/CMakeLists.txt b/third_party/spirv-tools/source/CMakeLists.txt
index 6633bc916..5f5904567 100644
index 331ff6755..ef6eb8e77 100644
--- a/third_party/spirv-tools/source/CMakeLists.txt
+++ b/third_party/spirv-tools/source/CMakeLists.txt
@@ -364,13 +364,15 @@ endfunction()
@@ -371,13 +371,15 @@ endfunction()
# Always build ${SPIRV_TOOLS}-shared. This is expected distro packages, and
# unlike the other SPIRV_TOOLS target, defaults to hidden symbol visibility.
@@ -217,7 +222,7 @@ index 6633bc916..5f5904567 100644
if(SPIRV_TOOLS_BUILD_STATIC)
add_library(${SPIRV_TOOLS}-static STATIC ${SPIRV_SOURCES})
@@ -386,11 +388,17 @@ if(SPIRV_TOOLS_BUILD_STATIC)
@@ -393,11 +395,17 @@ if(SPIRV_TOOLS_BUILD_STATIC)
add_library(${SPIRV_TOOLS} ALIAS ${SPIRV_TOOLS}-static)
endif()
@@ -238,5 +243,5 @@ index 6633bc916..5f5904567 100644
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
--
2.32.0.rc0.204.g9fa02ecfa5-goog
2.33.1.1089.g2158813163f-goog
@@ -309,6 +309,7 @@ typedef enum spv_ext_inst_type_t {
SPV_EXT_INST_TYPE_DEBUGINFO,
SPV_EXT_INST_TYPE_OPENCL_DEBUGINFO_100,
SPV_EXT_INST_TYPE_NONSEMANTIC_CLSPVREFLECTION,
SPV_EXT_INST_TYPE_NONSEMANTIC_SHADER_DEBUGINFO_100,
// Multiple distinct extended instruction set types could return this
// value, if they are prefixed with NonSemantic. and are otherwise
@@ -515,6 +516,7 @@ typedef enum {
SPV_ENV_UNIVERSAL_1_5, // SPIR-V 1.5 latest revision, no other restrictions.
SPV_ENV_VULKAN_1_2, // Vulkan 1.2 latest revision.
SPV_ENV_MAX // Keep this as the last enum value.
} spv_target_env;
// SPIR-V Validator can be parameterized with the following Universal Limits.
@@ -658,6 +660,11 @@ SPIRV_TOOLS_EXPORT void spvValidatorOptionsSetWorkgroupScalarBlockLayout(
SPIRV_TOOLS_EXPORT void spvValidatorOptionsSetSkipBlockLayout(
spv_validator_options options, bool val);
// Records whether or not the validator should allow the LocalSizeId
// decoration where the environment otherwise would not allow it.
SPIRV_TOOLS_EXPORT void spvValidatorOptionsSetAllowLocalSizeId(
spv_validator_options options, bool val);
// Creates an optimizer options object with default options. Returns a valid
// options object. The object remains valid until it is passed into
// |spvOptimizerOptionsDestroy|.
@@ -115,6 +115,12 @@ class ValidatorOptions {
spvValidatorOptionsSetSkipBlockLayout(options_, val);
}
// Enables LocalSizeId decorations where the environment would not otherwise
// allow them.
void SetAllowLocalSizeId(bool val) {
spvValidatorOptionsSetAllowLocalSizeId(options_, val);
}
// Records whether or not the validator should relax the rules on pointer
// usage in logical addressing mode.
//
+48
View File
@@ -0,0 +1,48 @@
// Copyright (c) 2021 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef INCLUDE_SPIRV_TOOLS_LINTER_HPP_
#define INCLUDE_SPIRV_TOOLS_LINTER_HPP_
#include "libspirv.hpp"
namespace spvtools {
// C++ interface for SPIR-V linting functionalities. It wraps the context
// (including target environment and the corresponding SPIR-V grammar) and
// provides a method for linting.
//
// Instances of this class provides basic thread-safety guarantee.
class Linter {
public:
explicit Linter(spv_target_env env);
~Linter();
// Sets the message consumer to the given |consumer|. The |consumer| will be
// invoked once for each message communicated from the library.
void SetMessageConsumer(MessageConsumer consumer);
// Returns a reference to the registered message consumer.
const MessageConsumer& Consumer() const;
bool Run(const uint32_t* binary, size_t binary_size);
private:
struct Impl;
std::unique_ptr<Impl> impl_;
};
} // namespace spvtools
#endif // INCLUDE_SPIRV_TOOLS_LINTER_HPP_
+31 -4
View File
@@ -19,6 +19,7 @@
#include <ostream>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
#include "libspirv.hpp"
@@ -27,7 +28,8 @@ namespace spvtools {
namespace opt {
class Pass;
}
struct DescriptorSetAndBinding;
} // namespace opt
// C++ interface for SPIR-V optimization functionalities. It wraps the context
// (including target environment and the corresponding SPIR-V grammar) and
@@ -512,7 +514,12 @@ Optimizer::PassToken CreateDeadInsertElimPass();
// Conversion, which tends to cause cycles of dead code to be left after
// Store/Load elimination passes are completed. These cycles cannot be
// eliminated with standard dead code elimination.
Optimizer::PassToken CreateAggressiveDCEPass();
//
// If |preserve_interface| is true, all non-io variables in the entry point
// interface are considered live and are not eliminated. This mode is needed
// by GPU-Assisted validation instrumentation, where a change in the interface
// is not allowed.
Optimizer::PassToken CreateAggressiveDCEPass(bool preserve_interface = false);
// Creates a remove-unused-interface-variables pass.
// Removes variables referenced on the |OpEntryPoint| instruction that are not
@@ -699,8 +706,11 @@ Optimizer::PassToken CreateVectorDCEPass();
// Create a pass to reduce the size of loads.
// This pass looks for loads of structures where only a few of its members are
// used. It replaces the loads feeding an OpExtract with an OpAccessChain and
// a load of the specific elements.
Optimizer::PassToken CreateReduceLoadSizePass();
// a load of the specific elements. The parameter is a threshold to determine
// whether we have to replace the load or not. If the ratio of the used
// components of the load is less than the threshold, we replace the load.
Optimizer::PassToken CreateReduceLoadSizePass(
double load_replacement_threshold = 0.9);
// Create a pass to combine chained access chains.
// This pass looks for access chains fed by other access chains and combines
@@ -823,6 +833,13 @@ Optimizer::PassToken CreateFixStorageClassPass();
// inclusive.
Optimizer::PassToken CreateGraphicsRobustAccessPass();
// Create a pass to replace a descriptor access using variable index.
// This pass replaces every access using a variable index to array variable
// |desc| that has a DescriptorSet and Binding decorations with a constant
// element of the array. In order to replace the access using a variable index
// with the constant element, it uses a switch statement.
Optimizer::PassToken CreateReplaceDescArrayAccessUsingVarIndexPass();
// Create descriptor scalar replacement pass.
// This pass replaces every array variable |desc| that has a DescriptorSet and
// Binding decorations with a new variable for each element of the array.
@@ -854,6 +871,16 @@ Optimizer::PassToken CreateAmdExtToKhrPass();
// propagated into their final positions.
Optimizer::PassToken CreateInterpolateFixupPass();
// Creates a convert-to-sampled-image pass to convert images and/or
// samplers with given pairs of descriptor set and binding to sampled image.
// If a pair of an image and a sampler have the same pair of descriptor set and
// binding that is one of the given pairs, they will be converted to a sampled
// image. In addition, if only an image has the descriptor set and binding that
// is one of the given pairs, it will be converted to a sampled image as well.
Optimizer::PassToken CreateConvertToSampledImagePass(
const std::vector<opt::DescriptorSetAndBinding>&
descriptor_set_binding_pairs);
} // namespace spvtools
#endif // INCLUDE_SPIRV_TOOLS_OPTIMIZER_HPP_
+24
View File
@@ -0,0 +1,24 @@
#!/bin/bash
# Copyright (c) 2021 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Linux Build Script.
# Fail on any error.
set -e
# Display commands being run.
set -x
SCRIPT_DIR=`dirname "$BASH_SOURCE"`
source $SCRIPT_DIR/../scripts/linux/build.sh UBSAN clang cmake
@@ -0,0 +1,16 @@
# Copyright (c) 2021 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Continuous build configuration.
build_file: "SPIRV-Tools/kokoro/linux-clang-ubsan/build.sh"
@@ -0,0 +1,16 @@
# Copyright (c) 2021 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Presubmit build configuration.
build_file: "SPIRV-Tools/kokoro/linux-clang-ubsan/build.sh"
@@ -51,14 +51,14 @@ clone_if_missing https://github.com/google/googletest external/googlete
pushd external/googletest; git reset --hard 1fb1bb23bb8418dc73a5a9a82bbed31dc610fec7; popd
clone_if_missing https://github.com/google/effcee external/effcee --depth=1
clone_if_missing https://github.com/google/re2 external/re2 --depth=1
clone_if_missing https://github.com/protocolbuffers/protobuf external/protobuf --branch v3.13.0
clone_if_missing https://github.com/protocolbuffers/protobuf external/protobuf --branch v3.13.0.1
if [ $TOOL = "cmake" ]; then
using cmake-3.17.2
using ninja-1.10.0
# Possible configurations are:
# ASAN, COVERAGE, RELEASE, DEBUG, DEBUG_EXCEPTION, RELEASE_MINGW
# ASAN, UBSAN, COVERAGE, RELEASE, DEBUG, DEBUG_EXCEPTION, RELEASE_MINGW
BUILD_TYPE="Debug"
if [ $CONFIG = "RELEASE" ] || [ $CONFIG = "RELEASE_MINGW" ]; then
BUILD_TYPE="RelWithDebInfo"
@@ -69,6 +69,13 @@ if [ $TOOL = "cmake" ]; then
if [ $CONFIG = "ASAN" ]; then
ADDITIONAL_CMAKE_FLAGS="-DSPIRV_USE_SANITIZER=address,bounds,null"
[ $COMPILER = "clang" ] || { echo "$CONFIG requires clang"; exit 1; }
elif [ $CONFIG = "UBSAN" ]; then
# UBSan requires RTTI, and by default UBSan does not exit when errors are
# encountered - additional compiler options are required to force this.
# The -DSPIRV_USE_SANITIZER=undefined option instructs SPIR-V Tools to be
# built with UBSan enabled.
ADDITIONAL_CMAKE_FLAGS="-DSPIRV_USE_SANITIZER=undefined -DENABLE_RTTI=ON -DCMAKE_C_FLAGS=-fno-sanitize-recover=all -DCMAKE_CXX_FLAGS=-fno-sanitize-recover=all"
[ $COMPILER = "clang" ] || { echo "$CONFIG requires clang"; exit 1; }
elif [ $CONFIG = "COVERAGE" ]; then
ADDITIONAL_CMAKE_FLAGS="-DENABLE_CODE_COVERAGE=ON"
SKIP_TESTS="True"
@@ -79,6 +86,10 @@ if [ $TOOL = "cmake" ]; then
SKIP_TESTS="True"
fi
if [ $COMPILER = "clang" ]; then
ADDITIONAL_CMAKE_FLAGS="$ADDITIONAL_CMAKE_FLAGS -DSPIRV_BUILD_LIBFUZZER_TARGETS=ON"
fi
clean_dir "$ROOT_DIR/build"
cd "$ROOT_DIR/build"
+1 -1
View File
@@ -36,7 +36,7 @@ git clone https://github.com/google/googletest external/googletest
cd external && cd googletest && git reset --hard 1fb1bb23bb8418dc73a5a9a82bbed31dc610fec7 && cd .. && cd ..
git clone --depth=1 https://github.com/google/effcee external/effcee
git clone --depth=1 https://github.com/google/re2 external/re2
git clone --depth=1 --branch v3.13.0 https://github.com/protocolbuffers/protobuf external/protobuf
git clone --depth=1 --branch v3.13.0.1 https://github.com/protocolbuffers/protobuf external/protobuf
mkdir build && cd $SRC/build
+2 -2
View File
@@ -30,7 +30,7 @@ git clone https://github.com/google/googletest external/googletest
cd external && cd googletest && git reset --hard 1fb1bb23bb8418dc73a5a9a82bbed31dc610fec7 && cd .. && cd ..
git clone --depth=1 https://github.com/google/effcee external/effcee
git clone --depth=1 https://github.com/google/re2 external/re2
git clone --depth=1 --branch v3.13.0 https://github.com/protocolbuffers/protobuf external/protobuf
git clone --depth=1 --branch v3.13.0.1 https://github.com/protocolbuffers/protobuf external/protobuf
:: #########################################
:: set up msvc build env
@@ -93,4 +93,4 @@ zip -r install.zip install
rm -rf %SRC%\build
rm -rf %SRC%\external
exit /b 0
exit /b 0
+13 -4
View File
@@ -17,10 +17,10 @@ set(VIMSYNTAX_PROCESSING_SCRIPT "${spirv-tools_SOURCE_DIR}/utils/generate_vim_sy
set(XML_REGISTRY_PROCESSING_SCRIPT "${spirv-tools_SOURCE_DIR}/utils/generate_registry_tables.py")
set(LANG_HEADER_PROCESSING_SCRIPT "${spirv-tools_SOURCE_DIR}/utils/generate_language_headers.py")
# For now, assume the DebugInfo grammar file is in the current directory.
# It might migrate to SPIRV-Headers.
# Pull in grammar files that have migrated to SPIRV-Headers
set(DEBUGINFO_GRAMMAR_JSON_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/unified1/extinst.debuginfo.grammar.json")
set(CLDEBUGINFO100_GRAMMAR_JSON_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json")
set(VKDEBUGINFO100_GRAMMAR_JSON_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/unified1/extinst.nonsemantic.shader.debuginfo.100.grammar.json")
# macro() definitions are used in the following because we need to append .inc
# file paths into some global lists (*_CPP_DEPENDS). And those global lists are
@@ -113,6 +113,9 @@ endmacro(spvtools_opencl_tables)
macro(spvtools_vendor_tables VENDOR_TABLE SHORT_NAME OPERAND_KIND_PREFIX)
set(INSTS_FILE "${spirv-tools_BINARY_DIR}/${VENDOR_TABLE}.insts.inc")
set(GRAMMAR_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/unified1/extinst.${VENDOR_TABLE}.grammar.json")
if(NOT EXISTS ${GRAMMAR_FILE})
set(GRAMMAR_FILE "${spirv-tools_SOURCE_DIR}/source/extinst.${VENDOR_TABLE}.grammar.json")
endif()
add_custom_command(OUTPUT ${INSTS_FILE}
COMMAND ${PYTHON_EXECUTABLE} ${GRAMMAR_PROCESSING_SCRIPT}
--extinst-vendor-grammar=${GRAMMAR_FILE}
@@ -148,9 +151,11 @@ spvtools_vendor_tables("spv-amd-gcn-shader" "spv-amd-gs" "")
spvtools_vendor_tables("spv-amd-shader-ballot" "spv-amd-sb" "")
spvtools_vendor_tables("debuginfo" "debuginfo" "")
spvtools_vendor_tables("opencl.debuginfo.100" "cldi100" "CLDEBUG100_")
spvtools_vendor_tables("nonsemantic.shader.debuginfo.100" "shdi100" "SHDEBUG100_")
spvtools_vendor_tables("nonsemantic.clspvreflection" "clspvreflection" "")
spvtools_extinst_lang_headers("DebugInfo" ${DEBUGINFO_GRAMMAR_JSON_FILE})
spvtools_extinst_lang_headers("OpenCLDebugInfo100" ${CLDEBUGINFO100_GRAMMAR_JSON_FILE})
spvtools_extinst_lang_headers("NonSemanticShaderDebugInfo100" ${VKDEBUGINFO100_GRAMMAR_JSON_FILE})
spvtools_vimsyntax("unified1" "1.0")
add_custom_target(spirv-tools-vimsyntax DEPENDS ${VIMSYNTAX_FILE})
@@ -211,6 +216,7 @@ add_subdirectory(opt)
add_subdirectory(reduce)
add_subdirectory(fuzz)
add_subdirectory(link)
add_subdirectory(lint)
set(SPIRV_SOURCES
${spirv-tools_SOURCE_DIR}/include/spirv-tools/libspirv.h
@@ -226,6 +232,7 @@ set(SPIRV_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/assembly_grammar.h
${CMAKE_CURRENT_SOURCE_DIR}/binary.h
${CMAKE_CURRENT_SOURCE_DIR}/cfa.h
${CMAKE_CURRENT_SOURCE_DIR}/common_debug_info.h
${CMAKE_CURRENT_SOURCE_DIR}/diagnostic.h
${CMAKE_CURRENT_SOURCE_DIR}/disassemble.h
${CMAKE_CURRENT_SOURCE_DIR}/enum_set.h
@@ -429,8 +436,10 @@ if(ENABLE_SPIRV_TOOLS_INSTALL)
# Special config file for root library compared to other libs.
file(WRITE ${CMAKE_BINARY_DIR}/${SPIRV_TOOLS}Config.cmake
"include(\${CMAKE_CURRENT_LIST_DIR}/${SPIRV_TOOLS}Target.cmake)\n"
"set(${SPIRV_TOOLS}_LIBRARIES ${SPIRV_TOOLS})\n"
"get_target_property(${SPIRV_TOOLS}_INCLUDE_DIRS ${SPIRV_TOOLS} INTERFACE_INCLUDE_DIRECTORIES)\n")
"if(TARGET ${SPIRV_TOOLS})\n"
" set(${SPIRV_TOOLS}_LIBRARIES ${SPIRV_TOOLS})\n"
" get_target_property(${SPIRV_TOOLS}_INCLUDE_DIRS ${SPIRV_TOOLS} INTERFACE_INCLUDE_DIRECTORIES)\n"
"endif()\n")
install(FILES ${CMAKE_BINARY_DIR}/${SPIRV_TOOLS}Config.cmake DESTINATION ${PACKAGE_DIR})
endif(ENABLE_SPIRV_TOOLS_INSTALL)
+2 -1
View File
@@ -507,7 +507,8 @@ spv_result_t Parser::parseOperand(size_t inst_offset,
case SPV_OPERAND_TYPE_SPEC_CONSTANT_OP_NUMBER: {
assert(SpvOpSpecConstantOp == opcode);
if (grammar_.lookupSpecConstantOpcode(SpvOp(word))) {
if (word > static_cast<uint32_t>(SpvOp::SpvOpMax) ||
grammar_.lookupSpecConstantOpcode(SpvOp(word))) {
return diagnostic()
<< "Invalid " << spvOperandTypeStr(type) << ": " << word;
}
+64
View File
@@ -0,0 +1,64 @@
// Copyright (c) 2021 The Khronos Group Inc.
// Copyright (c) 2021 Valve Corporation
// Copyright (c) 2021 LunarG Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef SOURCE_COMMON_DEBUG_INFO_HEADER_H_
#define SOURCE_COMMON_DEBUG_INFO_HEADER_H_
// This enum defines the known common set of instructions that are the same
// between OpenCL.DebugInfo.100 and NonSemantic.Shader.DebugInfo.100.
// Note that NonSemantic.Shader.* instructions can still have slightly
// different encoding, as it does not use literals anywhere and only constants.
enum CommonDebugInfoInstructions {
CommonDebugInfoDebugInfoNone = 0,
CommonDebugInfoDebugCompilationUnit = 1,
CommonDebugInfoDebugTypeBasic = 2,
CommonDebugInfoDebugTypePointer = 3,
CommonDebugInfoDebugTypeQualifier = 4,
CommonDebugInfoDebugTypeArray = 5,
CommonDebugInfoDebugTypeVector = 6,
CommonDebugInfoDebugTypedef = 7,
CommonDebugInfoDebugTypeFunction = 8,
CommonDebugInfoDebugTypeEnum = 9,
CommonDebugInfoDebugTypeComposite = 10,
CommonDebugInfoDebugTypeMember = 11,
CommonDebugInfoDebugTypeInheritance = 12,
CommonDebugInfoDebugTypePtrToMember = 13,
CommonDebugInfoDebugTypeTemplate = 14,
CommonDebugInfoDebugTypeTemplateParameter = 15,
CommonDebugInfoDebugTypeTemplateTemplateParameter = 16,
CommonDebugInfoDebugTypeTemplateParameterPack = 17,
CommonDebugInfoDebugGlobalVariable = 18,
CommonDebugInfoDebugFunctionDeclaration = 19,
CommonDebugInfoDebugFunction = 20,
CommonDebugInfoDebugLexicalBlock = 21,
CommonDebugInfoDebugLexicalBlockDiscriminator = 22,
CommonDebugInfoDebugScope = 23,
CommonDebugInfoDebugNoScope = 24,
CommonDebugInfoDebugInlinedAt = 25,
CommonDebugInfoDebugLocalVariable = 26,
CommonDebugInfoDebugInlinedVariable = 27,
CommonDebugInfoDebugDeclare = 28,
CommonDebugInfoDebugValue = 29,
CommonDebugInfoDebugOperation = 30,
CommonDebugInfoDebugExpression = 31,
CommonDebugInfoDebugMacroDef = 32,
CommonDebugInfoDebugMacroUndef = 33,
CommonDebugInfoDebugImportedEntity = 34,
CommonDebugInfoDebugSource = 35,
CommonDebugInfoInstructionsMax = 0x7ffffff
};
#endif // SOURCE_COMMON_DEBUG_INFO_HEADER_H_
+9
View File
@@ -29,6 +29,7 @@
#include "debuginfo.insts.inc"
#include "glsl.std.450.insts.inc"
#include "nonsemantic.clspvreflection.insts.inc"
#include "nonsemantic.shader.debuginfo.100.insts.inc"
#include "opencl.debuginfo.100.insts.inc"
#include "opencl.std.insts.inc"
@@ -55,6 +56,9 @@ static const spv_ext_inst_group_t kGroups_1_0[] = {
debuginfo_entries},
{SPV_EXT_INST_TYPE_OPENCL_DEBUGINFO_100,
ARRAY_SIZE(opencl_debuginfo_100_entries), opencl_debuginfo_100_entries},
{SPV_EXT_INST_TYPE_NONSEMANTIC_SHADER_DEBUGINFO_100,
ARRAY_SIZE(nonsemantic_shader_debuginfo_100_entries),
nonsemantic_shader_debuginfo_100_entries},
{SPV_EXT_INST_TYPE_NONSEMANTIC_CLSPVREFLECTION,
ARRAY_SIZE(nonsemantic_clspvreflection_entries),
nonsemantic_clspvreflection_entries},
@@ -126,6 +130,9 @@ spv_ext_inst_type_t spvExtInstImportTypeGet(const char* name) {
if (!strcmp("OpenCL.DebugInfo.100", name)) {
return SPV_EXT_INST_TYPE_OPENCL_DEBUGINFO_100;
}
if (!strcmp("NonSemantic.Shader.DebugInfo.100", name)) {
return SPV_EXT_INST_TYPE_NONSEMANTIC_SHADER_DEBUGINFO_100;
}
if (!strncmp("NonSemantic.ClspvReflection.", name, 28)) {
return SPV_EXT_INST_TYPE_NONSEMANTIC_CLSPVREFLECTION;
}
@@ -139,6 +146,7 @@ spv_ext_inst_type_t spvExtInstImportTypeGet(const char* name) {
bool spvExtInstIsNonSemantic(const spv_ext_inst_type_t type) {
if (type == SPV_EXT_INST_TYPE_NONSEMANTIC_UNKNOWN ||
type == SPV_EXT_INST_TYPE_NONSEMANTIC_SHADER_DEBUGINFO_100 ||
type == SPV_EXT_INST_TYPE_NONSEMANTIC_CLSPVREFLECTION) {
return true;
}
@@ -147,6 +155,7 @@ bool spvExtInstIsNonSemantic(const spv_ext_inst_type_t type) {
bool spvExtInstIsDebugInfo(const spv_ext_inst_type_t type) {
if (type == SPV_EXT_INST_TYPE_OPENCL_DEBUGINFO_100 ||
type == SPV_EXT_INST_TYPE_NONSEMANTIC_SHADER_DEBUGINFO_100 ||
type == SPV_EXT_INST_TYPE_DEBUGINFO) {
return true;
}
+4
View File
@@ -124,6 +124,7 @@ if(SPIRV_BUILD_FUZZER)
fuzzer_pass_swap_functions.h
fuzzer_pass_toggle_access_chain_instruction.h
fuzzer_pass_wrap_regions_in_selections.h
fuzzer_pass_wrap_vector_synonym.h
fuzzer_util.h
id_use_descriptor.h
instruction_descriptor.h
@@ -230,6 +231,7 @@ if(SPIRV_BUILD_FUZZER)
transformation_vector_shuffle.h
transformation_wrap_early_terminator_in_function.h
transformation_wrap_region_in_selection.h
transformation_wrap_vector_synonym.h
uniform_buffer_element_descriptor.h
${CMAKE_CURRENT_BINARY_DIR}/protobufs/spvtoolsfuzz.pb.h
@@ -319,6 +321,7 @@ if(SPIRV_BUILD_FUZZER)
fuzzer_pass_swap_functions.cpp
fuzzer_pass_toggle_access_chain_instruction.cpp
fuzzer_pass_wrap_regions_in_selections.cpp
fuzzer_pass_wrap_vector_synonym.cpp
fuzzer_util.cpp
id_use_descriptor.cpp
instruction_descriptor.cpp
@@ -423,6 +426,7 @@ if(SPIRV_BUILD_FUZZER)
transformation_vector_shuffle.cpp
transformation_wrap_early_terminator_in_function.cpp
transformation_wrap_region_in_selection.cpp
transformation_wrap_vector_synonym.cpp
uniform_buffer_element_descriptor.cpp
${CMAKE_CURRENT_BINARY_DIR}/protobufs/spvtoolsfuzz.pb.cc
)
+11 -4
View File
@@ -90,6 +90,7 @@
#include "source/fuzz/fuzzer_pass_swap_functions.h"
#include "source/fuzz/fuzzer_pass_toggle_access_chain_instruction.h"
#include "source/fuzz/fuzzer_pass_wrap_regions_in_selections.h"
#include "source/fuzz/fuzzer_pass_wrap_vector_synonym.h"
#include "source/fuzz/pass_management/repeated_pass_manager.h"
#include "source/fuzz/pass_management/repeated_pass_recommender_standard.h"
#include "source/fuzz/protobufs/spirvfuzz_protobufs.h"
@@ -109,7 +110,8 @@ Fuzzer::Fuzzer(std::unique_ptr<opt::IRContext> ir_context,
bool enable_all_passes,
RepeatedPassStrategy repeated_pass_strategy,
bool validate_after_each_fuzzer_pass,
spv_validator_options validator_options)
spv_validator_options validator_options,
bool ignore_inapplicable_transformations /* = true */)
: consumer_(std::move(consumer)),
enable_all_passes_(enable_all_passes),
validate_after_each_fuzzer_pass_(validate_after_each_fuzzer_pass),
@@ -123,7 +125,9 @@ Fuzzer::Fuzzer(std::unique_ptr<opt::IRContext> ir_context,
pass_instances_(),
repeated_pass_recommender_(nullptr),
repeated_pass_manager_(nullptr),
final_passes_() {
final_passes_(),
ignore_inapplicable_transformations_(
ignore_inapplicable_transformations) {
assert(ir_context_ && "IRContext is not initialized");
assert(fuzzer_context_ && "FuzzerContext is not initialized");
assert(transformation_context_ && "TransformationContext is not initialized");
@@ -214,6 +218,7 @@ Fuzzer::Fuzzer(std::unique_ptr<opt::IRContext> ir_context,
MaybeAddRepeatedPass<FuzzerPassSwapBranchConditionalOperands>(
&pass_instances_);
MaybeAddRepeatedPass<FuzzerPassWrapRegionsInSelections>(&pass_instances_);
MaybeAddRepeatedPass<FuzzerPassWrapVectorSynonym>(&pass_instances_);
// There is a theoretical possibility that no pass instances were created
// until now; loop again if so.
} while (pass_instances_.GetPasses().empty());
@@ -255,7 +260,8 @@ void Fuzzer::MaybeAddRepeatedPass(uint32_t percentage_chance_of_adding_pass,
fuzzer_context_->ChoosePercentage(percentage_chance_of_adding_pass)) {
pass_instances->SetPass(MakeUnique<FuzzerPassT>(
ir_context_.get(), transformation_context_.get(), fuzzer_context_.get(),
&transformation_sequence_out_, std::forward<Args>(extra_args)...));
&transformation_sequence_out_, ignore_inapplicable_transformations_,
std::forward<Args>(extra_args)...));
}
}
@@ -265,7 +271,8 @@ void Fuzzer::MaybeAddFinalPass(std::vector<std::unique_ptr<FuzzerPass>>* passes,
if (enable_all_passes_ || fuzzer_context_->ChooseEven()) {
passes->push_back(MakeUnique<FuzzerPassT>(
ir_context_.get(), transformation_context_.get(), fuzzer_context_.get(),
&transformation_sequence_out_, std::forward<Args>(extra_args)...));
&transformation_sequence_out_, ignore_inapplicable_transformations_,
std::forward<Args>(extra_args)...));
}
}
+8 -1
View File
@@ -62,7 +62,8 @@ class Fuzzer {
const std::vector<fuzzerutil::ModuleSupplier>& donor_suppliers,
bool enable_all_passes, RepeatedPassStrategy repeated_pass_strategy,
bool validate_after_each_fuzzer_pass,
spv_validator_options validator_options);
spv_validator_options validator_options,
bool ignore_inapplicable_transformations = true);
// Disables copy/move constructor/assignment operations.
Fuzzer(const Fuzzer&) = delete;
@@ -187,6 +188,12 @@ class Fuzzer {
// Some passes that it does not make sense to apply repeatedly, as they do not
// unlock other passes.
std::vector<std::unique_ptr<FuzzerPass>> final_passes_;
// When set, this flag causes inapplicable transformations that should be
// applicable by construction to be ignored. This is useful when the fuzzer
// is being deployed at scale to test a SPIR-V processing tool, and where it
// is desirable to ignore bugs in the fuzzer itself.
const bool ignore_inapplicable_transformations_;
};
} // namespace fuzz
@@ -42,6 +42,8 @@ const std::pair<uint32_t, uint32_t> kChanceOfAddingAnotherPassToPassLoop = {50,
const std::pair<uint32_t, uint32_t> kChanceOfAddingAnotherStructField = {20,
90};
const std::pair<uint32_t, uint32_t> kChanceOfAddingArrayOrStructType = {20, 90};
const std::pair<uint32_t, uint32_t> KChanceOfAddingAtomicLoad = {30, 90};
const std::pair<uint32_t, uint32_t> KChanceOfAddingAtomicStore = {20, 90};
const std::pair<uint32_t, uint32_t> kChanceOfAddingBitInstructionSynonym = {5,
20};
const std::pair<uint32_t, uint32_t>
@@ -162,6 +164,7 @@ const std::pair<uint32_t, uint32_t> kChanceOfTogglingAccessChainInstruction = {
20, 90};
const std::pair<uint32_t, uint32_t> kChanceOfWrappingRegionInSelection = {70,
90};
const std::pair<uint32_t, uint32_t> kChanceOfWrappingVectorSynonym = {10, 90};
// Default limits for various quantities that are chosen during fuzzing.
// Keep them in alphabetical order.
@@ -215,6 +218,10 @@ FuzzerContext::FuzzerContext(std::unique_ptr<RandomGenerator> random_generator,
ChooseBetweenMinAndMax(kChanceOfAddingAnotherStructField);
chance_of_adding_array_or_struct_type_ =
ChooseBetweenMinAndMax(kChanceOfAddingArrayOrStructType);
chance_of_adding_atomic_load_ =
ChooseBetweenMinAndMax(KChanceOfAddingAtomicLoad);
chance_of_adding_atomic_store_ =
ChooseBetweenMinAndMax(KChanceOfAddingAtomicStore);
chance_of_adding_bit_instruction_synonym_ =
ChooseBetweenMinAndMax(kChanceOfAddingBitInstructionSynonym);
chance_of_adding_both_branches_when_replacing_opselect_ =
@@ -369,6 +376,8 @@ FuzzerContext::FuzzerContext(std::unique_ptr<RandomGenerator> random_generator,
ChooseBetweenMinAndMax(kChanceOfTogglingAccessChainInstruction);
chance_of_wrapping_region_in_selection_ =
ChooseBetweenMinAndMax(kChanceOfWrappingRegionInSelection);
chance_of_wrapping_vector_synonym_ =
ChooseBetweenMinAndMax(kChanceOfWrappingVectorSynonym);
}
FuzzerContext::~FuzzerContext() = default;
+19
View File
@@ -142,6 +142,12 @@ class FuzzerContext {
uint32_t GetChanceOfAddingArrayOrStructType() const {
return chance_of_adding_array_or_struct_type_;
}
uint32_t GetChanceOfAddingAtomicLoad() const {
return chance_of_adding_atomic_load_;
}
uint32_t GetChanceOfAddingAtomicStore() const {
return chance_of_adding_atomic_store_;
}
uint32_t GetChanceOfAddingBitInstructionSynonym() const {
return chance_of_adding_bit_instruction_synonym_;
}
@@ -381,6 +387,10 @@ class FuzzerContext {
return chance_of_wrapping_region_in_selection_;
}
uint32_t GetChanceOfWrappingVectorSynonym() const {
return chance_of_wrapping_vector_synonym_;
}
// Other functions to control transformations. Keep them in alphabetical
// order.
uint32_t GetMaximumEquivalenceClassSizeForDataSynonymFactClosure() const {
@@ -425,6 +435,9 @@ class FuzzerContext {
uint32_t GetRandomIndexForCompositeInsert(uint32_t number_of_components) {
return random_generator_->RandomUint32(number_of_components);
}
uint32_t GetRandomIndexForWrappingVector(uint32_t vector_width) {
return random_generator_->RandomUint32(vector_width);
}
int64_t GetRandomValueForStepConstantInLoop() {
return random_generator_->RandomUint64(UINT64_MAX);
}
@@ -462,6 +475,9 @@ class FuzzerContext {
// Ensure that the number of unused components is non-zero.
return random_generator_->RandomUint32(max_unused_component_count) + 1;
}
uint32_t GetWidthOfWrappingVector() {
return 2 + random_generator_->RandomUint32(3);
}
bool GoDeeperInConstantObfuscation(uint32_t depth) {
return go_deeper_in_constant_obfuscation_(depth, random_generator_.get());
}
@@ -482,6 +498,8 @@ class FuzzerContext {
uint32_t chance_of_adding_another_pass_to_pass_loop_;
uint32_t chance_of_adding_another_struct_field_;
uint32_t chance_of_adding_array_or_struct_type_;
uint32_t chance_of_adding_atomic_load_;
uint32_t chance_of_adding_atomic_store_;
uint32_t chance_of_adding_bit_instruction_synonym_;
uint32_t chance_of_adding_both_branches_when_replacing_opselect_;
uint32_t chance_of_adding_composite_extract_;
@@ -562,6 +580,7 @@ class FuzzerContext {
uint32_t chance_of_swapping_functions_;
uint32_t chance_of_toggling_access_chain_instruction_;
uint32_t chance_of_wrapping_region_in_selection_;
uint32_t chance_of_wrapping_vector_synonym_;
// Limits associated with various quantities for which random values are
// chosen during fuzzing.
+22 -5
View File
@@ -43,11 +43,14 @@ namespace fuzz {
FuzzerPass::FuzzerPass(opt::IRContext* ir_context,
TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: ir_context_(ir_context),
transformation_context_(transformation_context),
fuzzer_context_(fuzzer_context),
transformations_(transformations) {}
transformations_(transformations),
ignore_inapplicable_transformations_(
ignore_inapplicable_transformations) {}
FuzzerPass::~FuzzerPass() = default;
@@ -183,9 +186,23 @@ void FuzzerPass::ForEachInstructionWithInstructionDescriptor(
}
void FuzzerPass::ApplyTransformation(const Transformation& transformation) {
assert(transformation.IsApplicable(GetIRContext(),
*GetTransformationContext()) &&
"Transformation should be applicable by construction.");
if (ignore_inapplicable_transformations_) {
// If an applicable-by-construction transformation turns out to be
// inapplicable, this is a bug in the fuzzer. However, when deploying the
// fuzzer at scale for finding bugs in SPIR-V processing tools it is
// desirable to silently ignore such bugs. This code path caters for that
// scenario.
if (!transformation.IsApplicable(GetIRContext(),
*GetTransformationContext())) {
return;
}
} else {
// This code path caters for debugging bugs in the fuzzer, where an
// applicable-by-construction transformation turns out to be inapplicable.
assert(transformation.IsApplicable(GetIRContext(),
*GetTransformationContext()) &&
"Transformation should be applicable by construction.");
}
transformation.Apply(GetIRContext(), GetTransformationContext());
auto transformation_message = transformation.ToMessage();
assert(transformation_message.transformation_case() !=
+6 -1
View File
@@ -33,7 +33,8 @@ class FuzzerPass {
FuzzerPass(opt::IRContext* ir_context,
TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
virtual ~FuzzerPass();
@@ -321,6 +322,10 @@ class FuzzerPass {
TransformationContext* transformation_context_;
FuzzerContext* fuzzer_context_;
protobufs::TransformationSequence* transformations_;
// If set, then transformations that should be applicable by construction are
// still tested for applicability, and ignored if they turn out to be
// inapplicable. Otherwise, applicability by construction is asserted.
const bool ignore_inapplicable_transformations_;
};
} // namespace fuzz
@@ -23,9 +23,10 @@ namespace fuzz {
FuzzerPassAddAccessChains::FuzzerPassAddAccessChains(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddAccessChains::Apply() {
ForEachInstructionWithInstructionDescriptor(
@@ -28,7 +28,8 @@ class FuzzerPassAddAccessChains : public FuzzerPass {
FuzzerPassAddAccessChains(opt::IRContext* ir_context,
TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
void Apply() override;
};
@@ -24,9 +24,10 @@ namespace fuzz {
FuzzerPassAddBitInstructionSynonyms::FuzzerPassAddBitInstructionSynonyms(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddBitInstructionSynonyms::Apply() {
for (auto& function : *GetIRContext()->module()) {
@@ -28,7 +28,8 @@ class FuzzerPassAddBitInstructionSynonyms : public FuzzerPass {
FuzzerPassAddBitInstructionSynonyms(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
void Apply() override;
};
@@ -26,9 +26,10 @@ namespace fuzz {
FuzzerPassAddCompositeExtract::FuzzerPassAddCompositeExtract(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddCompositeExtract::Apply() {
std::vector<const protobufs::DataDescriptor*> composite_synonyms;
@@ -27,7 +27,8 @@ class FuzzerPassAddCompositeExtract : public FuzzerPass {
FuzzerPassAddCompositeExtract(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
void Apply() override;
};
@@ -25,9 +25,10 @@ namespace fuzz {
FuzzerPassAddCompositeInserts::FuzzerPassAddCompositeInserts(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddCompositeInserts::Apply() {
ForEachInstructionWithInstructionDescriptor(
@@ -27,7 +27,8 @@ class FuzzerPassAddCompositeInserts : public FuzzerPass {
FuzzerPassAddCompositeInserts(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
void Apply() override;
@@ -24,9 +24,10 @@ namespace fuzz {
FuzzerPassAddCompositeTypes::FuzzerPassAddCompositeTypes(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddCompositeTypes::Apply() {
MaybeAddMissingVectorTypes();
@@ -27,7 +27,8 @@ class FuzzerPassAddCompositeTypes : public FuzzerPass {
FuzzerPassAddCompositeTypes(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
void Apply() override;
@@ -25,9 +25,10 @@ namespace fuzz {
FuzzerPassAddCopyMemory::FuzzerPassAddCopyMemory(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddCopyMemory::Apply() {
ForEachInstructionWithInstructionDescriptor(
@@ -27,7 +27,8 @@ class FuzzerPassAddCopyMemory : public FuzzerPass {
FuzzerPassAddCopyMemory(opt::IRContext* ir_context,
TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
void Apply() override;
};
@@ -31,9 +31,10 @@ const size_t kMaxTransformationsInOnePass = 100U;
FuzzerPassAddDeadBlocks::FuzzerPassAddDeadBlocks(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddDeadBlocks::Apply() {
// We iterate over all blocks in the module collecting up those at which we
@@ -27,7 +27,8 @@ class FuzzerPassAddDeadBlocks : public FuzzerPass {
FuzzerPassAddDeadBlocks(opt::IRContext* ir_context,
TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
void Apply() override;
};
@@ -24,9 +24,10 @@ namespace fuzz {
FuzzerPassAddDeadBreaks::FuzzerPassAddDeadBreaks(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddDeadBreaks::Apply() {
// We first collect up lots of possibly-applicable transformations.
@@ -26,7 +26,8 @@ class FuzzerPassAddDeadBreaks : public FuzzerPass {
FuzzerPassAddDeadBreaks(opt::IRContext* ir_context,
TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
void Apply() override;
};
@@ -24,9 +24,10 @@ namespace fuzz {
FuzzerPassAddDeadContinues::FuzzerPassAddDeadContinues(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddDeadContinues::Apply() {
// Consider every block in every function.
@@ -23,10 +23,11 @@ namespace fuzz {
// A fuzzer pass for adding dead continue edges to the module.
class FuzzerPassAddDeadContinues : public FuzzerPass {
public:
FuzzerPassAddDeadContinues(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
FuzzerPassAddDeadContinues(opt::IRContext* ir_context,
TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
void Apply() override;
};
@@ -45,9 +45,10 @@ bool IsBitWidthSupported(opt::IRContext* ir_context, uint32_t bit_width) {
FuzzerPassAddEquationInstructions::FuzzerPassAddEquationInstructions(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddEquationInstructions::Apply() {
ForEachInstructionWithInstructionDescriptor(
@@ -29,7 +29,8 @@ class FuzzerPassAddEquationInstructions : public FuzzerPass {
FuzzerPassAddEquationInstructions(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
void Apply() override;
@@ -26,9 +26,10 @@ namespace fuzz {
FuzzerPassAddFunctionCalls::FuzzerPassAddFunctionCalls(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddFunctionCalls::Apply() {
ForEachInstructionWithInstructionDescriptor(
@@ -24,10 +24,11 @@ namespace fuzz {
// anywhere, and (b) any functions, from dead blocks.
class FuzzerPassAddFunctionCalls : public FuzzerPass {
public:
FuzzerPassAddFunctionCalls(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
FuzzerPassAddFunctionCalls(opt::IRContext* ir_context,
TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
void Apply() override;
@@ -23,9 +23,10 @@ namespace fuzz {
FuzzerPassAddGlobalVariables::FuzzerPassAddGlobalVariables(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddGlobalVariables::Apply() {
SpvStorageClass variable_storage_class = SpvStorageClassPrivate;
@@ -47,6 +48,10 @@ void FuzzerPassAddGlobalVariables::Apply() {
// These are the basic types that are available to this fuzzer pass.
auto& basic_types = basic_type_ids_and_pointers.first;
if (basic_types.empty()) {
// There are no basic types, so there is nothing this fuzzer pass can do.
return;
}
// These are the pointers to those basic types that are *initially* available
// to the fuzzer pass. The fuzzer pass might add pointer types in cases where
@@ -27,7 +27,8 @@ class FuzzerPassAddGlobalVariables : public FuzzerPass {
FuzzerPassAddGlobalVariables(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
void Apply() override;
};
@@ -27,9 +27,10 @@ FuzzerPassAddImageSampleUnusedComponents::
opt::IRContext* ir_context,
TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddImageSampleUnusedComponents::Apply() {
// SPIR-V module to help understand the transformation.
@@ -28,7 +28,8 @@ class FuzzerPassAddImageSampleUnusedComponents : public FuzzerPass {
FuzzerPassAddImageSampleUnusedComponents(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
void Apply() override;
};
+59 -14
View File
@@ -23,9 +23,10 @@ namespace fuzz {
FuzzerPassAddLoads::FuzzerPassAddLoads(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddLoads::Apply() {
ForEachInstructionWithInstructionDescriptor(
@@ -38,18 +39,22 @@ void FuzzerPassAddLoads::Apply() {
"The opcode of the instruction we might insert before must be "
"the same as the opcode in the descriptor for the instruction");
// Check whether it is legitimate to insert a load before this
// instruction.
if (!fuzzerutil::CanInsertOpcodeBeforeInstruction(SpvOpLoad, inst_it)) {
return;
}
// Randomly decide whether to try inserting a load here.
if (!GetFuzzerContext()->ChoosePercentage(
GetFuzzerContext()->GetChanceOfAddingLoad())) {
return;
}
// Check whether it is legitimate to insert a load or atomic load before
// this instruction.
if (!fuzzerutil::CanInsertOpcodeBeforeInstruction(SpvOpLoad, inst_it)) {
return;
}
if (!fuzzerutil::CanInsertOpcodeBeforeInstruction(SpvOpAtomicLoad,
inst_it)) {
return;
}
std::vector<opt::Instruction*> relevant_instructions =
FindAvailableInstructions(
function, block, inst_it,
@@ -79,13 +84,53 @@ void FuzzerPassAddLoads::Apply() {
return;
}
// Choose a pointer at random, and create and apply a loading
// transformation based on it.
ApplyTransformation(TransformationLoad(
GetFuzzerContext()->GetFreshId(),
auto chosen_instruction =
relevant_instructions[GetFuzzerContext()->RandomIndex(
relevant_instructions)]
->result_id(),
relevant_instructions)];
bool is_atomic_load = false;
uint32_t memory_scope_id = 0;
uint32_t memory_semantics_id = 0;
auto storage_class = static_cast<SpvStorageClass>(
GetIRContext()
->get_def_use_mgr()
->GetDef(chosen_instruction->type_id())
->GetSingleWordInOperand(0));
switch (storage_class) {
case SpvStorageClassStorageBuffer:
case SpvStorageClassPhysicalStorageBuffer:
case SpvStorageClassWorkgroup:
case SpvStorageClassCrossWorkgroup:
case SpvStorageClassAtomicCounter:
case SpvStorageClassImage:
if (GetFuzzerContext()->ChoosePercentage(
GetFuzzerContext()->GetChanceOfAddingAtomicLoad())) {
is_atomic_load = true;
memory_scope_id = FindOrCreateConstant(
{SpvScopeInvocation},
FindOrCreateIntegerType(32, GetFuzzerContext()->ChooseEven()),
false);
memory_semantics_id = FindOrCreateConstant(
{static_cast<uint32_t>(
fuzzerutil::GetMemorySemanticsForStorageClass(
storage_class))},
FindOrCreateIntegerType(32, GetFuzzerContext()->ChooseEven()),
false);
}
break;
default:
break;
}
// Create and apply the transformation.
ApplyTransformation(TransformationLoad(
GetFuzzerContext()->GetFreshId(), chosen_instruction->result_id(),
is_atomic_load, memory_scope_id, memory_semantics_id,
instruction_descriptor));
});
}
@@ -26,7 +26,8 @@ class FuzzerPassAddLoads : public FuzzerPass {
FuzzerPassAddLoads(opt::IRContext* ir_context,
TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
void Apply() override;
};
@@ -24,9 +24,10 @@ namespace fuzz {
FuzzerPassAddLocalVariables::FuzzerPassAddLocalVariables(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddLocalVariables::Apply() {
auto basic_type_ids_and_pointers =
@@ -34,6 +35,10 @@ void FuzzerPassAddLocalVariables::Apply() {
// These are the basic types that are available to this fuzzer pass.
auto& basic_types = basic_type_ids_and_pointers.first;
if (basic_types.empty()) {
// The pass cannot do anything if there are no basic types.
return;
}
// These are the pointers to those basic types that are *initially* available
// to the fuzzer pass. The fuzzer pass might add pointer types in cases where
@@ -27,7 +27,8 @@ class FuzzerPassAddLocalVariables : public FuzzerPass {
FuzzerPassAddLocalVariables(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
void Apply() override;
};
@@ -23,9 +23,10 @@ namespace fuzz {
FuzzerPassAddLoopPreheaders::FuzzerPassAddLoopPreheaders(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddLoopPreheaders::Apply() {
for (auto& function : *GetIRContext()->module()) {
@@ -30,7 +30,8 @@ class FuzzerPassAddLoopPreheaders : public FuzzerPass {
FuzzerPassAddLoopPreheaders(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
void Apply() override;
};
@@ -29,9 +29,10 @@ FuzzerPassAddLoopsToCreateIntConstantSynonyms::
opt::IRContext* ir_context,
TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddLoopsToCreateIntConstantSynonyms::Apply() {
std::vector<uint32_t> constants;
@@ -28,7 +28,8 @@ class FuzzerPassAddLoopsToCreateIntConstantSynonyms : public FuzzerPass {
FuzzerPassAddLoopsToCreateIntConstantSynonyms(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
void Apply() override;
@@ -22,9 +22,10 @@ namespace fuzz {
FuzzerPassAddNoContractionDecorations::FuzzerPassAddNoContractionDecorations(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddNoContractionDecorations::Apply() {
// Consider every instruction in every block in every function.
@@ -26,7 +26,8 @@ class FuzzerPassAddNoContractionDecorations : public FuzzerPass {
FuzzerPassAddNoContractionDecorations(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
void Apply() override;
};
@@ -23,9 +23,10 @@ namespace fuzz {
FuzzerPassAddOpPhiSynonyms::FuzzerPassAddOpPhiSynonyms(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddOpPhiSynonyms::Apply() {
// Get a list of synonymous ids with the same type that can be used in the
@@ -25,10 +25,11 @@ namespace fuzz {
// synonymous with the others.
class FuzzerPassAddOpPhiSynonyms : public FuzzerPass {
public:
FuzzerPassAddOpPhiSynonyms(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
FuzzerPassAddOpPhiSynonyms(opt::IRContext* ir_context,
TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
void Apply() override;
@@ -25,9 +25,10 @@ namespace fuzz {
FuzzerPassAddParameters::FuzzerPassAddParameters(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddParameters::Apply() {
// Compute type candidates for the new parameter.
@@ -30,7 +30,8 @@ class FuzzerPassAddParameters : public FuzzerPass {
FuzzerPassAddParameters(opt::IRContext* ir_context,
TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
void Apply() override;
@@ -22,9 +22,10 @@ namespace fuzz {
FuzzerPassAddRelaxedDecorations::FuzzerPassAddRelaxedDecorations(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddRelaxedDecorations::Apply() {
// Consider every instruction in every block in every function.
@@ -26,7 +26,8 @@ class FuzzerPassAddRelaxedDecorations : public FuzzerPass {
FuzzerPassAddRelaxedDecorations(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
void Apply() override;
};
@@ -23,9 +23,10 @@ namespace fuzz {
FuzzerPassAddStores::FuzzerPassAddStores(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddStores::Apply() {
ForEachInstructionWithInstructionDescriptor(
@@ -38,16 +39,20 @@ void FuzzerPassAddStores::Apply() {
"The opcode of the instruction we might insert before must be "
"the same as the opcode in the descriptor for the instruction");
// Randomly decide whether to try inserting a store here.
if (!GetFuzzerContext()->ChoosePercentage(
GetFuzzerContext()->GetChanceOfAddingStore())) {
return;
}
// Check whether it is legitimate to insert a store before this
// instruction.
if (!fuzzerutil::CanInsertOpcodeBeforeInstruction(SpvOpStore,
inst_it)) {
return;
}
// Randomly decide whether to try inserting a store here.
if (!GetFuzzerContext()->ChoosePercentage(
GetFuzzerContext()->GetChanceOfAddingStore())) {
if (!fuzzerutil::CanInsertOpcodeBeforeInstruction(SpvOpAtomicStore,
inst_it)) {
return;
}
@@ -116,10 +121,49 @@ void FuzzerPassAddStores::Apply() {
return;
}
// Choose a value at random, and create and apply a storing
// transformation based on it and the pointer.
bool is_atomic_store = false;
uint32_t memory_scope_id = 0;
uint32_t memory_semantics_id = 0;
auto storage_class =
static_cast<SpvStorageClass>(GetIRContext()
->get_def_use_mgr()
->GetDef(pointer->type_id())
->GetSingleWordInOperand(0));
switch (storage_class) {
case SpvStorageClassStorageBuffer:
case SpvStorageClassPhysicalStorageBuffer:
case SpvStorageClassWorkgroup:
case SpvStorageClassCrossWorkgroup:
case SpvStorageClassAtomicCounter:
case SpvStorageClassImage:
if (GetFuzzerContext()->ChoosePercentage(
GetFuzzerContext()->GetChanceOfAddingAtomicStore())) {
is_atomic_store = true;
memory_scope_id = FindOrCreateConstant(
{SpvScopeInvocation},
FindOrCreateIntegerType(32, GetFuzzerContext()->ChooseEven()),
false);
memory_semantics_id = FindOrCreateConstant(
{static_cast<uint32_t>(
fuzzerutil::GetMemorySemanticsForStorageClass(
storage_class))},
FindOrCreateIntegerType(32, GetFuzzerContext()->ChooseEven()),
false);
}
break;
default:
break;
}
// Create and apply the transformation.
ApplyTransformation(TransformationStore(
pointer->result_id(),
pointer->result_id(), is_atomic_store, memory_scope_id,
memory_semantics_id,
relevant_values[GetFuzzerContext()->RandomIndex(relevant_values)]
->result_id(),
instruction_descriptor));
@@ -28,7 +28,8 @@ class FuzzerPassAddStores : public FuzzerPass {
FuzzerPassAddStores(opt::IRContext* ir_context,
TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations);
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations);
void Apply() override;
};
@@ -25,9 +25,10 @@ namespace fuzz {
FuzzerPassAddSynonyms::FuzzerPassAddSynonyms(
opt::IRContext* ir_context, TransformationContext* transformation_context,
FuzzerContext* fuzzer_context,
protobufs::TransformationSequence* transformations)
protobufs::TransformationSequence* transformations,
bool ignore_inapplicable_transformations)
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
transformations) {}
transformations, ignore_inapplicable_transformations) {}
void FuzzerPassAddSynonyms::Apply() {
ForEachInstructionWithInstructionDescriptor(

Some files were not shown because too many files have changed in this diff Show More