static inline void
-_getLockInfo(IDirect3DVertexBuffer9 *pBuffer, UINT OffsetToLock, UINT SizeToLock, void ** ppbData,
- void * & pLockedData, size_t & LockedSize) {
+_getMapInfo(IDirect3DVertexBuffer9 *pBuffer, UINT OffsetToLock, UINT SizeToLock, void ** ppbData,
+ void * & pLockedData, size_t & MappedSize) {
pLockedData = *ppbData;
- LockedSize = 0;
+ MappedSize = 0;
if (SizeToLock == 0) {
D3DVERTEXBUFFER_DESC Desc;
if (FAILED(hr)) {
return;
}
- LockedSize = Desc.Size;
+ MappedSize = Desc.Size;
} else {
- LockedSize = SizeToLock;
+ MappedSize = SizeToLock;
}
}
static inline void
-_getLockInfo(IDirect3DIndexBuffer9 *pBuffer, UINT OffsetToLock, UINT SizeToLock, void ** ppbData,
- void * & pLockedData, size_t & LockedSize) {
+_getMapInfo(IDirect3DIndexBuffer9 *pBuffer, UINT OffsetToLock, UINT SizeToLock, void ** ppbData,
+ void * & pLockedData, size_t & MappedSize) {
pLockedData = *ppbData;
- LockedSize = 0;
+ MappedSize = 0;
if (SizeToLock == 0) {
D3DINDEXBUFFER_DESC Desc;
if (FAILED(hr)) {
return;
}
- LockedSize = Desc.Size;
+ MappedSize = Desc.Size;
} else {
- LockedSize = SizeToLock;
+ MappedSize = SizeToLock;
}
}
static inline void
-_getLockInfo(IDirect3DSurface9 *pSurface, const D3DLOCKED_RECT *pLockedRect, const RECT *pRect,
- void * & pLockedData, size_t & LockedSize) {
+_getMapInfo(IDirect3DSurface9 *pSurface, const D3DLOCKED_RECT *pLockedRect, const RECT *pRect,
+ void * & pLockedData, size_t & MappedSize) {
pLockedData = pLockedRect->pBits;
- LockedSize = 0;
+ MappedSize = 0;
HRESULT hr;
Height = Desc.Height;
}
- LockedSize = _getLockSize(Desc.Format, Width, Height, pLockedRect->Pitch);
+ MappedSize = _getLockSize(Desc.Format, Width, Height, pLockedRect->Pitch);
}
static inline void
-_getLockInfo(IDirect3DTexture9 *pTexture, UINT Level, const D3DLOCKED_RECT *pLockedRect, const RECT *pRect,
- void * & pLockedData, size_t & LockedSize) {
+_getMapInfo(IDirect3DTexture9 *pTexture, UINT Level, const D3DLOCKED_RECT *pLockedRect, const RECT *pRect,
+ void * & pLockedData, size_t & MappedSize) {
pLockedData = pLockedRect->pBits;
- LockedSize = 0;
+ MappedSize = 0;
HRESULT hr;
Height = Desc.Height;
}
- LockedSize = _getLockSize(Desc.Format, Width, Height, pLockedRect->Pitch);
+ MappedSize = _getLockSize(Desc.Format, Width, Height, pLockedRect->Pitch);
}
static inline void
-_getLockInfo(IDirect3DCubeTexture9 *pTexture, D3DCUBEMAP_FACES FaceType, UINT Level, const D3DLOCKED_RECT *pLockedRect, const RECT *pRect,
- void * & pLockedData, size_t & LockedSize) {
+_getMapInfo(IDirect3DCubeTexture9 *pTexture, D3DCUBEMAP_FACES FaceType, UINT Level, const D3DLOCKED_RECT *pLockedRect, const RECT *pRect,
+ void * & pLockedData, size_t & MappedSize) {
pLockedData = pLockedRect->pBits;
- LockedSize = 0;
+ MappedSize = 0;
HRESULT hr;
Height = Desc.Height;
}
- LockedSize = _getLockSize(Desc.Format, Width, Height, pLockedRect->Pitch);
+ MappedSize = _getLockSize(Desc.Format, Width, Height, pLockedRect->Pitch);
}
static inline void
-_getLockInfo(IDirect3DVolume9 *pVolume, const D3DLOCKED_BOX *pLockedVolume, const D3DBOX *pBox,
- void * & pLockedData, size_t & LockedSize) {
+_getMapInfo(IDirect3DVolume9 *pVolume, const D3DLOCKED_BOX *pLockedVolume, const D3DBOX *pBox,
+ void * & pLockedData, size_t & MappedSize) {
pLockedData = pLockedVolume->pBits;
- LockedSize = 0;
+ MappedSize = 0;
HRESULT hr;
Depth = Desc.Depth;
}
- LockedSize = _getLockSize(Desc.Format, Width, Height, pLockedVolume->RowPitch, Depth, pLockedVolume->SlicePitch);
+ MappedSize = _getLockSize(Desc.Format, Width, Height, pLockedVolume->RowPitch, Depth, pLockedVolume->SlicePitch);
}
static inline void
-_getLockInfo(IDirect3DVolumeTexture9 *pTexture, UINT Level, const D3DLOCKED_BOX *pLockedVolume, const D3DBOX *pBox,
- void * & pLockedData, size_t & LockedSize) {
+_getMapInfo(IDirect3DVolumeTexture9 *pTexture, UINT Level, const D3DLOCKED_BOX *pLockedVolume, const D3DBOX *pBox,
+ void * & pLockedData, size_t & MappedSize) {
pLockedData = pLockedVolume->pBits;
- LockedSize = 0;
+ MappedSize = 0;
HRESULT hr;
Depth = Desc.Depth;
}
- LockedSize = _getLockSize(Desc.Format, Width, Height, pLockedVolume->RowPitch, Depth, pLockedVolume->SlicePitch);
+ MappedSize = _getLockSize(Desc.Format, Width, Height, pLockedVolume->RowPitch, Depth, pLockedVolume->SlicePitch);
}
def retraceModule(self, api):
print '// Swizzling mapping for lock addresses'
- print 'static std::map<void *, void *> _locks;'
+ print 'static std::map<void *, void *> _maps;'
print
self.table_name = 'd3dretrace::d3d_callbacks'
if method.name in ('Lock', 'LockRect', 'LockBox'):
print ' VOID *_pbData = NULL;'
- print ' size_t _LockedSize = 0;'
- print ' _getLockInfo(_this, %s, _pbData, _LockedSize);' % ', '.join(method.argNames()[:-1])
- print ' _locks[_this] = _pbData;'
+ print ' size_t _MappedSize = 0;'
+ print ' _getMapInfo(_this, %s, _pbData, _MappedSize);' % ', '.join(method.argNames()[:-1])
+ print ' _maps[_this] = _pbData;'
if method.name in ('Unlock', 'UnlockRect', 'UnlockBox'):
print ' VOID *_pbData = 0;'
- print ' _pbData = _locks[_this];'
+ print ' _pbData = _maps[_this];'
print ' if (_pbData) {'
print ' retrace::delRegionByPointer(_pbData);'
print ' }'
]
IDirect3DVertexBuffer9.methods += [
- StdMethod(HRESULT, "Lock", [(UINT, "OffsetToLock"), (UINT, "SizeToLock"), Out(Pointer(LinearPointer(Void, "_LockedSize")), "ppbData"), (D3DLOCK, "Flags")]),
+ StdMethod(HRESULT, "Lock", [(UINT, "OffsetToLock"), (UINT, "SizeToLock"), Out(Pointer(LinearPointer(Void, "_MappedSize")), "ppbData"), (D3DLOCK, "Flags")]),
StdMethod(HRESULT, "Unlock", []),
StdMethod(HRESULT, "GetDesc", [Out(Pointer(D3DVERTEXBUFFER_DESC), "pDesc")], sideeffects=False),
]
IDirect3DIndexBuffer9.methods += [
- StdMethod(HRESULT, "Lock", [(UINT, "OffsetToLock"), (UINT, "SizeToLock"), Out(Pointer(LinearPointer(Void, "_LockedSize")), "ppbData"), (D3DLOCK, "Flags")]),
+ StdMethod(HRESULT, "Lock", [(UINT, "OffsetToLock"), (UINT, "SizeToLock"), Out(Pointer(LinearPointer(Void, "_MappedSize")), "ppbData"), (D3DLOCK, "Flags")]),
StdMethod(HRESULT, "Unlock", []),
StdMethod(HRESULT, "GetDesc", [Out(Pointer(D3DINDEXBUFFER_DESC), "pDesc")], sideeffects=False),
]
D3DLOCKED_RECT = Struct("D3DLOCKED_RECT", [
(INT, "Pitch"),
- (LinearPointer(Void, "_LockedSize"), "pBits"),
+ (LinearPointer(Void, "_MappedSize"), "pBits"),
])
D3DBOX = Struct("D3DBOX", [
D3DLOCKED_BOX = Struct("D3DLOCKED_BOX", [
(INT, "RowPitch"),
(INT, "SlicePitch"),
- (LinearPointer(Void, "_LockedSize"), "pBits"),
+ (LinearPointer(Void, "_MappedSize"), "pBits"),
])
D3DRANGE = Struct("D3DRANGE", [
interface.getMethodByName('LockRect') is not None or \
interface.getMethodByName('LockBox') is not None:
variables += [
- ('size_t', '_LockedSize', '0'),
+ ('size_t', '_MappedSize', '0'),
('VOID *', 'm_pbData', '0'),
]
def implementWrapperInterfaceMethodBody(self, interface, base, method):
if method.name in ('Unlock', 'UnlockRect', 'UnlockBox'):
- print ' if (_LockedSize && m_pbData) {'
- self.emit_memcpy('(LPBYTE)m_pbData', '(LPBYTE)m_pbData', '_LockedSize')
+ print ' if (_MappedSize && m_pbData) {'
+ self.emit_memcpy('(LPBYTE)m_pbData', '(LPBYTE)m_pbData', '_MappedSize')
print ' }'
DllTracer.implementWrapperInterfaceMethodBody(self, interface, base, method)
if method.name in ('Lock', 'LockRect', 'LockBox'):
# FIXME: handle recursive locks
print ' if (SUCCEEDED(_result) && !(Flags & D3DLOCK_READONLY)) {'
- print ' _getLockInfo(_this, %s, m_pbData, _LockedSize);' % ', '.join(method.argNames()[:-1])
+ print ' _getMapInfo(_this, %s, m_pbData, _MappedSize);' % ', '.join(method.argNames()[:-1])
print ' } else {'
print ' m_pbData = NULL;'
- print ' _LockedSize = 0;'
+ print ' _MappedSize = 0;'
print ' }'