d3dx9: Handle D3DXPC_VECTOR in set_matrix_array().
This commit is contained in:
parent
a4dde8151b
commit
b5b0520723
|
@ -1177,6 +1177,7 @@ static HRESULT set_matrix_array(ID3DXConstantTable *iface, IDirect3DDevice9 *dev
|
||||||
|
|
||||||
if (desc->Class == D3DXPC_MATRIX_ROWS
|
if (desc->Class == D3DXPC_MATRIX_ROWS
|
||||||
|| desc->Class == D3DXPC_MATRIX_COLUMNS
|
|| desc->Class == D3DXPC_MATRIX_COLUMNS
|
||||||
|
|| desc->Class == D3DXPC_VECTOR
|
||||||
|| desc->Class == D3DXPC_SCALAR)
|
|| desc->Class == D3DXPC_SCALAR)
|
||||||
{
|
{
|
||||||
if (desc->Class == class) row_offset = 4;
|
if (desc->Class == class) row_offset = 4;
|
||||||
|
@ -1184,6 +1185,8 @@ static HRESULT set_matrix_array(ID3DXConstantTable *iface, IDirect3DDevice9 *dev
|
||||||
|
|
||||||
if (class == D3DXPC_MATRIX_ROWS)
|
if (class == D3DXPC_MATRIX_ROWS)
|
||||||
{
|
{
|
||||||
|
if (desc->Class == D3DXPC_VECTOR) return D3D_OK;
|
||||||
|
|
||||||
num_rows = min(desc->Rows, rows);
|
num_rows = min(desc->Rows, rows);
|
||||||
num_columns = min(desc->Columns, columns);
|
num_columns = min(desc->Columns, columns);
|
||||||
}
|
}
|
||||||
|
@ -1198,7 +1201,7 @@ static HRESULT set_matrix_array(ID3DXConstantTable *iface, IDirect3DDevice9 *dev
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FIXME("Unhandled variable class %s\n", debug_d3dxparameter_class(desc->Class));
|
FIXME("Unhandled variable class %s\n", debug_d3dxparameter_class(desc->Class));
|
||||||
return D3D_OK;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (desc->RegisterSet)
|
switch (desc->RegisterSet)
|
||||||
|
|
|
@ -707,7 +707,7 @@ static void test_setting_basic_table(IDirect3DDevice9 *device)
|
||||||
ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTranspose failed on variable f4: 0x%08x\n", res);
|
ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTranspose failed on variable f4: 0x%08x\n", res);
|
||||||
|
|
||||||
IDirect3DDevice9_GetVertexShaderConstantF(device, 7, out, 1);
|
IDirect3DDevice9_GetVertexShaderConstantF(device, 7, out, 1);
|
||||||
todo_wine ok(out[0] == S(U(mvp))._11 && out[1] == S(U(mvp))._21 && out[2] == S(U(mvp))._31 && out[3] == S(U(mvp))._41,
|
ok(out[0] == S(U(mvp))._11 && out[1] == S(U(mvp))._21 && out[2] == S(U(mvp))._31 && out[3] == S(U(mvp))._41,
|
||||||
"The variable f4 was not set correctly by ID3DXConstantTable_SetMatrixTranspose, "
|
"The variable f4 was not set correctly by ID3DXConstantTable_SetMatrixTranspose, "
|
||||||
"got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
|
"got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
|
||||||
out[0], out[1], out[2], out[3],
|
out[0], out[1], out[2], out[3],
|
||||||
|
|
Loading…
Reference in New Issue