mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-25 08:59:58 +00:00
Start hooking up set_shader_mvp function
This commit is contained in:
parent
6afd100d2f
commit
2d540264e8
@ -51,7 +51,9 @@ typedef struct d3d9_renderchain_driver
|
||||
bool (*add_lut)(void *data,
|
||||
const char *id, const char *path,
|
||||
bool smooth);
|
||||
bool (*render)(d3d9_video_t *d3d, state_tracker_t *tracker,
|
||||
bool (*render)(d3d9_video_t *d3d,
|
||||
const video_frame_info_t *video_info,
|
||||
state_tracker_t *tracker,
|
||||
const void *frame,
|
||||
unsigned width, unsigned height, unsigned pitch, unsigned rotation);
|
||||
bool (*read_viewport)(d3d9_video_t *d3d, uint8_t *buffer, bool is_idle);
|
||||
|
@ -1676,7 +1676,8 @@ static bool d3d9_frame(void *data, const void *frame,
|
||||
}
|
||||
|
||||
if (!d3d->renderchain_driver->render(
|
||||
d3d, d3d->state_tracker,
|
||||
d3d, video_info,
|
||||
d3d->state_tracker,
|
||||
frame, frame_width, frame_height,
|
||||
pitch, d3d->dev_rotation))
|
||||
{
|
||||
|
@ -1085,6 +1085,7 @@ static void d3d9_cg_renderchain_calc_and_set_shader_mvp(
|
||||
}
|
||||
|
||||
static void cg_d3d9_renderchain_set_vertices(
|
||||
const video_frame_info_t *video_info,
|
||||
cg_renderchain_t *chain,
|
||||
struct cg_pass *pass,
|
||||
unsigned width, unsigned height,
|
||||
@ -1308,6 +1309,7 @@ static void cg_d3d9_renderchain_render_pass(
|
||||
|
||||
static bool d3d9_cg_renderchain_render(
|
||||
d3d9_video_t *d3d,
|
||||
const video_frame_info_t *video_info,
|
||||
state_tracker_t *tracker,
|
||||
const void *frame_data,
|
||||
unsigned width, unsigned height,
|
||||
@ -1374,7 +1376,8 @@ static bool d3d9_cg_renderchain_render(
|
||||
|
||||
d3d9_set_viewports(chain->dev, &viewport);
|
||||
|
||||
cg_d3d9_renderchain_set_vertices(chain, from_pass,
|
||||
cg_d3d9_renderchain_set_vertices(video_info,
|
||||
chain, from_pass,
|
||||
current_width, current_height,
|
||||
out_width, out_height,
|
||||
out_width, out_height, 0);
|
||||
@ -1399,7 +1402,8 @@ static bool d3d9_cg_renderchain_render(
|
||||
|
||||
d3d9_set_viewports(chain->dev, chain->final_viewport);
|
||||
|
||||
cg_d3d9_renderchain_set_vertices(chain, last_pass,
|
||||
cg_d3d9_renderchain_set_vertices(video_info,
|
||||
chain, last_pass,
|
||||
current_width, current_height,
|
||||
out_width, out_height,
|
||||
chain->final_viewport->Width, chain->final_viewport->Height,
|
||||
|
@ -175,6 +175,7 @@ static bool hlsl_d3d9_renderchain_create_first_pass(
|
||||
|
||||
static void hlsl_d3d9_renderchain_set_vertices(
|
||||
d3d9_video_t *d3d,
|
||||
const video_frame_info_t *video_info,
|
||||
hlsl_d3d9_renderchain_t *chain,
|
||||
struct hlsl_pass *pass,
|
||||
unsigned pass_count,
|
||||
@ -254,7 +255,7 @@ static void hlsl_d3d9_renderchain_set_vertices(
|
||||
params.fbo_info_cnt = 0;
|
||||
|
||||
#if 0
|
||||
d3d9_cg_renderchain_calc_and_set_shader_mvp(
|
||||
d3d9_cg_renderchain_calc_and_set_shader_mvp(video_info,
|
||||
/*pass->vPrg, */vp_width, vp_height, rotation);
|
||||
#endif
|
||||
video_shader_driver_set_parameters(¶ms);
|
||||
@ -532,6 +533,7 @@ static void hlsl_d3d9_renderchain_render_pass(
|
||||
}
|
||||
|
||||
static void d3d9_hlsl_renderchain_calc_and_set_shader_mvp(
|
||||
const video_frame_info_t *video_info,
|
||||
unsigned vp_width, unsigned vp_height,
|
||||
unsigned rotation)
|
||||
{
|
||||
@ -544,6 +546,8 @@ static void d3d9_hlsl_renderchain_calc_and_set_shader_mvp(
|
||||
d3d_matrix_multiply(&proj, &ortho, &rot);
|
||||
d3d_matrix_transpose(&matrix, &proj);
|
||||
|
||||
video_info->cb_set_mvp(NULL,
|
||||
video_info->shader_data, (void*)&matrix);
|
||||
#if 0
|
||||
cgD3D9SetUniformMatrix(cgpModelViewProj, (D3DMATRIX*)&matrix);
|
||||
#endif
|
||||
@ -551,6 +555,7 @@ static void d3d9_hlsl_renderchain_calc_and_set_shader_mvp(
|
||||
|
||||
static bool hlsl_d3d9_renderchain_render(
|
||||
d3d9_video_t *d3d,
|
||||
const video_frame_info_t *video_info,
|
||||
state_tracker_t *tracker,
|
||||
const void *frame,
|
||||
unsigned width, unsigned height,
|
||||
@ -591,7 +596,8 @@ static bool hlsl_d3d9_renderchain_render(
|
||||
|
||||
d3d9_set_viewports(chain->dev, &d3d->final_viewport);
|
||||
|
||||
hlsl_d3d9_renderchain_set_vertices(d3d, chain, last_pass,
|
||||
hlsl_d3d9_renderchain_set_vertices(d3d, video_info,
|
||||
chain, last_pass,
|
||||
1, width, height, chain->frame_count);
|
||||
|
||||
hlsl_d3d9_renderchain_render_pass(chain, last_pass,
|
||||
@ -600,7 +606,7 @@ static bool hlsl_d3d9_renderchain_render(
|
||||
|
||||
chain->frame_count++;
|
||||
|
||||
d3d9_hlsl_renderchain_calc_and_set_shader_mvp(
|
||||
d3d9_hlsl_renderchain_calc_and_set_shader_mvp(video_info,
|
||||
/* chain->vStock, */ chain->final_viewport->Width,
|
||||
chain->final_viewport->Height, 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user