diff --git a/src/tint/BUILD.gn b/src/tint/BUILD.gn index 59bb68d9c9..1f31b3b061 100644 --- a/src/tint/BUILD.gn +++ b/src/tint/BUILD.gn @@ -1028,8 +1028,8 @@ libtint_source_set("libtint_spv_writer_src") { if (tint_build_ir) { sources += [ - "writer/spirv/generator_impl_ir.cc", - "writer/spirv/generator_impl_ir.h", + "writer/spirv/ir/generator_impl_ir.cc", + "writer/spirv/ir/generator_impl_ir.h", ] deps += [ ":libtint_ir_builder_src", @@ -1939,12 +1939,13 @@ if (tint_build_unittests) { if (tint_build_ir) { sources += [ - "writer/spirv/generator_impl_binary_test.cc", - "writer/spirv/generator_impl_constant_test.cc", - "writer/spirv/generator_impl_function_test.cc", - "writer/spirv/generator_impl_if_test.cc", - "writer/spirv/generator_impl_ir_test.cc", - "writer/spirv/generator_impl_type_test.cc", + "writer/spirv/ir/generator_impl_ir_binary_test.cc", + "writer/spirv/ir/generator_impl_ir_constant_test.cc", + "writer/spirv/ir/generator_impl_ir_function_test.cc", + "writer/spirv/ir/generator_impl_ir_if_test.cc", + "writer/spirv/ir/generator_impl_ir_test.cc", + "writer/spirv/ir/generator_impl_ir_type_test.cc", + "writer/spirv/ir/test_helper_ir.h", ] deps += [ ":libtint_ir_src" ] } diff --git a/src/tint/CMakeLists.txt b/src/tint/CMakeLists.txt index 78132891fe..966718aa02 100644 --- a/src/tint/CMakeLists.txt +++ b/src/tint/CMakeLists.txt @@ -656,8 +656,8 @@ if(${TINT_BUILD_SPV_WRITER}) if(${TINT_BUILD_IR}) list(APPEND TINT_LIB_SRCS - writer/spirv/generator_impl_ir.cc - writer/spirv/generator_impl_ir.h + writer/spirv/ir/generator_impl_ir.cc + writer/spirv/ir/generator_impl_ir.h ) endif() endif() @@ -1240,13 +1240,13 @@ if(TINT_BUILD_TESTS) if(${TINT_BUILD_IR}) list(APPEND TINT_TEST_SRCS - writer/spirv/generator_impl_binary_test.cc - writer/spirv/generator_impl_constant_test.cc - writer/spirv/generator_impl_function_test.cc - writer/spirv/generator_impl_if_test.cc - writer/spirv/generator_impl_ir_test.cc - writer/spirv/generator_impl_type_test.cc - writer/spirv/test_helper_ir.h + writer/spirv/ir/generator_impl_ir_binary_test.cc + writer/spirv/ir/generator_impl_ir_constant_test.cc + writer/spirv/ir/generator_impl_ir_function_test.cc + writer/spirv/ir/generator_impl_ir_if_test.cc + writer/spirv/ir/generator_impl_ir_test.cc + writer/spirv/ir/generator_impl_ir_type_test.cc + writer/spirv/ir/test_helper_ir.h ) endif() endif() diff --git a/src/tint/writer/spirv/generator.cc b/src/tint/writer/spirv/generator.cc index 2315078b9a..6531ec5aa6 100644 --- a/src/tint/writer/spirv/generator.cc +++ b/src/tint/writer/spirv/generator.cc @@ -18,9 +18,9 @@ #include "src/tint/writer/spirv/generator_impl.h" #if TINT_BUILD_IR -#include "src/tint/ir/from_program.h" // nogncheck -#include "src/tint/writer/spirv/generator_impl_ir.h" // nogncheck -#endif // TINT_BUILD_IR +#include "src/tint/ir/from_program.h" // nogncheck +#include "src/tint/writer/spirv/ir/generator_impl_ir.h" // nogncheck +#endif // TINT_BUILD_IR namespace tint::writer::spirv { diff --git a/src/tint/writer/spirv/generator_impl_ir.cc b/src/tint/writer/spirv/ir/generator_impl_ir.cc similarity index 99% rename from src/tint/writer/spirv/generator_impl_ir.cc rename to src/tint/writer/spirv/ir/generator_impl_ir.cc index 120499525d..b16d087034 100644 --- a/src/tint/writer/spirv/generator_impl_ir.cc +++ b/src/tint/writer/spirv/ir/generator_impl_ir.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/tint/writer/spirv/generator_impl_ir.h" +#include "src/tint/writer/spirv/ir/generator_impl_ir.h" #include "spirv/unified1/spirv.h" #include "src/tint/ir/binary.h" diff --git a/src/tint/writer/spirv/generator_impl_ir.h b/src/tint/writer/spirv/ir/generator_impl_ir.h similarity index 97% rename from src/tint/writer/spirv/generator_impl_ir.h rename to src/tint/writer/spirv/ir/generator_impl_ir.h index bff13e6c76..b18cf9565e 100644 --- a/src/tint/writer/spirv/generator_impl_ir.h +++ b/src/tint/writer/spirv/ir/generator_impl_ir.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TINT_WRITER_SPIRV_GENERATOR_IMPL_IR_H_ -#define SRC_TINT_WRITER_SPIRV_GENERATOR_IMPL_IR_H_ +#ifndef SRC_TINT_WRITER_SPIRV_IR_GENERATOR_IMPL_IR_H_ +#define SRC_TINT_WRITER_SPIRV_IR_GENERATOR_IMPL_IR_H_ #include @@ -182,4 +182,4 @@ class GeneratorImplIr { } // namespace tint::writer::spirv -#endif // SRC_TINT_WRITER_SPIRV_GENERATOR_IMPL_IR_H_ +#endif // SRC_TINT_WRITER_SPIRV_IR_GENERATOR_IMPL_IR_H_ diff --git a/src/tint/writer/spirv/generator_impl_binary_test.cc b/src/tint/writer/spirv/ir/generator_impl_ir_binary_test.cc similarity index 99% rename from src/tint/writer/spirv/generator_impl_binary_test.cc rename to src/tint/writer/spirv/ir/generator_impl_ir_binary_test.cc index 4bf6b815d6..30dc0597ee 100644 --- a/src/tint/writer/spirv/generator_impl_binary_test.cc +++ b/src/tint/writer/spirv/ir/generator_impl_ir_binary_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/tint/writer/spirv/test_helper_ir.h" +#include "src/tint/writer/spirv/ir/test_helper_ir.h" using namespace tint::number_suffixes; // NOLINT diff --git a/src/tint/writer/spirv/generator_impl_constant_test.cc b/src/tint/writer/spirv/ir/generator_impl_ir_constant_test.cc similarity index 98% rename from src/tint/writer/spirv/generator_impl_constant_test.cc rename to src/tint/writer/spirv/ir/generator_impl_ir_constant_test.cc index 1e27e89ff8..95fce03da0 100644 --- a/src/tint/writer/spirv/generator_impl_constant_test.cc +++ b/src/tint/writer/spirv/ir/generator_impl_ir_constant_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/tint/writer/spirv/test_helper_ir.h" +#include "src/tint/writer/spirv/ir/test_helper_ir.h" namespace tint::writer::spirv { namespace { diff --git a/src/tint/writer/spirv/generator_impl_function_test.cc b/src/tint/writer/spirv/ir/generator_impl_ir_function_test.cc similarity index 98% rename from src/tint/writer/spirv/generator_impl_function_test.cc rename to src/tint/writer/spirv/ir/generator_impl_ir_function_test.cc index b8faebb330..77b4a62a57 100644 --- a/src/tint/writer/spirv/generator_impl_function_test.cc +++ b/src/tint/writer/spirv/ir/generator_impl_ir_function_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/tint/writer/spirv/test_helper_ir.h" +#include "src/tint/writer/spirv/ir/test_helper_ir.h" namespace tint::writer::spirv { namespace { diff --git a/src/tint/writer/spirv/generator_impl_if_test.cc b/src/tint/writer/spirv/ir/generator_impl_ir_if_test.cc similarity index 98% rename from src/tint/writer/spirv/generator_impl_if_test.cc rename to src/tint/writer/spirv/ir/generator_impl_ir_if_test.cc index f594c8bd2e..7b41184ac3 100644 --- a/src/tint/writer/spirv/generator_impl_if_test.cc +++ b/src/tint/writer/spirv/ir/generator_impl_ir_if_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/tint/writer/spirv/test_helper_ir.h" +#include "src/tint/writer/spirv/ir/test_helper_ir.h" using namespace tint::number_suffixes; // NOLINT diff --git a/src/tint/writer/spirv/generator_impl_ir_test.cc b/src/tint/writer/spirv/ir/generator_impl_ir_test.cc similarity index 94% rename from src/tint/writer/spirv/generator_impl_ir_test.cc rename to src/tint/writer/spirv/ir/generator_impl_ir_test.cc index b0a109f407..ffafa60d5f 100644 --- a/src/tint/writer/spirv/generator_impl_ir_test.cc +++ b/src/tint/writer/spirv/ir/generator_impl_ir_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/tint/writer/spirv/test_helper_ir.h" +#include "src/tint/writer/spirv/ir/test_helper_ir.h" #include "gmock/gmock.h" diff --git a/src/tint/writer/spirv/generator_impl_type_test.cc b/src/tint/writer/spirv/ir/generator_impl_ir_type_test.cc similarity index 98% rename from src/tint/writer/spirv/generator_impl_type_test.cc rename to src/tint/writer/spirv/ir/generator_impl_ir_type_test.cc index c86d363b10..38bf1f0754 100644 --- a/src/tint/writer/spirv/generator_impl_type_test.cc +++ b/src/tint/writer/spirv/ir/generator_impl_ir_type_test.cc @@ -19,7 +19,7 @@ #include "src/tint/type/type.h" #include "src/tint/type/u32.h" #include "src/tint/type/void.h" -#include "src/tint/writer/spirv/test_helper_ir.h" +#include "src/tint/writer/spirv/ir/test_helper_ir.h" namespace tint::writer::spirv { namespace { diff --git a/src/tint/writer/spirv/test_helper_ir.h b/src/tint/writer/spirv/ir/test_helper_ir.h similarity index 87% rename from src/tint/writer/spirv/test_helper_ir.h rename to src/tint/writer/spirv/ir/test_helper_ir.h index 3574645b8a..9509b4238c 100644 --- a/src/tint/writer/spirv/test_helper_ir.h +++ b/src/tint/writer/spirv/ir/test_helper_ir.h @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SRC_TINT_WRITER_SPIRV_TEST_HELPER_IR_H_ -#define SRC_TINT_WRITER_SPIRV_TEST_HELPER_IR_H_ +#ifndef SRC_TINT_WRITER_SPIRV_IR_TEST_HELPER_IR_H_ +#define SRC_TINT_WRITER_SPIRV_IR_TEST_HELPER_IR_H_ #include #include "gtest/gtest.h" #include "src/tint/ir/builder.h" -#include "src/tint/writer/spirv/generator_impl_ir.h" +#include "src/tint/writer/spirv/ir/generator_impl_ir.h" #include "src/tint/writer/spirv/spv_dump.h" namespace tint::writer::spirv { @@ -50,4 +50,4 @@ using SpvGeneratorImplTestWithParam = SpvGeneratorTestHelperBase