Browse Source
Shader_Ir: Refactor Decompilation process and allow multiple decompilation modes.
nce_cpp
Shader_Ir: Refactor Decompilation process and allow multiple decompilation modes.
nce_cpp
committed by
FernandoS27
15 changed files with 338 additions and 82 deletions
-
2CMakeModules/GenerateSCMRev.cmake
-
2src/common/CMakeLists.txt
-
2src/video_core/CMakeLists.txt
-
8src/video_core/renderer_opengl/gl_shader_decompiler.cpp
-
25src/video_core/renderer_opengl/gl_shader_gen.cpp
-
98src/video_core/shader/ast.cpp
-
20src/video_core/shader/ast.h
-
26src/video_core/shader/compiler_settings.cpp
-
25src/video_core/shader/compiler_settings.h
-
92src/video_core/shader/control_flow.cpp
-
10src/video_core/shader/control_flow.h
-
86src/video_core/shader/decode.cpp
-
8src/video_core/shader/decode/other.cpp
-
6src/video_core/shader/shader_ir.cpp
-
10src/video_core/shader/shader_ir.h
@ -0,0 +1,26 @@ |
|||||
|
// Copyright 2019 yuzu Emulator Project
|
||||
|
// Licensed under GPLv2 or any later version
|
||||
|
// Refer to the license.txt file included.
|
||||
|
|
||||
|
#include "video_core/shader/compiler_settings.h"
|
||||
|
|
||||
|
namespace VideoCommon::Shader { |
||||
|
|
||||
|
std::string CompileDepthAsString(const CompileDepth cd) { |
||||
|
switch (cd) { |
||||
|
case CompileDepth::BruteForce: |
||||
|
return "Brute Force Compile"; |
||||
|
case CompileDepth::FlowStack: |
||||
|
return "Simple Flow Stack Mode"; |
||||
|
case CompileDepth::NoFlowStack: |
||||
|
return "Remove Flow Stack"; |
||||
|
case CompileDepth::DecompileBackwards: |
||||
|
return "Decompile Backward Jumps"; |
||||
|
case CompileDepth::FullDecompile: |
||||
|
return "Full Decompilation"; |
||||
|
default: |
||||
|
return "Unknown Compiler Process"; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} // namespace VideoCommon::Shader
|
||||
@ -0,0 +1,25 @@ |
|||||
|
// Copyright 2019 yuzu Emulator Project |
||||
|
// Licensed under GPLv2 or any later version |
||||
|
// Refer to the license.txt file included. |
||||
|
|
||||
|
#pragma once |
||||
|
|
||||
|
#include "video_core/engines/shader_bytecode.h" |
||||
|
|
||||
|
namespace VideoCommon::Shader { |
||||
|
|
||||
|
enum class CompileDepth : u32 { |
||||
|
BruteForce = 0, |
||||
|
FlowStack = 1, |
||||
|
NoFlowStack = 2, |
||||
|
DecompileBackwards = 3, |
||||
|
FullDecompile = 4, |
||||
|
}; |
||||
|
|
||||
|
std::string CompileDepthAsString(CompileDepth cd); |
||||
|
|
||||
|
struct CompilerSettings { |
||||
|
CompileDepth depth; |
||||
|
}; |
||||
|
|
||||
|
} // namespace VideoCommon::Shader |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue