mirror of
https://github.com/reactos/reactos.git
synced 2025-05-07 02:41:22 +00:00
update d3d8 to wine 0.9.49
svn path=/trunk/; revision=30730
This commit is contained in:
parent
3d237b54ad
commit
c6102fb959
6 changed files with 32 additions and 25 deletions
|
@ -1803,6 +1803,12 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetIndices(LPDIRECT3DDEVICE8 iface, I
|
||||||
TRACE("(%p) Relay\n", This);
|
TRACE("(%p) Relay\n", This);
|
||||||
|
|
||||||
EnterCriticalSection(&d3d8_cs);
|
EnterCriticalSection(&d3d8_cs);
|
||||||
|
/* WineD3D takes an INT(due to d3d9), but d3d8 uses UINTs. Do I have to add a check here that
|
||||||
|
* the UINT doesn't cause an overflow in the INT? It seems rather unlikely because such large
|
||||||
|
* vertex buffers can't be created to address them with an index that requires the 32nd bit
|
||||||
|
* (4 Byte minimum vertex size * 2^31-1 -> 8 gb buffer. The index sign would be the least
|
||||||
|
* problem)
|
||||||
|
*/
|
||||||
IWineD3DDevice_SetBaseVertexIndex(This->WineD3DDevice, baseVertexIndex);
|
IWineD3DDevice_SetBaseVertexIndex(This->WineD3DDevice, baseVertexIndex);
|
||||||
hr = IWineD3DDevice_SetIndices(This->WineD3DDevice,
|
hr = IWineD3DDevice_SetIndices(This->WineD3DDevice,
|
||||||
pIndexData ? ((IDirect3DIndexBuffer8Impl *)pIndexData)->wineD3DIndexBuffer : NULL);
|
pIndexData ? ((IDirect3DIndexBuffer8Impl *)pIndexData)->wineD3DIndexBuffer : NULL);
|
||||||
|
@ -1822,7 +1828,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetIndices(LPDIRECT3DDEVICE8 iface, I
|
||||||
}
|
}
|
||||||
|
|
||||||
EnterCriticalSection(&d3d8_cs);
|
EnterCriticalSection(&d3d8_cs);
|
||||||
IWineD3DDevice_GetBaseVertexIndex(This->WineD3DDevice, pBaseVertexIndex);
|
/* The case from UINT to INT is safe because d3d8 will never set negative values */
|
||||||
|
IWineD3DDevice_GetBaseVertexIndex(This->WineD3DDevice, (INT *) pBaseVertexIndex);
|
||||||
rc = IWineD3DDevice_GetIndices(This->WineD3DDevice, &retIndexData);
|
rc = IWineD3DDevice_GetIndices(This->WineD3DDevice, &retIndexData);
|
||||||
if (SUCCEEDED(rc) && retIndexData) {
|
if (SUCCEEDED(rc) && retIndexData) {
|
||||||
IWineD3DIndexBuffer_GetParent(retIndexData, (IUnknown **)ppIndexData);
|
IWineD3DIndexBuffer_GetParent(retIndexData, (IUnknown **)ppIndexData);
|
||||||
|
|
|
@ -284,7 +284,7 @@ size_t convert_to_wined3d_declaration(const DWORD *d3d8_elements, DWORD *d3d8_el
|
||||||
TRACE("d3d8_elements %p, wined3d_elements %p\n", d3d8_elements, wined3d_elements);
|
TRACE("d3d8_elements %p, wined3d_elements %p\n", d3d8_elements, wined3d_elements);
|
||||||
|
|
||||||
/* 128 should be enough for anyone... */
|
/* 128 should be enough for anyone... */
|
||||||
*wined3d_elements = HeapAlloc(GetProcessHeap(), 0, 128 * sizeof(WINED3DVERTEXELEMENT));
|
*wined3d_elements = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 128 * sizeof(WINED3DVERTEXELEMENT));
|
||||||
while (D3DVSD_END() != *token)
|
while (D3DVSD_END() != *token)
|
||||||
{
|
{
|
||||||
token_type = ((*token & D3DVSD_TOKENTYPEMASK) >> D3DVSD_TOKENTYPESHIFT);
|
token_type = ((*token & D3DVSD_TOKENTYPEMASK) >> D3DVSD_TOKENTYPESHIFT);
|
||||||
|
|
Loading…
Reference in a new issue