[video] Add gfxMipMapLevelMask_t
This commit is contained in:
parent
fe52233411
commit
2ffaa42f9e
|
@ -135,14 +135,14 @@ static void DrawRE2Video256(FB_TO_SCREEN_INFO & fb_info)
|
|||
}
|
||||
t_info.format = GFX_TEXFMT_RGB_565;
|
||||
t_info.data = tex;
|
||||
gfxChipID_t tmu = SetupFBtoScreenCombiner(gfxTexTextureMemRequired(GR_MIPMAPLEVELMASK_BOTH, &t_info), fb_info.opaque);
|
||||
gfxChipID_t tmu = SetupFBtoScreenCombiner(gfxTexTextureMemRequired(GFX_MIPMAPLEVELMASK_BOTH, &t_info), fb_info.opaque);
|
||||
gfxTexDownloadMipMap(tmu,
|
||||
voodoo.tex_min_addr[tmu] + voodoo.tmem_ptr[tmu],
|
||||
GR_MIPMAPLEVELMASK_BOTH,
|
||||
GFX_MIPMAPLEVELMASK_BOTH,
|
||||
&t_info);
|
||||
gfxTexSource(tmu,
|
||||
voodoo.tex_min_addr[tmu] + voodoo.tmem_ptr[tmu],
|
||||
GR_MIPMAPLEVELMASK_BOTH,
|
||||
GFX_MIPMAPLEVELMASK_BOTH,
|
||||
&t_info);
|
||||
DrawRE2Video(fb_info, 1.0f);
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ static void DrawFrameBufferToScreen256(FB_TO_SCREEN_INFO & fb_info)
|
|||
t_info.format = GFX_TEXFMT_ARGB_1555;
|
||||
uint16_t * tex = (uint16_t*)texture_buffer;
|
||||
t_info.data = tex;
|
||||
uint32_t tex_size = gfxTexTextureMemRequired(GR_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
uint32_t tex_size = gfxTexTextureMemRequired(GFX_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
gfxChipID_t tmu = SetupFBtoScreenCombiner(tex_size*width256*height256, fb_info.opaque);
|
||||
uint16_t * src = (uint16_t*)image;
|
||||
src += fb_info.ul_x + fb_info.ul_y * fb_info.width;
|
||||
|
@ -231,8 +231,8 @@ static void DrawFrameBufferToScreen256(FB_TO_SCREEN_INFO & fb_info)
|
|||
dst += cur_tail;
|
||||
}
|
||||
}
|
||||
gfxTexDownloadMipMap(tmu, tex_adr, GR_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
gfxTexSource(tmu, tex_adr, GR_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
gfxTexDownloadMipMap(tmu, tex_adr, GFX_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
gfxTexSource(tmu, tex_adr, GFX_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
tex_adr += tex_size;
|
||||
float ul_x = (float)(fb_info.ul_x + 256 * w);
|
||||
float ul_y = (float)(fb_info.ul_y + 256 * h);
|
||||
|
@ -352,9 +352,9 @@ bool DrawFrameBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
|
|||
t_info.data = tex;
|
||||
}
|
||||
|
||||
gfxChipID_t tmu = SetupFBtoScreenCombiner(gfxTexTextureMemRequired(GR_MIPMAPLEVELMASK_BOTH, &t_info), fb_info.opaque);
|
||||
gfxTexDownloadMipMap(tmu, voodoo.tex_min_addr[tmu] + voodoo.tmem_ptr[tmu], GR_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
gfxTexSource(tmu, voodoo.tex_min_addr[tmu] + voodoo.tmem_ptr[tmu], GR_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
gfxChipID_t tmu = SetupFBtoScreenCombiner(gfxTexTextureMemRequired(GFX_MIPMAPLEVELMASK_BOTH, &t_info), fb_info.opaque);
|
||||
gfxTexDownloadMipMap(tmu, voodoo.tex_min_addr[tmu] + voodoo.tmem_ptr[tmu], GFX_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
gfxTexSource(tmu, voodoo.tex_min_addr[tmu] + voodoo.tmem_ptr[tmu], GFX_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
if (g_settings->hacks(CSettings::hack_RE2))
|
||||
{
|
||||
DrawRE2Video(fb_info, scale);
|
||||
|
@ -394,7 +394,7 @@ static void DrawDepthBufferToScreen256(FB_TO_SCREEN_INFO & fb_info)
|
|||
t_info.format = GFX_TEXFMT_ALPHA_INTENSITY_88;
|
||||
uint16_t * tex = (uint16_t*)texture_buffer;
|
||||
t_info.data = tex;
|
||||
uint32_t tex_size = gfxTexTextureMemRequired(GR_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
uint32_t tex_size = gfxTexTextureMemRequired(GFX_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
gfxChipID_t tmu = SetupFBtoScreenCombiner(tex_size*width256*height256, fb_info.opaque);
|
||||
gfxConstantColorValue(rdp.fog_color);
|
||||
gfxColorCombine(GFX_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
|
@ -428,8 +428,8 @@ static void DrawDepthBufferToScreen256(FB_TO_SCREEN_INFO & fb_info)
|
|||
}
|
||||
dst += cur_tail;
|
||||
}
|
||||
gfxTexDownloadMipMap(tmu, tex_adr, GR_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
gfxTexSource(tmu, tex_adr, GR_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
gfxTexDownloadMipMap(tmu, tex_adr, GFX_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
gfxTexSource(tmu, tex_adr, GFX_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
tex_adr += tex_size;
|
||||
float ul_x = (float)(fb_info.ul_x + 256 * w);
|
||||
float ul_y = (float)(fb_info.ul_y + 256 * h);
|
||||
|
@ -499,7 +499,7 @@ static void DrawHiresDepthBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
|
|||
false,
|
||||
false);
|
||||
// gfxAuxBufferExt( GFX_BUFFER_AUXBUFFER );
|
||||
gfxTexSource(rdp.texbufs[0].tmu, rdp.texbufs[0].begin, GR_MIPMAPLEVELMASK_BOTH, &(t_info));
|
||||
gfxTexSource(rdp.texbufs[0].tmu, rdp.texbufs[0].begin, GFX_MIPMAPLEVELMASK_BOTH, &(t_info));
|
||||
float ul_x = (float)rdp.scissor.ul_x;
|
||||
float ul_y = (float)rdp.scissor.ul_y;
|
||||
float lr_x = (float)rdp.scissor.lr_x;
|
||||
|
@ -577,15 +577,15 @@ void DrawDepthBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
|
|||
t_info.format = GFX_TEXFMT_ALPHA_INTENSITY_88;
|
||||
t_info.data = tex;
|
||||
|
||||
gfxChipID_t tmu = SetupFBtoScreenCombiner(gfxTexTextureMemRequired(GR_MIPMAPLEVELMASK_BOTH, &t_info), fb_info.opaque);
|
||||
gfxChipID_t tmu = SetupFBtoScreenCombiner(gfxTexTextureMemRequired(GFX_MIPMAPLEVELMASK_BOTH, &t_info), fb_info.opaque);
|
||||
gfxConstantColorValue(rdp.fog_color);
|
||||
gfxColorCombine(GFX_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GFX_COMBINE_FACTOR_ONE,
|
||||
GFX_COMBINE_LOCAL_NONE,
|
||||
GFX_COMBINE_OTHER_CONSTANT,
|
||||
false);
|
||||
gfxTexDownloadMipMap(tmu, voodoo.tex_min_addr[tmu] + voodoo.tmem_ptr[tmu], GR_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
gfxTexSource(tmu, voodoo.tex_min_addr[tmu] + voodoo.tmem_ptr[tmu], GR_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
gfxTexDownloadMipMap(tmu, voodoo.tex_min_addr[tmu] + voodoo.tmem_ptr[tmu], GFX_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
gfxTexSource(tmu, voodoo.tex_min_addr[tmu] + voodoo.tmem_ptr[tmu], GFX_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
float ul_x = fb_info.ul_x * rdp.scale_x + rdp.offset_x;
|
||||
float ul_y = fb_info.ul_y * rdp.scale_y + rdp.offset_y;
|
||||
float lr_x = fb_info.lr_x * rdp.scale_x + rdp.offset_x;
|
||||
|
|
|
@ -224,14 +224,14 @@ void guLoadTextures()
|
|||
if (voodoo.max_tex_size <= 256)
|
||||
{
|
||||
gfxTextureBufferExt(GFX_TMU1, voodoo.tex_min_addr[GFX_TMU1], GFX_LOD_LOG2_256, GFX_LOD_LOG2_256,
|
||||
GFX_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565, GR_MIPMAPLEVELMASK_BOTH);
|
||||
GFX_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565, GFX_MIPMAPLEVELMASK_BOTH);
|
||||
tbuf_size = 8 * gfxTexCalcMemRequired(GFX_LOD_LOG2_256, GFX_LOD_LOG2_256,
|
||||
GFX_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565);
|
||||
}
|
||||
else if (g_scr_res_x <= 1024)
|
||||
{
|
||||
gfxTextureBufferExt(GFX_TMU0, voodoo.tex_min_addr[GFX_TMU0], GFX_LOD_LOG2_1024, GFX_LOD_LOG2_1024,
|
||||
GFX_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565, GR_MIPMAPLEVELMASK_BOTH);
|
||||
GFX_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565, GFX_MIPMAPLEVELMASK_BOTH);
|
||||
tbuf_size = gfxTexCalcMemRequired(GFX_LOD_LOG2_1024, GFX_LOD_LOG2_1024,
|
||||
GFX_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565);
|
||||
gfxRenderBuffer(GFX_BUFFER_TEXTUREBUFFER_EXT);
|
||||
|
@ -241,7 +241,7 @@ void guLoadTextures()
|
|||
else
|
||||
{
|
||||
gfxTextureBufferExt(GFX_TMU0, voodoo.tex_min_addr[GFX_TMU0], GFX_LOD_LOG2_2048, GFX_LOD_LOG2_2048,
|
||||
GFX_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565, GR_MIPMAPLEVELMASK_BOTH);
|
||||
GFX_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565, GFX_MIPMAPLEVELMASK_BOTH);
|
||||
tbuf_size = gfxTexCalcMemRequired(GFX_LOD_LOG2_2048, GFX_LOD_LOG2_2048,
|
||||
GFX_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565);
|
||||
gfxRenderBuffer(GFX_BUFFER_TEXTUREBUFFER_EXT);
|
||||
|
@ -299,10 +299,10 @@ void guLoadTextures()
|
|||
|
||||
gfxTexDownloadMipMap(GFX_TMU0,
|
||||
voodoo.tex_min_addr[GFX_TMU0] + offset_font,
|
||||
GR_MIPMAPLEVELMASK_BOTH,
|
||||
GFX_MIPMAPLEVELMASK_BOTH,
|
||||
&fontTex);
|
||||
|
||||
offset_cursor = offset_font + gfxTexTextureMemRequired(GR_MIPMAPLEVELMASK_BOTH, &fontTex);
|
||||
offset_cursor = offset_font + gfxTexTextureMemRequired(GFX_MIPMAPLEVELMASK_BOTH, &fontTex);
|
||||
|
||||
free(fontTex.data);
|
||||
|
||||
|
@ -327,11 +327,11 @@ void guLoadTextures()
|
|||
|
||||
gfxTexDownloadMipMap(GFX_TMU0,
|
||||
voodoo.tex_min_addr[GFX_TMU0] + offset_cursor,
|
||||
GR_MIPMAPLEVELMASK_BOTH,
|
||||
GFX_MIPMAPLEVELMASK_BOTH,
|
||||
&cursorTex);
|
||||
|
||||
// Round to higher 16
|
||||
offset_textures = ((offset_cursor + gfxTexTextureMemRequired(GR_MIPMAPLEVELMASK_BOTH, &cursorTex))
|
||||
offset_textures = ((offset_cursor + gfxTexTextureMemRequired(GFX_MIPMAPLEVELMASK_BOTH, &cursorTex))
|
||||
& 0xFFFFFFF0) + 16;
|
||||
free(cursorTex.data);
|
||||
}
|
||||
|
|
|
@ -375,7 +375,7 @@ int grTexFormat2GLPackedFmt(int fmt, int * gltexfmt, int * glpixfmt, int * glpac
|
|||
*/
|
||||
}
|
||||
|
||||
void gfxTexDownloadMipMap(gfxChipID_t tmu, uint32_t startAddress, uint32_t evenOdd, gfxTexInfo *info)
|
||||
void gfxTexDownloadMipMap(gfxChipID_t tmu, uint32_t startAddress, gfxMipMapLevelMask_t evenOdd, gfxTexInfo *info)
|
||||
{
|
||||
WriteTrace(TraceGlitch, TraceDebug, "tmu = %d, startAddress: %d evenOdd: %d", tmu, startAddress, evenOdd);
|
||||
int width, height, i, j;
|
||||
|
|
|
@ -370,7 +370,7 @@ int grTexFormat2GLPackedFmt(int fmt, int * gltexfmt, int * glpixfmt, int * glpac
|
|||
return factor;
|
||||
}
|
||||
|
||||
void gfxTexDownloadMipMap(gfxChipID_t tmu, uint32_t startAddress, uint32_t evenOdd, gfxTexInfo *info)
|
||||
void gfxTexDownloadMipMap(gfxChipID_t tmu, uint32_t startAddress, gfxMipMapLevelMask_t evenOdd, gfxTexInfo *info)
|
||||
{
|
||||
WriteTrace(TraceGlitch, TraceDebug, "tmu = %d, startAddress: %d evenOdd: %d", tmu, startAddress, evenOdd);
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ uint32_t gfxTexCalcMemRequired(gfxLOD_t lodmin, gfxLOD_t lodmax, gfxAspectRatio_
|
|||
void gfxLoadGammaTable(uint32_t nentries, uint32_t *red, uint32_t *green, uint32_t *blue);
|
||||
void gfxGetGammaTableExt(uint32_t /*nentries*/, uint32_t *red, uint32_t *green, uint32_t *blue);
|
||||
void gfxGammaCorrectionRGB(float gammaR, float gammaG, float gammaB);
|
||||
void gfxTexDownloadMipMap(gfxChipID_t tmu, uint32_t startAddress, uint32_t evenOdd, gfxTexInfo *info);
|
||||
void gfxTexDownloadMipMap(gfxChipID_t tmu, uint32_t startAddress, gfxMipMapLevelMask_t evenOdd, gfxTexInfo *info);
|
||||
void gfxTexSource(gfxChipID_t tmu, uint32_t startAddress, uint32_t evenOdd, gfxTexInfo *info);
|
||||
void gfxTexDetailControl(gfxChipID_t tmu, int lod_bias, uint8_t detail_scale, float detail_max);
|
||||
void gfxTexClampMode(gfxChipID_t tmu, gfxTextureClampMode_t s_clampmode, gfxTextureClampMode_t t_clampmode);
|
||||
|
|
|
@ -23,6 +23,13 @@ typedef uint32_t gfxACUColor_t;
|
|||
typedef uint32_t gfxTCCUColor_t;
|
||||
typedef uint32_t gfxTACUColor_t;
|
||||
|
||||
enum gfxMipMapLevelMask_t
|
||||
{
|
||||
GFX_MIPMAPLEVELMASK_EVEN = 1L << 0,
|
||||
GFX_MIPMAPLEVELMASK_ODD = 1L << 1,
|
||||
GFX_MIPMAPLEVELMASK_BOTH = (GFX_MIPMAPLEVELMASK_EVEN | GFX_MIPMAPLEVELMASK_ODD),
|
||||
};
|
||||
|
||||
enum gfxCombineMode_t
|
||||
{
|
||||
GFX_FUNC_MODE_ZERO = 0x00,
|
||||
|
|
|
@ -257,7 +257,7 @@ int OpenTextureBuffer(COLOR_IMAGE & cimage)
|
|||
{
|
||||
gfxRenderBuffer(GFX_BUFFER_TEXTUREBUFFER_EXT);
|
||||
gfxTextureBufferExt(texbuf->tmu, texbuf->tex_addr, texbuf->info.smallLodLog2, texbuf->info.largeLodLog2,
|
||||
texbuf->info.aspectRatioLog2, texbuf->info.format, GR_MIPMAPLEVELMASK_BOTH);
|
||||
texbuf->info.aspectRatioLog2, texbuf->info.format, GFX_MIPMAPLEVELMASK_BOTH);
|
||||
gfxDepthMask(false);
|
||||
gfxBufferClear(0, 0, 0xFFFF);
|
||||
gfxDepthMask(true);
|
||||
|
@ -295,7 +295,7 @@ int OpenTextureBuffer(COLOR_IMAGE & cimage)
|
|||
rdp.cur_image = texbuf;
|
||||
gfxRenderBuffer(GFX_BUFFER_TEXTUREBUFFER_EXT);
|
||||
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);
|
||||
rdp.cur_image->info.aspectRatioLog2, rdp.cur_image->info.format, GFX_MIPMAPLEVELMASK_BOTH);
|
||||
|
||||
if (rdp.cur_image->clear && g_settings->fb_hwfbe_buf_clear_enabled() && cimage.changed)
|
||||
{
|
||||
|
@ -426,7 +426,7 @@ int CloseTextureBuffer(int draw)
|
|||
{ lr_x, lr_y, 1, 1, lr_u, lr_v, lr_u, lr_v, { lr_u, lr_v, lr_u, lr_v } }
|
||||
};
|
||||
|
||||
gfxTexSource(rdp.tbuff_tex->tmu, rdp.tbuff_tex->tex_addr, GR_MIPMAPLEVELMASK_BOTH, &(rdp.tbuff_tex->info));
|
||||
gfxTexSource(rdp.tbuff_tex->tmu, rdp.tbuff_tex->tex_addr, GFX_MIPMAPLEVELMASK_BOTH, &(rdp.tbuff_tex->info));
|
||||
gfxClipWindow(0, 0, g_res_x, g_res_y);
|
||||
gfxDrawTriangle(&v[0], &v[2], &v[1]);
|
||||
gfxDrawTriangle(&v[2], &v[3], &v[1]);
|
||||
|
@ -481,7 +481,7 @@ int CopyTextureBuffer(COLOR_IMAGE & fb_from, COLOR_IMAGE & fb_to)
|
|||
{ lr_x, lr_y, 1, 1, lr_u, lr_v, lr_u, lr_v, { lr_u, lr_v, lr_u, lr_v } }
|
||||
};
|
||||
|
||||
gfxTexSource(rdp.tbuff_tex->tmu, rdp.tbuff_tex->tex_addr, GR_MIPMAPLEVELMASK_BOTH, &(rdp.tbuff_tex->info));
|
||||
gfxTexSource(rdp.tbuff_tex->tmu, rdp.tbuff_tex->tex_addr, GFX_MIPMAPLEVELMASK_BOTH, &(rdp.tbuff_tex->info));
|
||||
gfxDrawTriangle(&v[0], &v[2], &v[1]);
|
||||
gfxDrawTriangle(&v[2], &v[3], &v[1]);
|
||||
gfxRenderBuffer(GFX_BUFFER_BACKBUFFER);
|
||||
|
@ -538,10 +538,10 @@ int CopyDepthBuffer()
|
|||
};
|
||||
|
||||
gfxAuxBufferExt(GFX_BUFFER_AUXBUFFER);
|
||||
gfxTexSource(rdp.texbufs[0].tmu, rdp.texbufs[0].begin, GR_MIPMAPLEVELMASK_BOTH, &(rdp.tbuff_tex->info));
|
||||
gfxTexSource(rdp.texbufs[0].tmu, rdp.texbufs[0].begin, GFX_MIPMAPLEVELMASK_BOTH, &(rdp.tbuff_tex->info));
|
||||
gfxRenderBuffer(GFX_BUFFER_TEXTUREBUFFER_EXT);
|
||||
gfxTextureBufferExt(rdp.texbufs[1].tmu, rdp.texbufs[1].begin, LOD, LOD,
|
||||
GFX_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565, GR_MIPMAPLEVELMASK_BOTH);
|
||||
GFX_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565, GFX_MIPMAPLEVELMASK_BOTH);
|
||||
gfxDrawTriangle(&v[0], &v[2], &v[1]);
|
||||
gfxDrawTriangle(&v[2], &v[3], &v[1]);
|
||||
gfxRenderBuffer(GFX_BUFFER_BACKBUFFER);
|
||||
|
@ -592,13 +592,13 @@ int SwapTextureBuffer()
|
|||
{ lr_x, lr_y, 1, 1, lr_u, lr_v, lr_u, lr_v, { lr_u, lr_v, lr_u, lr_v } }
|
||||
};
|
||||
|
||||
gfxTexSource(rdp.tbuff_tex->tmu, rdp.tbuff_tex->tex_addr, GR_MIPMAPLEVELMASK_BOTH, &(rdp.tbuff_tex->info));
|
||||
gfxTexSource(rdp.tbuff_tex->tmu, rdp.tbuff_tex->tex_addr, GFX_MIPMAPLEVELMASK_BOTH, &(rdp.tbuff_tex->info));
|
||||
texbuf->tile_uls = rdp.tbuff_tex->tile_uls;
|
||||
texbuf->tile_ult = rdp.tbuff_tex->tile_ult;
|
||||
texbuf->v_shift = rdp.tbuff_tex->v_shift;
|
||||
gfxRenderBuffer(GFX_BUFFER_TEXTUREBUFFER_EXT);
|
||||
gfxTextureBufferExt(texbuf->tmu, texbuf->tex_addr, texbuf->info.smallLodLog2, texbuf->info.largeLodLog2,
|
||||
texbuf->info.aspectRatioLog2, texbuf->info.format, GR_MIPMAPLEVELMASK_BOTH);
|
||||
texbuf->info.aspectRatioLog2, texbuf->info.format, GFX_MIPMAPLEVELMASK_BOTH);
|
||||
gfxDrawTriangle(&v[0], &v[2], &v[1]);
|
||||
gfxDrawTriangle(&v[2], &v[3], &v[1]);
|
||||
rdp.texbufs[rdp.tbuff_tex->tmu].clear_allowed = TRUE;
|
||||
|
@ -611,7 +611,7 @@ int SwapTextureBuffer()
|
|||
if (rdp.cur_image)
|
||||
{
|
||||
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);
|
||||
rdp.cur_image->info.aspectRatioLog2, rdp.cur_image->info.format, GFX_MIPMAPLEVELMASK_BOTH);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -468,7 +468,7 @@ void GetTexInfo(int id, int tile)
|
|||
static void SelectTBuffTex(TBUFF_COLOR_IMAGE * pTBuffTex)
|
||||
{
|
||||
WriteTrace(TraceRDP, TraceDebug, "SelectTBuffTex: tex: %d, tmu: %d, tile: %d", rdp.tex, pTBuffTex->tmu, pTBuffTex->tile);
|
||||
gfxTexSource((gfxChipID_t)pTBuffTex->tile, pTBuffTex->tex_addr, GR_MIPMAPLEVELMASK_BOTH, &(pTBuffTex->info));
|
||||
gfxTexSource((gfxChipID_t)pTBuffTex->tile, pTBuffTex->tex_addr, GFX_MIPMAPLEVELMASK_BOTH, &(pTBuffTex->info));
|
||||
}
|
||||
|
||||
//****************************************************************
|
||||
|
@ -760,7 +760,7 @@ void TexCache()
|
|||
rdp.cur_cache[0]->uses = rdp.debug_n;
|
||||
gfxTexSource(tmu_0,
|
||||
(voodoo.tex_min_addr[tmu_0] + cache->tmem_addr),
|
||||
GR_MIPMAPLEVELMASK_BOTH,
|
||||
GFX_MIPMAPLEVELMASK_BOTH,
|
||||
&cache->t_info);
|
||||
}
|
||||
}
|
||||
|
@ -791,7 +791,7 @@ void TexCache()
|
|||
rdp.cur_cache[1]->uses = rdp.debug_n;
|
||||
gfxTexSource(tmu_1,
|
||||
(voodoo.tex_min_addr[tmu_1] + cache->tmem_addr),
|
||||
GR_MIPMAPLEVELMASK_BOTH,
|
||||
GFX_MIPMAPLEVELMASK_BOTH,
|
||||
&cache->t_info);
|
||||
}
|
||||
}
|
||||
|
@ -1645,7 +1645,7 @@ void LoadTex(int id, gfxChipID_t tmu)
|
|||
t_info->largeLodLog2 = lod;
|
||||
t_info->aspectRatioLog2 = aspect;
|
||||
|
||||
uint32_t texture_size = gfxTexTextureMemRequired(GR_MIPMAPLEVELMASK_BOTH, t_info);
|
||||
uint32_t texture_size = gfxTexTextureMemRequired(GFX_MIPMAPLEVELMASK_BOTH, t_info);
|
||||
|
||||
// Check for 2mb boundary
|
||||
// Hiroshi Morii <koolsmoky@users.sourceforge.net> required only for V1,Rush, and V2
|
||||
|
@ -1673,8 +1673,8 @@ void LoadTex(int id, gfxChipID_t tmu)
|
|||
uint32_t tex_addr = voodoo.tex_min_addr[0] + voodoo.tmem_ptr[0];
|
||||
voodoo.tmem_ptr[0] += texture_size;
|
||||
voodoo.tmem_ptr[1] = voodoo.tmem_ptr[0];
|
||||
gfxTexDownloadMipMap(tmu, tex_addr, GR_MIPMAPLEVELMASK_BOTH, t_info);
|
||||
gfxTexSource(tmu, tex_addr, GR_MIPMAPLEVELMASK_BOTH, t_info);
|
||||
gfxTexDownloadMipMap(tmu, tex_addr, GFX_MIPMAPLEVELMASK_BOTH, t_info);
|
||||
gfxTexSource(tmu, tex_addr, GFX_MIPMAPLEVELMASK_BOTH, t_info);
|
||||
}
|
||||
WriteTrace(TraceRDP, TraceDebug, " | | +- LoadTex end");
|
||||
}
|
|
@ -1983,7 +1983,7 @@ void set_message_combiner()
|
|||
false, false);
|
||||
gfxTexSource(GFX_TMU0,
|
||||
voodoo.tex_min_addr[GFX_TMU0] + offset_font,
|
||||
GR_MIPMAPLEVELMASK_BOTH,
|
||||
GFX_MIPMAPLEVELMASK_BOTH,
|
||||
&fontTex);
|
||||
gfxFogMode(GFX_FOG_DISABLE);
|
||||
}
|
|
@ -2779,7 +2779,7 @@ void rdp_setcolorimage()
|
|||
rdp.cur_image = &(rdp.texbufs[rdp.cur_tex_buf].images[0]);
|
||||
gfxRenderBuffer(GFX_BUFFER_TEXTUREBUFFER_EXT);
|
||||
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);
|
||||
rdp.cur_image->info.aspectRatioLog2, rdp.cur_image->info.format, GFX_MIPMAPLEVELMASK_BOTH);
|
||||
}
|
||||
else if (rdp.read_whole_frame)
|
||||
{
|
||||
|
|
|
@ -136,42 +136,13 @@ void DrawHiresDepthImage(const DRAWIMAGE & d)
|
|||
t_info.largeLodLog2 = GFX_LOD_LOG2_512;
|
||||
t_info.aspectRatioLog2 = GFX_ASPECT_LOG2_1x1;
|
||||
|
||||
gfxTexDownloadMipMap(rdp.texbufs[1].tmu,
|
||||
rdp.texbufs[1].begin,
|
||||
GR_MIPMAPLEVELMASK_BOTH,
|
||||
&t_info);
|
||||
gfxTexSource(rdp.texbufs[1].tmu,
|
||||
rdp.texbufs[1].begin,
|
||||
GR_MIPMAPLEVELMASK_BOTH,
|
||||
&t_info);
|
||||
gfxTexCombine(GFX_TMU1,
|
||||
GFX_COMBINE_FUNCTION_LOCAL,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
GFX_COMBINE_FUNCTION_LOCAL,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
false,
|
||||
false);
|
||||
gfxTexCombine(GFX_TMU0,
|
||||
GFX_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GFX_COMBINE_FACTOR_ONE,
|
||||
GFX_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GFX_COMBINE_FACTOR_ONE,
|
||||
false,
|
||||
false);
|
||||
gfxColorCombine(GFX_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GFX_COMBINE_FACTOR_ONE,
|
||||
GFX_COMBINE_LOCAL_NONE,
|
||||
GFX_COMBINE_OTHER_TEXTURE,
|
||||
false);
|
||||
gfxAlphaCombine(GFX_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GFX_COMBINE_FACTOR_ONE,
|
||||
GFX_COMBINE_LOCAL_NONE,
|
||||
GFX_COMBINE_OTHER_TEXTURE,
|
||||
false);
|
||||
gfxAlphaBlendFunction(GFX_BLEND_ONE,
|
||||
GFX_BLEND_ZERO,
|
||||
GFX_BLEND_ONE,
|
||||
GFX_BLEND_ZERO);
|
||||
gfxTexDownloadMipMap(rdp.texbufs[1].tmu, rdp.texbufs[1].begin, GFX_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
gfxTexSource(rdp.texbufs[1].tmu, rdp.texbufs[1].begin, GFX_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
gfxTexCombine(GFX_TMU1, GFX_COMBINE_FUNCTION_LOCAL, GFX_COMBINE_FACTOR_NONE, GFX_COMBINE_FUNCTION_LOCAL, GFX_COMBINE_FACTOR_NONE, false, false);
|
||||
gfxTexCombine(GFX_TMU0, GFX_COMBINE_FUNCTION_SCALE_OTHER, GFX_COMBINE_FACTOR_ONE, GFX_COMBINE_FUNCTION_SCALE_OTHER, GFX_COMBINE_FACTOR_ONE, false, false);
|
||||
gfxColorCombine(GFX_COMBINE_FUNCTION_SCALE_OTHER, GFX_COMBINE_FACTOR_ONE, GFX_COMBINE_LOCAL_NONE, GFX_COMBINE_OTHER_TEXTURE, false);
|
||||
gfxAlphaCombine(GFX_COMBINE_FUNCTION_SCALE_OTHER, GFX_COMBINE_FACTOR_ONE, GFX_COMBINE_LOCAL_NONE, GFX_COMBINE_OTHER_TEXTURE, false);
|
||||
gfxAlphaBlendFunction(GFX_BLEND_ONE, GFX_BLEND_ZERO, GFX_BLEND_ONE, GFX_BLEND_ZERO);
|
||||
gfxDepthBufferFunction(GFX_CMP_ALWAYS);
|
||||
gfxDepthMask(false);
|
||||
|
||||
|
@ -194,7 +165,7 @@ void DrawHiresDepthImage(const DRAWIMAGE & d)
|
|||
v[i].vc(0) = v[i].vc(1) = v[i].v0;
|
||||
}
|
||||
gfxTextureBufferExt(rdp.texbufs[0].tmu, rdp.texbufs[0].begin, LOD, LOD,
|
||||
GFX_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565, GR_MIPMAPLEVELMASK_BOTH);
|
||||
GFX_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565, GFX_MIPMAPLEVELMASK_BOTH);
|
||||
gfxRenderBuffer(GFX_BUFFER_TEXTUREBUFFER_EXT);
|
||||
gfxAuxBufferExt(GFX_BUFFER_AUXBUFFER);
|
||||
gfxBufferClear(0, 0, 0xFFFF);
|
||||
|
|
Loading…
Reference in New Issue