From 926a0c51071f6cf5718c77958cc801030ce9d404 Mon Sep 17 00:00:00 2001 From: Dietrich Geisler Date: Tue, 2 Jun 2020 12:12:35 -0400 Subject: Working matrix swizzle (#1354) * Working matrix swizzle. Supports one and zero indexing and multiple elements. Performs semantic checking of the swizzle. Matrix swizzles are transformed into a vector of indexing operations during lowering to the IR. This change does not handle matrix swizzle as lvalues. * Renaming * Added missing semicolon * Initialize variable for gcc * Added the expect file for diagnostics * Matrix swizzle updated per PR feedback * Stylistic fix * Formatting fixes * Fix compiling with AST change. Change indentation. Co-authored-by: jsmall-nvidia --- source/slang/slang-ast-dump.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/slang/slang-ast-dump.cpp') diff --git a/source/slang/slang-ast-dump.cpp b/source/slang/slang-ast-dump.cpp index 2157b7c19..d0b2497bb 100644 --- a/source/slang/slang-ast-dump.cpp +++ b/source/slang/slang-ast-dump.cpp @@ -450,6 +450,15 @@ struct Context m_writer->emit("}"); } + void dump(const MatrixCoord& coord) + { + m_writer->emit("("); + m_writer->emit(coord.row); + m_writer->emit(", "); + m_writer->emit(coord.col); + m_writer->emit(")\n"); + } + void dump(const LookupResult& result) { auto& nonConstResult = const_cast(result); -- cgit v1.2.3