wined3d: Store a pointer to the format description in the resource.
The goal is to eventually use a pointer to the format description in most places where we currently use WINED3DFORMAT. IWineD3DSurfaceImpl for example has copies of several fields from the format description, but also needs to lookup the format description itself in several places.
This commit is contained in:
parent
81075d2db3
commit
38178541b0
|
@ -35,6 +35,7 @@ HRESULT resource_init(struct IWineD3DResourceClass *resource, WINED3DRESOURCETYP
|
|||
resource->ref = 1;
|
||||
resource->pool = pool;
|
||||
resource->format = format;
|
||||
getFormatDescEntry(format, &device->adapter->gl_info, &resource->format_desc);
|
||||
resource->usage = usage;
|
||||
resource->size = size;
|
||||
resource->priority = 0;
|
||||
|
|
|
@ -1236,6 +1236,7 @@ typedef struct IWineD3DResourceClass
|
|||
UINT size;
|
||||
DWORD usage;
|
||||
WINED3DFORMAT format;
|
||||
const struct GlPixelFormatDesc *format_desc;
|
||||
DWORD priority;
|
||||
BYTE *allocatedMemory; /* Pointer to the real data location */
|
||||
BYTE *heapMemory; /* Pointer to the HeapAlloced block of memory */
|
||||
|
|
Loading…
Reference in New Issue