mirror of
https://github.com/libretro/Genesis-Plus-GX.git
synced 2024-11-23 08:19:39 +00:00
[Gamecube/Wii] minor optimizations (no need to invalidate D-cache)
This commit is contained in:
parent
8aed64c2ac
commit
abf2db8198
@ -3,7 +3,7 @@
|
||||
*
|
||||
* IPL font engine (using GX rendering)
|
||||
*
|
||||
* Copyright Eke-Eke (2009-2013)
|
||||
* Copyright Eke-Eke (2009-2015)
|
||||
*
|
||||
* Redistribution and use of this code or any derivative works are permitted
|
||||
* provided that the following conditions are met:
|
||||
@ -213,7 +213,7 @@ static void DrawChar(unsigned char c, int xpos, int ypos, int size, GXColor colo
|
||||
/* reinitialize font texture data */
|
||||
memset(fontTexture,0,fontHeader->cell_width * fontHeader->cell_height / 2);
|
||||
GetFontTexel(c,fontTexture,0,fontHeader->cell_width/2);
|
||||
DCFlushRange(fontTexture, fontHeader->cell_width * fontHeader->cell_height / 2);
|
||||
DCStoreRange(fontTexture, fontHeader->cell_width * fontHeader->cell_height / 2);
|
||||
GX_InvalidateTexAll();
|
||||
|
||||
/* adjust texture width */
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* IPL font engine (using GX rendering)
|
||||
*
|
||||
* Copyright Eke-Eke (2009-2013)
|
||||
* Copyright Eke-Eke (2009-2015)
|
||||
*
|
||||
* Redistribution and use of this code or any derivative works are permitted
|
||||
* provided that the following conditions are met:
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Genesis Plus GX audio support
|
||||
*
|
||||
* Copyright Eke-Eke (2007-2014), based on original work from Softdev (2006)
|
||||
* Copyright Eke-Eke (2007-2015), based on original work from Softdev (2006)
|
||||
*
|
||||
* Redistribution and use of this code or any derivative works are permitted
|
||||
* provided that the following conditions are met:
|
||||
@ -143,7 +143,7 @@ int gx_audio_Update(int status)
|
||||
{
|
||||
/* Retrieve audio samples (size must be multiple of 32 bytes) */
|
||||
bufferSize = audio_update(sb) * 4;
|
||||
DCFlushRange((void *)sb, bufferSize);
|
||||
DCStoreRange((void *)sb, bufferSize);
|
||||
|
||||
/* Mark current audio frame as being updated */
|
||||
status &= ~AUDIO_UPDATE;
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Genesis Plus GX audio support
|
||||
*
|
||||
* Copyright Eke-Eke (2007-2014), based on original work from Softdev (2006)
|
||||
* Copyright Eke-Eke (2007-2015), based on original work from Softdev (2006)
|
||||
*
|
||||
* Redistribution and use of this code or any derivative works are permitted
|
||||
* provided that the following conditions are met:
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Genesis Plus GX video & rendering support
|
||||
*
|
||||
* Copyright Eke-Eke (2007-2014), based on original work from Softdev (2006)
|
||||
* Copyright Eke-Eke (2007-2015), based on original work from Softdev (2006)
|
||||
*
|
||||
* Redistribution and use of this code or any derivative works are permitted
|
||||
* provided that the following conditions are met:
|
||||
@ -682,7 +682,7 @@ static void gxResetScaler(u32 width)
|
||||
square[2] = square[4] = xshift + xscale;
|
||||
square[1] = square[3] = yshift + yscale;
|
||||
square[5] = square[7] = yshift - yscale;
|
||||
DCFlushRange(square, 32);
|
||||
DCStoreRange(square, 32);
|
||||
GX_InvVtxCache();
|
||||
}
|
||||
|
||||
@ -1057,7 +1057,7 @@ void gxCopyScreenshot(gx_texture *texture)
|
||||
GX_LoadTexObj(&texobj, GX_TEXMAP0);
|
||||
GX_InvalidateTexAll();
|
||||
GX_Flush();
|
||||
DCFlushRange(texture->data, texture->width * texture->height * 4);
|
||||
DCStoreRange(texture->data, texture->width * texture->height * 4);
|
||||
}
|
||||
|
||||
/* Take Screenshot */
|
||||
@ -1310,8 +1310,8 @@ gx_texture *gxTextureOpenPNG(const u8 *png_data, FILE *png_file)
|
||||
/* release memory */
|
||||
free(img_data);
|
||||
|
||||
/* flush texture data from cache */
|
||||
DCFlushRange(texture->data, height * stride);
|
||||
/* force texture data update in memory */
|
||||
DCStoreRange(texture->data, height * stride);
|
||||
|
||||
return texture;
|
||||
}
|
||||
@ -1768,7 +1768,7 @@ int gx_video_Update(int status)
|
||||
/* texture is now directly mapped by the line renderer */
|
||||
|
||||
/* force texture cache update */
|
||||
DCFlushRange(bitmap.data, vwidth*vheight*2);
|
||||
DCStoreRange(bitmap.data, vwidth*vheight*2);
|
||||
GX_InvalidateTexAll();
|
||||
|
||||
/* disable EFB copy until rendering is done */
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Genesis Plus GX video support
|
||||
*
|
||||
* Copyright Eke-Eke (2007-2014), based on original work from Softdev (2006)
|
||||
* Copyright Eke-Eke (2007-2015), based on original work from Softdev (2006)
|
||||
*
|
||||
* Redistribution and use of this code or any derivative works are permitted
|
||||
* provided that the following conditions are met:
|
||||
|
Loading…
Reference in New Issue
Block a user