diff options
| author | 2019-04-03 04:33:36 -0300 | |
|---|---|---|
| committer | 2019-04-18 15:54:39 -0300 | |
| commit | fbe8d1ceaa94c70e13a575f774967e559d0dee72 (patch) | |
| tree | 50f2bca6610784444cc3b75fd2c88eac553e1075 /src/video_core/shader | |
| parent | Merge pull request #2378 from lioncash/ro (diff) | |
| download | yuzu-fbe8d1ceaa94c70e13a575f774967e559d0dee72.tar.gz yuzu-fbe8d1ceaa94c70e13a575f774967e559d0dee72.tar.xz yuzu-fbe8d1ceaa94c70e13a575f774967e559d0dee72.zip | |
video_core: Silent -Wswitch warnings
Diffstat (limited to 'src/video_core/shader')
| -rw-r--r-- | src/video_core/shader/decode.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/shader/decode/conversion.cpp | 7 | ||||
| -rw-r--r-- | src/video_core/shader/decode/xmad.cpp | 5 | ||||
| -rw-r--r-- | src/video_core/shader/shader_ir.cpp | 9 |
4 files changed, 16 insertions, 9 deletions
diff --git a/src/video_core/shader/decode.cpp b/src/video_core/shader/decode.cpp index e4c438792..2da595c0d 100644 --- a/src/video_core/shader/decode.cpp +++ b/src/video_core/shader/decode.cpp | |||
| @@ -116,6 +116,8 @@ ExitMethod ShaderIR::Scan(u32 begin, u32 end, std::set<u32>& labels) { | |||
| 116 | // Continue scanning for an exit method. | 116 | // Continue scanning for an exit method. |
| 117 | break; | 117 | break; |
| 118 | } | 118 | } |
| 119 | default: | ||
| 120 | break; | ||
| 119 | } | 121 | } |
| 120 | } | 122 | } |
| 121 | return exit_method = ExitMethod::AlwaysReturn; | 123 | return exit_method = ExitMethod::AlwaysReturn; |
| @@ -206,4 +208,4 @@ u32 ShaderIR::DecodeInstr(NodeBlock& bb, u32 pc) { | |||
| 206 | return pc + 1; | 208 | return pc + 1; |
| 207 | } | 209 | } |
| 208 | 210 | ||
| 209 | } // namespace VideoCommon::Shader \ No newline at end of file | 211 | } // namespace VideoCommon::Shader |
diff --git a/src/video_core/shader/decode/conversion.cpp b/src/video_core/shader/decode/conversion.cpp index 55a6fbbf2..da26489a0 100644 --- a/src/video_core/shader/decode/conversion.cpp +++ b/src/video_core/shader/decode/conversion.cpp | |||
| @@ -90,10 +90,11 @@ u32 ShaderIR::DecodeConversion(NodeBlock& bb, u32 pc) { | |||
| 90 | return Operation(OperationCode::FCeil, PRECISE, value); | 90 | return Operation(OperationCode::FCeil, PRECISE, value); |
| 91 | case Tegra::Shader::F2fRoundingOp::Trunc: | 91 | case Tegra::Shader::F2fRoundingOp::Trunc: |
| 92 | return Operation(OperationCode::FTrunc, PRECISE, value); | 92 | return Operation(OperationCode::FTrunc, PRECISE, value); |
| 93 | default: | ||
| 94 | UNIMPLEMENTED_MSG("Unimplemented F2F rounding mode {}", | ||
| 95 | static_cast<u32>(instr.conversion.f2f.rounding.Value())); | ||
| 96 | return Immediate(0); | ||
| 93 | } | 97 | } |
| 94 | UNIMPLEMENTED_MSG("Unimplemented F2F rounding mode {}", | ||
| 95 | static_cast<u32>(instr.conversion.f2f.rounding.Value())); | ||
| 96 | return Immediate(0); | ||
| 97 | }(); | 98 | }(); |
| 98 | value = GetSaturatedFloat(value, instr.alu.saturate_d); | 99 | value = GetSaturatedFloat(value, instr.alu.saturate_d); |
| 99 | 100 | ||
diff --git a/src/video_core/shader/decode/xmad.cpp b/src/video_core/shader/decode/xmad.cpp index db15c0718..04a776398 100644 --- a/src/video_core/shader/decode/xmad.cpp +++ b/src/video_core/shader/decode/xmad.cpp | |||
| @@ -56,9 +56,10 @@ u32 ShaderIR::DecodeXmad(NodeBlock& bb, u32 pc) { | |||
| 56 | instr.xmad.mode, | 56 | instr.xmad.mode, |
| 57 | Immediate(static_cast<u32>(instr.xmad.imm20_16)), | 57 | Immediate(static_cast<u32>(instr.xmad.imm20_16)), |
| 58 | GetRegister(instr.gpr39)}; | 58 | GetRegister(instr.gpr39)}; |
| 59 | default: | ||
| 60 | UNIMPLEMENTED_MSG("Unhandled XMAD instruction: {}", opcode->get().GetName()); | ||
| 61 | return {false, false, false, Tegra::Shader::XmadMode::None, Immediate(0), Immediate(0)}; | ||
| 59 | } | 62 | } |
| 60 | UNIMPLEMENTED_MSG("Unhandled XMAD instruction: {}", opcode->get().GetName()); | ||
| 61 | return {false, false, false, Tegra::Shader::XmadMode::None, Immediate(0), Immediate(0)}; | ||
| 62 | }(); | 63 | }(); |
| 63 | 64 | ||
| 64 | op_a = BitfieldExtract(op_a, instr.xmad.high_a ? 16 : 0, 16); | 65 | op_a = BitfieldExtract(op_a, instr.xmad.high_a ? 16 : 0, 16); |
diff --git a/src/video_core/shader/shader_ir.cpp b/src/video_core/shader/shader_ir.cpp index ac5112d78..cb60b8886 100644 --- a/src/video_core/shader/shader_ir.cpp +++ b/src/video_core/shader/shader_ir.cpp | |||
| @@ -434,11 +434,14 @@ Node ShaderIR::BitfieldExtract(Node value, u32 offset, u32 bits) { | |||
| 434 | return OperationCode::LogicalUGreaterEqual; | 434 | return OperationCode::LogicalUGreaterEqual; |
| 435 | case OperationCode::INegate: | 435 | case OperationCode::INegate: |
| 436 | UNREACHABLE_MSG("Can't negate an unsigned integer"); | 436 | UNREACHABLE_MSG("Can't negate an unsigned integer"); |
| 437 | return {}; | ||
| 437 | case OperationCode::IAbsolute: | 438 | case OperationCode::IAbsolute: |
| 438 | UNREACHABLE_MSG("Can't apply absolute to an unsigned integer"); | 439 | UNREACHABLE_MSG("Can't apply absolute to an unsigned integer"); |
| 440 | return {}; | ||
| 441 | default: | ||
| 442 | UNREACHABLE_MSG("Unknown signed operation with code={}", static_cast<u32>(operation_code)); | ||
| 443 | return {}; | ||
| 439 | } | 444 | } |
| 440 | UNREACHABLE_MSG("Unknown signed operation with code={}", static_cast<u32>(operation_code)); | ||
| 441 | return {}; | ||
| 442 | } | 445 | } |
| 443 | 446 | ||
| 444 | } // namespace VideoCommon::Shader \ No newline at end of file | 447 | } // namespace VideoCommon::Shader |