mirror of
https://github.com/reactos/wine.git
synced 2025-02-09 05:36:56 +00:00
wined3d: Implement IWineD3DResourceImpl_GetPriority and IWineD3DResourceImpl_SetPriority for resource management.
This commit is contained in:
parent
af08680037
commit
ed96dd72e3
@ -90,6 +90,7 @@ static void WINAPI IWineD3DDeviceImpl_AddResource(IWineD3DDevice *iface, IWineD3
|
||||
object->resource.format = Format; \
|
||||
object->resource.usage = Usage; \
|
||||
object->resource.size = _size; \
|
||||
object->resource.priority = 0; \
|
||||
list_init(&object->resource.privateData); \
|
||||
/* Check that we have enough video ram left */ \
|
||||
if (Pool == WINED3DPOOL_DEFAULT) { \
|
||||
|
@ -217,16 +217,18 @@ HRESULT WINAPI IWineD3DResourceImpl_FreePrivateData(IWineD3DResource *iface, REF
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
/* Priority support is not implemented yet */
|
||||
DWORD WINAPI IWineD3DResourceImpl_SetPriority(IWineD3DResource *iface, DWORD PriorityNew) {
|
||||
IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface;
|
||||
FIXME("(%p) : stub\n", This);
|
||||
return 0;
|
||||
DWORD PriorityOld = This->resource.priority;
|
||||
This->resource.priority = PriorityNew;
|
||||
TRACE("(%p) : new priority %d, returning old priority %d\n", This, PriorityNew, PriorityOld );
|
||||
return PriorityOld;
|
||||
}
|
||||
|
||||
DWORD WINAPI IWineD3DResourceImpl_GetPriority(IWineD3DResource *iface) {
|
||||
IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface;
|
||||
FIXME("(%p) : stub\n", This);
|
||||
return 0;
|
||||
TRACE("(%p) : returning %d\n", This, This->resource.priority );
|
||||
return This->resource.priority;
|
||||
}
|
||||
|
||||
/* Preloading of resources is not supported yet */
|
||||
|
@ -1096,6 +1096,7 @@ typedef struct IWineD3DResourceClass
|
||||
UINT size;
|
||||
DWORD usage;
|
||||
WINED3DFORMAT format;
|
||||
DWORD priority;
|
||||
BYTE *allocatedMemory; /* Pointer to the real data location */
|
||||
BYTE *heapMemory; /* Pointer to the HeapAlloced block of memory */
|
||||
struct list privateData;
|
||||
|
Loading…
x
Reference in New Issue
Block a user