Commit 38178541 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

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.
parent 81075d2d
......@@ -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 */
......
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