summaryrefslogtreecommitdiff
path: root/wrappers
diff options
context:
space:
mode:
Diffstat (limited to 'wrappers')
-rw-r--r--wrappers/dxgitrace.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/wrappers/dxgitrace.py b/wrappers/dxgitrace.py
index f3ea82d2..476d0a38 100644
--- a/wrappers/dxgitrace.py
+++ b/wrappers/dxgitrace.py
@@ -106,6 +106,10 @@ class D3DCommonTracer(DllTracer):
('std::map< std::pair<ID3D11Resource *, UINT>, _MAP_DESC >', 'm_MapDescs', None),
('std::map< std::pair<ID3D11Resource *, UINT>, MemoryShadow >', 'm_MapShadows', None),
]
+ if interface.hasBase(d3d11.ID3D11VideoContext):
+ variables += [
+ ('std::map<UINT, std::pair<void *, UINT> >', 'm_MapDesc', None),
+ ]
return variables
@@ -136,6 +140,14 @@ class D3DCommonTracer(DllTracer):
print ' }'
print ' }'
+ if interface.hasBase(d3d11.ID3D11VideoContext) and \
+ method.name == 'ReleaseDecoderBuffer':
+ print ' std::map<UINT, std::pair<void *, UINT> >::iterator it = m_MapDesc.find(Type);'
+ print ' if (it != m_MapDesc.end()) {'
+ self.emit_memcpy('it->second.first', 'it->second.second')
+ print ' m_MapDesc.erase(it);'
+ print ' }'
+
DllTracer.implementWrapperInterfaceMethodBody(self, interface, base, method)
if method.name == 'Map':
@@ -154,6 +166,14 @@ class D3DCommonTracer(DllTracer):
print ' _MapDesc.Size = 0;'
print ' }'
+ if interface.hasBase(d3d11.ID3D11VideoContext) and \
+ method.name == 'GetDecoderBuffer':
+ print ' if (SUCCEEDED(_result)) {'
+ print ' m_MapDesc[Type] = std::make_pair(*ppBuffer, *pBufferSize);'
+ print ' } else {'
+ print ' m_MapDesc[Type] = std::make_pair(nullptr, 0);'
+ print ' }'
+
def invokeMethod(self, interface, base, method):
DllTracer.invokeMethod(self, interface, base, method)