mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-19 16:59:50 +00:00
Cleanups
This commit is contained in:
parent
13e0bd1932
commit
40a7755fe2
@ -171,6 +171,8 @@ typedef struct gl
|
||||
#ifdef HAVE_GL_SYNC
|
||||
GLsync fences[MAX_FENCES];
|
||||
#endif
|
||||
const gl_renderchain_driver_t *renderchain_driver;
|
||||
void *renderchain_data;
|
||||
} gl_t;
|
||||
|
||||
bool gl_load_luts(const struct video_shader *generic_shader,
|
||||
|
@ -68,38 +68,14 @@
|
||||
|
||||
static LPDIRECT3D g_pD3D;
|
||||
|
||||
static bool d3d_init_luts(d3d_video_t *d3d)
|
||||
{
|
||||
unsigned i;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!d3d->renderchain_driver || !d3d->renderchain_driver->add_lut)
|
||||
return true;
|
||||
|
||||
for (i = 0; i < d3d->shader.luts; i++)
|
||||
{
|
||||
if (!d3d->renderchain_driver->add_lut(
|
||||
d3d->renderchain_data,
|
||||
d3d->shader.lut[i].id, d3d->shader.lut[i].path,
|
||||
d3d->shader.lut[i].filter == RARCH_FILTER_UNSPEC ?
|
||||
settings->bools.video_smooth :
|
||||
(d3d->shader.lut[i].filter == RARCH_FILTER_LINEAR)))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool d3d_init_imports(d3d_video_t *d3d)
|
||||
{
|
||||
retro_ctx_memory_info_t mem_info;
|
||||
state_tracker_t *state_tracker = NULL;
|
||||
state_tracker_t *state_tracker = NULL;
|
||||
struct state_tracker_info tracker_info = {0};
|
||||
|
||||
if (!d3d->shader.variables)
|
||||
return true;
|
||||
if (!d3d->renderchain_driver || !d3d->renderchain_driver->add_state_tracker)
|
||||
return true;
|
||||
|
||||
mem_info.id = RETRO_MEMORY_SYSTEM_RAM;
|
||||
|
||||
@ -205,15 +181,36 @@ static bool d3d_init_chain(d3d_video_t *d3d, const video_info_t *video_info)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!d3d_init_luts(d3d))
|
||||
if (d3d->renderchain_driver)
|
||||
{
|
||||
RARCH_ERR("[D3D]: Failed to init LUTs.\n");
|
||||
return false;
|
||||
}
|
||||
if (!d3d_init_imports(d3d))
|
||||
{
|
||||
RARCH_ERR("[D3D]: Failed to init imports.\n");
|
||||
return false;
|
||||
if (d3d->renderchain_driver->add_lut)
|
||||
{
|
||||
unsigned i;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
for (i = 0; i < d3d->shader.luts; i++)
|
||||
{
|
||||
if (!d3d->renderchain_driver->add_lut(
|
||||
d3d->renderchain_data,
|
||||
d3d->shader.lut[i].id, d3d->shader.lut[i].path,
|
||||
d3d->shader.lut[i].filter == RARCH_FILTER_UNSPEC ?
|
||||
settings->bools.video_smooth :
|
||||
(d3d->shader.lut[i].filter == RARCH_FILTER_LINEAR)))
|
||||
{
|
||||
RARCH_ERR("[D3D]: Failed to init LUTs.\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (d3d->renderchain_driver->add_state_tracker)
|
||||
{
|
||||
if (!d3d_init_imports(d3d))
|
||||
{
|
||||
RARCH_ERR("[D3D]: Failed to init imports.\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user