From 6a55df61ce3f544cc87c0eac544876d2e7f87213 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Wed, 10 Feb 2016 00:52:30 +0100 Subject: [PATCH] Rebase against 85ba92c33a8c689e375fae2f3313657aaa9877fb. --- patches/patchinstall.sh | 208 ++++---- ...a-glFinish-before-modifying-resource.patch | 50 +- ...d3d-Get-rid-of-WINED3D_BUFFER_FLUSH.patch} | 0 ...-update_surface-checks-back-in-place.patch | 127 ----- ...ce-strict-draw-ordering-for-multith.patch} | 0 ...er-target-view-clears-through-the-c.patch} | 0 ...69-wined3d-Wait-for-the-CS-in-GetDC.patch} | 0 ...urce-maps-through-the-command-strea.patch} | 0 ...d-of-the-end_scene-flush-and-finish.patch} | 0 ...-the-linked-lists-with-a-ringbuffer.patch} | 0 ...ed3d-Don-t-preload-buffers-on-unmap.patch} | 0 ...Don-t-call-glFinish-before-swapping.patch} | 0 ...d-wined3d_-_query_issue-never-fails.patch} | 0 ...query-support-to-the-command-stream.patch} | 0 ...-CS-state-to-find-out-if-a-query-is.patch} | 0 ...oll-queries-automatically-in-the-CS.patch} | 0 ...-a-separate-queue-for-priority-comm.patch} | 0 ...ed3d-Destroy-queries-through-the-CS.patch} | 0 ...-main-and-worker-thread-query-state.patch} | 0 ...t-poll-queries-that-failed-to-start.patch} | 0 ...restated-queries-from-the-poll-list.patch} | 0 ...et-the-query-state-if-it-doesn-t-ha.patch} | 0 ...-Put-this-into-the-query-poll-patch.patch} | 0 ...end-texture-preloads-through-the-CS.patch} | 30 +- ...date_surface-commands-through-the-CS.patch | 128 ----- ...update_texture-calls-through-the-CS.patch} | 30 +- ...of-the-surface_upload_data-glFinish.patch} | 0 ...k-the-src-volume-in-device_update_v.patch} | 0 ...it_managed_resources-through-the-CS.patch} | 26 +- ...-wined3d-Introduce-resource-fencing.patch} | 0 ...ate_texture-and-update_surface-call.patch} | 54 +- ...-wined3d-Dirtify-resources-on-unmap.patch} | 0 ...ined3d-Fence-texture-reads-in-draws.patch} | 0 ...e-render-targets-and-depth-stencils.patch} | 0 ... 0096-wined3d-Fence-blit-operations.patch} | 0 ...wined3d-Fence-color_fill-operations.patch} | 0 ...h => 0098-wined3d-Fence-clear-calls.patch} | 0 ...=> 0099-wined3d-Fence-present-calls.patch} | 0 ...urce-maps-and-unmaps-a-priority-com.patch} | 0 ...hanged-textures-through-the-command.patch} | 0 ...-wined3d-Wrap-GL-BOs-in-a-structure.patch} | 0 ...arate-resource-map-and-draw-buffers.patch} | 0 ...-DISCARD-resource-maps-with-buffers.patch} | 0 ...-DISCARD-resource-maps-with-heap-me.patch} | 0 ...-some-objects-in-state_init_default.patch} | 0 ...uest-the-frontbuffer-to-create-dumm.patch} | 0 ...e-buffered-buffers-for-multithreade.patch} | 0 ...synchronize-NOOVERWRITE-buffer-maps.patch} | 0 ...buffer-map-write-and-draw-read-memo.patch} | 0 ...ed3d-Accelerate-DISCARD-buffer-maps.patch} | 26 +- ...d3d-Accelerate-READONLY-buffer-maps.patch} | 0 ...e-buffer-dirty-areas-through-the-CS.patch} | 22 +- ...buffer-resource.map_count-in-the-CS.patch} | 0 ...Send-buffer-preloads-through-the-CS.patch} | 24 +- ...ferSubData-instead-of-glMapBufferRa.patch} | 0 ...GL-buffer-discard-control-from-igno.patch} | 0 ...-Create-buffers-before-mapping-them.patch} | 0 ...ined3d-Destroy-views-through-the-CS.patch} | 0 ...120-wined3d-Remove-another-glFinish.patch} | 0 ...-vertex-declarations-through-the-CS.patch} | 0 ...ed3d-Destroy-shaders-through-the-CS.patch} | 0 ...ate-VBOs-through-the-command-stream.patch} | 0 ...ean-up-resource-data-through-the-CS.patch} | 0 ...buffer-resource-data-through-the-CS.patch} | 0 ...volume-resource-data-through-the-CS.patch} | 0 ...3d-Clean-up-surfaces-through-the-cs.patch} | 32 +- ...up-texture-resources-through-the-cs.patch} | 0 ...sources-through-the-CS-in-uninit_3d.patch} | 0 ...sources-through-the-CS-in-device_re.patch} | 0 ...-glFinish-after-a-depth-buffer-blit.patch} | 0 ...ed3d-Remove-software-cursor-support.patch} | 0 ...reate-dummy-textures-through-the-CS.patch} | 0 ...-the-initial-context-through-the-CS.patch} | 0 ...ctx-and-dummy-textures-through-the-.patch} | 0 ...NED3D_MAP_NO_DIRTY_UPDATE-in-resour.patch} | 0 ...GL-contexts-through-the-CS-in-reset.patch} | 0 ...-contexts-through-the-CS-in-uninit_.patch} | 0 ...rface_unload-through-the-CS-in-wine.patch} | 0 ...ent-to-block-the-worker-thread-when.patch} | 0 ...41-wined3d-Fence-preload-operations.patch} | 0 ...K_NO_DIRTY_UPDATE-on-managed-textur.patch} | 0 ...K_NO_DIRTY_UPDATE-on-managed-textur.patch} | 0 ...Completely-reset-the-state-on-reset.patch} | 0 ...c-and-releasedc-through-the-command.patch} | 34 +- ...eap_memory-NULL-when-allocating-a-P.patch} | 0 ...Wait-only-for-the-buffer-to-be-idle.patch} | 0 ...d-a-comment-about-worker-thread-lag.patch} | 0 ...Remove-the-texture-destroy-glFinish.patch} | 0 ...-destruction-into-the-worker-thread.patch} | 0 ...ref-decref-textures-in-color-depth-.patch} | 0 ...152-Winex11-complain-about-glfinish.patch} | 0 ...-the-new-window-is-set-up-before-se.patch} | 0 ...move-the-device_reset-CS-sync-fixme.patch} | 0 ...PLE_flush_buffer_range-syncing-back.patch} | 0 ...the-resource-to-be-idle-when-destro.patch} | 0 ...n-t-sync-on-redundant-discard-calls.patch} | 0 ...8-wined3d-Don-t-discard-new-buffers.patch} | 0 ...-to-sync-VBOs-manually-on-OSX-with-.patch} | 0 ...160-wined3d-Render-target-lock-hack.patch} | 0 ...ling-wined3d_surface_blt-from-surfa.patch} | 0 ...nly-discard-buffers-that-are-in-use.patch} | 0 ...samplers-through-the-command-stream.patch} | 0 ...k-to-reject-unsupported-color-fills.patch} | 0 ...-buffer-map-array-before-mapping-th.patch} | 0 ...te_sub_resource-calls-through-the-c.patch} | 0 .../wined3d-CSMT_Main/9999-IfDefined.patch | 466 ++++++++---------- 106 files changed, 450 insertions(+), 807 deletions(-) rename patches/wined3d-CSMT_Main/{0067-wined3d-Get-rid-of-WINED3D_BUFFER_FLUSH.patch => 0066-wined3d-Get-rid-of-WINED3D_BUFFER_FLUSH.patch} (100%) delete mode 100644 patches/wined3d-CSMT_Main/0066-wined3d-Put-update_surface-checks-back-in-place.patch rename patches/wined3d-CSMT_Main/{0068-wined3d-Don-t-force-strict-draw-ordering-for-multith.patch => 0067-wined3d-Don-t-force-strict-draw-ordering-for-multith.patch} (100%) rename patches/wined3d-CSMT_Main/{0069-wined3d-Send-render-target-view-clears-through-the-c.patch => 0068-wined3d-Send-render-target-view-clears-through-the-c.patch} (100%) rename patches/wined3d-CSMT_Main/{0070-wined3d-Wait-for-the-CS-in-GetDC.patch => 0069-wined3d-Wait-for-the-CS-in-GetDC.patch} (100%) rename patches/wined3d-CSMT_Main/{0071-wined3d-send-resource-maps-through-the-command-strea.patch => 0070-wined3d-send-resource-maps-through-the-command-strea.patch} (100%) rename patches/wined3d-CSMT_Main/{0072-wined3d-Get-rid-of-the-end_scene-flush-and-finish.patch => 0071-wined3d-Get-rid-of-the-end_scene-flush-and-finish.patch} (100%) rename patches/wined3d-CSMT_Main/{0073-wined3d-Replace-the-linked-lists-with-a-ringbuffer.patch => 0072-wined3d-Replace-the-linked-lists-with-a-ringbuffer.patch} (100%) rename patches/wined3d-CSMT_Main/{0074-wined3d-Don-t-preload-buffers-on-unmap.patch => 0073-wined3d-Don-t-preload-buffers-on-unmap.patch} (100%) rename patches/wined3d-CSMT_Main/{0075-wined3d-Don-t-call-glFinish-before-swapping.patch => 0074-wined3d-Don-t-call-glFinish-before-swapping.patch} (100%) rename patches/wined3d-CSMT_Main/{0076-wined3d-wined3d_-_query_issue-never-fails.patch => 0075-wined3d-wined3d_-_query_issue-never-fails.patch} (100%) rename patches/wined3d-CSMT_Main/{0077-wined3d-Add-query-support-to-the-command-stream.patch => 0076-wined3d-Add-query-support-to-the-command-stream.patch} (100%) rename patches/wined3d-CSMT_Main/{0078-wined3d-Check-our-CS-state-to-find-out-if-a-query-is.patch => 0077-wined3d-Check-our-CS-state-to-find-out-if-a-query-is.patch} (100%) rename patches/wined3d-CSMT_Main/{0079-wined3d-Poll-queries-automatically-in-the-CS.patch => 0078-wined3d-Poll-queries-automatically-in-the-CS.patch} (100%) rename patches/wined3d-CSMT_Main/{0080-wined3d-Introduce-a-separate-queue-for-priority-comm.patch => 0079-wined3d-Introduce-a-separate-queue-for-priority-comm.patch} (100%) rename patches/wined3d-CSMT_Main/{0081-wined3d-Destroy-queries-through-the-CS.patch => 0080-wined3d-Destroy-queries-through-the-CS.patch} (100%) rename patches/wined3d-CSMT_Main/{0082-wined3d-Separate-main-and-worker-thread-query-state.patch => 0081-wined3d-Separate-main-and-worker-thread-query-state.patch} (100%) rename patches/wined3d-CSMT_Main/{0083-wined3d-Don-t-poll-queries-that-failed-to-start.patch => 0082-wined3d-Don-t-poll-queries-that-failed-to-start.patch} (100%) rename patches/wined3d-CSMT_Main/{0084-wined3d-Remove-restated-queries-from-the-poll-list.patch => 0083-wined3d-Remove-restated-queries-from-the-poll-list.patch} (100%) rename patches/wined3d-CSMT_Main/{0085-wined3d-Don-t-reset-the-query-state-if-it-doesn-t-ha.patch => 0084-wined3d-Don-t-reset-the-query-state-if-it-doesn-t-ha.patch} (100%) rename patches/wined3d-CSMT_Main/{0086-wined3d-Put-this-into-the-query-poll-patch.patch => 0085-wined3d-Put-this-into-the-query-poll-patch.patch} (100%) rename patches/wined3d-CSMT_Main/{0088-wined3d-Send-texture-preloads-through-the-CS.patch => 0086-wined3d-Send-texture-preloads-through-the-CS.patch} (79%) delete mode 100644 patches/wined3d-CSMT_Main/0087-wined3d-Send-update_surface-commands-through-the-CS.patch rename patches/wined3d-CSMT_Main/{0089-wined3d-Send-update_texture-calls-through-the-CS.patch => 0087-wined3d-Send-update_texture-calls-through-the-CS.patch} (92%) rename patches/wined3d-CSMT_Main/{0090-wined3d-Get-rid-of-the-surface_upload_data-glFinish.patch => 0088-wined3d-Get-rid-of-the-surface_upload_data-glFinish.patch} (100%) rename patches/wined3d-CSMT_Main/{0091-wined3d-Don-t-lock-the-src-volume-in-device_update_v.patch => 0089-wined3d-Don-t-lock-the-src-volume-in-device_update_v.patch} (100%) rename patches/wined3d-CSMT_Main/{0092-wined3d-Handle-evit_managed_resources-through-the-CS.patch => 0090-wined3d-Handle-evit_managed_resources-through-the-CS.patch} (86%) rename patches/wined3d-CSMT_Main/{0093-wined3d-Introduce-resource-fencing.patch => 0091-wined3d-Introduce-resource-fencing.patch} (100%) rename patches/wined3d-CSMT_Main/{0094-wined3d-Fence-update_texture-and-update_surface-call.patch => 0092-wined3d-Fence-update_texture-and-update_surface-call.patch} (57%) rename patches/wined3d-CSMT_Main/{0095-wined3d-Dirtify-resources-on-unmap.patch => 0093-wined3d-Dirtify-resources-on-unmap.patch} (100%) rename patches/wined3d-CSMT_Main/{0096-wined3d-Fence-texture-reads-in-draws.patch => 0094-wined3d-Fence-texture-reads-in-draws.patch} (100%) rename patches/wined3d-CSMT_Main/{0097-wined3d-Fence-render-targets-and-depth-stencils.patch => 0095-wined3d-Fence-render-targets-and-depth-stencils.patch} (100%) rename patches/wined3d-CSMT_Main/{0098-wined3d-Fence-blit-operations.patch => 0096-wined3d-Fence-blit-operations.patch} (100%) rename patches/wined3d-CSMT_Main/{0099-wined3d-Fence-color_fill-operations.patch => 0097-wined3d-Fence-color_fill-operations.patch} (100%) rename patches/wined3d-CSMT_Main/{0100-wined3d-Fence-clear-calls.patch => 0098-wined3d-Fence-clear-calls.patch} (100%) rename patches/wined3d-CSMT_Main/{0101-wined3d-Fence-present-calls.patch => 0099-wined3d-Fence-present-calls.patch} (100%) rename patches/wined3d-CSMT_Main/{0102-wined3d-Make-resource-maps-and-unmaps-a-priority-com.patch => 0100-wined3d-Make-resource-maps-and-unmaps-a-priority-com.patch} (100%) rename patches/wined3d-CSMT_Main/{0103-wined3d-Dirtify-changed-textures-through-the-command.patch => 0101-wined3d-Dirtify-changed-textures-through-the-command.patch} (100%) rename patches/wined3d-CSMT_Main/{0104-wined3d-Wrap-GL-BOs-in-a-structure.patch => 0102-wined3d-Wrap-GL-BOs-in-a-structure.patch} (100%) rename patches/wined3d-CSMT_Main/{0105-wined3d-Separate-resource-map-and-draw-buffers.patch => 0103-wined3d-Separate-resource-map-and-draw-buffers.patch} (100%) rename patches/wined3d-CSMT_Main/{0106-wined3d-Implement-DISCARD-resource-maps-with-buffers.patch => 0104-wined3d-Implement-DISCARD-resource-maps-with-buffers.patch} (100%) rename patches/wined3d-CSMT_Main/{0107-wined3d-Implement-DISCARD-resource-maps-with-heap-me.patch => 0105-wined3d-Implement-DISCARD-resource-maps-with-heap-me.patch} (100%) rename patches/wined3d-CSMT_Main/{0108-wined3d-Unset-some-objects-in-state_init_default.patch => 0106-wined3d-Unset-some-objects-in-state_init_default.patch} (100%) rename patches/wined3d-CSMT_Main/{0109-wined3d-Don-t-request-the-frontbuffer-to-create-dumm.patch => 0107-wined3d-Don-t-request-the-frontbuffer-to-create-dumm.patch} (100%) rename patches/wined3d-CSMT_Main/{0110-wined3d-Use-double-buffered-buffers-for-multithreade.patch => 0108-wined3d-Use-double-buffered-buffers-for-multithreade.patch} (100%) rename patches/wined3d-CSMT_Main/{0111-wined3d-Don-t-synchronize-NOOVERWRITE-buffer-maps.patch => 0109-wined3d-Don-t-synchronize-NOOVERWRITE-buffer-maps.patch} (100%) rename patches/wined3d-CSMT_Main/{0112-wined3d-Separate-buffer-map-write-and-draw-read-memo.patch => 0110-wined3d-Separate-buffer-map-write-and-draw-read-memo.patch} (100%) rename patches/wined3d-CSMT_Main/{0113-wined3d-Accelerate-DISCARD-buffer-maps.patch => 0111-wined3d-Accelerate-DISCARD-buffer-maps.patch} (89%) rename patches/wined3d-CSMT_Main/{0114-wined3d-Accelerate-READONLY-buffer-maps.patch => 0112-wined3d-Accelerate-READONLY-buffer-maps.patch} (100%) rename patches/wined3d-CSMT_Main/{0115-wined3d-Access-the-buffer-dirty-areas-through-the-CS.patch => 0113-wined3d-Access-the-buffer-dirty-areas-through-the-CS.patch} (91%) rename patches/wined3d-CSMT_Main/{0116-wined3d-Ignore-buffer-resource.map_count-in-the-CS.patch => 0114-wined3d-Ignore-buffer-resource.map_count-in-the-CS.patch} (100%) rename patches/wined3d-CSMT_Main/{0117-wined3d-Send-buffer-preloads-through-the-CS.patch => 0115-wined3d-Send-buffer-preloads-through-the-CS.patch} (88%) rename patches/wined3d-CSMT_Main/{0118-wined3d-Use-glBufferSubData-instead-of-glMapBufferRa.patch => 0116-wined3d-Use-glBufferSubData-instead-of-glMapBufferRa.patch} (100%) rename patches/wined3d-CSMT_Main/{0119-wined3d-Separate-GL-buffer-discard-control-from-igno.patch => 0117-wined3d-Separate-GL-buffer-discard-control-from-igno.patch} (100%) rename patches/wined3d-CSMT_Main/{0120-wined3d-Create-buffers-before-mapping-them.patch => 0118-wined3d-Create-buffers-before-mapping-them.patch} (100%) rename patches/wined3d-CSMT_Main/{0121-wined3d-Destroy-views-through-the-CS.patch => 0119-wined3d-Destroy-views-through-the-CS.patch} (100%) rename patches/wined3d-CSMT_Main/{0122-wined3d-Remove-another-glFinish.patch => 0120-wined3d-Remove-another-glFinish.patch} (100%) rename patches/wined3d-CSMT_Main/{0123-wined3d-Destroy-vertex-declarations-through-the-CS.patch => 0121-wined3d-Destroy-vertex-declarations-through-the-CS.patch} (100%) rename patches/wined3d-CSMT_Main/{0124-wined3d-Destroy-shaders-through-the-CS.patch => 0122-wined3d-Destroy-shaders-through-the-CS.patch} (100%) rename patches/wined3d-CSMT_Main/{0125-wined3d-Create-VBOs-through-the-command-stream.patch => 0123-wined3d-Create-VBOs-through-the-command-stream.patch} (100%) rename patches/wined3d-CSMT_Main/{0126-wined3d-Clean-up-resource-data-through-the-CS.patch => 0124-wined3d-Clean-up-resource-data-through-the-CS.patch} (100%) rename patches/wined3d-CSMT_Main/{0127-wined3d-Clean-up-buffer-resource-data-through-the-CS.patch => 0125-wined3d-Clean-up-buffer-resource-data-through-the-CS.patch} (100%) rename patches/wined3d-CSMT_Main/{0128-wined3d-Clean-up-volume-resource-data-through-the-CS.patch => 0126-wined3d-Clean-up-volume-resource-data-through-the-CS.patch} (100%) rename patches/wined3d-CSMT_Main/{0129-wined3d-Clean-up-surfaces-through-the-cs.patch => 0127-wined3d-Clean-up-surfaces-through-the-cs.patch} (89%) rename patches/wined3d-CSMT_Main/{0130-wined3d-Clean-up-texture-resources-through-the-cs.patch => 0128-wined3d-Clean-up-texture-resources-through-the-cs.patch} (100%) rename patches/wined3d-CSMT_Main/{0131-wined3d-Unload-resources-through-the-CS-in-uninit_3d.patch => 0129-wined3d-Unload-resources-through-the-CS-in-uninit_3d.patch} (100%) rename patches/wined3d-CSMT_Main/{0132-wined3d-Unload-resources-through-the-CS-in-device_re.patch => 0130-wined3d-Unload-resources-through-the-CS-in-device_re.patch} (100%) rename patches/wined3d-CSMT_Main/{0133-wined3d-Don-t-glFinish-after-a-depth-buffer-blit.patch => 0131-wined3d-Don-t-glFinish-after-a-depth-buffer-blit.patch} (100%) rename patches/wined3d-CSMT_Main/{0134-wined3d-Remove-software-cursor-support.patch => 0132-wined3d-Remove-software-cursor-support.patch} (100%) rename patches/wined3d-CSMT_Main/{0135-wined3d-Create-dummy-textures-through-the-CS.patch => 0133-wined3d-Create-dummy-textures-through-the-CS.patch} (100%) rename patches/wined3d-CSMT_Main/{0136-wined3d-Create-the-initial-context-through-the-CS.patch => 0134-wined3d-Create-the-initial-context-through-the-CS.patch} (100%) rename patches/wined3d-CSMT_Main/{0137-wined3d-Recreate-ctx-and-dummy-textures-through-the-.patch => 0135-wined3d-Recreate-ctx-and-dummy-textures-through-the-.patch} (100%) rename patches/wined3d-CSMT_Main/{0138-wined3d-Ignore-WINED3D_MAP_NO_DIRTY_UPDATE-in-resour.patch => 0136-wined3d-Ignore-WINED3D_MAP_NO_DIRTY_UPDATE-in-resour.patch} (100%) rename patches/wined3d-CSMT_Main/{0139-wined3d-Delete-GL-contexts-through-the-CS-in-reset.patch => 0137-wined3d-Delete-GL-contexts-through-the-CS-in-reset.patch} (100%) rename patches/wined3d-CSMT_Main/{0140-wined3d-Delete-GL-contexts-through-the-CS-in-uninit_.patch => 0138-wined3d-Delete-GL-contexts-through-the-CS-in-uninit_.patch} (100%) rename patches/wined3d-CSMT_Main/{0141-wined3d-Invoke-surface_unload-through-the-CS-in-wine.patch => 0139-wined3d-Invoke-surface_unload-through-the-CS-in-wine.patch} (100%) rename patches/wined3d-CSMT_Main/{0142-wined3d-Use-an-event-to-block-the-worker-thread-when.patch => 0140-wined3d-Use-an-event-to-block-the-worker-thread-when.patch} (100%) rename patches/wined3d-CSMT_Main/{0143-wined3d-Fence-preload-operations.patch => 0141-wined3d-Fence-preload-operations.patch} (100%) rename patches/wined3d-CSMT_Main/{0144-d3d8-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch => 0142-d3d8-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch} (100%) rename patches/wined3d-CSMT_Main/{0145-d3d9-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch => 0143-d3d9-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch} (100%) rename patches/wined3d-CSMT_Main/{0146-wined3d-Completely-reset-the-state-on-reset.patch => 0144-wined3d-Completely-reset-the-state-on-reset.patch} (100%) rename patches/wined3d-CSMT_Main/{0147-wined3d-Send-getdc-and-releasedc-through-the-command.patch => 0145-wined3d-Send-getdc-and-releasedc-through-the-command.patch} (91%) rename patches/wined3d-CSMT_Main/{0148-wined3d-Set-map_heap_memory-NULL-when-allocating-a-P.patch => 0146-wined3d-Set-map_heap_memory-NULL-when-allocating-a-P.patch} (100%) rename patches/wined3d-CSMT_Main/{0149-wined3d-Wait-only-for-the-buffer-to-be-idle.patch => 0147-wined3d-Wait-only-for-the-buffer-to-be-idle.patch} (100%) rename patches/wined3d-CSMT_Main/{0150-wined3d-Add-a-comment-about-worker-thread-lag.patch => 0148-wined3d-Add-a-comment-about-worker-thread-lag.patch} (100%) rename patches/wined3d-CSMT_Main/{0151-wined3d-Remove-the-texture-destroy-glFinish.patch => 0149-wined3d-Remove-the-texture-destroy-glFinish.patch} (100%) rename patches/wined3d-CSMT_Main/{0152-wined3d-Move-FBO-destruction-into-the-worker-thread.patch => 0150-wined3d-Move-FBO-destruction-into-the-worker-thread.patch} (100%) rename patches/wined3d-CSMT_Main/{0153-wined3d-Don-t-incref-decref-textures-in-color-depth-.patch => 0151-wined3d-Don-t-incref-decref-textures-in-color-depth-.patch} (100%) rename patches/wined3d-CSMT_Main/{0154-Winex11-complain-about-glfinish.patch => 0152-Winex11-complain-about-glfinish.patch} (100%) rename patches/wined3d-CSMT_Main/{0155-wined3d-Make-sure-the-new-window-is-set-up-before-se.patch => 0153-wined3d-Make-sure-the-new-window-is-set-up-before-se.patch} (100%) rename patches/wined3d-CSMT_Main/{0156-wined3d-Remove-the-device_reset-CS-sync-fixme.patch => 0154-wined3d-Remove-the-device_reset-CS-sync-fixme.patch} (100%) rename patches/wined3d-CSMT_Main/{0157-wined3d-Put-GL_APPLE_flush_buffer_range-syncing-back.patch => 0155-wined3d-Put-GL_APPLE_flush_buffer_range-syncing-back.patch} (100%) rename patches/wined3d-CSMT_Main/{0158-wined3d-Wait-for-the-resource-to-be-idle-when-destro.patch => 0156-wined3d-Wait-for-the-resource-to-be-idle-when-destro.patch} (100%) rename patches/wined3d-CSMT_Main/{0159-wined3d-Don-t-sync-on-redundant-discard-calls.patch => 0157-wined3d-Don-t-sync-on-redundant-discard-calls.patch} (100%) rename patches/wined3d-CSMT_Main/{0160-wined3d-Don-t-discard-new-buffers.patch => 0158-wined3d-Don-t-discard-new-buffers.patch} (100%) rename patches/wined3d-CSMT_Main/{0161-wined3d-Don-t-try-to-sync-VBOs-manually-on-OSX-with-.patch => 0159-wined3d-Don-t-try-to-sync-VBOs-manually-on-OSX-with-.patch} (100%) rename patches/wined3d-CSMT_Main/{0162-wined3d-Render-target-lock-hack.patch => 0160-wined3d-Render-target-lock-hack.patch} (100%) rename patches/wined3d-CSMT_Main/{0163-wined3d-Avoid-calling-wined3d_surface_blt-from-surfa.patch => 0161-wined3d-Avoid-calling-wined3d_surface_blt-from-surfa.patch} (100%) rename patches/wined3d-CSMT_Main/{0164-wined3d-Only-discard-buffers-that-are-in-use.patch => 0162-wined3d-Only-discard-buffers-that-are-in-use.patch} (100%) rename patches/wined3d-CSMT_Main/{0165-wined3d-Destroy-samplers-through-the-command-stream.patch => 0163-wined3d-Destroy-samplers-through-the-command-stream.patch} (100%) rename patches/wined3d-CSMT_Main/{0166-wined3d-Hack-to-reject-unsupported-color-fills.patch => 0164-wined3d-Hack-to-reject-unsupported-color-fills.patch} (100%) rename patches/wined3d-CSMT_Main/{0167-wined3d-Alloc-the-buffer-map-array-before-mapping-th.patch => 0165-wined3d-Alloc-the-buffer-map-array-before-mapping-th.patch} (100%) rename patches/wined3d-CSMT_Main/{0168-wined3d-Send-update_sub_resource-calls-through-the-c.patch => 0166-wined3d-Send-update_sub_resource-calls-through-the-c.patch} (100%) diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 2001ca58..5b95c364 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -51,7 +51,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "f0053d06c4fc168360da638fa26f1927fe975262" + echo "85ba92c33a8c689e375fae2f3313657aaa9877fb" } # Show version information @@ -6938,109 +6938,107 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then patch_apply wined3d-CSMT_Main/0063-wined3d-Wait-for-the-cs-to-finish-before-destroying-.patch patch_apply wined3d-CSMT_Main/0064-wined3d-Run-the-cs-asynchronously.patch patch_apply wined3d-CSMT_Main/0065-wined3d-Send-blits-through-the-command-stream.patch - patch_apply wined3d-CSMT_Main/0066-wined3d-Put-update_surface-checks-back-in-place.patch - patch_apply wined3d-CSMT_Main/0067-wined3d-Get-rid-of-WINED3D_BUFFER_FLUSH.patch - patch_apply wined3d-CSMT_Main/0068-wined3d-Don-t-force-strict-draw-ordering-for-multith.patch - patch_apply wined3d-CSMT_Main/0069-wined3d-Send-render-target-view-clears-through-the-c.patch - patch_apply wined3d-CSMT_Main/0070-wined3d-Wait-for-the-CS-in-GetDC.patch - patch_apply wined3d-CSMT_Main/0071-wined3d-send-resource-maps-through-the-command-strea.patch - patch_apply wined3d-CSMT_Main/0072-wined3d-Get-rid-of-the-end_scene-flush-and-finish.patch - patch_apply wined3d-CSMT_Main/0073-wined3d-Replace-the-linked-lists-with-a-ringbuffer.patch - patch_apply wined3d-CSMT_Main/0074-wined3d-Don-t-preload-buffers-on-unmap.patch - patch_apply wined3d-CSMT_Main/0075-wined3d-Don-t-call-glFinish-before-swapping.patch - patch_apply wined3d-CSMT_Main/0076-wined3d-wined3d_-_query_issue-never-fails.patch - patch_apply wined3d-CSMT_Main/0077-wined3d-Add-query-support-to-the-command-stream.patch - patch_apply wined3d-CSMT_Main/0078-wined3d-Check-our-CS-state-to-find-out-if-a-query-is.patch - patch_apply wined3d-CSMT_Main/0079-wined3d-Poll-queries-automatically-in-the-CS.patch - patch_apply wined3d-CSMT_Main/0080-wined3d-Introduce-a-separate-queue-for-priority-comm.patch - patch_apply wined3d-CSMT_Main/0081-wined3d-Destroy-queries-through-the-CS.patch - patch_apply wined3d-CSMT_Main/0082-wined3d-Separate-main-and-worker-thread-query-state.patch - patch_apply wined3d-CSMT_Main/0083-wined3d-Don-t-poll-queries-that-failed-to-start.patch - patch_apply wined3d-CSMT_Main/0084-wined3d-Remove-restated-queries-from-the-poll-list.patch - patch_apply wined3d-CSMT_Main/0085-wined3d-Don-t-reset-the-query-state-if-it-doesn-t-ha.patch - 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-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/0066-wined3d-Get-rid-of-WINED3D_BUFFER_FLUSH.patch + patch_apply wined3d-CSMT_Main/0067-wined3d-Don-t-force-strict-draw-ordering-for-multith.patch + patch_apply wined3d-CSMT_Main/0068-wined3d-Send-render-target-view-clears-through-the-c.patch + patch_apply wined3d-CSMT_Main/0069-wined3d-Wait-for-the-CS-in-GetDC.patch + patch_apply wined3d-CSMT_Main/0070-wined3d-send-resource-maps-through-the-command-strea.patch + patch_apply wined3d-CSMT_Main/0071-wined3d-Get-rid-of-the-end_scene-flush-and-finish.patch + patch_apply wined3d-CSMT_Main/0072-wined3d-Replace-the-linked-lists-with-a-ringbuffer.patch + patch_apply wined3d-CSMT_Main/0073-wined3d-Don-t-preload-buffers-on-unmap.patch + patch_apply wined3d-CSMT_Main/0074-wined3d-Don-t-call-glFinish-before-swapping.patch + patch_apply wined3d-CSMT_Main/0075-wined3d-wined3d_-_query_issue-never-fails.patch + patch_apply wined3d-CSMT_Main/0076-wined3d-Add-query-support-to-the-command-stream.patch + patch_apply wined3d-CSMT_Main/0077-wined3d-Check-our-CS-state-to-find-out-if-a-query-is.patch + patch_apply wined3d-CSMT_Main/0078-wined3d-Poll-queries-automatically-in-the-CS.patch + patch_apply wined3d-CSMT_Main/0079-wined3d-Introduce-a-separate-queue-for-priority-comm.patch + patch_apply wined3d-CSMT_Main/0080-wined3d-Destroy-queries-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0081-wined3d-Separate-main-and-worker-thread-query-state.patch + patch_apply wined3d-CSMT_Main/0082-wined3d-Don-t-poll-queries-that-failed-to-start.patch + patch_apply wined3d-CSMT_Main/0083-wined3d-Remove-restated-queries-from-the-poll-list.patch + patch_apply wined3d-CSMT_Main/0084-wined3d-Don-t-reset-the-query-state-if-it-doesn-t-ha.patch + patch_apply wined3d-CSMT_Main/0085-wined3d-Put-this-into-the-query-poll-patch.patch + patch_apply wined3d-CSMT_Main/0086-wined3d-Send-texture-preloads-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0087-wined3d-Send-update_texture-calls-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0088-wined3d-Get-rid-of-the-surface_upload_data-glFinish.patch + patch_apply wined3d-CSMT_Main/0089-wined3d-Don-t-lock-the-src-volume-in-device_update_v.patch + patch_apply wined3d-CSMT_Main/0090-wined3d-Handle-evit_managed_resources-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0091-wined3d-Introduce-resource-fencing.patch + patch_apply wined3d-CSMT_Main/0092-wined3d-Fence-update_texture-and-update_surface-call.patch + patch_apply wined3d-CSMT_Main/0093-wined3d-Dirtify-resources-on-unmap.patch + patch_apply wined3d-CSMT_Main/0094-wined3d-Fence-texture-reads-in-draws.patch + patch_apply wined3d-CSMT_Main/0095-wined3d-Fence-render-targets-and-depth-stencils.patch + patch_apply wined3d-CSMT_Main/0096-wined3d-Fence-blit-operations.patch + patch_apply wined3d-CSMT_Main/0097-wined3d-Fence-color_fill-operations.patch + patch_apply wined3d-CSMT_Main/0098-wined3d-Fence-clear-calls.patch + patch_apply wined3d-CSMT_Main/0099-wined3d-Fence-present-calls.patch + patch_apply wined3d-CSMT_Main/0100-wined3d-Make-resource-maps-and-unmaps-a-priority-com.patch + patch_apply wined3d-CSMT_Main/0101-wined3d-Dirtify-changed-textures-through-the-command.patch + patch_apply wined3d-CSMT_Main/0102-wined3d-Wrap-GL-BOs-in-a-structure.patch + patch_apply wined3d-CSMT_Main/0103-wined3d-Separate-resource-map-and-draw-buffers.patch + patch_apply wined3d-CSMT_Main/0104-wined3d-Implement-DISCARD-resource-maps-with-buffers.patch + patch_apply wined3d-CSMT_Main/0105-wined3d-Implement-DISCARD-resource-maps-with-heap-me.patch + patch_apply wined3d-CSMT_Main/0106-wined3d-Unset-some-objects-in-state_init_default.patch + patch_apply wined3d-CSMT_Main/0107-wined3d-Don-t-request-the-frontbuffer-to-create-dumm.patch + patch_apply wined3d-CSMT_Main/0108-wined3d-Use-double-buffered-buffers-for-multithreade.patch + patch_apply wined3d-CSMT_Main/0109-wined3d-Don-t-synchronize-NOOVERWRITE-buffer-maps.patch + patch_apply wined3d-CSMT_Main/0110-wined3d-Separate-buffer-map-write-and-draw-read-memo.patch + patch_apply wined3d-CSMT_Main/0111-wined3d-Accelerate-DISCARD-buffer-maps.patch + patch_apply wined3d-CSMT_Main/0112-wined3d-Accelerate-READONLY-buffer-maps.patch + patch_apply wined3d-CSMT_Main/0113-wined3d-Access-the-buffer-dirty-areas-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0114-wined3d-Ignore-buffer-resource.map_count-in-the-CS.patch + patch_apply wined3d-CSMT_Main/0115-wined3d-Send-buffer-preloads-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0116-wined3d-Use-glBufferSubData-instead-of-glMapBufferRa.patch + patch_apply wined3d-CSMT_Main/0117-wined3d-Separate-GL-buffer-discard-control-from-igno.patch + patch_apply wined3d-CSMT_Main/0118-wined3d-Create-buffers-before-mapping-them.patch + patch_apply wined3d-CSMT_Main/0119-wined3d-Destroy-views-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0120-wined3d-Remove-another-glFinish.patch + patch_apply wined3d-CSMT_Main/0121-wined3d-Destroy-vertex-declarations-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0122-wined3d-Destroy-shaders-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0123-wined3d-Create-VBOs-through-the-command-stream.patch + patch_apply wined3d-CSMT_Main/0124-wined3d-Clean-up-resource-data-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0125-wined3d-Clean-up-buffer-resource-data-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0126-wined3d-Clean-up-volume-resource-data-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0127-wined3d-Clean-up-surfaces-through-the-cs.patch + patch_apply wined3d-CSMT_Main/0128-wined3d-Clean-up-texture-resources-through-the-cs.patch + patch_apply wined3d-CSMT_Main/0129-wined3d-Unload-resources-through-the-CS-in-uninit_3d.patch + patch_apply wined3d-CSMT_Main/0130-wined3d-Unload-resources-through-the-CS-in-device_re.patch + patch_apply wined3d-CSMT_Main/0131-wined3d-Don-t-glFinish-after-a-depth-buffer-blit.patch + patch_apply wined3d-CSMT_Main/0132-wined3d-Remove-software-cursor-support.patch + patch_apply wined3d-CSMT_Main/0133-wined3d-Create-dummy-textures-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0134-wined3d-Create-the-initial-context-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0135-wined3d-Recreate-ctx-and-dummy-textures-through-the-.patch + patch_apply wined3d-CSMT_Main/0136-wined3d-Ignore-WINED3D_MAP_NO_DIRTY_UPDATE-in-resour.patch + patch_apply wined3d-CSMT_Main/0137-wined3d-Delete-GL-contexts-through-the-CS-in-reset.patch + patch_apply wined3d-CSMT_Main/0138-wined3d-Delete-GL-contexts-through-the-CS-in-uninit_.patch + patch_apply wined3d-CSMT_Main/0139-wined3d-Invoke-surface_unload-through-the-CS-in-wine.patch + patch_apply wined3d-CSMT_Main/0140-wined3d-Use-an-event-to-block-the-worker-thread-when.patch + patch_apply wined3d-CSMT_Main/0141-wined3d-Fence-preload-operations.patch + patch_apply wined3d-CSMT_Main/0142-d3d8-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch + patch_apply wined3d-CSMT_Main/0143-d3d9-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch + patch_apply wined3d-CSMT_Main/0144-wined3d-Completely-reset-the-state-on-reset.patch + patch_apply wined3d-CSMT_Main/0145-wined3d-Send-getdc-and-releasedc-through-the-command.patch + patch_apply wined3d-CSMT_Main/0146-wined3d-Set-map_heap_memory-NULL-when-allocating-a-P.patch + patch_apply wined3d-CSMT_Main/0147-wined3d-Wait-only-for-the-buffer-to-be-idle.patch + patch_apply wined3d-CSMT_Main/0148-wined3d-Add-a-comment-about-worker-thread-lag.patch + patch_apply wined3d-CSMT_Main/0149-wined3d-Remove-the-texture-destroy-glFinish.patch + patch_apply wined3d-CSMT_Main/0150-wined3d-Move-FBO-destruction-into-the-worker-thread.patch + patch_apply wined3d-CSMT_Main/0151-wined3d-Don-t-incref-decref-textures-in-color-depth-.patch + patch_apply wined3d-CSMT_Main/0152-Winex11-complain-about-glfinish.patch + patch_apply wined3d-CSMT_Main/0153-wined3d-Make-sure-the-new-window-is-set-up-before-se.patch + patch_apply wined3d-CSMT_Main/0154-wined3d-Remove-the-device_reset-CS-sync-fixme.patch + patch_apply wined3d-CSMT_Main/0155-wined3d-Put-GL_APPLE_flush_buffer_range-syncing-back.patch + patch_apply wined3d-CSMT_Main/0156-wined3d-Wait-for-the-resource-to-be-idle-when-destro.patch + patch_apply wined3d-CSMT_Main/0157-wined3d-Don-t-sync-on-redundant-discard-calls.patch + patch_apply wined3d-CSMT_Main/0158-wined3d-Don-t-discard-new-buffers.patch + patch_apply wined3d-CSMT_Main/0159-wined3d-Don-t-try-to-sync-VBOs-manually-on-OSX-with-.patch + patch_apply wined3d-CSMT_Main/0160-wined3d-Render-target-lock-hack.patch + patch_apply wined3d-CSMT_Main/0161-wined3d-Avoid-calling-wined3d_surface_blt-from-surfa.patch + patch_apply wined3d-CSMT_Main/0162-wined3d-Only-discard-buffers-that-are-in-use.patch + patch_apply wined3d-CSMT_Main/0163-wined3d-Destroy-samplers-through-the-command-stream.patch + patch_apply wined3d-CSMT_Main/0164-wined3d-Hack-to-reject-unsupported-color-fills.patch + patch_apply wined3d-CSMT_Main/0165-wined3d-Alloc-the-buffer-map-array-before-mapping-th.patch + patch_apply wined3d-CSMT_Main/0166-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 ( @@ -7109,7 +7107,6 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then echo '+ { "Stefan Dösinger", "wined3d: Wait for the cs to finish before destroying the device.", 1 },'; echo '+ { "Stefan Dösinger", "wined3d: Run the cs asynchronously.", 1 },'; echo '+ { "Stefan Dösinger", "wined3d: Send blits through the command stream.", 1 },'; - echo '+ { "Stefan Dösinger", "wined3d: Put update_surface checks back in place.", 1 },'; echo '+ { "Stefan Dösinger", "wined3d: Get rid of WINED3D_BUFFER_FLUSH.", 1 },'; echo '+ { "Stefan Dösinger", "wined3d: Don'\''t force strict draw ordering for multithreaded CS.", 1 },'; echo '+ { "Stefan Dösinger", "wined3d: Send render target view clears through the command stream.", 1 },'; @@ -7130,7 +7127,6 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then echo '+ { "Stefan Dösinger", "wined3d: Remove restated queries from the poll list.", 1 },'; echo '+ { "Stefan Dösinger", "wined3d: Don'\''t reset the query state if it doesn'\''t have a ctx.", 1 },'; 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 update_texture calls through the CS.", 1 },'; echo '+ { "Stefan Dösinger", "wined3d: Get rid of the surface_upload_data glFinish.", 1 },'; diff --git a/patches/wined3d-CSMT_Main/0048-wined3d-Request-a-glFinish-before-modifying-resource.patch b/patches/wined3d-CSMT_Main/0048-wined3d-Request-a-glFinish-before-modifying-resource.patch index d47e9607..9b1c0e47 100644 --- a/patches/wined3d-CSMT_Main/0048-wined3d-Request-a-glFinish-before-modifying-resource.patch +++ b/patches/wined3d-CSMT_Main/0048-wined3d-Request-a-glFinish-before-modifying-resource.patch @@ -1,4 +1,4 @@ -From a79863383e3dc7dfff564432e6c5086aa612d8af Mon Sep 17 00:00:00 2001 +From 3c4dad98dfe1a841fd219dc8ac304a8358f11513 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Thu, 4 Apr 2013 11:50:09 +0200 Subject: wined3d: Request a glFinish before modifying resources outside the cs @@ -6,14 +6,14 @@ Subject: wined3d: Request a glFinish before modifying resources outside the cs --- dlls/wined3d/buffer.c | 17 +++++++++++++++++ dlls/wined3d/cs.c | 30 ++++++++++++++++++++++++++++++ - dlls/wined3d/device.c | 42 ++++++++++++++++++++++++++++++++++++++++++ + dlls/wined3d/device.c | 35 +++++++++++++++++++++++++++++++++++ dlls/wined3d/resource.c | 7 +++++++ dlls/wined3d/surface.c | 7 +++++++ dlls/wined3d/wined3d_private.h | 1 + - 6 files changed, 104 insertions(+) + 6 files changed, 97 insertions(+) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c -index 0735ab7..3f740dd 100644 +index 6271307..87d0b91 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -931,6 +931,15 @@ void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_conte @@ -51,7 +51,7 @@ index 0735ab7..3f740dd 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 63ac035..b7bedbf 100644 +index a675ce9..e42cbe0 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -66,6 +66,7 @@ enum wined3d_cs_op @@ -113,10 +113,10 @@ index 63ac035..b7bedbf 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 d43075b..5e5f3f5 100644 +index 3697a9f..83b1bf65 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c -@@ -2765,6 +2765,13 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO +@@ -2857,6 +2857,13 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO return hr; } @@ -130,7 +130,7 @@ index d43075b..5e5f3f5 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); -@@ -3562,6 +3569,13 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device, +@@ -3644,6 +3651,13 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device, ++src_skip_levels; } @@ -144,21 +144,7 @@ index d43075b..5e5f3f5 100644 /* Make sure that the destination texture is loaded. */ context = context_acquire(device, NULL); wined3d_texture_load(dst_texture, context, FALSE); -@@ -3810,6 +3824,13 @@ HRESULT CDECL wined3d_device_update_surface(struct wined3d_device *device, - return WINED3DERR_INVALIDCALL; - } - -+ if (wined3d_settings.cs_multithreaded) -+ { -+ FIXME("Waiting for cs.\n"); -+ wined3d_cs_emit_glfinish(device->cs); -+ device->cs->ops->finish(device->cs); -+ } -+ - return surface_upload_from_surface(dst_surface, dst_point, src_surface, src_rect); - } - -@@ -4064,6 +4085,13 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi +@@ -4131,6 +4145,13 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi rect = &r; } @@ -172,7 +158,7 @@ index d43075b..5e5f3f5 100644 resource = wined3d_texture_get_sub_resource(wined3d_texture_from_resource(resource), view->sub_resource_idx); return surface_color_fill(surface_from_resource(resource), rect, color); -@@ -4377,6 +4405,13 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device) +@@ -4454,6 +4475,13 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device) TRACE("device %p.\n", device); @@ -186,7 +172,7 @@ index d43075b..5e5f3f5 100644 LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry) { TRACE("Checking resource %p for eviction.\n", resource); -@@ -4499,6 +4534,13 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, +@@ -4579,6 +4607,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); @@ -201,10 +187,10 @@ index d43075b..5e5f3f5 100644 { ERR("Failed to get the first implicit swapchain.\n"); diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c -index 9c40d42..c72987c 100644 +index 8d372b9..fb84a0f 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c -@@ -786,6 +786,13 @@ HRESULT wined3d_resource_map(struct wined3d_resource *resource, +@@ -812,6 +812,13 @@ HRESULT wined3d_resource_map(struct wined3d_resource *resource, flags = wined3d_resource_sanitize_map_flags(resource, flags); @@ -219,10 +205,10 @@ index 9c40d42..c72987c 100644 context = context_acquire(device, NULL); diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c -index cba9da9..5e44494 100644 +index ec56882..d19b40a 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c -@@ -5007,6 +5007,13 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC +@@ -4759,6 +4759,13 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst flags &= ~WINEDDBLT_DONOTWAIT; } @@ -237,10 +223,10 @@ index cba9da9..5e44494 100644 { WARN("D3D not initialized, using fallback.\n"); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index d018cd9..2e42c79 100644 +index 3b5e753..377da6b 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -2702,6 +2702,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, +@@ -2826,6 +2826,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, UINT start_register, const float *constants, UINT vector4f_count, enum wined3d_shader_type type) DECLSPEC_HIDDEN; @@ -249,5 +235,5 @@ index d018cd9..2e42c79 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.5.1 +2.7.0 diff --git a/patches/wined3d-CSMT_Main/0067-wined3d-Get-rid-of-WINED3D_BUFFER_FLUSH.patch b/patches/wined3d-CSMT_Main/0066-wined3d-Get-rid-of-WINED3D_BUFFER_FLUSH.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0067-wined3d-Get-rid-of-WINED3D_BUFFER_FLUSH.patch rename to patches/wined3d-CSMT_Main/0066-wined3d-Get-rid-of-WINED3D_BUFFER_FLUSH.patch diff --git a/patches/wined3d-CSMT_Main/0066-wined3d-Put-update_surface-checks-back-in-place.patch b/patches/wined3d-CSMT_Main/0066-wined3d-Put-update_surface-checks-back-in-place.patch deleted file mode 100644 index cc31b892..00000000 --- a/patches/wined3d-CSMT_Main/0066-wined3d-Put-update_surface-checks-back-in-place.patch +++ /dev/null @@ -1,127 +0,0 @@ -From 843b306004f731e36e9d9d9336228cd2c06f9128 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Stefan=20D=C3=B6singer?= -Date: Wed, 20 Aug 2014 14:14:23 +0200 -Subject: wined3d: Put update_surface checks back in place - -Unfortunately I can't remove the code from surface_update_from_surface -yet because blits depend on them. ---- - dlls/wined3d/device.c | 68 ++++++++++++++++++++++++++++++++++++++++++ - dlls/wined3d/surface.c | 2 +- - dlls/wined3d/wined3d_private.h | 1 + - 3 files changed, 70 insertions(+), 1 deletion(-) - -diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index 819e6de..e804afe 100644 ---- a/dlls/wined3d/device.c -+++ b/dlls/wined3d/device.c -@@ -3773,6 +3773,13 @@ HRESULT CDECL wined3d_device_update_surface(struct wined3d_device *device, - struct wined3d_surface *src_surface, const RECT *src_rect, - struct wined3d_surface *dst_surface, const POINT *dst_point) - { -+ const struct wined3d_format *src_format = src_surface->resource.format; -+ const struct wined3d_format *dst_format = dst_surface->resource.format; -+ UINT update_w, update_h; -+ UINT dst_w, dst_h; -+ RECT r, dst_rect; -+ POINT p; -+ - TRACE("device %p, src_surface %p, src_rect %s, dst_surface %p, dst_point %s.\n", - device, src_surface, wine_dbgstr_rect(src_rect), - dst_surface, wine_dbgstr_point(dst_point)); -@@ -3784,6 +3791,67 @@ HRESULT CDECL wined3d_device_update_surface(struct wined3d_device *device, - return WINED3DERR_INVALIDCALL; - } - -+ if (src_format->id != dst_format->id) -+ { -+ WARN("Source and destination surfaces should have the same format.\n"); -+ return WINED3DERR_INVALIDCALL; -+ } -+ -+ if (!dst_point) -+ { -+ p.x = 0; -+ p.y = 0; -+ dst_point = &p; -+ } -+ else if (dst_point->x < 0 || dst_point->y < 0) -+ { -+ WARN("Invalid destination point.\n"); -+ return WINED3DERR_INVALIDCALL; -+ } -+ -+ if (!src_rect) -+ { -+ r.left = 0; -+ r.top = 0; -+ r.right = src_surface->resource.width; -+ r.bottom = src_surface->resource.height; -+ src_rect = &r; -+ } -+ else if (src_rect->left < 0 || src_rect->left >= src_rect->right -+ || src_rect->top < 0 || src_rect->top >= src_rect->bottom) -+ { -+ WARN("Invalid source rectangle.\n"); -+ return WINED3DERR_INVALIDCALL; -+ } -+ -+ dst_w = dst_surface->resource.width; -+ dst_h = dst_surface->resource.height; -+ -+ update_w = src_rect->right - src_rect->left; -+ update_h = src_rect->bottom - src_rect->top; -+ -+ if (update_w > dst_w || dst_point->x > dst_w - update_w -+ || update_h > dst_h || dst_point->y > dst_h - update_h) -+ { -+ WARN("Destination out of bounds.\n"); -+ return WINED3DERR_INVALIDCALL; -+ } -+ -+ if ((src_surface->container->resource.format_flags & WINED3DFMT_FLAG_BLOCKS) -+ && !surface_check_block_align_rect(src_surface, src_rect)) -+ { -+ WARN("Source rectangle not block-aligned.\n"); -+ return WINED3DERR_INVALIDCALL; -+ } -+ -+ SetRect(&dst_rect, dst_point->x, dst_point->y, dst_point->x + update_w, dst_point->y + update_h); -+ if ((dst_surface->container->resource.format_flags & WINED3DFMT_FLAG_BLOCKS) -+ && !surface_check_block_align_rect(dst_surface, &dst_rect)) -+ { -+ WARN("Destination rectangle not block-aligned.\n"); -+ return WINED3DERR_INVALIDCALL; -+ } -+ - if (wined3d_settings.cs_multithreaded) - { - FIXME("Waiting for cs.\n"); -diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c -index 2d98a93..5a2b14e 100644 ---- a/dlls/wined3d/surface.c -+++ b/dlls/wined3d/surface.c -@@ -1371,7 +1371,7 @@ static BOOL surface_check_block_align(struct wined3d_surface *surface, const str - return wined3d_resource_check_block_align(&surface->resource, box); - } - --static BOOL surface_check_block_align_rect(struct wined3d_surface *surface, const RECT *rect) -+BOOL surface_check_block_align_rect(struct wined3d_surface *surface, const RECT *rect) - { - struct wined3d_box box = {rect->left, rect->top, rect->right, rect->bottom, 0, 1}; - -diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 73da744..99212de 100644 ---- a/dlls/wined3d/wined3d_private.h -+++ b/dlls/wined3d/wined3d_private.h -@@ -2494,6 +2494,7 @@ void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct w - void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect_in, - struct wined3d_surface *src_surface, const RECT *src_rect_in, DWORD flags, - const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN; -+BOOL surface_check_block_align_rect(struct wined3d_surface *surface, const RECT *rect) DECLSPEC_HIDDEN; - - void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context, - const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN; --- -2.6.0 - diff --git a/patches/wined3d-CSMT_Main/0068-wined3d-Don-t-force-strict-draw-ordering-for-multith.patch b/patches/wined3d-CSMT_Main/0067-wined3d-Don-t-force-strict-draw-ordering-for-multith.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0068-wined3d-Don-t-force-strict-draw-ordering-for-multith.patch rename to patches/wined3d-CSMT_Main/0067-wined3d-Don-t-force-strict-draw-ordering-for-multith.patch diff --git a/patches/wined3d-CSMT_Main/0069-wined3d-Send-render-target-view-clears-through-the-c.patch b/patches/wined3d-CSMT_Main/0068-wined3d-Send-render-target-view-clears-through-the-c.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0069-wined3d-Send-render-target-view-clears-through-the-c.patch rename to patches/wined3d-CSMT_Main/0068-wined3d-Send-render-target-view-clears-through-the-c.patch diff --git a/patches/wined3d-CSMT_Main/0070-wined3d-Wait-for-the-CS-in-GetDC.patch b/patches/wined3d-CSMT_Main/0069-wined3d-Wait-for-the-CS-in-GetDC.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0070-wined3d-Wait-for-the-CS-in-GetDC.patch rename to patches/wined3d-CSMT_Main/0069-wined3d-Wait-for-the-CS-in-GetDC.patch diff --git a/patches/wined3d-CSMT_Main/0071-wined3d-send-resource-maps-through-the-command-strea.patch b/patches/wined3d-CSMT_Main/0070-wined3d-send-resource-maps-through-the-command-strea.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0071-wined3d-send-resource-maps-through-the-command-strea.patch rename to patches/wined3d-CSMT_Main/0070-wined3d-send-resource-maps-through-the-command-strea.patch diff --git a/patches/wined3d-CSMT_Main/0072-wined3d-Get-rid-of-the-end_scene-flush-and-finish.patch b/patches/wined3d-CSMT_Main/0071-wined3d-Get-rid-of-the-end_scene-flush-and-finish.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0072-wined3d-Get-rid-of-the-end_scene-flush-and-finish.patch rename to patches/wined3d-CSMT_Main/0071-wined3d-Get-rid-of-the-end_scene-flush-and-finish.patch diff --git a/patches/wined3d-CSMT_Main/0073-wined3d-Replace-the-linked-lists-with-a-ringbuffer.patch b/patches/wined3d-CSMT_Main/0072-wined3d-Replace-the-linked-lists-with-a-ringbuffer.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0073-wined3d-Replace-the-linked-lists-with-a-ringbuffer.patch rename to patches/wined3d-CSMT_Main/0072-wined3d-Replace-the-linked-lists-with-a-ringbuffer.patch diff --git a/patches/wined3d-CSMT_Main/0074-wined3d-Don-t-preload-buffers-on-unmap.patch b/patches/wined3d-CSMT_Main/0073-wined3d-Don-t-preload-buffers-on-unmap.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0074-wined3d-Don-t-preload-buffers-on-unmap.patch rename to patches/wined3d-CSMT_Main/0073-wined3d-Don-t-preload-buffers-on-unmap.patch diff --git a/patches/wined3d-CSMT_Main/0075-wined3d-Don-t-call-glFinish-before-swapping.patch b/patches/wined3d-CSMT_Main/0074-wined3d-Don-t-call-glFinish-before-swapping.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0075-wined3d-Don-t-call-glFinish-before-swapping.patch rename to patches/wined3d-CSMT_Main/0074-wined3d-Don-t-call-glFinish-before-swapping.patch diff --git a/patches/wined3d-CSMT_Main/0076-wined3d-wined3d_-_query_issue-never-fails.patch b/patches/wined3d-CSMT_Main/0075-wined3d-wined3d_-_query_issue-never-fails.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0076-wined3d-wined3d_-_query_issue-never-fails.patch rename to patches/wined3d-CSMT_Main/0075-wined3d-wined3d_-_query_issue-never-fails.patch diff --git a/patches/wined3d-CSMT_Main/0077-wined3d-Add-query-support-to-the-command-stream.patch b/patches/wined3d-CSMT_Main/0076-wined3d-Add-query-support-to-the-command-stream.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0077-wined3d-Add-query-support-to-the-command-stream.patch rename to patches/wined3d-CSMT_Main/0076-wined3d-Add-query-support-to-the-command-stream.patch diff --git a/patches/wined3d-CSMT_Main/0078-wined3d-Check-our-CS-state-to-find-out-if-a-query-is.patch b/patches/wined3d-CSMT_Main/0077-wined3d-Check-our-CS-state-to-find-out-if-a-query-is.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0078-wined3d-Check-our-CS-state-to-find-out-if-a-query-is.patch rename to patches/wined3d-CSMT_Main/0077-wined3d-Check-our-CS-state-to-find-out-if-a-query-is.patch diff --git a/patches/wined3d-CSMT_Main/0079-wined3d-Poll-queries-automatically-in-the-CS.patch b/patches/wined3d-CSMT_Main/0078-wined3d-Poll-queries-automatically-in-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0079-wined3d-Poll-queries-automatically-in-the-CS.patch rename to patches/wined3d-CSMT_Main/0078-wined3d-Poll-queries-automatically-in-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0080-wined3d-Introduce-a-separate-queue-for-priority-comm.patch b/patches/wined3d-CSMT_Main/0079-wined3d-Introduce-a-separate-queue-for-priority-comm.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0080-wined3d-Introduce-a-separate-queue-for-priority-comm.patch rename to patches/wined3d-CSMT_Main/0079-wined3d-Introduce-a-separate-queue-for-priority-comm.patch diff --git a/patches/wined3d-CSMT_Main/0081-wined3d-Destroy-queries-through-the-CS.patch b/patches/wined3d-CSMT_Main/0080-wined3d-Destroy-queries-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0081-wined3d-Destroy-queries-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0080-wined3d-Destroy-queries-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0082-wined3d-Separate-main-and-worker-thread-query-state.patch b/patches/wined3d-CSMT_Main/0081-wined3d-Separate-main-and-worker-thread-query-state.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0082-wined3d-Separate-main-and-worker-thread-query-state.patch rename to patches/wined3d-CSMT_Main/0081-wined3d-Separate-main-and-worker-thread-query-state.patch diff --git a/patches/wined3d-CSMT_Main/0083-wined3d-Don-t-poll-queries-that-failed-to-start.patch b/patches/wined3d-CSMT_Main/0082-wined3d-Don-t-poll-queries-that-failed-to-start.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0083-wined3d-Don-t-poll-queries-that-failed-to-start.patch rename to patches/wined3d-CSMT_Main/0082-wined3d-Don-t-poll-queries-that-failed-to-start.patch diff --git a/patches/wined3d-CSMT_Main/0084-wined3d-Remove-restated-queries-from-the-poll-list.patch b/patches/wined3d-CSMT_Main/0083-wined3d-Remove-restated-queries-from-the-poll-list.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0084-wined3d-Remove-restated-queries-from-the-poll-list.patch rename to patches/wined3d-CSMT_Main/0083-wined3d-Remove-restated-queries-from-the-poll-list.patch diff --git a/patches/wined3d-CSMT_Main/0085-wined3d-Don-t-reset-the-query-state-if-it-doesn-t-ha.patch b/patches/wined3d-CSMT_Main/0084-wined3d-Don-t-reset-the-query-state-if-it-doesn-t-ha.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0085-wined3d-Don-t-reset-the-query-state-if-it-doesn-t-ha.patch rename to patches/wined3d-CSMT_Main/0084-wined3d-Don-t-reset-the-query-state-if-it-doesn-t-ha.patch diff --git a/patches/wined3d-CSMT_Main/0086-wined3d-Put-this-into-the-query-poll-patch.patch b/patches/wined3d-CSMT_Main/0085-wined3d-Put-this-into-the-query-poll-patch.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0086-wined3d-Put-this-into-the-query-poll-patch.patch rename to patches/wined3d-CSMT_Main/0085-wined3d-Put-this-into-the-query-poll-patch.patch diff --git a/patches/wined3d-CSMT_Main/0088-wined3d-Send-texture-preloads-through-the-CS.patch b/patches/wined3d-CSMT_Main/0086-wined3d-Send-texture-preloads-through-the-CS.patch similarity index 79% rename from patches/wined3d-CSMT_Main/0088-wined3d-Send-texture-preloads-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0086-wined3d-Send-texture-preloads-through-the-CS.patch index fb0f1224..d1189275 100644 --- a/patches/wined3d-CSMT_Main/0088-wined3d-Send-texture-preloads-through-the-CS.patch +++ b/patches/wined3d-CSMT_Main/0086-wined3d-Send-texture-preloads-through-the-CS.patch @@ -1,4 +1,4 @@ -From dd0852f22f9a3e04e9fefae6c0a3ac4913cc390d Mon Sep 17 00:00:00 2001 +From 96075d9a9e3aa2ea6317c31b91013964e33ee4ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Thu, 1 Aug 2013 00:10:40 +0200 Subject: wined3d: Send texture preloads through the CS @@ -10,19 +10,19 @@ Subject: wined3d: Send texture preloads through the CS 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c -index 3264d17..78e5010 100644 +index 74c5b81..d8b1ba8 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -70,6 +70,7 @@ enum wined3d_cs_op + WINED3D_CS_OP_RESOURCE_UNMAP, WINED3D_CS_OP_QUERY_ISSUE, WINED3D_CS_OP_QUERY_DESTROY, - WINED3D_CS_OP_UPDATE_SURFACE, + WINED3D_CS_OP_TEXTURE_PRELOAD, WINED3D_CS_OP_STOP, }; -@@ -389,6 +390,12 @@ struct wined3d_cs_update_surface - BOOL has_src_rect, has_dst_point; +@@ -389,6 +390,12 @@ struct wined3d_cs_query_destroy + struct wined3d_query *query; }; +struct wined3d_cs_texture_preload @@ -34,7 +34,7 @@ index 3264d17..78e5010 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); -@@ -1827,6 +1834,30 @@ void wined3d_cs_emit_update_surface(struct wined3d_cs *cs, struct wined3d_surfac +@@ -1894,6 +1901,30 @@ void wined3d_cs_emit_query_destroy(struct wined3d_cs *cs, struct wined3d_query * cs->ops->submit(cs, sizeof(*op)); } @@ -65,19 +65,19 @@ index 3264d17..78e5010 100644 static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) = { /* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop, -@@ -1875,6 +1906,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void +@@ -1942,6 +1973,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void + /* WINED3D_CS_OP_RESOURCE_UNMAP */ wined3d_cs_exec_resource_unmap, /* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue, /* 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, }; static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c -index b7891d9..ea8589a 100644 +index 11ab91a..c031bb9 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c -@@ -569,10 +569,8 @@ void wined3d_texture_load(struct wined3d_texture *texture, +@@ -492,10 +492,8 @@ void wined3d_texture_load(struct wined3d_texture *texture, void CDECL wined3d_texture_preload(struct wined3d_texture *texture) { @@ -91,17 +91,17 @@ index b7891d9..ea8589a 100644 void * CDECL wined3d_texture_get_parent(const struct wined3d_texture *texture) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 07d1613..de82b46 100644 +index 3423cca..4327554 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -2653,6 +2653,7 @@ void wined3d_cs_emit_query_get_data(struct wined3d_cs *cs, struct wined3d_query +@@ -2862,6 +2862,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu + void wined3d_cs_emit_query_get_data(struct wined3d_cs *cs, struct wined3d_query *query, void *data, + UINT data_size, DWORD flags, HRESULT *ret) DECLSPEC_HIDDEN; void wined3d_cs_emit_query_destroy(struct wined3d_cs *cs, struct wined3d_query *query) DECLSPEC_HIDDEN; - 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; /* 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 diff --git a/patches/wined3d-CSMT_Main/0087-wined3d-Send-update_surface-commands-through-the-CS.patch b/patches/wined3d-CSMT_Main/0087-wined3d-Send-update_surface-commands-through-the-CS.patch deleted file mode 100644 index 62af97f7..00000000 --- a/patches/wined3d-CSMT_Main/0087-wined3d-Send-update_surface-commands-through-the-CS.patch +++ /dev/null @@ -1,128 +0,0 @@ -From 961a8cb3c42a2969dd1500b4fc16adb4d47b514f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Stefan=20D=C3=B6singer?= -Date: Thu, 1 Aug 2013 00:00:26 +0200 -Subject: wined3d: Send update_surface commands through the CS - ---- - dlls/wined3d/cs.c | 48 ++++++++++++++++++++++++++++++++++++++++++ - dlls/wined3d/device.c | 9 ++------ - dlls/wined3d/wined3d_private.h | 2 ++ - 3 files changed, 52 insertions(+), 7 deletions(-) - -diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c -index 3540cb7..3264d17 100644 ---- a/dlls/wined3d/cs.c -+++ b/dlls/wined3d/cs.c -@@ -69,6 +69,7 @@ enum wined3d_cs_op - WINED3D_CS_OP_RESOURCE_UNMAP, - WINED3D_CS_OP_QUERY_ISSUE, - WINED3D_CS_OP_QUERY_DESTROY, -+ WINED3D_CS_OP_UPDATE_SURFACE, - WINED3D_CS_OP_STOP, - }; - -@@ -379,6 +380,15 @@ struct wined3d_cs_query_destroy - struct wined3d_query *query; - }; - -+struct wined3d_cs_update_surface -+{ -+ enum wined3d_cs_op opcode; -+ struct wined3d_surface *src, *dst; -+ RECT src_rect; -+ POINT dst_point; -+ BOOL has_src_rect, has_dst_point; -+}; -+ - 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); -@@ -1780,6 +1790,43 @@ void wined3d_cs_emit_query_destroy(struct wined3d_cs *cs, struct wined3d_query * - cs->ops->submit(cs, sizeof(*op)); - } - -+static UINT wined3d_cs_exec_update_surface(struct wined3d_cs *cs, const void *data) -+{ -+ const struct wined3d_cs_update_surface *op = data; -+ -+ surface_upload_from_surface(op->dst, op->has_dst_point ? &op->dst_point : NULL, -+ op->src, op->has_src_rect ? &op->src_rect : NULL); -+ -+ return sizeof(*op); -+} -+ -+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) -+{ -+ struct wined3d_cs_update_surface *op; -+ -+ op = cs->ops->require_space(cs, sizeof(*op)); -+ op->opcode = WINED3D_CS_OP_UPDATE_SURFACE; -+ op->src = src; -+ op->dst = dst; -+ op->has_src_rect = FALSE; -+ op->has_dst_point = FALSE; -+ -+ if (src_rect) -+ { -+ op->has_src_rect = TRUE; -+ op->src_rect = *src_rect; -+ } -+ -+ if (dst_point) -+ { -+ op->has_dst_point = TRUE; -+ op->dst_point = *dst_point; -+ } -+ -+ 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, -@@ -1827,6 +1874,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void - /* WINED3D_CS_OP_RESOURCE_UNMAP */ wined3d_cs_exec_resource_unmap, - /* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue, - /* WINED3D_CS_OP_QUERY_DESTROY */ wined3d_cs_exec_query_destroy, -+ /* WINED3D_CS_OP_UPDATE_SURFACE */ wined3d_cs_exec_update_surface, - }; - - 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 cd90c76..ed055f8 100644 ---- a/dlls/wined3d/device.c -+++ b/dlls/wined3d/device.c -@@ -3796,14 +3796,9 @@ HRESULT CDECL wined3d_device_update_surface(struct wined3d_device *device, - return WINED3DERR_INVALIDCALL; - } - -- if (wined3d_settings.cs_multithreaded) -- { -- FIXME("Waiting for cs.\n"); -- wined3d_cs_emit_glfinish(device->cs); -- device->cs->ops->finish(device->cs); -- } -+ wined3d_cs_emit_update_surface(device->cs, src_surface, src_rect, dst_surface, dst_point); - -- return surface_upload_from_surface(dst_surface, dst_point, src_surface, src_rect); -+ return WINED3D_OK; - } - - void CDECL wined3d_device_copy_resource(struct wined3d_device *device, -diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 8dd9786..07d1613 100644 ---- a/dlls/wined3d/wined3d_private.h -+++ b/dlls/wined3d/wined3d_private.h -@@ -2651,6 +2651,8 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu - void wined3d_cs_emit_query_get_data(struct wined3d_cs *cs, struct wined3d_query *query, void *data, - UINT data_size, DWORD flags, HRESULT *ret) DECLSPEC_HIDDEN; - void wined3d_cs_emit_query_destroy(struct wined3d_cs *cs, struct wined3d_query *query) DECLSPEC_HIDDEN; -+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; - - /* 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 - diff --git a/patches/wined3d-CSMT_Main/0089-wined3d-Send-update_texture-calls-through-the-CS.patch b/patches/wined3d-CSMT_Main/0087-wined3d-Send-update_texture-calls-through-the-CS.patch similarity index 92% rename from patches/wined3d-CSMT_Main/0089-wined3d-Send-update_texture-calls-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0087-wined3d-Send-update_texture-calls-through-the-CS.patch index 8a1311b8..5660e989 100644 --- a/patches/wined3d-CSMT_Main/0089-wined3d-Send-update_texture-calls-through-the-CS.patch +++ b/patches/wined3d-CSMT_Main/0087-wined3d-Send-update_texture-calls-through-the-CS.patch @@ -1,4 +1,4 @@ -From 74ca9354ca44c727c7efeeee0d5f56caf19960ef Mon Sep 17 00:00:00 2001 +From a9703c84295e0a1867e8d82917e0f90db4475149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Thu, 1 Aug 2013 00:33:48 +0200 Subject: wined3d: Send update_texture calls through the CS @@ -10,18 +10,18 @@ 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 2da4249..392ef36 100644 +index d8b1ba8..a2ef7fb 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c -@@ -72,6 +72,7 @@ enum wined3d_cs_op +@@ -71,6 +71,7 @@ enum wined3d_cs_op + WINED3D_CS_OP_QUERY_ISSUE, WINED3D_CS_OP_QUERY_DESTROY, - WINED3D_CS_OP_UPDATE_SURFACE, WINED3D_CS_OP_TEXTURE_PRELOAD, + WINED3D_CS_OP_UPDATE_TEXTURE, WINED3D_CS_OP_STOP, }; -@@ -406,6 +407,12 @@ struct wined3d_cs_texture_preload +@@ -396,6 +397,12 @@ struct wined3d_cs_texture_preload struct wined3d_texture *texture; }; @@ -34,7 +34,7 @@ index 2da4249..392ef36 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); -@@ -1972,6 +1979,31 @@ void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_textu +@@ -1925,6 +1932,31 @@ void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_textu cs->ops->submit(cs, sizeof(*op)); } @@ -66,16 +66,16 @@ index 2da4249..392ef36 100644 static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) = { /* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop, -@@ -2022,6 +2054,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void +@@ -1974,6 +2006,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void + /* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue, /* 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_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 4db078d..2dde4b6 100644 +index a697fda..c4f530f 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3494,16 +3494,15 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device @@ -191,7 +191,7 @@ index 4db078d..2dde4b6 100644 i * src_levels + j + src_skip_levels)); dst_surface = surface_from_resource(wined3d_texture_get_sub_resource(dst_texture, i * dst_levels + j)); -- if (FAILED(hr = wined3d_device_update_surface(device, src_surface, NULL, dst_surface, NULL))) +- if (FAILED(hr = surface_upload_from_surface(dst_surface, NULL, src_surface, NULL))) - { - WARN("Failed to update surface, hr %#x.\n", hr); - return hr; @@ -279,10 +279,10 @@ index 4db078d..2dde4b6 100644 } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 8985d99..e5e0336 100644 +index 4327554..3fe1e6e 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -2212,6 +2212,8 @@ void device_resource_add(struct wined3d_device *device, struct wined3d_resource +@@ -2261,6 +2261,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,9 +291,9 @@ index 8985d99..e5e0336 100644 static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state) { -@@ -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; +@@ -2863,6 +2865,8 @@ void wined3d_cs_emit_query_get_data(struct wined3d_cs *cs, struct wined3d_query + UINT data_size, DWORD flags, HRESULT *ret) DECLSPEC_HIDDEN; + void wined3d_cs_emit_query_destroy(struct wined3d_cs *cs, struct wined3d_query *query) DECLSPEC_HIDDEN; 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; diff --git a/patches/wined3d-CSMT_Main/0090-wined3d-Get-rid-of-the-surface_upload_data-glFinish.patch b/patches/wined3d-CSMT_Main/0088-wined3d-Get-rid-of-the-surface_upload_data-glFinish.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0090-wined3d-Get-rid-of-the-surface_upload_data-glFinish.patch rename to patches/wined3d-CSMT_Main/0088-wined3d-Get-rid-of-the-surface_upload_data-glFinish.patch diff --git a/patches/wined3d-CSMT_Main/0091-wined3d-Don-t-lock-the-src-volume-in-device_update_v.patch b/patches/wined3d-CSMT_Main/0089-wined3d-Don-t-lock-the-src-volume-in-device_update_v.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0091-wined3d-Don-t-lock-the-src-volume-in-device_update_v.patch rename to patches/wined3d-CSMT_Main/0089-wined3d-Don-t-lock-the-src-volume-in-device_update_v.patch diff --git a/patches/wined3d-CSMT_Main/0092-wined3d-Handle-evit_managed_resources-through-the-CS.patch b/patches/wined3d-CSMT_Main/0090-wined3d-Handle-evit_managed_resources-through-the-CS.patch similarity index 86% rename from patches/wined3d-CSMT_Main/0092-wined3d-Handle-evit_managed_resources-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0090-wined3d-Handle-evit_managed_resources-through-the-CS.patch index 61d4238a..6c382b4e 100644 --- a/patches/wined3d-CSMT_Main/0092-wined3d-Handle-evit_managed_resources-through-the-CS.patch +++ b/patches/wined3d-CSMT_Main/0090-wined3d-Handle-evit_managed_resources-through-the-CS.patch @@ -1,4 +1,4 @@ -From f93c689f0844961269bd2e4f83bf242841c1e305 Mon Sep 17 00:00:00 2001 +From 28d1f15692eeedd6ec07f2005ec6ebc8d89a7d1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= 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 392ef36..bbec667 100644 +index a2ef7fb..54d4dca 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c -@@ -73,6 +73,7 @@ enum wined3d_cs_op - WINED3D_CS_OP_UPDATE_SURFACE, +@@ -72,6 +72,7 @@ enum wined3d_cs_op + WINED3D_CS_OP_QUERY_DESTROY, WINED3D_CS_OP_TEXTURE_PRELOAD, WINED3D_CS_OP_UPDATE_TEXTURE, + WINED3D_CS_OP_EVICT_RESOURCE, WINED3D_CS_OP_STOP, }; -@@ -413,6 +414,12 @@ struct wined3d_cs_update_texture +@@ -403,6 +404,12 @@ struct wined3d_cs_update_texture struct wined3d_texture *src, *dst; }; @@ -34,7 +34,7 @@ index 392ef36..bbec667 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); -@@ -2004,6 +2011,35 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur +@@ -1957,6 +1964,35 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur cs->ops->submit(cs, sizeof(*op)); } @@ -70,8 +70,8 @@ index 392ef36..bbec667 100644 static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) = { /* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop, -@@ -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, +@@ -2007,6 +2043,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_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, @@ -79,10 +79,10 @@ index 392ef36..bbec667 100644 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 4abc2c5..7f7ddbb 100644 +index 3913bd1..d8154a5 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c -@@ -4489,13 +4489,8 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device) +@@ -4396,13 +4396,8 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device) TRACE("device %p.\n", device); @@ -98,7 +98,7 @@ index 4abc2c5..7f7ddbb 100644 LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry) { TRACE("Checking resource %p for eviction.\n", resource); -@@ -4503,12 +4498,9 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device) +@@ -4410,12 +4405,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,10 +113,10 @@ index 4abc2c5..7f7ddbb 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 e5e0336..60ff62f 100644 +index 3fe1e6e..95580aa 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -2810,6 +2810,7 @@ void wined3d_cs_emit_update_surface(struct wined3d_cs *cs, struct wined3d_surfac +@@ -2867,6 +2867,7 @@ void wined3d_cs_emit_query_destroy(struct wined3d_cs *cs, struct wined3d_query * 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; diff --git a/patches/wined3d-CSMT_Main/0093-wined3d-Introduce-resource-fencing.patch b/patches/wined3d-CSMT_Main/0091-wined3d-Introduce-resource-fencing.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0093-wined3d-Introduce-resource-fencing.patch rename to patches/wined3d-CSMT_Main/0091-wined3d-Introduce-resource-fencing.patch diff --git a/patches/wined3d-CSMT_Main/0094-wined3d-Fence-update_texture-and-update_surface-call.patch b/patches/wined3d-CSMT_Main/0092-wined3d-Fence-update_texture-and-update_surface-call.patch similarity index 57% rename from patches/wined3d-CSMT_Main/0094-wined3d-Fence-update_texture-and-update_surface-call.patch rename to patches/wined3d-CSMT_Main/0092-wined3d-Fence-update_texture-and-update_surface-call.patch index af7c1b39..7bfc77cc 100644 --- a/patches/wined3d-CSMT_Main/0094-wined3d-Fence-update_texture-and-update_surface-call.patch +++ b/patches/wined3d-CSMT_Main/0092-wined3d-Fence-update_texture-and-update_surface-call.patch @@ -1,52 +1,18 @@ -From a83b0e8543213b11848897ea954412ac0f06083a Mon Sep 17 00:00:00 2001 +From 607eeb6bdbea6787dd6f5cc10c74e9b92e903e0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Fri, 30 Aug 2013 10:41:42 +0200 Subject: wined3d: Fence update_texture and update_surface calls --- - dlls/wined3d/cs.c | 26 ++++++++++++++++++++++++++ + dlls/wined3d/cs.c | 6 ++++++ dlls/wined3d/resource.c | 28 ++++++++++++++++++++++++++++ - 2 files changed, 54 insertions(+) + 2 files changed, 34 insertions(+) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c -index 1197eef..9a7e6df 100644 +index d05f65d..7111c98 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c -@@ -1844,6 +1844,16 @@ static UINT wined3d_cs_exec_update_surface(struct wined3d_cs *cs, const void *da - surface_upload_from_surface(op->dst, op->has_dst_point ? &op->dst_point : NULL, - op->src, op->has_src_rect ? &op->src_rect : NULL); - -+ if (op->src->container) -+ wined3d_resource_dec_fence(&op->src->container->resource); -+ else -+ wined3d_resource_inc_fence(&op->src->resource); -+ -+ if (op->dst->container) -+ wined3d_resource_dec_fence(&op->dst->container->resource); -+ else -+ wined3d_resource_inc_fence(&op->dst->resource); -+ - return sizeof(*op); - } - -@@ -1871,6 +1881,16 @@ void wined3d_cs_emit_update_surface(struct wined3d_cs *cs, struct wined3d_surfac - op->dst_point = *dst_point; - } - -+ if (src->container) -+ wined3d_resource_inc_fence(&src->container->resource); -+ else -+ wined3d_resource_inc_fence(&src->resource); -+ -+ if (dst->container) -+ wined3d_resource_inc_fence(&dst->container->resource); -+ else -+ wined3d_resource_inc_fence(&dst->resource); -+ - cs->ops->submit(cs, sizeof(*op)); - } - -@@ -1930,6 +1950,9 @@ static UINT wined3d_cs_exec_update_texture(struct wined3d_cs *cs, const void *da +@@ -1967,6 +1967,9 @@ static UINT wined3d_cs_exec_update_texture(struct wined3d_cs *cs, const void *da device_exec_update_texture(context, op->src, op->dst); context_release(context); @@ -56,7 +22,7 @@ index 1197eef..9a7e6df 100644 return sizeof(*op); } -@@ -1943,6 +1966,9 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur +@@ -1980,6 +1983,9 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur op->src = src; op->dst = dst; @@ -67,10 +33,10 @@ index 1197eef..9a7e6df 100644 } diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c -index af60d51..708b080 100644 +index e1ae8d4..1e3f6b4 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c -@@ -712,6 +712,32 @@ void *wined3d_resource_map_internal(struct wined3d_resource *resource, DWORD fla +@@ -821,6 +821,32 @@ void *wined3d_resource_map_internal(struct wined3d_resource *resource, DWORD fla return mem; } @@ -103,7 +69,7 @@ index af60d51..708b080 100644 HRESULT wined3d_resource_map(struct wined3d_resource *resource, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags) { -@@ -730,6 +756,8 @@ HRESULT wined3d_resource_map(struct wined3d_resource *resource, +@@ -840,6 +866,8 @@ HRESULT wined3d_resource_map(struct wined3d_resource *resource, flags = wined3d_resource_sanitize_map_flags(resource, flags); @@ -113,5 +79,5 @@ index af60d51..708b080 100644 if (!base_memory) { -- -2.1.3 +2.7.0 diff --git a/patches/wined3d-CSMT_Main/0095-wined3d-Dirtify-resources-on-unmap.patch b/patches/wined3d-CSMT_Main/0093-wined3d-Dirtify-resources-on-unmap.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0095-wined3d-Dirtify-resources-on-unmap.patch rename to patches/wined3d-CSMT_Main/0093-wined3d-Dirtify-resources-on-unmap.patch diff --git a/patches/wined3d-CSMT_Main/0096-wined3d-Fence-texture-reads-in-draws.patch b/patches/wined3d-CSMT_Main/0094-wined3d-Fence-texture-reads-in-draws.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0096-wined3d-Fence-texture-reads-in-draws.patch rename to patches/wined3d-CSMT_Main/0094-wined3d-Fence-texture-reads-in-draws.patch diff --git a/patches/wined3d-CSMT_Main/0097-wined3d-Fence-render-targets-and-depth-stencils.patch b/patches/wined3d-CSMT_Main/0095-wined3d-Fence-render-targets-and-depth-stencils.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0097-wined3d-Fence-render-targets-and-depth-stencils.patch rename to patches/wined3d-CSMT_Main/0095-wined3d-Fence-render-targets-and-depth-stencils.patch diff --git a/patches/wined3d-CSMT_Main/0098-wined3d-Fence-blit-operations.patch b/patches/wined3d-CSMT_Main/0096-wined3d-Fence-blit-operations.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0098-wined3d-Fence-blit-operations.patch rename to patches/wined3d-CSMT_Main/0096-wined3d-Fence-blit-operations.patch diff --git a/patches/wined3d-CSMT_Main/0099-wined3d-Fence-color_fill-operations.patch b/patches/wined3d-CSMT_Main/0097-wined3d-Fence-color_fill-operations.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0099-wined3d-Fence-color_fill-operations.patch rename to patches/wined3d-CSMT_Main/0097-wined3d-Fence-color_fill-operations.patch diff --git a/patches/wined3d-CSMT_Main/0100-wined3d-Fence-clear-calls.patch b/patches/wined3d-CSMT_Main/0098-wined3d-Fence-clear-calls.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0100-wined3d-Fence-clear-calls.patch rename to patches/wined3d-CSMT_Main/0098-wined3d-Fence-clear-calls.patch diff --git a/patches/wined3d-CSMT_Main/0101-wined3d-Fence-present-calls.patch b/patches/wined3d-CSMT_Main/0099-wined3d-Fence-present-calls.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0101-wined3d-Fence-present-calls.patch rename to patches/wined3d-CSMT_Main/0099-wined3d-Fence-present-calls.patch diff --git a/patches/wined3d-CSMT_Main/0102-wined3d-Make-resource-maps-and-unmaps-a-priority-com.patch b/patches/wined3d-CSMT_Main/0100-wined3d-Make-resource-maps-and-unmaps-a-priority-com.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0102-wined3d-Make-resource-maps-and-unmaps-a-priority-com.patch rename to patches/wined3d-CSMT_Main/0100-wined3d-Make-resource-maps-and-unmaps-a-priority-com.patch diff --git a/patches/wined3d-CSMT_Main/0103-wined3d-Dirtify-changed-textures-through-the-command.patch b/patches/wined3d-CSMT_Main/0101-wined3d-Dirtify-changed-textures-through-the-command.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0103-wined3d-Dirtify-changed-textures-through-the-command.patch rename to patches/wined3d-CSMT_Main/0101-wined3d-Dirtify-changed-textures-through-the-command.patch diff --git a/patches/wined3d-CSMT_Main/0104-wined3d-Wrap-GL-BOs-in-a-structure.patch b/patches/wined3d-CSMT_Main/0102-wined3d-Wrap-GL-BOs-in-a-structure.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0104-wined3d-Wrap-GL-BOs-in-a-structure.patch rename to patches/wined3d-CSMT_Main/0102-wined3d-Wrap-GL-BOs-in-a-structure.patch diff --git a/patches/wined3d-CSMT_Main/0105-wined3d-Separate-resource-map-and-draw-buffers.patch b/patches/wined3d-CSMT_Main/0103-wined3d-Separate-resource-map-and-draw-buffers.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0105-wined3d-Separate-resource-map-and-draw-buffers.patch rename to patches/wined3d-CSMT_Main/0103-wined3d-Separate-resource-map-and-draw-buffers.patch diff --git a/patches/wined3d-CSMT_Main/0106-wined3d-Implement-DISCARD-resource-maps-with-buffers.patch b/patches/wined3d-CSMT_Main/0104-wined3d-Implement-DISCARD-resource-maps-with-buffers.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0106-wined3d-Implement-DISCARD-resource-maps-with-buffers.patch rename to patches/wined3d-CSMT_Main/0104-wined3d-Implement-DISCARD-resource-maps-with-buffers.patch diff --git a/patches/wined3d-CSMT_Main/0107-wined3d-Implement-DISCARD-resource-maps-with-heap-me.patch b/patches/wined3d-CSMT_Main/0105-wined3d-Implement-DISCARD-resource-maps-with-heap-me.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0107-wined3d-Implement-DISCARD-resource-maps-with-heap-me.patch rename to patches/wined3d-CSMT_Main/0105-wined3d-Implement-DISCARD-resource-maps-with-heap-me.patch diff --git a/patches/wined3d-CSMT_Main/0108-wined3d-Unset-some-objects-in-state_init_default.patch b/patches/wined3d-CSMT_Main/0106-wined3d-Unset-some-objects-in-state_init_default.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0108-wined3d-Unset-some-objects-in-state_init_default.patch rename to patches/wined3d-CSMT_Main/0106-wined3d-Unset-some-objects-in-state_init_default.patch diff --git a/patches/wined3d-CSMT_Main/0109-wined3d-Don-t-request-the-frontbuffer-to-create-dumm.patch b/patches/wined3d-CSMT_Main/0107-wined3d-Don-t-request-the-frontbuffer-to-create-dumm.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0109-wined3d-Don-t-request-the-frontbuffer-to-create-dumm.patch rename to patches/wined3d-CSMT_Main/0107-wined3d-Don-t-request-the-frontbuffer-to-create-dumm.patch diff --git a/patches/wined3d-CSMT_Main/0110-wined3d-Use-double-buffered-buffers-for-multithreade.patch b/patches/wined3d-CSMT_Main/0108-wined3d-Use-double-buffered-buffers-for-multithreade.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0110-wined3d-Use-double-buffered-buffers-for-multithreade.patch rename to patches/wined3d-CSMT_Main/0108-wined3d-Use-double-buffered-buffers-for-multithreade.patch diff --git a/patches/wined3d-CSMT_Main/0111-wined3d-Don-t-synchronize-NOOVERWRITE-buffer-maps.patch b/patches/wined3d-CSMT_Main/0109-wined3d-Don-t-synchronize-NOOVERWRITE-buffer-maps.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0111-wined3d-Don-t-synchronize-NOOVERWRITE-buffer-maps.patch rename to patches/wined3d-CSMT_Main/0109-wined3d-Don-t-synchronize-NOOVERWRITE-buffer-maps.patch diff --git a/patches/wined3d-CSMT_Main/0112-wined3d-Separate-buffer-map-write-and-draw-read-memo.patch b/patches/wined3d-CSMT_Main/0110-wined3d-Separate-buffer-map-write-and-draw-read-memo.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0112-wined3d-Separate-buffer-map-write-and-draw-read-memo.patch rename to patches/wined3d-CSMT_Main/0110-wined3d-Separate-buffer-map-write-and-draw-read-memo.patch diff --git a/patches/wined3d-CSMT_Main/0113-wined3d-Accelerate-DISCARD-buffer-maps.patch b/patches/wined3d-CSMT_Main/0111-wined3d-Accelerate-DISCARD-buffer-maps.patch similarity index 89% rename from patches/wined3d-CSMT_Main/0113-wined3d-Accelerate-DISCARD-buffer-maps.patch rename to patches/wined3d-CSMT_Main/0111-wined3d-Accelerate-DISCARD-buffer-maps.patch index bf768f2f..bbd618e2 100644 --- a/patches/wined3d-CSMT_Main/0113-wined3d-Accelerate-DISCARD-buffer-maps.patch +++ b/patches/wined3d-CSMT_Main/0111-wined3d-Accelerate-DISCARD-buffer-maps.patch @@ -1,4 +1,4 @@ -From 46ed74a72057957b7046b45b4cdfb4b34ad4016e Mon Sep 17 00:00:00 2001 +From a94a1e128c6effd531b1722198dc63db0d1dbdc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Sat, 6 Jul 2013 16:14:16 +0200 Subject: wined3d: Accelerate DISCARD buffer maps @@ -13,7 +13,7 @@ TODO3: Clean up the map_mem allocation mess. 3 files changed, 52 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c -index 2a814c6..5c6d36e 100644 +index ae7d648..db2678c 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -1058,10 +1058,19 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN @@ -40,18 +40,18 @@ index 2a814c6..5c6d36e 100644 base = buffer->map_ptr ? buffer->map_ptr : buffer->resource.map_heap_memory; diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c -index 9307246..341b51c 100644 +index 4973041..cd234d3 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c -@@ -68,6 +68,7 @@ enum wined3d_cs_op +@@ -69,6 +69,7 @@ enum wined3d_cs_op WINED3D_CS_OP_RESOURCE_CHANGED, WINED3D_CS_OP_RESOURCE_MAP, WINED3D_CS_OP_RESOURCE_UNMAP, + WINED3D_CS_OP_BUFFER_SWAP_MEM, WINED3D_CS_OP_QUERY_ISSUE, WINED3D_CS_OP_QUERY_DESTROY, - WINED3D_CS_OP_UPDATE_SURFACE, -@@ -374,6 +375,13 @@ struct wined3d_cs_resource_changed + WINED3D_CS_OP_TEXTURE_PRELOAD, +@@ -382,6 +383,13 @@ struct wined3d_cs_resource_changed void *swap_heap_memory; }; @@ -65,7 +65,7 @@ index 9307246..341b51c 100644 struct wined3d_cs_skip { enum wined3d_cs_op opcode; -@@ -2123,6 +2131,34 @@ void wined3d_cs_emit_evict_resource(struct wined3d_cs *cs, struct wined3d_resour +@@ -2140,6 +2148,34 @@ void wined3d_cs_emit_evict_resource(struct wined3d_cs *cs, struct wined3d_resour cs->ops->submit(cs, sizeof(*op)); } @@ -100,7 +100,7 @@ index 9307246..341b51c 100644 static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) = { /* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop, -@@ -2143,11 +2179,11 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void +@@ -2160,11 +2196,11 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void /* WINED3D_CS_OP_SET_INDEX_BUFFER */ wined3d_cs_exec_set_index_buffer, /* WINED3D_CS_OP_SET_CONSTANT_BUFFER */ wined3d_cs_exec_set_constant_buffer, /* WINED3D_CS_OP_SET_TEXTURE */ wined3d_cs_exec_set_texture, @@ -113,19 +113,19 @@ index 9307246..341b51c 100644 /* WINED3D_CS_OP_SET_SAMPLER_STATE */ wined3d_cs_exec_set_sampler_state, /* WINED3D_CS_OP_SET_TRANSFORM */ wined3d_cs_exec_set_transform, /* WINED3D_CS_OP_SET_CLIP_PLANE */ wined3d_cs_exec_set_clip_plane, -@@ -2169,6 +2205,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void +@@ -2187,6 +2223,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void /* WINED3D_CS_OP_RESOURCE_CHANGED */ wined3d_cs_exec_resource_changed, /* WINED3D_CS_OP_RESOURCE_MAP */ wined3d_cs_exec_resource_map, /* WINED3D_CS_OP_RESOURCE_UNMAP */ wined3d_cs_exec_resource_unmap, + /* WINED3D_CS_OP_BUFFER_SWAP_MEM */ wined3d_cs_exec_buffer_swap_mem, /* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue, /* 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, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 270162f..7d12df9 100644 +index 53a1cf7..b0390e3 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -2694,6 +2694,8 @@ void wined3d_cs_emit_surface_preload(struct wined3d_cs *cs, struct wined3d_surfa +@@ -2902,6 +2902,8 @@ void wined3d_cs_emit_texture_preload(struct wined3d_cs *cs, struct wined3d_textu 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; @@ -135,5 +135,5 @@ index 270162f..7d12df9 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 diff --git a/patches/wined3d-CSMT_Main/0114-wined3d-Accelerate-READONLY-buffer-maps.patch b/patches/wined3d-CSMT_Main/0112-wined3d-Accelerate-READONLY-buffer-maps.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0114-wined3d-Accelerate-READONLY-buffer-maps.patch rename to patches/wined3d-CSMT_Main/0112-wined3d-Accelerate-READONLY-buffer-maps.patch diff --git a/patches/wined3d-CSMT_Main/0115-wined3d-Access-the-buffer-dirty-areas-through-the-CS.patch b/patches/wined3d-CSMT_Main/0113-wined3d-Access-the-buffer-dirty-areas-through-the-CS.patch similarity index 91% rename from patches/wined3d-CSMT_Main/0115-wined3d-Access-the-buffer-dirty-areas-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0113-wined3d-Access-the-buffer-dirty-areas-through-the-CS.patch index 3387f57d..e3ed0a77 100644 --- a/patches/wined3d-CSMT_Main/0115-wined3d-Access-the-buffer-dirty-areas-through-the-CS.patch +++ b/patches/wined3d-CSMT_Main/0113-wined3d-Access-the-buffer-dirty-areas-through-the-CS.patch @@ -1,4 +1,4 @@ -From 9725eb43a6e513c68761a40b534f308c85e55086 Mon Sep 17 00:00:00 2001 +From 593ea392aa3b805c14e6a1a9cf3fb3e9e5b077d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Sat, 6 Jul 2013 17:05:12 +0200 Subject: wined3d: Access the buffer dirty areas through the CS @@ -52,7 +52,7 @@ index 7d1a532..9b6ccc8 100644 if (!(buffer->flags & WINED3D_BUFFER_DOUBLEBUFFER)) { diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c -index 491ad85..bc90df2 100644 +index cd234d3..5fe0092 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -70,6 +70,7 @@ enum wined3d_cs_op @@ -62,8 +62,8 @@ index 491ad85..bc90df2 100644 + WINED3D_CS_OP_BUFFER_INVALIDATE_RANGE, WINED3D_CS_OP_QUERY_ISSUE, WINED3D_CS_OP_QUERY_DESTROY, - WINED3D_CS_OP_UPDATE_SURFACE, -@@ -392,6 +393,13 @@ struct wined3d_cs_buffer_swap_mem + WINED3D_CS_OP_TEXTURE_PRELOAD, +@@ -390,6 +391,13 @@ struct wined3d_cs_buffer_swap_mem BYTE *mem; }; @@ -77,7 +77,7 @@ index 491ad85..bc90df2 100644 struct wined3d_cs_skip { enum wined3d_cs_op opcode; -@@ -2273,6 +2281,28 @@ void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffe +@@ -2176,6 +2184,28 @@ void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffe cs->ops->submit(cs, sizeof(*op)); } @@ -106,19 +106,19 @@ index 491ad85..bc90df2 100644 static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) = { /* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop, -@@ -2321,6 +2351,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void +@@ -2224,6 +2254,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void /* WINED3D_CS_OP_RESOURCE_MAP */ wined3d_cs_exec_resource_map, /* WINED3D_CS_OP_RESOURCE_UNMAP */ wined3d_cs_exec_resource_unmap, /* WINED3D_CS_OP_BUFFER_SWAP_MEM */ wined3d_cs_exec_buffer_swap_mem, + /* WINED3D_CS_OP_BUFFER_INVALIDATE_RANGE */ wined3d_cs_exec_buffer_invalidate_bo_range, /* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue, /* 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, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index e30ae80..7d0eba9 100644 +index b0390e3..4335a6a 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -2813,6 +2813,8 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur +@@ -2904,6 +2904,8 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur void wined3d_cs_emit_evict_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN; void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffer *buffer, BYTE *mem) DECLSPEC_HIDDEN; @@ -127,7 +127,7 @@ index e30ae80..7d0eba9 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 -@@ -2898,6 +2900,7 @@ void buffer_get_memory(struct wined3d_buffer *buffer, struct wined3d_context *co +@@ -2989,6 +2991,7 @@ void buffer_get_memory(struct wined3d_buffer *buffer, struct wined3d_context *co BYTE *buffer_get_sysmem(struct wined3d_buffer *This, struct wined3d_context *context) DECLSPEC_HIDDEN; void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_context *context, const struct wined3d_state *state) DECLSPEC_HIDDEN; @@ -136,5 +136,5 @@ index e30ae80..7d0eba9 100644 const struct wined3d_box *box, const void *data) DECLSPEC_HIDDEN; -- -2.6.4 +2.7.0 diff --git a/patches/wined3d-CSMT_Main/0116-wined3d-Ignore-buffer-resource.map_count-in-the-CS.patch b/patches/wined3d-CSMT_Main/0114-wined3d-Ignore-buffer-resource.map_count-in-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0116-wined3d-Ignore-buffer-resource.map_count-in-the-CS.patch rename to patches/wined3d-CSMT_Main/0114-wined3d-Ignore-buffer-resource.map_count-in-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0117-wined3d-Send-buffer-preloads-through-the-CS.patch b/patches/wined3d-CSMT_Main/0115-wined3d-Send-buffer-preloads-through-the-CS.patch similarity index 88% rename from patches/wined3d-CSMT_Main/0117-wined3d-Send-buffer-preloads-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0115-wined3d-Send-buffer-preloads-through-the-CS.patch index 0af85030..ff7ae715 100644 --- a/patches/wined3d-CSMT_Main/0117-wined3d-Send-buffer-preloads-through-the-CS.patch +++ b/patches/wined3d-CSMT_Main/0115-wined3d-Send-buffer-preloads-through-the-CS.patch @@ -1,4 +1,4 @@ -From f0608f8a5916eea7e342db36ffe49427e40a4b49 Mon Sep 17 00:00:00 2001 +From 7960fa371da4a860c23d9655f97df46e1b95b51c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Sun, 7 Jul 2013 12:02:59 +0200 Subject: wined3d: Send buffer preloads through the CS @@ -13,7 +13,7 @@ the dirty area list, have to be considered. 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c -index 3ac45c6..a09ca90 100644 +index 0544c93..f2a19b7 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -926,7 +926,6 @@ void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_conte @@ -43,18 +43,18 @@ index 3ac45c6..a09ca90 100644 struct wined3d_resource * CDECL wined3d_buffer_get_resource(struct wined3d_buffer *buffer) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c -index 179f2e6..6b16d51 100644 +index 5fe0092..025cc57 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c -@@ -70,6 +70,7 @@ enum wined3d_cs_op +@@ -71,6 +71,7 @@ enum wined3d_cs_op WINED3D_CS_OP_RESOURCE_UNMAP, WINED3D_CS_OP_BUFFER_SWAP_MEM, WINED3D_CS_OP_BUFFER_INVALIDATE_RANGE, + WINED3D_CS_OP_BUFFER_PRELOAD, WINED3D_CS_OP_QUERY_ISSUE, WINED3D_CS_OP_QUERY_DESTROY, - WINED3D_CS_OP_UPDATE_SURFACE, -@@ -442,6 +443,12 @@ struct wined3d_cs_evict_resource + WINED3D_CS_OP_TEXTURE_PRELOAD, +@@ -435,6 +436,12 @@ struct wined3d_cs_evict_resource struct wined3d_resource *resource; }; @@ -67,7 +67,7 @@ index 179f2e6..6b16d51 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); -@@ -2189,6 +2196,29 @@ void wined3d_cs_emit_buffer_invalidate_bo_range(struct wined3d_cs *cs, +@@ -2206,6 +2213,29 @@ void wined3d_cs_emit_buffer_invalidate_bo_range(struct wined3d_cs *cs, cs->ops->submit(cs, sizeof(*op)); } @@ -97,19 +97,19 @@ index 179f2e6..6b16d51 100644 static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) = { /* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop, -@@ -2237,6 +2267,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void +@@ -2255,6 +2285,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void /* WINED3D_CS_OP_RESOURCE_UNMAP */ wined3d_cs_exec_resource_unmap, /* WINED3D_CS_OP_BUFFER_SWAP_MEM */ wined3d_cs_exec_buffer_swap_mem, /* WINED3D_CS_OP_BUFFER_INVALIDATE_RANGE */ wined3d_cs_exec_buffer_invalidate_bo_range, + /* WINED3D_CS_OP_BUFFER_PRELOAD */ wined3d_cs_exec_buffer_preload, /* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue, /* 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, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index c683880..4070e1d 100644 +index 4335a6a..8ba6e30 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -2698,6 +2698,7 @@ void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffe +@@ -2906,6 +2906,7 @@ void wined3d_cs_emit_buffer_swap_mem(struct wined3d_cs *cs, struct wined3d_buffe BYTE *mem) DECLSPEC_HIDDEN; void wined3d_cs_emit_buffer_invalidate_bo_range(struct wined3d_cs *cs, struct wined3d_buffer *buffer, UINT offset, UINT size) DECLSPEC_HIDDEN; @@ -118,5 +118,5 @@ index c683880..4070e1d 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 diff --git a/patches/wined3d-CSMT_Main/0118-wined3d-Use-glBufferSubData-instead-of-glMapBufferRa.patch b/patches/wined3d-CSMT_Main/0116-wined3d-Use-glBufferSubData-instead-of-glMapBufferRa.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0118-wined3d-Use-glBufferSubData-instead-of-glMapBufferRa.patch rename to patches/wined3d-CSMT_Main/0116-wined3d-Use-glBufferSubData-instead-of-glMapBufferRa.patch diff --git a/patches/wined3d-CSMT_Main/0119-wined3d-Separate-GL-buffer-discard-control-from-igno.patch b/patches/wined3d-CSMT_Main/0117-wined3d-Separate-GL-buffer-discard-control-from-igno.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0119-wined3d-Separate-GL-buffer-discard-control-from-igno.patch rename to patches/wined3d-CSMT_Main/0117-wined3d-Separate-GL-buffer-discard-control-from-igno.patch diff --git a/patches/wined3d-CSMT_Main/0120-wined3d-Create-buffers-before-mapping-them.patch b/patches/wined3d-CSMT_Main/0118-wined3d-Create-buffers-before-mapping-them.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0120-wined3d-Create-buffers-before-mapping-them.patch rename to patches/wined3d-CSMT_Main/0118-wined3d-Create-buffers-before-mapping-them.patch diff --git a/patches/wined3d-CSMT_Main/0121-wined3d-Destroy-views-through-the-CS.patch b/patches/wined3d-CSMT_Main/0119-wined3d-Destroy-views-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0121-wined3d-Destroy-views-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0119-wined3d-Destroy-views-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0122-wined3d-Remove-another-glFinish.patch b/patches/wined3d-CSMT_Main/0120-wined3d-Remove-another-glFinish.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0122-wined3d-Remove-another-glFinish.patch rename to patches/wined3d-CSMT_Main/0120-wined3d-Remove-another-glFinish.patch diff --git a/patches/wined3d-CSMT_Main/0123-wined3d-Destroy-vertex-declarations-through-the-CS.patch b/patches/wined3d-CSMT_Main/0121-wined3d-Destroy-vertex-declarations-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0123-wined3d-Destroy-vertex-declarations-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0121-wined3d-Destroy-vertex-declarations-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0124-wined3d-Destroy-shaders-through-the-CS.patch b/patches/wined3d-CSMT_Main/0122-wined3d-Destroy-shaders-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0124-wined3d-Destroy-shaders-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0122-wined3d-Destroy-shaders-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0125-wined3d-Create-VBOs-through-the-command-stream.patch b/patches/wined3d-CSMT_Main/0123-wined3d-Create-VBOs-through-the-command-stream.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0125-wined3d-Create-VBOs-through-the-command-stream.patch rename to patches/wined3d-CSMT_Main/0123-wined3d-Create-VBOs-through-the-command-stream.patch diff --git a/patches/wined3d-CSMT_Main/0126-wined3d-Clean-up-resource-data-through-the-CS.patch b/patches/wined3d-CSMT_Main/0124-wined3d-Clean-up-resource-data-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0126-wined3d-Clean-up-resource-data-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0124-wined3d-Clean-up-resource-data-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0127-wined3d-Clean-up-buffer-resource-data-through-the-CS.patch b/patches/wined3d-CSMT_Main/0125-wined3d-Clean-up-buffer-resource-data-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0127-wined3d-Clean-up-buffer-resource-data-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0125-wined3d-Clean-up-buffer-resource-data-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0128-wined3d-Clean-up-volume-resource-data-through-the-CS.patch b/patches/wined3d-CSMT_Main/0126-wined3d-Clean-up-volume-resource-data-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0128-wined3d-Clean-up-volume-resource-data-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0126-wined3d-Clean-up-volume-resource-data-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0129-wined3d-Clean-up-surfaces-through-the-cs.patch b/patches/wined3d-CSMT_Main/0127-wined3d-Clean-up-surfaces-through-the-cs.patch similarity index 89% rename from patches/wined3d-CSMT_Main/0129-wined3d-Clean-up-surfaces-through-the-cs.patch rename to patches/wined3d-CSMT_Main/0127-wined3d-Clean-up-surfaces-through-the-cs.patch index b968ecf1..69848ca6 100644 --- a/patches/wined3d-CSMT_Main/0129-wined3d-Clean-up-surfaces-through-the-cs.patch +++ b/patches/wined3d-CSMT_Main/0127-wined3d-Clean-up-surfaces-through-the-cs.patch @@ -1,4 +1,4 @@ -From 0fd12af6067cbe8aa8800098a602d808978d14ac Mon Sep 17 00:00:00 2001 +From a03c917180369e66fc6dc41948d3786753d7c33f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Sun, 6 Oct 2013 16:12:24 +0200 Subject: wined3d: Clean up surfaces through the cs. @@ -10,10 +10,10 @@ Subject: wined3d: Clean up surfaces through the cs. 3 files changed, 46 insertions(+), 21 deletions(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c -index 18b556d..91b76f5 100644 +index 18ff64a..c723b54 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c -@@ -86,6 +86,7 @@ enum wined3d_cs_op +@@ -84,6 +84,7 @@ enum wined3d_cs_op WINED3D_CS_OP_RESOURCE_CLEANUP, WINED3D_CS_OP_BUFFER_CLEANUP, WINED3D_CS_OP_VOLUME_CLEANUP, @@ -21,7 +21,7 @@ index 18b556d..91b76f5 100644 WINED3D_CS_OP_STOP, }; -@@ -508,6 +509,12 @@ struct wined3d_cs_volume_cleanup +@@ -491,6 +492,12 @@ struct wined3d_cs_volume_cleanup struct wined3d_volume *volume; }; @@ -34,7 +34,7 @@ index 18b556d..91b76f5 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); -@@ -2533,6 +2540,26 @@ void wined3d_cs_emit_volume_cleanup(struct wined3d_cs *cs, struct wined3d_volume +@@ -2436,6 +2443,26 @@ void wined3d_cs_emit_volume_cleanup(struct wined3d_cs *cs, struct wined3d_volume cs->ops->submit(cs, sizeof(*op)); } @@ -61,7 +61,7 @@ index 18b556d..91b76f5 100644 static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) = { /* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop, -@@ -2597,6 +2624,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void +@@ -2498,6 +2525,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void /* WINED3D_CS_OP_RESOURCE_CLEANUP */ wined3d_cs_exec_resource_cleanup, /* WINED3D_CS_OP_BUFFER_CLEANUP */ wined3d_cs_exec_buffer_cleanup, /* WINED3D_CS_OP_VOLUME_CLEANUP */ wined3d_cs_exec_volume_cleanup, @@ -70,7 +70,7 @@ index 18b556d..91b76f5 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 c607072..e0164f1 100644 +index ddbaef8..24a39bb 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -36,20 +36,10 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d); @@ -80,7 +80,7 @@ index c607072..e0164f1 100644 -static void surface_cleanup(struct wined3d_surface *surface) -{ - struct wined3d_surface *overlay, *cur; -- + - TRACE("surface %p.\n", surface); - - if (wined3d_settings.cs_multithreaded) @@ -88,7 +88,7 @@ index c607072..e0164f1 100644 - FIXME("Waiting for cs.\n"); - surface->resource.device->cs->ops->finish(surface->resource.device->cs); - } - +- - if (surface->resource.buffer || surface->rb_multisample - || surface->rb_resolved || !list_empty(&surface->renderbuffers)) +void wined3d_surface_cleanup_cs(struct wined3d_surface *surface) @@ -135,7 +135,7 @@ index c607072..e0164f1 100644 } void surface_get_drawable_size(const struct wined3d_surface *surface, const struct wined3d_context *context, -@@ -5360,8 +5357,6 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text +@@ -5108,8 +5105,6 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text { ERR("Private setup failed, hr %#x.\n", hr); surface_cleanup(surface); @@ -144,7 +144,7 @@ index c607072..e0164f1 100644 return hr; } -@@ -5404,7 +5399,7 @@ HRESULT wined3d_surface_create(struct wined3d_texture *container, const struct w +@@ -5152,7 +5147,7 @@ HRESULT wined3d_surface_create(struct wined3d_texture *container, const struct w if (FAILED(hr = surface_init(object, container, desc, target, level, layer, flags))) { WARN("Failed to initialize surface, returning %#x.\n", hr); @@ -154,18 +154,18 @@ index c607072..e0164f1 100644 } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 96102af..cbc3fa9 100644 +index 0203bfe..522d393 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -2537,6 +2537,7 @@ void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect_ +@@ -2661,6 +2661,7 @@ void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct w + void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect_in, struct wined3d_surface *src_surface, const RECT *src_rect_in, DWORD flags, const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN; - BOOL surface_check_block_align_rect(struct wined3d_surface *surface, const RECT *rect) DECLSPEC_HIDDEN; +void wined3d_surface_cleanup_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN; void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context, const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN; -@@ -2800,6 +2801,7 @@ void wined3d_cs_emit_resource_cleanup(struct wined3d_cs *cs, +@@ -2919,6 +2920,7 @@ void wined3d_cs_emit_resource_cleanup(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN; void wined3d_cs_emit_buffer_cleanup(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN; void wined3d_cs_emit_volume_cleanup(struct wined3d_cs *cs, struct wined3d_volume *volume) DECLSPEC_HIDDEN; @@ -174,5 +174,5 @@ index 96102af..cbc3fa9 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.6.0 +2.7.0 diff --git a/patches/wined3d-CSMT_Main/0130-wined3d-Clean-up-texture-resources-through-the-cs.patch b/patches/wined3d-CSMT_Main/0128-wined3d-Clean-up-texture-resources-through-the-cs.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0130-wined3d-Clean-up-texture-resources-through-the-cs.patch rename to patches/wined3d-CSMT_Main/0128-wined3d-Clean-up-texture-resources-through-the-cs.patch diff --git a/patches/wined3d-CSMT_Main/0131-wined3d-Unload-resources-through-the-CS-in-uninit_3d.patch b/patches/wined3d-CSMT_Main/0129-wined3d-Unload-resources-through-the-CS-in-uninit_3d.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0131-wined3d-Unload-resources-through-the-CS-in-uninit_3d.patch rename to patches/wined3d-CSMT_Main/0129-wined3d-Unload-resources-through-the-CS-in-uninit_3d.patch diff --git a/patches/wined3d-CSMT_Main/0132-wined3d-Unload-resources-through-the-CS-in-device_re.patch b/patches/wined3d-CSMT_Main/0130-wined3d-Unload-resources-through-the-CS-in-device_re.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0132-wined3d-Unload-resources-through-the-CS-in-device_re.patch rename to patches/wined3d-CSMT_Main/0130-wined3d-Unload-resources-through-the-CS-in-device_re.patch diff --git a/patches/wined3d-CSMT_Main/0133-wined3d-Don-t-glFinish-after-a-depth-buffer-blit.patch b/patches/wined3d-CSMT_Main/0131-wined3d-Don-t-glFinish-after-a-depth-buffer-blit.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0133-wined3d-Don-t-glFinish-after-a-depth-buffer-blit.patch rename to patches/wined3d-CSMT_Main/0131-wined3d-Don-t-glFinish-after-a-depth-buffer-blit.patch diff --git a/patches/wined3d-CSMT_Main/0134-wined3d-Remove-software-cursor-support.patch b/patches/wined3d-CSMT_Main/0132-wined3d-Remove-software-cursor-support.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0134-wined3d-Remove-software-cursor-support.patch rename to patches/wined3d-CSMT_Main/0132-wined3d-Remove-software-cursor-support.patch diff --git a/patches/wined3d-CSMT_Main/0135-wined3d-Create-dummy-textures-through-the-CS.patch b/patches/wined3d-CSMT_Main/0133-wined3d-Create-dummy-textures-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0135-wined3d-Create-dummy-textures-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0133-wined3d-Create-dummy-textures-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0136-wined3d-Create-the-initial-context-through-the-CS.patch b/patches/wined3d-CSMT_Main/0134-wined3d-Create-the-initial-context-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0136-wined3d-Create-the-initial-context-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0134-wined3d-Create-the-initial-context-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0137-wined3d-Recreate-ctx-and-dummy-textures-through-the-.patch b/patches/wined3d-CSMT_Main/0135-wined3d-Recreate-ctx-and-dummy-textures-through-the-.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0137-wined3d-Recreate-ctx-and-dummy-textures-through-the-.patch rename to patches/wined3d-CSMT_Main/0135-wined3d-Recreate-ctx-and-dummy-textures-through-the-.patch diff --git a/patches/wined3d-CSMT_Main/0138-wined3d-Ignore-WINED3D_MAP_NO_DIRTY_UPDATE-in-resour.patch b/patches/wined3d-CSMT_Main/0136-wined3d-Ignore-WINED3D_MAP_NO_DIRTY_UPDATE-in-resour.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0138-wined3d-Ignore-WINED3D_MAP_NO_DIRTY_UPDATE-in-resour.patch rename to patches/wined3d-CSMT_Main/0136-wined3d-Ignore-WINED3D_MAP_NO_DIRTY_UPDATE-in-resour.patch diff --git a/patches/wined3d-CSMT_Main/0139-wined3d-Delete-GL-contexts-through-the-CS-in-reset.patch b/patches/wined3d-CSMT_Main/0137-wined3d-Delete-GL-contexts-through-the-CS-in-reset.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0139-wined3d-Delete-GL-contexts-through-the-CS-in-reset.patch rename to patches/wined3d-CSMT_Main/0137-wined3d-Delete-GL-contexts-through-the-CS-in-reset.patch diff --git a/patches/wined3d-CSMT_Main/0140-wined3d-Delete-GL-contexts-through-the-CS-in-uninit_.patch b/patches/wined3d-CSMT_Main/0138-wined3d-Delete-GL-contexts-through-the-CS-in-uninit_.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0140-wined3d-Delete-GL-contexts-through-the-CS-in-uninit_.patch rename to patches/wined3d-CSMT_Main/0138-wined3d-Delete-GL-contexts-through-the-CS-in-uninit_.patch diff --git a/patches/wined3d-CSMT_Main/0141-wined3d-Invoke-surface_unload-through-the-CS-in-wine.patch b/patches/wined3d-CSMT_Main/0139-wined3d-Invoke-surface_unload-through-the-CS-in-wine.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0141-wined3d-Invoke-surface_unload-through-the-CS-in-wine.patch rename to patches/wined3d-CSMT_Main/0139-wined3d-Invoke-surface_unload-through-the-CS-in-wine.patch diff --git a/patches/wined3d-CSMT_Main/0142-wined3d-Use-an-event-to-block-the-worker-thread-when.patch b/patches/wined3d-CSMT_Main/0140-wined3d-Use-an-event-to-block-the-worker-thread-when.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0142-wined3d-Use-an-event-to-block-the-worker-thread-when.patch rename to patches/wined3d-CSMT_Main/0140-wined3d-Use-an-event-to-block-the-worker-thread-when.patch diff --git a/patches/wined3d-CSMT_Main/0143-wined3d-Fence-preload-operations.patch b/patches/wined3d-CSMT_Main/0141-wined3d-Fence-preload-operations.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0143-wined3d-Fence-preload-operations.patch rename to patches/wined3d-CSMT_Main/0141-wined3d-Fence-preload-operations.patch diff --git a/patches/wined3d-CSMT_Main/0144-d3d8-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch b/patches/wined3d-CSMT_Main/0142-d3d8-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0144-d3d8-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch rename to patches/wined3d-CSMT_Main/0142-d3d8-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch diff --git a/patches/wined3d-CSMT_Main/0145-d3d9-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch b/patches/wined3d-CSMT_Main/0143-d3d9-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0145-d3d9-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch rename to patches/wined3d-CSMT_Main/0143-d3d9-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch diff --git a/patches/wined3d-CSMT_Main/0146-wined3d-Completely-reset-the-state-on-reset.patch b/patches/wined3d-CSMT_Main/0144-wined3d-Completely-reset-the-state-on-reset.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0146-wined3d-Completely-reset-the-state-on-reset.patch rename to patches/wined3d-CSMT_Main/0144-wined3d-Completely-reset-the-state-on-reset.patch diff --git a/patches/wined3d-CSMT_Main/0147-wined3d-Send-getdc-and-releasedc-through-the-command.patch b/patches/wined3d-CSMT_Main/0145-wined3d-Send-getdc-and-releasedc-through-the-command.patch similarity index 91% rename from patches/wined3d-CSMT_Main/0147-wined3d-Send-getdc-and-releasedc-through-the-command.patch rename to patches/wined3d-CSMT_Main/0145-wined3d-Send-getdc-and-releasedc-through-the-command.patch index e64a64d3..2117c744 100644 --- a/patches/wined3d-CSMT_Main/0147-wined3d-Send-getdc-and-releasedc-through-the-command.patch +++ b/patches/wined3d-CSMT_Main/0145-wined3d-Send-getdc-and-releasedc-through-the-command.patch @@ -1,4 +1,4 @@ -From f51b464c3100bfdea3de7e6dde646f97e09fccb6 Mon Sep 17 00:00:00 2001 +From c58d7ad7ff9aa243f52380343bce58a0ed069bfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Sun, 16 Mar 2014 14:13:42 +0100 Subject: wined3d: Send getdc and releasedc through the command stream. @@ -15,10 +15,10 @@ investigate atm. 4 files changed, 121 insertions(+), 57 deletions(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c -index 0aab83b..c135ece 100644 +index 1be16ad..8bf006d 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c -@@ -90,6 +90,8 @@ enum wined3d_cs_op +@@ -89,6 +89,8 @@ enum wined3d_cs_op WINED3D_CS_OP_CREATE_DUMMY_TEXTURES, WINED3D_CS_OP_CREATE_SWAPCHAIN_CONTEXT, WINED3D_CS_OP_DELETE_GL_CONTEXTS, @@ -27,7 +27,7 @@ index 0aab83b..c135ece 100644 WINED3D_CS_OP_STOP, }; -@@ -536,6 +538,18 @@ struct wined3d_cs_delete_gl_contexts +@@ -526,6 +528,18 @@ struct wined3d_cs_delete_gl_contexts struct wined3d_swapchain *swapchain; }; @@ -46,7 +46,7 @@ index 0aab83b..c135ece 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); -@@ -2661,6 +2675,48 @@ void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs, struct wined3 +@@ -2594,6 +2608,48 @@ void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs, struct wined3 cs->ops->finish(cs); } @@ -95,7 +95,7 @@ index 0aab83b..c135ece 100644 static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) = { /* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop, -@@ -2729,6 +2785,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void +@@ -2661,6 +2717,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void /* WINED3D_CS_OP_CREATE_DUMMY_TEXTURES */ wined3d_cs_exec_create_dummy_textures, /* WINED3D_CS_OP_CREATE_SWAPCHAIN_CONTEXT */ wined3d_cs_exec_create_swapchain_context, /* WINED3D_CS_OP_DELETE_GL_CONTEXTS */ wined3d_cs_exec_delete_gl_contexts, @@ -105,10 +105,10 @@ index 0aab83b..c135ece 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 822f36f..d70e310 100644 +index ef85801..6b0014c 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c -@@ -2456,6 +2456,62 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface, +@@ -2356,6 +2356,62 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_ return wined3d_resource_map(&surface->resource, map_desc, box, flags); } @@ -172,10 +172,10 @@ index 822f36f..d70e310 100644 struct wined3d_context *old_ctx, DWORD dst_location) { diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c -index d17a6e1..a9dbf42 100644 +index ba58453..4cf1c5d 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c -@@ -1561,10 +1561,8 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct +@@ -1589,10 +1589,8 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC *dc) { struct wined3d_device *device = texture->resource.device; @@ -186,7 +186,7 @@ index d17a6e1..a9dbf42 100644 TRACE("texture %p, sub_resource_idx %u, dc %p.\n", texture, sub_resource_idx, dc); -@@ -1585,14 +1583,6 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i +@@ -1613,14 +1611,6 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i return WINED3DERR_INVALIDCALL; } @@ -201,7 +201,7 @@ index d17a6e1..a9dbf42 100644 /* Give more detailed info for ddraw. */ if (surface->flags & SFLAG_DCINUSE) return WINEDDERR_DCALREADYCREATED; -@@ -1601,43 +1591,18 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i +@@ -1629,43 +1619,18 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i if (surface->resource.map_count) return WINED3DERR_INVALIDCALL; @@ -247,7 +247,7 @@ index d17a6e1..a9dbf42 100644 struct wined3d_resource *sub_resource; struct wined3d_surface *surface; -@@ -1667,26 +1632,7 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign +@@ -1695,26 +1660,7 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign surface->resource.map_count--; surface->flags &= ~SFLAG_DCINUSE; @@ -276,19 +276,19 @@ index d17a6e1..a9dbf42 100644 return WINED3D_OK; } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 5bb6a21..0e0e3fe 100644 +index 2481ad6..fa72a01 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -2623,6 +2623,8 @@ void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect_ +@@ -2665,6 +2665,8 @@ void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect_ + struct wined3d_surface *src_surface, const RECT *src_rect_in, DWORD flags, const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN; - BOOL surface_check_block_align_rect(struct wined3d_surface *surface, const RECT *rect) DECLSPEC_HIDDEN; void wined3d_surface_cleanup_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN; +void wined3d_surface_getdc_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN; +void wined3d_surface_releasedc_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN; void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context, const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN; -@@ -2895,6 +2897,8 @@ HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs, +@@ -2935,6 +2937,8 @@ HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; diff --git a/patches/wined3d-CSMT_Main/0148-wined3d-Set-map_heap_memory-NULL-when-allocating-a-P.patch b/patches/wined3d-CSMT_Main/0146-wined3d-Set-map_heap_memory-NULL-when-allocating-a-P.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0148-wined3d-Set-map_heap_memory-NULL-when-allocating-a-P.patch rename to patches/wined3d-CSMT_Main/0146-wined3d-Set-map_heap_memory-NULL-when-allocating-a-P.patch diff --git a/patches/wined3d-CSMT_Main/0149-wined3d-Wait-only-for-the-buffer-to-be-idle.patch b/patches/wined3d-CSMT_Main/0147-wined3d-Wait-only-for-the-buffer-to-be-idle.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0149-wined3d-Wait-only-for-the-buffer-to-be-idle.patch rename to patches/wined3d-CSMT_Main/0147-wined3d-Wait-only-for-the-buffer-to-be-idle.patch diff --git a/patches/wined3d-CSMT_Main/0150-wined3d-Add-a-comment-about-worker-thread-lag.patch b/patches/wined3d-CSMT_Main/0148-wined3d-Add-a-comment-about-worker-thread-lag.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0150-wined3d-Add-a-comment-about-worker-thread-lag.patch rename to patches/wined3d-CSMT_Main/0148-wined3d-Add-a-comment-about-worker-thread-lag.patch diff --git a/patches/wined3d-CSMT_Main/0151-wined3d-Remove-the-texture-destroy-glFinish.patch b/patches/wined3d-CSMT_Main/0149-wined3d-Remove-the-texture-destroy-glFinish.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0151-wined3d-Remove-the-texture-destroy-glFinish.patch rename to patches/wined3d-CSMT_Main/0149-wined3d-Remove-the-texture-destroy-glFinish.patch diff --git a/patches/wined3d-CSMT_Main/0152-wined3d-Move-FBO-destruction-into-the-worker-thread.patch b/patches/wined3d-CSMT_Main/0150-wined3d-Move-FBO-destruction-into-the-worker-thread.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0152-wined3d-Move-FBO-destruction-into-the-worker-thread.patch rename to patches/wined3d-CSMT_Main/0150-wined3d-Move-FBO-destruction-into-the-worker-thread.patch diff --git a/patches/wined3d-CSMT_Main/0153-wined3d-Don-t-incref-decref-textures-in-color-depth-.patch b/patches/wined3d-CSMT_Main/0151-wined3d-Don-t-incref-decref-textures-in-color-depth-.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0153-wined3d-Don-t-incref-decref-textures-in-color-depth-.patch rename to patches/wined3d-CSMT_Main/0151-wined3d-Don-t-incref-decref-textures-in-color-depth-.patch diff --git a/patches/wined3d-CSMT_Main/0154-Winex11-complain-about-glfinish.patch b/patches/wined3d-CSMT_Main/0152-Winex11-complain-about-glfinish.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0154-Winex11-complain-about-glfinish.patch rename to patches/wined3d-CSMT_Main/0152-Winex11-complain-about-glfinish.patch diff --git a/patches/wined3d-CSMT_Main/0155-wined3d-Make-sure-the-new-window-is-set-up-before-se.patch b/patches/wined3d-CSMT_Main/0153-wined3d-Make-sure-the-new-window-is-set-up-before-se.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0155-wined3d-Make-sure-the-new-window-is-set-up-before-se.patch rename to patches/wined3d-CSMT_Main/0153-wined3d-Make-sure-the-new-window-is-set-up-before-se.patch diff --git a/patches/wined3d-CSMT_Main/0156-wined3d-Remove-the-device_reset-CS-sync-fixme.patch b/patches/wined3d-CSMT_Main/0154-wined3d-Remove-the-device_reset-CS-sync-fixme.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0156-wined3d-Remove-the-device_reset-CS-sync-fixme.patch rename to patches/wined3d-CSMT_Main/0154-wined3d-Remove-the-device_reset-CS-sync-fixme.patch diff --git a/patches/wined3d-CSMT_Main/0157-wined3d-Put-GL_APPLE_flush_buffer_range-syncing-back.patch b/patches/wined3d-CSMT_Main/0155-wined3d-Put-GL_APPLE_flush_buffer_range-syncing-back.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0157-wined3d-Put-GL_APPLE_flush_buffer_range-syncing-back.patch rename to patches/wined3d-CSMT_Main/0155-wined3d-Put-GL_APPLE_flush_buffer_range-syncing-back.patch diff --git a/patches/wined3d-CSMT_Main/0158-wined3d-Wait-for-the-resource-to-be-idle-when-destro.patch b/patches/wined3d-CSMT_Main/0156-wined3d-Wait-for-the-resource-to-be-idle-when-destro.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0158-wined3d-Wait-for-the-resource-to-be-idle-when-destro.patch rename to patches/wined3d-CSMT_Main/0156-wined3d-Wait-for-the-resource-to-be-idle-when-destro.patch diff --git a/patches/wined3d-CSMT_Main/0159-wined3d-Don-t-sync-on-redundant-discard-calls.patch b/patches/wined3d-CSMT_Main/0157-wined3d-Don-t-sync-on-redundant-discard-calls.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0159-wined3d-Don-t-sync-on-redundant-discard-calls.patch rename to patches/wined3d-CSMT_Main/0157-wined3d-Don-t-sync-on-redundant-discard-calls.patch diff --git a/patches/wined3d-CSMT_Main/0160-wined3d-Don-t-discard-new-buffers.patch b/patches/wined3d-CSMT_Main/0158-wined3d-Don-t-discard-new-buffers.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0160-wined3d-Don-t-discard-new-buffers.patch rename to patches/wined3d-CSMT_Main/0158-wined3d-Don-t-discard-new-buffers.patch diff --git a/patches/wined3d-CSMT_Main/0161-wined3d-Don-t-try-to-sync-VBOs-manually-on-OSX-with-.patch b/patches/wined3d-CSMT_Main/0159-wined3d-Don-t-try-to-sync-VBOs-manually-on-OSX-with-.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0161-wined3d-Don-t-try-to-sync-VBOs-manually-on-OSX-with-.patch rename to patches/wined3d-CSMT_Main/0159-wined3d-Don-t-try-to-sync-VBOs-manually-on-OSX-with-.patch diff --git a/patches/wined3d-CSMT_Main/0162-wined3d-Render-target-lock-hack.patch b/patches/wined3d-CSMT_Main/0160-wined3d-Render-target-lock-hack.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0162-wined3d-Render-target-lock-hack.patch rename to patches/wined3d-CSMT_Main/0160-wined3d-Render-target-lock-hack.patch diff --git a/patches/wined3d-CSMT_Main/0163-wined3d-Avoid-calling-wined3d_surface_blt-from-surfa.patch b/patches/wined3d-CSMT_Main/0161-wined3d-Avoid-calling-wined3d_surface_blt-from-surfa.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0163-wined3d-Avoid-calling-wined3d_surface_blt-from-surfa.patch rename to patches/wined3d-CSMT_Main/0161-wined3d-Avoid-calling-wined3d_surface_blt-from-surfa.patch diff --git a/patches/wined3d-CSMT_Main/0164-wined3d-Only-discard-buffers-that-are-in-use.patch b/patches/wined3d-CSMT_Main/0162-wined3d-Only-discard-buffers-that-are-in-use.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0164-wined3d-Only-discard-buffers-that-are-in-use.patch rename to patches/wined3d-CSMT_Main/0162-wined3d-Only-discard-buffers-that-are-in-use.patch diff --git a/patches/wined3d-CSMT_Main/0165-wined3d-Destroy-samplers-through-the-command-stream.patch b/patches/wined3d-CSMT_Main/0163-wined3d-Destroy-samplers-through-the-command-stream.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0165-wined3d-Destroy-samplers-through-the-command-stream.patch rename to patches/wined3d-CSMT_Main/0163-wined3d-Destroy-samplers-through-the-command-stream.patch diff --git a/patches/wined3d-CSMT_Main/0166-wined3d-Hack-to-reject-unsupported-color-fills.patch b/patches/wined3d-CSMT_Main/0164-wined3d-Hack-to-reject-unsupported-color-fills.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0166-wined3d-Hack-to-reject-unsupported-color-fills.patch rename to patches/wined3d-CSMT_Main/0164-wined3d-Hack-to-reject-unsupported-color-fills.patch diff --git a/patches/wined3d-CSMT_Main/0167-wined3d-Alloc-the-buffer-map-array-before-mapping-th.patch b/patches/wined3d-CSMT_Main/0165-wined3d-Alloc-the-buffer-map-array-before-mapping-th.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0167-wined3d-Alloc-the-buffer-map-array-before-mapping-th.patch rename to patches/wined3d-CSMT_Main/0165-wined3d-Alloc-the-buffer-map-array-before-mapping-th.patch diff --git a/patches/wined3d-CSMT_Main/0168-wined3d-Send-update_sub_resource-calls-through-the-c.patch b/patches/wined3d-CSMT_Main/0166-wined3d-Send-update_sub_resource-calls-through-the-c.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0168-wined3d-Send-update_sub_resource-calls-through-the-c.patch rename to patches/wined3d-CSMT_Main/0166-wined3d-Send-update_sub_resource-calls-through-the-c.patch diff --git a/patches/wined3d-CSMT_Main/9999-IfDefined.patch b/patches/wined3d-CSMT_Main/9999-IfDefined.patch index 9d1e50f9..a6b71794 100644 --- a/patches/wined3d-CSMT_Main/9999-IfDefined.patch +++ b/patches/wined3d-CSMT_Main/9999-IfDefined.patch @@ -919,7 +919,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c WINED3D_CS_OP_SET_VS_CONSTS_F, WINED3D_CS_OP_SET_VS_CONSTS_B, WINED3D_CS_OP_SET_VS_CONSTS_I, -@@ -132,6 +140,30 @@ +@@ -131,6 +139,30 @@ float depth; DWORD stencil; RECT rects[1]; @@ -950,7 +950,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c }; struct wined3d_cs_draw -@@ -154,6 +186,7 @@ +@@ -153,6 +185,7 @@ struct wined3d_cs_set_viewport { enum wined3d_cs_op opcode; @@ -958,7 +958,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c struct wined3d_viewport viewport; }; -@@ -161,6 +194,15 @@ +@@ -160,6 +193,15 @@ { enum wined3d_cs_op opcode; RECT rect; @@ -974,7 +974,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c }; struct wined3d_cs_set_rendertarget_view -@@ -288,6 +330,7 @@ +@@ -287,6 +329,7 @@ { enum wined3d_cs_op opcode; enum wined3d_transform_state state; @@ -982,7 +982,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c struct wined3d_matrix matrix; }; -@@ -302,6 +345,22 @@ +@@ -301,6 +344,22 @@ { enum wined3d_cs_op opcode; struct wined3d_material material; @@ -1005,7 +1005,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c }; struct wined3d_cs_reset_state -@@ -309,6 +368,7 @@ +@@ -308,6 +367,7 @@ enum wined3d_cs_op opcode; }; @@ -1013,7 +1013,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c struct wined3d_cs_set_consts_f { enum wined3d_cs_op opcode; -@@ -2847,197 +2907,971 @@ +@@ -2780,190 +2840,964 @@ /* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop, /* WINED3D_CS_OP_SKIP */ wined3d_cs_exec_skip, /* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence, @@ -1064,7 +1064,6 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c - /* WINED3D_CS_OP_BUFFER_PRELOAD */ wined3d_cs_exec_buffer_preload, - /* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue, - /* 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_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture, - /* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource, @@ -1228,7 +1227,8 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c +static void wined3d_cs_exec_set_predication(struct wined3d_cs *cs, const void *data) { - BOOL fence; -- ++ const struct wined3d_cs_set_predication *op = data; + - if (cs->thread_id == GetCurrentThreadId()) - { - static BOOL once; @@ -1239,60 +1239,54 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c - } - return; - } -- ++ cs->state.predicate = op->predicate; ++ cs->state.predicate_value = op->value; ++} + - wined3d_cs_emit_fence(cs, &fence); -+ const struct wined3d_cs_set_predication *op = data; ++void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query *predicate, BOOL value) ++{ ++ struct wined3d_cs_set_predication *op; - /* A busy wait should be fine, we're not supposed to have to wait very - * long. */ - while (!InterlockedCompareExchange(&fence, TRUE, TRUE)); -+ cs->state.predicate = op->predicate; -+ cs->state.predicate_value = op->value; - } - --static void wined3d_cs_mt_finish_prio(struct wined3d_cs *cs) -+void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query *predicate, BOOL value) - { -- BOOL fence; -+ struct wined3d_cs_set_predication *op; - -- if (cs->thread_id == GetCurrentThreadId()) -- { -- static BOOL once; -- if (!once) -- { -- FIXME("flush_and_wait called from cs thread\n"); -- once = TRUE; -- } -- return; -- } + op = cs->ops->require_space(cs, sizeof(*op)); + op->opcode = WINED3D_CS_OP_SET_PREDICATION; + op->predicate = predicate; + op->value = value; ++ ++ cs->ops->submit(cs); + } + +-static void wined3d_cs_mt_finish_prio(struct wined3d_cs *cs) ++static void wined3d_cs_exec_set_viewport(struct wined3d_cs *cs, const void *data) + { +- BOOL fence; ++ const struct wined3d_cs_set_viewport *op = data; + +- if (cs->thread_id == GetCurrentThreadId()) +- { +- static BOOL once; +- if (!once) +- { +- FIXME("flush_and_wait called from cs thread\n"); +- once = TRUE; +- } +- return; +- } ++ cs->state.viewport = *op->viewport; ++ device_invalidate_state(cs->device, STATE_VIEWPORT); ++} - wined3d_cs_emit_fence_prio(cs, &fence); -+ cs->ops->submit(cs); -+} ++void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) ++{ ++ struct wined3d_cs_set_viewport *op; - /* A busy wait should be fine, we're not supposed to have to wait very - * long. */ - while (!InterlockedCompareExchange(&fence, TRUE, TRUE)); -+static void wined3d_cs_exec_set_viewport(struct wined3d_cs *cs, const void *data) -+{ -+ const struct wined3d_cs_set_viewport *op = data; -+ -+ cs->state.viewport = *op->viewport; -+ device_invalidate_state(cs->device, STATE_VIEWPORT); - } - --static const struct wined3d_cs_ops wined3d_cs_mt_ops = -+void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) - { -- wined3d_cs_mt_require_space, -- wined3d_cs_mt_require_space_prio, -+ struct wined3d_cs_set_viewport *op; -+ + op = cs->ops->require_space(cs, sizeof(*op)); + op->opcode = WINED3D_CS_OP_SET_VIEWPORT; + op->viewport = viewport; @@ -1997,7 +1991,6 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c + /* WINED3D_CS_OP_BUFFER_PRELOAD */ wined3d_cs_exec_buffer_preload, + /* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue, + /* 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_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture, + /* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource, @@ -2135,16 +2128,10 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c + /* A busy wait should be fine, we're not supposed to have to wait very + * long. */ + while (!InterlockedCompareExchange(&fence, TRUE, TRUE)); -+} -+ -+static const struct wined3d_cs_ops wined3d_cs_mt_ops = -+{ -+ wined3d_cs_mt_require_space, -+ wined3d_cs_mt_require_space_prio, - wined3d_cs_mt_submit, - wined3d_cs_mt_submit_prio, - wined3d_cs_mt_finish, -@@ -3259,5 +4093,80 @@ + } + + static const struct wined3d_cs_ops wined3d_cs_mt_ops = +@@ -3191,5 +4025,80 @@ ERR("Closing event failed.\n"); } @@ -3014,7 +3001,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c +#if defined(STAGING_CSMT) surface_upload_from_surface(dst_surface, NULL, src_surface, NULL); +#else /* STAGING_CSMT */ -+ if (FAILED(hr = wined3d_device_update_surface(device, src_surface, NULL, dst_surface, NULL))) ++ if (FAILED(hr = surface_upload_from_surface(dst_surface, NULL, src_surface, NULL))) + { + WARN("Failed to update surface, hr %#x.\n", hr); + return hr; @@ -3071,41 +3058,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (ds && rt && (ds->width < rt->width || ds->height < rt->height)) { -@@ -3778,6 +4206,7 @@ - struct wined3d_surface *src_surface, const RECT *src_rect, - struct wined3d_surface *dst_surface, const POINT *dst_point) - { -+#if defined(STAGING_CSMT) - const struct wined3d_format *src_format = src_surface->resource.format; - const struct wined3d_format *dst_format = dst_surface->resource.format; - UINT update_w, update_h; -@@ -3785,6 +4214,7 @@ - RECT r, dst_rect; - POINT p; - -+#endif /* STAGING_CSMT */ - TRACE("device %p, src_surface %p, src_rect %s, dst_surface %p, dst_point %s.\n", - device, src_surface, wine_dbgstr_rect(src_rect), - dst_surface, wine_dbgstr_point(dst_point)); -@@ -3796,6 +4226,7 @@ - return WINED3DERR_INVALIDCALL; - } - -+#if defined(STAGING_CSMT) - if (src_format->id != dst_format->id) - { - WARN("Source and destination surfaces should have the same format.\n"); -@@ -3860,6 +4291,9 @@ - wined3d_cs_emit_update_surface(device->cs, src_surface, src_rect, dst_surface, dst_point); - - return WINED3D_OK; -+#else /* STAGING_CSMT */ -+ return surface_upload_from_surface(dst_surface, dst_point, src_surface, src_rect); -+#endif /* STAGING_CSMT */ - } - - void CDECL wined3d_device_copy_resource(struct wined3d_device *device, -@@ -4034,7 +4468,17 @@ +@@ -3944,7 +4372,17 @@ unsigned int depth_pitch) { struct wined3d_resource *sub_resource; @@ -3123,7 +3076,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c 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); -@@ -4068,7 +4512,14 @@ +@@ -3978,7 +4416,14 @@ WARN("Invalid sub_resource_idx %u.\n", sub_resource_idx); return; } @@ -3138,7 +3091,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (box) { if (box->left >= box->right || box->right > sub_resource->width -@@ -4078,9 +4529,47 @@ +@@ -3988,9 +4433,47 @@ WARN("Invalid box %s specified.\n", debug_box(box)); return; } @@ -3186,7 +3139,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device, -@@ -4111,8 +4600,14 @@ +@@ -4021,8 +4504,14 @@ rect = &r; } @@ -3201,7 +3154,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(const struct wined3d_device *device, -@@ -4126,6 +4621,7 @@ +@@ -4036,6 +4525,7 @@ return NULL; } @@ -3209,7 +3162,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c return device->state.fb.render_targets[view_idx]; } -@@ -4141,6 +4637,22 @@ +@@ -4051,6 +4541,22 @@ { struct wined3d_rendertarget_view *prev; struct wined3d_fb_state *fb = &device->state.fb; @@ -3232,7 +3185,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n", device, view_idx, view, set_viewport); -@@ -4180,6 +4692,7 @@ +@@ -4090,6 +4596,7 @@ } @@ -3240,7 +3193,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c prev = fb->render_targets[view_idx]; if (view == prev) return WINED3D_OK; -@@ -4187,6 +4700,15 @@ +@@ -4097,6 +4604,15 @@ if (view) wined3d_rendertarget_view_incref(view); fb->render_targets[view_idx] = view; @@ -3256,7 +3209,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c wined3d_cs_emit_set_rendertarget_view(device->cs, view_idx, view); /* Release after the assignment, to prevent device_resource_released() * from seeing the surface as still in use. */ -@@ -4198,6 +4720,7 @@ +@@ -4108,6 +4624,7 @@ void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view) { @@ -3264,7 +3217,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c struct wined3d_fb_state *fb = &device->state.fb; struct wined3d_rendertarget_view *prev; -@@ -4215,6 +4738,66 @@ +@@ -4125,6 +4642,66 @@ wined3d_cs_emit_set_depth_stencil_view(device->cs, view); if (prev) wined3d_rendertarget_view_decref(prev); @@ -3331,7 +3284,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device, -@@ -4235,6 +4818,14 @@ +@@ -4145,6 +4722,14 @@ cursor_image = surface_from_resource(sub_resource); @@ -3346,7 +3299,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (cursor_image->resource.format->id != WINED3DFMT_B8G8R8A8_UNORM) { WARN("Surface %p has an invalid format %s.\n", -@@ -4262,6 +4853,13 @@ +@@ -4172,6 +4757,13 @@ * release it after setting the cursor image. Windows doesn't * addref the set surface, so we can't do this either without * creating circular refcount dependencies. */ @@ -3360,7 +3313,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (cursor_image->resource.width == 32 && cursor_image->resource.height == 32) { -@@ -4366,6 +4964,12 @@ +@@ -4276,6 +4868,12 @@ else SetCursor(NULL); } @@ -3373,7 +3326,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c return oldVisible; } -@@ -4376,8 +4980,10 @@ +@@ -4286,8 +4884,10 @@ TRACE("device %p.\n", device); @@ -3384,7 +3337,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry) { TRACE("Checking resource %p for eviction.\n", resource); -@@ -4385,6 +4991,7 @@ +@@ -4295,6 +4895,7 @@ if (resource->pool == WINED3D_POOL_MANAGED && !resource->map_count) { TRACE("Evicting %p.\n", resource); @@ -3392,7 +3345,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c wined3d_cs_emit_evict_resource(device->cs, resource); } } -@@ -4403,6 +5010,37 @@ +@@ -4313,6 +4914,37 @@ context = context_acquire(device, NULL); gl_info = context->gl_info; @@ -3430,7 +3383,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (device->depth_blt_texture) { -@@ -4424,6 +5062,7 @@ +@@ -4334,6 +4966,7 @@ HeapFree(GetProcessHeap(), 0, swapchain->context); swapchain->context = NULL; @@ -3438,7 +3391,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c swapchain->num_contexts = 0; } -@@ -4443,6 +5082,14 @@ +@@ -4353,6 +4986,14 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, struct wined3d_swapchain *swapchain) { @@ -3453,7 +3406,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c HRESULT hr; if (FAILED(hr = device->shader_backend->shader_alloc_private(device, -@@ -4459,6 +5106,7 @@ +@@ -4369,6 +5010,7 @@ return hr; } @@ -3461,7 +3414,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c hr = wined3d_cs_emit_create_swapchain_context(device->cs, swapchain); if (FAILED(hr)) { -@@ -4469,6 +5117,35 @@ +@@ -4379,6 +5021,35 @@ } wined3d_cs_emit_create_dummy_textures(device->cs); @@ -3497,7 +3450,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c return WINED3D_OK; } -@@ -4488,9 +5165,11 @@ +@@ -4398,9 +5069,11 @@ TRACE("device %p, swapchain_desc %p, mode %p, callback %p, reset_state %#x.\n", device, swapchain_desc, mode, callback, reset_state); @@ -3509,7 +3462,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (!(swapchain = wined3d_device_get_swapchain(device, 0))) { ERR("Failed to get the first implicit swapchain.\n"); -@@ -4505,9 +5184,21 @@ +@@ -4415,9 +5088,21 @@ wined3d_texture_decref(device->logo_texture); device->logo_texture = NULL; } @@ -3531,7 +3484,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c { for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i) { -@@ -4516,6 +5207,7 @@ +@@ -4426,6 +5111,7 @@ } wined3d_device_set_depth_stencil_view(device, NULL); @@ -3539,7 +3492,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (reset_state) { state_unbind_resources(&device->state); -@@ -4525,6 +5217,12 @@ +@@ -4435,6 +5121,12 @@ { wined3d_texture_decref(device->cs->onscreen_depth_stencil->container); device->cs->onscreen_depth_stencil = NULL; @@ -3552,7 +3505,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } if (reset_state) -@@ -4537,6 +5235,7 @@ +@@ -4447,6 +5139,7 @@ } } @@ -3560,7 +3513,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c /* Free implicit resources and wait for the command stream before modifying * swapchain parameters. After modifying the swapchain parameters a new GL * context may be acquired by the worker thread. This causes problems in the -@@ -4558,6 +5257,7 @@ +@@ -4468,6 +5161,7 @@ } device->cs->ops->finish(device->cs); @@ -3568,7 +3521,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c TRACE("New params:\n"); TRACE("backbuffer_width %u\n", swapchain_desc->backbuffer_width); TRACE("backbuffer_height %u\n", swapchain_desc->backbuffer_height); -@@ -4684,6 +5384,13 @@ +@@ -4594,6 +5288,13 @@ swapchain_desc->multisample_type, swapchain_desc->multisample_quality))) return hr; @@ -3582,7 +3535,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (swapchain->desc.enable_auto_depth_stencil) { struct wined3d_resource_desc texture_desc; -@@ -4725,6 +5432,13 @@ +@@ -4635,6 +5336,13 @@ wined3d_device_set_depth_stencil_view(device, device->auto_depth_stencil_view); } @@ -3596,7 +3549,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (swapchain->desc.backbuffer_count) { view_desc.format_id = swapchain_desc->backbuffer_format; -@@ -4751,12 +5465,20 @@ +@@ -4661,12 +5369,20 @@ } wined3d_cs_emit_reset_state(device->cs); state_cleanup(&device->state); @@ -3617,7 +3570,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c &device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT))) ERR("Failed to initialize device state, hr %#x.\n", hr); device->update_state = &device->state; -@@ -4765,6 +5487,7 @@ +@@ -4675,6 +5391,7 @@ } else if (device->back_buffer_view) { @@ -3625,7 +3578,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c struct wined3d_state *state = &device->state; wined3d_device_set_rendertarget_view(device, 0, device->back_buffer_view, FALSE); -@@ -4780,6 +5503,24 @@ +@@ -4690,6 +5407,24 @@ state->scissor_rect.left = 0; state->scissor_rect.right = swapchain->desc.backbuffer_width; state->scissor_rect.bottom = swapchain->desc.backbuffer_height; @@ -3650,7 +3603,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect); } -@@ -4862,6 +5603,10 @@ +@@ -4772,6 +5507,10 @@ TRACE("device %p, resource %p, type %s.\n", device, resource, debug_d3dresourcetype(type)); @@ -3661,7 +3614,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c switch (type) { case WINED3D_RTYPE_SURFACE: -@@ -4872,6 +5617,7 @@ +@@ -4782,6 +5521,7 @@ for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i) { @@ -3669,7 +3622,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (wined3d_rendertarget_view_get_surface(device->state.fb.render_targets[i]) == surface) { ERR("Surface %p is still in use as render target %u.\n", surface, i); -@@ -4883,6 +5629,19 @@ +@@ -4793,6 +5533,19 @@ { ERR("Surface %p is still in use as depth/stencil buffer.\n", surface); device->state.fb.depth_stencil = NULL; @@ -3689,7 +3642,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } } break; -@@ -5044,7 +5803,11 @@ +@@ -4954,7 +5707,11 @@ device->blitter = adapter->blitter; @@ -3701,7 +3654,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c &adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT))) { ERR("Failed to initialize device state, hr %#x.\n", hr); -@@ -5143,6 +5906,7 @@ +@@ -5053,6 +5810,7 @@ else return CallWindowProcA(proc, window, message, wparam, lparam); } @@ -3709,7 +3662,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c /* Context activation is done by the caller */ struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT size, GLenum gl_usage, -@@ -5196,3 +5960,4 @@ +@@ -5106,3 +5864,4 @@ wined3d_device_destroy_bo(device, context, bo); } @@ -5602,10 +5555,10 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if ((box->left >= box->right) || (box->top >= box->bottom) || (box->right > surface->resource.width) -@@ -1403,6 +1766,34 @@ - } +@@ -1400,6 +1763,31 @@ + return FALSE; - BOOL surface_check_block_align_rect(struct wined3d_surface *surface, const RECT *rect) + return wined3d_resource_check_block_align(&surface->resource, box); +#else /* STAGING_CSMT */ + UINT width_mask, height_mask; + @@ -5630,14 +5583,11 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c + return TRUE; + + return FALSE; -+} -+ -+static BOOL surface_check_block_align_rect(struct wined3d_surface *surface, const RECT *rect) +#endif /* STAGING_CSMT */ - { - struct wined3d_box box = {rect->left, rect->top, rect->right, rect->bottom, 0, 1}; + } -@@ -1421,7 +1812,11 @@ + static BOOL surface_check_block_align_rect(struct wined3d_surface *surface, const RECT *rect) +@@ -1421,7 +1809,11 @@ UINT update_w, update_h; UINT dst_w, dst_h; RECT r, dst_rect; @@ -5649,7 +5599,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c POINT p; TRACE("dst_surface %p, dst_point %s, src_surface %p, src_rect %s.\n", -@@ -1492,11 +1887,17 @@ +@@ -1492,11 +1884,17 @@ return WINED3DERR_INVALIDCALL; } @@ -5667,7 +5617,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c context = context_acquire(dst_surface->resource.device, NULL); gl_info = context->gl_info; -@@ -1507,6 +1908,7 @@ +@@ -1507,6 +1905,7 @@ if (update_w == dst_w && update_h == dst_h) wined3d_texture_prepare_texture(dst_surface->container, context, FALSE); else @@ -5675,7 +5625,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c wined3d_resource_load_location(&dst_surface->resource, context, WINED3D_LOCATION_TEXTURE_RGB); wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE); -@@ -1520,6 +1922,21 @@ +@@ -1520,6 +1919,21 @@ wined3d_resource_validate_location(&dst_surface->resource, WINED3D_LOCATION_TEXTURE_RGB); wined3d_resource_invalidate_location(&dst_surface->resource, ~WINED3D_LOCATION_TEXTURE_RGB); @@ -5697,7 +5647,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c return WINED3D_OK; } -@@ -1633,6 +2050,7 @@ +@@ -1633,6 +2047,7 @@ if (surface->resource.pool == WINED3D_POOL_SCRATCH) ERR("Not supported on scratch surfaces.\n"); @@ -5705,7 +5655,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (surface->resource.locations & location) { TRACE("surface is already in texture\n"); -@@ -1641,6 +2059,16 @@ +@@ -1641,6 +2056,16 @@ TRACE("Reloading because surface is dirty.\n"); wined3d_resource_load_location(&surface->resource, context, location); @@ -5722,7 +5672,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c surface_evict_sysmem(surface); } -@@ -1716,10 +2144,28 @@ +@@ -1716,10 +2141,28 @@ DWORD CDECL wined3d_surface_get_pitch(const struct wined3d_surface *surface) { @@ -5751,7 +5701,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface, -@@ -1735,6 +2181,7 @@ +@@ -1735,6 +2178,7 @@ { DeleteDC(surface->hDC); DeleteObject(surface->dib.DIBsection); @@ -5759,7 +5709,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c surface->resource.bitmap_data = NULL; surface->flags &= ~SFLAG_DIBSECTION; create_dib = TRUE; -@@ -1743,6 +2190,15 @@ +@@ -1743,6 +2187,15 @@ surface->resource.locations = 0; wined3d_resource_free_sysmem(&surface->resource); surface->resource.map_heap_memory = NULL; @@ -5775,7 +5725,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c width = texture_resource->width; height = texture_resource->height; -@@ -1768,6 +2224,7 @@ +@@ -1768,6 +2221,7 @@ else surface->flags &= ~SFLAG_NONPOW2; @@ -5783,7 +5733,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if ((surface->resource.user_memory = mem)) { surface->resource.map_binding = WINED3D_LOCATION_USER_MEMORY; -@@ -1788,6 +2245,27 @@ +@@ -1788,6 +2242,27 @@ surface->resource.size = wined3d_format_calculate_size(texture_resource->format, 1, width, height, 1); surface->resource.custom_row_pitch = wined3d_format_calculate_pitch(texture_resource->format, width); @@ -5811,7 +5761,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } /* The format might be changed to a format that needs conversion. -@@ -1810,11 +2288,19 @@ +@@ -1810,11 +2285,19 @@ if (!valid_location) { @@ -5831,7 +5781,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c return WINED3D_OK; } -@@ -2173,6 +2659,7 @@ +@@ -2173,6 +2656,7 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_surface *source, enum wined3d_format_id to_fmt) { @@ -5839,7 +5789,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c void *dst_data = NULL, *src_data = NULL; UINT src_row_pitch, src_slice_pitch, dst_row_pitch, dst_slice_pitch; const struct d3dfmt_converter_desc *conv; -@@ -2181,6 +2668,13 @@ +@@ -2181,6 +2665,13 @@ struct wined3d_surface *dst; struct wined3d_context *context = NULL; struct wined3d_device *device = source->resource.device; @@ -5853,7 +5803,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c conv = find_converter(source->resource.format->id, to_fmt); if (!conv) -@@ -2205,6 +2699,7 @@ +@@ -2205,6 +2696,7 @@ } dst = surface_from_resource(wined3d_texture_get_sub_resource(ret, 0)); @@ -5861,7 +5811,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c wined3d_resource_get_pitch(&source->resource, &src_row_pitch, &src_slice_pitch); wined3d_resource_get_pitch(&ret->resource, &dst_row_pitch, &dst_slice_pitch); -@@ -2245,6 +2740,32 @@ +@@ -2245,6 +2737,32 @@ if (context) context_release(context); return NULL; @@ -5894,7 +5844,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } static HRESULT _Blt_ColorFill(BYTE *buf, unsigned int width, unsigned int height, -@@ -2307,6 +2828,7 @@ +@@ -2307,6 +2825,7 @@ HRESULT wined3d_surface_unmap(struct wined3d_surface *surface) { @@ -5902,7 +5852,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c HRESULT hr; TRACE("surface %p.\n", surface); -@@ -2317,6 +2839,20 @@ +@@ -2317,6 +2836,20 @@ memset(&surface->lockedRect, 0, sizeof(surface->lockedRect)); return hr; @@ -5923,7 +5873,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_desc *map_desc, -@@ -2324,6 +2860,21 @@ +@@ -2324,6 +2857,21 @@ { const struct wined3d_format *format = surface->resource.format; unsigned int fmt_flags = surface->container->resource.format_flags; @@ -5945,7 +5895,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if ((fmt_flags & WINED3DFMT_FLAG_BLOCKS) && box && !surface_check_block_align(surface, box)) -@@ -2335,6 +2886,13 @@ +@@ -2335,6 +2883,13 @@ return WINED3DERR_INVALIDCALL; } @@ -5959,7 +5909,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c /* Performance optimization: Count how often a surface is mapped, if it is * mapped regularly do not throw away the system memory copy. This avoids * the need to download the surface from OpenGL all the time. The surface -@@ -2350,6 +2908,7 @@ +@@ -2350,6 +2905,7 @@ } } @@ -5967,7 +5917,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (box) { surface->lockedRect.left = box->left; -@@ -2439,6 +2998,119 @@ +@@ -2439,6 +2995,119 @@ DWORD slice_pitch, pitch; wined3d_resource_get_memory(&surface->resource, dst_location, &data); @@ -6087,7 +6037,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (surface != old_ctx->current_rt) { -@@ -2478,8 +3150,13 @@ +@@ -2478,8 +3147,13 @@ } /* Setup pixel store pack state -- to glReadPixels into the correct place */ @@ -6101,7 +6051,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c checkGLcall("glPixelStorei"); gl_info->gl_ops.gl.p_glReadPixels(0, 0, -@@ -2496,6 +3173,10 @@ +@@ -2496,6 +3170,10 @@ { /* glReadPixels returns the image upside down, and there is no way to prevent this. * Flip the lines in software. */ @@ -6112,7 +6062,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (!(row = HeapAlloc(GetProcessHeap(), 0, pitch))) goto error; -@@ -2740,8 +3421,13 @@ +@@ -2740,8 +3418,13 @@ /* The texture is now most up to date - If the surface is a render target * and has a drawable, this path is never entered. */ @@ -6126,7 +6076,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } /* Uses the hardware to stretch and flip the image */ -@@ -2809,7 +3495,11 @@ +@@ -2809,7 +3492,11 @@ checkGLcall("glEnable(texture_target)"); /* For now invalidate the texture copy of the back buffer. Drawable and sysmem copy are untouched */ @@ -6138,7 +6088,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } /* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag -@@ -3006,6 +3696,7 @@ +@@ -3006,6 +3693,7 @@ checkGLcall("glDeleteTextures(1, &backup)"); } @@ -6146,7 +6096,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (wined3d_settings.cs_multithreaded) gl_info->gl_ops.gl.p_glFinish(); else if (wined3d_settings.strict_draw_ordering) -@@ -3017,6 +3708,17 @@ +@@ -3017,6 +3705,17 @@ * and has a drawable, this path is never entered. */ wined3d_resource_validate_location(&dst_surface->resource, WINED3D_LOCATION_TEXTURE_RGB); wined3d_resource_invalidate_location(&dst_surface->resource, ~WINED3D_LOCATION_TEXTURE_RGB); @@ -6164,7 +6114,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } /* Front buffer coordinates are always full screen coordinates, but our GL -@@ -3071,9 +3773,15 @@ +@@ -3071,9 +3770,15 @@ gl_info = context->gl_info; @@ -6180,7 +6130,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c wined3d_texture_load(src_surface->container, context, FALSE); /* Activate the destination context, set it up for blitting */ -@@ -3116,9 +3824,13 @@ +@@ -3116,9 +3821,13 @@ /* Leave the opengl state valid for blitting */ device->blitter->unset_shader(context->gl_info); @@ -6194,7 +6144,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c || (dst_surface->container->swapchain && dst_surface->container->swapchain->front_buffer == dst_surface->container)) gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */ -@@ -3131,8 +3843,13 @@ +@@ -3131,8 +3840,13 @@ { struct wined3d_resource *resource = &s->container->resource; struct wined3d_device *device = resource->device; @@ -6208,7 +6158,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c const struct blit_shader *blitter; HRESULT hr; -@@ -3143,6 +3860,7 @@ +@@ -3143,6 +3857,7 @@ return WINED3DERR_INVALIDCALL; } @@ -6216,7 +6166,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c /* Can't incref / decref the resource here. This is executed inside the worker * thread. Playing with the refcount here makes the worker thread visible to * the client lib. Problems occur when the worker thread happens to hold the -@@ -3159,6 +3877,21 @@ +@@ -3159,6 +3874,21 @@ view.sub_resource_idx = s->texture_layer * texture->level_count + s->texture_level; hr = blitter->color_fill(device, &view, rect, color); @@ -6238,7 +6188,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c return hr; } -@@ -3168,8 +3901,13 @@ +@@ -3168,8 +3898,13 @@ enum wined3d_texture_filter_type filter) { struct wined3d_device *device = dst_surface->resource.device; @@ -6252,7 +6202,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, blt_fx %p, filter %s.\n", dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), -@@ -3360,6 +4098,7 @@ +@@ -3360,6 +4095,7 @@ { TRACE("surface %p, new location %#x, w %u, h %u.\n", surface, location, w, h); @@ -6260,7 +6210,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (((surface->resource.locations & WINED3D_LOCATION_TEXTURE_RGB) && !(location & WINED3D_LOCATION_TEXTURE_RGB)) || (!(surface->resource.locations & WINED3D_LOCATION_TEXTURE_RGB) && (location & WINED3D_LOCATION_TEXTURE_RGB))) -@@ -3368,6 +4107,15 @@ +@@ -3368,6 +4104,15 @@ surface->ds_current_size.cx = w; surface->ds_current_size.cy = h; surface->resource.locations = location; @@ -6276,7 +6226,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } /* Context activation is done by the caller. */ -@@ -3382,7 +4130,11 @@ +@@ -3382,7 +4127,11 @@ /* TODO: Make this work for modes other than FBO */ if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) return; @@ -6288,7 +6238,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c { w = surface->ds_current_size.cx; h = surface->ds_current_size.cy; -@@ -3409,6 +4161,7 @@ +@@ -3409,6 +4158,7 @@ } wined3d_surface_prepare(surface, context, location); @@ -6296,7 +6246,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (surface->resource.locations & WINED3D_LOCATION_DISCARDED) { TRACE("Surface was discarded, no need copy data.\n"); -@@ -3423,6 +4176,22 @@ +@@ -3423,6 +4173,22 @@ { FIXME("No up to date depth stencil location.\n"); surface->resource.locations |= location; @@ -6319,7 +6269,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c surface->ds_current_size.cx = surface->resource.width; surface->ds_current_size.cy = surface->resource.height; return; -@@ -3486,9 +4255,13 @@ +@@ -3486,9 +4252,13 @@ context_invalidate_state(context, STATE_FRAMEBUFFER); @@ -6333,7 +6283,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */ } else if (location == WINED3D_LOCATION_DRAWABLE) -@@ -3504,9 +4277,13 @@ +@@ -3504,9 +4274,13 @@ context_invalidate_state(context, STATE_FRAMEBUFFER); @@ -6347,7 +6297,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */ } else -@@ -3514,6 +4291,7 @@ +@@ -3514,6 +4288,7 @@ ERR("Invalid location (%#x) specified.\n", location); } @@ -6355,7 +6305,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c surface->resource.locations |= location; surface->ds_current_size.cx = surface->resource.width; surface->ds_current_size.cy = surface->resource.height; -@@ -3546,6 +4324,124 @@ +@@ -3546,6 +4321,124 @@ FIXME("Can't load surface %p with location flags %s into sysmem.\n", surface, wined3d_debug_location(surface->resource.locations)); @@ -6480,7 +6430,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } /* Context activation is done by the caller. */ -@@ -3554,12 +4450,14 @@ +@@ -3554,12 +4447,14 @@ { RECT r; @@ -6495,7 +6445,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (wined3d_settings.offscreen_rendering_mode == ORM_FBO && wined3d_resource_is_offscreen(&surface->container->resource)) { -@@ -3568,7 +4466,11 @@ +@@ -3568,7 +4463,11 @@ } surface_get_rect(surface, NULL, &r); @@ -6507,7 +6457,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c surface_blt_to_drawable(surface->resource.device, context, WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r); -@@ -3583,6 +4485,7 @@ +@@ -3583,6 +4482,7 @@ struct wined3d_device *device = surface->resource.device; const struct wined3d_color_key_conversion *conversion; struct wined3d_texture *texture = surface->container; @@ -6515,7 +6465,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c UINT width, src_row_pitch, src_slice_pitch, dst_pitch; struct wined3d_bo_address data; struct wined3d_format format; -@@ -3609,6 +4512,24 @@ +@@ -3609,6 +4509,24 @@ } if (surface->resource.locations & (WINED3D_LOCATION_TEXTURE_SRGB | WINED3D_LOCATION_TEXTURE_RGB) @@ -6540,7 +6490,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c && (surface->container->resource.format_flags & WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB) && fbo_blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT, NULL, surface->resource.usage, surface->resource.pool, surface->resource.format, -@@ -3624,6 +4545,7 @@ +@@ -3624,6 +4542,7 @@ return WINED3D_OK; } @@ -6548,7 +6498,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (surface->resource.locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED) && (!srgb || (surface->container->resource.format_flags & WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB)) && fbo_blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT, -@@ -3631,6 +4553,15 @@ +@@ -3631,6 +4550,15 @@ NULL, surface->resource.usage, surface->resource.pool, surface->resource.format)) { DWORD src_location = surface->resource.locations & WINED3D_LOCATION_RB_RESOLVED ? @@ -6564,7 +6514,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c WINED3D_LOCATION_RB_RESOLVED : WINED3D_LOCATION_RB_MULTISAMPLE; DWORD dst_location = srgb ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB; RECT rect = {0, 0, surface->resource.width, surface->resource.height}; -@@ -3645,6 +4576,7 @@ +@@ -3645,6 +4573,7 @@ if (srgb) { @@ -6572,7 +6522,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if ((surface->resource.locations & (WINED3D_LOCATION_TEXTURE_RGB | surface->resource.map_binding)) == WINED3D_LOCATION_TEXTURE_RGB) { -@@ -3679,6 +4611,42 @@ +@@ -3679,6 +4608,42 @@ width = surface->resource.width; wined3d_resource_get_pitch(&surface->resource, &src_row_pitch, &src_slice_pitch); @@ -6615,7 +6565,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c format = *texture->resource.format; if ((conversion = wined3d_format_get_color_key_conversion(texture, TRUE))) -@@ -3687,7 +4655,11 @@ +@@ -3687,7 +4652,11 @@ /* Don't use PBOs for converted surfaces. During PBO conversion we look at * WINED3D_TEXTURE_CONVERTED but it isn't set (yet) in all cases it is * getting called. */ @@ -6627,7 +6577,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c { TRACE("Removing the pbo attached to surface %p.\n", surface); -@@ -3696,6 +4668,7 @@ +@@ -3696,6 +4665,7 @@ else surface->resource.map_binding = WINED3D_LOCATION_SYSMEM; @@ -6635,7 +6585,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c wined3d_resource_prepare_map_memory(&surface->resource, context); wined3d_resource_load_location(&surface->resource, context, surface->resource.map_binding); wined3d_resource_free_bo(&surface->resource); -@@ -3703,6 +4676,14 @@ +@@ -3703,6 +4673,14 @@ } wined3d_resource_get_memory(&surface->resource, surface->resource.locations, &data); @@ -6650,7 +6600,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (format.convert) { /* This code is entered for texture formats which need a fixup. */ -@@ -3717,9 +4698,15 @@ +@@ -3717,9 +4695,15 @@ context_release(context); return E_OUTOFMEMORY; } @@ -6666,7 +6616,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c data.addr = mem; } else if (conversion) -@@ -3739,6 +4726,7 @@ +@@ -3739,6 +4723,7 @@ } if (texture->swapchain && texture->swapchain->palette) palette = texture->swapchain->palette; @@ -6674,7 +6624,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c conversion->convert(data.addr, src_row_pitch, mem, dst_pitch, width, height, palette, &texture->async.gl_color_key); src_row_pitch = dst_pitch; -@@ -3747,6 +4735,16 @@ +@@ -3747,6 +4732,16 @@ wined3d_surface_upload_data(surface, gl_info, &format, &src_rect, src_row_pitch, &dst_point, srgb, wined3d_const_bo_address(&data)); @@ -6691,7 +6641,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c HeapFree(GetProcessHeap(), 0, mem); -@@ -3760,11 +4758,19 @@ +@@ -3760,11 +4755,19 @@ const RECT rect = {0, 0, surface->resource.width, surface->resource.height}; DWORD src_location; @@ -6711,7 +6661,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c src_location = WINED3D_LOCATION_TEXTURE_SRGB; else /* surface_blt_fbo will load the source location if necessary. */ src_location = WINED3D_LOCATION_TEXTURE_RGB; -@@ -3773,11 +4779,17 @@ +@@ -3773,11 +4776,17 @@ surface, src_location, &rect, surface, dst_location, &rect); } @@ -6729,7 +6679,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c HRESULT hr; TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location)); -@@ -3785,6 +4797,7 @@ +@@ -3785,6 +4794,7 @@ if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL) { if (location == WINED3D_LOCATION_TEXTURE_RGB @@ -6737,7 +6687,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c && surface->resource.locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_DISCARDED)) { surface_load_ds_location(surface, context, location); -@@ -3808,6 +4821,45 @@ +@@ -3808,6 +4818,45 @@ { ERR("Surface %p does not have any up to date location.\n", surface); return; @@ -6783,7 +6733,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } switch (location) -@@ -3821,7 +4873,11 @@ +@@ -3821,7 +4870,11 @@ case WINED3D_LOCATION_DRAWABLE: if (FAILED(hr = surface_load_drawable(surface, context))) @@ -6795,7 +6745,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c break; case WINED3D_LOCATION_RB_RESOLVED: -@@ -3833,7 +4889,11 @@ +@@ -3833,7 +4886,11 @@ case WINED3D_LOCATION_TEXTURE_SRGB: if (FAILED(hr = surface_load_texture(surface, context, location == WINED3D_LOCATION_TEXTURE_SRGB))) @@ -6807,7 +6757,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c break; default: -@@ -3841,12 +4901,21 @@ +@@ -3841,12 +4898,21 @@ break; } @@ -6829,7 +6779,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } static HRESULT ffp_blit_alloc(struct wined3d_device *device) { return WINED3D_OK; } -@@ -3955,7 +5024,11 @@ +@@ -3955,7 +5021,11 @@ const RECT *rect, const struct wined3d_color *color) { const RECT draw_rect = {0, 0, view->width, view->height}; @@ -6841,7 +6791,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c device_clear_render_targets(device, 1, &fb, 1, rect, &draw_rect, WINED3DCLEAR_TARGET, color, 0.0f, 0); -@@ -4005,8 +5078,13 @@ +@@ -4005,8 +5075,13 @@ wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT, (old_color_key_flags & WINED3D_CKEY_SRC_BLT) ? &old_blt_key : NULL); @@ -6855,7 +6805,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } const struct blit_shader ffp_blit = { -@@ -4162,6 +5240,7 @@ +@@ -4162,6 +5237,7 @@ struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags, const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter) { @@ -6863,7 +6813,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c int bpp, srcheight, srcwidth, dstheight, dstwidth, width; const struct wined3d_format *src_format, *dst_format; unsigned int src_fmt_flags, dst_fmt_flags; -@@ -4196,6 +5275,28 @@ +@@ -4196,6 +5272,28 @@ wined3d_resource_get_pitch(&dst_surface->resource, &dst_row_pitch, &dst_slice_pitch); src_data = dst_data; src_row_pitch = dst_row_pitch; @@ -6892,7 +6842,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c src_format = dst_surface->resource.format; dst_format = src_format; dst_fmt_flags = dst_surface->container->resource.format_flags; -@@ -4207,12 +5308,14 @@ +@@ -4207,12 +5305,14 @@ dst_fmt_flags = dst_surface->container->resource.format_flags; if (src_surface) { @@ -6907,7 +6857,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (dst_surface->resource.format->id != src_surface->resource.format->id) { if (!(src_texture = surface_convert_format(src_surface, dst_format->id))) -@@ -4223,9 +5326,13 @@ +@@ -4223,9 +5323,13 @@ } src_surface = surface_from_resource(wined3d_texture_get_sub_resource(src_texture, 0)); } @@ -6921,7 +6871,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c src_format = src_surface->resource.format; src_fmt_flags = src_surface->container->resource.format_flags; } -@@ -4235,8 +5342,12 @@ +@@ -4235,8 +5339,12 @@ src_fmt_flags = dst_fmt_flags; } @@ -6934,7 +6884,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } bpp = dst_surface->resource.format->byte_count; -@@ -4247,12 +5358,24 @@ +@@ -4247,12 +5355,24 @@ width = (dst_rect->right - dst_rect->left) * bpp; if (src_surface) @@ -6959,7 +6909,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (src_fmt_flags & dst_fmt_flags & WINED3DFMT_FLAG_BLOCKS) { -@@ -4287,7 +5410,11 @@ +@@ -4287,7 +5407,11 @@ } hr = surface_cpu_blt_compressed(sbase, dbuf, @@ -6971,7 +6921,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c src_format, flags, fx); goto release; } -@@ -4295,7 +5422,11 @@ +@@ -4295,7 +5419,11 @@ /* First, all the 'source-less' blits */ if (flags & WINEDDBLT_COLORFILL) { @@ -6983,7 +6933,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c flags &= ~WINEDDBLT_COLORFILL; } -@@ -4345,6 +5476,7 @@ +@@ -4345,6 +5473,7 @@ for (y = 0; y < dstheight; ++y) { memcpy(dbuf, sbuf, width); @@ -6991,7 +6941,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c sbuf += src_row_pitch; dbuf += dst_row_pitch; } -@@ -4358,6 +5490,21 @@ +@@ -4358,6 +5487,21 @@ { sbuf -= src_row_pitch; dbuf -= dst_row_pitch; @@ -7013,7 +6963,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c memcpy(dbuf, sbuf, width); } } -@@ -4367,8 +5514,13 @@ +@@ -4367,8 +5511,13 @@ for (y = 0; y < dstheight; ++y) { memmove(dbuf, sbuf, width); @@ -7027,7 +6977,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } } } -@@ -4377,9 +5529,15 @@ +@@ -4377,9 +5526,15 @@ /* Stretching in y direction only. */ for (y = sy = 0; y < dstheight; ++y, sy += yinc) { @@ -7043,7 +6993,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } } } -@@ -4389,6 +5547,7 @@ +@@ -4389,6 +5544,7 @@ int last_sy = -1; for (y = sy = 0; y < dstheight; ++y, sy += yinc) { @@ -7051,7 +7001,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c sbuf = sbase + (sy >> 16) * src_row_pitch; if ((sy >> 16) == (last_sy >> 16)) -@@ -4396,6 +5555,15 @@ +@@ -4396,6 +5552,15 @@ /* This source row is the same as last source row - * Copy the already stretched row. */ memcpy(dbuf, dbuf - dst_row_pitch, width); @@ -7067,7 +7017,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } else { -@@ -4442,6 +5610,7 @@ +@@ -4442,6 +5607,7 @@ } #undef STRETCH_ROW } @@ -7075,7 +7025,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c dbuf += dst_row_pitch; last_sy = sy; } -@@ -4450,6 +5619,16 @@ +@@ -4450,6 +5616,16 @@ else { LONG dstyinc = dst_row_pitch, dstxinc = bpp; @@ -7092,7 +7042,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c DWORD keylow = 0xffffffff, keyhigh = 0, keymask = 0xffffffff; DWORD destkeylow = 0x0, destkeyhigh = 0xffffffff, destkeymask = 0xffffffff; if (flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYDEST | WINEDDBLT_KEYSRCOVERRIDE | WINEDDBLT_KEYDESTOVERRIDE)) -@@ -4499,7 +5678,11 @@ +@@ -4499,7 +5675,11 @@ LONG tmpxy; dTopLeft = dbuf; dTopRight = dbuf + ((dstwidth - 1) * bpp); @@ -7104,7 +7054,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c dBottomRight = dBottomLeft + ((dstwidth - 1) * bpp); if (fx->dwDDFX & WINEDDBLTFX_ARITHSTRETCHY) -@@ -4576,6 +5759,7 @@ +@@ -4576,6 +5756,7 @@ flags &= ~(WINEDDBLT_DDFX); } @@ -7112,7 +7062,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c #define COPY_COLORKEY_FX(type) \ do { \ const type *s; \ -@@ -4597,6 +5781,29 @@ +@@ -4597,6 +5778,29 @@ d = (type *)(((BYTE *)d) + dstyinc); \ } \ } while(0) @@ -7142,7 +7092,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c switch (bpp) { -@@ -4615,7 +5822,11 @@ +@@ -4615,7 +5819,11 @@ BYTE *d = dbuf, *dx; for (y = sy = 0; y < dstheight; ++y, sy += yinc) { @@ -7154,7 +7104,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c dx = d; for (x = sx = 0; x < dstwidth; ++x, sx+= xinc) { -@@ -4646,10 +5857,12 @@ +@@ -4646,10 +5854,12 @@ } } @@ -7167,7 +7117,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c error: if (flags && FIXME_ON(d3d_surface)) { -@@ -4657,6 +5870,7 @@ +@@ -4657,6 +5867,7 @@ } release: @@ -7175,7 +7125,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (dst_data) { wined3d_resource_release_map_ptr(&dst_surface->resource, context); -@@ -4675,6 +5889,14 @@ +@@ -4675,6 +5886,14 @@ wined3d_texture_decref(src_texture); if (context) context_release(context); @@ -7190,7 +7140,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c return hr; } -@@ -4720,7 +5942,11 @@ +@@ -4720,7 +5939,11 @@ cpu_blit_blit_surface, }; @@ -7202,7 +7152,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags, const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter) { -@@ -4738,6 +5964,98 @@ +@@ -4738,6 +5961,98 @@ | WINEDDBLT_DONOTWAIT | WINEDDBLT_ALPHATEST; @@ -7301,7 +7251,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (!device->d3d_initialized) { WARN("D3D not initialized, using fallback.\n"); -@@ -4801,6 +6119,7 @@ +@@ -4801,6 +6116,7 @@ TRACE("Depth fill.\n"); if (!surface_convert_depth_to_float(dst_surface, fx->u5.dwFillDepth, &depth)) @@ -7309,7 +7259,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c return; if (SUCCEEDED(wined3d_surface_depth_fill(dst_surface, dst_rect, depth))) -@@ -4811,6 +6130,24 @@ +@@ -4811,6 +6127,24 @@ if (SUCCEEDED(wined3d_surface_depth_blt(src_surface, src_surface->container->resource.draw_binding, src_rect, dst_surface, dst_surface->container->resource.draw_binding, dst_rect))) return; @@ -7334,7 +7284,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } } else -@@ -4819,8 +6156,13 @@ +@@ -4819,8 +6153,13 @@ /* In principle this would apply to depth blits as well, but we don't * implement those in the CPU blitter at the moment. */ @@ -7348,7 +7298,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c { if (scale) TRACE("Not doing sysmem blit because of scaling.\n"); -@@ -4842,7 +6184,11 @@ +@@ -4842,7 +6181,11 @@ goto fallback; if (SUCCEEDED(surface_color_fill(dst_surface, dst_rect, &color))) @@ -7360,7 +7310,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } else { -@@ -4864,8 +6210,13 @@ +@@ -4864,8 +6207,13 @@ { blit_op = WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST; } @@ -7374,7 +7324,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c { /* Upload */ if (scale) -@@ -4881,11 +6232,18 @@ +@@ -4881,11 +6229,18 @@ if (!wined3d_resource_is_offscreen(&dst_surface->container->resource)) { struct wined3d_context *context = context_acquire(device, dst_surface); @@ -7393,7 +7343,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } } } -@@ -4909,7 +6267,11 @@ +@@ -4909,7 +6264,11 @@ wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, NULL, 0); dst_swapchain->desc.swap_effect = swap_effect; @@ -7405,7 +7355,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } if (fbo_blit_supported(&device->adapter->gl_info, blit_op, -@@ -4925,10 +6287,17 @@ +@@ -4925,10 +6284,17 @@ dst_surface, dst_surface->container->resource.draw_binding, dst_rect); context_release(context); @@ -7423,7 +7373,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } blitter = wined3d_select_blitter(&device->adapter->gl_info, &device->adapter->d3d_info, blit_op, -@@ -4938,6 +6307,7 @@ +@@ -4938,6 +6304,7 @@ { blitter->blit_surface(device, blit_op, filter, src_surface, src_rect, dst_surface, dst_rect, color_key); @@ -7431,7 +7381,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c return; } } -@@ -5103,6 +6473,21 @@ +@@ -5103,6 +6470,21 @@ wined3d_surface_location_invalidated, wined3d_surface_load_location, }; @@ -7453,7 +7403,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_texture *container, const struct wined3d_resource_desc *desc, GLenum target, unsigned int level, unsigned int layer, DWORD flags) -@@ -5164,7 +6549,11 @@ +@@ -5164,7 +6546,11 @@ } surface->container = container; @@ -7465,7 +7415,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c list_init(&surface->renderbuffers); list_init(&surface->overlays); -@@ -5196,9 +6585,14 @@ +@@ -5196,9 +6582,14 @@ if (surface->resource.map_binding == WINED3D_LOCATION_DIB) { wined3d_resource_free_sysmem(&surface->resource); @@ -7480,7 +7430,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } return hr; -@@ -5225,7 +6619,11 @@ +@@ -5225,7 +6616,11 @@ if (FAILED(hr = surface_init(object, container, desc, target, level, layer, flags))) { WARN("Failed to initialize surface, returning %#x.\n", hr); @@ -9485,7 +9435,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h HRESULT wined3d_surface_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc, GLenum target, unsigned int level, unsigned int layer, DWORD flags, struct wined3d_surface **surface) DECLSPEC_HIDDEN; -@@ -2667,6 +2831,17 @@ +@@ -2666,6 +2830,17 @@ void wined3d_surface_cleanup_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN; void wined3d_surface_getdc_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN; void wined3d_surface_releasedc_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN; @@ -9503,7 +9453,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context, const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN; -@@ -2687,8 +2862,10 @@ +@@ -2686,8 +2861,10 @@ GLuint name; }; @@ -9514,7 +9464,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_vertex_declaration_element { const struct wined3d_format *format; -@@ -2717,8 +2894,10 @@ +@@ -2716,8 +2893,10 @@ BOOL half_float_conv_needed; }; @@ -9525,7 +9475,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_saved_states { DWORD transform[(HIGHEST_TRANSFORMSTATE >> 5) + 1]; -@@ -2786,6 +2965,7 @@ +@@ -2785,6 +2964,7 @@ void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN; void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN; @@ -9533,7 +9483,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl_info, const struct wined3d_d3d_info *d3d_info, DWORD flags) DECLSPEC_HIDDEN; void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN; -@@ -2836,6 +3016,32 @@ +@@ -2835,6 +3015,32 @@ void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN; void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs, struct wined3d_context *context, struct wined3d_surface *depth_stencil) DECLSPEC_HIDDEN; @@ -9566,7 +9516,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN; -@@ -2885,6 +3091,7 @@ +@@ -2884,6 +3090,7 @@ 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; @@ -9574,7 +9524,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register, const float *constants, UINT vector4f_count, enum wined3d_shader_type type) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, UINT start_register, -@@ -2947,6 +3154,7 @@ +@@ -2944,6 +3151,7 @@ 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 depth_pitch) DECLSPEC_HIDDEN; @@ -9582,7 +9532,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /* 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 -@@ -2961,8 +3169,12 @@ +@@ -2958,8 +3166,12 @@ struct wined3d_query_ops { HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags); @@ -9595,7 +9545,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_query -@@ -2976,12 +3188,16 @@ +@@ -2973,12 +3185,16 @@ enum wined3d_query_type type; DWORD data_size; void *extendedData; @@ -9612,7 +9562,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other * fixed function semantics as D3DCOLOR or FLOAT16 */ -@@ -3008,7 +3224,9 @@ +@@ -3005,7 +3221,9 @@ GLenum buffer_object_usage; GLenum buffer_type_hint; DWORD flags; @@ -9622,7 +9572,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void *map_ptr; struct wined3d_map_range *maps; -@@ -3033,11 +3251,15 @@ +@@ -3030,11 +3248,15 @@ BYTE *buffer_get_sysmem(struct wined3d_buffer *This, struct wined3d_context *context) DECLSPEC_HIDDEN; void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_context *context, const struct wined3d_state *state) DECLSPEC_HIDDEN; @@ -9638,7 +9588,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer, const struct wined3d_box *box, const void *data) DECLSPEC_HIDDEN; -@@ -3075,8 +3297,10 @@ +@@ -3072,8 +3294,10 @@ return surface_from_resource(resource); } @@ -9649,7 +9599,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_shader_resource_view { LONG refcount; -@@ -3089,8 +3313,12 @@ +@@ -3086,8 +3310,12 @@ struct wined3d_swapchain_ops { void (*swapchain_present)(struct wined3d_swapchain *swapchain, const RECT *src_rect, @@ -9662,7 +9612,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_swapchain -@@ -3129,8 +3357,10 @@ +@@ -3126,8 +3354,10 @@ void swapchain_destroy_contexts(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; HDC swapchain_get_backup_dc(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; @@ -9673,7 +9623,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /***************************************************************************** * Utility function prototypes -@@ -3334,7 +3564,9 @@ +@@ -3331,7 +3561,9 @@ void shader_generate_main(const struct wined3d_shader *shader, struct wined3d_string_buffer *buffer, const struct wined3d_shader_reg_maps *reg_maps, const DWORD *byte_code, void *backend_ctx) DECLSPEC_HIDDEN; BOOL shader_match_semantic(const char *semantic_name, enum wined3d_decl_usage usage) DECLSPEC_HIDDEN;