mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Get rid of pointer grabbing for p_disp
This commit is contained in:
parent
95527fb566
commit
2e6393f082
@ -163,6 +163,7 @@ static void gfx_display_d3d10_draw(gfx_display_ctx_draw_t *draw,
|
||||
}
|
||||
|
||||
static void gfx_display_d3d10_draw_pipeline(gfx_display_ctx_draw_t* draw,
|
||||
gfx_display_t *p_disp,
|
||||
void *data, unsigned video_width, unsigned video_height)
|
||||
{
|
||||
d3d10_video_t* d3d10 = (d3d10_video_t*)data;
|
||||
@ -175,7 +176,6 @@ static void gfx_display_d3d10_draw_pipeline(gfx_display_ctx_draw_t* draw,
|
||||
case VIDEO_SHADER_MENU:
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
{
|
||||
gfx_display_t *p_disp = disp_get_ptr();
|
||||
video_coord_array_t* ca = &p_disp->dispca;
|
||||
|
||||
if (!d3d10->menu_pipeline_vbo)
|
||||
|
@ -162,6 +162,7 @@ static void gfx_display_d3d11_draw(gfx_display_ctx_draw_t *draw,
|
||||
}
|
||||
|
||||
static void gfx_display_d3d11_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
gfx_display_t *p_disp,
|
||||
void *data, unsigned video_width, unsigned video_height)
|
||||
{
|
||||
d3d11_video_t *d3d11 = (d3d11_video_t*)data;
|
||||
@ -174,7 +175,6 @@ static void gfx_display_d3d11_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
case VIDEO_SHADER_MENU:
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
{
|
||||
gfx_display_t *p_disp = disp_get_ptr();
|
||||
video_coord_array_t* ca = &p_disp->dispca;
|
||||
|
||||
if (!d3d11->menu_pipeline_vbo)
|
||||
|
@ -179,6 +179,7 @@ static void gfx_display_d3d12_draw(gfx_display_ctx_draw_t *draw,
|
||||
}
|
||||
|
||||
static void gfx_display_d3d12_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
gfx_display_t *p_disp,
|
||||
void *data, unsigned video_width, unsigned video_height)
|
||||
{
|
||||
d3d12_video_t *d3d12 = (d3d12_video_t*)data;
|
||||
@ -191,7 +192,6 @@ static void gfx_display_d3d12_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
case VIDEO_SHADER_MENU:
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
{
|
||||
gfx_display_t *p_disp = disp_get_ptr();
|
||||
video_coord_array_t* ca = &p_disp->dispca;
|
||||
|
||||
if (!d3d12->menu_pipeline_vbo)
|
||||
|
@ -212,12 +212,12 @@ static void gfx_display_d3d9_draw(gfx_display_ctx_draw_t *draw,
|
||||
}
|
||||
|
||||
static void gfx_display_d3d9_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
gfx_display_t *p_disp,
|
||||
void *data, unsigned video_width, unsigned video_height)
|
||||
{
|
||||
#if defined(HAVE_HLSL) || defined(HAVE_CG)
|
||||
static float t = 0;
|
||||
video_coord_array_t *ca = NULL;
|
||||
gfx_display_t *p_disp = disp_get_ptr();
|
||||
|
||||
if (!draw)
|
||||
return;
|
||||
|
@ -253,6 +253,7 @@ static void gfx_display_gl_draw(gfx_display_ctx_draw_t *draw,
|
||||
|
||||
static void gfx_display_gl_draw_pipeline(
|
||||
gfx_display_ctx_draw_t *draw,
|
||||
gfx_display_t *p_disp,
|
||||
void *data,
|
||||
unsigned video_width,
|
||||
unsigned video_height)
|
||||
@ -261,7 +262,6 @@ static void gfx_display_gl_draw_pipeline(
|
||||
struct uniform_info uniform_param;
|
||||
gl_t *gl = (gl_t*)data;
|
||||
static float t = 0;
|
||||
gfx_display_t *p_disp = disp_get_ptr();
|
||||
video_coord_array_t *ca = &p_disp->dispca;
|
||||
|
||||
draw->x = 0;
|
||||
|
@ -202,7 +202,7 @@ static void gfx_display_gl1_scissor_end(
|
||||
|
||||
gfx_display_ctx_driver_t gfx_display_ctx_gl1 = {
|
||||
gfx_display_gl1_draw,
|
||||
NULL,
|
||||
NULL, /* draw_pipeline */
|
||||
gfx_display_gl1_blend_begin,
|
||||
gfx_display_gl1_blend_end,
|
||||
gfx_display_gl1_get_default_mvp,
|
||||
|
@ -66,7 +66,9 @@ static const float *gfx_display_gl_core_get_default_tex_coords(void)
|
||||
return &gl_core_tex_coords[0];
|
||||
}
|
||||
|
||||
static void gfx_display_gl_core_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
static void gfx_display_gl_core_draw_pipeline(
|
||||
gfx_display_ctx_draw_t *draw,
|
||||
gfx_display_t *p_disp,
|
||||
void *data,
|
||||
unsigned video_width,
|
||||
unsigned video_height)
|
||||
@ -78,7 +80,6 @@ static void gfx_display_gl_core_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
static float t = 0.0f;
|
||||
float yflip = 0.0f;
|
||||
video_coord_array_t *ca = NULL;
|
||||
gfx_display_t *p_disp = disp_get_ptr();
|
||||
gl_core_t *gl = (gl_core_t*)data;
|
||||
|
||||
if (!gl || !draw)
|
||||
|
@ -76,6 +76,7 @@ static void gfx_display_metal_draw(gfx_display_ctx_draw_t *draw,
|
||||
|
||||
static void gfx_display_metal_draw_pipeline(
|
||||
gfx_display_ctx_draw_t *draw,
|
||||
gfx_display_t *p_disp,
|
||||
void *data,
|
||||
unsigned video_width,
|
||||
unsigned video_height)
|
||||
|
@ -88,15 +88,16 @@ static unsigned to_menu_pipeline(
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void gfx_display_vk_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
static void gfx_display_vk_draw_pipeline(
|
||||
gfx_display_ctx_draw_t *draw,
|
||||
gfx_display_t *p_disp,
|
||||
void *data, unsigned video_width, unsigned video_height)
|
||||
{
|
||||
static uint8_t ubo_scratch_data[768];
|
||||
static float t = 0.0f;
|
||||
gfx_display_t *p_disp = disp_get_ptr();
|
||||
float yflip = 1.0f;
|
||||
static struct video_coords blank_coords;
|
||||
static float t = 0.0f;
|
||||
float output_size[2];
|
||||
float yflip = 1.0f;
|
||||
video_coord_array_t *ca = NULL;
|
||||
vk_t *vk = (vk_t*)data;
|
||||
|
||||
|
@ -207,11 +207,12 @@ static void gfx_display_wiiu_draw(gfx_display_ctx_draw_t *draw,
|
||||
sizeof(*wiiu->vertex_cache.v), wiiu->vertex_cache.v);
|
||||
}
|
||||
|
||||
static void gfx_display_wiiu_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
static void gfx_display_wiiu_draw_pipeline(
|
||||
gfx_display_ctx_draw_t *draw,
|
||||
gfx_display_t *p_disp,
|
||||
void *data, unsigned video_width, unsigned video_height)
|
||||
{
|
||||
video_coord_array_t *ca = NULL;
|
||||
gfx_display_t *p_disp = disp_get_ptr();
|
||||
wiiu_video_t *wiiu = (wiiu_video_t*)data;
|
||||
|
||||
if (!wiiu || !draw)
|
||||
|
@ -112,6 +112,7 @@ typedef struct gfx_display_frame_info
|
||||
|
||||
typedef struct gfx_display_ctx_draw gfx_display_ctx_draw_t;
|
||||
|
||||
typedef struct gfx_display gfx_display_t;
|
||||
|
||||
typedef struct gfx_display_ctx_driver
|
||||
{
|
||||
@ -120,6 +121,7 @@ typedef struct gfx_display_ctx_driver
|
||||
void *data, unsigned video_width, unsigned video_height);
|
||||
/* Draw one of the menu pipeline shaders. */
|
||||
void (*draw_pipeline)(gfx_display_ctx_draw_t *draw,
|
||||
gfx_display_t *p_disp,
|
||||
void *data, unsigned video_width, unsigned video_height);
|
||||
/* Start blending operation. */
|
||||
void (*blend_begin)(void *data);
|
||||
@ -221,8 +223,6 @@ struct gfx_display
|
||||
bool framebuf_dirty;
|
||||
};
|
||||
|
||||
typedef struct gfx_display gfx_display_t;
|
||||
|
||||
void gfx_display_free(void);
|
||||
|
||||
void gfx_display_init(void);
|
||||
|
@ -4142,7 +4142,8 @@ static void xmb_draw_bg(
|
||||
}
|
||||
|
||||
if (dispctx && dispctx->draw_pipeline)
|
||||
dispctx->draw_pipeline(&draw, userdata, video_width, video_height);
|
||||
dispctx->draw_pipeline(&draw, p_disp,
|
||||
userdata, video_width, video_height);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user