Rebase against 94eb8d36461f6eb380b95e58629ad4871e5efef4.

This commit is contained in:
Zebediah Figura 2021-05-24 22:39:23 -05:00
parent 5bbe3e47a5
commit 99d312740b
13 changed files with 62 additions and 781 deletions

View File

@ -1,34 +0,0 @@
From 29866a3cb6dc799b060565d94608c7b25bd26509 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Fri, 21 May 2021 23:44:39 -0500
Subject: [PATCH] d3d11/tests: Add a couple of extra tests for SRV/RTV
conflict.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
dlls/d3d11/tests/d3d11.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 47c6613d904..5ab08632367 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -32364,6 +32364,15 @@ static void test_deferred_context_state(void)
ID3D11DeviceContext_PSGetShaderResources(deferred, 0, 1, &ret_srv);
ok(!ret_srv, "Got unexpected SRV %p.\n", ret_srv);
+ ID3D11DeviceContext_PSSetShaderResources(deferred, 0, 1, &srv);
+ ID3D11DeviceContext_PSGetShaderResources(deferred, 0, 1, &ret_srv);
+ ok(!ret_srv, "Got unexpected SRV %p.\n", ret_srv);
+
+ ID3D11DeviceContext_PSSetShaderResources(immediate, 0, 1, &srv);
+ ID3D11DeviceContext_PSGetShaderResources(immediate, 0, 1, &ret_srv);
+ ok(ret_srv == srv, "Got unexpected SRV %p.\n", ret_srv);
+ ID3D11ShaderResourceView_Release(ret_srv);
+
ID3D11ShaderResourceView_Release(srv);
ID3D11RenderTargetView_Release(rtv);
ID3D11Texture2D_Release(texture);
--
2.30.2

View File

