Rebase against e804e9a5bc9fde9ad8b84dfd121d44afbe177752.

This commit is contained in:
Sebastian Lackner
2017-02-14 17:01:29 +01:00
parent 76007a01a2
commit 60d570e5f1
17 changed files with 346 additions and 668 deletions

View File

@@ -1,26 +0,0 @@
From d08d8a1233fd4d1fcb269b6e364c2122183fdd3f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 5 Feb 2017 16:34:41 +0100
Subject: wined3d: Replace surface_load_location with texture_load_location.
---
dlls/wined3d/device.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 74a4b09ab1a..4d0f6f2c4be 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -286,7 +286,8 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
{
DWORD location = render_offscreen ? dsv->resource->draw_binding : WINED3D_LOCATION_DRAWABLE;
- surface_load_location(depth_stencil, context, location);
+ wined3d_texture_load_location(depth_stencil->container, dsv->sub_resource_idx,
+ context, location);
}
if (!context_apply_clear_state(context, state, rt_count, fb))
--
2.11.0

View File

@@ -1,4 +1,4 @@
From 7697164372445198d05abf7dc616c25a8189cc49 Mon Sep 17 00:00:00 2001
From b79fac0cba54644719f1993f48550212666185ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 1 Oct 2013 14:31:56 +0200
Subject: wined3d: Hackily introduce a multithreaded command stream
@@ -14,10 +14,10 @@ Subject: wined3d: Hackily introduce a multithreaded command stream
7 files changed, 517 insertions(+), 67 deletions(-)
diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c
index c1dbe9e835f..5ca4a14fa6a 100644
index 8cb90b796b8..b1b57a261a3 100644
--- a/dlls/d3d10core/tests/device.c
+++ b/dlls/d3d10core/tests/device.c
@@ -3759,7 +3759,7 @@ static void test_occlusion_query(void)
@@ -3772,7 +3772,7 @@ static void test_occlusion_query(void)
memset(&data, 0xff, sizeof(data));
hr = ID3D10Asynchronous_GetData(query, &data, sizeof(data), 0);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
@@ -27,10 +27,10 @@ index c1dbe9e835f..5ca4a14fa6a 100644
memset(&data, 0xff, sizeof(data));
hr = ID3D10Asynchronous_GetData(query, &data, sizeof(DWORD), 0);
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 2e67b720f56..c1a99ce0ab9 100644
index e477f220817..380224e2de7 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -5245,7 +5245,7 @@ static void test_occlusion_query(void)
@@ -5255,7 +5255,7 @@ static void test_occlusion_query(void)
memset(&data, 0xff, sizeof(data));
hr = ID3D11DeviceContext_GetData(context, query, &data, sizeof(data), 0);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
@@ -39,7 +39,7 @@ index 2e67b720f56..c1a99ce0ab9 100644
memset(&data, 0xff, sizeof(data));
hr = ID3D11DeviceContext_GetData(context, query, &data, sizeof(DWORD), 0);
@@ -9533,7 +9533,7 @@ static void test_draw_uav_only(void)
@@ -9543,7 +9543,7 @@ static void test_draw_uav_only(void)
draw_quad(&test_context);
draw_quad(&test_context);
draw_quad(&test_context);
@@ -48,7 +48,7 @@ index 2e67b720f56..c1a99ce0ab9 100644
ID3D11PixelShader_Release(ps);
ID3D11Texture2D_Release(texture);
@@ -13205,12 +13205,12 @@ static void test_cs_uav_store(void)
@@ -13215,12 +13215,12 @@ static void test_cs_uav_store(void)
ID3D11DeviceContext_CSSetShader(context, cs, NULL, 0);
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
@@ -63,7 +63,7 @@ index 2e67b720f56..c1a99ce0ab9 100644
ID3D11ComputeShader_Release(cs);
@@ -13218,19 +13218,19 @@ static void test_cs_uav_store(void)
@@ -13228,19 +13228,19 @@ static void test_cs_uav_store(void)
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
ID3D11DeviceContext_CSSetShader(context, NULL, NULL, 0);
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
@@ -86,7 +86,7 @@ index 2e67b720f56..c1a99ce0ab9 100644
ID3D11ComputeShader_Release(cs);
@@ -13241,17 +13241,17 @@ static void test_cs_uav_store(void)
@@ -13251,17 +13251,17 @@ static void test_cs_uav_store(void)
input.x = 1.0f;
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
ID3D11DeviceContext_Dispatch(context, texture_desc.Width, texture_desc.Height, 1);
@@ -108,7 +108,7 @@ index 2e67b720f56..c1a99ce0ab9 100644
ID3D11ComputeShader_Release(cs);
@@ -13263,16 +13263,16 @@ static void test_cs_uav_store(void)
@@ -13273,16 +13273,16 @@ static void test_cs_uav_store(void)
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
ID3D11DeviceContext_Dispatch(context, 15, 15, 1);
SetRect(&rect, 0, 0, 60, 60);
@@ -129,7 +129,7 @@ index 2e67b720f56..c1a99ce0ab9 100644
ID3D11ComputeShader_Release(cs);
@@ -13283,12 +13283,12 @@ static void test_cs_uav_store(void)
@@ -13293,12 +13293,12 @@ static void test_cs_uav_store(void)
input.x = 0.3f;
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
@@ -144,7 +144,7 @@ index 2e67b720f56..c1a99ce0ab9 100644
ID3D11ComputeShader_Release(cs);
@@ -13441,10 +13441,10 @@ static void test_ps_cs_uav_binding(void)
@@ -13451,10 +13451,10 @@ static void test_ps_cs_uav_binding(void)
ID3D11DeviceContext_PSSetShader(context, ps, NULL, 0);
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
@@ -157,7 +157,7 @@ index 2e67b720f56..c1a99ce0ab9 100644
check_texture_float(ps_texture, 1.0f, 2);
input.x = 0.5f;
@@ -13463,10 +13463,10 @@ static void test_ps_cs_uav_binding(void)
@@ -13473,10 +13473,10 @@ static void test_ps_cs_uav_binding(void)
input.x = 4.0f;
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)ps_cb, 0, NULL, &input, 0, 0);
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
@@ -171,7 +171,7 @@ index 2e67b720f56..c1a99ce0ab9 100644
ID3D11ComputeShader_Release(cs);
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 7f3e30b498d..31725b27c88 100644
index 778cd4679ff..d3b8c24f511 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1353,6 +1353,9 @@ void context_release(struct wined3d_context *context)
@@ -184,7 +184,7 @@ index 7f3e30b498d..31725b27c88 100644
if (!--context->level)
{
if (context_restore_pixel_format(context))
@@ -3705,6 +3708,13 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device, str
@@ -3692,6 +3695,13 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device, str
TRACE("device %p, target %p.\n", device, target);
@@ -199,7 +199,7 @@ index 7f3e30b498d..31725b27c88 100644
current_context = NULL;
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 1d2870e1f95..5b8c060f928 100644
index 3a46a3c9a30..aabcb675044 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -18,14 +18,26 @@
@@ -651,7 +651,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined3d_texture *texture)
@@ -1036,13 +1200,15 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
@@ -1036,7 +1200,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
cs->ops->submit(cs);
}
@@ -659,8 +659,9 @@ index 1d2870e1f95..5b8c060f928 100644
+static UINT wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_set_shader_resource_view *op = data;
struct wined3d_shader_resource_view *prev;
@@ -1051,6 +1215,8 @@ static void wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, cons
cs->state.shader_resource_view[op->type][op->view_idx] = op->view;
if (op->type != WINED3D_SHADER_TYPE_COMPUTE)
device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING);
+
@@ -668,7 +669,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type,
@@ -1059,7 +1225,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
@@ -1067,7 +1233,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
cs->ops->submit(cs);
}
@@ -677,7 +678,7 @@ index 1d2870e1f95..5b8c060f928 100644
{
const struct wined3d_cs_set_unordered_access_view *op = data;
struct wined3d_unordered_access_view *prev;
@@ -1073,6 +1239,8 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con
@@ -1081,6 +1247,8 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con
InterlockedDecrement(&prev->resource->bind_count);
device_invalidate_state(cs->device, STATE_UNORDERED_ACCESS_VIEW_BINDING(op->pipeline));
@@ -686,7 +687,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined3d_pipeline pipeline,
@@ -1089,12 +1257,14 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
@@ -1097,12 +1265,14 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
cs->ops->submit(cs);
}
@@ -702,7 +703,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type,
@@ -1111,7 +1281,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1119,7 +1289,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
cs->ops->submit(cs);
}
@@ -711,7 +712,7 @@ index 1d2870e1f95..5b8c060f928 100644
{
const struct wined3d_cs_set_shader *op = data;
@@ -1119,6 +1289,8 @@ static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
@@ -1127,6 +1297,8 @@ static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
device_invalidate_state(cs->device, STATE_SHADER(op->type));
if (op->type != WINED3D_SHADER_TYPE_COMPUTE)
device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING);
@@ -720,7 +721,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type type, struct wined3d_shader *shader)
@@ -1133,12 +1305,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1141,12 +1313,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
cs->ops->submit(cs);
}
@@ -736,7 +737,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
@@ -1153,12 +1327,14 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
@@ -1161,12 +1335,14 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
cs->ops->submit(cs);
}
@@ -752,7 +753,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value)
@@ -1173,12 +1349,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
@@ -1181,12 +1357,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
cs->ops->submit(cs);
}
@@ -768,7 +769,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
@@ -1195,12 +1373,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
@@ -1203,12 +1381,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
cs->ops->submit(cs);
}
@@ -784,7 +785,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
@@ -1217,13 +1397,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
@@ -1225,13 +1405,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
cs->ops->submit(cs);
}
@@ -801,7 +802,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state,
@@ -1239,12 +1421,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
@@ -1247,12 +1429,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
cs->ops->submit(cs);
}
@@ -817,7 +818,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const struct wined3d_vec4 *plane)
@@ -1259,7 +1443,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
@@ -1267,7 +1451,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
cs->ops->submit(cs);
}
@@ -826,7 +827,7 @@ index 1d2870e1f95..5b8c060f928 100644
{
const struct wined3d_cs_set_color_key *op = data;
struct wined3d_texture *texture = op->texture;
@@ -1320,6 +1504,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
@@ -1328,6 +1512,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
break;
}
}
@@ -835,7 +836,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
@@ -1342,12 +1528,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
@@ -1350,12 +1536,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
cs->ops->submit(cs);
}
@@ -851,7 +852,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material)
@@ -1361,7 +1549,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
@@ -1369,7 +1557,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
cs->ops->submit(cs);
}
@@ -860,7 +861,7 @@ index 1d2870e1f95..5b8c060f928 100644
{
struct wined3d_adapter *adapter = cs->device->adapter;
@@ -1369,6 +1557,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
@@ -1377,6 +1565,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
memset(&cs->state, 0, sizeof(cs->state));
state_init(&cs->state, &cs->fb, &adapter->gl_info, &adapter->d3d_info,
WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT);
@@ -869,7 +870,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
@@ -1381,11 +1571,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
@@ -1389,11 +1579,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
cs->ops->submit(cs);
}
@@ -884,7 +885,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void *object), void *object)
@@ -1400,12 +1592,14 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
@@ -1408,12 +1600,14 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
cs->ops->submit(cs);
}
@@ -900,7 +901,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags)
@@ -1420,13 +1614,41 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
@@ -1428,13 +1622,41 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
cs->ops->submit(cs);
}
@@ -943,7 +944,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
@@ -1442,13 +1664,15 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
@@ -1450,13 +1672,15 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
cs->ops->submit(cs);
}
@@ -960,7 +961,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
@@ -1464,13 +1688,15 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
@@ -1472,13 +1696,15 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
cs->ops->submit(cs);
}
@@ -977,7 +978,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx,
@@ -1488,17 +1714,19 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
@@ -1496,17 +1722,19 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
op->flags = flags;
op->hr = &hr;
@@ -999,7 +1000,7 @@ index 1d2870e1f95..5b8c060f928 100644
}
HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx)
@@ -1512,13 +1740,35 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
@@ -1520,13 +1748,35 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
op->sub_resource_idx = sub_resource_idx;
op->hr = &hr;
@@ -1037,7 +1038,7 @@ index 1d2870e1f95..5b8c060f928 100644
/* WINED3D_CS_OP_PRESENT */ wined3d_cs_exec_present,
/* WINED3D_CS_OP_CLEAR */ wined3d_cs_exec_clear,
/* WINED3D_CS_OP_DISPATCH */ wined3d_cs_exec_dispatch,
@@ -1550,10 +1800,12 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1558,10 +1808,12 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_RESET_STATE */ wined3d_cs_exec_reset_state,
/* WINED3D_CS_OP_DESTROY_OBJECT */ wined3d_cs_exec_destroy_object,
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
@@ -1050,7 +1051,7 @@ index 1d2870e1f95..5b8c060f928 100644
};
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
@@ -1627,9 +1879,113 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
@@ -1635,9 +1887,113 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
{
wined3d_cs_st_require_space,
wined3d_cs_st_submit,
@@ -1164,7 +1165,7 @@ index 1d2870e1f95..5b8c060f928 100644
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
{
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
@@ -1659,12 +2015,64 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
@@ -1667,12 +2023,64 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
return NULL;
}
@@ -1273,7 +1274,7 @@ index e7962465279..a8409cfd4b8 100644
if (hkey) RegCloseKey( hkey );
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 09797950295..b2655c381ce 100644
index 0931d6aea95..684a04716dd 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -306,6 +306,7 @@ struct wined3d_settings

View File

@@ -1,18 +1,60 @@
From f0062383c0837e2faa414c042f4b93506a40501b Mon Sep 17 00:00:00 2001
From f1ae6d0fecbb0b7da36e929c5a960a574b6044d5 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 7 Feb 2017 14:01:52 +0100
Subject: wined3d: Send buffer update subresource requests through CS.
---
dlls/wined3d/cs.c | 11 +++++++++++
dlls/wined3d/device.c | 7 +------
2 files changed, 12 insertions(+), 6 deletions(-)
dlls/d3d10core/tests/device.c | 2 ++
dlls/d3d11/tests/d3d11.c | 2 ++
dlls/wined3d/cs.c | 11 +++++++++++
dlls/wined3d/device.c | 7 +------
4 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c
index 8cb90b796b8..f918aaf41d7 100644
--- a/dlls/d3d10core/tests/device.c
+++ b/dlls/d3d10core/tests/device.c
@@ -7759,6 +7759,7 @@ float4 main(const ps_in v) : SV_TARGET
ID3D10Device_Draw(device, 4, 0);
color = get_texture_color(test_context.backbuffer, 319, 239);
+ todo_wine_if(test_data[i].index == 1)
ok(compare_color(color, test_data[i].expected, 1),
"Got unexpected color 0x%08x for index %d.\n", color, test_data[i].index);
}
@@ -9928,6 +9929,7 @@ static void test_line_antialiasing_blending(void)
ID3D10Device_ClearRenderTargetView(device, test_context.backbuffer_rtv, &green.x);
draw_color_quad(&test_context, &red);
+ todo_wine
check_texture_color(test_context.backbuffer, 0xe2007fcc, 1);
ID3D10Device_OMSetBlendState(device, NULL, NULL, D3D10_DEFAULT_SAMPLE_MASK);
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index e477f220817..ad78cb92c12 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -9709,6 +9709,7 @@ float4 main(const ps_in v) : SV_TARGET
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)index_cb, 0, NULL, &index, 0, 0);
draw_quad(&test_context);
+ todo_wine_if(test_data[i].index == 1)
check_texture_color(test_context.backbuffer, test_data[i].expected, 1);
}
@@ -11960,6 +11961,7 @@ static void test_line_antialiasing_blending(void)
ID3D11DeviceContext_ClearRenderTargetView(context, test_context.backbuffer_rtv, &green.x);
draw_color_quad(&test_context, &red);
+ todo_wine
check_texture_color(test_context.backbuffer, 0xe2007fcc, 1);
ID3D11DeviceContext_OMSetBlendState(context, NULL, NULL, D3D11_DEFAULT_SAMPLE_MASK);
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index cdd11e41c91..d2aacaa261a 100644
index f030ff0a0d5..cb7ebaab416 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -2233,6 +2233,17 @@ static UINT wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi
@@ -2265,6 +2265,17 @@ static UINT wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi
struct wined3d_texture *texture;
unsigned int width, height, depth, level;
@@ -31,10 +73,10 @@ index cdd11e41c91..d2aacaa261a 100644
level = op->sub_resource_idx % texture->level_count;
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index f3412088483..8a02e5db229 100644
index 28b77725e4c..52c759426bf 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4153,18 +4153,13 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
@@ -4243,18 +4243,13 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
if (resource->type == WINED3D_RTYPE_BUFFER)
{

View File

@@ -1,4 +1,4 @@
From 6e83bf779eecfef66d5ddad20c034d06f3fa0a05 Mon Sep 17 00:00:00 2001
From 2280d5ed73ea601728cbf19c60a857ef9f37f4ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
Date: Thu, 7 Apr 2016 19:51:54 +0100
Subject: wined3d: Don't access device state in clears.
@@ -10,10 +10,10 @@ Subject: wined3d: Don't access device state in clears.
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 51dfaea4ed4..3fac8562d36 100644
index 82804d7b09b..dc2b0fbbacb 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2639,7 +2639,7 @@ static BOOL context_validate_rt_config(UINT rt_count, struct wined3d_rendertarge
@@ -2637,7 +2637,7 @@ static BOOL context_validate_rt_config(UINT rt_count, struct wined3d_rendertarge
}
/* Context activation is done by the caller. */
@@ -22,7 +22,7 @@ index 51dfaea4ed4..3fac8562d36 100644
UINT rt_count, const struct wined3d_fb_state *fb)
{
struct wined3d_rendertarget_view **rts = fb->render_targets;
@@ -2648,7 +2648,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
@@ -2646,7 +2646,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
DWORD rt_mask = 0, *cur_mask;
UINT i;
@@ -31,7 +31,7 @@ index 51dfaea4ed4..3fac8562d36 100644
|| rt_count != gl_info->limits.buffers)
{
if (!context_validate_rt_config(rt_count, rts, dsv))
@@ -2734,7 +2734,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
@@ -2732,7 +2732,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
gl_info->gl_ops.gl.p_glEnable(GL_SCISSOR_TEST);
if (rt_count && gl_info->supported[ARB_FRAMEBUFFER_SRGB])
{
@@ -42,7 +42,7 @@ index 51dfaea4ed4..3fac8562d36 100644
else
gl_info->gl_ops.gl.p_glDisable(GL_FRAMEBUFFER_SRGB);
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index e840ff67cdb..d70d51a7d7a 100644
index 6e469b21014..3f5fd7988d4 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -223,7 +223,6 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
@@ -54,7 +54,7 @@ index e840ff67cdb..d70d51a7d7a 100644
UINT drawable_width, drawable_height;
struct wined3d_color corrected_color;
@@ -290,7 +289,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
context, location);
dsv->sub_resource_idx, context, location);
}
- if (!context_apply_clear_state(context, state, rt_count, fb))
@@ -72,10 +72,10 @@ index e840ff67cdb..d70d51a7d7a 100644
if (rt_count > 1)
WARN("Clearing multiple sRGB render targets with no GL_ARB_framebuffer_sRGB "
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 5991eb95787..aa0ca4bcc06 100644
index 3b4cff500ab..7d361b2c7aa 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1811,7 +1811,7 @@ void context_alloc_event_query(struct wined3d_context *context,
@@ -1850,7 +1850,7 @@ void context_alloc_event_query(struct wined3d_context *context,
void context_alloc_occlusion_query(struct wined3d_context *context,
struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN;
void context_apply_blit_state(struct wined3d_context *context, const struct wined3d_device *device) DECLSPEC_HIDDEN;

File diff suppressed because it is too large Load Diff