Skip to content

Commit

Permalink
dxgiretrace: More tweaks to IDXGIKeyedMutex.
Browse files Browse the repository at this point in the history
They do have side-effects.
  • Loading branch information
jrfonseca committed Jul 17, 2015
1 parent 2b7f2a8 commit 4d5cfa4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions retrace/dxgiretrace.py
Expand Up @@ -358,6 +358,11 @@ def invokeInterfaceMethod(self, interface, method):

Retracer.invokeInterfaceMethod(self, interface, method)

if method.name in ('AcquireSync', 'ReleaseSync'):
print r' if (SUCCEEDED(_result) && _result != S_OK) {'
print r' retrace::warning(call) << " returned " << _result << "\n";'
print r' }'

# process events after presents
if method.name == 'Present':
print r' d3dretrace::processEvents();'
Expand Down
11 changes: 9 additions & 2 deletions specs/dxgi.py
Expand Up @@ -171,6 +171,9 @@
"DXGI_ERROR_NOT_CURRENTLY_AVAILABLE",
"DXGI_ERROR_REMOTE_CLIENT_DISCONNECTED",
"DXGI_ERROR_REMOTE_OUTOFMEMORY",
# IDXGIKeyedMutex::AcquireSync
"WAIT_ABANDONED",
"WAIT_TIMEOUT",
])


Expand Down Expand Up @@ -379,9 +382,13 @@
StdMethod(HRESULT, "GetEvictionPriority", [Out(Pointer(DXGI_RESOURCE_PRIORITY), "pEvictionPriority")], sideeffects=False),
]

DWORD_TIMEOUT = FakeEnum(DWORD, [
"INFINITE",
])

IDXGIKeyedMutex.methods += [
StdMethod(HRESULT, "AcquireSync", [(UINT64, "Key"), (DWORD, "dwMilliseconds")], sideeffects=False),
StdMethod(HRESULT, "ReleaseSync", [(UINT64, "Key")], sideeffects=False),
StdMethod(HRESULT, "AcquireSync", [(UINT64, "Key"), (DWORD_TIMEOUT, "dwMilliseconds")]),
StdMethod(HRESULT, "ReleaseSync", [(UINT64, "Key")]),
]

DXGI_MAP = Flags(UINT, [
Expand Down

0 comments on commit 4d5cfa4

Please sign in to comment.