You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 8039941c52758113955d376bd7b6b6e1e5b5f76c
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 4cc906486ee06960c3031bb7eaeda7ebf046be66 Mon Sep 17 00:00:00 2001
|
||||
From 23aaa7e61202ea8fd85a632203039d0f2c02ed49 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 6 Jun 2015 06:53:34 +0200
|
||||
Subject: [PATCH] wined3d: Use real values for memory accounting on NVIDIA
|
||||
@@ -8,16 +8,16 @@ FIXME: Reimplement wined3d_device_get_available_texture_mem
|
||||
without using the context on the main thread.
|
||||
---
|
||||
dlls/d3d9/tests/device.c | 11 +++++++----
|
||||
dlls/wined3d/adapter_gl.c | 10 ++++++++++
|
||||
dlls/wined3d/adapter_gl.c | 12 ++++++++++++
|
||||
dlls/wined3d/device.c | 23 +++++++++++++++++++++++
|
||||
dlls/wined3d/wined3d_gl.h | 1 +
|
||||
4 files changed, 41 insertions(+), 4 deletions(-)
|
||||
4 files changed, 43 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
|
||||
index cabd15a..84746a9 100644
|
||||
index f5c89723cb..60836094cf 100644
|
||||
--- a/dlls/d3d9/tests/device.c
|
||||
+++ b/dlls/d3d9/tests/device.c
|
||||
@@ -9505,10 +9505,13 @@ static void test_vidmem_accounting(void)
|
||||
@@ -9579,10 +9579,13 @@ static void test_vidmem_accounting(void)
|
||||
}
|
||||
vidmem_end = IDirect3DDevice9_GetAvailableTextureMem(device);
|
||||
|
||||
@@ -36,10 +36,10 @@ index cabd15a..84746a9 100644
|
||||
for (i = 0; i < ARRAY_SIZE(textures); i++)
|
||||
{
|
||||
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
|
||||
index 2a3514a..637bb6f 100644
|
||||
index cedd012c89..ace63ed0c8 100644
|
||||
--- a/dlls/wined3d/adapter_gl.c
|
||||
+++ b/dlls/wined3d/adapter_gl.c
|
||||
@@ -225,6 +225,7 @@ static const struct wined3d_extension_map gl_extension_map[] =
|
||||
@@ -227,6 +227,7 @@ static const struct wined3d_extension_map gl_extension_map[] =
|
||||
{"GL_NV_vertex_program2", NV_VERTEX_PROGRAM2 },
|
||||
{"GL_NV_vertex_program2_option", NV_VERTEX_PROGRAM2_OPTION },
|
||||
{"GL_NV_vertex_program3", NV_VERTEX_PROGRAM3 },
|
||||
@@ -47,9 +47,9 @@ index 2a3514a..637bb6f 100644
|
||||
};
|
||||
|
||||
static const struct wined3d_extension_map wgl_extension_map[] =
|
||||
@@ -1007,6 +1008,15 @@ static const struct wined3d_gpu_description *query_gpu_description(const struct
|
||||
TRACE("Card reports vendor PCI ID 0x%04x, device PCI ID 0x%04x, 0x%s bytes of video memory.\n",
|
||||
vendor, device, wine_dbgstr_longlong(*vram_bytes));
|
||||
@@ -1010,6 +1011,17 @@ static const struct wined3d_gpu_description *query_gpu_description(const struct
|
||||
|
||||
gpu_description = wined3d_get_gpu_description(vendor, device);
|
||||
}
|
||||
+ else if (gl_info->supported[NVX_GPU_MEMORY_INFO])
|
||||
+ {
|
||||
@@ -59,15 +59,17 @@ index 2a3514a..637bb6f 100644
|
||||
+ *vram_bytes = (UINT64)vram_kb * 1024;
|
||||
+ TRACE("Got 0x%s as video memory from NVX_GPU_MEMORY_INFO extension.\n",
|
||||
+ wine_dbgstr_longlong(*vram_bytes));
|
||||
+
|
||||
+ gpu_description = wined3d_get_gpu_description(vendor, device);
|
||||
+ }
|
||||
|
||||
if (wined3d_settings.pci_vendor_id != PCI_VENDOR_NONE)
|
||||
{
|
||||
if ((gpu_description_override = wined3d_get_user_override_gpu_description(vendor, device)))
|
||||
gpu_description = gpu_description_override;
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index a89a33d..4ce7031 100644
|
||||
index 23ba41c56b..19744f778d 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1308,6 +1308,29 @@ UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device
|
||||
@@ -1266,6 +1266,29 @@ UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device
|
||||
|
||||
driver_info = &device->adapter->driver_info;
|
||||
|
||||
@@ -98,7 +100,7 @@ index a89a33d..4ce7031 100644
|
||||
wine_dbgstr_longlong(driver_info->vram_bytes),
|
||||
wine_dbgstr_longlong(device->adapter->vram_bytes_used),
|
||||
diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h
|
||||
index a02073c..6e9e58c 100644
|
||||
index 5241b6c41e..1aaf108366 100644
|
||||
--- a/dlls/wined3d/wined3d_gl.h
|
||||
+++ b/dlls/wined3d/wined3d_gl.h
|
||||
@@ -206,6 +206,7 @@ enum wined3d_gl_extension
|
||||
@@ -110,5 +112,5 @@ index a02073c..6e9e58c 100644
|
||||
WGL_ARB_PIXEL_FORMAT,
|
||||
WGL_EXT_SWAP_CONTROL,
|
||||
--
|
||||
1.9.1
|
||||
2.20.1
|
||||
|
||||
|
Reference in New Issue
Block a user