diff options
Diffstat (limited to 'src/core/hw/gpu.h')
| -rw-r--r-- | src/core/hw/gpu.h | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/core/hw/gpu.h b/src/core/hw/gpu.h index 7186bfa84..3fa7b9ccf 100644 --- a/src/core/hw/gpu.h +++ b/src/core/hw/gpu.h @@ -11,9 +11,6 @@ namespace GPU { -static const u32 kFrameCycles = 268123480 / 60; ///< 268MHz / 60 frames per second -static const u32 kFrameTicks = kFrameCycles / 3; ///< Approximate number of instructions/frame - // Returns index corresponding to the Regs member labeled by field_name // TODO: Due to Visual studio bug 209229, offsetof does not return constant expressions // when used with array elements (e.g. GPU_REG_INDEX(memory_fill_config[0])). @@ -56,7 +53,7 @@ struct Regs { "Structure size and register block length don't match") #endif - enum class FramebufferFormat : u32 { + enum class PixelFormat : u32 { RGBA8 = 0, RGB8 = 1, RGB565 = 2, @@ -84,9 +81,7 @@ struct Regs { INSERT_PADDING_WORDS(0x10b); - struct { - using Format = Regs::FramebufferFormat; - + struct FramebufferConfig { union { u32 size; @@ -102,7 +97,7 @@ struct Regs { union { u32 format; - BitField< 0, 3, Format> color_format; + BitField< 0, 3, PixelFormat> color_format; }; INSERT_PADDING_WORDS(0x1); @@ -130,8 +125,6 @@ struct Regs { INSERT_PADDING_WORDS(0x169); struct { - using Format = Regs::FramebufferFormat; - u32 input_address; u32 output_address; @@ -161,8 +154,8 @@ struct Regs { u32 flags; BitField< 0, 1, u32> flip_data; // flips input data horizontally (TODO) if true - BitField< 8, 3, Format> input_format; - BitField<12, 3, Format> output_format; + BitField< 8, 3, PixelFormat> input_format; + BitField<12, 3, PixelFormat> output_format; BitField<16, 1, u32> output_tiled; // stores output in a tiled format }; @@ -201,7 +194,7 @@ struct Regs { #undef INSERT_PADDING_WORDS_HELPER2 #undef INSERT_PADDING_WORDS - static inline int NumIds() { + static inline size_t NumIds() { return sizeof(Regs) / sizeof(u32); } |
