d3dx9/tests: Get rid of unnecessary ifs.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e1463532be
commit
6cf61d4239
|
@ -403,11 +403,15 @@ static void test_find_shader_comment(void)
|
|||
|
||||
static void test_get_shader_constant_table_ex(void)
|
||||
{
|
||||
D3DXCONSTANT_DESC constant_desc_save;
|
||||
ID3DXConstantTable *constant_table;
|
||||
D3DXCONSTANT_DESC constant_desc;
|
||||
D3DXCONSTANTTABLE_DESC desc;
|
||||
D3DXHANDLE constant;
|
||||
HRESULT hr;
|
||||
void *data;
|
||||
DWORD size;
|
||||
D3DXCONSTANTTABLE_DESC desc;
|
||||
UINT nb;
|
||||
|
||||
constant_table = (ID3DXConstantTable *)0xdeadbeef;
|
||||
hr = D3DXGetShaderConstantTableEx(NULL, 0, &constant_table);
|
||||
|
@ -453,8 +457,6 @@ static void test_get_shader_constant_table_ex(void)
|
|||
ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
|
||||
ok(constant_table != NULL, "D3DXGetShaderConstantTableEx() failed, got NULL\n");
|
||||
|
||||
if (constant_table)
|
||||
{
|
||||
size = ID3DXConstantTable_GetBufferSize(constant_table);
|
||||
ok(size == 28, "Got result %x, expected 28\n", size);
|
||||
|
||||
|
@ -472,19 +474,11 @@ static void test_get_shader_constant_table_ex(void)
|
|||
ok(desc.Constants == 0, "Got result %x, expected 0\n", desc.Constants);
|
||||
|
||||
ID3DXConstantTable_Release(constant_table);
|
||||
}
|
||||
|
||||
hr = D3DXGetShaderConstantTableEx(shader_with_ctab_constants, 0, &constant_table);
|
||||
ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
|
||||
ok(constant_table != NULL, "D3DXGetShaderConstantTableEx() failed, got NULL\n");
|
||||
|
||||
if (constant_table)
|
||||
{
|
||||
D3DXHANDLE constant;
|
||||
D3DXCONSTANT_DESC constant_desc;
|
||||
D3DXCONSTANT_DESC constant_desc_save;
|
||||
UINT nb;
|
||||
|
||||
/* Test GetDesc */
|
||||
hr = ID3DXConstantTable_GetDesc(constant_table, &desc);
|
||||
ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
|
||||
|
@ -561,7 +555,6 @@ static void test_get_shader_constant_table_ex(void)
|
|||
ok(!memcmp(&constant_desc, &constant_desc_save, sizeof(D3DXCONSTANT_DESC)), "Got different constant data\n");
|
||||
|
||||
ID3DXConstantTable_Release(constant_table);
|
||||
}
|
||||
|
||||
hr = D3DXGetShaderConstantTableEx(fx_shader_with_ctab, 0, &constant_table);
|
||||
ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr);
|
||||
|
|
Loading…
Reference in New Issue