renderer_opengl: Header cleanup
* Should help with building times
This commit is contained in:
parent
07a69b7c7b
commit
2726fe66db
15 changed files with 43 additions and 96 deletions
|
@ -103,6 +103,7 @@ inline PixelFormat PixelFormatFromDepthFormat(Pica::FramebufferRegs::DepthFormat
|
|||
}
|
||||
|
||||
inline constexpr PixelFormat PixelFormatFromGPUPixelFormat(GPU::Regs::PixelFormat format) {
|
||||
const u32 format_index = static_cast<u32>(format);
|
||||
switch (format) {
|
||||
// RGB565 and RGB5A1 are switched in PixelFormat compared to ColorFormat
|
||||
case GPU::Regs::PixelFormat::RGB565:
|
||||
|
@ -110,7 +111,7 @@ inline constexpr PixelFormat PixelFormatFromGPUPixelFormat(GPU::Regs::PixelForma
|
|||
case GPU::Regs::PixelFormat::RGB5A1:
|
||||
return PixelFormat::RGB5A1;
|
||||
default:
|
||||
return ((unsigned int)format < 5) ? (PixelFormat)format : PixelFormat::Invalid;
|
||||
return (format_index < 5) ? static_cast<PixelFormat>(format) : PixelFormat::Invalid;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -179,7 +180,7 @@ static constexpr u32 GetFormatBpp(PixelFormat format) {
|
|||
case PixelFormat::A4:
|
||||
case PixelFormat::ETC1:
|
||||
return 4;
|
||||
case PixelFormat::Invalid:
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue