├── .clang-format ├── .github └── workflows │ └── ci.yml ├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── README.md ├── compiler └── shaderpulse.cpp ├── example ├── argmax │ ├── CMakeLists.txt │ ├── argmax.cpp │ └── argmax.glsl ├── compute.glsl ├── mandelbrot │ ├── CMakeLists.txt │ ├── lodepng.cpp │ ├── lodepng.h │ ├── mandelbrot.cpp │ └── mandelbrot.glsl └── square.glsl ├── include ├── AST │ ├── AST.h │ ├── ASTVisitor.h │ ├── PrinterASTVisitor.h │ ├── Types.h │ └── Util.h ├── Analysis │ ├── Scope.h │ ├── SemanticAnalyzer.h │ └── SymbolTable.h ├── CodeGen │ ├── MLIRCodeGen.h │ ├── Swizzle.h │ └── TypeConversion.h ├── Lexer │ ├── Lexer.h │ ├── Token.h │ └── TokenDefs.h ├── Parser │ └── Parser.h └── Preprocessor │ └── Preprocessor.h ├── lib ├── AST │ ├── CMakeLists.txt │ ├── PrinterASTVisitor.cpp │ └── Util.cpp ├── Analysis │ ├── CMakeLists.txt │ ├── Scope.cpp │ ├── SemanticAnalyzer.cpp │ └── SymbolTable.cpp ├── CodeGen │ ├── CMakeLists.txt │ ├── MLIRCodeGen.cpp │ ├── Swizzle.cpp │ └── TypeConversion.cpp ├── Lexer │ ├── CMakeLists.txt │ ├── Lexer.cpp │ └── Token.cpp ├── Parser │ ├── CMakeLists.txt │ └── Parser.cpp └── Preprocessor │ ├── CMakeLists.txt │ └── Preprocessor.cpp ├── test ├── Analysis │ ├── cf_conditional.glsl │ ├── cf_loops.glsl │ ├── cf_switch.glsl │ ├── functions.glsl │ └── vardecl.glsl ├── CMakeLists.txt ├── CodeGen │ ├── arrays.glsl │ ├── binary_expressions.glsl │ ├── cf_do_while.glsl │ ├── cf_if_else.glsl │ ├── cf_loops_for.glsl │ ├── cf_loops_while.glsl │ ├── cf_loops_while_break.glsl │ ├── cf_loops_while_continue.glsl │ ├── functions.glsl │ ├── functions_builtin.glsl │ ├── interface_blocks.glsl │ ├── run_tests.sh │ ├── scopes.glsl │ ├── structs.glsl │ ├── swizzle.glsl │ ├── type_conversion_scalar.glsl │ ├── type_conversion_vector.glsl │ ├── unary_expressions.glsl │ └── vectors.glsl ├── Lexer │ └── LexerTest.cpp └── Parser │ └── ParserTest.cpp └── utils └── include └── expected.hpp /.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: LLVM -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/.github/workflows/ci.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/.gitignore -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/.gitmodules -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/CMakeLists.txt -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/README.md -------------------------------------------------------------------------------- /compiler/shaderpulse.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/compiler/shaderpulse.cpp -------------------------------------------------------------------------------- /example/argmax/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/example/argmax/CMakeLists.txt -------------------------------------------------------------------------------- /example/argmax/argmax.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/example/argmax/argmax.cpp -------------------------------------------------------------------------------- /example/argmax/argmax.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/example/argmax/argmax.glsl -------------------------------------------------------------------------------- /example/compute.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/example/compute.glsl -------------------------------------------------------------------------------- /example/mandelbrot/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/example/mandelbrot/CMakeLists.txt -------------------------------------------------------------------------------- /example/mandelbrot/lodepng.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/example/mandelbrot/lodepng.cpp -------------------------------------------------------------------------------- /example/mandelbrot/lodepng.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/example/mandelbrot/lodepng.h -------------------------------------------------------------------------------- /example/mandelbrot/mandelbrot.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/example/mandelbrot/mandelbrot.cpp -------------------------------------------------------------------------------- /example/mandelbrot/mandelbrot.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/example/mandelbrot/mandelbrot.glsl -------------------------------------------------------------------------------- /example/square.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/example/square.glsl -------------------------------------------------------------------------------- /include/AST/AST.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/include/AST/AST.h -------------------------------------------------------------------------------- /include/AST/ASTVisitor.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/include/AST/ASTVisitor.h -------------------------------------------------------------------------------- /include/AST/PrinterASTVisitor.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/include/AST/PrinterASTVisitor.h -------------------------------------------------------------------------------- /include/AST/Types.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/include/AST/Types.h -------------------------------------------------------------------------------- /include/AST/Util.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/include/AST/Util.h -------------------------------------------------------------------------------- /include/Analysis/Scope.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/include/Analysis/Scope.h -------------------------------------------------------------------------------- /include/Analysis/SemanticAnalyzer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/include/Analysis/SemanticAnalyzer.h -------------------------------------------------------------------------------- /include/Analysis/SymbolTable.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/include/Analysis/SymbolTable.h -------------------------------------------------------------------------------- /include/CodeGen/MLIRCodeGen.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/include/CodeGen/MLIRCodeGen.h -------------------------------------------------------------------------------- /include/CodeGen/Swizzle.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/include/CodeGen/Swizzle.h -------------------------------------------------------------------------------- /include/CodeGen/TypeConversion.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/include/CodeGen/TypeConversion.h -------------------------------------------------------------------------------- /include/Lexer/Lexer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/include/Lexer/Lexer.h -------------------------------------------------------------------------------- /include/Lexer/Token.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/include/Lexer/Token.h -------------------------------------------------------------------------------- /include/Lexer/TokenDefs.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/include/Lexer/TokenDefs.h -------------------------------------------------------------------------------- /include/Parser/Parser.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/include/Parser/Parser.h -------------------------------------------------------------------------------- /include/Preprocessor/Preprocessor.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/include/Preprocessor/Preprocessor.h -------------------------------------------------------------------------------- /lib/AST/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/lib/AST/CMakeLists.txt -------------------------------------------------------------------------------- /lib/AST/PrinterASTVisitor.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/lib/AST/PrinterASTVisitor.cpp -------------------------------------------------------------------------------- /lib/AST/Util.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/lib/AST/Util.cpp -------------------------------------------------------------------------------- /lib/Analysis/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/lib/Analysis/CMakeLists.txt -------------------------------------------------------------------------------- /lib/Analysis/Scope.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/lib/Analysis/Scope.cpp -------------------------------------------------------------------------------- /lib/Analysis/SemanticAnalyzer.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/lib/Analysis/SemanticAnalyzer.cpp -------------------------------------------------------------------------------- /lib/Analysis/SymbolTable.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/lib/Analysis/SymbolTable.cpp -------------------------------------------------------------------------------- /lib/CodeGen/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/lib/CodeGen/CMakeLists.txt -------------------------------------------------------------------------------- /lib/CodeGen/MLIRCodeGen.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/lib/CodeGen/MLIRCodeGen.cpp -------------------------------------------------------------------------------- /lib/CodeGen/Swizzle.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/lib/CodeGen/Swizzle.cpp -------------------------------------------------------------------------------- /lib/CodeGen/TypeConversion.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/lib/CodeGen/TypeConversion.cpp -------------------------------------------------------------------------------- /lib/Lexer/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/lib/Lexer/CMakeLists.txt -------------------------------------------------------------------------------- /lib/Lexer/Lexer.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/lib/Lexer/Lexer.cpp -------------------------------------------------------------------------------- /lib/Lexer/Token.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/lib/Lexer/Token.cpp -------------------------------------------------------------------------------- /lib/Parser/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/lib/Parser/CMakeLists.txt -------------------------------------------------------------------------------- /lib/Parser/Parser.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/lib/Parser/Parser.cpp -------------------------------------------------------------------------------- /lib/Preprocessor/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/lib/Preprocessor/CMakeLists.txt -------------------------------------------------------------------------------- /lib/Preprocessor/Preprocessor.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/lib/Preprocessor/Preprocessor.cpp -------------------------------------------------------------------------------- /test/Analysis/cf_conditional.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/Analysis/cf_conditional.glsl -------------------------------------------------------------------------------- /test/Analysis/cf_loops.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/Analysis/cf_loops.glsl -------------------------------------------------------------------------------- /test/Analysis/cf_switch.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/Analysis/cf_switch.glsl -------------------------------------------------------------------------------- /test/Analysis/functions.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/Analysis/functions.glsl -------------------------------------------------------------------------------- /test/Analysis/vardecl.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/Analysis/vardecl.glsl -------------------------------------------------------------------------------- /test/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/CMakeLists.txt -------------------------------------------------------------------------------- /test/CodeGen/arrays.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/CodeGen/arrays.glsl -------------------------------------------------------------------------------- /test/CodeGen/binary_expressions.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/CodeGen/binary_expressions.glsl -------------------------------------------------------------------------------- /test/CodeGen/cf_do_while.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/CodeGen/cf_do_while.glsl -------------------------------------------------------------------------------- /test/CodeGen/cf_if_else.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/CodeGen/cf_if_else.glsl -------------------------------------------------------------------------------- /test/CodeGen/cf_loops_for.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/CodeGen/cf_loops_for.glsl -------------------------------------------------------------------------------- /test/CodeGen/cf_loops_while.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/CodeGen/cf_loops_while.glsl -------------------------------------------------------------------------------- /test/CodeGen/cf_loops_while_break.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/CodeGen/cf_loops_while_break.glsl -------------------------------------------------------------------------------- /test/CodeGen/cf_loops_while_continue.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/CodeGen/cf_loops_while_continue.glsl -------------------------------------------------------------------------------- /test/CodeGen/functions.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/CodeGen/functions.glsl -------------------------------------------------------------------------------- /test/CodeGen/functions_builtin.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/CodeGen/functions_builtin.glsl -------------------------------------------------------------------------------- /test/CodeGen/interface_blocks.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/CodeGen/interface_blocks.glsl -------------------------------------------------------------------------------- /test/CodeGen/run_tests.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/CodeGen/run_tests.sh -------------------------------------------------------------------------------- /test/CodeGen/scopes.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/CodeGen/scopes.glsl -------------------------------------------------------------------------------- /test/CodeGen/structs.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/CodeGen/structs.glsl -------------------------------------------------------------------------------- /test/CodeGen/swizzle.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/CodeGen/swizzle.glsl -------------------------------------------------------------------------------- /test/CodeGen/type_conversion_scalar.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/CodeGen/type_conversion_scalar.glsl -------------------------------------------------------------------------------- /test/CodeGen/type_conversion_vector.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/CodeGen/type_conversion_vector.glsl -------------------------------------------------------------------------------- /test/CodeGen/unary_expressions.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/CodeGen/unary_expressions.glsl -------------------------------------------------------------------------------- /test/CodeGen/vectors.glsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/CodeGen/vectors.glsl -------------------------------------------------------------------------------- /test/Lexer/LexerTest.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/Lexer/LexerTest.cpp -------------------------------------------------------------------------------- /test/Parser/ParserTest.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/test/Parser/ParserTest.cpp -------------------------------------------------------------------------------- /utils/include/expected.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmed92/shaderpulse/HEAD/utils/include/expected.hpp --------------------------------------------------------------------------------