Lioncash
4d6a2247f2
ast: Improve string concat readability in operator()
Provides an in-place format string to make it more pleasant to read.
5 years ago
Lioncash
5db4785535
video_core: Resolve more variable shadowing scenarios pt.3
Cleans out the rest of the occurrences of variable shadowing and makes
any further occurrences of shadowing compiler errors.
5 years ago
Fernando Sahmkow
fb98059d10
Shader_IR: Implement Fast BRX and allow multi-branches in the CFG.
7 years ago
Fernando Sahmkow
683008bc59
Shader_IR: Implement Fast BRX and allow multi-branches in the CFG.
7 years ago
Lioncash
4e7dbc49f8
video_core/shader/ast: Make ShowCurrentState() and SanityCheck() const member functions
These can also trivially be made const member functions, with the
addition of a few consts.
7 years ago
Lioncash
4f4bfa0448
video_core/shader/ast: Make ASTManager::Print a const member function
Given all visiting functions never modify the nodes, we can trivially
make this a const member function.
7 years ago
Lioncash
98d64c9a04
video_core/shader/ast: Make ExprPrinter members private
This member already has an accessor, so there's no need for it to be
public.
7 years ago
Lioncash
c5c0af5aa7
video_core/shader/ast: Make Indent() return a string_view
The returned string is simply a substring of our constexpr tabs
string_view, so we can just use a string_view here as well, since the
original string_view is guaranteed to always exist.
Now the function is fully non-allocating.
7 years ago
Lioncash
3025e2110c
video_core/shader/ast: Make Indent() private
It's never used outside of this class, so we can narrow its scope down.
7 years ago
Lioncash
4f14102a05
video_core/shader/ast: Rename Ident() to Indent()
This can be confusing, given "ident" is generally used as a shorthand
for "identifier".
7 years ago
Lioncash
1a00cb5680
video_core/shader/ast: Make use of fmt where applicable
Makes a few strings nicer to read and also eliminates a bit of string
churn with operator+.
7 years ago
Lioncash
2d2dd7bf7b
video_core/ast: Make ShowCurrentState() take a string_view instead of std::string
Allows the function to be non-allocating in terms of the output string.
7 years ago
Lioncash
b1178c30cf
video_core/ast: Eliminate variable shadowing warnings
7 years ago
Lioncash
d599c3c74b
video_core/ast: Replace std::string with a constexpr std::string_view
Same behavior, but without the need to heap allocate
7 years ago
Lioncash
7d18851449
video_core/ast: Default the move constructor and assignment operator
This is behaviorally equivalent and also fixes a bug where some members
weren't being moved over.
7 years ago
Lioncash
e53a34ecf6
video_core/{ast, expr}: Use std::move where applicable
Avoids unnecessary atomic reference count increments and decrements.
7 years ago
Lioncash
2d86bd6d08
video_core/ast: Supply const accessors for data where applicable
Provides const equivalents of data accessors for use within const
contexts.
7 years ago
Fernando Sahmkow
4de60d6a41
Shader_ir: Address feedback
7 years ago
Fernando Sahmkow
97f8352efe
Shader_Ir: Address Feedback and clang format.
7 years ago
Fernando Sahmkow
8561edf839
Shader_IR: clean up AST handling and add documentation.
7 years ago
Fernando Sahmkow
e9f4340b88
Shader_IR: Correct OutwardMoves for Ifs
7 years ago
Fernando Sahmkow
6389d468ff
Shader_IR: corrections and clang-format
7 years ago
Fernando Sahmkow
9e8c57f049
Shader_IR: allow else derivation to be optional.
7 years ago
Fernando Sahmkow
7e08fad2d4
Shader_IR: mark labels as unused for partial decompile.
7 years ago
Fernando Sahmkow
7b55e1c0b1
Shader_Ir: Refactor Decompilation process and allow multiple decompilation modes.
7 years ago
Fernando Sahmkow
5d3c5df7f4
gl_shader_decompiler: Implement AST decompiling
7 years ago
Fernando Sahmkow
f1ed22419c
shader_ir: Declare Manager and pass it to appropiate programs.
7 years ago
Fernando Sahmkow
9f61500df1
shader_ir: Corrections to outward movements and misc stuffs
7 years ago
Fernando Sahmkow
9581919b87
shader_ir: Add basic goto elimination
7 years ago
Fernando Sahmkow
a3d04b45a9
shader_ir: Initial Decompile Setup
7 years ago