@ -1,286 +0,0 @@
From bca2466f49202f638339644f9c92b3573b719822 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Sat, 22 May 2021 00:27:53 -0500
Subject: [PATCH] wined3d: Check for SRV/RTV binding conflicts per
wined3d_state.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
dlls/wined3d/context.c | 19 ++++-
dlls/wined3d/device.c | 23 ++++--
dlls/wined3d/resource.c | 1 -
dlls/wined3d/wined3d_private.h | 125 +++++++--------------------------
4 files changed, 61 insertions(+), 107 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 2debf50de7f..7f50126204b 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -335,6 +335,23 @@ void context_update_stream_info(struct wined3d_context *context, const struct wi
}
}
+static bool is_resource_rtv_bound(const struct wined3d_state *state,
+ const struct wined3d_resource *resource)
+{
+ unsigned int i;
+
+ if (!resource->rtv_bind_count_device)
+ return false;
+
+ for (i = 0; i < ARRAY_SIZE(state->fb.render_targets); ++i)
+ {
+ if (state->fb.render_targets[i] && state->fb.render_targets[i]->resource == resource)
+ return true;
+ }
+
+ return false;
+}
+
/* Context activation is done by the caller. */
static void context_preload_texture(struct wined3d_context *context,
const struct wined3d_state *state, unsigned int idx)
@@ -344,7 +361,7 @@ static void context_preload_texture(struct wined3d_context *context,
if (!(texture = state->textures[idx]))
return;
- if ((texture->resource.rtv_full_bind_count_device + texture->resource.rtv_partial_bind_count_device)
+ if (is_resource_rtv_bound(state, &texture->resource)
|| (state->fb.depth_stencil && state->fb.depth_stencil->resource == &texture->resource))
context->uses_fbo_attached_resources = 1;
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index dbb5dcf2672..2c8ebba8844 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1985,7 +1985,7 @@ void CDECL wined3d_device_context_set_shader_resource_view(struct wined3d_device
if (view == prev)
return;
- if (view && (wined3d_is_srv_rtv_bound(view)
+ if (view && (wined3d_is_srv_rtv_bound(state, view)
|| ((dsv = state->fb.depth_stencil)
&& dsv->resource == view->resource && wined3d_dsv_srv_conflict(dsv, view->format))))
{
@@ -2064,22 +2064,31 @@ void CDECL wined3d_device_context_set_unordered_access_view(struct wined3d_devic
static void wined3d_device_context_unbind_srv_for_rtv(struct wined3d_device_context *context,
const struct wined3d_rendertarget_view *view, BOOL dsv)
{
- struct wined3d_state *state = context->state;
+ const struct wined3d_state *state = context->state;
+ const struct wined3d_resource *resource;
- if (view && wined3d_is_rtv_srv_bound(view))
+ if (!view)
+ return;
+ resource = view->resource;
+
+ if (resource->srv_bind_count_device)
{
- const struct wined3d_resource *resource = view->resource;
const struct wined3d_shader_resource_view *srv;
unsigned int i, j;
- WARN("Application sets bound resource as render target.\n");
-
for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i)
+ {
for (j = 0; j < MAX_SHADER_RESOURCE_VIEWS; ++j)
+ {
if ((srv = state->shader_resource_view[i][j]) && srv->resource == resource
- && ((!dsv && wined3d_is_srv_rtv_bound(srv))
+ && ((!dsv && wined3d_is_srv_rtv_bound(state, srv))
|| (dsv && wined3d_dsv_srv_conflict(view, srv->format))))
+ {
+ WARN("Application sets bound resource as render target.\n");
wined3d_device_context_set_shader_resource_view(context, i, j, NULL);
+ }
+ }
+ }
}
}
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 6e34605f547..58e3e5c77fd 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -235,7 +235,6 @@ static void wined3d_resource_destroy_object(void *object)
TRACE("resource %p.\n", resource);
- heap_free(resource->sub_resource_bind_counts_device);
wined3d_resource_free_sysmem(resource);
context_resource_released(resource->device, resource);
wined3d_resource_release(resource);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 4c308d2ac05..fadad706af4 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -4084,16 +4084,8 @@ struct wined3d_resource
struct list resource_list_entry;
- struct
- {
- uint32_t srv;
- uint32_t rtv;
- }
- *sub_resource_bind_counts_device;
- uint32_t srv_full_bind_count_device;
- uint32_t rtv_full_bind_count_device;
- uint32_t srv_partial_bind_count_device;
- uint32_t rtv_partial_bind_count_device;
+ uint32_t srv_bind_count_device;
+ uint32_t rtv_bind_count_device;
};
static inline ULONG wined3d_resource_incref(struct wined3d_resource *resource)
@@ -6214,120 +6206,57 @@ static inline bool wined3d_rtv_all_subresources(const struct wined3d_rendertarge
return texture->level_count == 1 && rtv->layer_count == wined3d_bind_layer_count(texture);
}
-static inline void wined3d_srv_bind_count_add(struct wined3d_shader_resource_view *srv, int value)
-{
- struct wined3d_resource *resource = srv->resource;
- struct wined3d_texture *texture;
- unsigned int level, layer;
-
- if (wined3d_srv_all_subresources(srv))
- {
- resource->srv_full_bind_count_device += value;
- return;
- }
-
- resource->srv_partial_bind_count_device += value;
-
- texture = texture_from_resource(resource);
-
- if (!resource->sub_resource_bind_counts_device
- && !(resource->sub_resource_bind_counts_device = heap_alloc_zero(texture->level_count
- * wined3d_bind_layer_count(texture) * sizeof(*resource->sub_resource_bind_counts_device))))
- return;
-
- for (layer = 0; layer < srv->desc.u.texture.layer_count; ++layer)
- for (level = 0; level < srv->desc.u.texture.level_count; ++level)
- resource->sub_resource_bind_counts_device[(layer + srv->desc.u.texture.layer_idx)
- * texture->level_count + srv->desc.u.texture.level_idx + level].srv += value;
-}
-
static inline void wined3d_srv_bind_count_inc(struct wined3d_shader_resource_view *srv)
{
- wined3d_srv_bind_count_add(srv, 1);
+ ++srv->resource->srv_bind_count_device;
}
static inline void wined3d_srv_bind_count_dec(struct wined3d_shader_resource_view *srv)
{
- wined3d_srv_bind_count_add(srv, -1);
-}
-
-static inline void wined3d_rtv_bind_count_add(struct wined3d_rendertarget_view *rtv, int value)
-{
- struct wined3d_resource *resource = rtv->resource;
- struct wined3d_texture *texture;
- unsigned int layer;
-
- if (wined3d_rtv_all_subresources(rtv))
- {
- resource->rtv_full_bind_count_device += value;
- return;
- }
-
- resource->rtv_partial_bind_count_device += value;
-
- texture = texture_from_resource(resource);
-
- if (!resource->sub_resource_bind_counts_device
- && !(resource->sub_resource_bind_counts_device = heap_alloc_zero(texture->level_count
- * wined3d_bind_layer_count(texture) * sizeof(*resource->sub_resource_bind_counts_device))))
- return;
-
- for (layer = 0; layer < rtv->layer_count; ++layer)
- resource->sub_resource_bind_counts_device[rtv->sub_resource_idx + layer * texture->level_count].rtv += value;
+ --srv->resource->srv_bind_count_device;
}
static inline void wined3d_rtv_bind_count_inc(struct wined3d_rendertarget_view *rtv)
{
- wined3d_rtv_bind_count_add(rtv, 1);
+ ++rtv->resource->rtv_bind_count_device;
}
static inline void wined3d_rtv_bind_count_dec(struct wined3d_rendertarget_view *rtv)
{
- wined3d_rtv_bind_count_add(rtv, -1);
+ --rtv->resource->rtv_bind_count_device;
}
-static inline bool wined3d_is_srv_rtv_bound(const struct wined3d_shader_resource_view *srv)
+static inline bool wined3d_rtv_overlaps_srv(const struct wined3d_rendertarget_view *rtv,
+ const struct wined3d_shader_resource_view *srv)
{
- struct wined3d_resource *resource = srv->resource;
- struct wined3d_texture *texture;
- unsigned int level, layer;
+ if (rtv->resource != srv->resource)
+ return false;
- if (!(resource->rtv_full_bind_count_device + resource->rtv_partial_bind_count_device))
- return FALSE;
+ if (wined3d_srv_all_subresources(srv) || wined3d_rtv_all_subresources(rtv))
+ return true;
- if (resource->rtv_full_bind_count_device || wined3d_srv_all_subresources(srv))
- return TRUE;
-
- texture = texture_from_resource(resource);
-
- for (layer = 0; layer < srv->desc.u.texture.layer_count; ++layer)
- for (level = 0; level < srv->desc.u.texture.level_count; ++level)
- if (resource->sub_resource_bind_counts_device[(layer + srv->desc.u.texture.layer_idx)
- * texture->level_count + srv->desc.u.texture.level_idx + level].rtv)
- return TRUE;
-
- return FALSE;
+ return rtv->sub_resource_idx >= srv->desc.u.texture.level_idx
+ && rtv->sub_resource_idx < srv->desc.u.texture.level_idx + srv->desc.u.texture.level_count
+ && rtv->layer_count >= srv->desc.u.texture.layer_idx;
}
-static inline bool wined3d_is_rtv_srv_bound(const struct wined3d_rendertarget_view *rtv)
+static inline bool wined3d_is_srv_rtv_bound(const struct wined3d_state *state,
+ const struct wined3d_shader_resource_view *srv)
{
- struct wined3d_resource *resource = rtv->resource;
- struct wined3d_texture *texture;
- unsigned int layer;
+ unsigned int i;
- if (!(resource->srv_full_bind_count_device + resource->srv_partial_bind_count_device))
- return FALSE;
+ if (!srv->resource->rtv_bind_count_device)
+ return false;
- if (resource->srv_full_bind_count_device || wined3d_rtv_all_subresources(rtv))
- return TRUE;
+ for (i = 0; i < ARRAY_SIZE(state->fb.render_targets); ++i)
+ {
+ const struct wined3d_rendertarget_view *rtv;
- texture = texture_from_resource(resource);
+ if ((rtv = state->fb.render_targets[i]) && wined3d_rtv_overlaps_srv(rtv, srv))
+ return true;
+ }
- for (layer = 0; layer < rtv->layer_count; ++layer)
- if (resource->sub_resource_bind_counts_device[rtv->sub_resource_idx + layer * texture->level_count].srv)
- return TRUE;
-
- return FALSE;
+ return false;
}
static inline void wined3d_viewport_get_z_range(const struct wined3d_viewport *vp, float *min_z, float *max_z)
--
2.30.2

View File

@ -1,270 +0,0 @@
From d591728c209f7fd9e438eebfb3977692d13bbd6b Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Tue, 18 May 2021 21:42:01 -0500
Subject: [PATCH] d3d11/tests: Add some tests for Map() on deferred contexts.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
dlls/d3d11/tests/d3d11.c | 239 +++++++++++++++++++++++++++++++++++++++
1 file changed, 239 insertions(+)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 5ab08632367..e5d46f445a4 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -32706,6 +32706,244 @@ static void test_deferred_context_rendering(void)
release_test_context(&test_context);
}
+static void test_deferred_context_map(void)
+{
+ ID3D11DeviceContext *immediate, *deferred;
+ struct d3d11_test_context test_context;
+ D3D11_SUBRESOURCE_DATA resource_data;
+ D3D11_BUFFER_DESC buffer_desc = {0};
+ D3D11_MAPPED_SUBRESOURCE map_desc;
+ ID3D11Buffer *buffer, *buffer2;
+ struct resource_readback rb;
+ ID3D11CommandList *list;
+ float data[16], value;
+ ID3D11Device *device;
+ float *map_data;
+ unsigned int i;
+ HRESULT hr;
+
+ if (!init_test_context(&test_context, NULL))
+ return;
+
+ device = test_context.device;
+ immediate = test_context.immediate_context;
+
+ hr = ID3D11Device_CreateDeferredContext(device, 0, &deferred);
+ todo_wine ok(hr == S_OK, "Failed to create deferred context, hr %#x.\n", hr);
+ if (hr != S_OK)
+ {
+ release_test_context(&test_context);
+ return;
+ }
+
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
+ data[i] = i;
+ resource_data.pSysMem = data;
+ resource_data.SysMemPitch = 0;
+ resource_data.SysMemSlicePitch = 0;
+
+ buffer_desc.ByteWidth = sizeof(data);
+ buffer_desc.Usage = D3D11_USAGE_DYNAMIC;
+ buffer_desc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
+ buffer_desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
+ hr = ID3D11Device_CreateBuffer(device, &buffer_desc, &resource_data, &buffer);
+ ok(hr == S_OK, "Failed to create buffer, hr %#x.\n", hr);
+ hr = ID3D11Device_CreateBuffer(device, &buffer_desc, &resource_data, &buffer2);
+ ok(hr == S_OK, "Failed to create buffer, hr %#x.\n", hr);
+
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_READ, 0, &map_desc);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_READ_WRITE, 0, &map_desc);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE, 0, &map_desc);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_NO_OVERWRITE, 0, &map_desc);
+ ok(hr == D3D11_ERROR_DEFERRED_CONTEXT_MAP_WITHOUT_INITIAL_DISCARD, "Got unexpected hr %#x.\n", hr);
+
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc);
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ map_data = map_desc.pData;
+ /* The previous contents of map_data are undefined and may in practice be
+ * uninitialized garbage. */
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
+ map_data[i] = 2 * i;
+
+ ID3D11DeviceContext_Unmap(deferred, (ID3D11Resource *)buffer, 0);
+
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc);
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ map_data = map_desc.pData;
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
+ map_data[i] = 2 * i;
+ ID3D11DeviceContext_Unmap(deferred, (ID3D11Resource *)buffer, 0);
+
+ hr = ID3D11DeviceContext_FinishCommandList(deferred, FALSE, &list);
+ ok(hr == S_OK, "Failed to create command list, hr %#x.\n", hr);
+
+ get_buffer_readback(buffer, &rb);
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
+ {
+ value = get_readback_float(&rb, i, 0);
+ ok(value == i, "Got unexpected value %.8e at %u.\n", value, i);
+ }
+ release_resource_readback(&rb);
+
+ ID3D11DeviceContext_ExecuteCommandList(immediate, list, TRUE);
+
+ get_buffer_readback(buffer, &rb);
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
+ {
+ value = get_readback_float(&rb, i, 0);
+ ok(value == 2 * i, "Got unexpected value %.8e at %u.\n", value, i);
+ }
+ release_resource_readback(&rb);
+
+ ID3D11CommandList_Release(list);
+
+ /* Test WRITE_NO_OVERWRITE. */
+
+ hr = ID3D11DeviceContext_Map(immediate, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc);
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ map_data = map_desc.pData;
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
+ map_data[i] = i;
+ ID3D11DeviceContext_Unmap(immediate, (ID3D11Resource *)buffer, 0);
+
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_NO_OVERWRITE, 0, &map_desc);
+ ok(hr == D3D11_ERROR_DEFERRED_CONTEXT_MAP_WITHOUT_INITIAL_DISCARD, "Got unexpected hr %#x.\n", hr);
+
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc);
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ map_data = map_desc.pData;
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
+ map_data[i] = 2 * i;
+ ID3D11DeviceContext_Unmap(deferred, (ID3D11Resource *)buffer, 0);
+
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_READ, 0, &map_desc);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_READ_WRITE, 0, &map_desc);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE, 0, &map_desc);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_NO_OVERWRITE, 0, &map_desc);
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+
+ map_data = map_desc.pData;
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
+ {
+ ok(map_data[i] == 2 * i, "Got unexpected value %.8e at %u.\n", map_data[i], i);
+ if (i % 2)
+ map_data[i] = 3 * i;
+ }
+ memcpy(data, map_data, sizeof(data));
+
+ ID3D11DeviceContext_Unmap(deferred, (ID3D11Resource *)buffer, 0);
+
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_NO_OVERWRITE, 0, &map_desc);
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+
+ map_data = map_desc.pData;
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
+ {
+ ok(map_data[i] == data[i], "Got unexpected value %.8e at %u.\n", map_data[i], i);
+ if (i % 3)
+ map_data[i] = 4 * i;
+ }
+ memcpy(data, map_data, sizeof(data));
+
+ ID3D11DeviceContext_Unmap(deferred, (ID3D11Resource *)buffer, 0);
+
+ hr = ID3D11DeviceContext_FinishCommandList(deferred, FALSE, &list);
+ ok(hr == S_OK, "Failed to create command list, hr %#x.\n", hr);
+
+ get_buffer_readback(buffer, &rb);
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
+ {
+ value = get_readback_float(&rb, i, 0);
+ ok(value == i, "Got unexpected value %.8e at %u.\n", value, i);
+ }
+ release_resource_readback(&rb);
+
+ ID3D11DeviceContext_ExecuteCommandList(immediate, list, TRUE);
+
+ get_buffer_readback(buffer, &rb);
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
+ {
+ value = get_readback_float(&rb, i, 0);
+ ok(value == data[i], "Got unexpected value %.8e at %u.\n", value, i);
+ }
+ release_resource_readback(&rb);
+
+ ID3D11CommandList_Release(list);
+
+ /* Do something with the mapped data from within the deferred context. */
+
+ hr = ID3D11DeviceContext_Map(immediate, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc);
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ map_data = map_desc.pData;
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
+ map_data[i] = i;
+ ID3D11DeviceContext_Unmap(immediate, (ID3D11Resource *)buffer, 0);
+
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc);
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ map_data = map_desc.pData;
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
+ map_data[i] = 2 * i;
+ ID3D11DeviceContext_Unmap(deferred, (ID3D11Resource *)buffer, 0);
+
+ ID3D11DeviceContext_CopyResource(deferred, (ID3D11Resource *)buffer2, (ID3D11Resource *)buffer);
+
+ hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc);
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ map_data = map_desc.pData;
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
+ map_data[i] = 3 * i;
+ ID3D11DeviceContext_Unmap(deferred, (ID3D11Resource *)buffer, 0);
+
+ hr = ID3D11DeviceContext_FinishCommandList(deferred, FALSE, &list);
+ ok(hr == S_OK, "Failed to create command list, hr %#x.\n", hr);
+
+ get_buffer_readback(buffer, &rb);
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
+ {
+ value = get_readback_float(&rb, i, 0);
+ ok(value == i, "Got unexpected value %.8e at %u.\n", value, i);
+ }
+ release_resource_readback(&rb);
+
+ ID3D11DeviceContext_ExecuteCommandList(immediate, list, TRUE);
+
+ get_buffer_readback(buffer2, &rb);
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
+ {
+ value = get_readback_float(&rb, i, 0);
+ ok(value == 2 * i, "Got unexpected value %.8e at %u.\n", value, i);
+ }
+ release_resource_readback(&rb);
+
+ get_buffer_readback(buffer, &rb);
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
+ {
+ value = get_readback_float(&rb, i, 0);
+ ok(value == 3 * i, "Got unexpected value %.8e at %u.\n", value, i);
+ }
+ release_resource_readback(&rb);
+
+ ID3D11CommandList_Release(list);
+
+ ID3D11Buffer_Release(buffer2);
+ ID3D11Buffer_Release(buffer);
+ ID3D11DeviceContext_Release(deferred);
+ release_test_context(&test_context);
+}
+
START_TEST(d3d11)
{
unsigned int argc, i;
@@ -32876,6 +33114,7 @@ START_TEST(d3d11)
queue_test(test_deferred_context_state);
queue_test(test_deferred_context_swap_state);
queue_test(test_deferred_context_rendering);
+ queue_test(test_deferred_context_map);
queue_test(test_unbound_streams);
run_queued_tests();
--
2.30.2

View File

@ -1,70 +0,0 @@
From 621c0b6f10a09dd7300caa8870015a931d338e85 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Fri, 21 May 2021 22:17:30 -0500
Subject: [PATCH] d3d11/tests: Add some tests for UpdateSubresource() on a
deferred context.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
dlls/d3d11/tests/d3d11.c | 45 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index e5d46f445a4..0f5ba6c3663 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -32940,6 +32940,51 @@ static void test_deferred_context_map(void)
ID3D11Buffer_Release(buffer2);
ID3D11Buffer_Release(buffer);
+
+ /* Test UpdateSubresource. */
+
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
+ data[i] = i;
+
+ buffer_desc.ByteWidth = sizeof(data);
+ buffer_desc.Usage = D3D11_USAGE_DEFAULT;
+ buffer_desc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
+ buffer_desc.CPUAccessFlags = 0;
+ hr = ID3D11Device_CreateBuffer(device, &buffer_desc, &resource_data, &buffer);
+ ok(hr == S_OK, "Failed to create buffer, hr %#x.\n", hr);
+ hr = ID3D11Device_CreateBuffer(device, &buffer_desc, &resource_data, &buffer2);
+ ok(hr == S_OK, "Failed to create buffer, hr %#x.\n", hr);
+
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
+ data[i] = 2 * i;
+ ID3D11DeviceContext_UpdateSubresource(deferred, (ID3D11Resource *)buffer, 0, NULL, data, 0, 0);
+
+ hr = ID3D11DeviceContext_FinishCommandList(deferred, FALSE, &list);
+ ok(hr == S_OK, "Failed to create command list, hr %#x.\n", hr);
+
+ get_buffer_readback(buffer, &rb);
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
+ {
+ value = get_readback_float(&rb, i, 0);
+ ok(value == i, "Got unexpected value %.8e at %u.\n", value, i);
+ }
+ release_resource_readback(&rb);
+
+ ID3D11DeviceContext_ExecuteCommandList(immediate, list, TRUE);
+
+ get_buffer_readback(buffer, &rb);
+ for (i = 0; i < ARRAY_SIZE(data); ++i)
+ {
+ value = get_readback_float(&rb, i, 0);
+ ok(value == 2 * i, "Got unexpected value %.8e at %u.\n", value, i);
+ }
+ release_resource_readback(&rb);
+
+ ID3D11CommandList_Release(list);
+
+ ID3D11Buffer_Release(buffer2);
+ ID3D11Buffer_Release(buffer);
+
ID3D11DeviceContext_Release(deferred);
release_test_context(&test_context);
}
--
2.30.2

