d3dcompiler/tests: Add D3D_BLOB_INPUT_AND_OUTPUT_SIGNATURE_BLOB test.

This commit is contained in:
Rico Schüller 2010-10-14 21:03:34 +02:00 committed by Alexandre Julliard
parent 87344c6726
commit 7d87a4d42b
1 changed files with 34 additions and 0 deletions

View File

@ -212,6 +212,40 @@ static void test_get_blob_part(void)
refcount = ID3D10Blob_Release(blob);
ok(!refcount, "ID3DBlob has %u references left\n", refcount);
/* D3D_BLOB_INPUT_AND_OUTPUT_SIGNATURE_BLOB */
hr = D3DGetBlobPart(test_blob_part, test_blob_part[6], D3D_BLOB_INPUT_AND_OUTPUT_SIGNATURE_BLOB, 0, &blob);
ok(hr == S_OK, "D3DGetBlobPart failed, got %x, expected %x\n", hr, S_OK);
size = ID3D10Blob_GetBufferSize(blob);
ok(size == 180, "GetBufferSize failed, got %lu, expected %u\n", size, 180);
dword = ((DWORD*)ID3D10Blob_GetBufferPointer(blob));
ok(TAG_DXBC == *dword, "DXBC got %#x, expected %#x.\n", *dword, TAG_DXBC);
ok(TAG_ISGN == *(dword+10), "ISGN got %#x, expected %#x.\n", *(dword+10), TAG_ISGN);
ok(TAG_OSGN == *(dword+32), "OSGN got %#x, expected %#x.\n", *(dword+32), TAG_OSGN);
for (i = 0; i < sizeof(parts) / sizeof(parts[0]); i++)
{
hr = D3DGetBlobPart(dword, size, parts[i], 0, &blob2);
if (parts[i] == D3D_BLOB_INPUT_AND_OUTPUT_SIGNATURE_BLOB
|| parts[i] == D3D_BLOB_INPUT_SIGNATURE_BLOB
|| parts[i] == D3D_BLOB_OUTPUT_SIGNATURE_BLOB)
{
ok(hr == S_OK, "D3DGetBlobPart failed, got %x, expected %x\n", hr, S_OK);
refcount = ID3D10Blob_Release(blob2);
ok(!refcount, "ID3DBlob has %u references left\n", refcount);
}
else
{
ok(hr == E_FAIL, "D3DGetBlobPart failed, got %x, expected %x\n", hr, E_FAIL);
}
}
refcount = ID3D10Blob_Release(blob);
ok(!refcount, "ID3DBlob has %u references left\n", refcount);
}
START_TEST(blob)