Skip to content

Commit

Permalink
Fixed a regression in CPU rendering.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinnegatamante committed Dec 12, 2020
1 parent a3b2c3e commit b763c58
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Source/HLEGraphics/BaseRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -425,18 +425,7 @@ class BaseRenderer
u8 s;
u8 t;
};
static const u32 kNumBoundTextures = 2;

TextureInfo mBoundTextureInfo[ kNumBoundTextures ];
CRefPtr<CNativeTexture> mBoundTexture[ kNumBoundTextures ];

TexCoord mTileTopLeft[ kNumBoundTextures ];
TextureWrap mTexWrap[ kNumBoundTextures ];

// Index of the corresponding tile state.
u8 mActiveTile[ kNumBoundTextures ];



//Max is 18 according to the manual //Corn
//I think we should make this more deep to avoid any issues //Salvy
static const u32 MATRIX_STACK_SIZE = 20;
Expand Down Expand Up @@ -466,6 +455,17 @@ class BaseRenderer
// Processed vertices waiting for output...
DaedalusVtx4 mVtxProjected[kMaxN64Vertices]; // Transformed and projected vertices (suitable for clipping etc)
u32 mVtxClipFlagsUnion; // Bitwise OR of all the vertex flags added to the current batch. If this is 0, we can trivially accept everything without clipping
public:
static const u32 kNumBoundTextures = 2;

TextureInfo mBoundTextureInfo[ kNumBoundTextures ];
CRefPtr<CNativeTexture> mBoundTexture[ kNumBoundTextures ];

TexCoord mTileTopLeft[ kNumBoundTextures ];
TextureWrap mTexWrap[ kNumBoundTextures ];

// Index of the corresponding tile state.
u8 mActiveTile[ kNumBoundTextures ];
};

bool CreateRendererLegacy();
Expand Down
1 change: 1 addition & 0 deletions Source/HLEGraphics/uCodes/Ucode_FB.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ static bool LoadFrameBuffer(u32 origin)
u32 tex_width = texture->GetCorrectedWidth();
u32 tex_height = texture->GetCorrectedHeight();
texture->InstallTexture();
gRenderer->mBoundTexture[0] = texture;

u16 *pixels = (u16*)malloc(tex_width * tex_height * sizeof(u16));
u32 src_offset = 0;
Expand Down

0 comments on commit b763c58

Please sign in to comment.