View File

@ -1,4 +1,4 @@
From 4a46bc2a1bf83744f8f5ad97594328986edd693e Mon Sep 17 00:00:00 2001
From dcd6b0fd77fa036e0bfb178371ff3200ade661a5 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 3 Mar 2015 03:39:12 +0100
Subject: [PATCH] ntdll: Reuse old async fileio structures if possible.
@ -7,23 +7,16 @@ This should speed up apps which heavily rely on async io stuff. Some
tests (using the kernel and ntdll wine tests) show that it is very
often possible to reuse old fileio structures.
---
dlls/ntdll/unix/file.c | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
dlls/ntdll/unix/file.c | 23 +++++++++++++++++------
dlls/ntdll/unix/unix_private.h | 1 +
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index a10c4bf81aa..370dfe95471 100644
index d974968d0ca..b2c0c06bf2c 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -4553,6 +4553,7 @@ struct async_fileio
{
async_callback_t *callback; /* must be the first field */
struct async_fileio *next;
+ DWORD size;
HANDLE handle;
};
@@ -4604,18 +4605,29 @@ static void release_fileio( struct async_fileio *io )
static struct async_fileio *alloc_fileio( DWORD size, async_callback_t callback, HANDLE handle )
@@ -4658,18 +4658,29 @@ void release_fileio( struct async_fileio *io )
struct async_fileio *alloc_fileio( DWORD size, async_callback_t callback, HANDLE handle )
{
/* first free remaining previous fileinfos */
- struct async_fileio *io = InterlockedExchangePointer( (void **)&fileio_freelist, NULL );
@ -58,6 +51,18 @@ index a10c4bf81aa..370dfe95471 100644
io->handle = handle;
}
return io;
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index 15a4387bdc0..2a76103dc52 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -81,6 +81,7 @@ struct async_fileio
{
async_callback_t *callback;
struct async_fileio *next;
+ DWORD size;
HANDLE handle;
};
--
2.27.0
2.30.2

