[Video] Rename grTexCalcMemRequired to gfxTexCalcMemRequired

This commit is contained in:
zilmar 2017-07-20 17:30:08 +10:00
parent 56ef661c6d
commit c9b5c7190d
5 changed files with 9 additions and 11 deletions

View File

@ -231,14 +231,14 @@ void guLoadTextures()
{
gfxTextureBufferExt(GR_TMU1, voodoo.tex_min_addr[GR_TMU1], GFX_LOD_LOG2_256, GFX_LOD_LOG2_256,
GR_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565, GR_MIPMAPLEVELMASK_BOTH);
tbuf_size = 8 * grTexCalcMemRequired(GFX_LOD_LOG2_256, GFX_LOD_LOG2_256,
tbuf_size = 8 * gfxTexCalcMemRequired(GFX_LOD_LOG2_256, GFX_LOD_LOG2_256,
GR_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565);
}
else if (g_scr_res_x <= 1024)
{
gfxTextureBufferExt(GR_TMU0, voodoo.tex_min_addr[GR_TMU0], GFX_LOD_LOG2_1024, GFX_LOD_LOG2_1024,
GR_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565, GR_MIPMAPLEVELMASK_BOTH);
tbuf_size = grTexCalcMemRequired(GFX_LOD_LOG2_1024, GFX_LOD_LOG2_1024,
tbuf_size = gfxTexCalcMemRequired(GFX_LOD_LOG2_1024, GFX_LOD_LOG2_1024,
GR_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565);
gfxRenderBuffer(GR_BUFFER_TEXTUREBUFFER_EXT);
gfxBufferClear(0, 0, 0xFFFF);
@ -248,7 +248,7 @@ void guLoadTextures()
{
gfxTextureBufferExt(GR_TMU0, voodoo.tex_min_addr[GR_TMU0], GFX_LOD_LOG2_2048, GFX_LOD_LOG2_2048,
GR_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565, GR_MIPMAPLEVELMASK_BOTH);
tbuf_size = grTexCalcMemRequired(GFX_LOD_LOG2_2048, GFX_LOD_LOG2_2048,
tbuf_size = gfxTexCalcMemRequired(GFX_LOD_LOG2_2048, GFX_LOD_LOG2_2048,
GR_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565);
gfxRenderBuffer(GR_BUFFER_TEXTUREBUFFER_EXT);
gfxBufferClear(0, 0, 0xFFFF);

View File

@ -204,13 +204,13 @@ FxU32 gfxTexTextureMemRequired(FxU32 evenOdd, GrTexInfo *info)
}
FX_ENTRY FxU32 FX_CALL
grTexCalcMemRequired(
gfxTexCalcMemRequired(
GrLOD_t lodmin, GrLOD_t lodmax,
GrAspectRatio_t aspect, GrTextureFormat_t fmt)
{
WriteTrace(TraceGlitch, TraceDebug, "lodmin = %d, lodmax: %d aspect: %d fmt: %d", lodmin, lodmax, aspect, fmt);
int width, height;
if (lodmax != lodmin) WriteTrace(TraceGlitch, TraceWarning, "grTexCalcMemRequired : loading more than one LOD");
if (lodmax != lodmin) WriteTrace(TraceGlitch, TraceWarning, "gfxTexCalcMemRequired : loading more than one LOD");
if (aspect < 0)
{

View File

@ -204,14 +204,11 @@ FxU32 gfxTexTextureMemRequired(FxU32 evenOdd, GrTexInfo *info)
return 0;
}
FX_ENTRY FxU32 FX_CALL
grTexCalcMemRequired(
GrLOD_t lodmin, GrLOD_t lodmax,
GrAspectRatio_t aspect, GrTextureFormat_t fmt)
FxU32 gfxTexCalcMemRequired(GrLOD_t lodmin, GrLOD_t lodmax, GrAspectRatio_t aspect, GrTextureFormat_t fmt)
{
WriteTrace(TraceGlitch, TraceDebug, "lodmin = %d, lodmax: %d aspect: %d fmt: %d", lodmin, lodmax, aspect, fmt);
int width, height;
if (lodmax != lodmin) WriteTrace(TraceGlitch, TraceWarning, "grTexCalcMemRequired : loading more than one LOD");
if (lodmax != lodmin) WriteTrace(TraceGlitch, TraceWarning, "gfxTexCalcMemRequired : loading more than one LOD");
if (aspect < 0)
{

View File

@ -63,6 +63,7 @@ FxBool gfxLfbLock(GrLock_t type, GrBuffer_t buffer, GrLfbWriteMode_t writeMode,
FxBool gfxLfbUnlock(GrLock_t type, GrBuffer_t buffer);
FxBool gfxLfbReadRegion(GrBuffer_t src_buffer, FxU32 src_x, FxU32 src_y, FxU32 src_width, FxU32 src_height, FxU32 dst_stride, void *dst_data);
FxBool gfxLfbWriteRegion(GrBuffer_t dst_buffer, FxU32 dst_x, FxU32 dst_y, GrLfbSrcFmt_t src_format, FxU32 src_width, FxU32 src_height, FxBool pixelPipeline, FxI32 src_stride, void *src_data);
FxU32 gfxTexCalcMemRequired(GrLOD_t lodmin, GrLOD_t lodmax, GrAspectRatio_t aspect, GrTextureFormat_t fmt);
extern uint32_t nbTextureUnits;
extern uint32_t g_scr_res_x, g_scr_res_y, g_res_x, g_res_y;

View File

@ -126,7 +126,7 @@ static TBUFF_COLOR_IMAGE * AllocateTextureBuffer(COLOR_IMAGE & cimage)
WriteTrace(TraceRDP, TraceDebug, "\nAllocateTextureBuffer. width: %d, height: %d, scr_width: %f, scr_height: %f, vi_width: %f, vi_height:%f, scale_x: %f, scale_y: %f, lr_u: %f, lr_v: %f, u_scale: %f, v_scale: %f", texbuf.width, texbuf.height, texbuf.scr_width, texbuf.scr_height, rdp.vi_width, rdp.vi_height, rdp.scale_x, rdp.scale_y, texbuf.lr_u, texbuf.lr_v, texbuf.u_scale, texbuf.v_scale);
uint32_t required = grTexCalcMemRequired(texbuf.info.smallLodLog2, texbuf.info.largeLodLog2,
uint32_t required = gfxTexCalcMemRequired(texbuf.info.smallLodLog2, texbuf.info.largeLodLog2,
texbuf.info.aspectRatioLog2, texbuf.info.format);
//find free space
for (int i = 0; i < (nbTextureUnits > 2 ? 2 : 1); i++)