mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Video backends: unify xfregs/xfmem structures.
Removes the duplicate swxfregs global variable/struct from the software backend in favor of the ones from VideoCommon.
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "VideoCommon/CPMemory.h"
|
||||
|
||||
|
||||
// Lighting
|
||||
@ -50,7 +51,6 @@
|
||||
#define GX_PERSPECTIVE 0
|
||||
#define GX_ORTHOGRAPHIC 1
|
||||
|
||||
#define XFMEM_SIZE 0x8000
|
||||
#define XFMEM_POSMATRICES 0x000
|
||||
#define XFMEM_POSMATRICES_END 0x100
|
||||
#define XFMEM_NORMALMATRICES 0x400
|
||||
@ -234,6 +234,17 @@ struct Projection
|
||||
u32 type; // only GX_PERSPECTIVE or GX_ORTHOGRAPHIC are allowed
|
||||
};
|
||||
|
||||
struct XFMemory
|
||||
{
|
||||
u32 posMatrices[256]; // 0x0000 - 0x00ff
|
||||
u32 unk0[768]; // 0x0100 - 0x03ff
|
||||
u32 normalMatrices[96]; // 0x0400 - 0x045f
|
||||
u32 unk1[160]; // 0x0460 - 0x04ff
|
||||
u32 postMatrices[256]; // 0x0500 - 0x05ff
|
||||
u32 lights[128]; // 0x0600 - 0x067f
|
||||
u32 unk2[2432]; // 0x0680 - 0x0fff
|
||||
};
|
||||
|
||||
struct XFRegisters
|
||||
{
|
||||
u32 error; // 0x1000
|
||||
@ -256,8 +267,8 @@ struct XFRegisters
|
||||
u32 unk5; // 0x1015
|
||||
u32 unk6; // 0x1016
|
||||
u32 unk7; // 0x1017
|
||||
u32 MatrixIndexA; // 0x1018
|
||||
u32 MatrixIndexB; // 0x1019
|
||||
TMatrixIndexA MatrixIndexA; // 0x1018
|
||||
TMatrixIndexB MatrixIndexB; // 0x1019
|
||||
Viewport viewport; // 0x101a - 0x101f
|
||||
Projection projection; // 0x1020 - 0x1026
|
||||
u32 unk8[24]; // 0x1027 - 0x103e
|
||||
@ -268,8 +279,8 @@ struct XFRegisters
|
||||
};
|
||||
|
||||
|
||||
extern XFMemory xfmem;
|
||||
extern XFRegisters xfregs;
|
||||
extern u32 xfmem[XFMEM_SIZE];
|
||||
|
||||
void LoadXFReg(u32 transferSize, u32 address, u32 *pData);
|
||||
void LoadIndexedXF(u32 val, int array);
|
||||
|
Reference in New Issue
Block a user