mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-26 04:36:56 +00:00
Remove drivers_display viewport - was unused
This commit is contained in:
parent
fbe0924d44
commit
e1dbf5dab1
@ -29,8 +29,6 @@
|
||||
|
||||
static void gfx_display_ctr_blend_begin(void *data) { }
|
||||
static void gfx_display_ctr_blend_end(void *data) { }
|
||||
static void gfx_display_ctr_viewport(gfx_display_ctx_draw_t *draw,
|
||||
void *data) { }
|
||||
|
||||
static void gfx_display_ctr_draw(gfx_display_ctx_draw_t *draw,
|
||||
void *data, unsigned video_width, unsigned video_height)
|
||||
@ -149,7 +147,6 @@ 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_viewport,
|
||||
gfx_display_ctr_blend_begin,
|
||||
gfx_display_ctr_blend_end,
|
||||
NULL, /* get_default_mvp */
|
||||
|
@ -42,12 +42,10 @@ static void gfx_display_d3d10_blend_end(void *data)
|
||||
d3d10->blend_disable, NULL, D3D10_DEFAULT_SAMPLE_MASK);
|
||||
}
|
||||
|
||||
static void gfx_display_d3d10_viewport(gfx_display_ctx_draw_t *draw, void *data) { }
|
||||
|
||||
static void gfx_display_d3d10_draw(gfx_display_ctx_draw_t *draw,
|
||||
void *data, unsigned video_width, unsigned video_height)
|
||||
{
|
||||
int vertex_count;
|
||||
int vertex_count = 1;
|
||||
d3d10_video_t* d3d10 = (d3d10_video_t*)data;
|
||||
|
||||
if (!d3d10 || !draw || !draw->texture)
|
||||
@ -73,8 +71,6 @@ static void gfx_display_d3d10_draw(gfx_display_ctx_draw_t *draw,
|
||||
|
||||
if (draw->coords->vertex && draw->coords->tex_coord && draw->coords->color)
|
||||
vertex_count = draw->coords->vertices;
|
||||
else
|
||||
vertex_count = 1;
|
||||
|
||||
if (!d3d10->sprites.enabled || vertex_count > d3d10->sprites.capacity)
|
||||
return;
|
||||
@ -278,7 +274,6 @@ void gfx_display_d3d10_scissor_end(void *data,
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_d3d10 = {
|
||||
gfx_display_d3d10_draw,
|
||||
gfx_display_d3d10_draw_pipeline,
|
||||
gfx_display_d3d10_viewport,
|
||||
gfx_display_d3d10_blend_begin,
|
||||
gfx_display_d3d10_blend_end,
|
||||
NULL, /* get_default_mvp */
|
||||
|
@ -41,12 +41,10 @@ static void gfx_display_d3d11_blend_end(void *data)
|
||||
d3d11->blend_disable, NULL, D3D11_DEFAULT_SAMPLE_MASK);
|
||||
}
|
||||
|
||||
static void gfx_display_d3d11_viewport(gfx_display_ctx_draw_t *draw, void *data) { }
|
||||
|
||||
static void gfx_display_d3d11_draw(gfx_display_ctx_draw_t *draw,
|
||||
void *data, unsigned video_width, unsigned video_height)
|
||||
{
|
||||
int vertex_count;
|
||||
int vertex_count = 1;
|
||||
d3d11_video_t *d3d11 = (d3d11_video_t*)data;
|
||||
|
||||
if (!d3d11 || !draw || !draw->texture)
|
||||
@ -72,8 +70,6 @@ static void gfx_display_d3d11_draw(gfx_display_ctx_draw_t *draw,
|
||||
|
||||
if (draw->coords->vertex && draw->coords->tex_coord && draw->coords->color)
|
||||
vertex_count = draw->coords->vertices;
|
||||
else
|
||||
vertex_count = 1;
|
||||
|
||||
if (!d3d11->sprites.enabled || vertex_count > d3d11->sprites.capacity)
|
||||
return;
|
||||
@ -279,7 +275,6 @@ void gfx_display_d3d11_scissor_end(void *data,
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_d3d11 = {
|
||||
gfx_display_d3d11_draw,
|
||||
gfx_display_d3d11_draw_pipeline,
|
||||
gfx_display_d3d11_viewport,
|
||||
gfx_display_d3d11_blend_begin,
|
||||
gfx_display_d3d11_blend_end,
|
||||
NULL, /* get_default_mvp */
|
||||
|
@ -43,12 +43,10 @@ static void gfx_display_d3d12_blend_end(void *data)
|
||||
D3D12SetPipelineState(d3d12->queue.cmd, d3d12->sprites.pipe);
|
||||
}
|
||||
|
||||
static void gfx_display_d3d12_viewport(gfx_display_ctx_draw_t *draw, void *data) { }
|
||||
|
||||
static void gfx_display_d3d12_draw(gfx_display_ctx_draw_t *draw,
|
||||
void *data, unsigned video_width, unsigned video_height)
|
||||
{
|
||||
int vertex_count;
|
||||
int vertex_count = 1;
|
||||
d3d12_video_t *d3d12 = (d3d12_video_t*)data;
|
||||
|
||||
if (!d3d12 || !draw || !draw->texture)
|
||||
@ -72,8 +70,6 @@ static void gfx_display_d3d12_draw(gfx_display_ctx_draw_t *draw,
|
||||
|
||||
if (draw->coords->vertex && draw->coords->tex_coord && draw->coords->color)
|
||||
vertex_count = draw->coords->vertices;
|
||||
else
|
||||
vertex_count = 1;
|
||||
|
||||
if (!d3d12->sprites.enabled || vertex_count > d3d12->sprites.capacity)
|
||||
return;
|
||||
@ -299,7 +295,6 @@ void gfx_display_d3d12_scissor_end(void *data,
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_d3d12 = {
|
||||
gfx_display_d3d12_draw,
|
||||
gfx_display_d3d12_draw_pipeline,
|
||||
gfx_display_d3d12_viewport,
|
||||
gfx_display_d3d12_blend_begin,
|
||||
gfx_display_d3d12_blend_end,
|
||||
NULL, /* get_default_mvp */
|
||||
|
@ -98,8 +98,6 @@ static void gfx_display_d3d8_blend_end(void *data)
|
||||
d3d8_disable_blend_func(d3d->dev);
|
||||
}
|
||||
|
||||
static void gfx_display_d3d8_viewport(gfx_display_ctx_draw_t *draw, void *data) { }
|
||||
|
||||
static void gfx_display_d3d8_bind_texture(gfx_display_ctx_draw_t *draw,
|
||||
d3d8_video_t *d3d)
|
||||
{
|
||||
@ -240,7 +238,6 @@ 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,
|
||||
gfx_display_d3d8_viewport,
|
||||
gfx_display_d3d8_blend_begin,
|
||||
gfx_display_d3d8_blend_end,
|
||||
gfx_display_d3d8_get_default_mvp,
|
||||
|
@ -98,8 +98,6 @@ static void gfx_display_d3d9_blend_end(void *data)
|
||||
d3d9_disable_blend_func(d3d->dev);
|
||||
}
|
||||
|
||||
static void gfx_display_d3d9_viewport(gfx_display_ctx_draw_t *draw, void *data) { }
|
||||
|
||||
static void gfx_display_d3d9_bind_texture(gfx_display_ctx_draw_t *draw,
|
||||
d3d9_video_t *d3d)
|
||||
{
|
||||
@ -312,7 +310,6 @@ void gfx_display_d3d9_scissor_end(void *data,
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_d3d9 = {
|
||||
gfx_display_d3d9_draw,
|
||||
gfx_display_d3d9_draw_pipeline,
|
||||
gfx_display_d3d9_viewport,
|
||||
gfx_display_d3d9_blend_begin,
|
||||
gfx_display_d3d9_blend_end,
|
||||
gfx_display_d3d9_get_default_mvp,
|
||||
|
@ -120,7 +120,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 void gfx_display_gdi_viewport(gfx_display_ctx_draw_t *draw, void *data) { }
|
||||
|
||||
static bool gfx_display_gdi_font_init_first(
|
||||
void **font_handle, void *video_data,
|
||||
@ -139,7 +138,6 @@ 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_viewport,
|
||||
gfx_display_gdi_blend_begin,
|
||||
gfx_display_gdi_blend_end,
|
||||
NULL, /* get_default_mvp */
|
||||
|
@ -135,13 +135,6 @@ static void gfx_display_gl_blend_end(void *data)
|
||||
glDisable(GL_BLEND);
|
||||
}
|
||||
|
||||
static void gfx_display_gl_viewport(gfx_display_ctx_draw_t *draw,
|
||||
void *data)
|
||||
{
|
||||
if (draw)
|
||||
glViewport(draw->x, draw->y, draw->width, draw->height);
|
||||
}
|
||||
|
||||
#ifdef MALI_BUG
|
||||
static bool
|
||||
gfx_display_gl_discard_draw_rectangle(gfx_display_ctx_draw_t *draw,
|
||||
@ -243,7 +236,7 @@ static void gfx_display_gl_draw(gfx_display_ctx_draw_t *draw,
|
||||
if (!draw->coords->lut_tex_coord)
|
||||
draw->coords->lut_tex_coord = &gl_tex_coords[0];
|
||||
|
||||
gfx_display_gl_viewport(draw, gl);
|
||||
glViewport(draw->x, draw->y, draw->width, draw->height);
|
||||
glBindTexture(GL_TEXTURE_2D, (GLuint)draw->texture);
|
||||
|
||||
gl->shader->set_coords(gl->shader_data, draw->coords);
|
||||
@ -389,7 +382,6 @@ static void gfx_display_gl_scissor_end(
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_gl = {
|
||||
gfx_display_gl_draw,
|
||||
gfx_display_gl_draw_pipeline,
|
||||
gfx_display_gl_viewport,
|
||||
gfx_display_gl_blend_begin,
|
||||
gfx_display_gl_blend_end,
|
||||
gfx_display_gl_get_default_mvp,
|
||||
|
@ -88,13 +88,6 @@ static void gfx_display_gl1_blend_end(void *data)
|
||||
glDisable(GL_BLEND);
|
||||
}
|
||||
|
||||
static void gfx_display_gl1_viewport(gfx_display_ctx_draw_t *draw,
|
||||
void *data)
|
||||
{
|
||||
if (draw)
|
||||
glViewport(draw->x, draw->y, draw->width, draw->height);
|
||||
}
|
||||
|
||||
static void gfx_display_gl1_draw(gfx_display_ctx_draw_t *draw,
|
||||
void *data,
|
||||
unsigned video_width,
|
||||
@ -115,7 +108,7 @@ static void gfx_display_gl1_draw(gfx_display_ctx_draw_t *draw,
|
||||
if (!draw->texture)
|
||||
return;
|
||||
|
||||
gfx_display_gl1_viewport(draw, gl1);
|
||||
glViewport(draw->x, draw->y, draw->width, draw->height);
|
||||
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
|
||||
@ -210,7 +203,6 @@ static void gfx_display_gl1_scissor_end(
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_gl1 = {
|
||||
gfx_display_gl1_draw,
|
||||
NULL,
|
||||
gfx_display_gl1_viewport,
|
||||
gfx_display_gl1_blend_begin,
|
||||
gfx_display_gl1_blend_end,
|
||||
gfx_display_gl1_get_default_mvp,
|
||||
|
@ -66,12 +66,6 @@ static const float *gfx_display_gl_core_get_default_tex_coords(void)
|
||||
return &gl_core_tex_coords[0];
|
||||
}
|
||||
|
||||
static void gfx_display_gl_core_viewport(gfx_display_ctx_draw_t *draw, void *data)
|
||||
{
|
||||
if (draw)
|
||||
glViewport(draw->x, draw->y, draw->width, draw->height);
|
||||
}
|
||||
|
||||
static void gfx_display_gl_core_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
void *data,
|
||||
unsigned video_width,
|
||||
@ -173,7 +167,7 @@ static void gfx_display_gl_core_draw(gfx_display_ctx_draw_t *draw,
|
||||
if (!color)
|
||||
color = &gl_core_colors[0];
|
||||
|
||||
gfx_display_gl_core_viewport(draw, gl);
|
||||
glViewport(draw->x, draw->y, draw->width, draw->height);
|
||||
|
||||
glActiveTexture(GL_TEXTURE1);
|
||||
glBindTexture(GL_TEXTURE_2D, texture);
|
||||
@ -331,7 +325,6 @@ static void gfx_display_gl_core_scissor_end(
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_gl_core = {
|
||||
gfx_display_gl_core_draw,
|
||||
gfx_display_gl_core_draw_pipeline,
|
||||
gfx_display_gl_core_viewport,
|
||||
gfx_display_gl_core_blend_begin,
|
||||
gfx_display_gl_core_blend_end,
|
||||
gfx_display_gl_core_get_default_mvp,
|
||||
|
@ -87,9 +87,6 @@ static void gfx_display_metal_draw_pipeline(
|
||||
[md.display drawPipeline:draw];
|
||||
}
|
||||
|
||||
static void gfx_display_metal_viewport(gfx_display_ctx_draw_t *draw,
|
||||
void *data) { }
|
||||
|
||||
static void gfx_display_metal_scissor_begin(
|
||||
void *data,
|
||||
unsigned video_width,
|
||||
@ -135,7 +132,6 @@ static bool gfx_display_metal_font_init_first(
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_metal = {
|
||||
.draw = gfx_display_metal_draw,
|
||||
.draw_pipeline = gfx_display_metal_draw_pipeline,
|
||||
.viewport = gfx_display_metal_viewport,
|
||||
.blend_begin = gfx_display_metal_blend_begin,
|
||||
.blend_end = gfx_display_metal_blend_end,
|
||||
.get_default_mvp = gfx_display_metal_get_default_mvp,
|
||||
|
@ -29,8 +29,6 @@ static void gfx_display_switch_draw(gfx_display_ctx_draw_t *draw,
|
||||
static void gfx_display_switch_draw_pipeline(
|
||||
gfx_display_ctx_draw_t *draw,
|
||||
void *data, unsigned video_width, unsigned video_height) { }
|
||||
static void gfx_display_switch_viewport(gfx_display_ctx_draw_t *draw,
|
||||
void *data) { }
|
||||
|
||||
static bool gfx_display_switch_font_init_first(
|
||||
void **font_handle, void *video_data,
|
||||
@ -60,7 +58,6 @@ 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_viewport,
|
||||
gfx_display_switch_blend_begin,
|
||||
gfx_display_switch_blend_end,
|
||||
NULL, /* get_default_mvp */
|
||||
|
@ -77,13 +77,6 @@ static void *gfx_display_vita2d_get_default_mvp(void *data)
|
||||
static void gfx_display_vita2d_blend_begin(void *data) { }
|
||||
static void gfx_display_vita2d_blend_end(void *data) { }
|
||||
|
||||
static void gfx_display_vita2d_viewport(gfx_display_ctx_draw_t *draw,
|
||||
void *data)
|
||||
{
|
||||
if (draw)
|
||||
vita2d_set_viewport(draw->x, draw->y, draw->width, draw->height);
|
||||
}
|
||||
|
||||
static void gfx_display_vita2d_draw(gfx_display_ctx_draw_t *draw,
|
||||
void *data, unsigned video_width, unsigned video_height)
|
||||
{
|
||||
@ -113,8 +106,7 @@ static void gfx_display_vita2d_draw(gfx_display_ctx_draw_t *draw,
|
||||
if (!color)
|
||||
color = &vita2d_colors[0];
|
||||
|
||||
gfx_display_vita2d_viewport(draw, vita2d);
|
||||
|
||||
vita2d_set_viewport(draw->x, draw->y, draw->width, draw->height);
|
||||
vita2d_texture_tint_vertex *vertices = (vita2d_texture_tint_vertex *)vita2d_pool_memalign(
|
||||
draw->coords->vertices * sizeof(vita2d_texture_tint_vertex),
|
||||
sizeof(vita2d_texture_tint_vertex));
|
||||
@ -182,7 +174,6 @@ static void gfx_display_vita2d_scissor_end(
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_vita2d = {
|
||||
gfx_display_vita2d_draw,
|
||||
gfx_display_vita2d_draw_pipeline,
|
||||
gfx_display_vita2d_viewport,
|
||||
gfx_display_vita2d_blend_begin,
|
||||
gfx_display_vita2d_blend_end,
|
||||
gfx_display_vita2d_get_default_mvp,
|
||||
|
@ -89,22 +89,6 @@ static unsigned to_menu_pipeline(
|
||||
}
|
||||
#endif
|
||||
|
||||
static void gfx_display_vk_viewport(gfx_display_ctx_draw_t *draw,
|
||||
void *data)
|
||||
{
|
||||
vk_t *vk = (vk_t*)data;
|
||||
|
||||
if (!vk || !draw)
|
||||
return;
|
||||
|
||||
vk->vk_vp.x = draw->x;
|
||||
vk->vk_vp.y = vk->context->swapchain_height - draw->y - draw->height;
|
||||
vk->vk_vp.width = draw->width;
|
||||
vk->vk_vp.height = draw->height;
|
||||
vk->vk_vp.minDepth = 0.0f;
|
||||
vk->vk_vp.maxDepth = 1.0f;
|
||||
}
|
||||
|
||||
static void gfx_display_vk_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
void *data, unsigned video_width, unsigned video_height)
|
||||
{
|
||||
@ -212,7 +196,12 @@ static void gfx_display_vk_draw(gfx_display_ctx_draw_t *draw,
|
||||
if (!color)
|
||||
color = &vk_colors[0];
|
||||
|
||||
gfx_display_vk_viewport(draw, vk);
|
||||
vk->vk_vp.x = draw->x;
|
||||
vk->vk_vp.y = vk->context->swapchain_height - draw->y - draw->height;
|
||||
vk->vk_vp.width = draw->width;
|
||||
vk->vk_vp.height = draw->height;
|
||||
vk->vk_vp.minDepth = 0.0f;
|
||||
vk->vk_vp.maxDepth = 1.0f;
|
||||
|
||||
vk->tracker.dirty |= VULKAN_DIRTY_DYNAMIC_BIT;
|
||||
|
||||
@ -347,7 +336,6 @@ static void gfx_display_vk_scissor_end(void *data,
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_vulkan = {
|
||||
gfx_display_vk_draw,
|
||||
gfx_display_vk_draw_pipeline,
|
||||
gfx_display_vk_viewport,
|
||||
gfx_display_vk_blend_begin,
|
||||
gfx_display_vk_blend_end,
|
||||
gfx_display_vk_get_default_mvp,
|
||||
|
@ -30,7 +30,6 @@
|
||||
|
||||
static void gfx_display_wiiu_blend_begin(void *data) { }
|
||||
static void gfx_display_wiiu_blend_end(void *data) { }
|
||||
static void gfx_display_wiiu_viewport(gfx_display_ctx_draw_t *draw, void *data) { }
|
||||
|
||||
static void gfx_display_wiiu_draw(gfx_display_ctx_draw_t *draw,
|
||||
void *data, unsigned video_width, unsigned video_height)
|
||||
@ -299,7 +298,6 @@ 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_viewport,
|
||||
gfx_display_wiiu_blend_begin,
|
||||
gfx_display_wiiu_blend_end,
|
||||
NULL, /* get_default_mvp */
|
||||
|
@ -46,7 +46,6 @@ static void gfx_display_null_draw(gfx_display_ctx_draw_t *draw,
|
||||
void *data, unsigned width, unsigned height) { }
|
||||
static void gfx_display_null_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
void *data, unsigned width, unsigned height) { }
|
||||
static void gfx_display_null_viewport(gfx_display_ctx_draw_t *draw, void *data) { }
|
||||
|
||||
static bool gfx_display_null_font_init_first(
|
||||
void **font_handle, void *video_data,
|
||||
@ -77,7 +76,6 @@ static const float *gfx_display_null_get_default_tex_coords(void)
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_null = {
|
||||
gfx_display_null_draw,
|
||||
gfx_display_null_draw_pipeline,
|
||||
gfx_display_null_viewport,
|
||||
gfx_display_null_blend_begin,
|
||||
gfx_display_null_blend_end,
|
||||
NULL, /* get_default_mvp */
|
||||
|
@ -115,7 +115,6 @@ typedef struct gfx_display_ctx_driver
|
||||
/* Draw one of the menu pipeline shaders. */
|
||||
void (*draw_pipeline)(gfx_display_ctx_draw_t *draw,
|
||||
void *data, unsigned video_width, unsigned video_height);
|
||||
void (*viewport)(gfx_display_ctx_draw_t *draw, void *data);
|
||||
/* Start blending operation. */
|
||||
void (*blend_begin)(void *data);
|
||||
/* Finish blending operation. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user