mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
d3dx9/tests: Add effect parameter value SetMatrixTransposeArray() test.
This commit is contained in:
parent
0ae7c573b1
commit
cf512fdf13
@ -2005,6 +2005,47 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device)
|
||||
}
|
||||
test_effect_parameter_value_GetTestGroup(&res[k], effect, expected_value, parameter, i);
|
||||
test_effect_parameter_value_ResetValue(&res[k], effect, &blob[res_value_offset], parameter, i);
|
||||
|
||||
/* SetMatrixTransposeArray */
|
||||
for (element = 0; element < res_desc->Elements + 1; ++element)
|
||||
{
|
||||
fvalue = 1.33;
|
||||
for (l = 0; l < element * 16; ++l)
|
||||
{
|
||||
*(input_value + l) = *(DWORD *)&fvalue;
|
||||
fvalue += 1.12;
|
||||
}
|
||||
memcpy(expected_value, &blob[res_value_offset], res_desc->Bytes);
|
||||
hr = effect->lpVtbl->SetMatrixTransposeArray(effect, parameter, (D3DXMATRIX *)input_value, element);
|
||||
if (res_desc->Class == D3DXPC_MATRIX_ROWS && element <= res_desc->Elements)
|
||||
{
|
||||
UINT n;
|
||||
|
||||
for (n = 0; n < element; ++n)
|
||||
{
|
||||
for (l = 0; l < 4; ++l)
|
||||
{
|
||||
UINT m;
|
||||
|
||||
for (m = 0; m < 4; ++m)
|
||||
{
|
||||
if (m < res_desc->Rows && l < res_desc->Columns)
|
||||
set_number(expected_value + l + m * res_desc->Columns + n * res_desc->Columns * res_desc->Rows,
|
||||
res_desc->Type, input_value + l * 4 + m + n * 16, D3DXPT_FLOAT);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
ok(hr == D3D_OK, "%u - %s: SetMatrixTransposeArray failed, got %#x, expected %#x\n", i, res_full_name, hr, D3D_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
ok(hr == D3DERR_INVALIDCALL, "%u - %s: SetMatrixTransposeArray failed, got %#x, expected %#x\n",
|
||||
i, res_full_name, hr, D3DERR_INVALIDCALL);
|
||||
}
|
||||
test_effect_parameter_value_GetTestGroup(&res[k], effect, expected_value, parameter, i);
|
||||
test_effect_parameter_value_ResetValue(&res[k], effect, &blob[res_value_offset], parameter, i);
|
||||
}
|
||||
}
|
||||
|
||||
count = effect->lpVtbl->Release(effect);
|
||||
|
Loading…
Reference in New Issue
Block a user