mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
d3d9: Implement IDirect3D9Ex::GetAdapterLUID().
This commit is contained in:
parent
03f61decc9
commit
ed73f0a1b0
@ -481,9 +481,23 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3D9ExImpl_CreateDeviceEx(IDirect3
|
||||
|
||||
static HRESULT WINAPI IDirect3D9ExImpl_GetAdapterLUID(IDirect3D9Ex *iface, UINT adapter, LUID *luid)
|
||||
{
|
||||
FIXME("iface %p, adapter %u, luid %p stub!\n", iface, adapter, luid);
|
||||
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
|
||||
WINED3DADAPTER_IDENTIFIER adapter_id;
|
||||
HRESULT hr;
|
||||
|
||||
return D3DERR_DRIVERINTERNALERROR;
|
||||
TRACE("iface %p, adapter %u, luid %p.\n", iface, adapter, luid);
|
||||
|
||||
adapter_id.driver_size = 0;
|
||||
adapter_id.description_size = 0;
|
||||
adapter_id.device_name_size = 0;
|
||||
|
||||
wined3d_mutex_lock();
|
||||
hr = IWineD3D_GetAdapterIdentifier(This->WineD3D, adapter, 0, &adapter_id);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
memcpy(luid, &adapter_id.adapter_luid, sizeof(*luid));
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2424,6 +2424,7 @@ static HRESULT WINAPI IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Ad
|
||||
pIdentifier->revision = 0;
|
||||
memcpy(&pIdentifier->device_identifier, &IID_D3DDEVICE_D3DUID, sizeof(pIdentifier->device_identifier));
|
||||
pIdentifier->whql_level = (Flags & WINED3DENUM_NO_WHQL_LEVEL) ? 0 : 1;
|
||||
memcpy(&pIdentifier->adapter_luid, &adapter->luid, sizeof(pIdentifier->adapter_luid));
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@ -4678,6 +4679,15 @@ BOOL InitAdapters(IWineD3DImpl *This)
|
||||
adapter->monitorPoint.x = -1;
|
||||
adapter->monitorPoint.y = -1;
|
||||
|
||||
if (!AllocateLocallyUniqueId(&adapter->luid))
|
||||
{
|
||||
DWORD err = GetLastError();
|
||||
ERR("Failed to set adapter LUID (%#x).\n", err);
|
||||
goto nogl_adapter;
|
||||
}
|
||||
TRACE("Allocated LUID %08x:%08x for adapter.\n",
|
||||
adapter->luid.HighPart, adapter->luid.LowPart);
|
||||
|
||||
if (!WineD3D_CreateFakeGLContext(&fake_gl_ctx))
|
||||
{
|
||||
ERR("Failed to get a gl context for default adapter\n");
|
||||
|
@ -1335,6 +1335,7 @@ struct wined3d_adapter
|
||||
BOOL brokenStencil; /* Set on cards which only offer mixed depth+stencil */
|
||||
unsigned int TextureRam; /* Amount of texture memory both video ram + AGP/TurboCache/HyperMemory/.. */
|
||||
unsigned int UsedTextureRam;
|
||||
LUID luid;
|
||||
};
|
||||
|
||||
BOOL initPixelFormats(struct wined3d_gl_info *gl_info, enum wined3d_pci_vendor vendor) DECLSPEC_HIDDEN;
|
||||
|
@ -42,6 +42,12 @@ typedef struct _RGNDATA
|
||||
RGNDATAHEADER rdh;
|
||||
char Buffer[1];
|
||||
} RGNDATA;
|
||||
|
||||
typedef struct _LUID
|
||||
{
|
||||
DWORD LowPart;
|
||||
LONG HighPart;
|
||||
} LUID, *PLUID;
|
||||
cpp_quote("#endif")
|
||||
|
||||
cpp_quote("#define WINED3D_OK S_OK")
|
||||
@ -1699,6 +1705,7 @@ typedef struct _WINED3DADAPTER_IDENTIFIER
|
||||
DWORD revision;
|
||||
GUID device_identifier;
|
||||
DWORD whql_level;
|
||||
LUID adapter_luid;
|
||||
} WINED3DADAPTER_IDENTIFIER;
|
||||
|
||||
typedef struct _WINED3DPRESENT_PARAMETERS
|
||||
|
Loading…
Reference in New Issue
Block a user