Rebase against 59116f833ea29839b186617b625bb3aa01927944.

This commit is contained in:
Sebastian Lackner 2016-02-03 23:10:27 +01:00
parent 345d3789cc
commit be6712245c
83 changed files with 273 additions and 434 deletions

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "f7e9604c3eb9082d3a1b0172ec7e3b21234fe7b7"
echo "59116f833ea29839b186617b625bb3aa01927944"
}
# Show version information
@ -6780,87 +6780,86 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then
patch_apply wined3d-CSMT_Main/0086-wined3d-Put-this-into-the-query-poll-patch.patch
patch_apply wined3d-CSMT_Main/0087-wined3d-Send-update_surface-commands-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0088-wined3d-Send-texture-preloads-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0089-wined3d-Send-surface-preloads-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0090-wined3d-Send-update_texture-calls-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0091-wined3d-Get-rid-of-the-surface_upload_data-glFinish.patch
patch_apply wined3d-CSMT_Main/0092-wined3d-Don-t-lock-the-src-volume-in-device_update_v.patch
patch_apply wined3d-CSMT_Main/0093-wined3d-Handle-evit_managed_resources-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0094-wined3d-Introduce-resource-fencing.patch
patch_apply wined3d-CSMT_Main/0095-wined3d-Fence-update_texture-and-update_surface-call.patch
patch_apply wined3d-CSMT_Main/0096-wined3d-Dirtify-resources-on-unmap.patch
patch_apply wined3d-CSMT_Main/0097-wined3d-Fence-texture-reads-in-draws.patch
patch_apply wined3d-CSMT_Main/0098-wined3d-Fence-render-targets-and-depth-stencils.patch
patch_apply wined3d-CSMT_Main/0099-wined3d-Fence-blit-operations.patch
patch_apply wined3d-CSMT_Main/0100-wined3d-Fence-color_fill-operations.patch
patch_apply wined3d-CSMT_Main/0101-wined3d-Fence-clear-calls.patch
patch_apply wined3d-CSMT_Main/0102-wined3d-Fence-present-calls.patch
patch_apply wined3d-CSMT_Main/0103-wined3d-Make-resource-maps-and-unmaps-a-priority-com.patch
patch_apply wined3d-CSMT_Main/0104-wined3d-Dirtify-changed-textures-through-the-command.patch
patch_apply wined3d-CSMT_Main/0105-wined3d-Wrap-GL-BOs-in-a-structure.patch
patch_apply wined3d-CSMT_Main/0106-wined3d-Separate-resource-map-and-draw-buffers.patch
patch_apply wined3d-CSMT_Main/0107-wined3d-Implement-DISCARD-resource-maps-with-buffers.patch
patch_apply wined3d-CSMT_Main/0108-wined3d-Implement-DISCARD-resource-maps-with-heap-me.patch
patch_apply wined3d-CSMT_Main/0109-wined3d-Unset-some-objects-in-state_init_default.patch
patch_apply wined3d-CSMT_Main/0110-wined3d-Don-t-request-the-frontbuffer-to-create-dumm.patch
patch_apply wined3d-CSMT_Main/0111-wined3d-Use-double-buffered-buffers-for-multithreade.patch
patch_apply wined3d-CSMT_Main/0112-wined3d-Don-t-synchronize-NOOVERWRITE-buffer-maps.patch
patch_apply wined3d-CSMT_Main/0113-wined3d-Separate-buffer-map-write-and-draw-read-memo.patch
patch_apply wined3d-CSMT_Main/0114-wined3d-Accelerate-DISCARD-buffer-maps.patch
patch_apply wined3d-CSMT_Main/0115-wined3d-Accelerate-READONLY-buffer-maps.patch
patch_apply wined3d-CSMT_Main/0116-wined3d-Access-the-buffer-dirty-areas-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0117-wined3d-Ignore-buffer-resource.map_count-in-the-CS.patch
patch_apply wined3d-CSMT_Main/0118-wined3d-Send-buffer-preloads-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0119-wined3d-Use-glBufferSubData-instead-of-glMapBufferRa.patch
patch_apply wined3d-CSMT_Main/0120-wined3d-Separate-GL-buffer-discard-control-from-igno.patch
patch_apply wined3d-CSMT_Main/0121-wined3d-Create-buffers-before-mapping-them.patch
patch_apply wined3d-CSMT_Main/0122-wined3d-Destroy-views-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0123-wined3d-Remove-another-glFinish.patch
patch_apply wined3d-CSMT_Main/0124-wined3d-Destroy-vertex-declarations-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0125-wined3d-Destroy-shaders-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0126-wined3d-Create-VBOs-through-the-command-stream.patch
patch_apply wined3d-CSMT_Main/0127-wined3d-Clean-up-resource-data-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0128-wined3d-Clean-up-buffer-resource-data-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0129-wined3d-Clean-up-volume-resource-data-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0130-wined3d-Clean-up-surfaces-through-the-cs.patch
patch_apply wined3d-CSMT_Main/0131-wined3d-Clean-up-texture-resources-through-the-cs.patch
patch_apply wined3d-CSMT_Main/0132-wined3d-Unload-resources-through-the-CS-in-uninit_3d.patch
patch_apply wined3d-CSMT_Main/0133-wined3d-Unload-resources-through-the-CS-in-device_re.patch
patch_apply wined3d-CSMT_Main/0134-wined3d-Don-t-glFinish-after-a-depth-buffer-blit.patch
patch_apply wined3d-CSMT_Main/0135-wined3d-Remove-software-cursor-support.patch
patch_apply wined3d-CSMT_Main/0136-wined3d-Create-dummy-textures-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0137-wined3d-Create-the-initial-context-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0138-wined3d-Recreate-ctx-and-dummy-textures-through-the-.patch
patch_apply wined3d-CSMT_Main/0139-wined3d-Ignore-WINED3D_MAP_NO_DIRTY_UPDATE-in-resour.patch
patch_apply wined3d-CSMT_Main/0140-wined3d-Delete-GL-contexts-through-the-CS-in-reset.patch
patch_apply wined3d-CSMT_Main/0141-wined3d-Delete-GL-contexts-through-the-CS-in-uninit_.patch
patch_apply wined3d-CSMT_Main/0142-wined3d-Invoke-surface_unload-through-the-CS-in-wine.patch
patch_apply wined3d-CSMT_Main/0143-wined3d-Use-an-event-to-block-the-worker-thread-when.patch
patch_apply wined3d-CSMT_Main/0144-wined3d-Fence-preload-operations.patch
patch_apply wined3d-CSMT_Main/0145-d3d8-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch
patch_apply wined3d-CSMT_Main/0146-d3d9-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch
patch_apply wined3d-CSMT_Main/0147-wined3d-Completely-reset-the-state-on-reset.patch
patch_apply wined3d-CSMT_Main/0148-wined3d-Send-getdc-and-releasedc-through-the-command.patch
patch_apply wined3d-CSMT_Main/0149-wined3d-Set-map_heap_memory-NULL-when-allocating-a-P.patch
patch_apply wined3d-CSMT_Main/0150-wined3d-Wait-only-for-the-buffer-to-be-idle.patch
patch_apply wined3d-CSMT_Main/0151-wined3d-Add-a-comment-about-worker-thread-lag.patch
patch_apply wined3d-CSMT_Main/0152-wined3d-Remove-the-texture-destroy-glFinish.patch
patch_apply wined3d-CSMT_Main/0153-wined3d-Move-FBO-destruction-into-the-worker-thread.patch
patch_apply wined3d-CSMT_Main/0154-wined3d-Don-t-incref-decref-textures-in-color-depth-.patch
patch_apply wined3d-CSMT_Main/0155-Winex11-complain-about-glfinish.patch
patch_apply wined3d-CSMT_Main/0156-wined3d-Make-sure-the-new-window-is-set-up-before-se.patch
patch_apply wined3d-CSMT_Main/0157-wined3d-Remove-the-device_reset-CS-sync-fixme.patch
patch_apply wined3d-CSMT_Main/0158-wined3d-Put-GL_APPLE_flush_buffer_range-syncing-back.patch
patch_apply wined3d-CSMT_Main/0159-wined3d-Wait-for-the-resource-to-be-idle-when-destro.patch
patch_apply wined3d-CSMT_Main/0160-wined3d-Don-t-sync-on-redundant-discard-calls.patch
patch_apply wined3d-CSMT_Main/0161-wined3d-Don-t-discard-new-buffers.patch
patch_apply wined3d-CSMT_Main/0162-wined3d-Don-t-try-to-sync-VBOs-manually-on-OSX-with-.patch
patch_apply wined3d-CSMT_Main/0163-wined3d-Render-target-lock-hack.patch
patch_apply wined3d-CSMT_Main/0164-wined3d-Avoid-calling-wined3d_surface_blt-from-surfa.patch
patch_apply wined3d-CSMT_Main/0165-wined3d-Only-discard-buffers-that-are-in-use.patch
patch_apply wined3d-CSMT_Main/0166-wined3d-Destroy-samplers-through-the-command-stream.patch
patch_apply wined3d-CSMT_Main/0167-wined3d-Hack-to-reject-unsupported-color-fills.patch
patch_apply wined3d-CSMT_Main/0168-wined3d-Alloc-the-buffer-map-array-before-mapping-th.patch
patch_apply wined3d-CSMT_Main/0169-wined3d-Send-update_sub_resource-calls-through-the-c.patch
patch_apply wined3d-CSMT_Main/0089-wined3d-Send-update_texture-calls-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0090-wined3d-Get-rid-of-the-surface_upload_data-glFinish.patch
patch_apply wined3d-CSMT_Main/0091-wined3d-Don-t-lock-the-src-volume-in-device_update_v.patch
patch_apply wined3d-CSMT_Main/0092-wined3d-Handle-evit_managed_resources-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0093-wined3d-Introduce-resource-fencing.patch
patch_apply wined3d-CSMT_Main/0094-wined3d-Fence-update_texture-and-update_surface-call.patch
patch_apply wined3d-CSMT_Main/0095-wined3d-Dirtify-resources-on-unmap.patch
patch_apply wined3d-CSMT_Main/0096-wined3d-Fence-texture-reads-in-draws.patch
patch_apply wined3d-CSMT_Main/0097-wined3d-Fence-render-targets-and-depth-stencils.patch
patch_apply wined3d-CSMT_Main/0098-wined3d-Fence-blit-operations.patch
patch_apply wined3d-CSMT_Main/0099-wined3d-Fence-color_fill-operations.patch
patch_apply wined3d-CSMT_Main/0100-wined3d-Fence-clear-calls.patch
patch_apply wined3d-CSMT_Main/0101-wined3d-Fence-present-calls.patch
patch_apply wined3d-CSMT_Main/0102-wined3d-Make-resource-maps-and-unmaps-a-priority-com.patch
patch_apply wined3d-CSMT_Main/0103-wined3d-Dirtify-changed-textures-through-the-command.patch
patch_apply wined3d-CSMT_Main/0104-wined3d-Wrap-GL-BOs-in-a-structure.patch
patch_apply wined3d-CSMT_Main/0105-wined3d-Separate-resource-map-and-draw-buffers.patch
patch_apply wined3d-CSMT_Main/0106-wined3d-Implement-DISCARD-resource-maps-with-buffers.patch
patch_apply wined3d-CSMT_Main/0107-wined3d-Implement-DISCARD-resource-maps-with-heap-me.patch
patch_apply wined3d-CSMT_Main/0108-wined3d-Unset-some-objects-in-state_init_default.patch
patch_apply wined3d-CSMT_Main/0109-wined3d-Don-t-request-the-frontbuffer-to-create-dumm.patch
patch_apply wined3d-CSMT_Main/0110-wined3d-Use-double-buffered-buffers-for-multithreade.patch
patch_apply wined3d-CSMT_Main/0111-wined3d-Don-t-synchronize-NOOVERWRITE-buffer-maps.patch
patch_apply wined3d-CSMT_Main/0112-wined3d-Separate-buffer-map-write-and-draw-read-memo.patch
patch_apply wined3d-CSMT_Main/0113-wined3d-Accelerate-DISCARD-buffer-maps.patch
patch_apply wined3d-CSMT_Main/0114-wined3d-Accelerate-READONLY-buffer-maps.patch
patch_apply wined3d-CSMT_Main/0115-wined3d-Access-the-buffer-dirty-areas-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0116-wined3d-Ignore-buffer-resource.map_count-in-the-CS.patch
patch_apply wined3d-CSMT_Main/0117-wined3d-Send-buffer-preloads-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0118-wined3d-Use-glBufferSubData-instead-of-glMapBufferRa.patch
patch_apply wined3d-CSMT_Main/0119-wined3d-Separate-GL-buffer-discard-control-from-igno.patch
patch_apply wined3d-CSMT_Main/0120-wined3d-Create-buffers-before-mapping-them.patch
patch_apply wined3d-CSMT_Main/0121-wined3d-Destroy-views-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0122-wined3d-Remove-another-glFinish.patch
patch_apply wined3d-CSMT_Main/0123-wined3d-Destroy-vertex-declarations-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0124-wined3d-Destroy-shaders-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0125-wined3d-Create-VBOs-through-the-command-stream.patch
patch_apply wined3d-CSMT_Main/0126-wined3d-Clean-up-resource-data-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0127-wined3d-Clean-up-buffer-resource-data-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0128-wined3d-Clean-up-volume-resource-data-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0129-wined3d-Clean-up-surfaces-through-the-cs.patch
patch_apply wined3d-CSMT_Main/0130-wined3d-Clean-up-texture-resources-through-the-cs.patch
patch_apply wined3d-CSMT_Main/0131-wined3d-Unload-resources-through-the-CS-in-uninit_3d.patch
patch_apply wined3d-CSMT_Main/0132-wined3d-Unload-resources-through-the-CS-in-device_re.patch
patch_apply wined3d-CSMT_Main/0133-wined3d-Don-t-glFinish-after-a-depth-buffer-blit.patch
patch_apply wined3d-CSMT_Main/0134-wined3d-Remove-software-cursor-support.patch
patch_apply wined3d-CSMT_Main/0135-wined3d-Create-dummy-textures-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0136-wined3d-Create-the-initial-context-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0137-wined3d-Recreate-ctx-and-dummy-textures-through-the-.patch
patch_apply wined3d-CSMT_Main/0138-wined3d-Ignore-WINED3D_MAP_NO_DIRTY_UPDATE-in-resour.patch
patch_apply wined3d-CSMT_Main/0139-wined3d-Delete-GL-contexts-through-the-CS-in-reset.patch
patch_apply wined3d-CSMT_Main/0140-wined3d-Delete-GL-contexts-through-the-CS-in-uninit_.patch
patch_apply wined3d-CSMT_Main/0141-wined3d-Invoke-surface_unload-through-the-CS-in-wine.patch
patch_apply wined3d-CSMT_Main/0142-wined3d-Use-an-event-to-block-the-worker-thread-when.patch
patch_apply wined3d-CSMT_Main/0143-wined3d-Fence-preload-operations.patch
patch_apply wined3d-CSMT_Main/0144-d3d8-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch
patch_apply wined3d-CSMT_Main/0145-d3d9-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch
patch_apply wined3d-CSMT_Main/0146-wined3d-Completely-reset-the-state-on-reset.patch
patch_apply wined3d-CSMT_Main/0147-wined3d-Send-getdc-and-releasedc-through-the-command.patch
patch_apply wined3d-CSMT_Main/0148-wined3d-Set-map_heap_memory-NULL-when-allocating-a-P.patch
patch_apply wined3d-CSMT_Main/0149-wined3d-Wait-only-for-the-buffer-to-be-idle.patch
patch_apply wined3d-CSMT_Main/0150-wined3d-Add-a-comment-about-worker-thread-lag.patch
patch_apply wined3d-CSMT_Main/0151-wined3d-Remove-the-texture-destroy-glFinish.patch
patch_apply wined3d-CSMT_Main/0152-wined3d-Move-FBO-destruction-into-the-worker-thread.patch
patch_apply wined3d-CSMT_Main/0153-wined3d-Don-t-incref-decref-textures-in-color-depth-.patch
patch_apply wined3d-CSMT_Main/0154-Winex11-complain-about-glfinish.patch
patch_apply wined3d-CSMT_Main/0155-wined3d-Make-sure-the-new-window-is-set-up-before-se.patch
patch_apply wined3d-CSMT_Main/0156-wined3d-Remove-the-device_reset-CS-sync-fixme.patch
patch_apply wined3d-CSMT_Main/0157-wined3d-Put-GL_APPLE_flush_buffer_range-syncing-back.patch
patch_apply wined3d-CSMT_Main/0158-wined3d-Wait-for-the-resource-to-be-idle-when-destro.patch
patch_apply wined3d-CSMT_Main/0159-wined3d-Don-t-sync-on-redundant-discard-calls.patch
patch_apply wined3d-CSMT_Main/0160-wined3d-Don-t-discard-new-buffers.patch
patch_apply wined3d-CSMT_Main/0161-wined3d-Don-t-try-to-sync-VBOs-manually-on-OSX-with-.patch
patch_apply wined3d-CSMT_Main/0162-wined3d-Render-target-lock-hack.patch
patch_apply wined3d-CSMT_Main/0163-wined3d-Avoid-calling-wined3d_surface_blt-from-surfa.patch
patch_apply wined3d-CSMT_Main/0164-wined3d-Only-discard-buffers-that-are-in-use.patch
patch_apply wined3d-CSMT_Main/0165-wined3d-Destroy-samplers-through-the-command-stream.patch
patch_apply wined3d-CSMT_Main/0166-wined3d-Hack-to-reject-unsupported-color-fills.patch
patch_apply wined3d-CSMT_Main/0167-wined3d-Alloc-the-buffer-map-array-before-mapping-th.patch
patch_apply wined3d-CSMT_Main/0168-wined3d-Send-update_sub_resource-calls-through-the-c.patch
patch_apply wined3d-CSMT_Main/9998-wined3d-Enable-CSMT-by-default-print-a-winediag-mess.patch
patch_apply wined3d-CSMT_Main/9999-IfDefined.patch
(
@ -6952,7 +6951,6 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then
echo '+ { "Stefan Dösinger", "wined3d: Put this into the query poll patch.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Send update_surface commands through the CS.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Send texture preloads through the CS.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Send surface preloads through the CS.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Send update_texture calls through the CS.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Get rid of the surface_upload_data glFinish.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t lock the src volume in device_update_volume.", 1 },';

View File

@ -1,112 +0,0 @@
From 2f0bb40d8d1791180b93f3d4eccbf7c3f190d19e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 1 Aug 2013 00:15:58 +0200
Subject: wined3d: Send surface preloads through the CS
---
dlls/wined3d/cs.c | 31 +++++++++++++++++++++++++++++++
dlls/wined3d/surface.c | 5 +++--
dlls/wined3d/wined3d_private.h | 1 +
3 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 78e5010..4834dd4 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -71,6 +71,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_QUERY_DESTROY,
WINED3D_CS_OP_UPDATE_SURFACE,
WINED3D_CS_OP_TEXTURE_PRELOAD,
+ WINED3D_CS_OP_SURFACE_PRELOAD,
WINED3D_CS_OP_STOP,
};
@@ -396,6 +397,12 @@ struct wined3d_cs_texture_preload
struct wined3d_texture *texture;
};
+struct wined3d_cs_surface_preload
+{
+ enum wined3d_cs_op opcode;
+ struct wined3d_surface *surface;
+};
+
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -1858,6 +1865,29 @@ void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_textu
cs->ops->submit(cs, sizeof(*op));
}
+static UINT wined3d_cs_exec_surface_preload(struct wined3d_cs *cs, const void *data)
+{
+ const struct wined3d_cs_surface_preload *op = data;
+ struct wined3d_context *context;
+
+ context = context_acquire(cs->device, NULL);
+ wined3d_texture_preload(op->surface->container);
+ context_release(context);
+
+ return sizeof(*op);
+}
+
+void wined3d_cs_emit_surface_preload(struct wined3d_cs *cs, struct wined3d_surface *surface)
+{
+ struct wined3d_cs_surface_preload *op;
+
+ op = cs->ops->require_space(cs, sizeof(*op));
+ op->opcode = WINED3D_CS_OP_SURFACE_PRELOAD;
+ op->surface = surface;
+
+ cs->ops->submit(cs, sizeof(*op));
+}
+
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -1907,6 +1937,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_QUERY_DESTROY */ wined3d_cs_exec_query_destroy,
/* WINED3D_CS_OP_UPDATE_SURFACE */ wined3d_cs_exec_update_surface,
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
+ /* WINED3D_CS_OP_SURFACE_PRELOAD */ wined3d_cs_exec_surface_preload,
};
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 9dadb6d..b2a5d22 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1771,15 +1771,16 @@ ULONG CDECL wined3d_surface_decref(struct wined3d_surface *surface)
void CDECL wined3d_surface_preload(struct wined3d_surface *surface)
{
+ const struct wined3d_device *device = surface->resource.device;
TRACE("surface %p.\n", surface);
- if (!surface->resource.device->d3d_initialized)
+ if (!device->d3d_initialized)
{
ERR("D3D not initialized.\n");
return;
}
- wined3d_texture_preload(surface->container);
+ wined3d_cs_emit_surface_preload(device->cs, surface);
}
void * CDECL wined3d_surface_get_parent(const struct wined3d_surface *surface)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index de82b46..409f395 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2654,6 +2654,7 @@ void wined3d_cs_emit_query_destroy(struct wined3d_cs *cs, struct wined3d_query *
void wined3d_cs_emit_update_surface(struct wined3d_cs *cs, struct wined3d_surface *src,
const RECT *src_rect, struct wined3d_surface *dst, const POINT *dst_point) DECLSPEC_HIDDEN;
void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_surface_preload(struct wined3d_cs *cs, struct wined3d_surface *surface) DECLSPEC_HIDDEN;
/* Direct3D terminology with little modifications. We do not have an issued state
* because only the driver knows about it, but we have a created state because d3d
--
2.1.3

View File

@ -1,4 +1,4 @@
From c26e82ad29fda0dc41ecec558d18392044606bd5 Mon Sep 17 00:00:00 2001
From 74ca9354ca44c727c7efeeee0d5f56caf19960ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 1 Aug 2013 00:33:48 +0200
Subject: wined3d: Send update_texture calls through the CS
@ -10,19 +10,19 @@ Subject: wined3d: Send update_texture calls through the CS
3 files changed, 98 insertions(+), 64 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 20340da..fa25731 100644
index 2da4249..392ef36 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -73,6 +73,7 @@ enum wined3d_cs_op
@@ -72,6 +72,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_QUERY_DESTROY,
WINED3D_CS_OP_UPDATE_SURFACE,
WINED3D_CS_OP_TEXTURE_PRELOAD,
WINED3D_CS_OP_SURFACE_PRELOAD,
+ WINED3D_CS_OP_UPDATE_TEXTURE,
WINED3D_CS_OP_STOP,
};
@@ -413,6 +414,12 @@ struct wined3d_cs_surface_preload
struct wined3d_surface *surface;
@@ -406,6 +407,12 @@ struct wined3d_cs_texture_preload
struct wined3d_texture *texture;
};
+struct wined3d_cs_update_texture
@ -34,7 +34,7 @@ index 20340da..fa25731 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -2002,6 +2009,31 @@ void wined3d_cs_emit_surface_preload(struct wined3d_cs *cs, struct wined3d_surfa
@@ -1972,6 +1979,31 @@ void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_textu
cs->ops->submit(cs, sizeof(*op));
}
@ -66,19 +66,19 @@ index 20340da..fa25731 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2053,6 +2085,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2022,6 +2054,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_QUERY_DESTROY */ wined3d_cs_exec_query_destroy,
/* WINED3D_CS_OP_UPDATE_SURFACE */ wined3d_cs_exec_update_surface,
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
/* WINED3D_CS_OP_SURFACE_PRELOAD */ wined3d_cs_exec_surface_preload,
+ /* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
};
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 05bfa46..8103f75 100644
index 4db078d..2dde4b6 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3484,16 +3484,15 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
@@ -3494,16 +3494,15 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
}
/* This is a helper function for UpdateTexture, there is no UpdateVolume method in D3D. */
@ -98,7 +98,7 @@ index 05bfa46..8103f75 100644
if (src_volume->resource.format != dst_volume->resource.format)
{
@@ -3511,8 +3510,6 @@ static HRESULT device_update_volume(struct wined3d_device *device,
@@ -3521,8 +3520,6 @@ static HRESULT device_update_volume(struct wined3d_device *device,
if (FAILED(hr = wined3d_volume_map(src_volume, &src, NULL, WINED3D_MAP_READONLY)))
return hr;
@ -107,7 +107,7 @@ index 05bfa46..8103f75 100644
/* Only a prepare, since we're uploading the entire volume. */
wined3d_texture_prepare_texture(dst_volume->container, context, FALSE);
wined3d_texture_bind_and_dirtify(dst_volume->container, context, FALSE);
@@ -3522,57 +3519,20 @@ static HRESULT device_update_volume(struct wined3d_device *device,
@@ -3532,57 +3529,20 @@ static HRESULT device_update_volume(struct wined3d_device *device,
wined3d_volume_upload_data(dst_volume, context, &data);
wined3d_resource_invalidate_location(&dst_volume->resource, ~WINED3D_LOCATION_TEXTURE_RGB);
@ -169,7 +169,7 @@ index 05bfa46..8103f75 100644
level_count = min(wined3d_texture_get_level_count(src_texture),
wined3d_texture_get_level_count(dst_texture));
@@ -3589,17 +3549,8 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
@@ -3599,17 +3559,8 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
++src_skip_levels;
}
@ -187,7 +187,7 @@ index 05bfa46..8103f75 100644
/* Update every surface level of the texture. */
switch (type)
@@ -3619,11 +3570,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
@@ -3629,11 +3580,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
i * src_levels + j + src_skip_levels));
dst_surface = surface_from_resource(wined3d_texture_get_sub_resource(dst_texture,
i * dst_levels + j));
@ -200,7 +200,7 @@ index 05bfa46..8103f75 100644
}
}
break;
@@ -3633,14 +3580,15 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
@@ -3643,14 +3590,15 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
{
for (i = 0; i < level_count; ++i)
{
@ -218,7 +218,7 @@ index 05bfa46..8103f75 100644
}
}
break;
@@ -3648,9 +3596,58 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
@@ -3658,9 +3606,58 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
default:
FIXME("Unsupported texture type %#x.\n", type);
@ -279,10 +279,10 @@ index 05bfa46..8103f75 100644
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index ee80c52..5a0dbc4 100644
index 8985d99..e5e0336 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2194,6 +2194,8 @@ void device_resource_add(struct wined3d_device *device, struct wined3d_resource
@@ -2212,6 +2212,8 @@ void device_resource_add(struct wined3d_device *device, struct wined3d_resource
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
void device_invalidate_shader_constants(const struct wined3d_device *device, DWORD mask) DECLSPEC_HIDDEN;
@ -291,15 +291,15 @@ index ee80c52..5a0dbc4 100644
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
{
@@ -2786,6 +2788,8 @@ void wined3d_cs_emit_update_surface(struct wined3d_cs *cs, struct wined3d_surfac
@@ -2806,6 +2808,8 @@ void wined3d_cs_emit_query_destroy(struct wined3d_cs *cs, struct wined3d_query *
void wined3d_cs_emit_update_surface(struct wined3d_cs *cs, struct wined3d_surface *src,
const RECT *src_rect, struct wined3d_surface *dst, const POINT *dst_point) DECLSPEC_HIDDEN;
void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) DECLSPEC_HIDDEN;
void wined3d_cs_emit_surface_preload(struct wined3d_cs *cs, struct wined3d_surface *surface) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_texture *src,
+ struct wined3d_texture *dst) DECLSPEC_HIDDEN;
/* Direct3D terminology with little modifications. We do not have an issued state
* because only the driver knows about it, but we have a created state because d3d
--
2.6.4
2.7.0

View File

@ -1,4 +1,4 @@
From 87f659571c4214fcc73a42a1e112d6bda34950a3 Mon Sep 17 00:00:00 2001
From f93c689f0844961269bd2e4f83bf242841c1e305 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 6 Aug 2013 13:50:31 +0200
Subject: wined3d: Handle evit_managed_resources through the CS
@ -10,18 +10,18 @@ Subject: wined3d: Handle evit_managed_resources through the CS
3 files changed, 41 insertions(+), 11 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index aeba50f..11aa133 100644
index 392ef36..bbec667 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -73,6 +73,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_UPDATE_SURFACE,
WINED3D_CS_OP_TEXTURE_PRELOAD,
WINED3D_CS_OP_SURFACE_PRELOAD,
WINED3D_CS_OP_UPDATE_TEXTURE,
+ WINED3D_CS_OP_EVICT_RESOURCE,
WINED3D_CS_OP_STOP,
};
@@ -410,6 +411,12 @@ struct wined3d_cs_update_texture
@@ -413,6 +414,12 @@ struct wined3d_cs_update_texture
struct wined3d_texture *src, *dst;
};
@ -34,7 +34,7 @@ index aeba50f..11aa133 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -1920,6 +1927,35 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
@@ -2004,6 +2011,35 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
cs->ops->submit(cs, sizeof(*op));
}
@ -70,19 +70,19 @@ index aeba50f..11aa133 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -1971,6 +2007,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2055,6 +2091,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_UPDATE_SURFACE */ wined3d_cs_exec_update_surface,
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
/* WINED3D_CS_OP_SURFACE_PRELOAD */ wined3d_cs_exec_surface_preload,
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
+ /* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource,
};
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index ae7ad31..f062e84 100644
index 4abc2c5..7f7ddbb 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4207,13 +4207,8 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
@@ -4489,13 +4489,8 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
TRACE("device %p.\n", device);
@ -98,7 +98,7 @@ index ae7ad31..f062e84 100644
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
{
TRACE("Checking resource %p for eviction.\n", resource);
@@ -4221,12 +4216,9 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
@@ -4503,12 +4498,9 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
if (resource->pool == WINED3D_POOL_MANAGED && !resource->map_count)
{
TRACE("Evicting %p.\n", resource);
@ -113,11 +113,11 @@ index ae7ad31..f062e84 100644
static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 25fce7f..b9eee2c 100644
index e5e0336..60ff62f 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2659,6 +2659,7 @@ void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_textu
void wined3d_cs_emit_surface_preload(struct wined3d_cs *cs, struct wined3d_surface *surface) DECLSPEC_HIDDEN;
@@ -2810,6 +2810,7 @@ void wined3d_cs_emit_update_surface(struct wined3d_cs *cs, struct wined3d_surfac
void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_texture *texture) DECLSPEC_HIDDEN;
void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_texture *src,
struct wined3d_texture *dst) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_evict_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
@ -125,5 +125,5 @@ index 25fce7f..b9eee2c 100644
/* Direct3D terminology with little modifications. We do not have an issued state
* because only the driver knows about it, but we have a created state because d3d
--
2.1.3
2.7.0

View File

@ -1,4 +1,4 @@
From a31fb6ca1b9379028340024e2bd7e97e894b0532 Mon Sep 17 00:00:00 2001
From 8270da0218acc127fbf5032a9c351beeb1d40c56 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 21 Aug 2014 22:47:58 +0200
Subject: wined3d: Destroy views through the CS.
@ -14,18 +14,18 @@ Also contains an ugly hack for ffp_blit_depth_fill.
4 files changed, 62 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 4b9af57..8e48c55 100644
index 955459b..6453cda 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -78,6 +78,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_SURFACE_PRELOAD,
WINED3D_CS_OP_TEXTURE_PRELOAD,
WINED3D_CS_OP_UPDATE_TEXTURE,
WINED3D_CS_OP_EVICT_RESOURCE,
+ WINED3D_CS_OP_VIEW_DESTROY,
WINED3D_CS_OP_STOP,
};
@@ -449,6 +450,12 @@ struct wined3d_cs_buffer_preload
@@ -452,6 +453,12 @@ struct wined3d_cs_buffer_preload
struct wined3d_buffer *buffer;
};
@ -38,7 +38,7 @@ index 4b9af57..8e48c55 100644
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -2224,6 +2231,26 @@ void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer
@@ -2308,6 +2315,26 @@ void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer
cs->ops->submit(cs, sizeof(*op));
}
@ -65,8 +65,8 @@ index 4b9af57..8e48c55 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2280,6 +2307,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_SURFACE_PRELOAD */ wined3d_cs_exec_surface_preload,
@@ -2364,6 +2391,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_TEXTURE_PRELOAD */ wined3d_cs_exec_texture_preload,
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
/* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource,
+ /* WINED3D_CS_OP_VIEW_DESTROY */ wined3d_cs_exec_view_destroy,
@ -74,10 +74,10 @@ index 4b9af57..8e48c55 100644
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 73160ff..43f68c6 100644
index 8d87410..695790c 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4140,7 +4140,7 @@ static HRESULT ffp_blit_color_fill(struct wined3d_device *device, struct wined3d
@@ -4089,7 +4089,7 @@ static HRESULT ffp_blit_color_fill(struct wined3d_device *device, struct wined3d
}
device_clear_render_targets(device, 1, &fb, 1, dst_rect, &draw_rect, WINED3DCLEAR_TARGET, color, 0.0f, 0);
@ -86,7 +86,7 @@ index 73160ff..43f68c6 100644
return WINED3D_OK;
}
@@ -4160,7 +4160,7 @@ static HRESULT ffp_blit_depth_fill(struct wined3d_device *device, struct wined3d
@@ -4109,7 +4109,7 @@ static HRESULT ffp_blit_depth_fill(struct wined3d_device *device, struct wined3d
}
device_clear_render_targets(device, 0, &fb, 1, dst_rect, &draw_rect, WINED3DCLEAR_ZBUFFER, 0, depth, 0);
@ -96,7 +96,7 @@ index 73160ff..43f68c6 100644
return WINED3D_OK;
}
diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
index 9cda64d..56eb7b3 100644
index e621356..998231f 100644
--- a/dlls/wined3d/view.c
+++ b/dlls/wined3d/view.c
@@ -33,6 +33,11 @@ ULONG CDECL wined3d_rendertarget_view_incref(struct wined3d_rendertarget_view *v
@ -147,10 +147,10 @@ index 9cda64d..56eb7b3 100644
return refcount;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 0f88961..7d68448 100644
index 0270d6a..b3f920e 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2699,6 +2699,7 @@ void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffe
@@ -2850,6 +2850,7 @@ void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffe
void wined3d_cs_emit_buffer_invalidate_bo_range(struct wined3d_cs *cs,
struct wined3d_buffer *buffer, UINT offset, UINT size) DECLSPEC_HIDDEN;
void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
@ -158,7 +158,7 @@ index 0f88961..7d68448 100644
/* Direct3D terminology with little modifications. We do not have an issued state
* because only the driver knows about it, but we have a created state because d3d
@@ -2824,6 +2825,9 @@ static inline struct wined3d_surface *wined3d_rendertarget_view_get_surface(
@@ -2975,6 +2976,9 @@ static inline struct wined3d_surface *wined3d_rendertarget_view_get_surface(
return surface_from_resource(resource);
}
@ -169,5 +169,5 @@ index 0f88961..7d68448 100644
{
LONG refcount;
--
2.1.3
2.7.0

View File

@ -1,4 +1,4 @@
From 4a770e26268a89e0f211b42dfdd857f3180bb73e Mon Sep 17 00:00:00 2001
From c1bf11e5e355915f1ac6e1e9cdfaf3b5a7309167 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 24 Oct 2013 22:38:26 +0200
Subject: wined3d: Fence preload operations.
@ -23,14 +23,14 @@ PreLoad is done.
What's left open is finding out why anyone (I'm looking at you EVE
online) preloads a texture right before mapping it...
---
dlls/wined3d/cs.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
dlls/wined3d/cs.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 8cbca6c..b152a0d 100644
index a542270..0318315 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -2145,6 +2145,8 @@ static UINT wined3d_cs_exec_texture_preload(struct wined3d_cs *cs, const void *d
@@ -2252,6 +2252,8 @@ static UINT wined3d_cs_exec_texture_preload(struct wined3d_cs *cs, const void *d
wined3d_texture_load(texture, context, texture->flags & WINED3D_TEXTURE_IS_SRGB);
context_release(context);
@ -39,7 +39,7 @@ index 8cbca6c..b152a0d 100644
return sizeof(*op);
}
@@ -2156,6 +2158,8 @@ void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_textu
@@ -2263,6 +2265,8 @@ void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_textu
op->opcode = WINED3D_CS_OP_TEXTURE_PRELOAD;
op->texture = texture;
@ -48,25 +48,7 @@ index 8cbca6c..b152a0d 100644
cs->ops->submit(cs, sizeof(*op));
}
@@ -2168,6 +2172,8 @@ static UINT wined3d_cs_exec_surface_preload(struct wined3d_cs *cs, const void *d
wined3d_texture_preload(op->surface->container);
context_release(context);
+ wined3d_resource_dec_fence(&op->surface->container->resource);
+
return sizeof(*op);
}
@@ -2179,6 +2185,8 @@ void wined3d_cs_emit_surface_preload(struct wined3d_cs *cs, struct wined3d_surfa
op->opcode = WINED3D_CS_OP_SURFACE_PRELOAD;
op->surface = surface;
+ wined3d_resource_inc_fence(&op->surface->container->resource);
+
cs->ops->submit(cs, sizeof(*op));
}
@@ -2300,6 +2308,8 @@ static UINT wined3d_cs_exec_buffer_preload(struct wined3d_cs *cs, const void *da
@@ -2384,6 +2388,8 @@ static UINT wined3d_cs_exec_buffer_preload(struct wined3d_cs *cs, const void *da
buffer_internal_preload(op->buffer, context, NULL);
context_release(context);
@ -75,7 +57,7 @@ index 8cbca6c..b152a0d 100644
return sizeof(*op);
}
@@ -2311,6 +2321,8 @@ void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer
@@ -2395,6 +2401,8 @@ void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer
op->opcode = WINED3D_CS_OP_BUFFER_PRELOAD;
op->buffer = buffer;
@ -85,5 +67,5 @@ index 8cbca6c..b152a0d 100644
}
--
2.1.3
2.7.0

File diff suppressed because it is too large Load Diff