This commit is contained in:
twinaphex 2018-02-16 19:08:16 +01:00
parent d19aebc0bf
commit a0ba515337
15 changed files with 34 additions and 30 deletions

View File

@ -2816,7 +2816,7 @@ static void xmb_draw_bg(
break;
}
menu_display_draw_pipeline(&draw);
menu_display_draw_pipeline(&draw, video_info);
}
else
#endif

View File

@ -43,7 +43,7 @@ static void menu_display_caca_draw(void *data, video_frame_info_t *video_info)
(void)data;
}
static void menu_display_caca_draw_pipeline(void *data)
static void menu_display_caca_draw_pipeline(void *data, video_frame_info_t *video_info)
{
(void)data;
}

View File

@ -157,7 +157,7 @@ static void menu_display_ctr_draw(void *data, video_frame_info_t *video_info)
#endif
}
static void menu_display_ctr_draw_pipeline(void *data)
static void menu_display_ctr_draw_pipeline(void *data, video_frame_info_t *video_info)
{
}

View File

@ -112,14 +112,12 @@ static void menu_display_d3d_bind_texture(void *data)
if (!d3d || !draw || !draw->texture)
return;
d3d_set_texture(d3d->dev, 0, (void*)draw->texture);
d3d_set_sampler_address_u(d3d->dev, 0, D3DTADDRESS_COMM_CLAMP);
d3d_set_sampler_address_v(d3d->dev, 0, D3DTADDRESS_COMM_CLAMP);
d3d_set_sampler_minfilter(d3d->dev, 0, D3DTEXF_COMM_LINEAR);
d3d_set_sampler_magfilter(d3d->dev, 0, D3DTEXF_COMM_LINEAR);
d3d_set_sampler_mipfilter(d3d->dev, 0, D3DTEXF_COMM_LINEAR);
}
static void menu_display_d3d_draw(void *data, video_frame_info_t *video_info)
@ -228,7 +226,8 @@ static void menu_display_d3d_draw(void *data, video_frame_info_t *video_info)
d3d->menu_display.offset += draw->coords->vertices;
}
static void menu_display_d3d_draw_pipeline(void *data)
static void menu_display_d3d_draw_pipeline(void *data,
video_frame_info_t *video_info)
{
#if defined(HAVE_HLSL) || defined(HAVE_CG)
menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data;

View File

@ -172,10 +172,11 @@ static void menu_display_d3d11_draw(void* data, video_frame_info_t *video_info)
return;
}
static void menu_display_d3d11_draw_pipeline(void* data)
static void menu_display_d3d11_draw_pipeline(void* data,
video_frame_info_t *video_info)
{
menu_display_ctx_draw_t* draw = (menu_display_ctx_draw_t*)data;
d3d11_video_t* d3d11 = (d3d11_video_t*)video_driver_get_ptr(false);
d3d11_video_t* d3d11 = video_info ? (d3d11_video_t*)video_info->userdata : NULL;
if (!d3d11 || !draw)
return;

View File

@ -184,10 +184,12 @@ static void menu_display_d3d12_draw(void* data, video_frame_info_t *video_info)
return;
}
static void menu_display_d3d12_draw_pipeline(void* data)
static void menu_display_d3d12_draw_pipeline(void* data,
video_frame_info_t *video_info)
{
menu_display_ctx_draw_t* draw = (menu_display_ctx_draw_t*)data;
d3d12_video_t* d3d12 = (d3d12_video_t*)video_driver_get_ptr(false);
menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data;
d3d12_video_t *d3d12 = video_info ?
(d3d12_video_t*)video_info->userdata : NULL;
if (!d3d12 || !draw)
return;

View File

@ -47,7 +47,7 @@ static void menu_display_gdi_draw(void *data, video_frame_info_t *video_info)
(void)data;
}
static void menu_display_gdi_draw_pipeline(void *data)
static void menu_display_gdi_draw_pipeline(void *data, video_frame_info_t *video_info)
{
(void)data;
}

View File

