Commit 83cff120 authored by Rico Schüller's avatar Rico Schüller Committed by Alexandre Julliard

d3dcompiler/tests: Add D3DCOMPILER_STRIP_REFLECTION_DATA test.

parent f4a9a0bb
...@@ -379,6 +379,25 @@ static void test_get_blob_part(void) ...@@ -379,6 +379,25 @@ static void test_get_blob_part(void)
refcount = ID3D10Blob_Release(blob); refcount = ID3D10Blob_Release(blob);
ok(!refcount, "ID3DBlob has %u references left\n", refcount); ok(!refcount, "ID3DBlob has %u references left\n", refcount);
/* D3DCOMPILER_STRIP_REFLECTION_DATA */
hr = D3DStripShader(test_blob_part, test_blob_part[6], D3DCOMPILER_STRIP_REFLECTION_DATA, &blob);
ok(hr == S_OK, "D3DStripShader failed, got %x, expected %x\n", hr, S_OK);
size = ID3D10Blob_GetBufferSize(blob);
ok(size == 516, "GetBufferSize failed, got %lu, expected %u\n", size, 516);
dword = ((DWORD*)ID3D10Blob_GetBufferPointer(blob));
ok(TAG_DXBC == *dword, "DXBC got %#x, expected %#x.\n", *dword, TAG_DXBC);
ok(TAG_XNAS == *(dword+14), "XNAS got %#x, expected %#x.\n", *(dword+14), TAG_XNAS);
ok(TAG_XNAP == *(dword+33), "XNAP got %#x, expected %#x.\n", *(dword+33), TAG_XNAP);
ok(TAG_Aon9 == *(dword+52), "Aon9 got %#x, expected %#x.\n", *(dword+52), TAG_Aon9);
ok(TAG_SHDR == *(dword+77), "SHDR got %#x, expected %#x.\n", *(dword+77), TAG_SHDR);
ok(TAG_ISGN == *(dword+94), "ISGN got %#x, expected %#x.\n", *(dword+94), TAG_ISGN);
ok(TAG_OSGN == *(dword+116), "OSGN got %#x, expected %#x.\n", *(dword+116), TAG_OSGN);
refcount = ID3D10Blob_Release(blob);
ok(!refcount, "ID3DBlob has %u references left\n", refcount);
} }
/* /*
...@@ -697,6 +716,24 @@ static void test_get_blob_part2(void) ...@@ -697,6 +716,24 @@ static void test_get_blob_part2(void)
refcount = ID3D10Blob_Release(blob); refcount = ID3D10Blob_Release(blob);
ok(!refcount, "ID3DBlob has %u references left\n", refcount); ok(!refcount, "ID3DBlob has %u references left\n", refcount);
/* D3DCOMPILER_STRIP_REFLECTION_DATA */
hr = D3DStripShader(test_blob_part2, test_blob_part2[6], D3DCOMPILER_STRIP_REFLECTION_DATA, &blob);
ok(hr == S_OK, "D3DStripShader failed, got %x, expected %x\n", hr, S_OK);
size = ID3D10Blob_GetBufferSize(blob);
ok(size == 4735, "GetBufferSize failed, got %lu, expected %u\n", size, 4735);
dword = ((DWORD*)ID3D10Blob_GetBufferPointer(blob));
ok(TAG_DXBC == *dword, "DXBC got %#x, expected %#x.\n", *dword, TAG_DXBC);
ok(TAG_ISGN == *(dword+13), "ISGN got %#x, expected %#x.\n", *(dword+13), TAG_ISGN);
ok(TAG_OSGN == *(dword+26), "OSGN got %#x, expected %#x.\n", *(dword+26), TAG_OSGN);
ok(TAG_PCSG == *(dword+39), "PCSG got %#x, expected %#x.\n", *(dword+39), TAG_PCSG);
ok(TAG_SHEX == *(dword+88), "SHEX got %#x, expected %#x.\n", *(dword+88), TAG_SHEX);
ok(TAG_SDBG == *(dword+168), "SDBG got %#x, expected %#x.\n", *(dword+168), TAG_SDBG);
refcount = ID3D10Blob_Release(blob);
ok(!refcount, "ID3DBlob has %u references left\n", refcount);
} }
START_TEST(blob) START_TEST(blob)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment