mirror of
https://github.com/libretro/RetroArch
synced 2025-04-11 00:44:20 +00:00
(drivers_display) Cleanups
This commit is contained in:
parent
e1dbf5dab1
commit
b830d15628
@ -27,13 +27,12 @@
|
||||
#include "../drivers/ctr_gu.h"
|
||||
#include "../../ctr/gpu_old.h"
|
||||
|
||||
static void gfx_display_ctr_blend_begin(void *data) { }
|
||||
static void gfx_display_ctr_blend_end(void *data) { }
|
||||
|
||||
static void gfx_display_ctr_draw(gfx_display_ctx_draw_t *draw,
|
||||
void *data, unsigned video_width, unsigned video_height)
|
||||
{
|
||||
ctr_scale_vector_t scale_vector;
|
||||
int colorR, colorG, colorB, colorA;
|
||||
ctr_vertex_t *v = NULL;
|
||||
struct ctr_texture *texture = NULL;
|
||||
const float *color = NULL;
|
||||
ctr_video_t *ctr = (ctr_video_t*)data;
|
||||
@ -47,16 +46,16 @@ static void gfx_display_ctr_draw(gfx_display_ctx_draw_t *draw,
|
||||
if (!texture)
|
||||
return;
|
||||
|
||||
ctr_scale_vector_t scale_vector;
|
||||
ctr_set_scale_vector(&scale_vector,
|
||||
CTR_TOP_FRAMEBUFFER_WIDTH, CTR_TOP_FRAMEBUFFER_HEIGHT,
|
||||
texture->width, texture->height);
|
||||
ctrGuSetVertexShaderFloatUniform(0, (float*)&scale_vector, 1);
|
||||
|
||||
if ((ctr->vertex_cache.size - (ctr->vertex_cache.current - ctr->vertex_cache.buffer)) < 1)
|
||||
if ((ctr->vertex_cache.size - (ctr->vertex_cache.current
|
||||
- ctr->vertex_cache.buffer)) < 1)
|
||||
ctr->vertex_cache.current = ctr->vertex_cache.buffer;
|
||||
|
||||
ctr_vertex_t* v = ctr->vertex_cache.current++;
|
||||
v = ctr->vertex_cache.current++;
|
||||
|
||||
v->x0 = draw->x;
|
||||
v->y0 = 240 - draw->height - draw->y;
|
||||
@ -128,9 +127,6 @@ static void gfx_display_ctr_draw(gfx_display_ctx_draw_t *draw,
|
||||
#endif
|
||||
}
|
||||
|
||||
static void gfx_display_ctr_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
void *data, unsigned video_width, unsigned video_height) { }
|
||||
|
||||
static bool gfx_display_ctr_font_init_first(
|
||||
void **font_handle, void *video_data,
|
||||
const char *font_path, float font_size,
|
||||
@ -146,9 +142,9 @@ static bool gfx_display_ctr_font_init_first(
|
||||
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_ctr = {
|
||||
gfx_display_ctr_draw,
|
||||
gfx_display_ctr_draw_pipeline,
|
||||
gfx_display_ctr_blend_begin,
|
||||
gfx_display_ctr_blend_end,
|
||||
NULL, /* draw_pipeline */
|
||||
NULL, /* blend_begin */
|
||||
NULL, /* blend_end */
|
||||
NULL, /* get_default_mvp */
|
||||
NULL, /* get_default_vertices */
|
||||
NULL, /* get_default_tex_coords */
|
||||
|
@ -74,7 +74,7 @@ static INT32 gfx_display_prim_to_d3d8_enum(
|
||||
break;
|
||||
}
|
||||
|
||||
/* TOD/FIXME - hack */
|
||||
/* TODO/FIXME - hack */
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -218,9 +218,6 @@ static void gfx_display_d3d8_draw(gfx_display_ctx_draw_t *draw,
|
||||
d3d->menu_display.offset += draw->coords->vertices;
|
||||
}
|
||||
|
||||
static void gfx_display_d3d8_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
void *data, unsigned video_width, unsigned video_height) { }
|
||||
|
||||
static bool gfx_display_d3d8_font_init_first(
|
||||
void **font_handle, void *video_data,
|
||||
const char *font_path, float font_size,
|
||||
@ -237,7 +234,7 @@ static bool gfx_display_d3d8_font_init_first(
|
||||
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_d3d8 = {
|
||||
gfx_display_d3d8_draw,
|
||||
gfx_display_d3d8_draw_pipeline,
|
||||
NULL, /* draw_pipeline */
|
||||
gfx_display_d3d8_blend_begin,
|
||||
gfx_display_d3d8_blend_end,
|
||||
gfx_display_d3d8_get_default_mvp,
|
||||
|
@ -44,10 +44,6 @@ static const float *gfx_display_gdi_get_default_tex_coords(void)
|
||||
return &dummy[0];
|
||||
}
|
||||
|
||||
|
||||
static void gfx_display_gdi_blend_begin(void *data) { }
|
||||
static void gfx_display_gdi_blend_end(void *data) { }
|
||||
|
||||
static void gfx_display_gdi_draw(gfx_display_ctx_draw_t *draw,
|
||||
void *data, unsigned video_width, unsigned video_height)
|
||||
{
|
||||
@ -118,9 +114,6 @@ static void gfx_display_gdi_draw(gfx_display_ctx_draw_t *draw,
|
||||
}
|
||||
}
|
||||
|
||||
static void gfx_display_gdi_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
void *data, unsigned video_width, unsigned video_height) { }
|
||||
|
||||
static bool gfx_display_gdi_font_init_first(
|
||||
void **font_handle, void *video_data,
|
||||
const char *font_path, float gdi_font_size,
|
||||
@ -137,9 +130,9 @@ static bool gfx_display_gdi_font_init_first(
|
||||
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_gdi = {
|
||||
gfx_display_gdi_draw,
|
||||
gfx_display_gdi_draw_pipeline,
|
||||
gfx_display_gdi_blend_begin,
|
||||
gfx_display_gdi_blend_end,
|
||||
NULL, /* draw_pipeline */
|
||||
NULL, /* blend_begin */
|
||||
NULL, /* blend_end */
|
||||
NULL, /* get_default_mvp */
|
||||
gfx_display_gdi_get_default_vertices,
|
||||
gfx_display_gdi_get_default_tex_coords,
|
||||
|
@ -22,13 +22,8 @@
|
||||
|
||||
#include "../gfx_display.h"
|
||||
|
||||
static void gfx_display_switch_blend_begin(void *data) { }
|
||||
static void gfx_display_switch_blend_end(void *data) { }
|
||||
static void gfx_display_switch_draw(gfx_display_ctx_draw_t *draw,
|
||||
void *data, unsigned video_width, unsigned video_height) { }
|
||||
static void gfx_display_switch_draw_pipeline(
|
||||
gfx_display_ctx_draw_t *draw,
|
||||
void *data, unsigned video_width, unsigned video_height) { }
|
||||
|
||||
static bool gfx_display_switch_font_init_first(
|
||||
void **font_handle, void *video_data,
|
||||
@ -57,9 +52,9 @@ static const float *gfx_display_switch_get_default_tex_coords(void)
|
||||
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_switch = {
|
||||
gfx_display_switch_draw,
|
||||
gfx_display_switch_draw_pipeline,
|
||||
gfx_display_switch_blend_begin,
|
||||
gfx_display_switch_blend_end,
|
||||
NULL, /* draw_pipeline */
|
||||
NULL, /* blend_begin */
|
||||
NULL, /* blend_end */
|
||||
NULL, /* get_default_mvp */
|
||||
gfx_display_switch_get_default_vertices,
|
||||
gfx_display_switch_get_default_tex_coords,
|
||||
|
@ -74,9 +74,6 @@ static void *gfx_display_vita2d_get_default_mvp(void *data)
|
||||
return &vita2d->mvp_no_rot;
|
||||
}
|
||||
|
||||
static void gfx_display_vita2d_blend_begin(void *data) { }
|
||||
static void gfx_display_vita2d_blend_end(void *data) { }
|
||||
|
||||
static void gfx_display_vita2d_draw(gfx_display_ctx_draw_t *draw,
|
||||
void *data, unsigned video_width, unsigned video_height)
|
||||
{
|
||||
@ -134,9 +131,6 @@ static void gfx_display_vita2d_draw(gfx_display_ctx_draw_t *draw,
|
||||
}
|
||||
}
|
||||
|
||||
static void gfx_display_vita2d_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
void *data, unsigned video_width, unsigned video_height) { }
|
||||
|
||||
static bool gfx_display_vita2d_font_init_first(
|
||||
void **font_handle, void *video_data,
|
||||
const char *font_path, float font_size,
|
||||
@ -170,12 +164,11 @@ static void gfx_display_vita2d_scissor_end(
|
||||
vita2d_disable_clipping();
|
||||
}
|
||||
|
||||
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_vita2d = {
|
||||
gfx_display_vita2d_draw,
|
||||
gfx_display_vita2d_draw_pipeline,
|
||||
gfx_display_vita2d_blend_begin,
|
||||
gfx_display_vita2d_blend_end,
|
||||
NULL, /* draw_pipeline */
|
||||
NULL, /* blend_begin */
|
||||
NULL, /* blend_end */
|
||||
gfx_display_vita2d_get_default_mvp,
|
||||
gfx_display_vita2d_get_default_vertices,
|
||||
gfx_display_vita2d_get_default_tex_coords,
|
||||
|
@ -28,9 +28,6 @@
|
||||
#include "../../wiiu/system/memory.h"
|
||||
#include "../../wiiu/wiiu_dbg.h"
|
||||
|
||||
static void gfx_display_wiiu_blend_begin(void *data) { }
|
||||
static void gfx_display_wiiu_blend_end(void *data) { }
|
||||
|
||||
static void gfx_display_wiiu_draw(gfx_display_ctx_draw_t *draw,
|
||||
void *data, unsigned video_width, unsigned video_height)
|
||||
{
|
||||
@ -196,8 +193,10 @@ static void gfx_display_wiiu_draw(gfx_display_ctx_draw_t *draw,
|
||||
|
||||
GX2SetShaderMode(GX2_SHADER_MODE_GEOMETRY_SHADER);
|
||||
GX2SetShader(&sprite_shader);
|
||||
// GX2SetGeometryShaderInputRingBuffer(wiiu->input_ring_buffer, wiiu->input_ring_buffer_size);
|
||||
// GX2SetGeometryShaderOutputRingBuffer(wiiu->output_ring_buffer, wiiu->output_ring_buffer_size);
|
||||
#if 0
|
||||
GX2SetGeometryShaderInputRingBuffer(wiiu->input_ring_buffer, wiiu->input_ring_buffer_size);
|
||||
GX2SetGeometryShaderOutputRingBuffer(wiiu->output_ring_buffer, wiiu->output_ring_buffer_size);
|
||||
#endif
|
||||
GX2SetVertexUniformBlock(sprite_shader.vs.uniformBlocks[0].offset,
|
||||
sprite_shader.vs.uniformBlocks[0].size,
|
||||
wiiu->ubo_vp);
|
||||
@ -298,8 +297,8 @@ static void gfx_display_wiiu_scissor_end(
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_wiiu = {
|
||||
gfx_display_wiiu_draw,
|
||||
gfx_display_wiiu_draw_pipeline,
|
||||
gfx_display_wiiu_blend_begin,
|
||||
gfx_display_wiiu_blend_end,
|
||||
NULL, /* blend_begin */
|
||||
NULL, /* blend_end */
|
||||
NULL, /* get_default_mvp */
|
||||
NULL, /* get_default_vertices */
|
||||
NULL, /* get_default_tex_coords */
|
||||
|
Loading…
x
Reference in New Issue
Block a user