mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Rebase against d6557e812984e010a989a3360039453eb978bd12.
This commit is contained in:
parent
4a75337774
commit
830a8b9975
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "9e35dd15454be28c487b0f1bebefbbe530b2aca4"
|
||||
echo "d6557e812984e010a989a3360039453eb978bd12"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -8759,7 +8759,6 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Get rid of the end_scene flush and finish.", 1 },';
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Send query_poll through the command stream.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Update the swap interval through the CS in reset.", 1 },';
|
||||
printf '%s\n' '+ { "Nils Kuhnhenn", "wined3d: Fix context_acquire not being called from the command thread in wined3d_texture_add_dirty_region.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Wrap GL BOs in a structure.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Add a separate variable to check if queries are started.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Wait for the cs to finish before destroying the device.", 1 },';
|
||||
|
@ -1,4 +1,4 @@
|
||||
From d8e7bb3cf2730686403c387bb3ed9b79e513294f Mon Sep 17 00:00:00 2001
|
||||
From bf9af9d4fc2546603587ce2e57eb6feff9744892 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 19 Feb 2017 00:57:12 +0100
|
||||
Subject: wined3d: Add additional synchronization CS ops.
|
||||
@ -13,7 +13,7 @@ Subject: wined3d: Add additional synchronization CS ops.
|
||||
6 files changed, 74 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index f5bf70d2ee..8c0abf449f 100644
|
||||
index ed567bc571..445a11d07e 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -26,6 +26,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
||||
@ -25,8 +25,8 @@ index f5bf70d2ee..8c0abf449f 100644
|
||||
WINED3D_CS_OP_PRESENT,
|
||||
WINED3D_CS_OP_CLEAR,
|
||||
WINED3D_CS_OP_DISPATCH,
|
||||
@@ -67,6 +69,16 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
|
||||
@@ -68,6 +70,16 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_ADD_DIRTY_TEXTURE_REGION,
|
||||
};
|
||||
|
||||
+struct wined3d_cs_sync
|
||||
@ -42,8 +42,8 @@ index f5bf70d2ee..8c0abf449f 100644
|
||||
struct wined3d_cs_present
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
@@ -369,6 +381,38 @@ struct wined3d_cs_update_sub_resource
|
||||
struct wined3d_sub_resource_data data;
|
||||
@@ -380,6 +392,38 @@ struct wined3d_cs_add_dirty_texture_region
|
||||
unsigned int layer;
|
||||
};
|
||||
|
||||
+static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
|
||||
@ -81,7 +81,7 @@ index f5bf70d2ee..8c0abf449f 100644
|
||||
static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_present *op = data;
|
||||
@@ -1643,7 +1687,7 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -1710,7 +1754,7 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
op->flags = flags;
|
||||
op->hr = &hr;
|
||||
|
||||
@ -90,7 +90,7 @@ index f5bf70d2ee..8c0abf449f 100644
|
||||
|
||||
return hr;
|
||||
}
|
||||
@@ -1667,7 +1711,7 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
|
||||
@@ -1734,7 +1778,7 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
op->hr = &hr;
|
||||
|
||||
@ -99,7 +99,7 @@ index f5bf70d2ee..8c0abf449f 100644
|
||||
|
||||
return hr;
|
||||
}
|
||||
@@ -1809,11 +1853,13 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
@@ -1955,7 +1999,7 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
|
||||
wined3d_resource_acquire(resource);
|
||||
|
||||
@ -107,6 +107,9 @@ index f5bf70d2ee..8c0abf449f 100644
|
||||
+ cs->ops->submit_and_wait(cs);
|
||||
}
|
||||
|
||||
static void wined3d_cs_exec_add_dirty_texture_region(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1996,6 +2040,8 @@ void wined3d_cs_emit_add_dirty_texture_region(struct wined3d_cs *cs,
|
||||
|
||||
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
+ /* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
|
||||
@ -114,7 +117,7 @@ index f5bf70d2ee..8c0abf449f 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,
|
||||
@@ -1946,6 +1992,7 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
@@ -2129,6 +2175,7 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
{
|
||||
wined3d_cs_st_require_space,
|
||||
wined3d_cs_st_submit,
|
||||
@ -123,10 +126,10 @@ index f5bf70d2ee..8c0abf449f 100644
|
||||
};
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 94879b5de1..e328f32403 100644
|
||||
index f557306dfb..62580f6867 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1029,6 +1029,7 @@ static void wined3d_device_delete_opengl_contexts_cs(void *object)
|
||||
@@ -1023,6 +1023,7 @@ static void wined3d_device_delete_opengl_contexts_cs(void *object)
|
||||
static void wined3d_device_delete_opengl_contexts(struct wined3d_device *device)
|
||||
{
|
||||
wined3d_cs_destroy_object(device->cs, wined3d_device_delete_opengl_contexts_cs, device);
|
||||
@ -134,7 +137,7 @@ index 94879b5de1..e328f32403 100644
|
||||
}
|
||||
|
||||
static void wined3d_device_create_primary_opengl_context_cs(void *object)
|
||||
@@ -1064,6 +1065,7 @@ static void wined3d_device_create_primary_opengl_context_cs(void *object)
|
||||
@@ -1061,6 +1062,7 @@ static void wined3d_device_create_primary_opengl_context_cs(void *object)
|
||||
static HRESULT wined3d_device_create_primary_opengl_context(struct wined3d_device *device)
|
||||
{
|
||||
wined3d_cs_init_object(device->cs, wined3d_device_create_primary_opengl_context_cs, device);
|
||||
@ -143,7 +146,7 @@ index 94879b5de1..e328f32403 100644
|
||||
return E_FAIL;
|
||||
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index 25deaeb1ae..bd23999fb1 100644
|
||||
index 026322d7eb..b01607be4b 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -66,6 +66,7 @@ static void swapchain_cleanup(struct wined3d_swapchain *swapchain)
|
||||
@ -154,7 +157,7 @@ index 25deaeb1ae..bd23999fb1 100644
|
||||
|
||||
/* Restore the screen resolution if we rendered in fullscreen.
|
||||
* This will restore the screen resolution to what it was before creating
|
||||
@@ -965,6 +966,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
|
||||
@@ -857,6 +858,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
|
||||
}
|
||||
|
||||
wined3d_cs_init_object(device->cs, wined3d_swapchain_cs_init, swapchain);
|
||||
@ -163,10 +166,10 @@ index 25deaeb1ae..bd23999fb1 100644
|
||||
if (!swapchain->context[0])
|
||||
{
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 91f0cc36ed..0197f6daae 100644
|
||||
index 288ef8078a..c259bbfe8c 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1391,6 +1391,7 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
@@ -1387,6 +1387,7 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
if (surface->dc)
|
||||
{
|
||||
wined3d_cs_destroy_object(device->cs, texture2d_destroy_dc, surface);
|
||||
@ -174,7 +177,7 @@ index 91f0cc36ed..0197f6daae 100644
|
||||
create_dib = TRUE;
|
||||
}
|
||||
|
||||
@@ -1451,7 +1452,10 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
@@ -1447,7 +1448,10 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
wined3d_texture_invalidate_location(texture, 0, ~valid_location);
|
||||
|
||||
if (create_dib)
|
||||
@ -185,7 +188,7 @@ index 91f0cc36ed..0197f6daae 100644
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -2856,6 +2860,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
@@ -2840,6 +2844,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
if ((desc->usage & WINED3DUSAGE_OWNDC) || (device->wined3d->flags & WINED3D_NO3D))
|
||||
{
|
||||
wined3d_cs_init_object(device->cs, texture2d_create_dc, surface);
|
||||
@ -193,7 +196,7 @@ index 91f0cc36ed..0197f6daae 100644
|
||||
if (!surface->dc)
|
||||
{
|
||||
wined3d_texture_cleanup_sync(texture);
|
||||
@@ -3653,7 +3658,10 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
|
||||
@@ -3627,7 +3632,10 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
if (!surface->dc)
|
||||
@ -204,7 +207,7 @@ index 91f0cc36ed..0197f6daae 100644
|
||||
if (!surface->dc)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
@@ -3697,7 +3705,10 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
@@ -3671,7 +3679,10 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
}
|
||||
|
||||
if (!(texture->resource.usage & WINED3DUSAGE_OWNDC) && !(device->wined3d->flags & WINED3D_NO3D))
|
||||
@ -216,10 +219,10 @@ index 91f0cc36ed..0197f6daae 100644
|
||||
--sub_resource->map_count;
|
||||
if (!--texture->resource.map_count && texture->update_map_binding)
|
||||
diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
|
||||
index 3cd20ea8fa..9b9e7eef4c 100644
|
||||
index dc225f4f81..cd09c9c8ee 100644
|
||||
--- a/dlls/wined3d/view.c
|
||||
+++ b/dlls/wined3d/view.c
|
||||
@@ -594,6 +594,8 @@ static void wined3d_shader_resource_view_cs_init(void *object)
|
||||
@@ -632,6 +632,8 @@ static void wined3d_shader_resource_view_cs_init(void *object)
|
||||
debug_d3dformat(resource->format->id), debug_d3dformat(view_format->id));
|
||||
}
|
||||
}
|
||||
@ -228,7 +231,7 @@ index 3cd20ea8fa..9b9e7eef4c 100644
|
||||
}
|
||||
|
||||
static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_view *view,
|
||||
@@ -610,6 +612,7 @@ static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_
|
||||
@@ -648,6 +650,7 @@ static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_
|
||||
|
||||
wined3d_resource_incref(view->resource = resource);
|
||||
|
||||
@ -236,7 +239,7 @@ index 3cd20ea8fa..9b9e7eef4c 100644
|
||||
wined3d_cs_init_object(resource->device->cs, wined3d_shader_resource_view_cs_init, view);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -786,6 +789,8 @@ static void wined3d_unordered_access_view_cs_init(void *object)
|
||||
@@ -829,6 +832,8 @@ static void wined3d_unordered_access_view_cs_init(void *object)
|
||||
desc, texture, view->format);
|
||||
}
|
||||
}
|
||||
@ -245,7 +248,7 @@ index 3cd20ea8fa..9b9e7eef4c 100644
|
||||
}
|
||||
|
||||
static HRESULT wined3d_unordered_access_view_init(struct wined3d_unordered_access_view *view,
|
||||
@@ -805,6 +810,7 @@ static HRESULT wined3d_unordered_access_view_init(struct wined3d_unordered_acces
|
||||
@@ -848,6 +853,7 @@ static HRESULT wined3d_unordered_access_view_init(struct wined3d_unordered_acces
|
||||
|
||||
wined3d_resource_incref(view->resource = resource);
|
||||
|
||||
@ -254,10 +257,10 @@ index 3cd20ea8fa..9b9e7eef4c 100644
|
||||
|
||||
return WINED3D_OK;
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 987f3dc70b..9918f13f08 100644
|
||||
index ab6472339b..d5b26d1f43 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3209,6 +3209,7 @@ struct wined3d_cs_ops
|
||||
@@ -3229,6 +3229,7 @@ struct wined3d_cs_ops
|
||||
{
|
||||
void *(*require_space)(struct wined3d_cs *cs, size_t size);
|
||||
void (*submit)(struct wined3d_cs *cs);
|
||||
@ -265,7 +268,7 @@ index 987f3dc70b..9918f13f08 100644
|
||||
void (*push_constants)(struct wined3d_cs *cs, enum wined3d_push_constants p,
|
||||
unsigned int start_idx, unsigned int count, const void *constants);
|
||||
};
|
||||
@@ -3239,6 +3240,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
|
||||
@@ -3263,6 +3264,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
|
||||
void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base_vertex_idx,
|
||||
unsigned int start_idx, unsigned int index_count, unsigned int start_instance,
|
||||
unsigned int instance_count, BOOL indexed) DECLSPEC_HIDDEN;
|
||||
@ -273,7 +276,7 @@ index 987f3dc70b..9918f13f08 100644
|
||||
void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
|
||||
const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD flags) DECLSPEC_HIDDEN;
|
||||
@@ -3290,6 +3292,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
@@ -3314,6 +3316,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
|
||||
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 9e6e4d61e56980850bbbc340d510e9a57f9d5627 Mon Sep 17 00:00:00 2001
|
||||
From d595e0401ffc44a7e33b1d47931bc3cfb2ef1f24 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 6 Feb 2017 05:50:11 +0100
|
||||
Subject: wined3d: Send push_constants through the CS.
|
||||
@ -10,19 +10,19 @@ Subject: wined3d: Send push_constants through the CS.
|
||||
3 files changed, 77 insertions(+), 58 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 8c0abf449f2..0d74ea806a9 100644
|
||||
index 445a11d07e..eb2b012545 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -67,6 +67,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_UNMAP,
|
||||
@@ -68,6 +68,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_BLT_SUB_RESOURCE,
|
||||
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
|
||||
WINED3D_CS_OP_ADD_DIRTY_TEXTURE_REGION,
|
||||
+ WINED3D_CS_OP_PUSH_CONSTANTS,
|
||||
};
|
||||
|
||||
struct wined3d_cs_sync
|
||||
@@ -381,6 +382,15 @@ struct wined3d_cs_update_sub_resource
|
||||
struct wined3d_sub_resource_data data;
|
||||
@@ -392,6 +393,15 @@ struct wined3d_cs_add_dirty_texture_region
|
||||
unsigned int layer;
|
||||
};
|
||||
|
||||
+struct wined3d_cs_push_constants
|
||||
@ -37,8 +37,8 @@ index 8c0abf449f2..0d74ea806a9 100644
|
||||
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
}
|
||||
@@ -1856,6 +1866,64 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
cs->ops->submit_and_wait(cs);
|
||||
@@ -2038,6 +2048,64 @@ void wined3d_cs_emit_add_dirty_texture_region(struct wined3d_cs *cs,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
+static const struct
|
||||
@ -102,15 +102,15 @@ index 8c0abf449f2..0d74ea806a9 100644
|
||||
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
|
||||
@@ -1899,6 +1967,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_UNMAP */ wined3d_cs_exec_unmap,
|
||||
@@ -2082,6 +2150,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_BLT_SUB_RESOURCE */ wined3d_cs_exec_blt_sub_resource,
|
||||
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
|
||||
/* WINED3D_CS_OP_ADD_DIRTY_TEXTURE_REGION */ wined3d_cs_exec_add_dirty_texture_region,
|
||||
+ /* WINED3D_CS_OP_PUSH_CONSTANTS */ wined3d_cs_exec_push_constants,
|
||||
};
|
||||
|
||||
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
|
||||
@@ -1945,55 +2014,11 @@ static void wined3d_cs_st_submit(struct wined3d_cs *cs)
|
||||
@@ -2128,55 +2197,11 @@ static void wined3d_cs_st_submit(struct wined3d_cs *cs)
|
||||
HeapFree(GetProcessHeap(), 0, data);
|
||||
}
|
||||
|
||||
@ -167,10 +167,10 @@ index 8c0abf449f2..0d74ea806a9 100644
|
||||
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index e328f32403f..c3a10a2d13a 100644
|
||||
index 62580f6867..08cb0cb369 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -2376,7 +2376,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
|
||||
@@ -2373,7 +2373,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -179,7 +179,7 @@ index e328f32403f..c3a10a2d13a 100644
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2425,7 +2425,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
|
||||
@@ -2422,7 +2422,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -188,7 +188,7 @@ index e328f32403f..c3a10a2d13a 100644
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2470,7 +2470,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
|
||||
@@ -2467,7 +2467,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
|
||||
memset(&device->recording->changed.vs_consts_f[start_idx], 1,
|
||||
count * sizeof(*device->recording->changed.vs_consts_f));
|
||||
else
|
||||
@ -197,7 +197,7 @@ index e328f32403f..c3a10a2d13a 100644
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -2591,7 +2591,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
|
||||
@@ -2588,7 +2588,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -206,7 +206,7 @@ index e328f32403f..c3a10a2d13a 100644
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2640,7 +2640,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
|
||||
@@ -2637,7 +2637,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -215,7 +215,7 @@ index e328f32403f..c3a10a2d13a 100644
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2686,7 +2686,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
|
||||
@@ -2683,7 +2683,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
|
||||
memset(&device->recording->changed.ps_consts_f[start_idx], 1,
|
||||
count * sizeof(*device->recording->changed.ps_consts_f));
|
||||
else
|
||||
@ -225,10 +225,10 @@ index e328f32403f..c3a10a2d13a 100644
|
||||
return WINED3D_OK;
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 2922caaa412..9c68628ed6c 100644
|
||||
index d5b26d1f43..ee41d45201 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3200,8 +3200,6 @@ struct wined3d_cs_ops
|
||||
@@ -3230,8 +3230,6 @@ struct wined3d_cs_ops
|
||||
void *(*require_space)(struct wined3d_cs *cs, size_t size);
|
||||
void (*submit)(struct wined3d_cs *cs);
|
||||
void (*submit_and_wait)(struct wined3d_cs *cs);
|
||||
@ -237,7 +237,7 @@ index 2922caaa412..9c68628ed6c 100644
|
||||
};
|
||||
|
||||
struct wined3d_cs
|
||||
@@ -3234,6 +3232,8 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
@@ -3268,6 +3266,8 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
|
||||
const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD flags) DECLSPEC_HIDDEN;
|
||||
@ -246,7 +246,7 @@ index 2922caaa412..9c68628ed6c 100644
|
||||
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx,
|
||||
@@ -3294,12 +3294,6 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -3328,12 +3328,6 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 93d7436f3da6532a3ec5beeeea4d548c34820477 Mon Sep 17 00:00:00 2001
|
||||
From 7788e5dc312a2f08419f2e7b17bfc3a8d2439ae7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
|
||||
Date: Sat, 7 May 2016 21:58:06 +0100
|
||||
Subject: wined3d: Update the swap interval through the CS in reset.
|
||||
@ -10,18 +10,18 @@ Subject: wined3d: Update the swap interval through the CS in reset.
|
||||
3 files changed, 28 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index d5199a93d8..65c02e4d21 100644
|
||||
index b6bc0e6b84..eb82d40e8f 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -69,6 +69,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_BLT_SUB_RESOURCE,
|
||||
@@ -70,6 +70,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
|
||||
WINED3D_CS_OP_ADD_DIRTY_TEXTURE_REGION,
|
||||
WINED3D_CS_OP_PUSH_CONSTANTS,
|
||||
+ WINED3D_CS_OP_UPDATE_SWAP_INTERVAL,
|
||||
};
|
||||
|
||||
struct wined3d_cs_sync
|
||||
@@ -403,6 +404,12 @@ struct wined3d_cs_push_constants
|
||||
@@ -411,6 +412,12 @@ struct wined3d_cs_push_constants
|
||||
BYTE constants[1];
|
||||
};
|
||||
|
||||
@ -34,7 +34,7 @@ index d5199a93d8..65c02e4d21 100644
|
||||
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
}
|
||||
@@ -2111,6 +2118,24 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
@@ -2155,6 +2162,24 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -59,9 +59,9 @@ index d5199a93d8..65c02e4d21 100644
|
||||
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
|
||||
@@ -2156,6 +2181,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_BLT_SUB_RESOURCE */ wined3d_cs_exec_blt_sub_resource,
|
||||
@@ -2201,6 +2226,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
|
||||
/* WINED3D_CS_OP_ADD_DIRTY_TEXTURE_REGION */ wined3d_cs_exec_add_dirty_texture_region,
|
||||
/* WINED3D_CS_OP_PUSH_CONSTANTS */ wined3d_cs_exec_push_constants,
|
||||
+ /* WINED3D_CS_OP_UPDATE_SWAP_INTERVAL */ wined3d_cs_exec_update_swap_interval,
|
||||
};
|
||||
@ -81,10 +81,10 @@ index c2b7623141..c05c8c51f2 100644
|
||||
|
||||
/* All done. There is no need to reload resources or shaders, this will happen automatically on the
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index b30d10f3f1..c3cfa428e0 100644
|
||||
index 611e9532ce..7a7e281318 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3322,6 +3322,7 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
@@ -3324,6 +3324,7 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
|
||||
unsigned int slice_pitch) DECLSPEC_HIDDEN;
|
||||
|
@ -1,153 +0,0 @@
|
||||
From 6255aef81f1fb5a7acbae1f69840c26dcd85b44b Mon Sep 17 00:00:00 2001
|
||||
From: Nils Kuhnhenn <nils@volafile.io>
|
||||
Date: Fri, 5 Aug 2016 20:28:46 +0200
|
||||
Subject: wined3d: Fix context_acquire not being called from the command thread
|
||||
in wined3d_texture_add_dirty_region.
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 53 ++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/wined3d/texture.c | 20 ++--------------
|
||||
dlls/wined3d/wined3d_private.h | 2 ++
|
||||
3 files changed, 57 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 65c02e4d21..2ba1e74606 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -70,6 +70,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
|
||||
WINED3D_CS_OP_PUSH_CONSTANTS,
|
||||
WINED3D_CS_OP_UPDATE_SWAP_INTERVAL,
|
||||
+ WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION,
|
||||
};
|
||||
|
||||
struct wined3d_cs_sync
|
||||
@@ -410,6 +411,13 @@ struct wined3d_cs_update_swap_interval
|
||||
struct wined3d_swapchain *swapchain;
|
||||
};
|
||||
|
||||
+struct wined3d_cs_texture_add_dirty_region
|
||||
+{
|
||||
+ enum wined3d_cs_op opcode;
|
||||
+ struct wined3d_texture *texture;
|
||||
+ unsigned int sub_resource_idx;
|
||||
+};
|
||||
+
|
||||
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
}
|
||||
@@ -2136,6 +2144,50 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
|
||||
cs->ops->submit_and_wait(cs);
|
||||
}
|
||||
|
||||
+static void wined3d_cs_exec_texture_add_dirty_region(struct wined3d_cs *cs, const void *data)
|
||||
+{
|
||||
+ const struct wined3d_cs_texture_add_dirty_region *op = data;
|
||||
+ unsigned int i, sub_resource_idx = op->sub_resource_idx;
|
||||
+ struct wined3d_texture *texture = op->texture;
|
||||
+ struct wined3d_context *context;
|
||||
+
|
||||
+ context = context_acquire(texture->resource.device, NULL, 0);
|
||||
+
|
||||
+ for (i = 0; i < texture->level_count; ++i, ++sub_resource_idx)
|
||||
+ {
|
||||
+ if (!wined3d_texture_load_location(texture, sub_resource_idx, context, texture->resource.map_binding))
|
||||
+ {
|
||||
+ ERR("Failed to load location %s.\n", wined3d_debug_location(texture->resource.map_binding));
|
||||
+ context_release(context);
|
||||
+ goto error;
|
||||
+ }
|
||||
+ wined3d_texture_invalidate_location(texture, sub_resource_idx, ~texture->resource.map_binding);
|
||||
+ }
|
||||
+
|
||||
+error:
|
||||
+ context_release(context);
|
||||
+ wined3d_resource_release(&texture->resource);
|
||||
+}
|
||||
+
|
||||
+void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
+ struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
+ const struct wined3d_box *dirty_region)
|
||||
+{
|
||||
+ struct wined3d_cs_texture_add_dirty_region *op;
|
||||
+
|
||||
+ if (dirty_region)
|
||||
+ WARN("Ignoring dirty_region %s.\n", debug_box(dirty_region));
|
||||
+
|
||||
+ op = cs->ops->require_space(cs, sizeof(*op));
|
||||
+ op->opcode = WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION;
|
||||
+ op->texture = texture;
|
||||
+ op->sub_resource_idx = sub_resource_idx;
|
||||
+
|
||||
+ wined3d_resource_acquire(&texture->resource);
|
||||
+
|
||||
+ cs->ops->submit(cs);
|
||||
+}
|
||||
+
|
||||
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
|
||||
@@ -2182,6 +2234,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
|
||||
/* WINED3D_CS_OP_PUSH_CONSTANTS */ wined3d_cs_exec_push_constants,
|
||||
/* WINED3D_CS_OP_UPDATE_SWAP_INTERVAL */ wined3d_cs_exec_update_swap_interval,
|
||||
+ /* WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION */ wined3d_cs_exec_texture_add_dirty_region,
|
||||
};
|
||||
|
||||
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 8581723a15..700e587f8d 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1654,8 +1654,7 @@ static struct wined3d_texture_sub_resource *wined3d_texture_get_sub_resource(str
|
||||
HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
|
||||
UINT layer, const struct wined3d_box *dirty_region)
|
||||
{
|
||||
- unsigned int sub_resource_idx, i;
|
||||
- struct wined3d_context *context;
|
||||
+ unsigned int sub_resource_idx;
|
||||
|
||||
TRACE("texture %p, layer %u, dirty_region %s.\n", texture, layer, debug_box(dirty_region));
|
||||
|
||||
@@ -1664,24 +1663,9 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
|
||||
WARN("Invalid layer %u specified.\n", layer);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
-
|
||||
- if (dirty_region)
|
||||
- WARN("Ignoring dirty_region %s.\n", debug_box(dirty_region));
|
||||
-
|
||||
- context = context_acquire(texture->resource.device, NULL, 0);
|
||||
sub_resource_idx = layer * texture->level_count;
|
||||
- for (i = 0; i < texture->level_count; ++i, ++sub_resource_idx)
|
||||
- {
|
||||
- if (!wined3d_texture_load_location(texture, sub_resource_idx, context, texture->resource.map_binding))
|
||||
- {
|
||||
- ERR("Failed to load location %s.\n", wined3d_debug_location(texture->resource.map_binding));
|
||||
- context_release(context);
|
||||
- return E_OUTOFMEMORY;
|
||||
- }
|
||||
- wined3d_texture_invalidate_location(texture, sub_resource_idx, ~texture->resource.map_binding);
|
||||
- }
|
||||
- context_release(context);
|
||||
|
||||
+ wined3d_cs_emit_texture_add_dirty_region(texture->resource.device->cs, texture, sub_resource_idx, dirty_region);
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index c3cfa428e0..ab73b02b11 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3317,6 +3317,8 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
|
||||
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
+ unsigned int sub_resource_idx, const struct wined3d_box *dirty_region) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_sync(struct wined3d_cs *cs);
|
||||
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
--
|
||||
2.11.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 60156f6e4f2b3bb35af27b2dc33a640c1c04e80f Mon Sep 17 00:00:00 2001
|
||||
From b46cefd599a66804a8b90997af54d69c435515b1 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
|
||||
@ -26,7 +26,7 @@ index 598622d3e7..41a332f19a 100644
|
||||
current_context = NULL;
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 2ba1e74606..8662a142ff 100644
|
||||
index eb82d40e8f..e183a730ed 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -18,6 +18,7 @@
|
||||
@ -38,9 +38,9 @@ index 2ba1e74606..8662a142ff 100644
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
||||
@@ -71,6 +72,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_ADD_DIRTY_TEXTURE_REGION,
|
||||
WINED3D_CS_OP_PUSH_CONSTANTS,
|
||||
WINED3D_CS_OP_UPDATE_SWAP_INTERVAL,
|
||||
WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION,
|
||||
+ WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@ -53,8 +53,8 @@ index 2ba1e74606..8662a142ff 100644
|
||||
DWORD flags;
|
||||
unsigned int rt_count;
|
||||
struct wined3d_fb_state *fb;
|
||||
@@ -418,8 +421,14 @@ struct wined3d_cs_texture_add_dirty_region
|
||||
unsigned int sub_resource_idx;
|
||||
@@ -418,8 +421,14 @@ struct wined3d_cs_update_swap_interval
|
||||
struct wined3d_swapchain *swapchain;
|
||||
};
|
||||
|
||||
-static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
|
||||
@ -873,7 +873,25 @@ index 2ba1e74606..8662a142ff 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -2090,10 +2184,11 @@ push_constant_info[] =
|
||||
@@ -2068,7 +2162,7 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
cs->ops->submit_and_wait(cs);
|
||||
}
|
||||
|
||||
-static void wined3d_cs_exec_add_dirty_texture_region(struct wined3d_cs *cs, const void *data)
|
||||
+static UINT wined3d_cs_exec_add_dirty_texture_region(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_add_dirty_texture_region *op = data;
|
||||
struct wined3d_texture *texture = op->texture;
|
||||
@@ -2087,6 +2181,8 @@ static void wined3d_cs_exec_add_dirty_texture_region(struct wined3d_cs *cs, cons
|
||||
context_release(context);
|
||||
|
||||
wined3d_resource_release(&texture->resource);
|
||||
+
|
||||
+ return sizeof(*op);
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_add_dirty_texture_region(struct wined3d_cs *cs,
|
||||
@@ -2126,10 +2222,11 @@ push_constant_info[] =
|
||||
{FIELD_OFFSET(struct wined3d_state, ps_consts_b), sizeof(BOOL), WINED3D_SHADER_CONST_PS_B},
|
||||
};
|
||||
|
||||
@ -886,7 +904,7 @@ index 2ba1e74606..8662a142ff 100644
|
||||
unsigned int context_count;
|
||||
unsigned int i;
|
||||
size_t offset;
|
||||
@@ -2109,6 +2204,8 @@ static void wined3d_cs_exec_push_constants(struct wined3d_cs *cs, const void *da
|
||||
@@ -2145,6 +2242,8 @@ static void wined3d_cs_exec_push_constants(struct wined3d_cs *cs, const void *da
|
||||
{
|
||||
device->contexts[i]->constant_update_mask |= push_constant_info[op->p].mask;
|
||||
}
|
||||
@ -895,7 +913,7 @@ index 2ba1e74606..8662a142ff 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_constants p,
|
||||
@@ -2126,11 +2223,13 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
@@ -2162,11 +2261,13 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -910,34 +928,16 @@ index 2ba1e74606..8662a142ff 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain)
|
||||
@@ -2144,7 +2243,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
|
||||
@@ -2180,7 +2281,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
|
||||
cs->ops->submit_and_wait(cs);
|
||||
}
|
||||
|
||||
-static void wined3d_cs_exec_texture_add_dirty_region(struct wined3d_cs *cs, const void *data)
|
||||
+static UINT wined3d_cs_exec_texture_add_dirty_region(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_texture_add_dirty_region *op = data;
|
||||
unsigned int i, sub_resource_idx = op->sub_resource_idx;
|
||||
@@ -2167,6 +2266,8 @@ static void wined3d_cs_exec_texture_add_dirty_region(struct wined3d_cs *cs, cons
|
||||
error:
|
||||
context_release(context);
|
||||
wined3d_resource_release(&texture->resource);
|
||||
+
|
||||
+ return sizeof(*op);
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
@@ -2188,7 +2289,7 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
-static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
+static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
|
||||
/* WINED3D_CS_OP_GLFINISH */ wined3d_cs_exec_glfinish,
|
||||
@@ -2288,6 +2389,201 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
@@ -2280,6 +2381,201 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
wined3d_cs_st_submit,
|
||||
};
|
||||
|
||||
@ -1139,7 +1139,7 @@ index 2ba1e74606..8662a142ff 100644
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
@@ -2317,12 +2613,41 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2309,12 +2605,41 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1225,7 +1225,7 @@ index 1ce5937f17..4ef747ca89 100644
|
||||
if (hkey) RegCloseKey( hkey );
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 7701fc50a2..1bdabe73a6 100644
|
||||
index 77a6aa3824..1f8af50116 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -390,6 +390,7 @@ struct wined3d_settings
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 826d8b385ffe74c04815d60b01ee8b43b0f9e2c3 Mon Sep 17 00:00:00 2001
|
||||
From f48daa130158a7637b0726a45fca28a814052f41 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 8 Feb 2017 00:12:31 +0100
|
||||
Subject: wined3d: Introduce a separate priority queue.
|
||||
@ -9,7 +9,7 @@ Subject: wined3d: Introduce a separate priority queue.
|
||||
2 files changed, 67 insertions(+), 56 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 7dc1cab014..d456b8fb68 100644
|
||||
index 141c4f7194..f4769431a6 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -435,7 +435,7 @@ void wined3d_cs_emit_sync(struct wined3d_cs *cs)
|
||||
@ -399,7 +399,16 @@ index 7dc1cab014..d456b8fb68 100644
|
||||
op->opcode = WINED3D_CS_OP_UPDATE_SUB_RESOURCE;
|
||||
op->resource = resource;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -2213,7 +2213,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
@@ -2190,7 +2190,7 @@ void wined3d_cs_emit_add_dirty_texture_region(struct wined3d_cs *cs,
|
||||
{
|
||||
struct wined3d_cs_add_dirty_texture_region *op;
|
||||
|
||||
- op = cs->ops->require_space(cs, sizeof(*op));
|
||||
+ op = cs->ops->require_space(cs, sizeof(*op), 0);
|
||||
op->opcode = WINED3D_CS_OP_ADD_DIRTY_TEXTURE_REGION;
|
||||
op->texture = texture;
|
||||
op->layer = layer;
|
||||
@@ -2251,7 +2251,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
{
|
||||
struct wined3d_cs_push_constants *op;
|
||||
|
||||
@ -408,7 +417,7 @@ index 7dc1cab014..d456b8fb68 100644
|
||||
op->opcode = WINED3D_CS_OP_PUSH_CONSTANTS;
|
||||
op->p = p;
|
||||
op->start_idx = start_idx;
|
||||
@@ -2236,7 +2236,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
|
||||
@@ -2274,7 +2274,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
|
||||
{
|
||||
struct wined3d_cs_update_swap_interval *op;
|
||||
|
||||
@ -417,17 +426,8 @@ index 7dc1cab014..d456b8fb68 100644
|
||||
op->opcode = WINED3D_CS_OP_UPDATE_SWAP_INTERVAL;
|
||||
op->swapchain = swapchain;
|
||||
|
||||
@@ -2279,7 +2279,7 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
if (dirty_region)
|
||||
WARN("Ignoring dirty_region %s.\n", debug_box(dirty_region));
|
||||
|
||||
- op = cs->ops->require_space(cs, sizeof(*op));
|
||||
+ op = cs->ops->require_space(cs, sizeof(*op), 0);
|
||||
op->opcode = WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION;
|
||||
op->texture = texture;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -2338,7 +2338,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION */ wined3d_cs_exec_texture_add_dirty_region,
|
||||
@@ -2330,7 +2330,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_UPDATE_SWAP_INTERVAL */ wined3d_cs_exec_update_swap_interval,
|
||||
};
|
||||
|
||||
-static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
|
||||
@ -435,7 +435,7 @@ index 7dc1cab014..d456b8fb68 100644
|
||||
{
|
||||
if (size > (cs->data_size - cs->end))
|
||||
{
|
||||
@@ -2422,6 +2422,8 @@ static struct wined3d_cs_block *wined3d_cs_dequeue_command(struct wined3d_cs *cs
|
||||
@@ -2414,6 +2414,8 @@ static struct wined3d_cs_block *wined3d_cs_dequeue_command(struct wined3d_cs *cs
|
||||
/* FIXME: Use an event to wait after a couple of spins. */
|
||||
for (;;)
|
||||
{
|
||||
@ -444,7 +444,7 @@ index 7dc1cab014..d456b8fb68 100644
|
||||
if ((block = wined3d_cs_list_dequeue(&cs->exec_list)))
|
||||
return block;
|
||||
}
|
||||
@@ -2449,7 +2451,7 @@ static void wined3d_cs_list_cleanup(struct wined3d_cs_list *list)
|
||||
@@ -2441,7 +2443,7 @@ static void wined3d_cs_list_cleanup(struct wined3d_cs_list *list)
|
||||
DeleteCriticalSection(&list->lock);
|
||||
}
|
||||
|
||||
@ -453,7 +453,7 @@ index 7dc1cab014..d456b8fb68 100644
|
||||
{
|
||||
struct wined3d_cs_block *block;
|
||||
|
||||
@@ -2463,26 +2465,28 @@ static struct wined3d_cs_block *wined3d_cs_get_block(struct wined3d_cs *cs)
|
||||
@@ -2455,26 +2457,28 @@ static struct wined3d_cs_block *wined3d_cs_get_block(struct wined3d_cs *cs)
|
||||
}
|
||||
|
||||
block->pos = 0;
|
||||
@ -486,7 +486,7 @@ index 7dc1cab014..d456b8fb68 100644
|
||||
cs->current_block = block;
|
||||
}
|
||||
|
||||
@@ -2494,10 +2498,13 @@ static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
|
||||
@@ -2486,10 +2490,13 @@ static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
|
||||
|
||||
static void wined3d_cs_mt_submit(struct wined3d_cs *cs)
|
||||
{
|
||||
@ -501,7 +501,7 @@ index 7dc1cab014..d456b8fb68 100644
|
||||
cs->current_block = NULL;
|
||||
}
|
||||
|
||||
@@ -2511,7 +2518,7 @@ static void wined3d_cs_mt_submit_and_wait(struct wined3d_cs *cs)
|
||||
@@ -2503,7 +2510,7 @@ static void wined3d_cs_mt_submit_and_wait(struct wined3d_cs *cs)
|
||||
|
||||
block = cs->current_block;
|
||||
block->fence = &fence;
|
||||
@ -510,7 +510,7 @@ index 7dc1cab014..d456b8fb68 100644
|
||||
cs->current_block = NULL;
|
||||
|
||||
/* A busy wait should be fine, we're not supposed to have to wait very
|
||||
@@ -2533,7 +2540,7 @@ static void wined3d_cs_mt_emit_stop(struct wined3d_cs *cs)
|
||||
@@ -2525,7 +2532,7 @@ static void wined3d_cs_mt_emit_stop(struct wined3d_cs *cs)
|
||||
assert(cs->thread_id != GetCurrentThreadId());
|
||||
assert(cs->ops == &wined3d_cs_mt_ops);
|
||||
|
||||
@ -519,7 +519,7 @@ index 7dc1cab014..d456b8fb68 100644
|
||||
op->opcode = WINED3D_CS_OP_STOP;
|
||||
|
||||
cs->ops->submit(cs);
|
||||
@@ -2619,6 +2626,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2611,6 +2618,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
|
||||
wined3d_cs_list_init(&cs->free_list);
|
||||
wined3d_cs_list_init(&cs->exec_list);
|
||||
@ -527,7 +527,7 @@ index 7dc1cab014..d456b8fb68 100644
|
||||
|
||||
if (!(cs->thread = CreateThread(NULL, 0, wined3d_cs_run, cs, 0, &cs->thread_id)))
|
||||
{
|
||||
@@ -2644,6 +2652,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
@@ -2636,6 +2644,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
WaitForSingleObject(cs->thread, INFINITE);
|
||||
CloseHandle(cs->thread);
|
||||
|
||||
@ -536,7 +536,7 @@ index 7dc1cab014..d456b8fb68 100644
|
||||
wined3d_cs_list_cleanup(&cs->free_list);
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 1bdabe73a6..d9a0e8f788 100644
|
||||
index 1f8af50116..12ace4e746 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3245,13 +3245,14 @@ struct wined3d_cs_block
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 399b96f2a004f607fe917225e390a6efff7169b6 Mon Sep 17 00:00:00 2001
|
||||
From 3d756295634736a4685f5a672e47e4dcaaf44908 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 20 Feb 2017 00:27:25 +0100
|
||||
Subject: wined3d: Improve wined3d_cs_emit_update_sub_resource.
|
||||
@ -9,10 +9,10 @@ Subject: wined3d: Improve wined3d_cs_emit_update_sub_resource.
|
||||
2 files changed, 48 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index d3bcc49e6ee..94f46d289a6 100644
|
||||
index 0bc2a59d2e..27ec9dc130 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -380,10 +380,12 @@ struct wined3d_cs_unmap
|
||||
@@ -393,10 +393,12 @@ struct wined3d_cs_blt_sub_resource
|
||||
struct wined3d_cs_update_sub_resource
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
@ -24,8 +24,8 @@ index d3bcc49e6ee..94f46d289a6 100644
|
||||
+ BYTE copy_data[1];
|
||||
};
|
||||
|
||||
struct wined3d_cs_push_constants
|
||||
@@ -1973,7 +1975,7 @@ static UINT wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi
|
||||
struct wined3d_cs_add_dirty_texture_region
|
||||
@@ -2147,7 +2149,7 @@ static UINT wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi
|
||||
|
||||
done:
|
||||
wined3d_resource_release(op->resource);
|
||||
@ -34,7 +34,7 @@ index d3bcc49e6ee..94f46d289a6 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -1981,9 +1983,54 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
@@ -2155,9 +2157,54 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
unsigned int slice_pitch)
|
||||
{
|
||||
struct wined3d_cs_update_sub_resource *op;
|
||||
@ -90,10 +90,10 @@ index d3bcc49e6ee..94f46d289a6 100644
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
op->box = *box;
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index b413de95858..0efd687b747 100644
|
||||
index 170215b944..a642f77b58 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -4163,8 +4163,6 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4115,8 +4115,6 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
TRACE("device %p, resource %p, sub_resource_idx %u, box %s, data %p, row_pitch %u, depth_pitch %u.\n",
|
||||
device, resource, sub_resource_idx, debug_box(box), data, row_pitch, depth_pitch);
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
From 418256c5f4821f87fdc353d9eb1dd5991bdf2a1c Mon Sep 17 00:00:00 2001
|
||||
From c91507431e6dc246386277821a0ba4a3719d0a36 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 21 Mar 2016 18:27:59 +0100
|
||||
Subject: wined3d: Silence extremely noisy FIXME in
|
||||
@ -9,18 +9,18 @@ Subject: wined3d: Silence extremely noisy FIXME in
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 3219305246..684e18b46f 100644
|
||||
index 2419616731..6e0ff4be4d 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1651,7 +1651,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
|
||||
@@ -1648,7 +1648,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
|
||||
}
|
||||
|
||||
if (dirty_region)
|
||||
- FIXME("Ignoring dirty_region %s.\n", debug_box(dirty_region));
|
||||
+ WARN("Ignoring dirty_region %s.\n", debug_box(dirty_region));
|
||||
|
||||
context = context_acquire(texture->resource.device, NULL, 0);
|
||||
sub_resource_idx = layer * texture->level_count;
|
||||
wined3d_cs_emit_add_dirty_texture_region(texture->resource.device->cs, texture, layer);
|
||||
|
||||
--
|
||||
2.11.0
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user