mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 07:20:49 +00:00
softgpu: Restrict CLUT to proper size.
We had 15 KB more space than needed before.
This commit is contained in:
parent
229c944208
commit
3d52b445f1
@ -1408,7 +1408,7 @@ bool GetCurrentTexture(GPUDebugBuffer &buffer, int level)
|
||||
|
||||
SamplerID id;
|
||||
ComputeSamplerID(&id);
|
||||
id.cached.clut = (const u8 *)clut;
|
||||
id.cached.clut = clut;
|
||||
|
||||
Sampler::FetchFunc sampler = Sampler::GetFetchFunc(id);
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
||||
const int FB_WIDTH = 480;
|
||||
const int FB_HEIGHT = 272;
|
||||
|
||||
u32 clut[4096];
|
||||
uint8_t clut[1024];
|
||||
FormatBuffer fb;
|
||||
FormatBuffer depthbuf;
|
||||
|
||||
@ -971,7 +971,10 @@ void SoftGPU::Execute_Spline(u32 op, u32 diff) {
|
||||
|
||||
void SoftGPU::Execute_LoadClut(u32 op, u32 diff) {
|
||||
u32 clutAddr = gstate.getClutAddress();
|
||||
u32 clutTotalBytes = gstate.getClutLoadBytes();
|
||||
// Avoid the hack in getClutLoadBytes() to inaccurately allow more palette data.
|
||||
u32 clutTotalBytes = (gstate.getClutLoadBlocks() & 0x3F) * 32;
|
||||
if (clutTotalBytes > 1024)
|
||||
clutTotalBytes = 1024;
|
||||
|
||||
// Might be copying drawing into the CLUT, so flush.
|
||||
drawEngine_->transformUnit.FlushIfOverlap("loadclut", clutAddr, clutTotalBytes, clutTotalBytes, 1);
|
||||
|
@ -216,7 +216,7 @@ private:
|
||||
};
|
||||
|
||||
// TODO: These shouldn't be global.
|
||||
extern u32 clut[4096];
|
||||
extern uint8_t clut[1024];
|
||||
extern FormatBuffer fb;
|
||||
extern FormatBuffer depthbuf;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user