Henri Verbeet : wined3d: Store a pointer to the format description in the resource.
Alexandre Julliard
julliard at winehq.org
Thu Mar 12 09:54:29 CDT 2009
Module: wine
Branch: master
Commit: 38178541b032edfd03086496b7c1c5c3ccfc01e7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=38178541b032edfd03086496b7c1c5c3ccfc01e7
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Thu Mar 12 09:53:14 2009 +0100
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.
---
dlls/wined3d/resource.c | 1 +
dlls/wined3d/wined3d_private.h | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index b4e49b1..34015f8 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -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;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index d04164a..8ed82fc 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -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 */
More information about the wine-cvs
mailing list