(D3D) Cleanups pt. 6

This commit is contained in:
twinaphex 2015-04-05 01:05:51 +02:00
parent b6c862c76b
commit cf4975b059
3 changed files with 25 additions and 17 deletions

View File

@ -63,8 +63,9 @@ bool renderchain_init(void *data, const video_info_t *video_info,
LPDIRECT3DDEVICE dev_,
void *shader_context,
const D3DVIEWPORT *final_viewport_,
const LinkInfo *info, PixelFormat fmt)
const void *info_data, PixelFormat fmt)
{
const LinkInfo *info = (const LinkInfo*)info_data;
renderchain_t *chain = (renderchain_t*)data;
CGcontext cgCtx_ = (CGcontext)shader_context;
@ -251,9 +252,10 @@ bool renderchain_add_lut(void *data, const std::string &id,
return true;
}
void renderchain_add_state_tracker(void *data, state_tracker_t *tracker)
void renderchain_add_state_tracker(void *data, void *tracker_data)
{
renderchain_t *chain = (renderchain_t*)data;
state_tracker_t *tracker = (state_tracker_t*)tracker_data;
renderchain_t *chain = (renderchain_t*)data;
if (chain->tracker)
state_tracker_free(chain->tracker);
chain->tracker = tracker;
@ -658,8 +660,9 @@ void renderchain_render_pass(void *data, void *pass_data, unsigned pass_index)
renderchain_unbind_all(chain);
}
void renderchain_log_info(void *data, const LinkInfo *info)
void renderchain_log_info(void *data, const void *info_data)
{
const LinkInfo *info = (const LinkInfo*)info_data;
RARCH_LOG("[D3D]: Render pass info:\n");
RARCH_LOG("\tTexture width: %u\n", info->tex_w);
RARCH_LOG("\tTexture height: %u\n", info->tex_h);

View File

@ -108,7 +108,7 @@ bool renderchain_init(void *data, const video_info_t *video_info,
LPDIRECT3DDEVICE dev_,
void *shader_data,
const D3DVIEWPORT *final_viewport_,
const LinkInfo *info,
const void *info_data,
PixelFormat fmt);
void renderchain_clear(void *data);
@ -125,7 +125,7 @@ bool renderchain_add_lut(void *data, const std::string &id,
const std::string &path,
bool smooth);
void renderchain_add_state_tracker(void *data, state_tracker_t *tracker);
void renderchain_add_state_tracker(void *data, void *tracker_data);
void renderchain_start_render(void *data);
@ -165,7 +165,7 @@ void renderchain_blit_to_texture(void *data, const void *frame,
void renderchain_render_pass(void *data, void *pass_data, unsigned pass_index);
void renderchain_log_info(void *data, const LinkInfo *info);
void renderchain_log_info(void *data, const void *info_data);
void renderchain_unbind_all(void *data);
@ -185,17 +185,17 @@ void renderchain_set_shader_params(void *data, void *pass_data,
unsigned tex_w, unsigned tex_h,
unsigned viewport_w, unsigned viewport_h);
void renderchain_bind_tracker(void *data, Pass *pass, unsigned pass_index);
void renderchain_bind_tracker(void *data, void *pass_data, unsigned pass_index);
bool renderchain_init_shader_fvf(void *data, void *pass_data);
void renderchain_bind_orig(void *data, Pass *pass);
void renderchain_bind_orig(void *data, void *pass_data);
void renderchain_bind_prev(void *data, Pass *pass);
void renderchain_bind_prev(void *data, void *pass_data);
void renderchain_bind_luts(void *data, Pass *pass);
void renderchain_bind_luts(void *data, void *pass_data);
void renderchain_bind_pass(void *data, Pass *pass, unsigned pass_index);
void renderchain_bind_pass(void *data, void *pass_data, unsigned pass_index);
#endif

View File

@ -220,9 +220,10 @@ void renderchain_set_shader_params(void *data, void *pass_data,
}
void renderchain_bind_tracker(void *data, Pass *pass, unsigned pass_index)
void renderchain_bind_tracker(void *data, void *pass_data, unsigned pass_index)
{
unsigned i;
Pass *pass = (Pass*)pass_data;
renderchain_t *chain = (renderchain_t*)data;
if (!chain->tracker)
return;
@ -376,10 +377,11 @@ bool renderchain_init_shader_fvf(void *data, void *pass_data)
return true;
}
void renderchain_bind_orig(void *data, Pass *pass)
void renderchain_bind_orig(void *data, void *pass_data)
{
unsigned index;
D3DXVECTOR2 video_size, texture_size;
Pass *pass = (Pass*)pass_data;
renderchain_t *chain = (renderchain_t*)data;
video_size.x = chain->passes[0].last_width;
video_size.y = chain->passes[0].last_height;
@ -414,11 +416,12 @@ void renderchain_bind_orig(void *data, Pass *pass)
}
}
void renderchain_bind_prev(void *data, Pass *pass)
void renderchain_bind_prev(void *data, void *pass_data)
{
unsigned i, index;
char attr_texture[64], attr_input_size[64], attr_tex_size[64], attr_coord[64];
D3DXVECTOR2 texture_size;
Pass *pass = (Pass*)pass_data;
renderchain_t *chain = (renderchain_t*)data;
static const char *prev_names[] = {
"PREV",
@ -481,9 +484,10 @@ void renderchain_bind_prev(void *data, Pass *pass)
}
}
void renderchain_bind_luts(void *data, Pass *pass)
void renderchain_bind_luts(void *data, void *pass_data)
{
unsigned i, index;
Pass *pass = (Pass*)pass_data;
renderchain_t *chain = (renderchain_t*)data;
for (i = 0; i < chain->luts.size(); i++)
@ -531,9 +535,10 @@ void renderchain_bind_luts(void *data, Pass *pass)
}
}
void renderchain_bind_pass(void *data, Pass *pass, unsigned pass_index)
void renderchain_bind_pass(void *data, void *pass_data, unsigned pass_index)
{
unsigned i, index;
Pass *pass = (Pass*)pass_data;
renderchain_t *chain = (renderchain_t*)data;
if (pass_index < 3)