|
|
|
@ -452,9 +452,7 @@ struct Regs {
|
|
|
|
|
D24S8 = 3
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Returns the number of bytes in the specified depth format
|
|
|
|
|
*/
|
|
|
|
|
// Returns the number of bytes in the specified depth format
|
|
|
|
|
static u32 BytesPerDepthPixel(DepthFormat format) {
|
|
|
|
|
switch (format) {
|
|
|
|
|
case DepthFormat::D16:
|
|
|
|
@ -469,6 +467,20 @@ struct Regs {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Returns the number of bits per depth component of the specified depth format
|
|
|
|
|
static u32 DepthBitsPerPixel(DepthFormat format) {
|
|
|
|
|
switch (format) {
|
|
|
|
|
case DepthFormat::D16:
|
|
|
|
|
return 16;
|
|
|
|
|
case DepthFormat::D24:
|
|
|
|
|
case DepthFormat::D24S8:
|
|
|
|
|
return 24;
|
|
|
|
|
default:
|
|
|
|
|
LOG_CRITICAL(HW_GPU, "Unknown depth format %u", format);
|
|
|
|
|
UNIMPLEMENTED();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
struct {
|
|
|
|
|
// Components are laid out in reverse byte order, most significant bits first.
|
|
|
|
|
enum ColorFormat : u32 {
|
|
|
|
|