[Video] Rename grRenderBuffer to gfxRenderBuffer
This commit is contained in:
parent
837ebe02ef
commit
33d8caba16
|
@ -240,9 +240,9 @@ void guLoadTextures()
|
|||
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);
|
||||
grRenderBuffer(GR_BUFFER_TEXTUREBUFFER_EXT);
|
||||
gfxRenderBuffer(GR_BUFFER_TEXTUREBUFFER_EXT);
|
||||
grBufferClear(0, 0, 0xFFFF);
|
||||
grRenderBuffer(GR_BUFFER_BACKBUFFER);
|
||||
gfxRenderBuffer(GR_BUFFER_BACKBUFFER);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -250,9 +250,9 @@ void guLoadTextures()
|
|||
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);
|
||||
grRenderBuffer(GR_BUFFER_TEXTUREBUFFER_EXT);
|
||||
gfxRenderBuffer(GR_BUFFER_TEXTUREBUFFER_EXT);
|
||||
grBufferClear(0, 0, 0xFFFF);
|
||||
grRenderBuffer(GR_BUFFER_BACKBUFFER);
|
||||
gfxRenderBuffer(GR_BUFFER_BACKBUFFER);
|
||||
}
|
||||
|
||||
rdp.texbufs[0].tmu = GR_TMU0;
|
||||
|
@ -549,7 +549,7 @@ int InitGfx()
|
|||
gfxCullMode(GR_CULL_DISABLE);
|
||||
gfxDepthBufferMode(GR_DEPTHBUFFER_ZBUFFER);
|
||||
gfxDepthBufferFunction(GR_CMP_ALWAYS);
|
||||
grRenderBuffer(GR_BUFFER_BACKBUFFER);
|
||||
gfxRenderBuffer(GR_BUFFER_BACKBUFFER);
|
||||
gfxColorMask(FXTRUE, FXTRUE);
|
||||
gfxDepthMask(FXTRUE);
|
||||
grBufferClear(0, 0, 0xFFFF);
|
||||
|
|
|
@ -166,7 +166,7 @@ SHADER_VARYING
|
|||
"void main() \n"
|
||||
"{ \n"
|
||||
" float q = aPosition.w; \n"
|
||||
" float invertY = vertexOffset.z; \n" //Usually 1.0 but -1.0 when rendering to a texture (see inverted_culling grRenderBuffer)
|
||||
" float invertY = vertexOffset.z; \n" //Usually 1.0 but -1.0 when rendering to a texture (see inverted_culling gfxRenderBuffer)
|
||||
" gl_Position.x = (aPosition.x - vertexOffset.x) / vertexOffset.x; \n"
|
||||
" gl_Position.y = invertY *-(aPosition.y - vertexOffset.y) / vertexOffset.y;\n"
|
||||
" gl_Position.z = aPosition.z / Z_MAX; \n"
|
||||
|
|
|
@ -1181,15 +1181,14 @@ void gfxFramebufferCopyExt(int x, int y, int w, int h, int from, int to, int mod
|
|||
}
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grRenderBuffer(GrBuffer_t buffer)
|
||||
void gfxRenderBuffer(GrBuffer_t buffer)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
static HANDLE region = NULL;
|
||||
int realWidth = pBufferWidth, realHeight = pBufferHeight;
|
||||
#endif // _WIN32
|
||||
WriteTrace(TraceGlitch, TraceDebug, "buffer: %d", buffer);
|
||||
//printf("grRenderBuffer(%d)\n", buffer);
|
||||
//printf("gfxRenderBuffer(%d)\n", buffer);
|
||||
|
||||
switch (buffer)
|
||||
{
|
||||
|
@ -1298,7 +1297,7 @@ grRenderBuffer(GrBuffer_t buffer)
|
|||
render_to_texture = 1;
|
||||
break;
|
||||
default:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grRenderBuffer : unknown buffer : %x", buffer);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "gfxRenderBuffer : unknown buffer : %x", buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1453,15 +1453,14 @@ void gfxFramebufferCopyExt(int x, int y, int w, int h, int from, int to, int mod
|
|||
}
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grRenderBuffer(GrBuffer_t buffer)
|
||||
void gfxRenderBuffer(GrBuffer_t buffer)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
static HANDLE region = NULL;
|
||||
//int realWidth = pBufferWidth, realHeight = pBufferHeight;
|
||||
#endif // _WIN32
|
||||
WriteTrace(TraceGlitch, TraceDebug, "buffer: %d", buffer);
|
||||
//printf("grRenderBuffer(%d)\n", buffer);
|
||||
//printf("gfxRenderBuffer(%d)\n", buffer);
|
||||
|
||||
switch (buffer)
|
||||
{
|
||||
|
@ -1569,9 +1568,9 @@ grRenderBuffer(GrBuffer_t buffer)
|
|||
render_to_texture = 1;
|
||||
break;
|
||||
default:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grRenderBuffer : unknown buffer : %x", buffer);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "gfxRenderBuffer : unknown buffer : %x", buffer);
|
||||
}
|
||||
grDisplayGLError("grRenderBuffer");
|
||||
grDisplayGLError("gfxRenderBuffer");
|
||||
}
|
||||
|
||||
void gfxAuxBufferExt(GrBuffer_t buffer)
|
||||
|
|
|
@ -56,6 +56,7 @@ GrContext_t gfxSstWinOpen(GrColorFormat_t color_format, GrOriginLocation_t origi
|
|||
void gfxAuxBufferExt(GrBuffer_t buffer);
|
||||
FxU32 gfxGet(FxU32 pname, FxU32 plength, FxI32 *params);
|
||||
void gfxFramebufferCopyExt(int x, int y, int w, int h, int from, int to, int mode);
|
||||
void gfxRenderBuffer(GrBuffer_t buffer);
|
||||
|
||||
extern uint32_t nbTextureUnits;
|
||||
extern uint32_t g_scr_res_x, g_scr_res_y, g_res_x, g_res_y;
|
||||
|
|
|
@ -255,13 +255,13 @@ int OpenTextureBuffer(COLOR_IMAGE & cimage)
|
|||
{
|
||||
if (!((end_addr <= texbuf->addr) || (addr >= texbuf->end_addr))) //intersected, remove
|
||||
{
|
||||
grRenderBuffer(GR_BUFFER_TEXTUREBUFFER_EXT);
|
||||
gfxRenderBuffer(GR_BUFFER_TEXTUREBUFFER_EXT);
|
||||
gfxTextureBufferExt(texbuf->tmu, texbuf->tex_addr, texbuf->info.smallLodLog2, texbuf->info.largeLodLog2,
|
||||
texbuf->info.aspectRatioLog2, texbuf->info.format, GR_MIPMAPLEVELMASK_BOTH);
|
||||
gfxDepthMask(FXFALSE);
|
||||
grBufferClear(0, 0, 0xFFFF);
|
||||
gfxDepthMask(FXTRUE);
|
||||
grRenderBuffer(GR_BUFFER_BACKBUFFER);
|
||||
gfxRenderBuffer(GR_BUFFER_BACKBUFFER);
|
||||
rdp.texbufs[i].count--;
|
||||
if (j < rdp.texbufs[i].count)
|
||||
memmove(&(rdp.texbufs[i].images[j]), &(rdp.texbufs[i].images[j + 1]), sizeof(TBUFF_COLOR_IMAGE)*(rdp.texbufs[i].count - j));
|
||||
|
@ -293,7 +293,7 @@ int OpenTextureBuffer(COLOR_IMAGE & cimage)
|
|||
|
||||
rdp.acc_tex_buf = rdp.cur_tex_buf;
|
||||
rdp.cur_image = texbuf;
|
||||
grRenderBuffer(GR_BUFFER_TEXTUREBUFFER_EXT);
|
||||
gfxRenderBuffer(GR_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);
|
||||
|
||||
|
@ -395,7 +395,7 @@ int CloseTextureBuffer(int draw)
|
|||
WriteTrace(TraceRDP, TraceDebug, "CloseTextureBuffer KO");
|
||||
return FALSE;
|
||||
}
|
||||
grRenderBuffer(GR_BUFFER_BACKBUFFER);
|
||||
gfxRenderBuffer(GR_BUFFER_BACKBUFFER);
|
||||
rdp.offset_x = rdp.offset_x_bak;
|
||||
rdp.offset_y = rdp.offset_y_bak;
|
||||
rdp.offset_x_bak = rdp.offset_y_bak = 0;
|
||||
|
@ -484,7 +484,7 @@ int CopyTextureBuffer(COLOR_IMAGE & fb_from, COLOR_IMAGE & fb_to)
|
|||
grTexSource(rdp.tbuff_tex->tmu, rdp.tbuff_tex->tex_addr, GR_MIPMAPLEVELMASK_BOTH, &(rdp.tbuff_tex->info));
|
||||
gfxDrawTriangle(&v[0], &v[2], &v[1]);
|
||||
gfxDrawTriangle(&v[2], &v[3], &v[1]);
|
||||
grRenderBuffer(GR_BUFFER_BACKBUFFER);
|
||||
gfxRenderBuffer(GR_BUFFER_BACKBUFFER);
|
||||
rdp.offset_x = rdp.offset_x_bak;
|
||||
rdp.offset_y = rdp.offset_y_bak;
|
||||
rdp.offset_x_bak = rdp.offset_y_bak = 0;
|
||||
|
@ -539,12 +539,12 @@ int CopyDepthBuffer()
|
|||
|
||||
gfxAuxBufferExt(GR_BUFFER_AUXBUFFER);
|
||||
grTexSource(rdp.texbufs[0].tmu, rdp.texbufs[0].begin, GR_MIPMAPLEVELMASK_BOTH, &(rdp.tbuff_tex->info));
|
||||
grRenderBuffer(GR_BUFFER_TEXTUREBUFFER_EXT);
|
||||
gfxRenderBuffer(GR_BUFFER_TEXTUREBUFFER_EXT);
|
||||
gfxTextureBufferExt(rdp.texbufs[1].tmu, rdp.texbufs[1].begin, LOD, LOD,
|
||||
GR_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565, GR_MIPMAPLEVELMASK_BOTH);
|
||||
gfxDrawTriangle(&v[0], &v[2], &v[1]);
|
||||
gfxDrawTriangle(&v[2], &v[3], &v[1]);
|
||||
grRenderBuffer(GR_BUFFER_BACKBUFFER);
|
||||
gfxRenderBuffer(GR_BUFFER_BACKBUFFER);
|
||||
gfxAuxBufferExt(GR_BUFFER_TEXTUREAUXBUFFER_EXT);
|
||||
|
||||
rdp.update |= UPDATE_ZBUF_ENABLED | UPDATE_COMBINE | UPDATE_TEXTURE | UPDATE_ALPHA_COMPARE;
|
||||
|
@ -596,7 +596,7 @@ int SwapTextureBuffer()
|
|||
texbuf->tile_uls = rdp.tbuff_tex->tile_uls;
|
||||
texbuf->tile_ult = rdp.tbuff_tex->tile_ult;
|
||||
texbuf->v_shift = rdp.tbuff_tex->v_shift;
|
||||
grRenderBuffer(GR_BUFFER_TEXTUREBUFFER_EXT);
|
||||
gfxRenderBuffer(GR_BUFFER_TEXTUREBUFFER_EXT);
|
||||
gfxTextureBufferExt(texbuf->tmu, texbuf->tex_addr, texbuf->info.smallLodLog2, texbuf->info.largeLodLog2,
|
||||
texbuf->info.aspectRatioLog2, texbuf->info.format, GR_MIPMAPLEVELMASK_BOTH);
|
||||
gfxDrawTriangle(&v[0], &v[2], &v[1]);
|
||||
|
@ -615,7 +615,7 @@ int SwapTextureBuffer()
|
|||
}
|
||||
else
|
||||
{
|
||||
grRenderBuffer(GR_BUFFER_BACKBUFFER);
|
||||
gfxRenderBuffer(GR_BUFFER_BACKBUFFER);
|
||||
rdp.offset_x = rdp.offset_x_bak;
|
||||
rdp.offset_y = rdp.offset_y_bak;
|
||||
rdp.offset_x_bak = rdp.offset_y_bak = 0;
|
||||
|
|
|
@ -2777,7 +2777,7 @@ void rdp_setcolorimage()
|
|||
if (rdp.motionblur)
|
||||
{
|
||||
rdp.cur_image = &(rdp.texbufs[rdp.cur_tex_buf].images[0]);
|
||||
grRenderBuffer(GR_BUFFER_TEXTUREBUFFER_EXT);
|
||||
gfxRenderBuffer(GR_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);
|
||||
}
|
||||
|
|
|
@ -195,12 +195,12 @@ void DrawHiresDepthImage(const DRAWIMAGE & d)
|
|||
}
|
||||
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);
|
||||
gfxRenderBuffer(GR_BUFFER_TEXTUREBUFFER_EXT);
|
||||
gfxAuxBufferExt(GR_BUFFER_AUXBUFFER);
|
||||
grBufferClear(0, 0, 0xFFFF);
|
||||
gfxDrawTriangle(&v[0], &v[2], &v[1]);
|
||||
gfxDrawTriangle(&v[2], &v[3], &v[1]);
|
||||
grRenderBuffer(GR_BUFFER_BACKBUFFER);
|
||||
gfxRenderBuffer(GR_BUFFER_BACKBUFFER);
|
||||
gfxAuxBufferExt(GR_BUFFER_TEXTUREAUXBUFFER_EXT);
|
||||
gfxDepthMask(FXTRUE);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue