d3dcompiler: Implement ID3D11ShaderReflectionType::IsEqual().
This commit is contained in:
parent
66b286470e
commit
4080242d7f
|
@ -872,9 +872,20 @@ static LPCSTR STDMETHODCALLTYPE d3dcompiler_shader_reflection_type_GetMemberType
|
|||
static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_type_IsEqual(
|
||||
ID3D11ShaderReflectionType *iface, ID3D11ShaderReflectionType *type)
|
||||
{
|
||||
FIXME("iface %p, type %p stub!\n", iface, type);
|
||||
struct d3dcompiler_shader_reflection_type *This = impl_from_ID3D11ShaderReflectionType(iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE("iface %p, type %p\n", iface, type);
|
||||
|
||||
if (This == &null_type)
|
||||
{
|
||||
WARN("Null type specified\n");
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (iface == type)
|
||||
return S_OK;
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
static ID3D11ShaderReflectionType * STDMETHODCALLTYPE d3dcompiler_shader_reflection_type_GetSubType(
|
||||
|
|
|
@ -1380,6 +1380,18 @@ static void test_reflection_constant_buffer(void)
|
|||
t11 = t11_valid->lpVtbl->GetMemberTypeByName(t11_valid, "invalid");
|
||||
ok(t11_dummy == t11, "GetMemberTypeByName failed, got %p, expected %p\n", t11, t11_dummy);
|
||||
|
||||
hr = t11_dummy->lpVtbl->IsEqual(t11_dummy, t11_dummy);
|
||||
ok(hr == E_FAIL, "IsEqual failed, got %x, expected %x\n", hr, E_FAIL);
|
||||
|
||||
hr = t11_valid->lpVtbl->IsEqual(t11_valid, t11_dummy);
|
||||
ok(hr == S_FALSE, "IsEqual failed, got %x, expected %x\n", hr, S_FALSE);
|
||||
|
||||
hr = t11_dummy->lpVtbl->IsEqual(t11_dummy, t11_valid);
|
||||
ok(hr == E_FAIL, "IsEqual failed, got %x, expected %x\n", hr, E_FAIL);
|
||||
|
||||
hr = t11_valid->lpVtbl->IsEqual(t11_valid, t11_valid);
|
||||
ok(hr == S_OK, "IsEqual failed, got %x, expected %x\n", hr, S_OK);
|
||||
|
||||
/* constant buffers */
|
||||
for (i = 0; i < sizeof(test_reflection_constant_buffer_cb_result)/sizeof(*test_reflection_constant_buffer_cb_result); ++i)
|
||||
{
|
||||
|
@ -1472,6 +1484,23 @@ static void test_reflection_constant_buffer(void)
|
|||
string = t11->lpVtbl->GetMemberTypeName(t11, 1);
|
||||
ok(!strcmp(string, "b"), "GetMemberTypeName failed, got \"%s\", expected \"%s\"\n", string, "b");
|
||||
|
||||
/* float vs float (in struct) */
|
||||
hr = t11->lpVtbl->IsEqual(t11, t11_valid);
|
||||
ok(hr == S_FALSE, "IsEqual failed, got %x, expected %x\n", hr, S_FALSE);
|
||||
|
||||
hr = t11_valid->lpVtbl->IsEqual(t11_valid, t11);
|
||||
ok(hr == S_FALSE, "IsEqual failed, got %x, expected %x\n", hr, S_FALSE);
|
||||
|
||||
/* float vs float */
|
||||
t = t11->lpVtbl->GetMemberTypeByIndex(t11, 0);
|
||||
ok(t != t11_dummy, "GetMemberTypeByIndex failed\n");
|
||||
|
||||
t2 = t11->lpVtbl->GetMemberTypeByIndex(t11, 1);
|
||||
ok(t2 != t11_dummy, "GetMemberTypeByIndex failed\n");
|
||||
|
||||
hr = t->lpVtbl->IsEqual(t, t2);
|
||||
ok(hr == S_OK, "IsEqual failed, got %x, expected %x\n", hr, S_OK);
|
||||
|
||||
count = ref11->lpVtbl->Release(ref11);
|
||||
ok(count == 0, "Release failed %u\n", count);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue