d3d9: Fix handling of D3DENUM_WHQL_LEVEL.

D3DENUM_NO_WHQL_LEVEL from Direct3D 8 was replaced with D3DENUM_WHQL_LEVEL in
Direct3D 9.

Signed-off-by: Rafał Harabień <rafalh92@outlook.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rafał Harabień 2020-12-14 17:57:24 +03:30 committed by Alexandre Julliard
parent 85152f3a50
commit e6c777d26d
5 changed files with 7 additions and 4 deletions

View File

@ -121,6 +121,9 @@ static HRESULT WINAPI d3d8_GetAdapterIdentifier(IDirect3D8 *iface, UINT adapter,
adapter_id.description = identifier->Description;
adapter_id.description_size = sizeof(identifier->Description);
/* D3DENUM_NO_WHQL_LEVEL -> WINED3DENUM_WHQL_LEVEL */
flags ^= D3DENUM_NO_WHQL_LEVEL;
wined3d_adapter = wined3d_output_get_adapter(d3d8->wined3d_outputs[output_idx]);
if (SUCCEEDED(hr = wined3d_adapter_get_identifier(wined3d_adapter, flags, &adapter_id)))
{

View File

@ -2642,7 +2642,7 @@ static HRESULT WINAPI ddraw7_GetDeviceIdentifier(IDirectDraw7 *iface,
adapter_id.description = DDDI->szDescription;
adapter_id.description_size = sizeof(DDDI->szDescription);
wined3d_mutex_lock();
hr = wined3d_adapter_get_identifier(ddraw->wined3d_adapter, 0x0, &adapter_id);
hr = wined3d_adapter_get_identifier(ddraw->wined3d_adapter, WINED3DENUM_WHQL_LEVEL, &adapter_id);
wined3d_mutex_unlock();
if (FAILED(hr)) return hr;

View File

@ -1513,7 +1513,7 @@ HRESULT CDECL wined3d_adapter_get_identifier(const struct wined3d_adapter *adapt
identifier->device_identifier = IID_D3DDEVICE_D3DUID;
identifier->driver_uuid = adapter->driver_uuid;
identifier->device_uuid = adapter->device_uuid;
identifier->whql_level = (flags & WINED3DENUM_NO_WHQL_LEVEL) ? 0 : 1;
identifier->whql_level = (flags & WINED3DENUM_WHQL_LEVEL) ? 1 : 0;
identifier->adapter_luid = adapter->luid;
identifier->video_memory = min(~(SIZE_T)0, adapter->driver_info.vram_bytes);
identifier->shared_system_memory = min(~(SIZE_T)0, adapter->driver_info.sysmem_bytes);

View File

@ -61,7 +61,7 @@
*/
#define D3D_SDK_VERSION 32
#define D3DADAPTER_DEFAULT 0
#define D3DENUM_NO_WHQL_LEVEL __MSABI_LONG(0x00000002)
#define D3DENUM_WHQL_LEVEL __MSABI_LONG(0x00000002)
#define D3DPRESENT_DONOTWAIT __MSABI_LONG(1)
#define D3DPRESENT_LINEAR_CONTENT __MSABI_LONG(2)
#define D3DPRESENT_BACK_BUFFERS_MAX __MSABI_LONG(3)

View File

@ -874,7 +874,7 @@ enum wined3d_shader_type
#define WINED3DCOLORWRITEENABLE_ALPHA (1u << 3)
#define WINED3DADAPTER_DEFAULT 0
#define WINED3DENUM_NO_WHQL_LEVEL 2
#define WINED3DENUM_WHQL_LEVEL 2
#define WINED3DTSS_TCI_PASSTHRU 0x00000
#define WINED3DTSS_TCI_CAMERASPACENORMAL 0x10000