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

Warnings: Fixed a few missing-return warnings in video_core.

This commit is contained in:
Subv 2017-08-21 12:18:52 -05:00
parent 46d1ca768d
commit da88f3b8f0
3 changed files with 10 additions and 6 deletions

View file

@ -256,10 +256,9 @@ struct FramebufferRegs {
return 3; return 3;
case DepthFormat::D24S8: case DepthFormat::D24S8:
return 4; return 4;
default:
LOG_CRITICAL(HW_GPU, "Unknown depth format %u", format);
UNIMPLEMENTED();
} }
ASSERT_MSG(false, "Unknown depth format %u", format);
} }
// Returns the number of bits per depth component of the specified depth format // Returns the number of bits per depth component of the specified depth format
@ -270,10 +269,9 @@ struct FramebufferRegs {
case DepthFormat::D24: case DepthFormat::D24:
case DepthFormat::D24S8: case DepthFormat::D24S8:
return 24; return 24;
default:
LOG_CRITICAL(HW_GPU, "Unknown depth format %u", format);
UNIMPLEMENTED();
} }
ASSERT_MSG(false, "Unknown depth format %u", format);
} }
INSERT_PADDING_WORDS(0x20); INSERT_PADDING_WORDS(0x20);

View file

@ -352,6 +352,8 @@ u8 LogicOp(u8 src, u8 dest, FramebufferRegs::LogicOp op) {
case FramebufferRegs::LogicOp::OrInverted: case FramebufferRegs::LogicOp::OrInverted:
return ~src | dest; return ~src | dest;
} }
UNREACHABLE();
}; };
} // namespace Rasterizer } // namespace Rasterizer

View file

@ -89,6 +89,8 @@ Math::Vec3<u8> GetColorModifier(TevStageConfig::ColorModifier factor,
case ColorModifier::OneMinusSourceBlue: case ColorModifier::OneMinusSourceBlue:
return (Math::Vec3<u8>(255, 255, 255) - values.bbb()).Cast<u8>(); return (Math::Vec3<u8>(255, 255, 255) - values.bbb()).Cast<u8>();
} }
UNREACHABLE();
}; };
u8 GetAlphaModifier(TevStageConfig::AlphaModifier factor, const Math::Vec4<u8>& values) { u8 GetAlphaModifier(TevStageConfig::AlphaModifier factor, const Math::Vec4<u8>& values) {
@ -119,6 +121,8 @@ u8 GetAlphaModifier(TevStageConfig::AlphaModifier factor, const Math::Vec4<u8>&
case AlphaModifier::OneMinusSourceBlue: case AlphaModifier::OneMinusSourceBlue:
return 255 - values.b(); return 255 - values.b();
} }
UNREACHABLE();
}; };
Math::Vec3<u8> ColorCombine(TevStageConfig::Operation op, const Math::Vec3<u8> input[3]) { Math::Vec3<u8> ColorCombine(TevStageConfig::Operation op, const Math::Vec3<u8> input[3]) {