gpu_unai: add some framebuffer guard memory
authornotaz <notasas@gmail.com>
Tue, 4 Jan 2011 17:47:03 +0000 (19:47 +0200)
committernotaz <notasas@gmail.com>
Tue, 4 Jan 2011 17:47:03 +0000 (19:47 +0200)
some games blit outside framebuffer area, this is faster than
doing range checks.

plugins/gpu_unai/gpu.cpp

index f9f7c41..abe7638 100644 (file)
@@ -94,7 +94,8 @@ u32   lInc;
 u32   tInc, tMsk;
 
 GPUPacket PacketBuffer;
-u16   GPU_FrameBuffer[FRAME_BUFFER_SIZE/2] __attribute__((aligned(16)));    // FRAME_BUFFER_SIZE is defined in bytes
+// FRAME_BUFFER_SIZE is defined in bytes; 512K is guard memory for out of range reads
+u16   GPU_FrameBuffer[(FRAME_BUFFER_SIZE+512*1024)/2] __attribute__((aligned(16)));
 u32   GPU_GP1;
 
 ///////////////////////////////////////////////////////////////////////////////