diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2016-09-19 03:01:46 +0200 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2016-09-19 06:14:25 +0200 |
commit | 396a8d91a4423d9c793eeff0798d544613647511 (patch) | |
tree | e0203961233db1ffcbbca2e15154d71d142c5822 /src/video_core/shader | |
parent | Tweak formatting settings (diff) | |
download | yuzu-396a8d91a4423d9c793eeff0798d544613647511.tar yuzu-396a8d91a4423d9c793eeff0798d544613647511.tar.gz yuzu-396a8d91a4423d9c793eeff0798d544613647511.tar.bz2 yuzu-396a8d91a4423d9c793eeff0798d544613647511.tar.lz yuzu-396a8d91a4423d9c793eeff0798d544613647511.tar.xz yuzu-396a8d91a4423d9c793eeff0798d544613647511.tar.zst yuzu-396a8d91a4423d9c793eeff0798d544613647511.zip |
Diffstat (limited to 'src/video_core/shader')
-rw-r--r-- | src/video_core/shader/shader.cpp | 4 | ||||
-rw-r--r-- | src/video_core/shader/shader.h | 3 | ||||
-rw-r--r-- | src/video_core/shader/shader_interpreter.cpp | 5 | ||||
-rw-r--r-- | src/video_core/shader/shader_jit_x64.cpp | 3 |
4 files changed, 6 insertions, 9 deletions
diff --git a/src/video_core/shader/shader.cpp b/src/video_core/shader/shader.cpp index 852c5a9a0..c38bdcc3c 100644 --- a/src/video_core/shader/shader.cpp +++ b/src/video_core/shader/shader.cpp @@ -96,8 +96,8 @@ void ShaderSetup::Setup() { #ifdef ARCHITECTURE_x86_64 if (VideoCore::g_shader_jit_enabled) { u64 cache_key = - (Common::ComputeHash64(&g_state.vs.program_code, sizeof(g_state.vs.program_code)) ^ - Common::ComputeHash64(&g_state.vs.swizzle_data, sizeof(g_state.vs.swizzle_data))); + Common::ComputeHash64(&g_state.vs.program_code, sizeof(g_state.vs.program_code)) ^ + Common::ComputeHash64(&g_state.vs.swizzle_data, sizeof(g_state.vs.swizzle_data)); auto iter = shader_map.find(cache_key); if (iter != shader_map.end()) { diff --git a/src/video_core/shader/shader.h b/src/video_core/shader/shader.h index 830d933a8..79c716b6e 100644 --- a/src/video_core/shader/shader.h +++ b/src/video_core/shader/shader.h @@ -358,8 +358,7 @@ struct ShaderSetup { /** * 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). + * per vertex, which would happen within the `Run` function). */ void Setup(); diff --git a/src/video_core/shader/shader_interpreter.cpp b/src/video_core/shader/shader_interpreter.cpp index 681ff9728..41df8a2fd 100644 --- a/src/video_core/shader/shader_interpreter.cpp +++ b/src/video_core/shader/shader_interpreter.cpp @@ -80,9 +80,8 @@ void RunInterpreter(const ShaderSetup& setup, UnitState<Debug>& state, unsigned auto call = [&program_counter, &call_stack](UnitState<Debug>& state, u32 offset, u32 num_instructions, u32 return_offset, u8 repeat_count, u8 loop_increment) { - program_counter = - offset - - 1; // -1 to make sure when incrementing the PC we end up at the correct offset + // -1 to make sure when incrementing the PC we end up at the correct offset + program_counter = offset - 1; ASSERT(call_stack.size() < call_stack.capacity()); call_stack.push_back( {offset + num_instructions, return_offset, repeat_count, loop_increment, offset}); diff --git a/src/video_core/shader/shader_jit_x64.cpp b/src/video_core/shader/shader_jit_x64.cpp index 04e04ba1a..d1b2ce8d5 100644 --- a/src/video_core/shader/shader_jit_x64.cpp +++ b/src/video_core/shader/shader_jit_x64.cpp @@ -590,8 +590,7 @@ void JitShader::Compile_RSQ(Instruction instr) { Compile_DestEnable(instr, SRC1); } -void JitShader::Compile_NOP(Instruction instr) { -} +void JitShader::Compile_NOP(Instruction instr) {} void JitShader::Compile_END(Instruction instr) { ABI_PopRegistersAndAdjustStack(ABI_ALL_CALLEE_SAVED, 8); |