forked from eden-emu/eden
Shader: Initial implementation of x86_x64 JIT compiler for Pica vertex shaders.
- Config: Add an option for selecting to use shader JIT or interpreter. - Qt: Add a menu option for enabling/disabling the shader JIT.
This commit is contained in:
parent
be08c22685
commit
c03924e60e
19 changed files with 968 additions and 4 deletions
36
src/video_core/shader/shader_jit.cpp
Normal file
36
src/video_core/shader/shader_jit.cpp
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue