Module: wine
Branch: master
Commit: 38178541b032edfd03086496b7c1c5c3ccfc01e7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=38178541b032edfd03086496b…
Author: Henri Verbeet <hverbeet(a)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 */
Module: wine
Branch: master
Commit: 81075d2db39273186f8298c3a042dc2e13caaab9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=81075d2db39273186f8298c3a…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Thu Mar 12 09:53:14 2009 +0100
wined3d: Remove a redundant check.
This is redundant now, InitAdapters() will only be called once for each
IWineD3DImpl object, as pointed out by Allan Tong.
---
dlls/wined3d/directx.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 155d704..55b2b7e 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -4236,7 +4236,6 @@ BOOL InitAdapters(IWineD3DImpl *This)
/* No need to hold any lock. The calling library makes sure only one thread calls
* wined3d simultaneously
*/
- if (This->adapter_count) return This->adapters[0].opengl;
TRACE("Initializing adapters\n");