Lioncash
a2eccbf075
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.
6 years ago
Lioncash
15d177a6ac
video_core/shader/ast: Make Indent() private
It's never used outside of this class, so we can narrow its scope down.
6 years ago
Lioncash
7f6a8a33d4
video_core/shader/ast: Rename Ident() to Indent()
This can be confusing, given "ident" is generally used as a shorthand
for "identifier".
6 years ago
Lioncash
081530686c
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+.
6 years ago
Lioncash
6c41d1cd7e
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.
6 years ago
Lioncash
3c54edae24
video_core/ast: Eliminate variable shadowing warnings
6 years ago
Lioncash
5a0a9c7449
video_core/ast: Replace std::string with a constexpr std::string_view
Same behavior, but without the need to heap allocate
6 years ago
Lioncash
3a20d9734f
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.
6 years ago
Lioncash
8eb1398f8d
video_core/{ast, expr}: Use std::move where applicable
Avoids unnecessary atomic reference count increments and decrements.
6 years ago
Lioncash
8e0c80f269
video_core/ast: Supply const accessors for data where applicable
Provides const equivalents of data accessors for use within const
contexts.
6 years ago
Fernando Sahmkow
e6eae4b815
Shader_ir: Address feedback
6 years ago
Fernando Sahmkow
3c09d9abe6
Shader_Ir: Address Feedback and clang format.
6 years ago
Fernando Sahmkow
7c756baa77
Shader_IR: clean up AST handling and add documentation.
6 years ago
Fernando Sahmkow
5ea740beb5
Shader_IR: Correct OutwardMoves for Ifs
6 years ago
Fernando Sahmkow
b3c46d6948
Shader_IR: corrections and clang-format
6 years ago
Fernando Sahmkow
2e9a810423
Shader_IR: allow else derivation to be optional.
6 years ago
Fernando Sahmkow
0366c18d87
Shader_IR: mark labels as unused for partial decompile.
6 years ago
Fernando Sahmkow
47e4f6a52c
Shader_Ir: Refactor Decompilation process and allow multiple decompilation modes.
6 years ago
Fernando Sahmkow
38fc995f6c
gl_shader_decompiler: Implement AST decompiling
7 years ago
Fernando Sahmkow
6fdd501113
shader_ir: Declare Manager and pass it to appropiate programs.
7 years ago
Fernando Sahmkow
8be6e1c522
shader_ir: Corrections to outward movements and misc stuffs
7 years ago
Fernando Sahmkow
4fde66e609
shader_ir: Add basic goto elimination
7 years ago
Fernando Sahmkow
c17953978b
shader_ir: Initial Decompile Setup
7 years ago