[Video[ rename grTextureBufferExt to gfxTextureBufferExt
This commit is contained in:
parent
158005ef61
commit
1466f816ad
|
@ -229,14 +229,14 @@ void guLoadTextures()
|
|||
int tbuf_size = 0;
|
||||
if (voodoo.max_tex_size <= 256)
|
||||
{
|
||||
grTextureBufferExt(GR_TMU1, voodoo.tex_min_addr[GR_TMU1], GFX_LOD_LOG2_256, GFX_LOD_LOG2_256,
|
||||
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,
|
||||
GR_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565);
|
||||
}
|
||||
else if (g_scr_res_x <= 1024)
|
||||
{
|
||||
grTextureBufferExt(GR_TMU0, voodoo.tex_min_addr[GR_TMU0], GFX_LOD_LOG2_1024, GFX_LOD_LOG2_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,
|
||||
GR_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565);
|
||||
|
@ -246,7 +246,7 @@ void guLoadTextures()
|
|||
}
|
||||
else
|
||||
{
|
||||
grTextureBufferExt(GR_TMU0, voodoo.tex_min_addr[GR_TMU0], GFX_LOD_LOG2_2048, GFX_LOD_LOG2_2048,
|
||||
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,
|
||||
GR_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565);
|
||||
|
|
|
@ -590,19 +590,13 @@ FxBool gfxSstWinClose(GrContext_t context)
|
|||
return FXTRUE;
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL grTextureBufferExt(GrChipID_t tmu,
|
||||
FxU32 startAddress,
|
||||
GrLOD_t lodmin,
|
||||
GrLOD_t lodmax,
|
||||
GrAspectRatio_t aspect,
|
||||
GrTextureFormat_t fmt,
|
||||
FxU32 evenOdd)
|
||||
void gfxTextureBufferExt(GrChipID_t tmu, FxU32 startAddress, GrLOD_t lodmin, GrLOD_t lodmax, GrAspectRatio_t aspect, GrTextureFormat_t fmt, FxU32 evenOdd)
|
||||
{
|
||||
int i;
|
||||
static int fbs_init = 0;
|
||||
|
||||
WriteTrace(TraceGlitch, TraceDebug, "tmu: %d startAddress: %d lodmin: %d lodmax: %d aspect: %d fmt: %d evenOdd: %d", tmu, startAddress, lodmin, lodmax, aspect, fmt, evenOdd);
|
||||
if (lodmin != lodmax) WriteTrace(TraceGlitch, TraceWarning, "grTextureBufferExt : loading more than one LOD");
|
||||
if (lodmin != lodmax) WriteTrace(TraceGlitch, TraceWarning, "gfxTextureBufferExt : loading more than one LOD");
|
||||
if (!use_fbo) {
|
||||
if (!render_to_texture) { //initialization
|
||||
return;
|
||||
|
|
|
@ -880,19 +880,13 @@ FxBool gfxSstWinClose(GrContext_t context)
|
|||
return FXTRUE;
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL grTextureBufferExt(GrChipID_t tmu,
|
||||
FxU32 startAddress,
|
||||
GrLOD_t lodmin,
|
||||
GrLOD_t lodmax,
|
||||
GrAspectRatio_t aspect,
|
||||
GrTextureFormat_t fmt,
|
||||
FxU32 evenOdd)
|
||||
void gfxTextureBufferExt(GrChipID_t tmu, FxU32 startAddress, GrLOD_t lodmin, GrLOD_t lodmax, GrAspectRatio_t aspect, GrTextureFormat_t fmt, FxU32 evenOdd)
|
||||
{
|
||||
int i;
|
||||
static int fbs_init = 0;
|
||||
|
||||
WriteTrace(TraceGlitch, TraceDebug, "tmu: %d startAddress: %d lodmin: %d lodmax: %d aspect: %d fmt: %d evenOdd: %d", tmu, startAddress, lodmin, lodmax, aspect, fmt, evenOdd);
|
||||
if (lodmin != lodmax) WriteTrace(TraceGlitch, TraceWarning, "grTextureBufferExt : loading more than one LOD");
|
||||
if (lodmin != lodmax) WriteTrace(TraceGlitch, TraceWarning, "gfxTextureBufferExt : loading more than one LOD");
|
||||
if (!use_fbo) {
|
||||
if (!render_to_texture) { //initialization
|
||||
return;
|
||||
|
@ -1012,7 +1006,7 @@ FX_ENTRY void FX_CALL grTextureBufferExt(GrChipID_t tmu,
|
|||
|
||||
glScissor(0, g_viewport_offset, g_width, g_height);
|
||||
|
||||
grDisplayGLError("grTextureBufferExt :: A");
|
||||
grDisplayGLError("gfxTextureBufferExt :: A");
|
||||
}
|
||||
else {
|
||||
if (!render_to_texture) //initialization
|
||||
|
@ -1067,7 +1061,7 @@ FX_ENTRY void FX_CALL grTextureBufferExt(GrChipID_t tmu,
|
|||
}
|
||||
CHECK_FRAMEBUFFER_STATUS();
|
||||
curBufferAddr = pBufferAddress;
|
||||
grDisplayGLError("grTextureBufferExt :: C");
|
||||
grDisplayGLError("gfxTextureBufferExt :: C");
|
||||
return;
|
||||
}
|
||||
else //create new FBO at the same address, delete old one
|
||||
|
@ -1112,7 +1106,7 @@ FX_ENTRY void FX_CALL grTextureBufferExt(GrChipID_t tmu,
|
|||
CHECK_FRAMEBUFFER_STATUS();
|
||||
curBufferAddr = pBufferAddress;
|
||||
nb_fb++;
|
||||
grDisplayGLError("grTextureBufferExt :: B");
|
||||
grDisplayGLError("gfxTextureBufferExt :: B");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ void gfxClipWindow(FxU32 minx, FxU32 miny, FxU32 maxx, FxU32 maxy);
|
|||
void gfxColorMask(FxBool rgb, FxBool a);
|
||||
FxU32 gfxTexMinAddress(GrChipID_t tmu);
|
||||
FxBool gfxSstWinClose(GrContext_t context);
|
||||
void gfxTextureBufferExt(GrChipID_t tmu, FxU32 startAddress, GrLOD_t lodmin, GrLOD_t lodmax, GrAspectRatio_t aspect, GrTextureFormat_t fmt, FxU32 evenOdd);
|
||||
|
||||
extern uint32_t nbTextureUnits;
|
||||
extern uint32_t g_scr_res_x, g_scr_res_y, g_res_x, g_res_y;
|
||||
|
|
|
@ -256,7 +256,7 @@ int OpenTextureBuffer(COLOR_IMAGE & cimage)
|
|||
if (!((end_addr <= texbuf->addr) || (addr >= texbuf->end_addr))) //intersected, remove
|
||||
{
|
||||
grRenderBuffer(GR_BUFFER_TEXTUREBUFFER_EXT);
|
||||
grTextureBufferExt(texbuf->tmu, texbuf->tex_addr, texbuf->info.smallLodLog2, texbuf->info.largeLodLog2,
|
||||
gfxTextureBufferExt(texbuf->tmu, texbuf->tex_addr, texbuf->info.smallLodLog2, texbuf->info.largeLodLog2,
|
||||
texbuf->info.aspectRatioLog2, texbuf->info.format, GR_MIPMAPLEVELMASK_BOTH);
|
||||
grDepthMask(FXFALSE);
|
||||
grBufferClear(0, 0, 0xFFFF);
|
||||
|
@ -294,7 +294,7 @@ int OpenTextureBuffer(COLOR_IMAGE & cimage)
|
|||
rdp.acc_tex_buf = rdp.cur_tex_buf;
|
||||
rdp.cur_image = texbuf;
|
||||
grRenderBuffer(GR_BUFFER_TEXTUREBUFFER_EXT);
|
||||
grTextureBufferExt(rdp.cur_image->tmu, rdp.cur_image->tex_addr, rdp.cur_image->info.smallLodLog2, rdp.cur_image->info.largeLodLog2,
|
||||
gfxTextureBufferExt(rdp.cur_image->tmu, rdp.cur_image->tex_addr, rdp.cur_image->info.smallLodLog2, rdp.cur_image->info.largeLodLog2,
|
||||
rdp.cur_image->info.aspectRatioLog2, rdp.cur_image->info.format, GR_MIPMAPLEVELMASK_BOTH);
|
||||
|
||||
if (rdp.cur_image->clear && g_settings->fb_hwfbe_buf_clear_enabled() && cimage.changed)
|
||||
|
@ -540,7 +540,7 @@ int CopyDepthBuffer()
|
|||
grAuxBufferExt(GR_BUFFER_AUXBUFFER);
|
||||
grTexSource(rdp.texbufs[0].tmu, rdp.texbufs[0].begin, GR_MIPMAPLEVELMASK_BOTH, &(rdp.tbuff_tex->info));
|
||||
grRenderBuffer(GR_BUFFER_TEXTUREBUFFER_EXT);
|
||||
grTextureBufferExt(rdp.texbufs[1].tmu, rdp.texbufs[1].begin, LOD, LOD,
|
||||
gfxTextureBufferExt(rdp.texbufs[1].tmu, rdp.texbufs[1].begin, LOD, LOD,
|
||||
GR_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565, GR_MIPMAPLEVELMASK_BOTH);
|
||||
grDrawTriangle(&v[0], &v[2], &v[1]);
|
||||
grDrawTriangle(&v[2], &v[3], &v[1]);
|
||||
|
@ -599,7 +599,7 @@ int SwapTextureBuffer()
|
|||
texbuf->tile_ult = rdp.tbuff_tex->tile_ult;
|
||||
texbuf->v_shift = rdp.tbuff_tex->v_shift;
|
||||
grRenderBuffer(GR_BUFFER_TEXTUREBUFFER_EXT);
|
||||
grTextureBufferExt(texbuf->tmu, texbuf->tex_addr, texbuf->info.smallLodLog2, texbuf->info.largeLodLog2,
|
||||
gfxTextureBufferExt(texbuf->tmu, texbuf->tex_addr, texbuf->info.smallLodLog2, texbuf->info.largeLodLog2,
|
||||
texbuf->info.aspectRatioLog2, texbuf->info.format, GR_MIPMAPLEVELMASK_BOTH);
|
||||
grDrawTriangle(&v[0], &v[2], &v[1]);
|
||||
grDrawTriangle(&v[2], &v[3], &v[1]);
|
||||
|
@ -612,7 +612,7 @@ int SwapTextureBuffer()
|
|||
rdp.tbuff_tex = texbuf;
|
||||
if (rdp.cur_image)
|
||||
{
|
||||
grTextureBufferExt(rdp.cur_image->tmu, rdp.cur_image->tex_addr, rdp.cur_image->info.smallLodLog2, rdp.cur_image->info.largeLodLog2,
|
||||
gfxTextureBufferExt(rdp.cur_image->tmu, rdp.cur_image->tex_addr, rdp.cur_image->info.smallLodLog2, rdp.cur_image->info.largeLodLog2,
|
||||
rdp.cur_image->info.aspectRatioLog2, rdp.cur_image->info.format, GR_MIPMAPLEVELMASK_BOTH);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -2778,7 +2778,7 @@ void rdp_setcolorimage()
|
|||
{
|
||||
rdp.cur_image = &(rdp.texbufs[rdp.cur_tex_buf].images[0]);
|
||||
grRenderBuffer(GR_BUFFER_TEXTUREBUFFER_EXT);
|
||||
grTextureBufferExt(rdp.cur_image->tmu, rdp.cur_image->tex_addr, rdp.cur_image->info.smallLodLog2, rdp.cur_image->info.largeLodLog2,
|
||||
gfxTextureBufferExt(rdp.cur_image->tmu, rdp.cur_image->tex_addr, rdp.cur_image->info.smallLodLog2, rdp.cur_image->info.largeLodLog2,
|
||||
rdp.cur_image->info.aspectRatioLog2, rdp.cur_image->info.format, GR_MIPMAPLEVELMASK_BOTH);
|
||||
}
|
||||
else if (rdp.read_whole_frame)
|
||||
|
|
|
@ -193,7 +193,7 @@ void DrawHiresDepthImage(const DRAWIMAGE & d)
|
|||
v[i].uc(0) = v[i].uc(1) = v[i].u0;
|
||||
v[i].vc(0) = v[i].vc(1) = v[i].v0;
|
||||
}
|
||||
grTextureBufferExt(rdp.texbufs[0].tmu, rdp.texbufs[0].begin, LOD, LOD,
|
||||
gfxTextureBufferExt(rdp.texbufs[0].tmu, rdp.texbufs[0].begin, LOD, LOD,
|
||||
GR_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565, GR_MIPMAPLEVELMASK_BOTH);
|
||||
grRenderBuffer(GR_BUFFER_TEXTUREBUFFER_EXT);
|
||||
grAuxBufferExt(GR_BUFFER_AUXBUFFER);
|
||||
|
|
Loading…
Reference in New Issue