View File

@ -1,4 +1,4 @@
From 4c99070bbd7dd897a6e27bd94e8f50206b3ad49c Mon Sep 17 00:00:00 2001
From 4c3b3a58f64e3bf023778edb8a8543a2a3289070 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Mon, 2 Nov 2020 20:24:07 -0600
Subject: [PATCH] ntdll: Reimplement Win32 futexes on top of thread-ID alerts.
@ -206,10 +206,10 @@ index f1263ae33fd..348f260c3b0 100644
+ }
}
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index e4c062cea98..3a4a943c65f 100644
index ff49cd5f26b..6626e02139b 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -1816,9 +1816,6 @@ static struct unix_funcs unix_funcs =
@@ -1811,9 +1811,6 @@ static struct unix_funcs unix_funcs =
#endif
DbgUiIssueRemoteBreakin,
RtlGetSystemTimePrecise,
@ -220,7 +220,7 @@ index e4c062cea98..3a4a943c65f 100644
fast_RtlpUnWaitCriticalSection,
fast_RtlDeleteCriticalSection,
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
index 4fa890e5acc..8394a1b8601 100644
index 48960b5cb83..d8663e47ee6 100644
--- a/dlls/ntdll/unix/sync.c
+++ b/dlls/ntdll/unix/sync.c
@@ -80,10 +80,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(sync);
@ -259,7 +259,7 @@ index 4fa890e5acc..8394a1b8601 100644
/* create a struct security_descriptor and contained information in one contiguous piece of memory */
NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_attributes **ret,
data_size_t *ret_len )
@@ -2911,71 +2889,6 @@ NTSTATUS CDECL fast_RtlWakeConditionVariable( RTL_CONDITION_VARIABLE *variable,
@@ -2924,71 +2902,6 @@ NTSTATUS CDECL fast_RtlWakeConditionVariable( RTL_CONDITION_VARIABLE *variable,
return STATUS_SUCCESS;
}
@ -331,7 +331,7 @@ index 4fa890e5acc..8394a1b8601 100644
#else
NTSTATUS CDECL fast_RtlTryAcquireSRWLockExclusive( RTL_SRWLOCK *lock )
@@ -3018,79 +2931,4 @@ NTSTATUS CDECL fast_wait_cv( RTL_CONDITION_VARIABLE *variable, const void *value
@@ -3031,79 +2944,4 @@ NTSTATUS CDECL fast_wait_cv( RTL_CONDITION_VARIABLE *variable, const void *value
return STATUS_NOT_IMPLEMENTED;
}
@ -412,15 +412,15 @@ index 4fa890e5acc..8394a1b8601 100644
- mutex_unlock( &addr_mutex );
-}
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
index 04ae8230b1a..21e34842778 100644
index d0f2f4ed508..f5462125874 100644
--- a/dlls/ntdll/unixlib.h
+++ b/dlls/ntdll/unixlib.h
@@ -26,7 +26,7 @@
struct _DISPATCHER_CONTEXT;
/* increment this when you change the function table */
-#define NTDLL_UNIXLIB_VERSION 120
+#define NTDLL_UNIXLIB_VERSION 121
-#define NTDLL_UNIXLIB_VERSION 121
+#define NTDLL_UNIXLIB_VERSION 122
struct unix_funcs
{

View File

@ -1,4 +1,4 @@
From 7b203bea2cd0486f50ccf33fb67415e69f8ffcc4 Mon Sep 17 00:00:00 2001
From 92401268a87c4b5dd5dcb029303ced740b019a59 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Mon, 31 Aug 2020 23:38:09 -0500
Subject: [PATCH] ntdll: Reimplement the critical section fast path on top of
@ -83,10 +83,10 @@ index c73fb09da47..6edf104c5e9 100644
return ret;
}
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index 3a4a943c65f..579c73b2ad7 100644
index 6626e02139b..1fb2d79dc8e 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -1816,9 +1816,6 @@ static struct unix_funcs unix_funcs =
@@ -1811,9 +1811,6 @@ static struct unix_funcs unix_funcs =
#endif
DbgUiIssueRemoteBreakin,
RtlGetSystemTimePrecise,
@ -217,10 +217,10 @@ index d8663e47ee6..302698dc5b6 100644
/* Futex-based SRW lock implementation:
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index a5bade02b8a..bd7c4a8068c 100644
index 15a4387bdc0..bac75ac2d13 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -82,9 +82,6 @@ extern void (WINAPI *pKiUserApcDispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULON
@@ -97,9 +97,6 @@ extern void (WINAPI *pKiUserApcDispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULON
extern NTSTATUS (WINAPI *pKiUserExceptionDispatcher)(EXCEPTION_RECORD*,CONTEXT*) DECLSPEC_HIDDEN;
extern void (WINAPI *pLdrInitializeThunk)(CONTEXT*,void**,ULONG_PTR,ULONG_PTR) DECLSPEC_HIDDEN;
extern void (WINAPI *pRtlUserThreadStart)( PRTL_THREAD_START_ROUTINE entry, void *arg ) DECLSPEC_HIDDEN;
@ -231,15 +231,15 @@ index a5bade02b8a..bd7c4a8068c 100644
extern NTSTATUS CDECL fast_RtlAcquireSRWLockExclusive( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN;
extern NTSTATUS CDECL fast_RtlTryAcquireSRWLockShared( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
index 21e34842778..c67daa389a3 100644
index f5462125874..ca668995562 100644
--- a/dlls/ntdll/unixlib.h
+++ b/dlls/ntdll/unixlib.h
@@ -26,7 +26,7 @@
struct _DISPATCHER_CONTEXT;
/* increment this when you change the function table */
-#define NTDLL_UNIXLIB_VERSION 121
+#define NTDLL_UNIXLIB_VERSION 122
-#define NTDLL_UNIXLIB_VERSION 122
+#define NTDLL_UNIXLIB_VERSION 123
struct unix_funcs
{

View File

@ -1,4 +1,4 @@
From 83486871ac972952b78519bd68579919de8f51d2 Mon Sep 17 00:00:00 2001
From 0487d1a9007c970043397a02b787d6446722e15c Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Mon, 31 Aug 2020 23:55:29 -0500
Subject: [PATCH] ntdll: Get rid of the direct futex path for condition
@ -80,10 +80,10 @@ index 6edf104c5e9..4b92379a0ff 100644
if (flags & RTL_CONDITION_VARIABLE_LOCKMODE_SHARED)
RtlAcquireSRWLockShared( lock );
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index 579c73b2ad7..90fb4e4a899 100644
index 1fb2d79dc8e..73f22b83b3d 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -1822,8 +1822,6 @@ static struct unix_funcs unix_funcs =
@@ -1817,8 +1817,6 @@ static struct unix_funcs unix_funcs =
fast_RtlAcquireSRWLockShared,
fast_RtlReleaseSRWLockExclusive,
fast_RtlReleaseSRWLockShared,
@ -93,7 +93,7 @@ index 579c73b2ad7..90fb4e4a899 100644
ntdll_ceil,
ntdll_cos,
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
index a7cce945e97..e3c957e1181 100644
index 302698dc5b6..45472a72ed8 100644
--- a/dlls/ntdll/unix/sync.c
+++ b/dlls/ntdll/unix/sync.c
@@ -169,23 +169,6 @@ static int *get_futex(void **ptr)
@ -120,7 +120,7 @@ index a7cce945e97..e3c957e1181 100644
#endif
@@ -2736,50 +2719,6 @@ NTSTATUS CDECL fast_RtlReleaseSRWLockShared( RTL_SRWLOCK *lock )
@@ -2749,50 +2732,6 @@ NTSTATUS CDECL fast_RtlReleaseSRWLockShared( RTL_SRWLOCK *lock )
return STATUS_SUCCESS;
}
@ -171,7 +171,7 @@ index a7cce945e97..e3c957e1181 100644
#else
NTSTATUS CDECL fast_RtlTryAcquireSRWLockExclusive( RTL_SRWLOCK *lock )
@@ -2812,14 +2751,4 @@ NTSTATUS CDECL fast_RtlReleaseSRWLockShared( RTL_SRWLOCK *lock )
@@ -2825,14 +2764,4 @@ NTSTATUS CDECL fast_RtlReleaseSRWLockShared( RTL_SRWLOCK *lock )
return STATUS_NOT_IMPLEMENTED;
}
@ -187,10 +187,10 @@ index a7cce945e97..e3c957e1181 100644
-
#endif
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index bd7c4a8068c..6a67dbd9445 100644
index bac75ac2d13..07ce95230f1 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -88,10 +88,7 @@ extern NTSTATUS CDECL fast_RtlTryAcquireSRWLockShared( RTL_SRWLOCK *lock ) DECLS
@@ -103,10 +103,7 @@ extern NTSTATUS CDECL fast_RtlTryAcquireSRWLockShared( RTL_SRWLOCK *lock ) DECLS
extern NTSTATUS CDECL fast_RtlAcquireSRWLockShared( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN;
extern NTSTATUS CDECL fast_RtlReleaseSRWLockExclusive( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN;
extern NTSTATUS CDECL fast_RtlReleaseSRWLockShared( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN;
@ -202,15 +202,15 @@ index bd7c4a8068c..6a67dbd9445 100644
extern void CDECL virtual_release_address_space(void) DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
index c67daa389a3..b0914d3f97e 100644
index ca668995562..1fab653728c 100644
--- a/dlls/ntdll/unixlib.h
+++ b/dlls/ntdll/unixlib.h
@@ -26,7 +26,7 @@
struct _DISPATCHER_CONTEXT;
/* increment this when you change the function table */
-#define NTDLL_UNIXLIB_VERSION 122
+#define NTDLL_UNIXLIB_VERSION 123
-#define NTDLL_UNIXLIB_VERSION 123
+#define NTDLL_UNIXLIB_VERSION 124
struct unix_funcs
{

View File

@ -1,4 +1,4 @@
From 51766522f4df88bba18c893d4b42fab874b5e6b0 Mon Sep 17 00:00:00 2001
From ef3f578935c35d108f1f44506a27c64741f30d12 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Sun, 22 Nov 2020 20:51:10 -0600
Subject: [PATCH] ntdll: Reimplement SRW locks on top of Win32 futexes.
@ -392,10 +392,10 @@ index 4b92379a0ff..2edc9f8d558 100644
/***********************************************************************
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index 90fb4e4a899..26bfa961794 100644
index 73f22b83b3d..09e8c849ac4 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -1816,12 +1816,6 @@ static struct unix_funcs unix_funcs =
@@ -1811,12 +1811,6 @@ static struct unix_funcs unix_funcs =
#endif
DbgUiIssueRemoteBreakin,
RtlGetSystemTimePrecise,
@ -746,10 +746,10 @@ index 45472a72ed8..1e790962425 100644
-
-#endif
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index 6a67dbd9445..8184d8e5e79 100644
index 07ce95230f1..a0375afebf1 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -82,12 +82,6 @@ extern void (WINAPI *pKiUserApcDispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULON
@@ -97,12 +97,6 @@ extern void (WINAPI *pKiUserApcDispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULON
extern NTSTATUS (WINAPI *pKiUserExceptionDispatcher)(EXCEPTION_RECORD*,CONTEXT*) DECLSPEC_HIDDEN;
extern void (WINAPI *pLdrInitializeThunk)(CONTEXT*,void**,ULONG_PTR,ULONG_PTR) DECLSPEC_HIDDEN;
extern void (WINAPI *pRtlUserThreadStart)( PRTL_THREAD_START_ROUTINE entry, void *arg ) DECLSPEC_HIDDEN;
@ -763,15 +763,15 @@ index 6a67dbd9445..8184d8e5e79 100644
extern void CDECL virtual_release_address_space(void) DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
index b0914d3f97e..fd6c1198e99 100644
index 1fab653728c..1a38d80eeb8 100644
--- a/dlls/ntdll/unixlib.h
+++ b/dlls/ntdll/unixlib.h
@@ -26,7 +26,7 @@
struct _DISPATCHER_CONTEXT;
/* increment this when you change the function table */
-#define NTDLL_UNIXLIB_VERSION 123
+#define NTDLL_UNIXLIB_VERSION 124
-#define NTDLL_UNIXLIB_VERSION 124
+#define NTDLL_UNIXLIB_VERSION 125
struct unix_funcs
{

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "9561af9a7d8d77e2f98341e278c842226cae47ed"
echo "94eb8d36461f6eb380b95e58629ad4871e5efef4"
}
# Show version information
@ -222,7 +222,6 @@ patch_enable_all ()
enable_user32_FlashWindowEx="$1"
enable_user32_GetSystemMetrics="$1"
enable_user32_Implement_CascadeWindows="$1"
enable_user32_InternalGetWindowIcon="$1"
enable_user32_LR_LOADFROMFILE="$1"
enable_user32_ListBox_Size="$1"
enable_user32_LoadKeyboardLayoutEx="$1"
@ -714,9 +713,6 @@ patch_enable ()
user32-Implement-CascadeWindows)
enable_user32_Implement_CascadeWindows="$2"
;;
user32-InternalGetWindowIcon)
enable_user32_InternalGetWindowIcon="$2"
;;
user32-LR_LOADFROMFILE)
enable_user32_LR_LOADFROMFILE="$2"
;;
@ -1639,15 +1635,11 @@ fi
# | Death of the Outsider, Pro Evolution Soccer 2019, Shantae and the Pirate's Curse, Space Engineers)
# |
# | Modified files:
# | * dlls/d3d11/d3d11_private.h, dlls/d3d11/device.c, dlls/d3d11/tests/d3d11.c, dlls/wined3d/buffer.c,
# | dlls/wined3d/context.c, dlls/wined3d/cs.c, dlls/wined3d/device.c, dlls/wined3d/resource.c, dlls/wined3d/texture.c,
# | dlls/wined3d/wined3d.spec, dlls/wined3d/wined3d_private.h, include/wine/wined3d.h
# | * dlls/d3d11/d3d11_private.h, dlls/d3d11/device.c, dlls/d3d11/tests/d3d11.c, dlls/wined3d/buffer.c, dlls/wined3d/cs.c,
# | dlls/wined3d/device.c, dlls/wined3d/resource.c, dlls/wined3d/texture.c, dlls/wined3d/wined3d.spec,
# | dlls/wined3d/wined3d_private.h, include/wine/wined3d.h
# |
if test "$enable_d3d11_Deferred_Context" -eq 1; then
patch_apply d3d11-Deferred_Context/0001-d3d11-tests-Add-a-couple-of-extra-tests-for-SRV-RTV-.patch
patch_apply d3d11-Deferred_Context/0002-wined3d-Check-for-SRV-RTV-binding-conflicts-per-wine.patch
patch_apply d3d11-Deferred_Context/0003-d3d11-tests-Add-some-tests-for-Map-on-deferred-conte.patch
patch_apply d3d11-Deferred_Context/0004-d3d11-tests-Add-some-tests-for-UpdateSubresource-on-.patch
patch_apply d3d11-Deferred_Context/0005-wined3d-Store-the-framebuffer-state-inline-in-struct.patch
patch_apply d3d11-Deferred_Context/0006-d3d11-Implement-ID3D11Device-CreateDeferredContext.patch
patch_apply d3d11-Deferred_Context/0007-d3d11-Implement-ID3D11Device1-CreateDeferredContext1.patch
@ -2551,7 +2543,7 @@ fi
# Patchset ntdll-APC_Performance
# |
# | Modified files:
# | * dlls/ntdll/unix/file.c
# | * dlls/ntdll/unix/file.c, dlls/ntdll/unix/unix_private.h
# |
if test "$enable_ntdll_APC_Performance" -eq 1; then
patch_apply ntdll-APC_Performance/0001-ntdll-Reuse-old-async-fileio-structures-if-possible.patch
@ -3516,18 +3508,6 @@ if test "$enable_user32_Implement_CascadeWindows" -eq 1; then
patch_apply user32-Implement-CascadeWindows/0002-user32-Implement-TileWindows.patch
fi
# Patchset user32-InternalGetWindowIcon
# |
# | This patchset fixes the following Wine bugs:
# | * [#47915] user32: AddInternalGetWindowIcon stub.
# |
# | Modified files:
# | * dlls/user32/user32.spec, dlls/user32/win.c
# |
if test "$enable_user32_InternalGetWindowIcon" -eq 1; then
patch_apply user32-InternalGetWindowIcon/0001-user32-AddInternalGetWindowIcon-stub.patch
fi
# Patchset user32-LR_LOADFROMFILE
# |
# | This patchset fixes the following Wine bugs:

View File

@ -1,43 +0,0 @@
From 887aef4a73c3815df3e0f218463abbea50efdf3d Mon Sep 17 00:00:00 2001
From: David Torok <dt@zeroitlab.com>
Date: Mon, 14 Oct 2019 10:37:49 +1100
Subject: [PATCH] user32: AddInternalGetWindowIcon stub.
---
dlls/user32/user32.spec | 1 +
dlls/user32/win.c | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec
index 1aedc32de28..5499c7771f4 100644
--- a/dlls/user32/user32.spec
+++ b/dlls/user32/user32.spec
@@ -444,6 +444,7 @@
@ stdcall InsertMenuItemA(long long long ptr)
@ stdcall InsertMenuItemW(long long long ptr)
@ stdcall InsertMenuW(long long long long ptr)
+@ stdcall InternalGetWindowIcon(long long)
@ stdcall InternalGetWindowText(long ptr long)
@ stdcall IntersectRect(ptr ptr ptr)
@ stdcall InvalidateRect(long ptr long)
diff --git a/dlls/user32/win.c b/dlls/user32/win.c
index 7a9af5862c9..fbd53a76bd1 100644
--- a/dlls/user32/win.c
+++ b/dlls/user32/win.c
@@ -2895,6 +2895,13 @@ INT WINAPI GetWindowTextA( HWND hwnd, LPSTR lpString, INT nMaxCount )
return strlen(lpString);
}
+/*******************************************************************
+ * InternalGetWindowIcon (USER32.@)
+ */
+INT WINAPI InternalGetWindowIcon(HWND hwnd, UINT iconType )
+{
+ return NULL;
+}
/*******************************************************************
* InternalGetWindowText (USER32.@)
--
2.17.1

View File

@ -1 +0,0 @@
Fixes: [47915] user32: AddInternalGetWindowIcon stub.

View File

@ -1 +1 @@
dff85646517526562644c23648d11596daeb26d0
94eb8d36461f6eb380b95e58629ad4871e5efef4