dawn-cmake/test/tint
Zhaoming Jiang 7098d3d692 tint: Add enable directive for extensions
In this CL the enable directive is implemented.
1. Add AST node for enable directive, assign a ExtensionKind (enum) for
each supported extension.
2. Use an unorder_set in ast::Module to record all required extensions'
kind.
3. Provide inspector methods for getting names of used extension, and
getting all used enable directives' extension names and location.
4. For different writer, the extension nodes are handled in different
ways. MSL and HLSL writers will just ignore the extension nodes, while
SPIRV and GLSL writers will emit corresponding code.
5. Implement unittests and end2end test for enable directive and
inspector, using a reserved extension name `InternalExtensionForTesting`.

Bug: tint:1472
Change-Id: I40cb4061554deb477bc2005d7e38c9718385f825
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86623
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
2022-04-27 02:27:52 +00:00
..
access tint->dawn: Shuffle source tree in preperation of merging repos 2022-02-21 15:19:07 +00:00
array wgsl: Separate struct members with commas 2022-03-28 14:31:22 +00:00
benchmark GLSL writer: emit gl_PointSize = 1 in all vertex shaders for OpenGL. 2022-04-22 21:25:02 +00:00
buffer wgsl: Separate struct members with commas 2022-03-28 14:31:22 +00:00
bug GLSL writer: emit gl_PointSize = 1 in all vertex shaders for OpenGL. 2022-04-22 21:25:02 +00:00
builtins Revert "Add External Texture Gamma/Gamut Correction" 2022-04-26 12:20:02 +00:00
expressions Implement mixed vector-scalar float % operator 2022-03-28 14:36:31 +00:00
extensions/InternalExtensionForTesting tint: Add enable directive for extensions 2022-04-27 02:27:52 +00:00
identifiers/underscore wgsl: Separate struct members with commas 2022-03-28 14:31:22 +00:00
layout/storage/mat2x2 wgsl: Separate struct members with commas 2022-03-28 14:31:22 +00:00
let Normalize all line endings to LF 2022-04-08 14:18:28 +00:00
loops HLSL: workaround FXC error "continue cannot be used in a switch" 2022-03-31 15:02:25 +00:00
out_of_order_decls wgsl: Separate struct members with commas 2022-03-28 14:31:22 +00:00
ptr_ref wgsl: Separate struct members with commas 2022-03-28 14:31:22 +00:00
samples GLSL writer: emit gl_PointSize = 1 in all vertex shaders for OpenGL. 2022-04-22 21:25:02 +00:00
shader_io GLSL writer: emit gl_PointSize = 1 in all vertex shaders for OpenGL. 2022-04-22 21:25:02 +00:00
shadowing wgsl: Separate struct members with commas 2022-03-28 14:31:22 +00:00
statements Normalize all line endings to LF 2022-04-08 14:18:28 +00:00
struct wgsl: Separate struct members with commas 2022-03-28 14:31:22 +00:00
types Always use 0 for the Depth operand of OpTypeImage 2022-04-08 08:33:28 +00:00
unicode test: Move unicode e2e test to tint dir 2022-02-21 16:51:06 +00:00
unittest/reader/spirv GLSL writer: emit gl_PointSize = 1 in all vertex shaders for OpenGL. 2022-04-22 21:25:02 +00:00
var Normalize all line endings to LF 2022-04-08 14:18:28 +00:00
vk-gl-cts GLSL writer: emit gl_PointSize = 1 in all vertex shaders for OpenGL. 2022-04-22 21:25:02 +00:00
BUILD.gn tint: Add enable directive for extensions 2022-04-27 02:27:52 +00:00
extract-spvasm.py tint->dawn: Shuffle source tree in preperation of merging repos 2022-02-21 15:19:07 +00:00
test-all.sh tools: Replace copy-pasta scripts 2022-04-07 18:26:45 +00:00