mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
(Renderchain) Take out public function prototypes
This commit is contained in:
parent
939b0847ed
commit
7609c567c9
@ -974,6 +974,49 @@ static bool renderchain_set_pass_size(void *data, unsigned pass_index,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void renderchain_convert_geometry(
|
||||||
|
void *data, const void *info_data,
|
||||||
|
unsigned *out_width, unsigned *out_height,
|
||||||
|
unsigned width, unsigned height,
|
||||||
|
D3DVIEWPORT *final_viewport)
|
||||||
|
{
|
||||||
|
const LinkInfo *info = (const LinkInfo*)info_data;
|
||||||
|
cg_renderchain_t *chain = (cg_renderchain_t*)data;
|
||||||
|
|
||||||
|
if (!chain || !info)
|
||||||
|
return;
|
||||||
|
|
||||||
|
switch (info->pass->fbo.type_x)
|
||||||
|
{
|
||||||
|
case RARCH_SCALE_VIEWPORT:
|
||||||
|
*out_width = info->pass->fbo.scale_x * final_viewport->Width;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RARCH_SCALE_ABSOLUTE:
|
||||||
|
*out_width = info->pass->fbo.abs_x;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RARCH_SCALE_INPUT:
|
||||||
|
*out_width = info->pass->fbo.scale_x * width;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (info->pass->fbo.type_y)
|
||||||
|
{
|
||||||
|
case RARCH_SCALE_VIEWPORT:
|
||||||
|
*out_height = info->pass->fbo.scale_y * final_viewport->Height;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RARCH_SCALE_ABSOLUTE:
|
||||||
|
*out_height = info->pass->fbo.abs_y;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RARCH_SCALE_INPUT:
|
||||||
|
*out_height = info->pass->fbo.scale_y * height;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void d3d_recompute_pass_sizes(d3d_video_t *d3d,
|
static void d3d_recompute_pass_sizes(d3d_video_t *d3d,
|
||||||
void *renderchain_data)
|
void *renderchain_data)
|
||||||
{
|
{
|
||||||
@ -1436,49 +1479,6 @@ bool renderchain_render(void *chain_data, const void *data,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void renderchain_convert_geometry(
|
|
||||||
void *data, const void *info_data,
|
|
||||||
unsigned *out_width, unsigned *out_height,
|
|
||||||
unsigned width, unsigned height,
|
|
||||||
D3DVIEWPORT *final_viewport)
|
|
||||||
{
|
|
||||||
const LinkInfo *info = (const LinkInfo*)info_data;
|
|
||||||
cg_renderchain_t *chain = (cg_renderchain_t*)data;
|
|
||||||
|
|
||||||
if (!chain || !info)
|
|
||||||
return;
|
|
||||||
|
|
||||||
switch (info->pass->fbo.type_x)
|
|
||||||
{
|
|
||||||
case RARCH_SCALE_VIEWPORT:
|
|
||||||
*out_width = info->pass->fbo.scale_x * final_viewport->Width;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case RARCH_SCALE_ABSOLUTE:
|
|
||||||
*out_width = info->pass->fbo.abs_x;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case RARCH_SCALE_INPUT:
|
|
||||||
*out_width = info->pass->fbo.scale_x * width;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (info->pass->fbo.type_y)
|
|
||||||
{
|
|
||||||
case RARCH_SCALE_VIEWPORT:
|
|
||||||
*out_height = info->pass->fbo.scale_y * final_viewport->Height;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case RARCH_SCALE_ABSOLUTE:
|
|
||||||
*out_height = info->pass->fbo.abs_y;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case RARCH_SCALE_INPUT:
|
|
||||||
*out_height = info->pass->fbo.scale_y * height;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
renderchain_driver_t cg_d3d9_renderchain = {
|
renderchain_driver_t cg_d3d9_renderchain = {
|
||||||
renderchain_free,
|
renderchain_free,
|
||||||
renderchain_new,
|
renderchain_new,
|
||||||
|
@ -70,44 +70,6 @@ extern renderchain_driver_t cg_d3d9_renderchain;
|
|||||||
extern renderchain_driver_t xdk_renderchain;
|
extern renderchain_driver_t xdk_renderchain;
|
||||||
extern renderchain_driver_t null_renderchain;
|
extern renderchain_driver_t null_renderchain;
|
||||||
|
|
||||||
void renderchain_free(void *data);
|
|
||||||
|
|
||||||
void *renderchain_new(void);
|
|
||||||
|
|
||||||
void renderchain_deinit(void *data);
|
|
||||||
|
|
||||||
void renderchain_deinit_shader(void);
|
|
||||||
|
|
||||||
bool renderchain_init_shader(void *data);
|
|
||||||
|
|
||||||
bool renderchain_init(void *data,
|
|
||||||
const video_info_t *video_info,
|
|
||||||
void *dev_data,
|
|
||||||
const void *final_viewport_data,
|
|
||||||
const void *info_data,
|
|
||||||
unsigned fmt);
|
|
||||||
|
|
||||||
void renderchain_set_final_viewport(void *data,
|
|
||||||
void *renderchain_data, const void *viewport_data);
|
|
||||||
|
|
||||||
bool renderchain_add_pass(void *data, const void *info_data);
|
|
||||||
|
|
||||||
bool renderchain_add_lut(void *data,
|
|
||||||
const char *id, const char *path,
|
|
||||||
bool smooth);
|
|
||||||
|
|
||||||
void renderchain_add_state_tracker(void *data, void *tracker_data);
|
|
||||||
|
|
||||||
bool renderchain_render(void *chain_data, const void *data,
|
|
||||||
unsigned width, unsigned height, unsigned pitch, unsigned rotation);
|
|
||||||
|
|
||||||
void renderchain_convert_geometry(void *data, const void *info_data,
|
|
||||||
unsigned *out_width, unsigned *out_height,
|
|
||||||
unsigned width, unsigned height,
|
|
||||||
D3DVIEWPORT *final_viewport);
|
|
||||||
|
|
||||||
bool renderchain_init_shader_fvf(void *data, void *pass_data);
|
|
||||||
|
|
||||||
bool renderchain_init_first(const renderchain_driver_t **renderchain_driver,
|
bool renderchain_init_first(const renderchain_driver_t **renderchain_driver,
|
||||||
void **renderchain_handle);
|
void **renderchain_handle);
|
||||||
|
|
||||||
|
@ -53,6 +53,29 @@ static void renderchain_clear(void *data)
|
|||||||
d3d_vertex_buffer_free(d3d->vertex_buf, d3d->vertex_decl);
|
d3d_vertex_buffer_free(d3d->vertex_buf, d3d->vertex_decl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool renderchain_init_shader_fvf(void *data, void *pass_data)
|
||||||
|
{
|
||||||
|
d3d_video_t *chain = (d3d_video_t*)data;
|
||||||
|
d3d_video_t *pass = (d3d_video_t*)data;
|
||||||
|
LPDIRECT3DDEVICE d3dr = (LPDIRECT3DDEVICE)chain->dev;
|
||||||
|
|
||||||
|
(void)pass_data;
|
||||||
|
|
||||||
|
#if defined(_XBOX360)
|
||||||
|
static const D3DVERTEXELEMENT VertexElements[] =
|
||||||
|
{
|
||||||
|
{ 0, 0 * sizeof(float), D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0 },
|
||||||
|
{ 0, 2 * sizeof(float), D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0 },
|
||||||
|
D3DDECL_END()
|
||||||
|
};
|
||||||
|
|
||||||
|
if (FAILED(d3dr->CreateVertexDeclaration(VertexElements, &pass->vertex_decl)))
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
static bool renderchain_create_first_pass(void *data,
|
static bool renderchain_create_first_pass(void *data,
|
||||||
const video_info_t *info)
|
const video_info_t *info)
|
||||||
{
|
{
|
||||||
@ -339,39 +362,18 @@ bool renderchain_render(void *data, const void *frame,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool renderchain_init_shader_fvf(void *data, void *pass_data)
|
bool renderchain_add_lut(void *data,
|
||||||
{
|
const char *id, const char *path, bool smooth)
|
||||||
d3d_video_t *chain = (d3d_video_t*)data;
|
|
||||||
d3d_video_t *pass = (d3d_video_t*)data;
|
|
||||||
LPDIRECT3DDEVICE d3dr = (LPDIRECT3DDEVICE)chain->dev;
|
|
||||||
|
|
||||||
(void)pass_data;
|
|
||||||
|
|
||||||
#if defined(_XBOX360)
|
|
||||||
static const D3DVERTEXELEMENT VertexElements[] =
|
|
||||||
{
|
|
||||||
{ 0, 0 * sizeof(float), D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0 },
|
|
||||||
{ 0, 2 * sizeof(float), D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0 },
|
|
||||||
D3DDECL_END()
|
|
||||||
};
|
|
||||||
|
|
||||||
if (FAILED(d3dr->CreateVertexDeclaration(VertexElements, &pass->vertex_decl)))
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void renderchain_add_lut(void *data,
|
|
||||||
unsigned index, unsigned i)
|
|
||||||
{
|
{
|
||||||
xdk_renderchain_t *chain = (xdk_renderchain_t*)data;
|
xdk_renderchain_t *chain = (xdk_renderchain_t*)data;
|
||||||
|
|
||||||
(void)data;
|
(void)data;
|
||||||
(void)index;
|
(void)id;
|
||||||
(void)i;
|
(void)path;
|
||||||
|
(void)smooth;
|
||||||
|
|
||||||
/* stub */
|
/* stub */
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool renderchain_add_pass(void *data, const void *info_data)
|
bool renderchain_add_pass(void *data, const void *info_data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user