Rebase against d00f7315e0cec0c2fe34ba5ab2b55cf5718860dd.

This commit is contained in:
Sebastian Lackner
2017-02-17 00:50:11 +01:00
parent 1ff77100b8
commit 6057508b9b
25 changed files with 698 additions and 860 deletions

View File

@@ -1,4 +1,4 @@
From 17b9cfdf3a6e5823b9cfa3df256e4bd892943762 Mon Sep 17 00:00:00 2001
From 2a8c68c26efe1070dec94a6a5ccba281311756b7 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: wined3d: Use real values for memory accounting on NVIDIA cards.
@@ -11,10 +11,10 @@ Subject: wined3d: Use real values for memory accounting on NVIDIA cards.
4 files changed, 41 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index 8860bce..b345d1f 100644
index 5aba575cc38..894b3324f90 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -8857,10 +8857,13 @@ static void test_vidmem_accounting(void)
@@ -9063,10 +9063,13 @@ static void test_vidmem_accounting(void)
}
vidmem_end = IDirect3DDevice9_GetAvailableTextureMem(device);
@@ -33,10 +33,10 @@ index 8860bce..b345d1f 100644
for (i = 0; i < sizeof(textures) / sizeof(*textures); i++)
{
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index d1f77ca..312c8c1 100644
index a7ee5bc099d..5b74a2b7b6c 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1278,8 +1278,31 @@ void CDECL wined3d_device_set_multithreaded(struct wined3d_device *device)
@@ -1258,8 +1258,31 @@ void CDECL wined3d_device_set_multithreaded(struct wined3d_device *device)
UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device *device)
{
@@ -51,7 +51,7 @@ index d1f77ca..312c8c1 100644
+ GLint vram_free_kb;
+ UINT64 vram_free;
+
+ struct wined3d_context *context = context_acquire(device, NULL);
+ struct wined3d_context *context = context_acquire(device, NULL, 0);
+ gl_info->gl_ops.gl.p_glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &vram_free_kb);
+ vram_free = (UINT64)vram_free_kb * 1024;
+ context_release(context);
@@ -69,10 +69,10 @@ index d1f77ca..312c8c1 100644
wine_dbgstr_longlong(device->adapter->vram_bytes),
wine_dbgstr_longlong(device->adapter->vram_bytes_used),
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 43208b6f..8b26472 100644
index 0f44e09e839..a213e2a5327 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -228,6 +228,7 @@ static const struct wined3d_extension_map gl_extension_map[] =
@@ -250,6 +250,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 },
@@ -80,7 +80,7 @@ index 43208b6f..8b26472 100644
/* SGI */
{"GL_SGIS_generate_mipmap", SGIS_GENERATE_MIPMAP },
@@ -1444,6 +1445,15 @@ static const struct gpu_description *query_gpu_description(const struct wined3d_
@@ -1516,6 +1517,15 @@ static const struct gpu_description *query_gpu_description(const struct wined3d_
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));
}
@@ -97,10 +97,10 @@ index 43208b6f..8b26472 100644
if (wined3d_settings.pci_vendor_id != PCI_VENDOR_NONE)
{
diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h
index 356ee7c..2fb21ff 100644
index e500df65635..06252d5711f 100644
--- a/dlls/wined3d/wined3d_gl.h
+++ b/dlls/wined3d/wined3d_gl.h
@@ -161,6 +161,7 @@ enum wined3d_gl_extension
@@ -180,6 +180,7 @@ enum wined3d_gl_extension
NV_VERTEX_PROGRAM2,
NV_VERTEX_PROGRAM2_OPTION,
NV_VERTEX_PROGRAM3,
@@ -109,5 +109,5 @@ index 356ee7c..2fb21ff 100644
SGIS_GENERATE_MIPMAP,
/* WGL extensions */
--
2.8.0
2.11.0