(D3D) Start cutting down on d3d_matrix_identity

This commit is contained in:
libretroadmin 2022-05-16 07:37:24 +02:00
parent 23f1f98c01
commit d6e6fb2a93
2 changed files with 12 additions and 6 deletions

View File

@ -98,11 +98,14 @@ struct d3d8_texture_info
void d3d8_set_mvp(void *data, const void *mat_data)
{
struct d3d_matrix matrix;
struct d3d_matrix matrix = {
1.0f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f
};
LPDIRECT3DDEVICE8 d3dr = (LPDIRECT3DDEVICE8)data;
d3d_matrix_identity(&matrix);
IDirect3DDevice8_SetTransform(d3dr,
D3DTS_PROJECTION, (D3DMATRIX*)&matrix);
IDirect3DDevice8_SetTransform(d3dr,

View File

@ -783,12 +783,15 @@ static bool d3d9_cg_renderchain_create_first_pass(
{
unsigned i;
struct shader_pass pass;
struct d3d_matrix ident;
struct d3d_matrix ident = {
1.0f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f
};
unsigned fmt = (_fmt == RETRO_PIXEL_FORMAT_RGB565) ?
D3D9_RGB565_FORMAT : D3D9_XRGB8888_FORMAT;
d3d_matrix_identity(&ident);
IDirect3DDevice9_SetTransform(dev, D3DTS_WORLD, (D3DMATRIX*)&ident);
IDirect3DDevice9_SetTransform(dev, D3DTS_VIEW, (D3DMATRIX*)&ident);