(D3D) Cleanups

This commit is contained in:
twinaphex 2015-11-10 22:46:45 +01:00
parent 442ebcc1b8
commit 028a390f8e

View File

@ -55,7 +55,30 @@
#endif
/* forward declarations */
static bool d3d_init_luts(d3d_video_t *d3d);
static bool d3d_init_luts(d3d_video_t *d3d)
{
unsigned i;
settings_t *settings = config_get_ptr();
if (!d3d->renderchain_driver->add_lut)
return true;
for (i = 0; i < d3d->shader.luts; i++)
{
bool ret = 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->video.smooth :
(d3d->shader.lut[i].filter == RARCH_FILTER_LINEAR));
if (!ret)
return ret;
}
return true;
}
static void d3d_set_font_rect(d3d_video_t *d3d,
const struct font_params *params);
static bool d3d_process_shader(d3d_video_t *d3d);
@ -942,7 +965,6 @@ static RECT d3d_monitor_rect(d3d_video_t *d3d)
#endif
#ifndef DONT_HAVE_STATE_TRACKER
#ifndef _XBOX
static bool d3d_init_imports(d3d_video_t *d3d)
{
state_tracker_t *state_tracker = NULL;
@ -950,6 +972,8 @@ static bool d3d_init_imports(d3d_video_t *d3d)
if (!d3d->shader.variables)
return true;
if (!d3d->renderchain_driver->add_state_tracker)
return true;
tracker_info.wram = (uint8_t*)
core.retro_get_memory_data(RETRO_MEMORY_SYSTEM_RAM);
@ -975,10 +999,10 @@ static bool d3d_init_imports(d3d_video_t *d3d)
}
d3d->renderchain_driver->add_state_tracker(d3d->renderchain_data, state_tracker);
return true;
}
#endif
#endif
static bool d3d_init_chain(d3d_video_t *d3d, const video_info_t *video_info)
{
@ -1306,28 +1330,6 @@ static bool d3d_process_shader(d3d_video_t *d3d)
return d3d_init_singlepass(d3d);
}
#ifndef _XBOX
static bool d3d_init_luts(d3d_video_t *d3d)
{
unsigned i;
settings_t *settings = config_get_ptr();
for (i = 0; i < d3d->shader.luts; i++)
{
bool ret = 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->video.smooth :
(d3d->shader.lut[i].filter == RARCH_FILTER_LINEAR));
if (!ret)
return ret;
}
return true;
}
#endif
#ifdef HAVE_OVERLAY
static void d3d_overlay_render(d3d_video_t *d3d, overlay_t *overlay)