Commit ed96dd72 authored by Kjell Rune Skaaraas's avatar Kjell Rune Skaaraas Committed by Alexandre Julliard

wined3d: Implement IWineD3DResourceImpl_GetPriority and…

wined3d: Implement IWineD3DResourceImpl_GetPriority and IWineD3DResourceImpl_SetPriority for resource management.
parent af086800
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment