mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
Turn C++ comments into C comments
This commit is contained in:
parent
2aaa3a3a3a
commit
e0a560f60a
@ -365,7 +365,9 @@ static void* ctr_init(const video_info_t* video,
|
||||
ctr->menu.texture_width, ctr->menu.texture_height);
|
||||
|
||||
memset(ctr->texture_linear, 0x00, ctr->texture_width * ctr->texture_height * (ctr->rgb32? 4:2));
|
||||
// memset(ctr->menu.texture_swizzled , 0x00, ctr->menu.texture_width * ctr->menu.texture_height * 2);
|
||||
#if 0
|
||||
memset(ctr->menu.texture_swizzled , 0x00, ctr->menu.texture_width * ctr->menu.texture_height * 2);
|
||||
#endif
|
||||
|
||||
ctr->dvlb = DVLB_ParseFile((u32*)ctr_sprite_shbin, ctr_sprite_shbin_size);
|
||||
ctrGuSetVshGsh(&ctr->shader, ctr->dvlb, 2, 2);
|
||||
@ -380,9 +382,13 @@ static void* ctr_init(const video_info_t* video,
|
||||
GPU_SetStencilTest(false, GPU_ALWAYS, 0x00, 0xFF, 0x00);
|
||||
GPU_SetStencilOp(GPU_STENCIL_KEEP, GPU_STENCIL_KEEP, GPU_STENCIL_KEEP);
|
||||
GPU_SetBlendingColor(0, 0, 0, 0);
|
||||
// GPU_SetDepthTestAndWriteMask(true, GPU_GREATER, GPU_WRITE_ALL);
|
||||
#if 0
|
||||
GPU_SetDepthTestAndWriteMask(true, GPU_GREATER, GPU_WRITE_ALL);
|
||||
#endif
|
||||
GPU_SetDepthTestAndWriteMask(false, GPU_ALWAYS, GPU_WRITE_COLOR);
|
||||
// GPU_SetDepthTestAndWriteMask(true, GPU_ALWAYS, GPU_WRITE_ALL);
|
||||
#if 0
|
||||
GPU_SetDepthTestAndWriteMask(true, GPU_ALWAYS, GPU_WRITE_ALL);
|
||||
#endif
|
||||
|
||||
GPUCMD_AddMaskedWrite(GPUREG_EARLYDEPTH_TEST1, 0x1, 0);
|
||||
GPUCMD_AddWrite(GPUREG_EARLYDEPTH_TEST2, 0);
|
||||
@ -887,7 +893,9 @@ static void ctr_free(void* data)
|
||||
linearFree(ctr->empty_framebuffer);
|
||||
linearFree(ctr->vertex_cache.buffer);
|
||||
linearFree(ctr);
|
||||
// gfxExit();
|
||||
#if 0
|
||||
gfxExit();
|
||||
#endif
|
||||
}
|
||||
static void ctr_set_texture_frame(void* data, const void* frame, bool rgb32,
|
||||
unsigned width, unsigned height, float alpha)
|
||||
|
@ -138,7 +138,7 @@ static void *xenon360_gfx_init(const video_info_t *video, const input_driver_t *
|
||||
edram_init(gl->gl_device);
|
||||
|
||||
|
||||
// enable filtering for now
|
||||
/* enable filtering for now */
|
||||
|
||||
float x = -1.0f;
|
||||
float y = 1.0f;
|
||||
@ -151,21 +151,21 @@ static void *xenon360_gfx_init(const video_info_t *video, const input_driver_t *
|
||||
ScreenUv[UV_TOP] = ScreenUv[UV_TOP] * 2;
|
||||
ScreenUv[UV_LEFT] = ScreenUv[UV_LEFT] * 2;
|
||||
|
||||
// top left
|
||||
/* top left */
|
||||
Rect[0].x = x;
|
||||
Rect[0].y = y;
|
||||
Rect[0].u = ScreenUv[UV_BOTTOM];
|
||||
Rect[0].v = ScreenUv[UV_RIGHT];
|
||||
Rect[0].color = 0;
|
||||
|
||||
// bottom left
|
||||
/* bottom left */
|
||||
Rect[1].x = x;
|
||||
Rect[1].y = y - h;
|
||||
Rect[1].u = ScreenUv[UV_BOTTOM];
|
||||
Rect[1].v = ScreenUv[UV_LEFT];
|
||||
Rect[1].color = 0;
|
||||
|
||||
// top right
|
||||
/* top right */
|
||||
Rect[2].x = x + w;
|
||||
Rect[2].y = y;
|
||||
Rect[2].u = ScreenUv[UV_TOP];
|
||||
@ -202,32 +202,33 @@ static bool xenon360_gfx_frame(void *data, const void *frame, unsigned width, un
|
||||
|
||||
DrawVerticeFormats * Rect = Xe_VB_Lock(vid->gl_device, vid->vb, 0, 3 * sizeof(DrawVerticeFormats), XE_LOCK_WRITE);
|
||||
|
||||
// bottom left
|
||||
/* bottom left */
|
||||
Rect[1].v = ScreenUv[UV_LEFT];
|
||||
Rect[2].u = ScreenUv[UV_TOP];
|
||||
|
||||
Xe_VB_Unlock(vid->gl_device, vid->vb);
|
||||
|
||||
// Refresh texture cache
|
||||
uint16_t *dst = Xe_Surface_LockRect(vid->gl_device, vid->g_pTexture, 0, 0, 0, 0, XE_LOCK_WRITE);
|
||||
/* Refresh texture cache */
|
||||
uint16_t *dst = Xe_Surface_LockRect(vid->gl_device, vid->g_pTexture, 0, 0, 0, 0, XE_LOCK_WRITE);
|
||||
const uint16_t *src = frame;
|
||||
unsigned stride_in = pitch >>1;
|
||||
unsigned stride_in = pitch >>1;
|
||||
unsigned stride_out = vid->g_pTexture->wpitch >> 1;
|
||||
unsigned copy_size =width << 1;
|
||||
unsigned copy_size = width << 1;
|
||||
|
||||
for (unsigned y = 0; y < height; y++, dst += stride_out, src += stride_in)
|
||||
memcpy(dst, src, copy_size);
|
||||
Xe_Surface_Unlock(vid->gl_device, vid->g_pTexture);
|
||||
|
||||
// Reset states
|
||||
/* Reset states */
|
||||
Xe_InvalidateState(vid->gl_device);
|
||||
Xe_SetClearColor(vid->gl_device, 0);
|
||||
|
||||
// Select stream
|
||||
/* Select stream */
|
||||
Xe_SetTexture(vid->gl_device, 0, vid->g_pTexture);
|
||||
Xe_SetCullMode(vid->gl_device, XE_CULL_NONE);
|
||||
Xe_SetStreamSource(vid->gl_device, 0, vid->vb, 0, sizeof(DrawVerticeFormats));
|
||||
|
||||
// Select shaders
|
||||
/* Select shaders */
|
||||
Xe_SetShader(vid->gl_device, SHADER_TYPE_PIXEL, vid->g_pPixelTexturedShader, 0);
|
||||
Xe_SetShader(vid->gl_device, SHADER_TYPE_VERTEX, vid->g_pVertexShader, 0);
|
||||
|
||||
@ -235,10 +236,10 @@ static bool xenon360_gfx_frame(void *data, const void *frame, unsigned width, un
|
||||
menu_driver_frame(video_info);
|
||||
#endif
|
||||
|
||||
// Draw
|
||||
/* Draw */
|
||||
Xe_DrawPrimitive(vid->gl_device, XE_PRIMTYPE_TRIANGLELIST, 0, 1);
|
||||
|
||||
// Resolve
|
||||
/* Resolve */
|
||||
Xe_Resolve(vid->gl_device);
|
||||
Xe_Sync(vid->gl_device);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user