Commit 5cfca92c authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3dx9: Copy the entire matrix at once if there is no need of type conversions.

parent 1e2fbcc9
......@@ -768,6 +768,16 @@ static void set_matrix(struct d3dx_parameter *param, const D3DXMATRIX *matrix)
{
UINT i, k;
if (param->type == D3DXPT_FLOAT)
{
if (param->columns == 4)
memcpy(param->data, matrix->u.m, param->rows * 4 * sizeof(float));
else
for (i = 0; i < param->rows; ++i)
memcpy((float *)param->data + i * param->columns, matrix->u.m + i, param->columns * sizeof(float));
return;
}
for (i = 0; i < param->rows; ++i)
{
for (k = 0; k < param->columns; ++k)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment