summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader/shader_jit_x64.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2016-03-27 03:02:15 +0200
committerbunnei <bunneidev@gmail.com>2016-04-14 05:04:47 +0200
commita5a74eb121e0586706c3196d450c088280f996a5 (patch)
tree1ed5030e828e221d2c34596effaa1e680a678391 /src/video_core/shader/shader_jit_x64.h
parentshader_jit_x64: Allocate each program independently and persist for emu session. (diff)
downloadyuzu-a5a74eb121e0586706c3196d450c088280f996a5.tar
yuzu-a5a74eb121e0586706c3196d450c088280f996a5.tar.gz
yuzu-a5a74eb121e0586706c3196d450c088280f996a5.tar.bz2
yuzu-a5a74eb121e0586706c3196d450c088280f996a5.tar.lz
yuzu-a5a74eb121e0586706c3196d450c088280f996a5.tar.xz
yuzu-a5a74eb121e0586706c3196d450c088280f996a5.tar.zst
yuzu-a5a74eb121e0586706c3196d450c088280f996a5.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/shader/shader_jit_x64.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/video_core/shader/shader_jit_x64.h b/src/video_core/shader/shader_jit_x64.h
index 19f9bdb56..1501d13bf 100644
--- a/src/video_core/shader/shader_jit_x64.h
+++ b/src/video_core/shader/shader_jit_x64.h
@@ -25,8 +25,6 @@ namespace Shader {
/// Memory allocated for each compiled shader (64Kb)
constexpr size_t MAX_SHADER_SIZE = 1024 * 64;
-using CompiledShader = void(void* registers);
-
/**
* This class implements the shader JIT compiler. It recompiles a Pica shader program into x86_64
* code that can be executed on the host machine directly.
@@ -35,8 +33,8 @@ class JitCompiler : public Gen::XCodeBlock {
public:
JitCompiler();
- void Run(void* registers) const {
- program(registers);
+ void Run(void* registers, unsigned offset) const {
+ program(registers, code_ptr[offset]);
}
void Compile();
@@ -111,6 +109,7 @@ private:
/// Branches that need to be fixed up once the entire shader program is compiled
std::vector<std::pair<Gen::FixupBranch, unsigned>> fixup_branches;
+ using CompiledShader = void(void* registers, const u8* start_addr);
CompiledShader* program = nullptr;
};