Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/wined3d/directx.c | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 454125c1462d..45f3f61f2fe7 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -198,20 +198,26 @@ ULONG CDECL wined3d_decref(struct wined3d *wined3d) return refcount; }
-/* Certain applications (Steam) complain if we report an outdated driver version. In general, - * reporting a driver version is moot because we are not the Windows driver, and we have different - * bugs, features, etc. +/* Certain applications (e.g. Steam) complain if we report an outdated driver + * version. * * The driver version has the form "x.y.z.w". * - * "x" is the Windows version the driver is meant for: + * "x" is the Windows version / driver model the driver is meant for: * 4 -> 95/98/NT4 * 5 -> 2000 - * 6 -> 2000/XP - * 7 -> Vista - * 8 -> Windows 7 - * 9 -> Windows 8 - * 10 -> Windows 10 + * 6 -> XP + * 7 -> Vista - WDDM 1.0 + * 8 -> Windows 7 - WDDM 1.1 + * 9 -> Windows 8 - WDDM 1.2 + * 10 -> Windows 8.1 - WDDM 1.3 + * 20 -> Windows 10 - WDDM 2.0 + * 21 -> Windows 10 Anniversary Update - WDDM 2.1 + * 22 -> Windows 10 Creators Update - WDDM 2.2 + * 23 -> Windows 10 Fall Creators Update - WDDM 2.3 + * 24 -> Windows 10 April 2018 Update - WDDM 2.4 + * 25 -> Windows 10 October 2018 Update - WDDM 2.5 + * 26 -> Windows 10 May 2019 Update - WDDM 2.6 * * "y" is the maximum Direct3D version the driver supports. * y -> d3d version mapping: @@ -705,20 +711,25 @@ void wined3d_driver_info_init(struct wined3d_driver_info *driver_info, driver_os_version = 8; driver_model = DRIVER_MODEL_NT6X; } + else if (os_version.dwMinorVersion == 2) + { + driver_os_version = 9; + driver_model = DRIVER_MODEL_NT6X; + } else { if (os_version.dwMinorVersion > 3) { - FIXME("Unhandled OS version %u.%u, reporting Win 8.\n", + FIXME("Unhandled OS version %u.%u, reporting Windows 8.1.\n", os_version.dwMajorVersion, os_version.dwMinorVersion); } - driver_os_version = 9; + driver_os_version = 10; driver_model = DRIVER_MODEL_NT6X; } break;
case 10: - driver_os_version = 10; + driver_os_version = 26; driver_model = DRIVER_MODEL_NT6X; break;
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- v2: Move wined3d_driver_info_init() call after wined3d_adapter_gl_init_d3d_info() / wined3d_adapter_vk_init_d3d_info().
dlls/wined3d/adapter_gl.c | 29 +++---- dlls/wined3d/adapter_vk.c | 19 +++-- dlls/wined3d/directx.c | 135 +++++++++++++++++++++++---------- dlls/wined3d/wined3d_private.h | 5 +- 4 files changed, 123 insertions(+), 65 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index bc59d1b7439e..cc78c9046b6c 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -1034,9 +1034,10 @@ static const struct wined3d_gpu_description *query_gpu_description(const struct
/* Context activation is done by the caller. */ static void fixup_extensions(struct wined3d_gl_info *gl_info, struct wined3d_caps_gl_ctx *ctx, - const char *gl_renderer, enum wined3d_gl_vendor gl_vendor, - enum wined3d_pci_vendor card_vendor, enum wined3d_pci_device device) + const char *gl_renderer, enum wined3d_gl_vendor gl_vendor) { + enum wined3d_pci_vendor card_vendor = ctx->gpu_description->vendor; + enum wined3d_pci_device device = ctx->gpu_description->device; unsigned int i;
static const struct driver_quirk @@ -3393,15 +3394,12 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, {ARB_POLYGON_OFFSET_CLAMP, MAKEDWORD_VERSION(4, 6)}, {ARB_TEXTURE_FILTER_ANISOTROPIC, MAKEDWORD_VERSION(4, 6)}, }; - struct wined3d_driver_info *driver_info = &adapter->driver_info; const char *gl_vendor_str, *gl_renderer_str, *gl_version_str; - const struct wined3d_gpu_description *gpu_description; struct wined3d_gl_info *gl_info = &adapter->gl_info; + DWORD gl_version, gl_ext_emul_mask; const char *WGL_Extensions = NULL; enum wined3d_gl_vendor gl_vendor; - DWORD gl_version, gl_ext_emul_mask; GLint context_profile = 0; - UINT64 vram_bytes = 0; unsigned int i, j; HDC hdc;
@@ -3829,7 +3827,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, gl_vendor = wined3d_guess_gl_vendor(gl_info, gl_vendor_str, gl_renderer_str, gl_version_str); TRACE("Guessed GL vendor %#x.\n", gl_vendor);
- if (!(gpu_description = query_gpu_description(gl_info, &vram_bytes))) + if (!(caps_gl_ctx->gpu_description = query_gpu_description(gl_info, &caps_gl_ctx->vram_bytes))) { enum wined3d_feature_level feature_level; struct fragment_caps fragment_caps; @@ -3847,20 +3845,16 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, device = wined3d_guess_card(feature_level, gl_renderer_str, &gl_vendor, &vendor); TRACE("Guessed device PCI ID 0x%04x.\n", device);
- if (!(gpu_description = wined3d_get_gpu_description(vendor, device))) + if (!(caps_gl_ctx->gpu_description = wined3d_get_gpu_description(vendor, device))) { ERR("Card %04x:%04x not found in driver DB.\n", vendor, device); return FALSE; } } - fixup_extensions(gl_info, caps_gl_ctx, gl_renderer_str, gl_vendor, - gpu_description->vendor, gpu_description->device); - wined3d_driver_info_init(driver_info, gpu_description, vram_bytes, 0); - TRACE("Reporting (fake) driver version 0x%08x-0x%08x.\n", - driver_info->version_high, driver_info->version_low); + fixup_extensions(gl_info, caps_gl_ctx, gl_renderer_str, gl_vendor);
adapter->vram_bytes_used = 0; - TRACE("Emulating 0x%s bytes of video ram.\n", wine_dbgstr_longlong(driver_info->vram_bytes)); + TRACE("Emulating 0x%s bytes of video ram.\n", wine_dbgstr_longlong(caps_gl_ctx->vram_bytes));
if (gl_info->supported[EXT_MEMORY_OBJECT]) { @@ -5134,6 +5128,7 @@ static BOOL wined3d_adapter_gl_init(struct wined3d_adapter_gl *adapter_gl, MAKEDWORD_VERSION(3, 2), MAKEDWORD_VERSION(1, 0), }; + struct wined3d_driver_info *driver_info = &adapter_gl->a.driver_info; struct wined3d_gl_info *gl_info = &adapter_gl->a.gl_info; struct wined3d_caps_gl_ctx caps_gl_ctx = {0}; LUID primary_luid, *luid = NULL; @@ -5210,6 +5205,7 @@ static BOOL wined3d_adapter_gl_init(struct wined3d_adapter_gl *adapter_gl, }
wined3d_adapter_gl_init_d3d_info(adapter_gl, wined3d_creation_flags); + if (!adapter_gl->a.d3d_info.shader_color_key) { /* We do not want to deal with re-creating immutable texture storage @@ -5218,6 +5214,11 @@ static BOOL wined3d_adapter_gl_init(struct wined3d_adapter_gl *adapter_gl, gl_info->supported[ARB_TEXTURE_STORAGE] = FALSE; }
+ wined3d_driver_info_init(driver_info, caps_gl_ctx.gpu_description, adapter_gl->a.d3d_info.feature_level, + caps_gl_ctx.vram_bytes, 0); + TRACE("Reporting (fake) driver version 0x%08x-0x%08x.\n", + driver_info->version_high, driver_info->version_low); + if (wined3d_settings.offscreen_rendering_mode == ORM_BACKBUFFER) ERR_(winediag)("You are using the backbuffer for offscreen rendering. " "This is unsupported, and will be removed in a future version.\n"); diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c index 57972dbb7e7a..cbfb29cdd43b 100644 --- a/dlls/wined3d/adapter_vk.c +++ b/dlls/wined3d/adapter_vk.c @@ -2082,7 +2082,10 @@ static void adapter_vk_init_driver_info(struct wined3d_adapter_vk *adapter_vk, gpu_description = &description; }
- wined3d_driver_info_init(&adapter_vk->a.driver_info, gpu_description, vram_bytes, sysmem_bytes); + wined3d_driver_info_init(&adapter_vk->a.driver_info, gpu_description, adapter_vk->a.d3d_info.feature_level, + vram_bytes, sysmem_bytes); + TRACE("Reporting (fake) driver version 0x%08x-0x%08x.\n", + adapter_vk->a.driver_info.version_high, adapter_vk->a.driver_info.version_low); }
static enum wined3d_feature_level feature_level_from_caps(const struct shader_caps *shader_caps) @@ -2199,6 +2202,13 @@ static BOOL wined3d_adapter_vk_init(struct wined3d_adapter_vk *adapter_vk, if (!wined3d_adapter_init(adapter, ordinal, luid, &wined3d_adapter_vk_ops)) goto fail_vulkan;
+ adapter->vertex_pipe = wined3d_spirv_vertex_pipe_init_vk(); + adapter->fragment_pipe = wined3d_spirv_fragment_pipe_init_vk(); + adapter->misc_state_template = misc_state_template_vk; + adapter->shader_backend = wined3d_spirv_shader_backend_init_vk(); + + wined3d_adapter_vk_init_d3d_info(adapter_vk, wined3d_creation_flags); + adapter_vk_init_driver_info(adapter_vk, &properties2.properties); adapter->vram_bytes_used = 0; TRACE("Emulating 0x%s bytes of video ram.\n", wine_dbgstr_longlong(adapter->driver_info.vram_bytes)); @@ -2209,13 +2219,6 @@ static BOOL wined3d_adapter_vk_init(struct wined3d_adapter_vk *adapter_vk, if (!wined3d_adapter_vk_init_format_info(adapter_vk, vk_info)) goto fail;
- adapter->vertex_pipe = wined3d_spirv_vertex_pipe_init_vk(); - adapter->fragment_pipe = wined3d_spirv_fragment_pipe_init_vk(); - adapter->misc_state_template = misc_state_template_vk; - adapter->shader_backend = wined3d_spirv_shader_backend_init_vk(); - - wined3d_adapter_vk_init_d3d_info(adapter_vk, wined3d_creation_flags); - return TRUE;
fail: diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 45f3f61f2fe7..dff821927099 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -219,27 +219,34 @@ ULONG CDECL wined3d_decref(struct wined3d *wined3d) * 25 -> Windows 10 October 2018 Update - WDDM 2.5 * 26 -> Windows 10 May 2019 Update - WDDM 2.6 * - * "y" is the maximum Direct3D version the driver supports. - * y -> d3d version mapping: - * 11 -> d3d6 - * 12 -> d3d7 - * 13 -> d3d8 - * 14 -> d3d9 - * 15 -> d3d10 - * 16 -> d3d10.1 - * 17 -> d3d11 + * "y" is the maximum Direct3D version / feature level the driver supports. + * 11 -> 6 + * 12 -> 7 + * 13 -> 8 + * 14 -> 9 + * 15 -> 10_0 + * 16 -> 10_1 + * 17 -> 11_0 + * 18 -> 11_1 + * 19 -> 12_0 + * 20 -> 12_1 + * 21 -> 12_x * * "z" is the subversion number. * * "w" is the vendor specific driver build number. - */ + * + * In practice the reported version is tied to the driver, not the actual + * Windows version or feature level. E.g. NVIDIA driver 445.87 advertises the + * exact same version 26.21.14.4587 on Windows 7 as it does on Windows 10 + * (it's in fact the same driver). Similarly for driver 310.90 that advertises + * itself as 9.18.13.1090 on Windows Vista with a GeForce 9600M. */
struct driver_version_information { enum wined3d_display_driver driver; enum wined3d_driver_model driver_model; const char *driver_name; /* name of Windows driver */ - WORD version; /* version word ('y'), contained in low word of DriverVersion.HighPart */ WORD subversion; /* subversion word ('z'), contained in high word of DriverVersion.LowPart */ WORD build; /* build number ('w'), contained in low word of DriverVersion.LowPart */ }; @@ -252,25 +259,25 @@ static const struct driver_version_information driver_version_table[] = * - Radeon 9500 (R300) - X1*00 (R5xx) supported up to Catalyst 9.3 (Linux) and 10.2 (XP/Vista/Win7) * - Radeon 7xxx (R100) - 9250 (RV250) supported up to Catalyst 6.11 (XP) * - Rage 128 supported up to XP, latest official build 6.13.3279 dated October 2001 */ - {DRIVER_AMD_RAGE_128PRO, DRIVER_MODEL_NT5X, "ati2dvaa.dll", 13, 3279, 0}, - {DRIVER_AMD_R100, DRIVER_MODEL_NT5X, "ati2dvag.dll", 14, 10, 6614}, - {DRIVER_AMD_R300, DRIVER_MODEL_NT5X, "ati2dvag.dll", 14, 10, 6764}, - {DRIVER_AMD_R600, DRIVER_MODEL_NT5X, "ati2dvag.dll", 17, 10, 1280}, - {DRIVER_AMD_R300, DRIVER_MODEL_NT6X, "atiumdag.dll", 14, 10, 741 }, - {DRIVER_AMD_R600, DRIVER_MODEL_NT6X, "atiumdag.dll", 17, 10, 1280}, - {DRIVER_AMD_RX, DRIVER_MODEL_NT6X, "aticfx32.dll", 17, 10, 1474}, + {DRIVER_AMD_RAGE_128PRO, DRIVER_MODEL_NT5X, "ati2dvaa.dll", 3279, 0}, + {DRIVER_AMD_R100, DRIVER_MODEL_NT5X, "ati2dvag.dll", 10, 6614}, + {DRIVER_AMD_R300, DRIVER_MODEL_NT5X, "ati2dvag.dll", 10, 6764}, + {DRIVER_AMD_R600, DRIVER_MODEL_NT5X, "ati2dvag.dll", 10, 1280}, + {DRIVER_AMD_R300, DRIVER_MODEL_NT6X, "atiumdag.dll", 10, 741 }, + {DRIVER_AMD_R600, DRIVER_MODEL_NT6X, "atiumdag.dll", 10, 1280}, + {DRIVER_AMD_RX, DRIVER_MODEL_NT6X, "aticfx32.dll", 10, 1474},
/* Intel * The drivers are unified but not all versions support all GPUs. At some point the 2k/xp * drivers used ialmrnt5.dll for GMA800/GMA900 but at some point the file was renamed to * igxprd32.dll but the GMA800 driver was never updated. */ - {DRIVER_INTEL_GMA800, DRIVER_MODEL_NT5X, "ialmrnt5.dll", 14, 10, 3889}, - {DRIVER_INTEL_GMA900, DRIVER_MODEL_NT5X, "igxprd32.dll", 14, 10, 4764}, - {DRIVER_INTEL_GMA950, DRIVER_MODEL_NT5X, "igxprd32.dll", 14, 10, 4926}, - {DRIVER_INTEL_GMA3000, DRIVER_MODEL_NT5X, "igxprd32.dll", 14, 10, 5218}, - {DRIVER_INTEL_GMA950, DRIVER_MODEL_NT6X, "igdumd32.dll", 14, 10, 1504}, - {DRIVER_INTEL_GMA3000, DRIVER_MODEL_NT6X, "igdumd32.dll", 15, 10, 1666}, - {DRIVER_INTEL_HD4000, DRIVER_MODEL_NT6X, "igdumdim32.dll", 19, 15, 4352}, + {DRIVER_INTEL_GMA800, DRIVER_MODEL_NT5X, "ialmrnt5.dll", 10, 3889}, + {DRIVER_INTEL_GMA900, DRIVER_MODEL_NT5X, "igxprd32.dll", 10, 4764}, + {DRIVER_INTEL_GMA950, DRIVER_MODEL_NT5X, "igxprd32.dll", 10, 4926}, + {DRIVER_INTEL_GMA3000, DRIVER_MODEL_NT5X, "igxprd32.dll", 10, 5218}, + {DRIVER_INTEL_GMA950, DRIVER_MODEL_NT6X, "igdumd32.dll", 10, 1504}, + {DRIVER_INTEL_GMA3000, DRIVER_MODEL_NT6X, "igdumd32.dll", 10, 1666}, + {DRIVER_INTEL_HD4000, DRIVER_MODEL_NT6X, "igdumdim32.dll", 15, 4352},
/* Nvidia * - Geforce8 and newer is supported by the current 340.52 driver on XP-Win8 @@ -279,22 +286,22 @@ static const struct driver_version_information driver_version_table[] = * - Geforce2MX/3/4 up to 96.x on <= XP * - TNT/Geforce1/2 up to 71.x on <= XP * All version numbers used below are from the Linux nvidia drivers. */ - {DRIVER_NVIDIA_TNT, DRIVER_MODEL_NT5X, "nv4_disp.dll", 14, 10, 7186}, - {DRIVER_NVIDIA_GEFORCE2MX, DRIVER_MODEL_NT5X, "nv4_disp.dll", 14, 10, 9371}, - {DRIVER_NVIDIA_GEFORCEFX, DRIVER_MODEL_NT5X, "nv4_disp.dll", 14, 11, 7516}, - {DRIVER_NVIDIA_GEFORCE6, DRIVER_MODEL_NT5X, "nv4_disp.dll", 18, 13, 783}, - {DRIVER_NVIDIA_GEFORCE8, DRIVER_MODEL_NT5X, "nv4_disp.dll", 18, 13, 4052}, - {DRIVER_NVIDIA_GEFORCE6, DRIVER_MODEL_NT6X, "nvd3dum.dll", 18, 13, 783}, - {DRIVER_NVIDIA_GEFORCE8, DRIVER_MODEL_NT6X, "nvd3dum.dll", 18, 13, 4052}, + {DRIVER_NVIDIA_TNT, DRIVER_MODEL_NT5X, "nv4_disp.dll", 10, 7186}, + {DRIVER_NVIDIA_GEFORCE2MX, DRIVER_MODEL_NT5X, "nv4_disp.dll", 10, 9371}, + {DRIVER_NVIDIA_GEFORCEFX, DRIVER_MODEL_NT5X, "nv4_disp.dll", 11, 7516}, + {DRIVER_NVIDIA_GEFORCE6, DRIVER_MODEL_NT5X, "nv4_disp.dll", 13, 783}, + {DRIVER_NVIDIA_GEFORCE8, DRIVER_MODEL_NT5X, "nv4_disp.dll", 13, 4052}, + {DRIVER_NVIDIA_GEFORCE6, DRIVER_MODEL_NT6X, "nvd3dum.dll", 13, 783}, + {DRIVER_NVIDIA_GEFORCE8, DRIVER_MODEL_NT6X, "nvd3dum.dll", 13, 4052},
/* Red Hat */ - {DRIVER_REDHAT_VIRGL, DRIVER_MODEL_GENERIC, "virgl.dll", 0, 0, 0}, + {DRIVER_REDHAT_VIRGL, DRIVER_MODEL_GENERIC, "virgl.dll", 0, 0},
/* VMware */ - {DRIVER_VMWARE, DRIVER_MODEL_NT5X, "vm3dum.dll", 14, 1, 1134}, + {DRIVER_VMWARE, DRIVER_MODEL_NT5X, "vm3dum.dll", 1, 1134},
/* Wine */ - {DRIVER_WINE, DRIVER_MODEL_GENERIC, "wined3d.dll", 0, 0, 0}, + {DRIVER_WINE, DRIVER_MODEL_GENERIC, "wined3d.dll", 0, 0}, };
/* The amount of video memory stored in the gpu description table is the minimum amount of video memory @@ -602,8 +609,8 @@ static const struct driver_version_information *get_driver_version_info(enum win if (entry->driver == driver && (driver_model == DRIVER_MODEL_GENERIC || entry->driver_model == driver_model)) { - TRACE("Found driver "%s", version %u, subversion %u, build %u.\n", - entry->driver_name, entry->version, entry->subversion, entry->build); + TRACE("Found driver "%s", subversion %u, build %u.\n", + entry->driver_name, entry->subversion, entry->build); return entry; } } @@ -663,14 +670,15 @@ static void wined3d_copy_name(char *dst, const char *src, unsigned int dst_size) }
void wined3d_driver_info_init(struct wined3d_driver_info *driver_info, - const struct wined3d_gpu_description *gpu_desc, UINT64 vram_bytes, UINT64 sysmem_bytes) + const struct wined3d_gpu_description *gpu_desc, enum wined3d_feature_level feature_level, + UINT64 vram_bytes, UINT64 sysmem_bytes) { const struct driver_version_information *version_info; + WORD driver_os_version, driver_feature_level = 10; enum wined3d_driver_model driver_model; enum wined3d_display_driver driver; MEMORYSTATUSEX memory_status; OSVERSIONINFOW os_version; - WORD driver_os_version;
memset(&os_version, 0, sizeof(os_version)); os_version.dwOSVersionInfoSize = sizeof(os_version); @@ -742,6 +750,49 @@ void wined3d_driver_info_init(struct wined3d_driver_info *driver_info, } }
+ TRACE("GPU maximum feature level %#x.\n", feature_level); + switch (feature_level) + { + case WINED3D_FEATURE_LEVEL_NONE: + case WINED3D_FEATURE_LEVEL_5: + if (driver_model == DRIVER_MODEL_WIN9X) + driver_feature_level = 5; + else + driver_feature_level = 10; + break; + case WINED3D_FEATURE_LEVEL_6: + driver_feature_level = 11; + break; + case WINED3D_FEATURE_LEVEL_7: + driver_feature_level = 12; + break; + case WINED3D_FEATURE_LEVEL_8: + driver_feature_level = 13; + break; + case WINED3D_FEATURE_LEVEL_9_1: + case WINED3D_FEATURE_LEVEL_9_2: + case WINED3D_FEATURE_LEVEL_9_3: + driver_feature_level = 14; + break; + case WINED3D_FEATURE_LEVEL_10: + driver_feature_level = 15; + break; + case WINED3D_FEATURE_LEVEL_10_1: + driver_feature_level = 16; + break; + case WINED3D_FEATURE_LEVEL_11: + driver_feature_level = 17; + break; + case WINED3D_FEATURE_LEVEL_11_1: + /* Advertise support for everything up to FL 12_x. */ + driver_feature_level = 21; + break; + } + if (os_version.dwMajorVersion == 6 && !os_version.dwMinorVersion) + driver_feature_level = min(driver_feature_level, 18); + else if (os_version.dwMajorVersion < 6) + driver_feature_level = min(driver_feature_level, 14); + driver_info->vendor = gpu_desc->vendor; driver_info->device = gpu_desc->device; wined3d_copy_name(driver_info->description, gpu_desc->description, ARRAY_SIZE(driver_info->description)); @@ -793,7 +844,7 @@ void wined3d_driver_info_init(struct wined3d_driver_info *driver_info, || (version_info = get_driver_version_info(driver, DRIVER_MODEL_GENERIC))) { driver_info->name = version_info->driver_name; - driver_info->version_high = MAKEDWORD_VERSION(driver_os_version, version_info->version); + driver_info->version_high = MAKEDWORD_VERSION(driver_os_version, driver_feature_level); driver_info->version_low = MAKEDWORD_VERSION(version_info->subversion, version_info->build); } else @@ -801,7 +852,7 @@ void wined3d_driver_info_init(struct wined3d_driver_info *driver_info, ERR("No driver version info found for device %04x:%04x, driver model %#x.\n", driver_info->vendor, driver_info->device, driver_model); driver_info->name = "Display"; - driver_info->version_high = MAKEDWORD_VERSION(driver_os_version, 15); + driver_info->version_high = MAKEDWORD_VERSION(driver_os_version, driver_feature_level); driver_info->version_low = MAKEDWORD_VERSION(8, 6); /* NVIDIA RIVA TNT, arbitrary */ } } @@ -2941,7 +2992,7 @@ static struct wined3d_adapter *wined3d_adapter_no3d_create(unsigned int ordinal, return NULL; }
- wined3d_driver_info_init(&adapter->driver_info, &gpu_description, 0, 0); + wined3d_driver_info_init(&adapter->driver_info, &gpu_description, WINED3D_FEATURE_LEVEL_NONE, 0, 0); adapter->vram_bytes_used = 0; TRACE("Emulating 0x%s bytes of video ram.\n", wine_dbgstr_longlong(adapter->driver_info.vram_bytes));
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 342aee64f316..242d3e7505ef 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3197,7 +3197,7 @@ struct wined3d_driver_info };
void wined3d_driver_info_init(struct wined3d_driver_info *driver_info, - const struct wined3d_gpu_description *gpu_description, + const struct wined3d_gpu_description *gpu_description, enum wined3d_feature_level feature_level, UINT64 vram_bytes, UINT64 sysmem_bytes) DECLSPEC_HIDDEN;
struct wined3d_adapter_ops @@ -3358,6 +3358,9 @@ struct wined3d_caps_gl_ctx const struct wined3d_gl_info *gl_info; GLuint test_vbo; GLuint test_program_id; + + const struct wined3d_gpu_description *gpu_description; + UINT64 vram_bytes; };
BOOL wined3d_adapter_gl_init_format_info(struct wined3d_adapter *adapter,
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/wined3d/directx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index dff821927099..53fdf3168b6c 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -265,7 +265,7 @@ static const struct driver_version_information driver_version_table[] = {DRIVER_AMD_R600, DRIVER_MODEL_NT5X, "ati2dvag.dll", 10, 1280}, {DRIVER_AMD_R300, DRIVER_MODEL_NT6X, "atiumdag.dll", 10, 741 }, {DRIVER_AMD_R600, DRIVER_MODEL_NT6X, "atiumdag.dll", 10, 1280}, - {DRIVER_AMD_RX, DRIVER_MODEL_NT6X, "aticfx32.dll", 10, 1474}, + {DRIVER_AMD_RX, DRIVER_MODEL_NT6X, "aticfx32.dll", 15002, 61},
/* Intel * The drivers are unified but not all versions support all GPUs. At some point the 2k/xp
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- v2: Revert gratuitous change.
dlls/wined3d/directx.c | 186 +++++++++++++++++---------------- dlls/wined3d/wined3d_private.h | 2 + 2 files changed, 96 insertions(+), 92 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 53fdf3168b6c..1f892a9d48e8 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -293,6 +293,8 @@ static const struct driver_version_information driver_version_table[] = {DRIVER_NVIDIA_GEFORCE8, DRIVER_MODEL_NT5X, "nv4_disp.dll", 13, 4052}, {DRIVER_NVIDIA_GEFORCE6, DRIVER_MODEL_NT6X, "nvd3dum.dll", 13, 783}, {DRIVER_NVIDIA_GEFORCE8, DRIVER_MODEL_NT6X, "nvd3dum.dll", 13, 4052}, + {DRIVER_NVIDIA_FERMI, DRIVER_MODEL_NT6X, "nvd3dum.dll", 13, 9135}, + {DRIVER_NVIDIA_KEPLER, DRIVER_MODEL_NT6X, "nvd3dum.dll", 14, 4587},
/* Red Hat */ {DRIVER_REDHAT_VIRGL, DRIVER_MODEL_GENERIC, "virgl.dll", 0, 0}, @@ -357,98 +359,98 @@ static const struct wined3d_gpu_description gpu_description_table[] = {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT325M, "NVIDIA GeForce GT 325M", DRIVER_NVIDIA_GEFORCE8, 1024}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT330, "NVIDIA GeForce GT 330", DRIVER_NVIDIA_GEFORCE8, 1024}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTS350M, "NVIDIA GeForce GTS 350M", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_410M, "NVIDIA GeForce 410M", DRIVER_NVIDIA_GEFORCE8, 512}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT420, "NVIDIA GeForce GT 420", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT425M, "NVIDIA GeForce GT 425M", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT430, "NVIDIA GeForce GT 430", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT440, "NVIDIA GeForce GT 440", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTS450, "NVIDIA GeForce GTS 450", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX460, "NVIDIA GeForce GTX 460", DRIVER_NVIDIA_GEFORCE8, 768 }, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX460M, "NVIDIA GeForce GTX 460M", DRIVER_NVIDIA_GEFORCE8, 1536}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX465, "NVIDIA GeForce GTX 465", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX470, "NVIDIA GeForce GTX 470", DRIVER_NVIDIA_GEFORCE8, 1280}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX480, "NVIDIA GeForce GTX 480", DRIVER_NVIDIA_GEFORCE8, 1536}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT520, "NVIDIA GeForce GT 520", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT525M, "NVIDIA GeForce GT 525M", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT540M, "NVIDIA GeForce GT 540M", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX550, "NVIDIA GeForce GTX 550 Ti", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT555M, "NVIDIA GeForce GT 555M", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX560TI, "NVIDIA GeForce GTX 560 Ti", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX560M, "NVIDIA GeForce GTX 560M", DRIVER_NVIDIA_GEFORCE8, 3072}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX560, "NVIDIA GeForce GTX 560", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX570, "NVIDIA GeForce GTX 570", DRIVER_NVIDIA_GEFORCE8, 1280}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX580, "NVIDIA GeForce GTX 580", DRIVER_NVIDIA_GEFORCE8, 1536}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT610, "NVIDIA GeForce GT 610", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT630, "NVIDIA GeForce GT 630", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT630M, "NVIDIA GeForce GT 630M", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT640, "NVIDIA GeForce GT 640", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT640M, "NVIDIA GeForce GT 640M", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT650M, "NVIDIA GeForce GT 650M", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX650, "NVIDIA GeForce GTX 650", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX650TI, "NVIDIA GeForce GTX 650 Ti", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX660, "NVIDIA GeForce GTX 660", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX660M, "NVIDIA GeForce GTX 660M", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX660TI, "NVIDIA GeForce GTX 660 Ti", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX670, "NVIDIA GeForce GTX 670", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX670MX, "NVIDIA GeForce GTX 670MX", DRIVER_NVIDIA_GEFORCE8, 3072}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX675MX_1, "NVIDIA GeForce GTX 675MX", DRIVER_NVIDIA_GEFORCE8, 4096}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX675MX_2, "NVIDIA GeForce GTX 675MX", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX680, "NVIDIA GeForce GTX 680", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX690, "NVIDIA GeForce GTX 690", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT720, "NVIDIA GeForce GT 720", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT730, "NVIDIA GeForce GT 730", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT730M, "NVIDIA GeForce GT 730M", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT740M, "NVIDIA GeForce GT 740M", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT750M, "NVIDIA GeForce GT 750M", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT755M, "NVIDIA GeForce GT 755M", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX750, "NVIDIA GeForce GTX 750", DRIVER_NVIDIA_GEFORCE8, 1024}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX750TI, "NVIDIA GeForce GTX 750 Ti", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX760, "NVIDIA GeForce GTX 760", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX760TI, "NVIDIA GeForce GTX 760 Ti", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX765M, "NVIDIA GeForce GTX 765M", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX770M, "NVIDIA GeForce GTX 770M", DRIVER_NVIDIA_GEFORCE8, 3072}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX770, "NVIDIA GeForce GTX 770", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX775M, "NVIDIA GeForce GTX 775M", DRIVER_NVIDIA_GEFORCE8, 3072}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX780, "NVIDIA GeForce GTX 780", DRIVER_NVIDIA_GEFORCE8, 3072}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX780M, "NVIDIA GeForce GTX 780M", DRIVER_NVIDIA_GEFORCE8, 4096}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX780TI, "NVIDIA GeForce GTX 780 Ti", DRIVER_NVIDIA_GEFORCE8, 3072}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTXTITAN, "NVIDIA GeForce GTX TITAN", DRIVER_NVIDIA_GEFORCE8, 6144}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTXTITANB, "NVIDIA GeForce GTX TITAN Black", DRIVER_NVIDIA_GEFORCE8, 6144}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTXTITANX, "NVIDIA GeForce GTX TITAN X", DRIVER_NVIDIA_GEFORCE8, 12288}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTXTITANZ, "NVIDIA GeForce GTX TITAN Z", DRIVER_NVIDIA_GEFORCE8, 12288}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_820M, "NVIDIA GeForce 820M", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_830M, "NVIDIA GeForce 830M", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_840M, "NVIDIA GeForce 840M", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_845M, "NVIDIA GeForce 845M", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX850M, "NVIDIA GeForce GTX 850M", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX860M, "NVIDIA GeForce GTX 860M", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX870M, "NVIDIA GeForce GTX 870M", DRIVER_NVIDIA_GEFORCE8, 3072}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX880M, "NVIDIA GeForce GTX 880M", DRIVER_NVIDIA_GEFORCE8, 4096}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_940M, "NVIDIA GeForce 940M", DRIVER_NVIDIA_GEFORCE8, 4096}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX950, "NVIDIA GeForce GTX 950", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX950M, "NVIDIA GeForce GTX 950M", DRIVER_NVIDIA_GEFORCE8, 4096}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX960, "NVIDIA GeForce GTX 960", DRIVER_NVIDIA_GEFORCE8, 4096}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX960M, "NVIDIA GeForce GTX 960M", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX970, "NVIDIA GeForce GTX 970", DRIVER_NVIDIA_GEFORCE8, 4096}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX970M, "NVIDIA GeForce GTX 970M", DRIVER_NVIDIA_GEFORCE8, 3072}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX980, "NVIDIA GeForce GTX 980", DRIVER_NVIDIA_GEFORCE8, 4096}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX980TI, "NVIDIA GeForce GTX 980 Ti", DRIVER_NVIDIA_GEFORCE8, 6144}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1050, "NVIDIA GeForce GTX 1050", DRIVER_NVIDIA_GEFORCE8, 2048}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1050TI, "NVIDIA GeForce GTX 1050 Ti", DRIVER_NVIDIA_GEFORCE8, 4096}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1060_3GB,"NVIDIA GeForce GTX 1060 3GB", DRIVER_NVIDIA_GEFORCE8, 3072}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1060, "NVIDIA GeForce GTX 1060", DRIVER_NVIDIA_GEFORCE8, 6144}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1070, "NVIDIA GeForce GTX 1070", DRIVER_NVIDIA_GEFORCE8, 8192}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1080, "NVIDIA GeForce GTX 1080", DRIVER_NVIDIA_GEFORCE8, 8192}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1080TI, "NVIDIA GeForce GTX 1080 Ti", DRIVER_NVIDIA_GEFORCE8, 11264}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_TITANX_PASCAL, "NVIDIA TITAN X (Pascal)", DRIVER_NVIDIA_GEFORCE8, 12288}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_TITANV, "NVIDIA TITAN V", DRIVER_NVIDIA_GEFORCE8, 12288}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1650SUPER,"NVIDIA GeForce GTX 1650 SUPER", DRIVER_NVIDIA_GEFORCE8, 4096}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1660SUPER,"NVIDIA GeForce GTX 1660 SUPER", DRIVER_NVIDIA_GEFORCE8, 6144}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1660TI, "NVIDIA GeForce GTX 1660 Ti", DRIVER_NVIDIA_GEFORCE8, 6144}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_RTX2060, "NVIDIA GeForce RTX 2060", DRIVER_NVIDIA_GEFORCE8, 6144}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_RTX2070, "NVIDIA GeForce RTX 2070", DRIVER_NVIDIA_GEFORCE8, 8192}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_RTX2080, "NVIDIA GeForce RTX 2080", DRIVER_NVIDIA_GEFORCE8, 8192}, - {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_RTX2080TI, "NVIDIA GeForce RTX 2080 Ti", DRIVER_NVIDIA_GEFORCE8, 11264}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_410M, "NVIDIA GeForce 410M", DRIVER_NVIDIA_FERMI, 512}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT420, "NVIDIA GeForce GT 420", DRIVER_NVIDIA_FERMI, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT425M, "NVIDIA GeForce GT 425M", DRIVER_NVIDIA_FERMI, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT430, "NVIDIA GeForce GT 430", DRIVER_NVIDIA_FERMI, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT440, "NVIDIA GeForce GT 440", DRIVER_NVIDIA_FERMI, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTS450, "NVIDIA GeForce GTS 450", DRIVER_NVIDIA_FERMI, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX460, "NVIDIA GeForce GTX 460", DRIVER_NVIDIA_FERMI, 768 }, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX460M, "NVIDIA GeForce GTX 460M", DRIVER_NVIDIA_FERMI, 1536}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX465, "NVIDIA GeForce GTX 465", DRIVER_NVIDIA_FERMI, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX470, "NVIDIA GeForce GTX 470", DRIVER_NVIDIA_FERMI, 1280}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX480, "NVIDIA GeForce GTX 480", DRIVER_NVIDIA_FERMI, 1536}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT520, "NVIDIA GeForce GT 520", DRIVER_NVIDIA_FERMI, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT525M, "NVIDIA GeForce GT 525M", DRIVER_NVIDIA_FERMI, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT540M, "NVIDIA GeForce GT 540M", DRIVER_NVIDIA_FERMI, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX550, "NVIDIA GeForce GTX 550 Ti", DRIVER_NVIDIA_FERMI, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT555M, "NVIDIA GeForce GT 555M", DRIVER_NVIDIA_FERMI, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX560TI, "NVIDIA GeForce GTX 560 Ti", DRIVER_NVIDIA_FERMI, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX560M, "NVIDIA GeForce GTX 560M", DRIVER_NVIDIA_FERMI, 3072}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX560, "NVIDIA GeForce GTX 560", DRIVER_NVIDIA_FERMI, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX570, "NVIDIA GeForce GTX 570", DRIVER_NVIDIA_FERMI, 1280}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX580, "NVIDIA GeForce GTX 580", DRIVER_NVIDIA_FERMI, 1536}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT610, "NVIDIA GeForce GT 610", DRIVER_NVIDIA_FERMI, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT630, "NVIDIA GeForce GT 630", DRIVER_NVIDIA_KEPLER, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT630M, "NVIDIA GeForce GT 630M", DRIVER_NVIDIA_FERMI, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT640, "NVIDIA GeForce GT 640", DRIVER_NVIDIA_KEPLER, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT640M, "NVIDIA GeForce GT 640M", DRIVER_NVIDIA_KEPLER, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT650M, "NVIDIA GeForce GT 650M", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX650, "NVIDIA GeForce GTX 650", DRIVER_NVIDIA_KEPLER, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX650TI, "NVIDIA GeForce GTX 650 Ti", DRIVER_NVIDIA_KEPLER, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX660, "NVIDIA GeForce GTX 660", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX660M, "NVIDIA GeForce GTX 660M", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX660TI, "NVIDIA GeForce GTX 660 Ti", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX670, "NVIDIA GeForce GTX 670", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX670MX, "NVIDIA GeForce GTX 670MX", DRIVER_NVIDIA_KEPLER, 3072}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX675MX_1, "NVIDIA GeForce GTX 675MX", DRIVER_NVIDIA_KEPLER, 4096}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX675MX_2, "NVIDIA GeForce GTX 675MX", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX680, "NVIDIA GeForce GTX 680", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX690, "NVIDIA GeForce GTX 690", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT720, "NVIDIA GeForce GT 720", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT730, "NVIDIA GeForce GT 730", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT730M, "NVIDIA GeForce GT 730M", DRIVER_NVIDIA_KEPLER, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT740M, "NVIDIA GeForce GT 740M", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT750M, "NVIDIA GeForce GT 750M", DRIVER_NVIDIA_KEPLER, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT755M, "NVIDIA GeForce GT 755M", DRIVER_NVIDIA_KEPLER, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX750, "NVIDIA GeForce GTX 750", DRIVER_NVIDIA_KEPLER, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX750TI, "NVIDIA GeForce GTX 750 Ti", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX760, "NVIDIA GeForce GTX 760", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX760TI, "NVIDIA GeForce GTX 760 Ti", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX765M, "NVIDIA GeForce GTX 765M", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX770M, "NVIDIA GeForce GTX 770M", DRIVER_NVIDIA_KEPLER, 3072}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX770, "NVIDIA GeForce GTX 770", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX775M, "NVIDIA GeForce GTX 775M", DRIVER_NVIDIA_KEPLER, 3072}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX780, "NVIDIA GeForce GTX 780", DRIVER_NVIDIA_KEPLER, 3072}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX780M, "NVIDIA GeForce GTX 780M", DRIVER_NVIDIA_KEPLER, 4096}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX780TI, "NVIDIA GeForce GTX 780 Ti", DRIVER_NVIDIA_KEPLER, 3072}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTXTITAN, "NVIDIA GeForce GTX TITAN", DRIVER_NVIDIA_KEPLER, 6144}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTXTITANB, "NVIDIA GeForce GTX TITAN Black", DRIVER_NVIDIA_KEPLER, 6144}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTXTITANX, "NVIDIA GeForce GTX TITAN X", DRIVER_NVIDIA_KEPLER, 12288}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTXTITANZ, "NVIDIA GeForce GTX TITAN Z", DRIVER_NVIDIA_KEPLER, 12288}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_820M, "NVIDIA GeForce 820M", DRIVER_NVIDIA_FERMI, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_830M, "NVIDIA GeForce 830M", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_840M, "NVIDIA GeForce 840M", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_845M, "NVIDIA GeForce 845M", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX850M, "NVIDIA GeForce GTX 850M", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX860M, "NVIDIA GeForce GTX 860M", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX870M, "NVIDIA GeForce GTX 870M", DRIVER_NVIDIA_KEPLER, 3072}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX880M, "NVIDIA GeForce GTX 880M", DRIVER_NVIDIA_KEPLER, 4096}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_940M, "NVIDIA GeForce 940M", DRIVER_NVIDIA_KEPLER, 4096}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX950, "NVIDIA GeForce GTX 950", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX950M, "NVIDIA GeForce GTX 950M", DRIVER_NVIDIA_KEPLER, 4096}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX960, "NVIDIA GeForce GTX 960", DRIVER_NVIDIA_KEPLER, 4096}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX960M, "NVIDIA GeForce GTX 960M", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX970, "NVIDIA GeForce GTX 970", DRIVER_NVIDIA_KEPLER, 4096}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX970M, "NVIDIA GeForce GTX 970M", DRIVER_NVIDIA_KEPLER, 3072}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX980, "NVIDIA GeForce GTX 980", DRIVER_NVIDIA_KEPLER, 4096}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX980TI, "NVIDIA GeForce GTX 980 Ti", DRIVER_NVIDIA_KEPLER, 6144}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1050, "NVIDIA GeForce GTX 1050", DRIVER_NVIDIA_KEPLER, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1050TI, "NVIDIA GeForce GTX 1050 Ti", DRIVER_NVIDIA_KEPLER, 4096}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1060_3GB,"NVIDIA GeForce GTX 1060 3GB", DRIVER_NVIDIA_KEPLER, 3072}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1060, "NVIDIA GeForce GTX 1060", DRIVER_NVIDIA_KEPLER, 6144}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1070, "NVIDIA GeForce GTX 1070", DRIVER_NVIDIA_KEPLER, 8192}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1080, "NVIDIA GeForce GTX 1080", DRIVER_NVIDIA_KEPLER, 8192}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1080TI, "NVIDIA GeForce GTX 1080 Ti", DRIVER_NVIDIA_KEPLER, 11264}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_TITANX_PASCAL, "NVIDIA TITAN X (Pascal)", DRIVER_NVIDIA_KEPLER, 12288}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_TITANV, "NVIDIA TITAN V", DRIVER_NVIDIA_KEPLER, 12288}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1650SUPER,"NVIDIA GeForce GTX 1650 SUPER", DRIVER_NVIDIA_KEPLER, 4096}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1660SUPER,"NVIDIA GeForce GTX 1660 SUPER", DRIVER_NVIDIA_KEPLER, 6144}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1660TI, "NVIDIA GeForce GTX 1660 Ti", DRIVER_NVIDIA_KEPLER, 6144}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_RTX2060, "NVIDIA GeForce RTX 2060", DRIVER_NVIDIA_KEPLER, 6144}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_RTX2070, "NVIDIA GeForce RTX 2070", DRIVER_NVIDIA_KEPLER, 8192}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_RTX2080, "NVIDIA GeForce RTX 2080", DRIVER_NVIDIA_KEPLER, 8192}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_RTX2080TI, "NVIDIA GeForce RTX 2080 Ti", DRIVER_NVIDIA_KEPLER, 11264},
/* AMD cards */ {HW_VENDOR_AMD, CARD_AMD_RAGE_128PRO, "ATI Rage Fury", DRIVER_AMD_RAGE_128PRO, 16 }, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 242d3e7505ef..bb79173c383c 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3159,6 +3159,8 @@ enum wined3d_display_driver DRIVER_NVIDIA_GEFORCEFX, DRIVER_NVIDIA_GEFORCE6, DRIVER_NVIDIA_GEFORCE8, + DRIVER_NVIDIA_FERMI, + DRIVER_NVIDIA_KEPLER, DRIVER_REDHAT_VIRGL, DRIVER_VMWARE, DRIVER_WINE,
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/wined3d/adapter_gl.c | 8 ++++++-- dlls/wined3d/adapter_vk.c | 13 +++++++------ dlls/wined3d/directx.c | 22 ++++++++++++---------- dlls/wined3d/wined3d_private.h | 2 +- 4 files changed, 26 insertions(+), 19 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index cc78c9046b6c..5bf9d179e4da 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -5214,8 +5214,12 @@ static BOOL wined3d_adapter_gl_init(struct wined3d_adapter_gl *adapter_gl, gl_info->supported[ARB_TEXTURE_STORAGE] = FALSE; }
- wined3d_driver_info_init(driver_info, caps_gl_ctx.gpu_description, adapter_gl->a.d3d_info.feature_level, - caps_gl_ctx.vram_bytes, 0); + if (!wined3d_driver_info_init(driver_info, caps_gl_ctx.gpu_description, adapter_gl->a.d3d_info.feature_level, + caps_gl_ctx.vram_bytes, 0)) + { + wined3d_caps_gl_ctx_destroy(&caps_gl_ctx); + return FALSE; + } TRACE("Reporting (fake) driver version 0x%08x-0x%08x.\n", driver_info->version_high, driver_info->version_low);
diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c index cbfb29cdd43b..9aaca15ca86a 100644 --- a/dlls/wined3d/adapter_vk.c +++ b/dlls/wined3d/adapter_vk.c @@ -2037,7 +2037,7 @@ static enum wined3d_display_driver guess_display_driver(enum wined3d_pci_vendor } }
-static void adapter_vk_init_driver_info(struct wined3d_adapter_vk *adapter_vk, +static BOOL adapter_vk_init_driver_info(struct wined3d_adapter_vk *adapter_vk, const VkPhysicalDeviceProperties *properties) { const VkPhysicalDeviceMemoryProperties *memory_properties = &adapter_vk->memory_properties; @@ -2082,10 +2082,8 @@ static void adapter_vk_init_driver_info(struct wined3d_adapter_vk *adapter_vk, gpu_description = &description; }
- wined3d_driver_info_init(&adapter_vk->a.driver_info, gpu_description, adapter_vk->a.d3d_info.feature_level, - vram_bytes, sysmem_bytes); - TRACE("Reporting (fake) driver version 0x%08x-0x%08x.\n", - adapter_vk->a.driver_info.version_high, adapter_vk->a.driver_info.version_low); + return wined3d_driver_info_init(&adapter_vk->a.driver_info, gpu_description, + adapter_vk->a.d3d_info.feature_level, vram_bytes, sysmem_bytes); }
static enum wined3d_feature_level feature_level_from_caps(const struct shader_caps *shader_caps) @@ -2209,7 +2207,10 @@ static BOOL wined3d_adapter_vk_init(struct wined3d_adapter_vk *adapter_vk,
wined3d_adapter_vk_init_d3d_info(adapter_vk, wined3d_creation_flags);
- adapter_vk_init_driver_info(adapter_vk, &properties2.properties); + if (!adapter_vk_init_driver_info(adapter_vk, &properties2.properties)) + goto fail; + TRACE("Reporting (fake) driver version 0x%08x-0x%08x.\n", + adapter_vk->a.driver_info.version_high, adapter_vk->a.driver_info.version_low); adapter->vram_bytes_used = 0; TRACE("Emulating 0x%s bytes of video ram.\n", wine_dbgstr_longlong(adapter->driver_info.vram_bytes));
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 1f892a9d48e8..e6dff7baab4c 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -671,7 +671,7 @@ static void wined3d_copy_name(char *dst, const char *src, unsigned int dst_size) } }
-void wined3d_driver_info_init(struct wined3d_driver_info *driver_info, +BOOL wined3d_driver_info_init(struct wined3d_driver_info *driver_info, const struct wined3d_gpu_description *gpu_desc, enum wined3d_feature_level feature_level, UINT64 vram_bytes, UINT64 sysmem_bytes) { @@ -848,15 +848,13 @@ void wined3d_driver_info_init(struct wined3d_driver_info *driver_info, driver_info->name = version_info->driver_name; driver_info->version_high = MAKEDWORD_VERSION(driver_os_version, driver_feature_level); driver_info->version_low = MAKEDWORD_VERSION(version_info->subversion, version_info->build); + + return TRUE; } - else - { - ERR("No driver version info found for device %04x:%04x, driver model %#x.\n", - driver_info->vendor, driver_info->device, driver_model); - driver_info->name = "Display"; - driver_info->version_high = MAKEDWORD_VERSION(driver_os_version, driver_feature_level); - driver_info->version_low = MAKEDWORD_VERSION(8, 6); /* NVIDIA RIVA TNT, arbitrary */ - } + + ERR("No driver version info found for device %04x:%04x, driver model %#x.\n", + driver_info->vendor, driver_info->device, driver_model); + return FALSE; }
enum wined3d_pci_device wined3d_gpu_from_feature_level(enum wined3d_pci_vendor *vendor, @@ -2994,7 +2992,11 @@ static struct wined3d_adapter *wined3d_adapter_no3d_create(unsigned int ordinal, return NULL; }
- wined3d_driver_info_init(&adapter->driver_info, &gpu_description, WINED3D_FEATURE_LEVEL_NONE, 0, 0); + if (!wined3d_driver_info_init(&adapter->driver_info, &gpu_description, WINED3D_FEATURE_LEVEL_NONE, 0, 0)) + { + heap_free(adapter); + return NULL; + } adapter->vram_bytes_used = 0; TRACE("Emulating 0x%s bytes of video ram.\n", wine_dbgstr_longlong(adapter->driver_info.vram_bytes));
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index bb79173c383c..659dcb039dea 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3198,7 +3198,7 @@ struct wined3d_driver_info DWORD version_low; };
-void wined3d_driver_info_init(struct wined3d_driver_info *driver_info, +BOOL wined3d_driver_info_init(struct wined3d_driver_info *driver_info, const struct wined3d_gpu_description *gpu_description, enum wined3d_feature_level feature_level, UINT64 vram_bytes, UINT64 sysmem_bytes) DECLSPEC_HIDDEN;
On Tue, 14 Jul 2020 at 16:41, Matteo Bruni mbruni@codeweavers.com wrote:
@@ -2994,7 +2992,11 @@ static struct wined3d_adapter *wined3d_adapter_no3d_create(unsigned int ordinal, return NULL; }
- wined3d_driver_info_init(&adapter->driver_info, &gpu_description, WINED3D_FEATURE_LEVEL_NONE, 0, 0);
- if (!wined3d_driver_info_init(&adapter->driver_info, &gpu_description, WINED3D_FEATURE_LEVEL_NONE, 0, 0))
- {
heap_free(adapter);
return NULL;
- }
That should call wined3d_adapter_cleanup(). Of course, so should the existing code if wined3d_adapter_no3d_init_format_info() fails.
We currently don't have any way to copy the depth buffer from the DRAWABLE to the TEXTURE location, aside from FBOs.
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- v2: Do it in the proper place i.e. query_internal_format().
dlls/wined3d/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index eaa391fafbef..f0e202404bf3 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -3035,7 +3035,8 @@ static void query_internal_format(struct wined3d_adapter *adapter, if ((format->f.flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_SRGB_WRITE) && !srgb_write_supported) format_clear_flag(&format->f, WINED3DFMT_FLAG_SRGB_WRITE);
- if (!gl_info->supported[ARB_DEPTH_TEXTURE] && (format->f.depth_size || format->f.stencil_size)) + if ((!gl_info->supported[ARB_DEPTH_TEXTURE] || wined3d_settings.offscreen_rendering_mode != ORM_FBO) + && (format->f.depth_size || format->f.stencil_size)) { format->f.flags[WINED3D_GL_RES_TYPE_TEX_1D] &= ~WINED3DFMT_FLAG_TEXTURE; format->f.flags[WINED3D_GL_RES_TYPE_TEX_2D] &= ~WINED3DFMT_FLAG_TEXTURE;
On Tue, 14 Jul 2020 at 16:41, Matteo Bruni mbruni@codeweavers.com wrote:
@@ -3035,7 +3035,8 @@ static void query_internal_format(struct wined3d_adapter *adapter, if ((format->f.flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_SRGB_WRITE) && !srgb_write_supported) format_clear_flag(&format->f, WINED3DFMT_FLAG_SRGB_WRITE);
if (!gl_info->supported[ARB_DEPTH_TEXTURE] && (format->f.depth_size || format->f.stencil_size))
if ((!gl_info->supported[ARB_DEPTH_TEXTURE] || wined3d_settings.offscreen_rendering_mode != ORM_FBO)
&& (format->f.depth_size || format->f.stencil_size)) { format->f.flags[WINED3D_GL_RES_TYPE_TEX_1D] &= ~WINED3DFMT_FLAG_TEXTURE; format->f.flags[WINED3D_GL_RES_TYPE_TEX_2D] &= ~WINED3DFMT_FLAG_TEXTURE;
But if ARB_internalformat_query2 is supported, we never get here. To some extent that applies to the existing ARB_depth_texture check as well, but it seems at least unlikely that we'd have ARB_internalformat_query2 without ARB_depth_texture.