mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
d3dx9: Copy the entire matrix at once if there is no need of type conversions.
This commit is contained in:
parent
1e2fbcc99b
commit
5cfca92c53
1 changed files with 10 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue