d3d10/tests: Add GetParentConstantBuffer() checks to effect variable type and class test.
This commit is contained in:
parent
51fcacb8a9
commit
d390e60320
|
@ -1339,7 +1339,7 @@ static void check_as(ID3D10EffectVariable *variable)
|
|||
static void test_effect_variable_type_class(ID3D10Device *device)
|
||||
{
|
||||
ID3D10Effect *effect;
|
||||
ID3D10EffectConstantBuffer *constantbuffer;
|
||||
ID3D10EffectConstantBuffer *constantbuffer, *null_buffer, *parent;
|
||||
ID3D10EffectVariable *variable;
|
||||
ID3D10EffectType *type;
|
||||
D3D10_EFFECT_VARIABLE_DESC vd;
|
||||
|
@ -1350,6 +1350,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
hr = D3D10CreateEffectFromMemory(fx_test_evtc, fx_test_evtc[6], 0, device, NULL, &effect);
|
||||
ok(SUCCEEDED(hr), "D3D10CreateEffectFromMemory failed (%x)\n", hr);
|
||||
|
||||
/* get the null_constantbuffer, so that we can compare it to variables->GetParentConstantBuffer */
|
||||
null_buffer = effect->lpVtbl->GetConstantBufferByIndex(effect, 1);
|
||||
|
||||
/* check constantbuffer cb */
|
||||
constantbuffer = effect->lpVtbl->GetConstantBufferByIndex(effect, 0);
|
||||
hr = constantbuffer->lpVtbl->GetDesc(constantbuffer, &vd);
|
||||
|
@ -1364,6 +1367,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)constantbuffer);
|
||||
|
||||
parent = constantbuffer->lpVtbl->GetParentConstantBuffer(constantbuffer);
|
||||
ok(null_buffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, null_buffer);
|
||||
|
||||
type = constantbuffer->lpVtbl->GetType(constantbuffer);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
@ -1393,6 +1399,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)variable);
|
||||
|
||||
parent = variable->lpVtbl->GetParentConstantBuffer(variable);
|
||||
ok(null_buffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, null_buffer);
|
||||
|
||||
type = variable->lpVtbl->GetType(variable);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
@ -1422,6 +1431,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)variable);
|
||||
|
||||
parent = variable->lpVtbl->GetParentConstantBuffer(variable);
|
||||
ok(constantbuffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, constantbuffer);
|
||||
|
||||
type = variable->lpVtbl->GetType(variable);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
@ -1451,6 +1463,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)variable);
|
||||
|
||||
parent = variable->lpVtbl->GetParentConstantBuffer(variable);
|
||||
ok(constantbuffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, constantbuffer);
|
||||
|
||||
type = variable->lpVtbl->GetType(variable);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
@ -1480,6 +1495,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)variable);
|
||||
|
||||
parent = variable->lpVtbl->GetParentConstantBuffer(variable);
|
||||
ok(constantbuffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, constantbuffer);
|
||||
|
||||
type = variable->lpVtbl->GetType(variable);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
@ -1509,6 +1527,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)variable);
|
||||
|
||||
parent = variable->lpVtbl->GetParentConstantBuffer(variable);
|
||||
ok(constantbuffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, constantbuffer);
|
||||
|
||||
type = variable->lpVtbl->GetType(variable);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
@ -1538,6 +1559,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)variable);
|
||||
|
||||
parent = variable->lpVtbl->GetParentConstantBuffer(variable);
|
||||
ok(null_buffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, null_buffer);
|
||||
|
||||
type = variable->lpVtbl->GetType(variable);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
@ -1567,6 +1591,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)variable);
|
||||
|
||||
parent = variable->lpVtbl->GetParentConstantBuffer(variable);
|
||||
ok(null_buffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, null_buffer);
|
||||
|
||||
type = variable->lpVtbl->GetType(variable);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
@ -1596,6 +1623,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)variable);
|
||||
|
||||
parent = variable->lpVtbl->GetParentConstantBuffer(variable);
|
||||
ok(null_buffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, null_buffer);
|
||||
|
||||
type = variable->lpVtbl->GetType(variable);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
@ -1625,6 +1655,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)variable);
|
||||
|
||||
parent = variable->lpVtbl->GetParentConstantBuffer(variable);
|
||||
ok(null_buffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, null_buffer);
|
||||
|
||||
type = variable->lpVtbl->GetType(variable);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
@ -1654,6 +1687,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)variable);
|
||||
|
||||
parent = variable->lpVtbl->GetParentConstantBuffer(variable);
|
||||
ok(null_buffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, null_buffer);
|
||||
|
||||
type = variable->lpVtbl->GetType(variable);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
@ -1683,6 +1719,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)variable);
|
||||
|
||||
parent = variable->lpVtbl->GetParentConstantBuffer(variable);
|
||||
ok(null_buffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, null_buffer);
|
||||
|
||||
type = variable->lpVtbl->GetType(variable);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
@ -1712,6 +1751,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)variable);
|
||||
|
||||
parent = variable->lpVtbl->GetParentConstantBuffer(variable);
|
||||
ok(null_buffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, null_buffer);
|
||||
|
||||
type = variable->lpVtbl->GetType(variable);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
@ -1741,6 +1783,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)variable);
|
||||
|
||||
parent = variable->lpVtbl->GetParentConstantBuffer(variable);
|
||||
ok(null_buffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, null_buffer);
|
||||
|
||||
type = variable->lpVtbl->GetType(variable);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
@ -1770,6 +1815,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)variable);
|
||||
|
||||
parent = variable->lpVtbl->GetParentConstantBuffer(variable);
|
||||
ok(null_buffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, null_buffer);
|
||||
|
||||
type = variable->lpVtbl->GetType(variable);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
@ -1799,6 +1847,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)variable);
|
||||
|
||||
parent = variable->lpVtbl->GetParentConstantBuffer(variable);
|
||||
ok(null_buffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, null_buffer);
|
||||
|
||||
type = variable->lpVtbl->GetType(variable);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
@ -1828,6 +1879,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)variable);
|
||||
|
||||
parent = variable->lpVtbl->GetParentConstantBuffer(variable);
|
||||
ok(null_buffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, null_buffer);
|
||||
|
||||
type = variable->lpVtbl->GetType(variable);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
@ -1857,6 +1911,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)variable);
|
||||
|
||||
parent = variable->lpVtbl->GetParentConstantBuffer(variable);
|
||||
ok(null_buffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, null_buffer);
|
||||
|
||||
type = variable->lpVtbl->GetType(variable);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
@ -1886,6 +1943,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)variable);
|
||||
|
||||
parent = variable->lpVtbl->GetParentConstantBuffer(variable);
|
||||
ok(null_buffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, null_buffer);
|
||||
|
||||
type = variable->lpVtbl->GetType(variable);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
@ -1915,6 +1975,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)variable);
|
||||
|
||||
parent = variable->lpVtbl->GetParentConstantBuffer(variable);
|
||||
ok(null_buffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, null_buffer);
|
||||
|
||||
type = variable->lpVtbl->GetType(variable);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
@ -1944,6 +2007,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)variable);
|
||||
|
||||
parent = variable->lpVtbl->GetParentConstantBuffer(variable);
|
||||
ok(null_buffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, null_buffer);
|
||||
|
||||
type = variable->lpVtbl->GetType(variable);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
@ -1973,6 +2039,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)variable);
|
||||
|
||||
parent = variable->lpVtbl->GetParentConstantBuffer(variable);
|
||||
ok(null_buffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, null_buffer);
|
||||
|
||||
type = variable->lpVtbl->GetType(variable);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
@ -2002,6 +2071,9 @@ static void test_effect_variable_type_class(ID3D10Device *device)
|
|||
|
||||
check_as((ID3D10EffectVariable *)variable);
|
||||
|
||||
parent = variable->lpVtbl->GetParentConstantBuffer(variable);
|
||||
ok(null_buffer == parent, "GetParentConstantBuffer got %p, expected %p\n", parent, null_buffer);
|
||||
|
||||
type = variable->lpVtbl->GetType(variable);
|
||||
hr = type->lpVtbl->GetDesc(type, &td);
|
||||
ok(SUCCEEDED(hr), "GetDesc failed (%x)\n", hr);
|
||||
|
|
Loading…
Reference in New Issue