summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_shader_decompiler.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-04-05 03:44:35 +0200
committerbunnei <bunneidev@gmail.com>2018-04-14 05:48:20 +0200
commited7e597b4494f770f4907560af0aa778d7762226 (patch)
treee52e78746d267dc85545338de95789d3a54150a9 /src/video_core/renderer_opengl/gl_shader_decompiler.h
parentshader_bytecode: Add initial module for shader decoding. (diff)
downloadyuzu-ed7e597b4494f770f4907560af0aa778d7762226.tar
yuzu-ed7e597b4494f770f4907560af0aa778d7762226.tar.gz
yuzu-ed7e597b4494f770f4907560af0aa778d7762226.tar.bz2
yuzu-ed7e597b4494f770f4907560af0aa778d7762226.tar.lz
yuzu-ed7e597b4494f770f4907560af0aa778d7762226.tar.xz
yuzu-ed7e597b4494f770f4907560af0aa778d7762226.tar.zst
yuzu-ed7e597b4494f770f4907560af0aa778d7762226.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.h b/src/video_core/renderer_opengl/gl_shader_decompiler.h
index 02ebfcbe8..628f02c93 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.h
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.h
@@ -5,23 +5,20 @@
#include <array>
#include <functional>
#include <string>
+#include <boost/optional.hpp>
#include "common/common_types.h"
-namespace Maxwell3D {
+namespace Tegra {
namespace Shader {
namespace Decompiler {
-constexpr size_t MAX_PROGRAM_CODE_LENGTH{0x100000};
-constexpr size_t MAX_SWIZZLE_DATA_LENGTH{0x100000};
+constexpr size_t MAX_PROGRAM_CODE_LENGTH{0x100};
+constexpr size_t MAX_SWIZZLE_DATA_LENGTH{0x100};
-std::string DecompileProgram(const std::array<u32, MAX_PROGRAM_CODE_LENGTH>& program_code,
- const std::array<u32, MAX_SWIZZLE_DATA_LENGTH>& swizzle_data,
- u32 main_offset,
- const std::function<std::string(u32)>& inputreg_getter,
- const std::function<std::string(u32)>& outputreg_getter,
- bool sanitize_mul, const std::string& emit_cb = "",
- const std::string& setemit_cb = "");
+using ProgramCode = std::array<u64, MAX_PROGRAM_CODE_LENGTH>;
+
+boost::optional<std::string> DecompileProgram(const ProgramCode& program_code, u32 main_offset);
} // namespace Decompiler
} // namespace Shader
-} // namespace Maxwell3D
+} // namespace Tegra