Austin Eng | cc2516a | 2023-10-17 20:57:54 +0000 | [diff] [blame] | 1 | // Copyright 2023 The Dawn & Tint Authors |
James Price | 02b5b22 | 2023-05-04 18:50:49 +0000 | [diff] [blame] | 2 | // |
Austin Eng | cc2516a | 2023-10-17 20:57:54 +0000 | [diff] [blame] | 3 | // Redistribution and use in source and binary forms, with or without |
| 4 | // modification, are permitted provided that the following conditions are met: |
James Price | 02b5b22 | 2023-05-04 18:50:49 +0000 | [diff] [blame] | 5 | // |
Austin Eng | cc2516a | 2023-10-17 20:57:54 +0000 | [diff] [blame] | 6 | // 1. Redistributions of source code must retain the above copyright notice, this |
| 7 | // list of conditions and the following disclaimer. |
James Price | 02b5b22 | 2023-05-04 18:50:49 +0000 | [diff] [blame] | 8 | // |
Austin Eng | cc2516a | 2023-10-17 20:57:54 +0000 | [diff] [blame] | 9 | // 2. Redistributions in binary form must reproduce the above copyright notice, |
| 10 | // this list of conditions and the following disclaimer in the documentation |
| 11 | // and/or other materials provided with the distribution. |
| 12 | // |
| 13 | // 3. Neither the name of the copyright holder nor the names of its |
| 14 | // contributors may be used to endorse or promote products derived from |
| 15 | // this software without specific prior written permission. |
| 16 | // |
| 17 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 18 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 19 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 20 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| 21 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 22 | // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 23 | // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 24 | // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 25 | // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
James Price | 02b5b22 | 2023-05-04 18:50:49 +0000 | [diff] [blame] | 27 | |
Ben Clayton | d368f2c | 2023-08-01 00:37:35 +0000 | [diff] [blame] | 28 | #ifndef SRC_TINT_LANG_SPIRV_WRITER_COMMON_HELPER_TEST_H_ |
| 29 | #define SRC_TINT_LANG_SPIRV_WRITER_COMMON_HELPER_TEST_H_ |
James Price | 02b5b22 | 2023-05-04 18:50:49 +0000 | [diff] [blame] | 30 | |
| 31 | #include <string> |
James Price | 3e65d90 | 2023-06-28 19:47:03 +0000 | [diff] [blame] | 32 | #include <utility> |
James Price | e9cd719 | 2023-06-29 19:47:49 +0000 | [diff] [blame] | 33 | #include <vector> |
James Price | 02b5b22 | 2023-05-04 18:50:49 +0000 | [diff] [blame] | 34 | |
James Price | e9cd719 | 2023-06-29 19:47:49 +0000 | [diff] [blame] | 35 | #include "gmock/gmock.h" |
James Price | 02b5b22 | 2023-05-04 18:50:49 +0000 | [diff] [blame] | 36 | #include "gtest/gtest.h" |
James Price | 3e65d90 | 2023-06-28 19:47:03 +0000 | [diff] [blame] | 37 | #include "spirv-tools/libspirv.hpp" |
dan sinclair | 97c3727 | 2023-07-24 17:11:53 +0000 | [diff] [blame] | 38 | #include "src/tint/lang/core/ir/builder.h" |
dan sinclair | 650bc3e | 2024-06-11 23:26:53 +0000 | [diff] [blame] | 39 | #include "src/tint/lang/core/ir/disassembler.h" |
dan sinclair | 97c3727 | 2023-07-24 17:11:53 +0000 | [diff] [blame] | 40 | #include "src/tint/lang/core/ir/validator.h" |
dan sinclair | 2dddb19 | 2023-07-26 20:31:48 +0000 | [diff] [blame] | 41 | #include "src/tint/lang/core/type/array.h" |
| 42 | #include "src/tint/lang/core/type/depth_texture.h" |
| 43 | #include "src/tint/lang/core/type/matrix.h" |
| 44 | #include "src/tint/lang/core/type/multisampled_texture.h" |
| 45 | #include "src/tint/lang/core/type/sampled_texture.h" |
| 46 | #include "src/tint/lang/core/type/storage_texture.h" |
Ben Clayton | b0ea368 | 2023-08-15 15:35:01 +0000 | [diff] [blame] | 47 | #include "src/tint/lang/spirv/writer/common/spv_dump_test.h" |
dan sinclair | 2dddb19 | 2023-07-26 20:31:48 +0000 | [diff] [blame] | 48 | #include "src/tint/lang/spirv/writer/printer/printer.h" |
James Price | d974e3b | 2023-08-02 21:30:23 +0000 | [diff] [blame] | 49 | #include "src/tint/lang/spirv/writer/raise/raise.h" |
James Price | 02b5b22 | 2023-05-04 18:50:49 +0000 | [diff] [blame] | 50 | |
dan sinclair | 2dddb19 | 2023-07-26 20:31:48 +0000 | [diff] [blame] | 51 | namespace tint::spirv::writer { |
James Price | 02b5b22 | 2023-05-04 18:50:49 +0000 | [diff] [blame] | 52 | |
dan sinclair | ce6dffe | 2023-08-14 21:01:40 +0000 | [diff] [blame] | 53 | using namespace tint::core::number_suffixes; // NOLINT |
dan sinclair | 23314ca | 2023-08-03 16:02:22 +0000 | [diff] [blame] | 54 | |
James Price | 6130722 | 2023-06-28 23:26:34 +0000 | [diff] [blame] | 55 | // Helper macro to check whether the SPIR-V output contains an instruction, dumping the full output |
| 56 | // if the instruction was not present. |
| 57 | #define EXPECT_INST(inst) ASSERT_THAT(output_, testing::HasSubstr(inst)) << output_ |
| 58 | |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 59 | /// The element type of a test. |
| 60 | enum TestElementType { |
| 61 | kBool, |
| 62 | kI32, |
| 63 | kU32, |
| 64 | kF32, |
| 65 | kF16, |
| 66 | }; |
Ben Clayton | 6891960 | 2023-07-28 22:51:18 +0000 | [diff] [blame] | 67 | template <typename STREAM, typename = traits::EnableIfIsOStream<STREAM>> |
| 68 | auto& operator<<(STREAM& out, TestElementType type) { |
James Price | 8558e48 | 2023-06-30 23:23:49 +0000 | [diff] [blame] | 69 | switch (type) { |
| 70 | case kBool: |
| 71 | out << "bool"; |
| 72 | break; |
| 73 | case kI32: |
| 74 | out << "i32"; |
| 75 | break; |
| 76 | case kU32: |
| 77 | out << "u32"; |
| 78 | break; |
| 79 | case kF32: |
| 80 | out << "f32"; |
| 81 | break; |
| 82 | case kF16: |
| 83 | out << "f16"; |
| 84 | break; |
| 85 | } |
| 86 | return out; |
| 87 | } |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 88 | |
James Price | 9057941 | 2023-07-21 03:51:44 +0000 | [diff] [blame] | 89 | /// Base helper class for testing the SPIR-V writer implementation. |
James Price | 02b5b22 | 2023-05-04 18:50:49 +0000 | [diff] [blame] | 90 | template <typename BASE> |
James Price | 6dbf49f | 2023-07-21 03:46:26 +0000 | [diff] [blame] | 91 | class SpirvWriterTestHelperBase : public BASE { |
James Price | 02b5b22 | 2023-05-04 18:50:49 +0000 | [diff] [blame] | 92 | public: |
James Price | 41d7513 | 2023-06-02 23:34:36 +0000 | [diff] [blame] | 93 | /// The test module. |
dan sinclair | 6f138fe | 2023-08-15 21:29:34 +0000 | [diff] [blame] | 94 | core::ir::Module mod; |
James Price | 41d7513 | 2023-06-02 23:34:36 +0000 | [diff] [blame] | 95 | /// The test builder. |
dan sinclair | 6f138fe | 2023-08-15 21:29:34 +0000 | [diff] [blame] | 96 | core::ir::Builder b{mod}; |
James Price | 41d7513 | 2023-06-02 23:34:36 +0000 | [diff] [blame] | 97 | /// The type manager. |
dan sinclair | cedcdf3 | 2023-08-10 02:39:48 +0000 | [diff] [blame] | 98 | core::type::Manager& ty{mod.Types()}; |
James Price | 02b5b22 | 2023-05-04 18:50:49 +0000 | [diff] [blame] | 99 | |
| 100 | protected: |
James Price | e9cd719 | 2023-06-29 19:47:49 +0000 | [diff] [blame] | 101 | /// Errors produced during codegen or SPIR-V validation. |
dan sinclair | cff18f3 | 2023-06-05 21:36:29 +0000 | [diff] [blame] | 102 | std::string err_; |
| 103 | |
James Price | 3e65d90 | 2023-06-28 19:47:03 +0000 | [diff] [blame] | 104 | /// SPIR-V output. |
| 105 | std::string output_; |
| 106 | |
Ben Clayton | 2258155 | 2023-10-26 14:17:18 +0000 | [diff] [blame] | 107 | /// The generated SPIR-V |
| 108 | writer::Module spirv_; |
| 109 | |
dan sinclair | cff18f3 | 2023-06-05 21:36:29 +0000 | [diff] [blame] | 110 | /// @returns the error string from the validation |
| 111 | std::string Error() const { return err_; } |
| 112 | |
Ben Clayton | 2258155 | 2023-10-26 14:17:18 +0000 | [diff] [blame] | 113 | /// Run the printer on the IR module and validate the result. |
James Price | 4e6f10f | 2023-09-12 21:27:53 +0000 | [diff] [blame] | 114 | /// @param options the optional writer options to use when raising the IR |
Ben Clayton | 2258155 | 2023-10-26 14:17:18 +0000 | [diff] [blame] | 115 | /// @param zero_init_workgroup_memory `true` to initialize all the variables in the Workgroup |
| 116 | /// storage class with OpConstantNull |
James Price | e9cd719 | 2023-06-29 19:47:49 +0000 | [diff] [blame] | 117 | /// @returns true if generation and validation succeeded |
Ben Clayton | 2258155 | 2023-10-26 14:17:18 +0000 | [diff] [blame] | 118 | bool Generate(Options options = {}, bool zero_init_workgroup_memory = false) { |
Ben Clayton | 41cdde7 | 2024-01-09 19:57:40 +0000 | [diff] [blame] | 119 | auto raised = Raise(mod, options); |
Ben Clayton | 89274f7 | 2024-01-03 10:53:42 +0000 | [diff] [blame] | 120 | if (raised != Success) { |
Ben Clayton | 1e1f488 | 2024-02-05 17:35:59 +0000 | [diff] [blame] | 121 | err_ = raised.Failure().reason.Str(); |
James Price | d974e3b | 2023-08-02 21:30:23 +0000 | [diff] [blame] | 122 | return false; |
| 123 | } |
| 124 | |
dan sinclair | 9cef842 | 2024-08-22 18:01:45 +0000 | [diff] [blame^] | 125 | if (zero_init_workgroup_memory) { |
| 126 | options.disable_workgroup_init = false; |
| 127 | options.use_zero_initialize_workgroup_memory_extension = true; |
| 128 | } |
| 129 | |
| 130 | auto spirv = PrintModule(mod, options); |
Ben Clayton | 89274f7 | 2024-01-03 10:53:42 +0000 | [diff] [blame] | 131 | if (spirv != Success) { |
Ben Clayton | 1e1f488 | 2024-02-05 17:35:59 +0000 | [diff] [blame] | 132 | err_ = spirv.Failure().reason.Str(); |
dan sinclair | cff18f3 | 2023-06-05 21:36:29 +0000 | [diff] [blame] | 133 | return false; |
| 134 | } |
James Price | e9cd719 | 2023-06-29 19:47:49 +0000 | [diff] [blame] | 135 | |
Ben Clayton | 2258155 | 2023-10-26 14:17:18 +0000 | [diff] [blame] | 136 | output_ = Disassemble(spirv->Code(), SPV_BINARY_TO_TEXT_OPTION_FRIENDLY_NAMES | |
| 137 | SPV_BINARY_TO_TEXT_OPTION_INDENT | |
| 138 | SPV_BINARY_TO_TEXT_OPTION_COMMENT); |
James Price | e9cd719 | 2023-06-29 19:47:49 +0000 | [diff] [blame] | 139 | |
Ben Clayton | 2258155 | 2023-10-26 14:17:18 +0000 | [diff] [blame] | 140 | if (!Validate(spirv->Code())) { |
James Price | e9cd719 | 2023-06-29 19:47:49 +0000 | [diff] [blame] | 141 | return false; |
| 142 | } |
| 143 | |
Ben Clayton | 2258155 | 2023-10-26 14:17:18 +0000 | [diff] [blame] | 144 | spirv_ = std::move(spirv.Get()); |
dan sinclair | cff18f3 | 2023-06-05 21:36:29 +0000 | [diff] [blame] | 145 | return true; |
| 146 | } |
| 147 | |
James Price | 3e65d90 | 2023-06-28 19:47:03 +0000 | [diff] [blame] | 148 | /// Validate the generated SPIR-V using the SPIR-V Tools Validator. |
James Price | e9cd719 | 2023-06-29 19:47:49 +0000 | [diff] [blame] | 149 | /// @param binary the SPIR-V binary module to validate |
James Price | 3e65d90 | 2023-06-28 19:47:03 +0000 | [diff] [blame] | 150 | /// @returns true if validation succeeded, false otherwise |
James Price | e9cd719 | 2023-06-29 19:47:49 +0000 | [diff] [blame] | 151 | bool Validate(const std::vector<uint32_t>& binary) { |
James Price | 3e65d90 | 2023-06-28 19:47:03 +0000 | [diff] [blame] | 152 | std::string spv_errors; |
| 153 | auto msg_consumer = [&spv_errors](spv_message_level_t level, const char*, |
| 154 | const spv_position_t& position, const char* message) { |
| 155 | switch (level) { |
| 156 | case SPV_MSG_FATAL: |
| 157 | case SPV_MSG_INTERNAL_ERROR: |
| 158 | case SPV_MSG_ERROR: |
| 159 | spv_errors += |
| 160 | "error: line " + std::to_string(position.index) + ": " + message + "\n"; |
| 161 | break; |
| 162 | case SPV_MSG_WARNING: |
| 163 | spv_errors += |
| 164 | "warning: line " + std::to_string(position.index) + ": " + message + "\n"; |
| 165 | break; |
| 166 | case SPV_MSG_INFO: |
| 167 | spv_errors += |
| 168 | "info: line " + std::to_string(position.index) + ": " + message + "\n"; |
| 169 | break; |
| 170 | case SPV_MSG_DEBUG: |
| 171 | break; |
| 172 | } |
| 173 | }; |
| 174 | |
| 175 | spvtools::SpirvTools tools(SPV_ENV_VULKAN_1_2); |
| 176 | tools.SetMessageConsumer(msg_consumer); |
| 177 | |
| 178 | auto result = tools.Validate(binary); |
| 179 | err_ = std::move(spv_errors); |
| 180 | return result; |
| 181 | } |
| 182 | |
James Price | 02b5b22 | 2023-05-04 18:50:49 +0000 | [diff] [blame] | 183 | /// @returns the disassembled types from the generated module. |
Ben Clayton | 2258155 | 2023-10-26 14:17:18 +0000 | [diff] [blame] | 184 | std::string DumpTypes() { return DumpInstructions(spirv_.Types()); } |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 185 | |
James Price | 41d7513 | 2023-06-02 23:34:36 +0000 | [diff] [blame] | 186 | /// Helper to make a scalar type corresponding to the element type `type`. |
| 187 | /// @param type the element type |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 188 | /// @returns the scalar type |
dan sinclair | cedcdf3 | 2023-08-10 02:39:48 +0000 | [diff] [blame] | 189 | const core::type::Type* MakeScalarType(TestElementType type) { |
James Price | 41d7513 | 2023-06-02 23:34:36 +0000 | [diff] [blame] | 190 | switch (type) { |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 191 | case kBool: |
James Price | 41d7513 | 2023-06-02 23:34:36 +0000 | [diff] [blame] | 192 | return ty.bool_(); |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 193 | case kI32: |
James Price | 41d7513 | 2023-06-02 23:34:36 +0000 | [diff] [blame] | 194 | return ty.i32(); |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 195 | case kU32: |
James Price | 41d7513 | 2023-06-02 23:34:36 +0000 | [diff] [blame] | 196 | return ty.u32(); |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 197 | case kF32: |
James Price | 41d7513 | 2023-06-02 23:34:36 +0000 | [diff] [blame] | 198 | return ty.f32(); |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 199 | case kF16: |
James Price | 41d7513 | 2023-06-02 23:34:36 +0000 | [diff] [blame] | 200 | return ty.f16(); |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 201 | } |
| 202 | return nullptr; |
| 203 | } |
| 204 | |
James Price | 41d7513 | 2023-06-02 23:34:36 +0000 | [diff] [blame] | 205 | /// Helper to make a vector type corresponding to the element type `type`. |
| 206 | /// @param type the element type |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 207 | /// @returns the vector type |
dan sinclair | cedcdf3 | 2023-08-10 02:39:48 +0000 | [diff] [blame] | 208 | const core::type::Type* MakeVectorType(TestElementType type) { |
| 209 | return ty.vec2(MakeScalarType(type)); |
| 210 | } |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 211 | |
James Price | 41d7513 | 2023-06-02 23:34:36 +0000 | [diff] [blame] | 212 | /// Helper to make a scalar value with the scalar type `type`. |
| 213 | /// @param type the element type |
James Price | 05c6fd3 | 2023-07-14 16:27:55 +0000 | [diff] [blame] | 214 | /// @param value the optional value to use |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 215 | /// @returns the scalar value |
dan sinclair | 6f138fe | 2023-08-15 21:29:34 +0000 | [diff] [blame] | 216 | core::ir::Constant* MakeScalarValue(TestElementType type, uint32_t value = 1) { |
James Price | 41d7513 | 2023-06-02 23:34:36 +0000 | [diff] [blame] | 217 | switch (type) { |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 218 | case kBool: |
| 219 | return b.Constant(true); |
| 220 | case kI32: |
dan sinclair | ce6dffe | 2023-08-14 21:01:40 +0000 | [diff] [blame] | 221 | return b.Constant(core::i32(value)); |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 222 | case kU32: |
dan sinclair | ce6dffe | 2023-08-14 21:01:40 +0000 | [diff] [blame] | 223 | return b.Constant(core::u32(value)); |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 224 | case kF32: |
dan sinclair | ce6dffe | 2023-08-14 21:01:40 +0000 | [diff] [blame] | 225 | return b.Constant(core::f32(value)); |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 226 | case kF16: |
dan sinclair | ce6dffe | 2023-08-14 21:01:40 +0000 | [diff] [blame] | 227 | return b.Constant(core::f16(value)); |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 228 | } |
| 229 | return nullptr; |
| 230 | } |
| 231 | |
James Price | 41d7513 | 2023-06-02 23:34:36 +0000 | [diff] [blame] | 232 | /// Helper to make a vector value with an element type of `type`. |
| 233 | /// @param type the element type |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 234 | /// @returns the vector value |
dan sinclair | 6f138fe | 2023-08-15 21:29:34 +0000 | [diff] [blame] | 235 | core::ir::Constant* MakeVectorValue(TestElementType type) { |
James Price | 41d7513 | 2023-06-02 23:34:36 +0000 | [diff] [blame] | 236 | switch (type) { |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 237 | case kBool: |
dan sinclair | 23314ca | 2023-08-03 16:02:22 +0000 | [diff] [blame] | 238 | return b.Composite(MakeVectorType(type), true, false); |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 239 | case kI32: |
dan sinclair | 23314ca | 2023-08-03 16:02:22 +0000 | [diff] [blame] | 240 | return b.Composite(MakeVectorType(type), 42_i, -10_i); |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 241 | case kU32: |
dan sinclair | 23314ca | 2023-08-03 16:02:22 +0000 | [diff] [blame] | 242 | return b.Composite(MakeVectorType(type), 42_u, 10_u); |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 243 | case kF32: |
dan sinclair | 23314ca | 2023-08-03 16:02:22 +0000 | [diff] [blame] | 244 | return b.Composite(MakeVectorType(type), 42_f, -0.5_f); |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 245 | case kF16: |
dan sinclair | 23314ca | 2023-08-03 16:02:22 +0000 | [diff] [blame] | 246 | return b.Composite(MakeVectorType(type), 42_h, -0.5_h); |
James Price | bcf4174 | 2023-05-26 15:10:30 +0000 | [diff] [blame] | 247 | } |
| 248 | return nullptr; |
| 249 | } |
James Price | a7e91f5 | 2024-05-29 15:38:19 +0000 | [diff] [blame] | 250 | |
| 251 | /// Helper to dump the disassembly of the Tint IR module. |
| 252 | /// @returns the disassembly (with a leading newline) |
dan sinclair | 650bc3e | 2024-06-11 23:26:53 +0000 | [diff] [blame] | 253 | std::string IR() { return "\n" + core::ir::Disassembler(mod).Plain(); } |
James Price | 02b5b22 | 2023-05-04 18:50:49 +0000 | [diff] [blame] | 254 | }; |
| 255 | |
James Price | 6dbf49f | 2023-07-21 03:46:26 +0000 | [diff] [blame] | 256 | using SpirvWriterTest = SpirvWriterTestHelperBase<testing::Test>; |
James Price | 02b5b22 | 2023-05-04 18:50:49 +0000 | [diff] [blame] | 257 | |
| 258 | template <typename T> |
James Price | 6dbf49f | 2023-07-21 03:46:26 +0000 | [diff] [blame] | 259 | using SpirvWriterTestWithParam = SpirvWriterTestHelperBase<testing::TestWithParam<T>>; |
James Price | 02b5b22 | 2023-05-04 18:50:49 +0000 | [diff] [blame] | 260 | |
dan sinclair | 2dddb19 | 2023-07-26 20:31:48 +0000 | [diff] [blame] | 261 | } // namespace tint::spirv::writer |
James Price | 02b5b22 | 2023-05-04 18:50:49 +0000 | [diff] [blame] | 262 | |
Ben Clayton | d368f2c | 2023-08-01 00:37:35 +0000 | [diff] [blame] | 263 | #endif // SRC_TINT_LANG_SPIRV_WRITER_COMMON_HELPER_TEST_H_ |