wined3d: Use Map and Unmap for index buffers.
Just a change in name to prepare for the next patch
This commit is contained in:
parent
dc80a3ede5
commit
3ed94329a3
|
@ -161,7 +161,7 @@ static HRESULT WINAPI IDirect3DIndexBuffer8Impl_Lock(LPDIRECT3DINDEXBUFFER8 ifac
|
|||
TRACE("(%p) Relay\n", This);
|
||||
|
||||
EnterCriticalSection(&d3d8_cs);
|
||||
hr = IWineD3DIndexBuffer_Lock(This->wineD3DIndexBuffer, OffsetToLock, SizeToLock, ppbData, Flags);
|
||||
hr = IWineD3DIndexBuffer_Map(This->wineD3DIndexBuffer, OffsetToLock, SizeToLock, ppbData, Flags);
|
||||
LeaveCriticalSection(&d3d8_cs);
|
||||
return hr;
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ static HRESULT WINAPI IDirect3DIndexBuffer8Impl_Unlock(LPDIRECT3DINDEXBUFFER8 if
|
|||
TRACE("(%p) Relay\n", This);
|
||||
|
||||
EnterCriticalSection(&d3d8_cs);
|
||||
hr = IWineD3DIndexBuffer_Unlock(This->wineD3DIndexBuffer);
|
||||
hr = IWineD3DIndexBuffer_Unmap(This->wineD3DIndexBuffer);
|
||||
LeaveCriticalSection(&d3d8_cs);
|
||||
return hr;
|
||||
}
|
||||
|
|
|
@ -162,7 +162,7 @@ static HRESULT WINAPI IDirect3DIndexBuffer9Impl_Lock(LPDIRECT3DINDEXBUFFER9 ifac
|
|||
TRACE("(%p) Relay\n", This);
|
||||
|
||||
EnterCriticalSection(&d3d9_cs);
|
||||
hr = IWineD3DIndexBuffer_Lock(This->wineD3DIndexBuffer, OffsetToLock, SizeToLock, (BYTE **)ppbData, Flags);
|
||||
hr = IWineD3DIndexBuffer_Map(This->wineD3DIndexBuffer, OffsetToLock, SizeToLock, (BYTE **)ppbData, Flags);
|
||||
LeaveCriticalSection(&d3d9_cs);
|
||||
return hr;
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ static HRESULT WINAPI IDirect3DIndexBuffer9Impl_Unlock(LPDIRECT3DINDEXBUFFER9 if
|
|||
TRACE("(%p) Relay\n", This);
|
||||
|
||||
EnterCriticalSection(&d3d9_cs);
|
||||
hr = IWineD3DIndexBuffer_Unlock(This->wineD3DIndexBuffer);
|
||||
hr = IWineD3DIndexBuffer_Unmap(This->wineD3DIndexBuffer);
|
||||
LeaveCriticalSection(&d3d9_cs);
|
||||
return hr;
|
||||
}
|
||||
|
|
|
@ -4271,11 +4271,11 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface,
|
|||
* or a SetData-Method for the index buffer, which
|
||||
* overrides the index buffer data with our pointer.
|
||||
*/
|
||||
hr = IWineD3DIndexBuffer_Lock(This->indexbuffer,
|
||||
0 /* OffSetToLock */,
|
||||
IndexCount * sizeof(WORD),
|
||||
(BYTE **) &LockedIndices,
|
||||
0 /* Flags */);
|
||||
hr = IWineD3DIndexBuffer_Map(This->indexbuffer,
|
||||
0 /* OffSetToLock */,
|
||||
IndexCount * sizeof(WORD),
|
||||
(BYTE **) &LockedIndices,
|
||||
0 /* Flags */);
|
||||
assert(IndexCount < 0x100000);
|
||||
if(hr != D3D_OK)
|
||||
{
|
||||
|
@ -4284,7 +4284,7 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface,
|
|||
return hr;
|
||||
}
|
||||
memcpy(LockedIndices, Indices, IndexCount * sizeof(WORD));
|
||||
hr = IWineD3DIndexBuffer_Unlock(This->indexbuffer);
|
||||
hr = IWineD3DIndexBuffer_Unmap(This->indexbuffer);
|
||||
if(hr != D3D_OK)
|
||||
{
|
||||
ERR("(%p) IWineD3DIndexBuffer::Unlock failed with hr = %08x\n", This, hr);
|
||||
|
|
|
@ -1091,7 +1091,7 @@ static WINED3DRESOURCETYPE STDMETHODCALLTYPE IWineD3DIndexBufferImpl_GetType(IWi
|
|||
|
||||
/* IWineD3DIndexBuffer methods */
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE IWineD3DIndexBufferImpl_Lock(IWineD3DIndexBuffer *iface,
|
||||
static HRESULT STDMETHODCALLTYPE IWineD3DIndexBufferImpl_Map(IWineD3DIndexBuffer *iface,
|
||||
UINT OffsetToLock, UINT SizeToLock, BYTE **ppbData, DWORD Flags)
|
||||
{
|
||||
IWineD3DIndexBufferImpl *This = (IWineD3DIndexBufferImpl *)iface;
|
||||
|
@ -1128,7 +1128,7 @@ static HRESULT STDMETHODCALLTYPE IWineD3DIndexBufferImpl_Lock(IWineD3DIndexBuffe
|
|||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE IWineD3DIndexBufferImpl_Unlock(IWineD3DIndexBuffer *iface)
|
||||
static HRESULT STDMETHODCALLTYPE IWineD3DIndexBufferImpl_Unmap(IWineD3DIndexBuffer *iface)
|
||||
{
|
||||
IWineD3DIndexBufferImpl *This = (IWineD3DIndexBufferImpl *)iface;
|
||||
ULONG locks = InterlockedDecrement(&This->lockcount);
|
||||
|
@ -1193,7 +1193,7 @@ const IWineD3DIndexBufferVtbl IWineD3DIndexBuffer_Vtbl =
|
|||
IWineD3DIndexBufferImpl_UnLoad,
|
||||
IWineD3DIndexBufferImpl_GetType,
|
||||
/* IWineD3DIndexBuffer methods */
|
||||
IWineD3DIndexBufferImpl_Lock,
|
||||
IWineD3DIndexBufferImpl_Unlock,
|
||||
IWineD3DIndexBufferImpl_Map,
|
||||
IWineD3DIndexBufferImpl_Unmap,
|
||||
IWineD3DIndexBufferImpl_GetDesc,
|
||||
};
|
||||
|
|
|
@ -2346,13 +2346,13 @@ interface IWineD3DRendertargetView : IWineD3DBase
|
|||
]
|
||||
interface IWineD3DIndexBuffer : IWineD3DResource
|
||||
{
|
||||
HRESULT Lock(
|
||||
HRESULT Map(
|
||||
[in] UINT offset,
|
||||
[in] UINT size,
|
||||
[out] BYTE **data,
|
||||
[in] DWORD flags
|
||||
);
|
||||
HRESULT Unlock(
|
||||
HRESULT Unmap(
|
||||
);
|
||||
HRESULT GetDesc(
|
||||
[out] WINED3DBUFFER_DESC *desc
|
||||
|
|
Loading…
Reference in New Issue