summaryrefslogtreecommitdiff
path: root/wrappers
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2016-04-09 14:09:57 +0100
committerJose Fonseca <jfonseca@vmware.com>2016-04-09 14:39:48 +0100
commit982fa6be4e2e34041f632e82a44d0831ef94232c (patch)
treebc1956049c760b4b871e1d8cdc9dce47238e0403 /wrappers
parentd335cfb12b514c22dfd3a128bf3da26900d2eccf (diff)
dxgitrace: Hide IWarpPrivateAPI.
Diffstat (limited to 'wrappers')
-rw-r--r--wrappers/dxgitrace.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/wrappers/dxgitrace.py b/wrappers/dxgitrace.py
index 36941dff..fd1275d3 100644
--- a/wrappers/dxgitrace.py
+++ b/wrappers/dxgitrace.py
@@ -137,6 +137,25 @@ class D3DCommonTracer(DllTracer):
print ' _MapDesc.Size = 0;'
print ' }'
+ def invokeMethod(self, interface, base, method):
+ DllTracer.invokeMethod(self, interface, base, method)
+
+ # When D2D is used on top of WARP software rasterizer it seems to do
+ # most of its rendering via the undocumented and opaque IWarpPrivateAPI
+ # interface. Althought hiding this interface will affect behavior,
+ # there's little point in traces that use it, as they lack enough
+ # information to replay correctly.
+ #
+ # Returning E_NOINTERFACE when for IID_IWarpPrivateAPI matches what
+ # happens when D2D is used with drivers other than WARP.
+ if method.name == 'QueryInterface':
+ print r' if (_result == S_OK && riid == IID_IWarpPrivateAPI && ppvObj && *ppvObj) {'
+ print r' static_cast<IUnknown *>(*ppvObj)->Release();'
+ print r' *ppvObj = nullptr;'
+ print r' _result = E_NOINTERFACE;'
+ print r' os::log("apitrace: warning: hiding IWarpPrivateAPI interface\n");'
+ print r' }'
+
if __name__ == '__main__':
print r'#include "guids_defs.hpp"'