Rico Schüller : d3dcompiler/tests: Add D3D_BLOB_OUTPUT_SIGNATURE_BLOB test.

Alexandre Julliard julliard at winehq.org
Fri Oct 15 10:40:25 CDT 2010


Module: wine
Branch: master
Commit: 87344c6726ff4fa4cfde956f524424f8b3c41b0c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=87344c6726ff4fa4cfde956f524424f8b3c41b0c

Author: Rico Schüller <kgbricola at web.de>
Date:   Thu Oct 14 21:03:31 2010 +0200

d3dcompiler/tests: Add D3D_BLOB_OUTPUT_SIGNATURE_BLOB test.

---

 dlls/d3dcompiler_43/tests/blob.c |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/dlls/d3dcompiler_43/tests/blob.c b/dlls/d3dcompiler_43/tests/blob.c
index ff4dfa2..be7146d 100644
--- a/dlls/d3dcompiler_43/tests/blob.c
+++ b/dlls/d3dcompiler_43/tests/blob.c
@@ -38,6 +38,7 @@
     ((DWORD)(ch2) << 16) | ((DWORD)(ch3) << 24 ))
 #define TAG_DXBC MAKE_TAG('D', 'X', 'B', 'C')
 #define TAG_ISGN MAKE_TAG('I', 'S', 'G', 'N')
+#define TAG_OSGN MAKE_TAG('O', 'S', 'G', 'N')
 
 static void test_create_blob(void)
 {
@@ -180,6 +181,37 @@ static void test_get_blob_part(void)
 
     refcount = ID3D10Blob_Release(blob);
     ok(!refcount, "ID3DBlob has %u references left\n", refcount);
+
+    /* D3D_BLOB_OUTPUT_SIGNATURE_BLOB */
+    hr = D3DGetBlobPart(test_blob_part, test_blob_part[6], D3D_BLOB_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 == 88, "GetBufferSize failed, got %lu, expected %u\n", size, 88);
+
+    dword = ((DWORD*)ID3D10Blob_GetBufferPointer(blob));
+    ok(TAG_DXBC == *dword, "DXBC got %#x, expected %#x.\n", *dword, TAG_DXBC);
+    ok(TAG_OSGN == *(dword+9), "OSGN got %#x, expected %#x.\n", *(dword+9), 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_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)




More information about the wine-cvs mailing list