@ -152,7 +152,8 @@ static void menu_display_gl_draw(void *data, video_frame_info_t *video_info)
gl->coords.color = gl->white_color_ptr;
}
static void menu_display_gl_draw_pipeline(void *data)
static void menu_display_gl_draw_pipeline(void *data,
video_frame_info_t *video_info)
{
#ifdef HAVE_SHADERPIPELINE
video_shader_ctx_info_t shader_info;
@ -161,10 +162,10 @@ static void menu_display_gl_draw_pipeline(void *data)
menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data;
video_coord_array_t *ca = menu_display_get_coords_array();
draw->x = 0;
draw->y = 0;
draw->coords = (struct video_coords*)(&ca->coords);
draw->matrix_data = NULL;
draw->x = 0;
draw->y = 0;
draw->coords = (struct video_coords*)(&ca->coords);
draw->matrix_data = NULL;
switch (draw->pipeline.id)
{

View File

@ -41,7 +41,7 @@ static void menu_display_null_draw(void *data, video_frame_info_t *video_info)
(void)data;
}
static void menu_display_null_draw_pipeline(void *data)
static void menu_display_null_draw_pipeline(void *data, video_frame_info_t *video_info)
{
(void)data;
}

View File

@ -43,7 +43,7 @@ static void menu_display_vga_draw(void *data, video_frame_info_t *video_info)
(void)data;
}
static void menu_display_vga_draw_pipeline(void *data)
static void menu_display_vga_draw_pipeline(void *data, video_frame_info_t *video_info)
{
(void)data;
}

View File

@ -198,7 +198,7 @@ static void menu_display_vita2d_draw(void *data,
}
}
static void menu_display_vita2d_draw_pipeline(void *data)
static void menu_display_vita2d_draw_pipeline(void *data, video_frame_info_t *video_info)
{
#ifdef HAVE_SHADERPIPELINE

View File

@ -115,13 +115,13 @@ static void menu_display_vk_viewport(void *data)
vk->vk_vp.maxDepth = 1.0f;
}
static void menu_display_vk_draw_pipeline(void *data)
static void menu_display_vk_draw_pipeline(void *data, video_frame_info_t *video_info)
{
#ifdef HAVE_SHADERPIPELINE
float output_size[2];
menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data;
vk_t *vk = (vk_t*)video_driver_get_ptr(false);
video_coord_array_t *ca = NULL;
vk_t *vk = video_info ? (vk_t*)video_info->userdata : NULL;
static uint8_t ubo_scratch_data[768];
static float t = 0.0f;

View File

@ -237,12 +237,11 @@ static void menu_display_wiiu_draw(void *data, video_frame_info_t *video_info)
sizeof(*wiiu->vertex_cache.v), wiiu->vertex_cache.v);
}
static void menu_display_wiiu_draw_pipeline(void *data)
static void menu_display_wiiu_draw_pipeline(void *data, video_frame_info_t *video_info)
{
menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data;
wiiu_video_t *wiiu = (wiiu_video_t*)video_driver_get_ptr(false);
video_coord_array_t *ca = NULL;
video_coord_array_t *ca = NULL;
wiiu_video_t *wiiu = video_info ? (wiiu_video_t*)video_info->userdata : NULL;
if (!wiiu || !draw)
return;

View File

@ -595,10 +595,11 @@ void menu_display_draw(menu_display_ctx_draw_t *draw,
menu_disp->draw(draw, video_info);
}
void menu_display_draw_pipeline(menu_display_ctx_draw_t *draw)
void menu_display_draw_pipeline(menu_display_ctx_draw_t *draw,
video_frame_info_t *video_info)
{
if (menu_disp && draw && menu_disp->draw_pipeline)
menu_disp->draw_pipeline(draw);
menu_disp->draw_pipeline(draw, video_info);
}
void menu_display_draw_bg(menu_display_ctx_draw_t *draw,

View File

@ -322,7 +322,7 @@ typedef struct menu_display_ctx_driver
/* Draw graphics to the screen. */
void (*draw)(void *data, video_frame_info_t *video_info);
/* Draw one of the menu pipeline shaders. */
void (*draw_pipeline)(void *data);
void (*draw_pipeline)(void *data, video_frame_info_t *video_info);
void (*viewport)(void *data);
/* Start blending operation. */
void (*blend_begin)(video_frame_info_t *video_info);
@ -677,7 +677,8 @@ bool menu_display_restore_clear_color(void);
void menu_display_clear_color(menu_display_ctx_clearcolor_t *color);
void menu_display_draw(menu_display_ctx_draw_t *draw, video_frame_info_t *video_info);
void menu_display_draw_pipeline(menu_display_ctx_draw_t *draw);
void menu_display_draw_pipeline(menu_display_ctx_draw_t *draw,
video_frame_info_t *video_info);
void menu_display_draw_bg(
menu_display_ctx_draw_t *draw,
video_frame_info_t *video_info,