third_party_spirv-tools/utils
Jaebaek Seo fb9a10cd48
spirv-opt: add pass to Spread Volatile semantics (#4667)
Add a pass to spread Volatile semantics to variables with SMIDNV,
WarpIDNV, SubgroupSize, SubgroupLocalInvocationId, SubgroupEqMask,
SubgroupGeMask, SubgroupGtMask, SubgroupLeMask, or SubgroupLtMask BuiltIn
decorations or OpLoad for them when the shader model is the ray
generation, closest hit, miss, intersection, or callable shaders. This
pass can be used for VUID-StandaloneSpirv-VulkanMemoryModel-04678 and
VUID-StandaloneSpirv-VulkanMemoryModel-04679 (See "Standalone SPIR-V
Validation" section of Vulkan spec "Appendix A: Vulkan Environment for
SPIR-V").

Handle variables used by multiple entry points:

1. Update error check to make it working regardless of the order of
   entry points.
2. For a variable, if it is used by two entry points E1 and E2 and
   it needs the Volatile semantics for E1 while it does not for E2
  - If VulkanMemoryModel capability is enabled, which means we have to
    set memory operation of load instructions for the variable, we
    update load instructions in E1, but do not update the ones in E2.
  - If VulkanMemoryModel capability is disabled, which means we have
    to add Volatile decoration for the variable, we report an error
    because E1 needs to add Volatile decoration for the variable while
    E2 does not.

For the simplicity of the implementation, we assume that all functions
other than entry point functions are inlined.
2022-01-25 13:14:36 -05:00
..
vscode Remove duplicated "the" from comments (#4666) 2022-01-12 19:04:13 -05:00
check_code_format.sh Enable the base branch to be overridden in the code format check script (#2607) 2019-05-24 14:33:43 -04:00
check_copyright.py spirv-opt: add pass to Spread Volatile semantics (#4667) 2022-01-25 13:14:36 -05:00
check_symbol_exports.py fix symbol exports check, for Android build cases (#4342) 2021-06-23 12:03:34 -04:00
fixup_fuzz_result.py Script to fixup fuzzer results (#1792) 2018-08-02 20:28:40 -04:00
generate_grammar_tables.py Initial support for SPV_KHR_integer_dot_product (#4327) 2021-06-23 13:32:24 -04:00
generate_language_headers.py Combine extinst-name and extinst-output-base into one arg. (#3200) 2020-02-25 00:46:52 -05:00
generate_registry_tables.py Avoid use of Python distutils.dir_util (#3203) 2020-02-28 16:50:06 -05:00
generate_vim_syntax.py Remove unneeded future imports (#2739) 2019-07-24 15:29:38 -04:00
git-sync-deps Force using Python 3 git-sync-deps (#4067) 2020-12-10 13:39:37 -05:00
roll_deps.sh Clarify how to update DEPS (#4626) 2021-11-09 10:28:01 -05:00
update_build_version.py Python 3: remove deprecated U qualifier on 'open' (#3019) 2019-11-07 08:39:09 -05:00