Rebase against 82f3446c5d09aba0aa0cffcf7ece54d44d3b86ef.

This commit is contained in:
Sebastian Lackner 2016-06-24 02:24:55 +02:00
parent 08dca3b834
commit 60e6da65cd
6 changed files with 105 additions and 105 deletions

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "38fb1062daaf68afe4dc20e1aceddfa89fe1ea4f"
echo "82f3446c5d09aba0aa0cffcf7ece54d44d3b86ef"
}
# Show version information

View File

@ -1,4 +1,4 @@
From fd2e3ce4d0b4737c9f540bf06c830b01887d6046 Mon Sep 17 00:00:00 2001
From 86db2b87abe7100bc48d812833523605dbd3a679 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 4 Apr 2013 11:50:09 +0200
Subject: wined3d: Request a glFinish before modifying resources outside the cs
@ -13,10 +13,10 @@ Subject: wined3d: Request a glFinish before modifying resources outside the cs
6 files changed, 104 insertions(+)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 2ae620c..a50bba4 100644
index 66e13cb..5bbb4ca 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -936,6 +936,15 @@ void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_conte
@@ -931,6 +931,15 @@ void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_conte
void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
{
struct wined3d_context *context;
@ -32,13 +32,13 @@ index 2ae620c..a50bba4 100644
context = context_acquire(buffer->resource.device, NULL);
buffer_internal_preload(buffer, context, NULL);
context_release(context);
@@ -952,9 +961,17 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
@@ -947,9 +956,17 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
{
LONG count;
BYTE *base;
+ struct wined3d_device *device = buffer->resource.device;
TRACE("buffer %p, offset %u, size %u, data %p, flags %#x\n", buffer, offset, size, data, flags);
TRACE("buffer %p, offset %u, size %u, data %p, flags %#x.\n", buffer, offset, size, data, flags);
+ if (wined3d_settings.cs_multithreaded)
+ {
@ -51,10 +51,10 @@ index 2ae620c..a50bba4 100644
/* Filter redundant WINED3D_MAP_DISCARD maps. The 3DMark2001 multitexture
* fill rate test seems to depend on this. When we map a buffer with
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 2668244..aefd308 100644
index 538ca87..3ed2db3 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -66,6 +66,7 @@ enum wined3d_cs_op
@@ -67,6 +67,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_STATEBLOCK,
WINED3D_CS_OP_SET_VS_CONSTS_F,
WINED3D_CS_OP_SET_PS_CONSTS_F,
@ -62,7 +62,7 @@ index 2668244..aefd308 100644
WINED3D_CS_OP_STOP,
};
@@ -290,6 +291,11 @@ struct wined3d_cs_set_consts_f
@@ -300,6 +301,11 @@ struct wined3d_cs_set_consts_f
struct wined3d_vec4 constants[1];
};
@ -74,7 +74,7 @@ index 2668244..aefd308 100644
/* FIXME: The list synchronization probably isn't particularly fast. */
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
{
@@ -1342,6 +1348,29 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
@@ -1383,6 +1389,29 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
cs->ops->submit(cs);
}
@ -104,7 +104,7 @@ index 2668244..aefd308 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
@@ -1374,6 +1403,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1416,6 +1445,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
/* WINED3D_CS_OP_SET_VS_CONSTS_F */ wined3d_cs_exec_set_vs_consts_f,
/* WINED3D_CS_OP_SET_PS_CONSTS_F */ wined3d_cs_exec_set_ps_consts_f,
@ -113,10 +113,10 @@ index 2668244..aefd308 100644
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 0142691..565b107 100644
index 4b2ea91..b8f1090 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2897,6 +2897,13 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO
@@ -2914,6 +2914,13 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO
return hr;
}
@ -130,7 +130,7 @@ index 0142691..565b107 100644
wined3d_device_get_transform(device, WINED3D_TS_VIEW, &view_mat);
wined3d_device_get_transform(device, WINED3D_TS_PROJECTION, &proj_mat);
wined3d_device_get_transform(device, WINED3D_TS_WORLD_MATRIX(0), &world_mat);
@@ -3689,6 +3696,13 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
@@ -3680,6 +3687,13 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
++src_skip_levels;
}
@ -144,7 +144,7 @@ index 0142691..565b107 100644
/* Make sure that the destination texture is loaded. */
context = context_acquire(device, NULL);
wined3d_texture_load(dst_texture, context, FALSE);
@@ -4219,6 +4233,13 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
@@ -4210,6 +4224,13 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
return WINED3DERR_INVALIDCALL;
}
@ -158,7 +158,7 @@ index 0142691..565b107 100644
if (blit_op == WINED3D_BLIT_OP_COLOR_FILL)
return blitter->color_fill(device, view, rect, color);
else
@@ -4542,6 +4563,13 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
@@ -4533,6 +4554,13 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
TRACE("device %p.\n", device);
@ -172,7 +172,7 @@ index 0142691..565b107 100644
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
{
TRACE("Checking resource %p for eviction.\n", resource);
@@ -4664,6 +4692,13 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4655,6 +4683,13 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
TRACE("device %p, swapchain_desc %p, mode %p, callback %p, reset_state %#x.\n",
device, swapchain_desc, mode, callback, reset_state);
@ -187,10 +187,10 @@ index 0142691..565b107 100644
{
ERR("Failed to get the first implicit swapchain.\n");
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 2e23a93..a1dd0f6 100644
index 33fcf34..6944c72 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4219,6 +4219,13 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
@@ -4215,6 +4215,13 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
flags &= ~WINED3D_BLT_DO_NOT_WAIT;
}
@ -205,10 +205,10 @@ index 2e23a93..a1dd0f6 100644
{
WARN("D3D not initialized, using fallback.\n");
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 666f8b2..dc2a19f 100644
index ecabc60..4bacc41 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1631,6 +1631,13 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
@@ -1675,6 +1675,13 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
return WINED3DERR_INVALIDCALL;
}
@ -222,7 +222,7 @@ index 666f8b2..dc2a19f 100644
flags = wined3d_resource_sanitize_map_flags(resource, flags);
if (device->d3d_initialized)
@@ -2578,6 +2585,13 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
@@ -2634,6 +2641,13 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
if (texture->resource.map_count && !(texture->flags & WINED3D_TEXTURE_GET_DC_LENIENT))
return WINED3DERR_INVALIDCALL;
@ -237,10 +237,10 @@ index 666f8b2..dc2a19f 100644
context = context_acquire(device, NULL);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 796a3d0..09f421d 100644
index 8a6e5f7..6200309 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2951,6 +2951,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
@@ -3043,6 +3043,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
unsigned int count, const struct wined3d_vec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;

View File

@ -1,4 +1,4 @@
From 309341cc10668484dfa1516f1794bd7958d4fe20 Mon Sep 17 00:00:00 2001
From f657c6626c026babefdb5f73b33e13353bb9f0e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 4 Jul 2013 23:49:26 +0200
Subject: wined3d: Don't synchronize NOOVERWRITE buffer maps
@ -9,12 +9,12 @@ TODO: Put the patch that makes PreLoad ignore the mapped state here.
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 6967697..f38c8a2 100644
index b02f8e1..fb6608b 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -966,13 +966,6 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
@@ -961,13 +961,6 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
TRACE("buffer %p, offset %u, size %u, data %p, flags %#x\n", buffer, offset, size, data, flags);
TRACE("buffer %p, offset %u, size %u, data %p, flags %#x.\n", buffer, offset, size, data, flags);
- if (wined3d_settings.cs_multithreaded)
- {
@ -26,7 +26,7 @@ index 6967697..f38c8a2 100644
flags = wined3d_resource_sanitize_map_flags(&buffer->resource, flags);
/* Filter redundant WINED3D_MAP_DISCARD maps. The 3DMark2001 multitexture
* fill rate test seems to depend on this. When we map a buffer with
@@ -1003,6 +996,13 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
@@ -998,6 +991,13 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
struct wined3d_context *context;
const struct wined3d_gl_info *gl_info;
@ -40,7 +40,7 @@ index 6967697..f38c8a2 100644
context = context_acquire(device, NULL);
gl_info = context->gl_info;
@@ -1062,6 +1062,12 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
@@ -1054,6 +1054,12 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
buffer->flags |= WINED3D_BUFFER_SYNC;
}

View File

@ -1,4 +1,4 @@
From 53cf8182c26262a3ffaf9d1d961ac94e7d6ed18d Mon Sep 17 00:00:00 2001
From dcb0cb00e9b28768c25536a68b68181a14724f7e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 29 Aug 2013 17:35:53 +0200
Subject: wined3d: Create buffers before mapping them.
@ -8,7 +8,7 @@ Subject: wined3d: Create buffers before mapping them.
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 1602ff1..5566c1e 100644
index 1461c72..bbf5a79 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -188,6 +188,8 @@ static void buffer_create_buffer_object(struct wined3d_buffer *This, struct wine
@ -20,13 +20,13 @@ index 1602ff1..5566c1e 100644
This->buffer_object_usage = gl_usage;
@@ -910,9 +912,31 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
@@ -914,9 +916,31 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
LONG count;
BYTE *base;
struct wined3d_device *device = buffer->resource.device;
+ struct wined3d_context *context;
TRACE("buffer %p, offset %u, size %u, data %p, flags %#x\n", buffer, offset, size, data, flags);
TRACE("buffer %p, offset %u, size %u, data %p, flags %#x.\n", buffer, offset, size, data, flags);
+ /* FIXME: There is a race condition with the same code in
+ * buffer_internal_preload and buffer_get_memory.
@ -52,7 +52,7 @@ index 1602ff1..5566c1e 100644
flags = wined3d_resource_sanitize_map_flags(&buffer->resource, flags);
/* Filter redundant WINED3D_MAP_DISCARD maps. The 3DMark2001 multitexture
* fill rate test seems to depend on this. When we map a buffer with
@@ -940,7 +964,6 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
@@ -944,7 +968,6 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
if (count == 1)
{
struct wined3d_device *device = buffer->resource.device;

View File

@ -1,4 +1,4 @@
From 0be542d41f7f87ac5b400b92dcca2c0cb9c63f52 Mon Sep 17 00:00:00 2001
From 21d28bbc7a9c79e5b99241f729130c0a1480212a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 2 Oct 2013 22:50:08 +0200
Subject: wined3d: Clean up buffer resource data through the CS.
@ -8,11 +8,11 @@ Subject: wined3d: Clean up buffer resource data through the CS.
1 file changed, 21 insertions(+), 19 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index e1ce265..31c2629 100644
index 90a707c..ce25f69 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -545,37 +545,39 @@ static void buffer_unload(struct wined3d_resource *resource)
resource_unload(resource);
@@ -561,37 +561,39 @@ static void wined3d_buffer_drop_bo(struct wined3d_buffer *buffer)
device_invalidate_state(device, STATE_STREAMSRC);
}
+static void wined3d_buffer_destroy_object(void *object)

File diff suppressed because it is too large Load Diff