wined3d: Rename WineD3DAdapterChangeGLRam() to adapter_adjust_memory().
And make it work on an adapter instead of a device.
This commit is contained in:
parent
01d5a0f53b
commit
78cbe0bc74
|
@ -369,12 +369,10 @@ fail:
|
|||
}
|
||||
|
||||
/* Adjust the amount of used texture memory */
|
||||
unsigned int WineD3DAdapterChangeGLRam(struct wined3d_device *device, int glram)
|
||||
unsigned int adapter_adjust_memory(struct wined3d_adapter *adapter, int amount)
|
||||
{
|
||||
struct wined3d_adapter *adapter = device->adapter;
|
||||
|
||||
adapter->UsedTextureRam += glram;
|
||||
TRACE("Adjusted gl ram by %d to %d\n", glram, adapter->UsedTextureRam);
|
||||
adapter->UsedTextureRam += amount;
|
||||
TRACE("Adjusted adapter memory by %d to %d.\n", amount, adapter->UsedTextureRam);
|
||||
return adapter->UsedTextureRam;
|
||||
}
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
|
|||
HeapFree(GetProcessHeap(), 0, resource->heapMemory);
|
||||
return WINED3DERR_OUTOFVIDEOMEMORY;
|
||||
}
|
||||
WineD3DAdapterChangeGLRam(device, size);
|
||||
adapter_adjust_memory(device->adapter, size);
|
||||
}
|
||||
|
||||
device_resource_add(device, resource);
|
||||
|
@ -150,7 +150,7 @@ void resource_cleanup(struct wined3d_resource *resource)
|
|||
if (resource->pool == WINED3DPOOL_DEFAULT)
|
||||
{
|
||||
TRACE("Decrementing device memory pool by %u.\n", resource->size);
|
||||
WineD3DAdapterChangeGLRam(resource->device, 0 - resource->size);
|
||||
adapter_adjust_memory(resource->device->adapter, 0 - resource->size);
|
||||
}
|
||||
|
||||
LIST_FOR_EACH_SAFE(e1, e2, &resource->privateData)
|
||||
|
|
|
@ -1525,9 +1525,10 @@ struct wined3d_adapter
|
|||
const struct blit_shader *blitter;
|
||||
};
|
||||
|
||||
unsigned int adapter_adjust_memory(struct wined3d_adapter *adapter, int amount) DECLSPEC_HIDDEN;
|
||||
|
||||
BOOL initPixelFormats(struct wined3d_gl_info *gl_info, enum wined3d_pci_vendor vendor) DECLSPEC_HIDDEN;
|
||||
BOOL initPixelFormatsNoGL(struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
|
||||
extern unsigned int WineD3DAdapterChangeGLRam(struct wined3d_device *device, int glram) DECLSPEC_HIDDEN;
|
||||
extern void add_gl_compat_wrappers(struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
|
||||
|
||||
/*****************************************************************************
|
||||
|
|
Loading…
Reference in New Issue