2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

shader: Remove unused 'state' argument from 'Setup' function.

This commit is contained in:
bunnei 2016-04-01 23:33:03 -04:00
parent a5a74eb121
commit ffcf7ecee9
3 changed files with 4 additions and 5 deletions

View file

@ -140,7 +140,7 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
immediate_attribute_id = 0; immediate_attribute_id = 0;
Shader::UnitState<false> shader_unit; Shader::UnitState<false> shader_unit;
Shader::Setup(shader_unit); Shader::Setup();
if (g_debug_context) if (g_debug_context)
g_debug_context->OnEvent(DebugContext::Event::VertexLoaded, static_cast<void*>(&immediate_input)); g_debug_context->OnEvent(DebugContext::Event::VertexLoaded, static_cast<void*>(&immediate_input));
@ -300,7 +300,7 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
vertex_cache_ids.fill(-1); vertex_cache_ids.fill(-1);
Shader::UnitState<false> shader_unit; Shader::UnitState<false> shader_unit;
Shader::Setup(shader_unit); Shader::Setup();
for (unsigned int index = 0; index < regs.num_vertices; ++index) for (unsigned int index = 0; index < regs.num_vertices; ++index)
{ {

View file

@ -32,7 +32,7 @@ static std::unordered_map<u64, std::unique_ptr<JitCompiler>> shader_map;
static const JitCompiler* jit_shader; static const JitCompiler* jit_shader;
#endif // ARCHITECTURE_x86_64 #endif // ARCHITECTURE_x86_64
void Setup(UnitState<false>& state) { void Setup() {
#ifdef ARCHITECTURE_x86_64 #ifdef ARCHITECTURE_x86_64
if (VideoCore::g_shader_jit_enabled) { if (VideoCore::g_shader_jit_enabled) {
u64 cache_key = (Common::ComputeHash64(&g_state.vs.program_code, sizeof(g_state.vs.program_code)) ^ u64 cache_key = (Common::ComputeHash64(&g_state.vs.program_code, sizeof(g_state.vs.program_code)) ^

View file

@ -339,9 +339,8 @@ struct UnitState {
/** /**
* Performs any shader unit setup that only needs to happen once per shader (as opposed to once per * Performs any shader unit setup that only needs to happen once per shader (as opposed to once per
* vertex, which would happen within the `Run` function). * vertex, which would happen within the `Run` function).
* @param state Shader unit state, must be setup per shader and per shader unit
*/ */
void Setup(UnitState<false>& state); void Setup();
/// Performs any cleanup when the emulator is shutdown /// Performs any cleanup when the emulator is shutdown
void Shutdown(); void Shutdown();