[PATCH 1/4] d3d9/tests: Windows 10 17.09 added an undocumented query type (v2).

Stefan Dösinger stefan at codeweavers.com
Thu Oct 19 03:09:19 CDT 2017


Signed-off-by: Stefan Dösinger <stefan at codeweavers.com>

---

Version 2: Fixed a typo in my E-Mail address that I apparently have in
my Wine git repo on the Windows partition...
---
 dlls/d3d9/query.c        | 6 +++++-
 dlls/d3d9/tests/device.c | 4 +++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/dlls/d3d9/query.c b/dlls/d3d9/query.c
index 335a960de4..df7eb6ec12 100644
--- a/dlls/d3d9/query.c
+++ b/dlls/d3d9/query.c
@@ -187,7 +187,11 @@ HRESULT query_init(struct d3d9_query *query, struct d3d9_device *device, D3DQUER
 
     if (type > D3DQUERYTYPE_MEMORYPRESSURE)
     {
-        WARN("Invalid query type %#x.\n", type);
+        if (type == 0x16)
+            FIXME("Undocumented query %#x created.\n", type);
+        else
+            WARN("Invalid query type %#x.\n", type);
+
         return D3DERR_NOTAVAILABLE;
     }
 
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index 3580a22c95..4e4bb3fb0d 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -5552,7 +5552,9 @@ static void test_query_support(void)
 
     for (i = 0; i < 40; ++i)
     {
-        if (D3DQUERYTYPE_VCACHE <= i && i <= D3DQUERYTYPE_MEMORYPRESSURE)
+        /* Windows 10 17.09 (build 16299.19) added an undocumented query with an enum value of 0x16 (=22).
+         * It returns D3D_OK when asking for support and E_FAIL when trying to actually create it. */
+        if (D3DQUERYTYPE_VCACHE <= i && i <= D3DQUERYTYPE_MEMORYPRESSURE || i == 0x16)
             continue;
 
         hr = IDirect3DDevice9_CreateQuery(device, i, NULL);
-- 
2.13.6




More information about the wine-patches mailing list