dawn-cmake/src/tint/reader/spirv
Austin Eng 86a617f110 Add InsertBraces: true to .clang-format
Bug: none
Change-Id: I4b4f2a4abfea7adcea406f458bc4e4a13b0e8c43
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91000
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: dan sinclair <dsinclair@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-05-19 20:08:19 +00:00
..
README.md tint->dawn: Shuffle source tree in preperation of merging repos 2022-02-21 15:19:07 +00:00
construct.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
construct.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
entry_point_info.cc Condense namespaces in tint/reader/spirv. 2022-04-07 19:01:25 +00:00
entry_point_info.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
enum_converter.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
enum_converter.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
enum_converter_test.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
fail_stream.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
fail_stream_test.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
function.cc Add InsertBraces: true to .clang-format 2022-05-19 20:08:19 +00:00
function.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
function_arithmetic_test.cc tint/reader/spirv: Generate 'i' suffixed literals 2022-05-04 22:25:19 +00:00
function_bit_test.cc tint/reader/spirv: Generate 'i' suffixed literals 2022-05-04 22:25:19 +00:00
function_call_test.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
function_cfg_test.cc tint/reader/spirv: Generate 'i' suffixed literals 2022-05-04 22:25:19 +00:00
function_composite_test.cc tint/reader/spirv: Generate 'i' suffixed literals 2022-05-04 22:25:19 +00:00
function_conversion_test.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
function_decl_test.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
function_glsl_std_450_test.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
function_logical_test.cc tint/reader/spirv: Generate 'i' suffixed literals 2022-05-04 22:25:19 +00:00
function_memory_test.cc tint/reader/spirv: Generate 'i' suffixed literals 2022-05-04 22:25:19 +00:00
function_misc_test.cc tint/reader/spirv: Generate 'i' suffixed literals 2022-05-04 22:25:19 +00:00
function_var_test.cc tint/reader/spirv: Generate 'i' suffixed literals 2022-05-04 22:25:19 +00:00
namer.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
namer.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
namer_test.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
parser.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
parser.h Condense namespaces in tint/reader/spirv. 2022-04-07 19:01:25 +00:00
parser_impl.cc tint: Lex different tokens for float suffixes 2022-05-10 14:55:34 +00:00
parser_impl.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
parser_impl_barrier_test.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
parser_impl_convert_member_decoration_test.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
parser_impl_convert_type_test.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
parser_impl_function_decl_test.cc tint: Change all ProgramBuilder literals to 'i' or 'u' suffix 2022-05-05 20:23:40 +00:00
parser_impl_get_decorations_test.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
parser_impl_handle_test.cc tint/reader/spirv: Generate 'i' suffixed literals 2022-05-04 22:25:19 +00:00
parser_impl_import_test.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
parser_impl_module_var_test.cc tint: Change all ProgramBuilder literals to 'i' or 'u' suffix 2022-05-05 20:23:40 +00:00
parser_impl_named_types_test.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
parser_impl_test.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
parser_impl_test_helper.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
parser_impl_test_helper.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
parser_impl_user_name_test.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
parser_test.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
parser_type.cc tint: Change all ProgramBuilder literals to 'i' or 'u' suffix 2022-05-05 20:23:40 +00:00
parser_type.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
parser_type_test.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
spirv_tools_helpers_test.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
spirv_tools_helpers_test.h Condense namespaces in tint/reader/spirv. 2022-04-07 19:01:25 +00:00
usage.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
usage.h Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00
usage_test.cc Consistent formatting for Dawn/Tint. 2022-05-01 14:40:55 +00:00

README.md

SPIR-V Reader

This component translates SPIR-V written for Vulkan into the Tint AST.

The SPIR-V reader entry point is tint::reader::spirv::Parser, which implements the Reader interface in tint::reader::Reader.

It's usable from the Tint command line:

# Translate SPIR-V into WGSL.
tint --format wgsl a.spv

Supported dialects

The SPIR-V module must pass validation for the Vulkan 1.1 environment in SPIRV-Tools. In particular, SPIR-V 1.4 and later are not supported.

For example, the equivalent of the following must pass:

spirv-val --target-env vulkan1.1 a.spv

Additionally, the reader imposes additional constraints based on:

  • The features supported by WGSL. Some Vulkan features might not be supportable because WebGPU must be portable to other graphics APIs.
  • Limitations of the reader itself. These might be relaxed in the future with extra engineering work.

Feedback

Please file issues at https://crbug.com/tint, and apply label SpirvReader.

Outstanding issues can be found by using the SpirvReader label in the Chromium project's bug tracker: https://bugs.chromium.org/p/tint/issues/list?q=label:SpirvReader