diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2016-12-17 05:45:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-17 05:45:57 +0100 |
commit | 2ca548bbe52bb72cdd269893571b92ad185107a5 (patch) | |
tree | 3200dcfb8b0f3afe4010a141f33f7693b9f7c938 /src/video_core/shader/shader_jit_x64.cpp | |
parent | Merge pull request #2303 from freiro/citra-qt_missing_sdl2_dll (diff) | |
parent | VideoCore/Shader: Extract DebugData out from UnitState (diff) | |
download | yuzu-2ca548bbe52bb72cdd269893571b92ad185107a5.tar yuzu-2ca548bbe52bb72cdd269893571b92ad185107a5.tar.gz yuzu-2ca548bbe52bb72cdd269893571b92ad185107a5.tar.bz2 yuzu-2ca548bbe52bb72cdd269893571b92ad185107a5.tar.lz yuzu-2ca548bbe52bb72cdd269893571b92ad185107a5.tar.xz yuzu-2ca548bbe52bb72cdd269893571b92ad185107a5.tar.zst yuzu-2ca548bbe52bb72cdd269893571b92ad185107a5.zip |
Diffstat (limited to 'src/video_core/shader/shader_jit_x64.cpp')
-rw-r--r-- | src/video_core/shader/shader_jit_x64.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/video_core/shader/shader_jit_x64.cpp b/src/video_core/shader/shader_jit_x64.cpp index 3ba31d474..c588b778b 100644 --- a/src/video_core/shader/shader_jit_x64.cpp +++ b/src/video_core/shader/shader_jit_x64.cpp @@ -185,10 +185,10 @@ void JitShader::Compile_SwizzleSrc(Instruction instr, unsigned src_num, SourceRe if (src_reg.GetRegisterType() == RegisterType::FloatUniform) { src_ptr = SETUP; - src_offset = ShaderSetup::UniformOffset(RegisterType::FloatUniform, src_reg.GetIndex()); + src_offset = ShaderSetup::GetFloatUniformOffset(src_reg.GetIndex()); } else { src_ptr = STATE; - src_offset = UnitState<false>::InputOffset(src_reg); + src_offset = UnitState::InputOffset(src_reg); } int src_offset_disp = (int)src_offset; @@ -266,9 +266,7 @@ void JitShader::Compile_DestEnable(Instruction instr, Xmm src) { SwizzlePattern swiz = {g_state.vs.swizzle_data[operand_desc_id]}; - int dest_offset_disp = (int)UnitState<false>::OutputOffset(dest); - ASSERT_MSG(dest_offset_disp == UnitState<false>::OutputOffset(dest), - "Destinaton offset too large for int type"); + size_t dest_offset_disp = UnitState::OutputOffset(dest); // If all components are enabled, write the result to the destination register if (swiz.dest_mask == NO_DEST_REG_MASK) { @@ -348,8 +346,7 @@ void JitShader::Compile_EvaluateCondition(Instruction instr) { } void JitShader::Compile_UniformCondition(Instruction instr) { - size_t offset = - ShaderSetup::UniformOffset(RegisterType::BoolUniform, instr.flow_control.bool_uniform_id); + size_t offset = ShaderSetup::GetBoolUniformOffset(instr.flow_control.bool_uniform_id); cmp(byte[SETUP + offset], 0); } @@ -732,8 +729,7 @@ void JitShader::Compile_LOOP(Instruction instr) { // This decodes the fields from the integer uniform at index instr.flow_control.int_uniform_id. // The Y (LOOPCOUNT_REG) and Z (LOOPINC) component are kept multiplied by 16 (Left shifted by // 4 bits) to be used as an offset into the 16-byte vector registers later - size_t offset = - ShaderSetup::UniformOffset(RegisterType::IntUniform, instr.flow_control.int_uniform_id); + size_t offset = ShaderSetup::GetIntUniformOffset(instr.flow_control.int_uniform_id); mov(LOOPCOUNT, dword[SETUP + offset]); mov(LOOPCOUNT_REG, LOOPCOUNT); shr(LOOPCOUNT_REG, 4); |