Rebase against 237d5636271a1a78b02a0eb7feaab7dfb9dfed57

This commit is contained in:
Alistair Leslie-Hughes 2019-10-28 09:12:06 +11:00
parent bc7627cdf1
commit 086d99f83e
5 changed files with 42 additions and 49 deletions

View File

@ -1,15 +1,15 @@
From 31a800096eb212cda55f6fbea955f05c650ea2c1 Mon Sep 17 00:00:00 2001
From c01cbb5811cb9de58a0c3fa7822382f45900b435 Mon Sep 17 00:00:00 2001
From: Paul Gofman <gofmanp@gmail.com>
Date: Fri, 27 Sep 2019 16:26:04 +0300
Subject: [PATCH] d3d11/tests: Add a basic test for drawing with deferred
context.
---
dlls/d3d11/tests/d3d11.c | 101 +++++++++++++++++++++++++++++++--------
1 file changed, 81 insertions(+), 20 deletions(-)
dlls/d3d11/tests/d3d11.c | 100 +++++++++++++++++++++++++++++++--------
1 file changed, 81 insertions(+), 19 deletions(-)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index e653fb30b2..202179174b 100644
index 7f11a59d0cb..c63bae8bbab 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -1692,10 +1692,11 @@ static void release_test_context_(unsigned int line, struct d3d11_test_context *
@ -158,7 +158,7 @@ index e653fb30b2..202179174b 100644
static void test_device_interfaces(const D3D_FEATURE_LEVEL feature_level)
{
struct device_desc device_desc;
@@ -29400,11 +29462,11 @@ START_TEST(d3d11)
@@ -29639,11 +29701,11 @@ START_TEST(d3d11)
}
print_adapter_info();
@ -171,13 +171,6 @@ index e653fb30b2..202179174b 100644
queue_test(test_create_texture1d);
queue_test(test_texture1d_interfaces);
queue_test(test_create_texture2d);
@@ -29538,6 +29600,5 @@ START_TEST(d3d11)
queue_test(test_render_a8);
queue_test(test_standard_pattern);
queue_test(test_desktop_window);
-
run_queued_tests();
}
--
2.21.0
2.17.1

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "717109ce79bbf92b5e3e93e49f96b78ece00a952"
echo "237d5636271a1a78b02a0eb7feaab7dfb9dfed57"
}
# Show version information

View File

