mirror of
https://github.com/citra-emu/citra-canary.git
synced 2024-12-25 06:55:35 +00:00
Use new shader-jit signature for interpreter
This commit is contained in:
parent
4e01e9ffc5
commit
1308afe2c2
|
@ -84,9 +84,9 @@ OutputVertex ShaderSetup::Run(UnitState<false>& state, const InputVertex& input,
|
||||||
if (VideoCore::g_shader_jit_enabled)
|
if (VideoCore::g_shader_jit_enabled)
|
||||||
jit_shader->Run(setup, state, config.main_offset);
|
jit_shader->Run(setup, state, config.main_offset);
|
||||||
else
|
else
|
||||||
RunInterpreter(state);
|
RunInterpreter(setup, state, config.main_offset);
|
||||||
#else
|
#else
|
||||||
RunInterpreter(state);
|
RunInterpreter(setup, state, config.main_offset);
|
||||||
#endif // ARCHITECTURE_x86_64
|
#endif // ARCHITECTURE_x86_64
|
||||||
|
|
||||||
// Setup output data
|
// Setup output data
|
||||||
|
@ -157,7 +157,7 @@ DebugData<true> ShaderSetup::ProduceDebugInfo(const InputVertex& input, int num_
|
||||||
state.conditional_code[0] = false;
|
state.conditional_code[0] = false;
|
||||||
state.conditional_code[1] = false;
|
state.conditional_code[1] = false;
|
||||||
|
|
||||||
RunInterpreter(state);
|
RunInterpreter(setup, state, config.main_offset);
|
||||||
return state.debug;
|
return state.debug;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,11 +41,11 @@ struct CallStackElement {
|
||||||
};
|
};
|
||||||
|
|
||||||
template<bool Debug>
|
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?
|
// TODO: Is there a maximal size for this?
|
||||||
boost::container::static_vector<CallStackElement, 16> call_stack;
|
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& uniforms = g_state.vs.uniforms;
|
||||||
const auto& swizzle_data = g_state.vs.swizzle_data;
|
const auto& swizzle_data = g_state.vs.swizzle_data;
|
||||||
|
@ -647,8 +647,8 @@ void RunInterpreter(UnitState<Debug>& state) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Explicit instantiation
|
// Explicit instantiation
|
||||||
template void RunInterpreter(UnitState<false>& state);
|
template void RunInterpreter(const ShaderSetup& setup, UnitState<false>& state, unsigned offset);
|
||||||
template void RunInterpreter(UnitState<true>& state);
|
template void RunInterpreter(const ShaderSetup& setup, UnitState<true>& state, unsigned offset);
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace Shader {
|
||||||
template <bool Debug> struct UnitState;
|
template <bool Debug> struct UnitState;
|
||||||
|
|
||||||
template<bool Debug>
|
template<bool Debug>
|
||||||
void RunInterpreter(UnitState<Debug>& state);
|
void RunInterpreter(const ShaderSetup& setup, UnitState<Debug>& state, unsigned offset);
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue