summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader/shader_jit.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-07-23 05:25:30 +0200
committerbunnei <bunneidev@gmail.com>2015-08-16 00:01:07 +0200
commit094ae6fadb57883e25d412443fcae987ddf240ef (patch)
tree8817c9b0672bd02be3fa32a02f3f126f0ecfb664 /src/video_core/shader/shader_jit.cpp
parentCommon: Added MurmurHash3 hash function for general-purpose use. (diff)
downloadyuzu-094ae6fadb57883e25d412443fcae987ddf240ef.tar
yuzu-094ae6fadb57883e25d412443fcae987ddf240ef.tar.gz
yuzu-094ae6fadb57883e25d412443fcae987ddf240ef.tar.bz2
yuzu-094ae6fadb57883e25d412443fcae987ddf240ef.tar.lz
yuzu-094ae6fadb57883e25d412443fcae987ddf240ef.tar.xz
yuzu-094ae6fadb57883e25d412443fcae987ddf240ef.tar.zst
yuzu-094ae6fadb57883e25d412443fcae987ddf240ef.zip
Diffstat (limited to 'src/video_core/shader/shader_jit.cpp')
-rw-r--r--src/video_core/shader/shader_jit.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/video_core/shader/shader_jit.cpp b/src/video_core/shader/shader_jit.cpp
new file mode 100644
index 000000000..69fb7f6be
--- /dev/null
+++ b/src/video_core/shader/shader_jit.cpp
@@ -0,0 +1,36 @@
+// Copyright 2015 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "video_core/pica.h"
+
+#include "shader.h"
+#include "shader_jit.h"
+
+namespace Pica {
+
+namespace Shader {
+
+JitShader::JitShader() : jitted(nullptr) {
+}
+
+void JitShader::DoJit(JitCompiler& jit) {
+ jitted = jit.Compile();
+}
+
+void JitShader::Run(UnitState& state) {
+ if (jitted)
+ jitted(&state);
+}
+
+JitCompiler::JitCompiler() {
+ AllocCodeSpace(1024 * 1024 * 4);
+}
+
+void JitCompiler::Clear() {
+ ClearCodeSpace();
+}
+
+} // namespace Shader
+
+} // namespace Pica