@ -1,4 +1,4 @@
From 23aaa7e61202ea8fd85a632203039d0f2c02ed49 Mon Sep 17 00:00:00 2001
From 1eb53d1e30aeadbf77bf6d9285a3c9cdd6dcc612 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
@ -14,10 +14,10 @@ FIXME: Reimplement wined3d_device_get_available_texture_mem
4 files changed, 43 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index f5c89723cb..60836094cf 100644
index 3d42dcbcc56..617fc94970b 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -9579,10 +9579,13 @@ static void test_vidmem_accounting(void)
@@ -9548,10 +9548,13 @@ static void test_vidmem_accounting(void)
}
vidmem_end = IDirect3DDevice9_GetAvailableTextureMem(device);
@ -36,18 +36,18 @@ index f5c89723cb..60836094cf 100644
for (i = 0; i < ARRAY_SIZE(textures); i++)
{
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
index cedd012c89..ace63ed0c8 100644
index e83aebfa56f..6499fcf3aef 100644
--- a/dlls/wined3d/adapter_gl.c
+++ b/dlls/wined3d/adapter_gl.c
@@ -227,6 +227,7 @@ static const struct wined3d_extension_map gl_extension_map[] =
{"GL_NV_vertex_program2", NV_VERTEX_PROGRAM2 },
@@ -230,6 +230,7 @@ static const struct wined3d_extension_map gl_extension_map[] =
{"GL_NV_vertex_program2_option", NV_VERTEX_PROGRAM2_OPTION },
{"GL_NV_vertex_program3", NV_VERTEX_PROGRAM3 },
{"GL_NV_texture_barrier", NV_TEXTURE_BARRIER },
+ {"GL_NVX_gpu_memory_info", NVX_GPU_MEMORY_INFO },
};
static const struct wined3d_extension_map wgl_extension_map[] =
@@ -1010,6 +1011,17 @@ static const struct wined3d_gpu_description *query_gpu_description(const struct
@@ -1061,6 +1062,17 @@ static const struct wined3d_gpu_description *query_gpu_description(const struct
gpu_description = wined3d_get_gpu_description(vendor, device);
}
@ -66,10 +66,10 @@ index cedd012c89..ace63ed0c8 100644
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 23ba41c56b..19744f778d 100644
index b2aa33af41f..e67391737d9 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1266,6 +1266,29 @@ UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device
@@ -1200,6 +1200,29 @@ UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device
driver_info = &device->adapter->driver_info;
@ -100,17 +100,17 @@ index 23ba41c56b..19744f778d 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 5241b6c41e..1aaf108366 100644
index 3372b4b6be3..7995404901b 100644
--- a/dlls/wined3d/wined3d_gl.h
+++ b/dlls/wined3d/wined3d_gl.h
@@ -206,6 +206,7 @@ enum wined3d_gl_extension
NV_VERTEX_PROGRAM2,
NV_VERTEX_PROGRAM2_OPTION,
NV_VERTEX_PROGRAM3,
NV_TEXTURE_BARRIER,
+ NVX_GPU_MEMORY_INFO,
/* WGL extensions */
WGL_ARB_PIXEL_FORMAT,
WGL_EXT_SWAP_CONTROL,
--
2.20.1
2.17.1

View File

@ -1,4 +1,4 @@
From 8448c96713a20589d0c76cdd351d59d692b470dc Mon Sep 17 00:00:00 2001
From fc96c8cfd68aa488574cedb2654bddab47849059 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 18 Aug 2017 23:22:16 +0200
Subject: [PATCH] d3d11/tests: Add basic dual source blend test.
@ -8,11 +8,11 @@ Subject: [PATCH] d3d11/tests: Add basic dual source blend test.
1 file changed, 169 insertions(+)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index f04e5d65a78..d21037cd3c6 100644
index c63bae8bbab..ad79e419b09 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -29381,6 +29381,174 @@ static void test_desktop_window(void)
ok(!refcount, "Device has %u references left.\n", refcount);
@@ -29680,6 +29680,174 @@ static void test_sample_attached_rtv(void)
release_test_context(&test_context);
}
+static void test_dual_blending(void)
@ -186,7 +186,7 @@ index f04e5d65a78..d21037cd3c6 100644
START_TEST(d3d11)
{
unsigned int argc, i;
@@ -29525,6 +29693,7 @@ START_TEST(d3d11)
@@ -29824,6 +29992,7 @@ START_TEST(d3d11)
queue_for_each_feature_level_in_range(D3D_FEATURE_LEVEL_10_0, D3D_FEATURE_LEVEL_11_0, test_negative_viewports);
queue_test(test_early_depth_stencil);
queue_test(test_conservative_depth_output);
@ -195,5 +195,5 @@ index f04e5d65a78..d21037cd3c6 100644
queue_test(test_clip_distance);
queue_test(test_combined_clip_and_cull_distances);
--
2.20.1
2.17.1

View File

@ -1,4 +1,4 @@
From 1d6a51b293214963c79307e6cc3d76ce150e8645 Mon Sep 17 00:00:00 2001
From da06f7e98aef148d821d9319cd16ad741b8f836f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 18 Aug 2017 23:51:59 +0200
Subject: [PATCH] wined3d: Implement dual source blending.
@ -14,10 +14,10 @@ Subject: [PATCH] wined3d: Implement dual source blending.
7 files changed, 79 insertions(+), 9 deletions(-)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index dc896fc8dc0..f948194aea3 100644
index ad79e419b09..d94170f33e5 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -29508,7 +29508,7 @@ static void test_dual_blending(void)
@@ -29819,7 +29819,7 @@ static void test_dual_blending(void)
ID3D11DeviceContext_ClearRenderTargetView(context, rtv[1], white);
ID3D11DeviceContext_Draw(context, 3, 0);
@ -27,10 +27,10 @@ index dc896fc8dc0..f948194aea3 100644
ID3D11BlendState_Release(blend_state);
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
index 0415099439c..32e4c70ac90 100644
index 6499fcf3aef..133c9d26d75 100644
--- a/dlls/wined3d/adapter_gl.c
+++ b/dlls/wined3d/adapter_gl.c
@@ -2969,6 +2969,12 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
@@ -2987,6 +2987,12 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
gl_info->limits.buffers = min(MAX_RENDER_TARGET_VIEWS, gl_max);
TRACE("Max draw buffers: %u.\n", gl_max);
}
@ -43,7 +43,7 @@ index 0415099439c..32e4c70ac90 100644
if (gl_info->supported[ARB_MULTITEXTURE])
{
if (gl_info->supported[WINED3D_GL_LEGACY_CONTEXT])
@@ -5101,6 +5107,7 @@ static void wined3d_adapter_gl_init_d3d_info(struct wined3d_adapter_gl *adapter_
@@ -5157,6 +5163,7 @@ static void wined3d_adapter_gl_init_d3d_info(struct wined3d_adapter_gl *adapter_
struct fragment_caps fragment_caps;
struct shader_caps shader_caps;
GLfloat f[2];
@ -51,7 +51,7 @@ index 0415099439c..32e4c70ac90 100644
adapter_gl->a.shader_backend->shader_get_caps(&adapter_gl->a, &shader_caps);
adapter_gl->a.vertex_pipe->vp_get_caps(&adapter_gl->a, &vertex_caps);
@@ -5121,6 +5128,10 @@ static void wined3d_adapter_gl_init_d3d_info(struct wined3d_adapter_gl *adapter_
@@ -5177,6 +5184,10 @@ static void wined3d_adapter_gl_init_d3d_info(struct wined3d_adapter_gl *adapter_
d3d_info->limits.ffp_vertex_blend_matrices = vertex_caps.max_vertex_blend_matrices;
d3d_info->limits.active_light_count = vertex_caps.max_active_lights;
@ -63,10 +63,10 @@ index 0415099439c..32e4c70ac90 100644
d3d_info->limits.max_clip_distances = gl_info->limits.user_clip_distances;
d3d_info->limits.texture_size = gl_info->limits.texture_size;
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 672efa7aef2..b118312b353 100644
index e9750c41c50..883bc6531e5 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -3129,10 +3129,23 @@ static uint32_t find_draw_buffers_mask(const struct wined3d_context_gl *context_
@@ -3142,10 +3142,23 @@ static uint32_t find_draw_buffers_mask(const struct wined3d_context_gl *context_
else if (!context_gl->c.render_offscreen)
return context_generate_rt_mask_from_resource(rts[0]->resource);
@ -92,7 +92,7 @@ index 672efa7aef2..b118312b353 100644
{
i = wined3d_bit_scan(&mask);
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 76c3f9fc99c..22535beceda 100644
index 0e0977e1d48..d45c1313e77 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -2820,6 +2820,7 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register *
@ -157,7 +157,7 @@ index 3b9a96abc69..5c96d3be7ef 100644
static HRESULT pixel_shader_init(struct wined3d_shader *shader, struct wined3d_device *device,
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 54c0c67fbad..816d0de63fa 100644
index 4bc371b8e7a..2f90fd55072 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -533,12 +533,14 @@ static void state_blend(struct wined3d_context *context, const struct wined3d_st
@ -200,7 +200,7 @@ index 54c0c67fbad..816d0de63fa 100644
state->render_states[WINED3D_RS_SRCBLEND],
state->render_states[WINED3D_RS_DESTBLEND], rt_format);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 10d076edccc..86a255d37a6 100644
index 337e7a9fb46..73925ae62fb 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -199,6 +199,7 @@ struct wined3d_d3d_info
@ -221,17 +221,17 @@ index 10d076edccc..86a255d37a6 100644
};
enum fog_src_type
@@ -1963,7 +1965,8 @@ struct wined3d_context
@@ -1970,7 +1972,8 @@ struct wined3d_context
DWORD destroyed : 1;
DWORD destroy_delayed : 1;
DWORD clip_distance_mask : 8; /* WINED3D_MAX_CLIP_DISTANCES, 8 */
- DWORD padding : 15;
- DWORD padding : 14;
+ DWORD last_was_dual_blend : 1;
+ DWORD padding : 14;
+ DWORD padding : 13;
DWORD constant_update_mask;
DWORD numbered_array_mask;
@@ -2673,6 +2676,7 @@ struct wined3d_fbo_ops
@@ -2682,6 +2685,7 @@ struct wined3d_fbo_ops
struct wined3d_gl_limits
{
UINT buffers;
@ -239,7 +239,7 @@ index 10d076edccc..86a255d37a6 100644
UINT lights;
UINT textures;
UINT texture_coords;
@@ -3172,6 +3176,22 @@ struct wined3d_state
@@ -3186,6 +3190,22 @@ struct wined3d_state
struct wined3d_rasterizer_state *rasterizer_state;
};