resource.c revision 845d0e4d3aefdc097ff0b3f1b1808f4b72e0a7d0
/*
* IWineD3DResource Implementation
*
* Copyright 2002-2004 Jason Edmeades
* Copyright 2003-2004 Raphael Junqueira
* Copyright 2004 Christian Costa
* Copyright 2005 Oliver Stieber
* Copyright 2009 Henri Verbeet for CodeWeavers
*
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
* Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
* other than GPL or LGPL is available it will apply instead, Sun elects to use only
* the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
* a choice of LGPL license versions is made available with the language indicating
* that LGPLv2 or any later version may be used, or where a choice of which version
* of the LGPL is applied is otherwise unspecified.
*/
#include "config.h"
#include "wined3d_private.h"
#ifdef VBOXWDDM
, void *pvClientMem
#endif
)
{
#ifdef VBOXWDDM
{
}
else
#endif
{
#ifdef VBOXWDDM
{
if (*shared_handle)
}
#endif
if (size)
{
if (!resource->heapMemory)
{
ERR("Out of memory!\n");
return WINED3DERR_OUTOFVIDEOMEMORY;
}
}
else
{
}
resource->allocatedMemory = (BYTE *)(((ULONG_PTR)resource->heapMemory + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1));
}
/* Check that we have enough video ram left */
if (pool == WINED3DPOOL_DEFAULT)
{
{
ERR("Out of adapter memory\n");
return WINED3DERR_OUTOFVIDEOMEMORY;
}
}
return WINED3D_OK;
}
{
}
if(hr != WINED3D_OK) {
}
}
}
{
{
return data;
}
}
TRACE("Not found\n");
return NULL;
}
{
if (Flags & WINED3DSPD_IUNKNOWN) {
if(SizeOfData != sizeof(IUnknown *)) {
return WINED3DERR_INVALIDCALL;
}
}
else
{
return E_OUTOFMEMORY;
}
}
return WINED3D_OK;
}
HRESULT resource_get_private_data(IWineD3DResource *iface, REFGUID refguid, void *pData, DWORD *pSizeOfData)
{
return WINED3DERR_MOREDATA;
}
{
/* D3D8 and D3D9 addref the private data, DDraw does not. This can't be handled in
* ddraw because it doesn't know if the pointer returned is an IUnknown * or just a
* Blob
*/
}
}
else {
}
return WINED3D_OK;
}
{
{
} else {
}
return WINED3D_OK;
}
{
return PriorityOld;
}
{
}
{
}
{
return WINED3D_OK;
}