summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorJannik Vogel <email@jannikvogel.de>2016-05-13 09:38:40 +0200
committerJannik Vogel <email@jannikvogel.de>2016-05-13 09:41:55 +0200
commit1308afe2c225cee5e8096955e6107b876caecfd9 (patch)
treecc40605703044c04f8c19d0c185f9199dda7c9b1 /src/video_core
parentRefactor access to state in shader-jit (diff)
downloadyuzu-1308afe2c225cee5e8096955e6107b876caecfd9.tar
yuzu-1308afe2c225cee5e8096955e6107b876caecfd9.tar.gz
yuzu-1308afe2c225cee5e8096955e6107b876caecfd9.tar.bz2
yuzu-1308afe2c225cee5e8096955e6107b876caecfd9.tar.lz
yuzu-1308afe2c225cee5e8096955e6107b876caecfd9.tar.xz
yuzu-1308afe2c225cee5e8096955e6107b876caecfd9.tar.zst
yuzu-1308afe2c225cee5e8096955e6107b876caecfd9.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/shader/shader.cpp6
-rw-r--r--src/video_core/shader/shader_interpreter.cpp8
-rw-r--r--src/video_core/shader/shader_interpreter.h2
3 files changed, 8 insertions, 8 deletions
diff --git a/src/video_core/shader/shader.cpp b/src/video_core/shader/shader.cpp
index d36d3d78e..161097610 100644
--- a/src/video_core/shader/shader.cpp
+++ b/src/video_core/shader/shader.cpp
@@ -84,9 +84,9 @@ OutputVertex ShaderSetup::Run(UnitState<false>& state, const InputVertex& input,
if (VideoCore::g_shader_jit_enabled)
jit_shader->Run(setup, state, config.main_offset);
else
- RunInterpreter(state);
+ RunInterpreter(setup, state, config.main_offset);
#else
- RunInterpreter(state);
+ RunInterpreter(setup, state, config.main_offset);
#endif // ARCHITECTURE_x86_64
// Setup output data
@@ -157,7 +157,7 @@ DebugData<true> ShaderSetup::ProduceDebugInfo(const InputVertex& input, int num_
state.conditional_code[0] = false;
state.conditional_code[1] = false;
- RunInterpreter(state);
+ RunInterpreter(setup, state, config.main_offset);
return state.debug;
}
diff --git a/src/video_core/shader/shader_interpreter.cpp b/src/video_core/shader/shader_interpreter.cpp
index 3a827d11f..714e8bfd5 100644
--- a/src/video_core/shader/shader_interpreter.cpp
+++ b/src/video_core/shader/shader_interpreter.cpp
@@ -41,11 +41,11 @@ struct CallStackElement {
};
template<bool Debug>
-void RunInterpreter(UnitState<Debug>& state) {
+void RunInterpreter(const ShaderSetup& setup, UnitState<Debug>& state, unsigned offset) {
// TODO: Is there a maximal size for this?
boost::container::static_vector<CallStackElement, 16> call_stack;
- u32 program_counter = g_state.regs.vs.main_offset;
+ u32 program_counter = offset;
const auto& uniforms = g_state.vs.uniforms;
const auto& swizzle_data = g_state.vs.swizzle_data;
@@ -647,8 +647,8 @@ void RunInterpreter(UnitState<Debug>& state) {
}
// Explicit instantiation
-template void RunInterpreter(UnitState<false>& state);
-template void RunInterpreter(UnitState<true>& state);
+template void RunInterpreter(const ShaderSetup& setup, UnitState<false>& state, unsigned offset);
+template void RunInterpreter(const ShaderSetup& setup, UnitState<true>& state, unsigned offset);
} // namespace
diff --git a/src/video_core/shader/shader_interpreter.h b/src/video_core/shader/shader_interpreter.h
index 6048cdf3a..bb3ce1c6e 100644
--- a/src/video_core/shader/shader_interpreter.h
+++ b/src/video_core/shader/shader_interpreter.h
@@ -11,7 +11,7 @@ namespace Shader {
template <bool Debug> struct UnitState;
template<bool Debug>
-void RunInterpreter(UnitState<Debug>& state);
+void RunInterpreter(const ShaderSetup& setup, UnitState<Debug>& state, unsigned offset);
} // namespace