diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 88d5e42c..603bc985 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "e8b9bda53ac39c913ddc93de0308f0c8b69605fc" + echo "c2dc6f3ef26fb18e7766956ef0a8cbadccc364d6" } # Show version information @@ -5604,187 +5604,185 @@ fi # | if test "$enable_wined3d_CSMT_Main" -eq 1; then patch_apply wined3d-CSMT_Main/0001-wined3d-Merge-get_pitch-functions.patch - patch_apply wined3d-CSMT_Main/0002-wined3d-Pass-a-context-to-surface_load_sysmem.patch - patch_apply wined3d-CSMT_Main/0003-wined3d-Pass-a-context-to-read_from_framebuffer.patch - patch_apply wined3d-CSMT_Main/0004-wined3d-Pass-a-context-to-surface_load_drawable-and-.patch - patch_apply wined3d-CSMT_Main/0005-wined3d-Pass-a-context-to-surface_blt_fbo.patch - patch_apply wined3d-CSMT_Main/0006-wined3d-Pass-a-context-to-surface_multisample_resolv.patch - patch_apply wined3d-CSMT_Main/0007-wined3d-Pass-a-context-to-surface_load_texture.patch - patch_apply wined3d-CSMT_Main/0008-wined3d-Pass-a-context-to-surface_load_location.patch - patch_apply wined3d-CSMT_Main/0009-wined3d-Make-surface_load_location-return-nothing.patch - patch_apply wined3d-CSMT_Main/0010-wined3d-Store-volume-locations-in-the-resource.patch - patch_apply wined3d-CSMT_Main/0011-wined3d-Move-validate_location-to-resource.c.patch - patch_apply wined3d-CSMT_Main/0012-wined3d-Move-surface-locations-into-the-resource.patch - patch_apply wined3d-CSMT_Main/0013-wined3d-Remove-surface_validate_location.patch - patch_apply wined3d-CSMT_Main/0014-wined3d-Move-invalidate_location-to-resource.c.patch - patch_apply wined3d-CSMT_Main/0015-wined3d-Invalidate-containers-via-callback.patch - patch_apply wined3d-CSMT_Main/0016-wined3d-Remove-surface_invalidate_location.patch - patch_apply wined3d-CSMT_Main/0017-wined3d-Move-bitmap_data-and-user_memory-into-the-re.patch - patch_apply wined3d-CSMT_Main/0018-wined3d-Move-load_location-into-the-resource.patch - patch_apply wined3d-CSMT_Main/0019-wined3d-Replace-surface_load_location-with-resource_.patch - patch_apply wined3d-CSMT_Main/0020-wined3d-Introduce-helper-functions-for-mapping-volum.patch - patch_apply wined3d-CSMT_Main/0021-wined3d-Move-volume-PBO-infrastructure-into-the-reso.patch - patch_apply wined3d-CSMT_Main/0022-wined3d-Remove-surface-pbo.patch - patch_apply wined3d-CSMT_Main/0023-wined3d-Use-resource-buffer-mapping-facilities-in-su.patch - patch_apply wined3d-CSMT_Main/0024-wined3d-Move-buffer-creation-into-the-resource.patch - patch_apply wined3d-CSMT_Main/0025-wined3d-Handle-WINED3D_LOCATION_DISCARDED-in-surface.patch - patch_apply wined3d-CSMT_Main/0026-wined3d-Handle-LOCATION_DISCARDED-in-surface_load_dr.patch - patch_apply wined3d-CSMT_Main/0027-wined3d-Handle-WINED3D_LOCATION_DISCARDED-for-sysmem.patch - patch_apply wined3d-CSMT_Main/0028-wined3d-Discard-implicit-surfaces-on-unload.patch - patch_apply wined3d-CSMT_Main/0029-wined3d-Don-t-try-to-flip-sysmem-copies-in-swapchain.patch - patch_apply wined3d-CSMT_Main/0030-wined3d-Discard-the-backbuffer-in-discard-presents.patch - patch_apply wined3d-CSMT_Main/0031-wined3d-Allocate-sysmem-for-client-storage-if-it-doe.patch - patch_apply wined3d-CSMT_Main/0032-wined3d-Introduce-a-function-to-retrieve-resource-me.patch - patch_apply wined3d-CSMT_Main/0033-wined3d-Make-surface_ops-unmap-specific-for-front-bu.patch - patch_apply wined3d-CSMT_Main/0034-wined3d-Move-check_block_align-to-resource.c.patch - patch_apply wined3d-CSMT_Main/0035-wined3d-Replace-surface-alloc-functions-with-resourc.patch - patch_apply wined3d-CSMT_Main/0036-wined3d-Don-t-delete-the-buffer-in-surface_cleanup.patch - patch_apply wined3d-CSMT_Main/0037-wined3d-Use-resource-facilities-to-destroy-PBOs.patch - patch_apply wined3d-CSMT_Main/0038-wined3d-Move-simple-location-copying-to-the-resource.patch - patch_apply wined3d-CSMT_Main/0039-wined3d-Move-most-of-volume_map-to-resource.c.patch - patch_apply wined3d-CSMT_Main/0040-wined3d-Use-resource_map-for-surface_map.patch - patch_apply wined3d-CSMT_Main/0041-wined3d-Use-client-storage-with-DIB-sections.patch + patch_apply wined3d-CSMT_Main/0002-wined3d-Pass-a-context-to-read_from_framebuffer.patch + patch_apply wined3d-CSMT_Main/0003-wined3d-Pass-a-context-to-surface_load_drawable-and-.patch + patch_apply wined3d-CSMT_Main/0004-wined3d-Pass-a-context-to-surface_blt_fbo.patch + patch_apply wined3d-CSMT_Main/0005-wined3d-Pass-a-context-to-surface_multisample_resolv.patch + patch_apply wined3d-CSMT_Main/0006-wined3d-Pass-a-context-to-surface_load_texture.patch + patch_apply wined3d-CSMT_Main/0007-wined3d-Pass-a-context-to-surface_load_location.patch + patch_apply wined3d-CSMT_Main/0008-wined3d-Make-surface_load_location-return-nothing.patch + patch_apply wined3d-CSMT_Main/0009-wined3d-Store-volume-locations-in-the-resource.patch + patch_apply wined3d-CSMT_Main/0010-wined3d-Move-validate_location-to-resource.c.patch + patch_apply wined3d-CSMT_Main/0011-wined3d-Move-surface-locations-into-the-resource.patch + patch_apply wined3d-CSMT_Main/0012-wined3d-Remove-surface_validate_location.patch + patch_apply wined3d-CSMT_Main/0013-wined3d-Move-invalidate_location-to-resource.c.patch + patch_apply wined3d-CSMT_Main/0014-wined3d-Invalidate-containers-via-callback.patch + patch_apply wined3d-CSMT_Main/0015-wined3d-Remove-surface_invalidate_location.patch + patch_apply wined3d-CSMT_Main/0016-wined3d-Move-bitmap_data-and-user_memory-into-the-re.patch + patch_apply wined3d-CSMT_Main/0017-wined3d-Move-load_location-into-the-resource.patch + patch_apply wined3d-CSMT_Main/0018-wined3d-Replace-surface_load_location-with-resource_.patch + patch_apply wined3d-CSMT_Main/0019-wined3d-Introduce-helper-functions-for-mapping-volum.patch + patch_apply wined3d-CSMT_Main/0020-wined3d-Move-volume-PBO-infrastructure-into-the-reso.patch + patch_apply wined3d-CSMT_Main/0021-wined3d-Remove-surface-pbo.patch + patch_apply wined3d-CSMT_Main/0022-wined3d-Use-resource-buffer-mapping-facilities-in-su.patch + patch_apply wined3d-CSMT_Main/0023-wined3d-Move-buffer-creation-into-the-resource.patch + patch_apply wined3d-CSMT_Main/0024-wined3d-Handle-WINED3D_LOCATION_DISCARDED-in-surface.patch + patch_apply wined3d-CSMT_Main/0025-wined3d-Handle-LOCATION_DISCARDED-in-surface_load_dr.patch + patch_apply wined3d-CSMT_Main/0026-wined3d-Handle-WINED3D_LOCATION_DISCARDED-for-sysmem.patch + patch_apply wined3d-CSMT_Main/0027-wined3d-Discard-implicit-surfaces-on-unload.patch + patch_apply wined3d-CSMT_Main/0028-wined3d-Don-t-try-to-flip-sysmem-copies-in-swapchain.patch + patch_apply wined3d-CSMT_Main/0029-wined3d-Discard-the-backbuffer-in-discard-presents.patch + patch_apply wined3d-CSMT_Main/0030-wined3d-Allocate-sysmem-for-client-storage-if-it-doe.patch + patch_apply wined3d-CSMT_Main/0031-wined3d-Introduce-a-function-to-retrieve-resource-me.patch + patch_apply wined3d-CSMT_Main/0032-wined3d-Make-surface_ops-unmap-specific-for-front-bu.patch + patch_apply wined3d-CSMT_Main/0033-wined3d-Move-check_block_align-to-resource.c.patch + patch_apply wined3d-CSMT_Main/0034-wined3d-Replace-surface-alloc-functions-with-resourc.patch + patch_apply wined3d-CSMT_Main/0035-wined3d-Don-t-delete-the-buffer-in-surface_cleanup.patch + patch_apply wined3d-CSMT_Main/0036-wined3d-Use-resource-facilities-to-destroy-PBOs.patch + patch_apply wined3d-CSMT_Main/0037-wined3d-Move-simple-location-copying-to-the-resource.patch + patch_apply wined3d-CSMT_Main/0038-wined3d-Move-most-of-volume_map-to-resource.c.patch + patch_apply wined3d-CSMT_Main/0039-wined3d-Use-resource_map-for-surface_map.patch + patch_apply wined3d-CSMT_Main/0040-wined3d-Use-client-storage-with-DIB-sections.patch + patch_apply wined3d-CSMT_Main/0041-wined3d-Don-t-call-the-public-map-function-in-surfac.patch patch_apply wined3d-CSMT_Main/0042-wined3d-Don-t-call-the-public-map-function-in-surfac.patch - patch_apply wined3d-CSMT_Main/0043-wined3d-Don-t-call-the-public-map-function-in-surfac.patch - patch_apply wined3d-CSMT_Main/0044-wined3d-Move-the-framebuffer-into-wined3d_state.patch - patch_apply wined3d-CSMT_Main/0045-wined3d-Get-rid-of-state-access-in-shader_generate_g.patch - patch_apply wined3d-CSMT_Main/0046-wined3d-Preload-buffers-if-streamsrc-is-not-dirty.patch - patch_apply wined3d-CSMT_Main/0047-wined3d-Hackily-introduce-a-multithreaded-command-st.patch - patch_apply wined3d-CSMT_Main/0048-wined3d-Wait-for-resource-updates-to-finish-when-usi.patch - patch_apply wined3d-CSMT_Main/0049-wined3d-Don-t-store-pointers-in-struct-wined3d_cs_pr.patch - patch_apply wined3d-CSMT_Main/0050-wined3d-Don-t-put-rectangle-pointers-into-wined3d_cs.patch - patch_apply wined3d-CSMT_Main/0051-wined3d-Store-the-color-in-clear-ops-instead-of-a-po.patch - patch_apply wined3d-CSMT_Main/0052-wined3d-Pass-the-state-to-draw_primitive.patch - patch_apply wined3d-CSMT_Main/0053-wined3d-Wait-for-the-cs-before-destroying-objects.patch - patch_apply wined3d-CSMT_Main/0054-wined3d-Give-the-cs-its-own-state.patch - patch_apply wined3d-CSMT_Main/0055-wined3d-Send-float-constant-updates-through-the-comm.patch - patch_apply wined3d-CSMT_Main/0056-wined3d-Request-a-glFinish-before-modifying-resource.patch - patch_apply wined3d-CSMT_Main/0057-wined3d-Finish-the-cs-before-changing-the-texture-lo.patch - patch_apply wined3d-CSMT_Main/0058-wined3d-Don-t-call-glFinish-after-clears.patch - patch_apply wined3d-CSMT_Main/0059-wined3d-Don-t-call-glFinish-after-draws.patch - patch_apply wined3d-CSMT_Main/0060-wined3d-Shadow-device-offscreenBuffer-in-the-context.patch - patch_apply wined3d-CSMT_Main/0061-wined3d-Don-t-access-the-stateblock-in-find_draw_buf.patch - patch_apply wined3d-CSMT_Main/0062-wined3d-Pass-the-depth-stencil-to-swapchain-present.patch - patch_apply wined3d-CSMT_Main/0063-wined3d-Don-t-store-viewport-pointers-in-the-command.patch - patch_apply wined3d-CSMT_Main/0064-wined3d-Keep-track-of-the-onscreen-depth-stencil-in-.patch - patch_apply wined3d-CSMT_Main/0065-wined3d-Send-base-vertex-index-updates-through-the-c.patch - patch_apply wined3d-CSMT_Main/0066-wined3d-Send-primitive-type-updates-through-the-comm.patch - patch_apply wined3d-CSMT_Main/0067-wined3d-Send-bool-constant-updates-through-the-comma.patch - patch_apply wined3d-CSMT_Main/0068-wined3d-Send-int-constant-updates-through-the-comman.patch - patch_apply wined3d-CSMT_Main/0069-wined3d-Send-light-updates-through-the-command-strea.patch - patch_apply wined3d-CSMT_Main/0070-wined3d-Prevent-the-command-stream-from-running-ahea.patch - patch_apply wined3d-CSMT_Main/0071-wined3d-Wait-for-the-cs-to-finish-before-destroying-.patch - patch_apply wined3d-CSMT_Main/0072-wined3d-Run-the-cs-asynchronously.patch - patch_apply wined3d-CSMT_Main/0073-wined3d-Send-blits-through-the-command-stream.patch - patch_apply wined3d-CSMT_Main/0074-wined3d-Put-update_surface-checks-back-in-place.patch - patch_apply wined3d-CSMT_Main/0075-wined3d-Get-rid-of-WINED3D_BUFFER_FLUSH.patch - patch_apply wined3d-CSMT_Main/0076-wined3d-Don-t-force-strict-draw-ordering-for-multith.patch - patch_apply wined3d-CSMT_Main/0077-wined3d-Send-render-target-view-clears-through-the-c.patch - patch_apply wined3d-CSMT_Main/0078-wined3d-Wait-for-the-CS-in-GetDC.patch - patch_apply wined3d-CSMT_Main/0079-wined3d-send-resource-maps-through-the-command-strea.patch - patch_apply wined3d-CSMT_Main/0080-wined3d-Get-rid-of-the-end_scene-flush-and-finish.patch - patch_apply wined3d-CSMT_Main/0081-wined3d-Replace-the-linked-lists-with-a-ringbuffer.patch - patch_apply wined3d-CSMT_Main/0082-wined3d-Don-t-preload-buffers-on-unmap.patch - patch_apply wined3d-CSMT_Main/0083-wined3d-Don-t-call-glFinish-before-swapping.patch - patch_apply wined3d-CSMT_Main/0084-wined3d-wined3d_-_query_issue-never-fails.patch - patch_apply wined3d-CSMT_Main/0085-wined3d-Add-query-support-to-the-command-stream.patch - patch_apply wined3d-CSMT_Main/0086-wined3d-Check-our-CS-state-to-find-out-if-a-query-is.patch - patch_apply wined3d-CSMT_Main/0087-wined3d-Poll-queries-automatically-in-the-CS.patch - patch_apply wined3d-CSMT_Main/0088-wined3d-Introduce-a-separate-queue-for-priority-comm.patch - patch_apply wined3d-CSMT_Main/0089-wined3d-Destroy-queries-through-the-CS.patch - patch_apply wined3d-CSMT_Main/0090-wined3d-Separate-main-and-worker-thread-query-state.patch - patch_apply wined3d-CSMT_Main/0091-wined3d-Don-t-poll-queries-that-failed-to-start.patch - patch_apply wined3d-CSMT_Main/0092-wined3d-Remove-restated-queries-from-the-poll-list.patch - patch_apply wined3d-CSMT_Main/0093-wined3d-Don-t-reset-the-query-state-if-it-doesn-t-ha.patch - patch_apply wined3d-CSMT_Main/0094-wined3d-Put-this-into-the-query-poll-patch.patch - patch_apply wined3d-CSMT_Main/0095-wined3d-Send-update_surface-commands-through-the-CS.patch - patch_apply wined3d-CSMT_Main/0096-wined3d-Send-texture-preloads-through-the-CS.patch - patch_apply wined3d-CSMT_Main/0097-wined3d-Send-surface-preloads-through-the-CS.patch - patch_apply wined3d-CSMT_Main/0098-wined3d-Send-update_texture-calls-through-the-CS.patch - patch_apply wined3d-CSMT_Main/0099-wined3d-Get-rid-of-the-surface_upload_data-glFinish.patch - patch_apply wined3d-CSMT_Main/0100-wined3d-Don-t-lock-the-src-volume-in-device_update_v.patch - patch_apply wined3d-CSMT_Main/0101-wined3d-Handle-evit_managed_resources-through-the-CS.patch - patch_apply wined3d-CSMT_Main/0102-wined3d-Introduce-resource-fencing.patch - patch_apply wined3d-CSMT_Main/0103-wined3d-Fence-update_texture-and-update_surface-call.patch - patch_apply wined3d-CSMT_Main/0104-wined3d-Dirtify-resources-on-unmap.patch - patch_apply wined3d-CSMT_Main/0105-wined3d-Fence-texture-reads-in-draws.patch - patch_apply wined3d-CSMT_Main/0106-wined3d-Fence-render-targets-and-depth-stencils.patch - patch_apply wined3d-CSMT_Main/0107-wined3d-Fence-blit-operations.patch - patch_apply wined3d-CSMT_Main/0108-wined3d-Fence-color_fill-operations.patch - patch_apply wined3d-CSMT_Main/0109-wined3d-Fence-clear-calls.patch - patch_apply wined3d-CSMT_Main/0110-wined3d-Fence-present-calls.patch - patch_apply wined3d-CSMT_Main/0111-wined3d-Make-resource-maps-and-unmaps-a-priority-com.patch - patch_apply wined3d-CSMT_Main/0112-wined3d-Dirtify-changed-textures-through-the-command.patch - patch_apply wined3d-CSMT_Main/0113-wined3d-Wrap-GL-BOs-in-a-structure.patch - patch_apply wined3d-CSMT_Main/0114-wined3d-Separate-resource-map-and-draw-buffers.patch - patch_apply wined3d-CSMT_Main/0115-wined3d-Implement-DISCARD-resource-maps-with-buffers.patch - patch_apply wined3d-CSMT_Main/0116-wined3d-Implement-DISCARD-resource-maps-with-heap-me.patch - patch_apply wined3d-CSMT_Main/0117-wined3d-Unset-some-objects-in-state_init_default.patch - patch_apply wined3d-CSMT_Main/0118-wined3d-Don-t-request-the-frontbuffer-to-create-dumm.patch - patch_apply wined3d-CSMT_Main/0119-wined3d-Use-double-buffered-buffers-for-multithreade.patch - patch_apply wined3d-CSMT_Main/0120-wined3d-Don-t-synchronize-NOOVERWRITE-buffer-maps.patch - patch_apply wined3d-CSMT_Main/0121-wined3d-Separate-buffer-map-write-and-draw-read-memo.patch - patch_apply wined3d-CSMT_Main/0122-wined3d-Accelerate-DISCARD-buffer-maps.patch - patch_apply wined3d-CSMT_Main/0123-wined3d-Accelerate-READONLY-buffer-maps.patch - patch_apply wined3d-CSMT_Main/0124-wined3d-Access-the-buffer-dirty-areas-through-the-CS.patch - patch_apply wined3d-CSMT_Main/0125-wined3d-Ignore-buffer-resource.map_count-in-the-CS.patch - patch_apply wined3d-CSMT_Main/0126-wined3d-Send-buffer-preloads-through-the-CS.patch - patch_apply wined3d-CSMT_Main/0127-wined3d-Use-glBufferSubData-instead-of-glMapBufferRa.patch - patch_apply wined3d-CSMT_Main/0128-wined3d-Separate-GL-buffer-discard-control-from-igno.patch - patch_apply wined3d-CSMT_Main/0129-wined3d-Create-buffers-before-mapping-them.patch - patch_apply wined3d-CSMT_Main/0130-wined3d-Destroy-views-through-the-CS.patch - patch_apply wined3d-CSMT_Main/0131-wined3d-Remove-another-glFinish.patch - patch_apply wined3d-CSMT_Main/0132-wined3d-Destroy-vertex-declarations-through-the-CS.patch - patch_apply wined3d-CSMT_Main/0133-wined3d-Destroy-shaders-through-the-CS.patch - patch_apply wined3d-CSMT_Main/0134-wined3d-Create-VBOs-through-the-command-stream.patch - patch_apply wined3d-CSMT_Main/0135-wined3d-Clean-up-resource-data-through-the-CS.patch - patch_apply wined3d-CSMT_Main/0136-wined3d-Clean-up-buffer-resource-data-through-the-CS.patch - patch_apply wined3d-CSMT_Main/0137-wined3d-Clean-up-volume-resource-data-through-the-CS.patch - patch_apply wined3d-CSMT_Main/0138-wined3d-Clean-up-surfaces-through-the-cs.patch - patch_apply wined3d-CSMT_Main/0139-wined3d-Clean-up-texture-resources-through-the-cs.patch - patch_apply wined3d-CSMT_Main/0140-wined3d-Unload-resources-through-the-CS-in-uninit_3d.patch - patch_apply wined3d-CSMT_Main/0141-wined3d-Unload-resources-through-the-CS-in-device_re.patch - patch_apply wined3d-CSMT_Main/0142-wined3d-Don-t-glFinish-after-a-depth-buffer-blit.patch - patch_apply wined3d-CSMT_Main/0143-wined3d-Remove-software-cursor-support.patch - patch_apply wined3d-CSMT_Main/0144-wined3d-Create-dummy-textures-through-the-CS.patch - patch_apply wined3d-CSMT_Main/0145-wined3d-Create-the-initial-context-through-the-CS.patch - patch_apply wined3d-CSMT_Main/0146-wined3d-Recreate-ctx-and-dummy-textures-through-the-.patch - patch_apply wined3d-CSMT_Main/0147-wined3d-Ignore-WINED3D_MAP_NO_DIRTY_UPDATE-in-resour.patch - patch_apply wined3d-CSMT_Main/0148-wined3d-Delete-GL-contexts-through-the-CS-in-reset.patch - patch_apply wined3d-CSMT_Main/0149-wined3d-Delete-GL-contexts-through-the-CS-in-uninit_.patch - patch_apply wined3d-CSMT_Main/0150-wined3d-Invoke-surface_unload-through-the-CS-in-wine.patch - patch_apply wined3d-CSMT_Main/0151-wined3d-Use-an-event-to-block-the-worker-thread-when.patch - patch_apply wined3d-CSMT_Main/0152-wined3d-Fence-preload-operations.patch - patch_apply wined3d-CSMT_Main/0153-d3d8-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch - patch_apply wined3d-CSMT_Main/0154-d3d9-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch - patch_apply wined3d-CSMT_Main/0155-wined3d-Completely-reset-the-state-on-reset.patch - patch_apply wined3d-CSMT_Main/0156-wined3d-Send-getdc-and-releasedc-through-the-command.patch - patch_apply wined3d-CSMT_Main/0157-wined3d-Set-map_heap_memory-NULL-when-allocating-a-P.patch - patch_apply wined3d-CSMT_Main/0158-wined3d-Wait-only-for-the-buffer-to-be-idle.patch - patch_apply wined3d-CSMT_Main/0159-wined3d-Add-a-comment-about-worker-thread-lag.patch - patch_apply wined3d-CSMT_Main/0160-wined3d-Remove-the-texture-destroy-glFinish.patch - patch_apply wined3d-CSMT_Main/0161-wined3d-Move-FBO-destruction-into-the-worker-thread.patch - patch_apply wined3d-CSMT_Main/0162-wined3d-Don-t-incref-decref-textures-in-color-depth-.patch - patch_apply wined3d-CSMT_Main/0163-Winex11-complain-about-glfinish.patch - patch_apply wined3d-CSMT_Main/0164-wined3d-Make-sure-the-new-window-is-set-up-before-se.patch - patch_apply wined3d-CSMT_Main/0165-wined3d-Remove-the-device_reset-CS-sync-fixme.patch - patch_apply wined3d-CSMT_Main/0166-wined3d-Put-GL_APPLE_flush_buffer_range-syncing-back.patch - patch_apply wined3d-CSMT_Main/0167-wined3d-Wait-for-the-resource-to-be-idle-when-destro.patch - patch_apply wined3d-CSMT_Main/0168-wined3d-Don-t-sync-on-redundant-discard-calls.patch - patch_apply wined3d-CSMT_Main/0169-wined3d-Don-t-discard-new-buffers.patch - patch_apply wined3d-CSMT_Main/0170-wined3d-Don-t-try-to-sync-VBOs-manually-on-OSX-with-.patch - patch_apply wined3d-CSMT_Main/0171-wined3d-Render-target-lock-hack.patch - patch_apply wined3d-CSMT_Main/0172-wined3d-Avoid-calling-wined3d_surface_blt-from-surfa.patch - patch_apply wined3d-CSMT_Main/0173-wined3d-Only-discard-buffers-that-are-in-use.patch - patch_apply wined3d-CSMT_Main/0174-wined3d-Destroy-samplers-through-the-command-stream.patch - patch_apply wined3d-CSMT_Main/0175-wined3d-Hack-to-reject-unsupported-color-fills.patch - patch_apply wined3d-CSMT_Main/0176-wined3d-Alloc-the-buffer-map-array-before-mapping-th.patch - patch_apply wined3d-CSMT_Main/0177-wined3d-Send-update_sub_resource-calls-through-the-c.patch + patch_apply wined3d-CSMT_Main/0043-wined3d-Move-the-framebuffer-into-wined3d_state.patch + patch_apply wined3d-CSMT_Main/0044-wined3d-Get-rid-of-state-access-in-shader_generate_g.patch + patch_apply wined3d-CSMT_Main/0045-wined3d-Preload-buffers-if-streamsrc-is-not-dirty.patch + patch_apply wined3d-CSMT_Main/0046-wined3d-Hackily-introduce-a-multithreaded-command-st.patch + patch_apply wined3d-CSMT_Main/0047-wined3d-Wait-for-resource-updates-to-finish-when-usi.patch + patch_apply wined3d-CSMT_Main/0048-wined3d-Don-t-store-pointers-in-struct-wined3d_cs_pr.patch + patch_apply wined3d-CSMT_Main/0049-wined3d-Don-t-put-rectangle-pointers-into-wined3d_cs.patch + patch_apply wined3d-CSMT_Main/0050-wined3d-Store-the-color-in-clear-ops-instead-of-a-po.patch + patch_apply wined3d-CSMT_Main/0051-wined3d-Pass-the-state-to-draw_primitive.patch + patch_apply wined3d-CSMT_Main/0052-wined3d-Wait-for-the-cs-before-destroying-objects.patch + patch_apply wined3d-CSMT_Main/0053-wined3d-Give-the-cs-its-own-state.patch + patch_apply wined3d-CSMT_Main/0054-wined3d-Send-float-constant-updates-through-the-comm.patch + patch_apply wined3d-CSMT_Main/0055-wined3d-Request-a-glFinish-before-modifying-resource.patch + patch_apply wined3d-CSMT_Main/0056-wined3d-Finish-the-cs-before-changing-the-texture-lo.patch + patch_apply wined3d-CSMT_Main/0057-wined3d-Don-t-call-glFinish-after-clears.patch + patch_apply wined3d-CSMT_Main/0058-wined3d-Don-t-call-glFinish-after-draws.patch + patch_apply wined3d-CSMT_Main/0059-wined3d-Shadow-device-offscreenBuffer-in-the-context.patch + patch_apply wined3d-CSMT_Main/0060-wined3d-Don-t-access-the-stateblock-in-find_draw_buf.patch + patch_apply wined3d-CSMT_Main/0061-wined3d-Pass-the-depth-stencil-to-swapchain-present.patch + patch_apply wined3d-CSMT_Main/0062-wined3d-Don-t-store-viewport-pointers-in-the-command.patch + patch_apply wined3d-CSMT_Main/0063-wined3d-Keep-track-of-the-onscreen-depth-stencil-in-.patch + patch_apply wined3d-CSMT_Main/0064-wined3d-Send-base-vertex-index-updates-through-the-c.patch + patch_apply wined3d-CSMT_Main/0065-wined3d-Send-primitive-type-updates-through-the-comm.patch + patch_apply wined3d-CSMT_Main/0066-wined3d-Send-bool-constant-updates-through-the-comma.patch + patch_apply wined3d-CSMT_Main/0067-wined3d-Send-int-constant-updates-through-the-comman.patch + patch_apply wined3d-CSMT_Main/0068-wined3d-Send-light-updates-through-the-command-strea.patch + patch_apply wined3d-CSMT_Main/0069-wined3d-Prevent-the-command-stream-from-running-ahea.patch + patch_apply wined3d-CSMT_Main/0070-wined3d-Wait-for-the-cs-to-finish-before-destroying-.patch + patch_apply wined3d-CSMT_Main/0071-wined3d-Run-the-cs-asynchronously.patch + patch_apply wined3d-CSMT_Main/0072-wined3d-Send-blits-through-the-command-stream.patch + patch_apply wined3d-CSMT_Main/0073-wined3d-Put-update_surface-checks-back-in-place.patch + patch_apply wined3d-CSMT_Main/0074-wined3d-Get-rid-of-WINED3D_BUFFER_FLUSH.patch + patch_apply wined3d-CSMT_Main/0075-wined3d-Don-t-force-strict-draw-ordering-for-multith.patch + patch_apply wined3d-CSMT_Main/0076-wined3d-Send-render-target-view-clears-through-the-c.patch + patch_apply wined3d-CSMT_Main/0077-wined3d-Wait-for-the-CS-in-GetDC.patch + patch_apply wined3d-CSMT_Main/0078-wined3d-send-resource-maps-through-the-command-strea.patch + patch_apply wined3d-CSMT_Main/0079-wined3d-Get-rid-of-the-end_scene-flush-and-finish.patch + patch_apply wined3d-CSMT_Main/0080-wined3d-Replace-the-linked-lists-with-a-ringbuffer.patch + patch_apply wined3d-CSMT_Main/0081-wined3d-Don-t-preload-buffers-on-unmap.patch + patch_apply wined3d-CSMT_Main/0082-wined3d-Don-t-call-glFinish-before-swapping.patch + patch_apply wined3d-CSMT_Main/0083-wined3d-wined3d_-_query_issue-never-fails.patch + patch_apply wined3d-CSMT_Main/0084-wined3d-Add-query-support-to-the-command-stream.patch + patch_apply wined3d-CSMT_Main/0085-wined3d-Check-our-CS-state-to-find-out-if-a-query-is.patch + patch_apply wined3d-CSMT_Main/0086-wined3d-Poll-queries-automatically-in-the-CS.patch + patch_apply wined3d-CSMT_Main/0087-wined3d-Introduce-a-separate-queue-for-priority-comm.patch + patch_apply wined3d-CSMT_Main/0088-wined3d-Destroy-queries-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0089-wined3d-Separate-main-and-worker-thread-query-state.patch + patch_apply wined3d-CSMT_Main/0090-wined3d-Don-t-poll-queries-that-failed-to-start.patch + patch_apply wined3d-CSMT_Main/0091-wined3d-Remove-restated-queries-from-the-poll-list.patch + patch_apply wined3d-CSMT_Main/0092-wined3d-Don-t-reset-the-query-state-if-it-doesn-t-ha.patch + patch_apply wined3d-CSMT_Main/0093-wined3d-Put-this-into-the-query-poll-patch.patch + patch_apply wined3d-CSMT_Main/0094-wined3d-Send-update_surface-commands-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0095-wined3d-Send-texture-preloads-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0096-wined3d-Send-surface-preloads-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0097-wined3d-Send-update_texture-calls-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0098-wined3d-Get-rid-of-the-surface_upload_data-glFinish.patch + patch_apply wined3d-CSMT_Main/0099-wined3d-Don-t-lock-the-src-volume-in-device_update_v.patch + patch_apply wined3d-CSMT_Main/0100-wined3d-Handle-evit_managed_resources-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0101-wined3d-Introduce-resource-fencing.patch + patch_apply wined3d-CSMT_Main/0102-wined3d-Fence-update_texture-and-update_surface-call.patch + patch_apply wined3d-CSMT_Main/0103-wined3d-Dirtify-resources-on-unmap.patch + patch_apply wined3d-CSMT_Main/0104-wined3d-Fence-texture-reads-in-draws.patch + patch_apply wined3d-CSMT_Main/0105-wined3d-Fence-render-targets-and-depth-stencils.patch + patch_apply wined3d-CSMT_Main/0106-wined3d-Fence-blit-operations.patch + patch_apply wined3d-CSMT_Main/0107-wined3d-Fence-color_fill-operations.patch + patch_apply wined3d-CSMT_Main/0108-wined3d-Fence-clear-calls.patch + patch_apply wined3d-CSMT_Main/0109-wined3d-Fence-present-calls.patch + patch_apply wined3d-CSMT_Main/0110-wined3d-Make-resource-maps-and-unmaps-a-priority-com.patch + patch_apply wined3d-CSMT_Main/0111-wined3d-Dirtify-changed-textures-through-the-command.patch + patch_apply wined3d-CSMT_Main/0112-wined3d-Wrap-GL-BOs-in-a-structure.patch + patch_apply wined3d-CSMT_Main/0113-wined3d-Separate-resource-map-and-draw-buffers.patch + patch_apply wined3d-CSMT_Main/0114-wined3d-Implement-DISCARD-resource-maps-with-buffers.patch + patch_apply wined3d-CSMT_Main/0115-wined3d-Implement-DISCARD-resource-maps-with-heap-me.patch + patch_apply wined3d-CSMT_Main/0116-wined3d-Unset-some-objects-in-state_init_default.patch + patch_apply wined3d-CSMT_Main/0117-wined3d-Don-t-request-the-frontbuffer-to-create-dumm.patch + patch_apply wined3d-CSMT_Main/0118-wined3d-Use-double-buffered-buffers-for-multithreade.patch + patch_apply wined3d-CSMT_Main/0119-wined3d-Don-t-synchronize-NOOVERWRITE-buffer-maps.patch + patch_apply wined3d-CSMT_Main/0120-wined3d-Separate-buffer-map-write-and-draw-read-memo.patch + patch_apply wined3d-CSMT_Main/0121-wined3d-Accelerate-DISCARD-buffer-maps.patch + patch_apply wined3d-CSMT_Main/0122-wined3d-Accelerate-READONLY-buffer-maps.patch + patch_apply wined3d-CSMT_Main/0123-wined3d-Access-the-buffer-dirty-areas-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0124-wined3d-Ignore-buffer-resource.map_count-in-the-CS.patch + patch_apply wined3d-CSMT_Main/0125-wined3d-Send-buffer-preloads-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0126-wined3d-Use-glBufferSubData-instead-of-glMapBufferRa.patch + patch_apply wined3d-CSMT_Main/0127-wined3d-Separate-GL-buffer-discard-control-from-igno.patch + patch_apply wined3d-CSMT_Main/0128-wined3d-Create-buffers-before-mapping-them.patch + patch_apply wined3d-CSMT_Main/0129-wined3d-Destroy-views-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0130-wined3d-Remove-another-glFinish.patch + patch_apply wined3d-CSMT_Main/0131-wined3d-Destroy-vertex-declarations-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0132-wined3d-Destroy-shaders-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0133-wined3d-Create-VBOs-through-the-command-stream.patch + patch_apply wined3d-CSMT_Main/0134-wined3d-Clean-up-resource-data-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0135-wined3d-Clean-up-buffer-resource-data-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0136-wined3d-Clean-up-volume-resource-data-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0137-wined3d-Clean-up-surfaces-through-the-cs.patch + patch_apply wined3d-CSMT_Main/0138-wined3d-Clean-up-texture-resources-through-the-cs.patch + patch_apply wined3d-CSMT_Main/0139-wined3d-Unload-resources-through-the-CS-in-uninit_3d.patch + patch_apply wined3d-CSMT_Main/0140-wined3d-Unload-resources-through-the-CS-in-device_re.patch + patch_apply wined3d-CSMT_Main/0141-wined3d-Don-t-glFinish-after-a-depth-buffer-blit.patch + patch_apply wined3d-CSMT_Main/0142-wined3d-Remove-software-cursor-support.patch + patch_apply wined3d-CSMT_Main/0143-wined3d-Create-dummy-textures-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0144-wined3d-Create-the-initial-context-through-the-CS.patch + patch_apply wined3d-CSMT_Main/0145-wined3d-Recreate-ctx-and-dummy-textures-through-the-.patch + patch_apply wined3d-CSMT_Main/0146-wined3d-Ignore-WINED3D_MAP_NO_DIRTY_UPDATE-in-resour.patch + patch_apply wined3d-CSMT_Main/0147-wined3d-Delete-GL-contexts-through-the-CS-in-reset.patch + patch_apply wined3d-CSMT_Main/0148-wined3d-Delete-GL-contexts-through-the-CS-in-uninit_.patch + patch_apply wined3d-CSMT_Main/0149-wined3d-Invoke-surface_unload-through-the-CS-in-wine.patch + patch_apply wined3d-CSMT_Main/0150-wined3d-Use-an-event-to-block-the-worker-thread-when.patch + patch_apply wined3d-CSMT_Main/0151-wined3d-Fence-preload-operations.patch + patch_apply wined3d-CSMT_Main/0152-d3d8-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch + patch_apply wined3d-CSMT_Main/0153-d3d9-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch + patch_apply wined3d-CSMT_Main/0154-wined3d-Completely-reset-the-state-on-reset.patch + patch_apply wined3d-CSMT_Main/0155-wined3d-Send-getdc-and-releasedc-through-the-command.patch + patch_apply wined3d-CSMT_Main/0156-wined3d-Set-map_heap_memory-NULL-when-allocating-a-P.patch + patch_apply wined3d-CSMT_Main/0157-wined3d-Wait-only-for-the-buffer-to-be-idle.patch + patch_apply wined3d-CSMT_Main/0158-wined3d-Add-a-comment-about-worker-thread-lag.patch + patch_apply wined3d-CSMT_Main/0159-wined3d-Remove-the-texture-destroy-glFinish.patch + patch_apply wined3d-CSMT_Main/0160-wined3d-Move-FBO-destruction-into-the-worker-thread.patch + patch_apply wined3d-CSMT_Main/0161-wined3d-Don-t-incref-decref-textures-in-color-depth-.patch + patch_apply wined3d-CSMT_Main/0162-Winex11-complain-about-glfinish.patch + patch_apply wined3d-CSMT_Main/0163-wined3d-Make-sure-the-new-window-is-set-up-before-se.patch + patch_apply wined3d-CSMT_Main/0164-wined3d-Remove-the-device_reset-CS-sync-fixme.patch + patch_apply wined3d-CSMT_Main/0165-wined3d-Put-GL_APPLE_flush_buffer_range-syncing-back.patch + patch_apply wined3d-CSMT_Main/0166-wined3d-Wait-for-the-resource-to-be-idle-when-destro.patch + patch_apply wined3d-CSMT_Main/0167-wined3d-Don-t-sync-on-redundant-discard-calls.patch + patch_apply wined3d-CSMT_Main/0168-wined3d-Don-t-discard-new-buffers.patch + patch_apply wined3d-CSMT_Main/0169-wined3d-Don-t-try-to-sync-VBOs-manually-on-OSX-with-.patch + patch_apply wined3d-CSMT_Main/0170-wined3d-Render-target-lock-hack.patch + patch_apply wined3d-CSMT_Main/0171-wined3d-Avoid-calling-wined3d_surface_blt-from-surfa.patch + patch_apply wined3d-CSMT_Main/0172-wined3d-Only-discard-buffers-that-are-in-use.patch + patch_apply wined3d-CSMT_Main/0173-wined3d-Destroy-samplers-through-the-command-stream.patch + patch_apply wined3d-CSMT_Main/0174-wined3d-Hack-to-reject-unsupported-color-fills.patch + patch_apply wined3d-CSMT_Main/0175-wined3d-Alloc-the-buffer-map-array-before-mapping-th.patch + patch_apply wined3d-CSMT_Main/0176-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 ( echo '+ { "Stefan Dösinger", "wined3d: Merge get_pitch functions.", 1 },'; - echo '+ { "Stefan Dösinger", "wined3d: Pass a context to surface_load_sysmem.", 1 },'; echo '+ { "Stefan Dösinger", "wined3d: Pass a context to read_from_framebuffer.", 1 },'; echo '+ { "Stefan Dösinger", "wined3d: Pass a context to surface_load_drawable and surface_blt_to_drawable.", 1 },'; echo '+ { "Stefan Dösinger", "wined3d: Pass a context to surface_blt_fbo.", 1 },'; diff --git a/patches/wined3d-CSMT_Main/0003-wined3d-Pass-a-context-to-read_from_framebuffer.patch b/patches/wined3d-CSMT_Main/0002-wined3d-Pass-a-context-to-read_from_framebuffer.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0003-wined3d-Pass-a-context-to-read_from_framebuffer.patch rename to patches/wined3d-CSMT_Main/0002-wined3d-Pass-a-context-to-read_from_framebuffer.patch diff --git a/patches/wined3d-CSMT_Main/0002-wined3d-Pass-a-context-to-surface_load_sysmem.patch b/patches/wined3d-CSMT_Main/0002-wined3d-Pass-a-context-to-surface_load_sysmem.patch deleted file mode 100644 index 6c8a7df9..00000000 --- a/patches/wined3d-CSMT_Main/0002-wined3d-Pass-a-context-to-surface_load_sysmem.patch +++ /dev/null @@ -1,79 +0,0 @@ -From d802d551603f20fde872cf45d43064426bea4434 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Stefan=20D=C3=B6singer?= -Date: Sun, 17 Nov 2013 19:10:18 +0100 -Subject: wined3d: Pass a context to surface_load_sysmem. - ---- - dlls/wined3d/surface.c | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) - -diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c -index d9b1846..3877139 100644 ---- a/dlls/wined3d/surface.c -+++ b/dlls/wined3d/surface.c -@@ -4010,9 +4010,12 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD - memcpy(dst.addr, src.addr, size); - } - -+/* Context activation is done by the caller. */ - static void surface_load_sysmem(struct wined3d_surface *surface, -- const struct wined3d_gl_info *gl_info, DWORD dst_location) -+ struct wined3d_context *context, DWORD dst_location) - { -+ const struct wined3d_gl_info *gl_info = context->gl_info; -+ - if (surface->locations & surface_simple_locations) - { - surface_copy_simple_location(surface, dst_location); -@@ -4025,18 +4028,10 @@ static void surface_load_sysmem(struct wined3d_surface *surface, - /* Download the surface to system memory. */ - if (surface->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB)) - { -- struct wined3d_device *device = surface->resource.device; -- struct wined3d_context *context; -- -- /* TODO: Use already acquired context when possible. */ -- context = context_acquire(device, NULL); -- - wined3d_texture_bind_and_dirtify(surface->container, context, - !(surface->locations & WINED3D_LOCATION_TEXTURE_RGB)); - surface_download_data(surface, gl_info, dst_location); - -- context_release(context); -- - return; - } - -@@ -4266,6 +4261,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location) - struct wined3d_device *device = surface->resource.device; - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - HRESULT hr; -+ struct wined3d_context *context = NULL; - - TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location)); - -@@ -4274,7 +4270,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location) - if (location == WINED3D_LOCATION_TEXTURE_RGB - && surface->locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_DISCARDED)) - { -- struct wined3d_context *context = context_acquire(device, NULL); -+ context = context_acquire(device, NULL); - surface_load_ds_location(surface, context, location); - context_release(context); - return WINED3D_OK; -@@ -4320,7 +4316,11 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location) - case WINED3D_LOCATION_USER_MEMORY: - case WINED3D_LOCATION_SYSMEM: - case WINED3D_LOCATION_BUFFER: -- surface_load_sysmem(surface, gl_info, location); -+ if (device->d3d_initialized) -+ context = context_acquire(device, NULL); -+ surface_load_sysmem(surface, context, location); -+ if (context) -+ context_release(context); - break; - - case WINED3D_LOCATION_DRAWABLE: --- -2.1.3 - diff --git a/patches/wined3d-CSMT_Main/0004-wined3d-Pass-a-context-to-surface_load_drawable-and-.patch b/patches/wined3d-CSMT_Main/0003-wined3d-Pass-a-context-to-surface_load_drawable-and-.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0004-wined3d-Pass-a-context-to-surface_load_drawable-and-.patch rename to patches/wined3d-CSMT_Main/0003-wined3d-Pass-a-context-to-surface_load_drawable-and-.patch diff --git a/patches/wined3d-CSMT_Main/0005-wined3d-Pass-a-context-to-surface_blt_fbo.patch b/patches/wined3d-CSMT_Main/0004-wined3d-Pass-a-context-to-surface_blt_fbo.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0005-wined3d-Pass-a-context-to-surface_blt_fbo.patch rename to patches/wined3d-CSMT_Main/0004-wined3d-Pass-a-context-to-surface_blt_fbo.patch diff --git a/patches/wined3d-CSMT_Main/0006-wined3d-Pass-a-context-to-surface_multisample_resolv.patch b/patches/wined3d-CSMT_Main/0005-wined3d-Pass-a-context-to-surface_multisample_resolv.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0006-wined3d-Pass-a-context-to-surface_multisample_resolv.patch rename to patches/wined3d-CSMT_Main/0005-wined3d-Pass-a-context-to-surface_multisample_resolv.patch diff --git a/patches/wined3d-CSMT_Main/0007-wined3d-Pass-a-context-to-surface_load_texture.patch b/patches/wined3d-CSMT_Main/0006-wined3d-Pass-a-context-to-surface_load_texture.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0007-wined3d-Pass-a-context-to-surface_load_texture.patch rename to patches/wined3d-CSMT_Main/0006-wined3d-Pass-a-context-to-surface_load_texture.patch diff --git a/patches/wined3d-CSMT_Main/0008-wined3d-Pass-a-context-to-surface_load_location.patch b/patches/wined3d-CSMT_Main/0007-wined3d-Pass-a-context-to-surface_load_location.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0008-wined3d-Pass-a-context-to-surface_load_location.patch rename to patches/wined3d-CSMT_Main/0007-wined3d-Pass-a-context-to-surface_load_location.patch diff --git a/patches/wined3d-CSMT_Main/0009-wined3d-Make-surface_load_location-return-nothing.patch b/patches/wined3d-CSMT_Main/0008-wined3d-Make-surface_load_location-return-nothing.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0009-wined3d-Make-surface_load_location-return-nothing.patch rename to patches/wined3d-CSMT_Main/0008-wined3d-Make-surface_load_location-return-nothing.patch diff --git a/patches/wined3d-CSMT_Main/0010-wined3d-Store-volume-locations-in-the-resource.patch b/patches/wined3d-CSMT_Main/0009-wined3d-Store-volume-locations-in-the-resource.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0010-wined3d-Store-volume-locations-in-the-resource.patch rename to patches/wined3d-CSMT_Main/0009-wined3d-Store-volume-locations-in-the-resource.patch diff --git a/patches/wined3d-CSMT_Main/0011-wined3d-Move-validate_location-to-resource.c.patch b/patches/wined3d-CSMT_Main/0010-wined3d-Move-validate_location-to-resource.c.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0011-wined3d-Move-validate_location-to-resource.c.patch rename to patches/wined3d-CSMT_Main/0010-wined3d-Move-validate_location-to-resource.c.patch diff --git a/patches/wined3d-CSMT_Main/0012-wined3d-Move-surface-locations-into-the-resource.patch b/patches/wined3d-CSMT_Main/0011-wined3d-Move-surface-locations-into-the-resource.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0012-wined3d-Move-surface-locations-into-the-resource.patch rename to patches/wined3d-CSMT_Main/0011-wined3d-Move-surface-locations-into-the-resource.patch diff --git a/patches/wined3d-CSMT_Main/0013-wined3d-Remove-surface_validate_location.patch b/patches/wined3d-CSMT_Main/0012-wined3d-Remove-surface_validate_location.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0013-wined3d-Remove-surface_validate_location.patch rename to patches/wined3d-CSMT_Main/0012-wined3d-Remove-surface_validate_location.patch diff --git a/patches/wined3d-CSMT_Main/0014-wined3d-Move-invalidate_location-to-resource.c.patch b/patches/wined3d-CSMT_Main/0013-wined3d-Move-invalidate_location-to-resource.c.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0014-wined3d-Move-invalidate_location-to-resource.c.patch rename to patches/wined3d-CSMT_Main/0013-wined3d-Move-invalidate_location-to-resource.c.patch diff --git a/patches/wined3d-CSMT_Main/0015-wined3d-Invalidate-containers-via-callback.patch b/patches/wined3d-CSMT_Main/0014-wined3d-Invalidate-containers-via-callback.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0015-wined3d-Invalidate-containers-via-callback.patch rename to patches/wined3d-CSMT_Main/0014-wined3d-Invalidate-containers-via-callback.patch diff --git a/patches/wined3d-CSMT_Main/0016-wined3d-Remove-surface_invalidate_location.patch b/patches/wined3d-CSMT_Main/0015-wined3d-Remove-surface_invalidate_location.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0016-wined3d-Remove-surface_invalidate_location.patch rename to patches/wined3d-CSMT_Main/0015-wined3d-Remove-surface_invalidate_location.patch diff --git a/patches/wined3d-CSMT_Main/0017-wined3d-Move-bitmap_data-and-user_memory-into-the-re.patch b/patches/wined3d-CSMT_Main/0016-wined3d-Move-bitmap_data-and-user_memory-into-the-re.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0017-wined3d-Move-bitmap_data-and-user_memory-into-the-re.patch rename to patches/wined3d-CSMT_Main/0016-wined3d-Move-bitmap_data-and-user_memory-into-the-re.patch diff --git a/patches/wined3d-CSMT_Main/0018-wined3d-Move-load_location-into-the-resource.patch b/patches/wined3d-CSMT_Main/0017-wined3d-Move-load_location-into-the-resource.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0018-wined3d-Move-load_location-into-the-resource.patch rename to patches/wined3d-CSMT_Main/0017-wined3d-Move-load_location-into-the-resource.patch diff --git a/patches/wined3d-CSMT_Main/0019-wined3d-Replace-surface_load_location-with-resource_.patch b/patches/wined3d-CSMT_Main/0018-wined3d-Replace-surface_load_location-with-resource_.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0019-wined3d-Replace-surface_load_location-with-resource_.patch rename to patches/wined3d-CSMT_Main/0018-wined3d-Replace-surface_load_location-with-resource_.patch diff --git a/patches/wined3d-CSMT_Main/0020-wined3d-Introduce-helper-functions-for-mapping-volum.patch b/patches/wined3d-CSMT_Main/0019-wined3d-Introduce-helper-functions-for-mapping-volum.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0020-wined3d-Introduce-helper-functions-for-mapping-volum.patch rename to patches/wined3d-CSMT_Main/0019-wined3d-Introduce-helper-functions-for-mapping-volum.patch diff --git a/patches/wined3d-CSMT_Main/0021-wined3d-Move-volume-PBO-infrastructure-into-the-reso.patch b/patches/wined3d-CSMT_Main/0020-wined3d-Move-volume-PBO-infrastructure-into-the-reso.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0021-wined3d-Move-volume-PBO-infrastructure-into-the-reso.patch rename to patches/wined3d-CSMT_Main/0020-wined3d-Move-volume-PBO-infrastructure-into-the-reso.patch diff --git a/patches/wined3d-CSMT_Main/0022-wined3d-Remove-surface-pbo.patch b/patches/wined3d-CSMT_Main/0021-wined3d-Remove-surface-pbo.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0022-wined3d-Remove-surface-pbo.patch rename to patches/wined3d-CSMT_Main/0021-wined3d-Remove-surface-pbo.patch diff --git a/patches/wined3d-CSMT_Main/0023-wined3d-Use-resource-buffer-mapping-facilities-in-su.patch b/patches/wined3d-CSMT_Main/0022-wined3d-Use-resource-buffer-mapping-facilities-in-su.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0023-wined3d-Use-resource-buffer-mapping-facilities-in-su.patch rename to patches/wined3d-CSMT_Main/0022-wined3d-Use-resource-buffer-mapping-facilities-in-su.patch diff --git a/patches/wined3d-CSMT_Main/0024-wined3d-Move-buffer-creation-into-the-resource.patch b/patches/wined3d-CSMT_Main/0023-wined3d-Move-buffer-creation-into-the-resource.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0024-wined3d-Move-buffer-creation-into-the-resource.patch rename to patches/wined3d-CSMT_Main/0023-wined3d-Move-buffer-creation-into-the-resource.patch diff --git a/patches/wined3d-CSMT_Main/0025-wined3d-Handle-WINED3D_LOCATION_DISCARDED-in-surface.patch b/patches/wined3d-CSMT_Main/0024-wined3d-Handle-WINED3D_LOCATION_DISCARDED-in-surface.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0025-wined3d-Handle-WINED3D_LOCATION_DISCARDED-in-surface.patch rename to patches/wined3d-CSMT_Main/0024-wined3d-Handle-WINED3D_LOCATION_DISCARDED-in-surface.patch diff --git a/patches/wined3d-CSMT_Main/0026-wined3d-Handle-LOCATION_DISCARDED-in-surface_load_dr.patch b/patches/wined3d-CSMT_Main/0025-wined3d-Handle-LOCATION_DISCARDED-in-surface_load_dr.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0026-wined3d-Handle-LOCATION_DISCARDED-in-surface_load_dr.patch rename to patches/wined3d-CSMT_Main/0025-wined3d-Handle-LOCATION_DISCARDED-in-surface_load_dr.patch diff --git a/patches/wined3d-CSMT_Main/0027-wined3d-Handle-WINED3D_LOCATION_DISCARDED-for-sysmem.patch b/patches/wined3d-CSMT_Main/0026-wined3d-Handle-WINED3D_LOCATION_DISCARDED-for-sysmem.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0027-wined3d-Handle-WINED3D_LOCATION_DISCARDED-for-sysmem.patch rename to patches/wined3d-CSMT_Main/0026-wined3d-Handle-WINED3D_LOCATION_DISCARDED-for-sysmem.patch diff --git a/patches/wined3d-CSMT_Main/0028-wined3d-Discard-implicit-surfaces-on-unload.patch b/patches/wined3d-CSMT_Main/0027-wined3d-Discard-implicit-surfaces-on-unload.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0028-wined3d-Discard-implicit-surfaces-on-unload.patch rename to patches/wined3d-CSMT_Main/0027-wined3d-Discard-implicit-surfaces-on-unload.patch diff --git a/patches/wined3d-CSMT_Main/0029-wined3d-Don-t-try-to-flip-sysmem-copies-in-swapchain.patch b/patches/wined3d-CSMT_Main/0028-wined3d-Don-t-try-to-flip-sysmem-copies-in-swapchain.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0029-wined3d-Don-t-try-to-flip-sysmem-copies-in-swapchain.patch rename to patches/wined3d-CSMT_Main/0028-wined3d-Don-t-try-to-flip-sysmem-copies-in-swapchain.patch diff --git a/patches/wined3d-CSMT_Main/0030-wined3d-Discard-the-backbuffer-in-discard-presents.patch b/patches/wined3d-CSMT_Main/0029-wined3d-Discard-the-backbuffer-in-discard-presents.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0030-wined3d-Discard-the-backbuffer-in-discard-presents.patch rename to patches/wined3d-CSMT_Main/0029-wined3d-Discard-the-backbuffer-in-discard-presents.patch diff --git a/patches/wined3d-CSMT_Main/0031-wined3d-Allocate-sysmem-for-client-storage-if-it-doe.patch b/patches/wined3d-CSMT_Main/0030-wined3d-Allocate-sysmem-for-client-storage-if-it-doe.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0031-wined3d-Allocate-sysmem-for-client-storage-if-it-doe.patch rename to patches/wined3d-CSMT_Main/0030-wined3d-Allocate-sysmem-for-client-storage-if-it-doe.patch diff --git a/patches/wined3d-CSMT_Main/0032-wined3d-Introduce-a-function-to-retrieve-resource-me.patch b/patches/wined3d-CSMT_Main/0031-wined3d-Introduce-a-function-to-retrieve-resource-me.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0032-wined3d-Introduce-a-function-to-retrieve-resource-me.patch rename to patches/wined3d-CSMT_Main/0031-wined3d-Introduce-a-function-to-retrieve-resource-me.patch diff --git a/patches/wined3d-CSMT_Main/0033-wined3d-Make-surface_ops-unmap-specific-for-front-bu.patch b/patches/wined3d-CSMT_Main/0032-wined3d-Make-surface_ops-unmap-specific-for-front-bu.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0033-wined3d-Make-surface_ops-unmap-specific-for-front-bu.patch rename to patches/wined3d-CSMT_Main/0032-wined3d-Make-surface_ops-unmap-specific-for-front-bu.patch diff --git a/patches/wined3d-CSMT_Main/0034-wined3d-Move-check_block_align-to-resource.c.patch b/patches/wined3d-CSMT_Main/0033-wined3d-Move-check_block_align-to-resource.c.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0034-wined3d-Move-check_block_align-to-resource.c.patch rename to patches/wined3d-CSMT_Main/0033-wined3d-Move-check_block_align-to-resource.c.patch diff --git a/patches/wined3d-CSMT_Main/0035-wined3d-Replace-surface-alloc-functions-with-resourc.patch b/patches/wined3d-CSMT_Main/0034-wined3d-Replace-surface-alloc-functions-with-resourc.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0035-wined3d-Replace-surface-alloc-functions-with-resourc.patch rename to patches/wined3d-CSMT_Main/0034-wined3d-Replace-surface-alloc-functions-with-resourc.patch diff --git a/patches/wined3d-CSMT_Main/0036-wined3d-Don-t-delete-the-buffer-in-surface_cleanup.patch b/patches/wined3d-CSMT_Main/0035-wined3d-Don-t-delete-the-buffer-in-surface_cleanup.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0036-wined3d-Don-t-delete-the-buffer-in-surface_cleanup.patch rename to patches/wined3d-CSMT_Main/0035-wined3d-Don-t-delete-the-buffer-in-surface_cleanup.patch diff --git a/patches/wined3d-CSMT_Main/0037-wined3d-Use-resource-facilities-to-destroy-PBOs.patch b/patches/wined3d-CSMT_Main/0036-wined3d-Use-resource-facilities-to-destroy-PBOs.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0037-wined3d-Use-resource-facilities-to-destroy-PBOs.patch rename to patches/wined3d-CSMT_Main/0036-wined3d-Use-resource-facilities-to-destroy-PBOs.patch diff --git a/patches/wined3d-CSMT_Main/0038-wined3d-Move-simple-location-copying-to-the-resource.patch b/patches/wined3d-CSMT_Main/0037-wined3d-Move-simple-location-copying-to-the-resource.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0038-wined3d-Move-simple-location-copying-to-the-resource.patch rename to patches/wined3d-CSMT_Main/0037-wined3d-Move-simple-location-copying-to-the-resource.patch diff --git a/patches/wined3d-CSMT_Main/0039-wined3d-Move-most-of-volume_map-to-resource.c.patch b/patches/wined3d-CSMT_Main/0038-wined3d-Move-most-of-volume_map-to-resource.c.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0039-wined3d-Move-most-of-volume_map-to-resource.c.patch rename to patches/wined3d-CSMT_Main/0038-wined3d-Move-most-of-volume_map-to-resource.c.patch diff --git a/patches/wined3d-CSMT_Main/0040-wined3d-Use-resource_map-for-surface_map.patch b/patches/wined3d-CSMT_Main/0039-wined3d-Use-resource_map-for-surface_map.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0040-wined3d-Use-resource_map-for-surface_map.patch rename to patches/wined3d-CSMT_Main/0039-wined3d-Use-resource_map-for-surface_map.patch diff --git a/patches/wined3d-CSMT_Main/0041-wined3d-Use-client-storage-with-DIB-sections.patch b/patches/wined3d-CSMT_Main/0040-wined3d-Use-client-storage-with-DIB-sections.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0041-wined3d-Use-client-storage-with-DIB-sections.patch rename to patches/wined3d-CSMT_Main/0040-wined3d-Use-client-storage-with-DIB-sections.patch diff --git a/patches/wined3d-CSMT_Main/0041-wined3d-Don-t-call-the-public-map-function-in-surfac.patch b/patches/wined3d-CSMT_Main/0041-wined3d-Don-t-call-the-public-map-function-in-surfac.patch new file mode 100644 index 00000000..9514536a --- /dev/null +++ b/patches/wined3d-CSMT_Main/0041-wined3d-Don-t-call-the-public-map-function-in-surfac.patch @@ -0,0 +1,101 @@ +From 89a2597787017d7bc966c2a146fa4c4fc59e9ebb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20D=C3=B6singer?= +Date: Mon, 23 Sep 2013 23:58:41 +0200 +Subject: wined3d: Don't call the public map function in + surface_convert_format. + +TODO: Creating a helper surface and releasing it won't work with the CS. +surface_cpu_blt will be called via the CS, so it can't call external +methods that enqueue commands in the stream. +--- + dlls/wined3d/surface.c | 57 +++++++++++++++++++++++++++++++++----------------- + 1 file changed, 38 insertions(+), 19 deletions(-) + +diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c +index 303a0dc..045ede5 100644 +--- a/dlls/wined3d/surface.c ++++ b/dlls/wined3d/surface.c +@@ -2253,11 +2253,14 @@ static inline const struct d3dfmt_converter_desc *find_converter(enum wined3d_fo + + static struct wined3d_texture *surface_convert_format(struct wined3d_surface *source, enum wined3d_format_id to_fmt) + { +- struct wined3d_map_desc src_map, dst_map; ++ 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; + struct wined3d_texture *ret = NULL; + struct wined3d_resource_desc desc; + struct wined3d_surface *dst; ++ struct wined3d_context *context = NULL; ++ struct wined3d_device *device = source->resource.device; + + conv = find_converter(source->resource.format->id, to_fmt); + if (!conv) +@@ -2281,30 +2284,46 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_surface *so + } + dst = surface_from_resource(wined3d_texture_get_sub_resource(ret, 0)); + +- memset(&src_map, 0, sizeof(src_map)); +- memset(&dst_map, 0, sizeof(dst_map)); ++ wined3d_resource_get_pitch(&source->resource, &src_row_pitch, &src_slice_pitch); ++ wined3d_resource_get_pitch(&ret->resource, &dst_row_pitch, &dst_slice_pitch); + +- if (FAILED(wined3d_surface_map(source, &src_map, NULL, WINED3D_MAP_READONLY))) +- { +- ERR("Failed to lock the source surface.\n"); +- wined3d_texture_decref(ret); +- return NULL; +- } +- if (FAILED(wined3d_surface_map(dst, &dst_map, NULL, 0))) +- { +- ERR("Failed to lock the destination surface.\n"); +- wined3d_surface_unmap(source); +- wined3d_texture_decref(ret); +- return NULL; +- } ++ if (device->d3d_initialized) ++ context = context_acquire(device, NULL); ++ ++ wined3d_resource_load_location(&source->resource, context, source->resource.map_binding); ++ src_data = wined3d_resource_get_map_ptr(&source->resource, context, WINED3D_MAP_READONLY); ++ if (!src_data) ++ goto error; + +- conv->convert(src_map.data, dst_map.data, src_map.row_pitch, dst_map.row_pitch, ++ if (!wined3d_resource_prepare_map_memory(&dst->resource, context)) ++ goto error; ++ dst_data = wined3d_resource_get_map_ptr(&dst->resource, context, 0); ++ if (!dst_data) ++ goto error; ++ ++ conv->convert(src_data, dst_data, src_row_pitch, dst_row_pitch, + source->resource.width, source->resource.height); + +- wined3d_surface_unmap(dst); +- wined3d_surface_unmap(source); ++ wined3d_resource_release_map_ptr(&dst->resource, context); ++ wined3d_resource_release_map_ptr(&source->resource, context); ++ ++ if (context) ++ context_release(context); + + return ret; ++ ++error: ++ ERR("Surface conversion failed.\n"); ++ ++ if (src_data) ++ wined3d_resource_release_map_ptr(&source->resource, context); ++ if (dst_data) ++ wined3d_resource_release_map_ptr(&ret->resource, context); ++ if (ret) ++ wined3d_texture_decref(ret); ++ if (context) ++ context_release(context); ++ return NULL; + } + + static HRESULT _Blt_ColorFill(BYTE *buf, unsigned int width, unsigned int height, +-- +2.1.3 + diff --git a/patches/wined3d-CSMT_Main/0042-wined3d-Don-t-call-the-public-map-function-in-surfac.patch b/patches/wined3d-CSMT_Main/0042-wined3d-Don-t-call-the-public-map-function-in-surfac.patch index 9514536a..e24700d5 100644 --- a/patches/wined3d-CSMT_Main/0042-wined3d-Don-t-call-the-public-map-function-in-surfac.patch +++ b/patches/wined3d-CSMT_Main/0042-wined3d-Don-t-call-the-public-map-function-in-surfac.patch @@ -1,101 +1,282 @@ -From 89a2597787017d7bc966c2a146fa4c4fc59e9ebb Mon Sep 17 00:00:00 2001 +From 74de56cff82b598bb71d556767bcd1c53dcb16e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= -Date: Mon, 23 Sep 2013 23:58:41 +0200 -Subject: wined3d: Don't call the public map function in - surface_convert_format. +Date: Tue, 24 Sep 2013 00:31:39 +0200 +Subject: wined3d: Don't call the public map function in surface_cpu_blt. -TODO: Creating a helper surface and releasing it won't work with the CS. -surface_cpu_blt will be called via the CS, so it can't call external -methods that enqueue commands in the stream. --- - dlls/wined3d/surface.c | 57 +++++++++++++++++++++++++++++++++----------------- - 1 file changed, 38 insertions(+), 19 deletions(-) + dlls/wined3d/surface.c | 108 ++++++++++++++++++++++++++++++++----------------- + 1 file changed, 72 insertions(+), 36 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c -index 303a0dc..045ede5 100644 +index 5c30f78..a32ce1d 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c -@@ -2253,11 +2253,14 @@ static inline const struct d3dfmt_converter_desc *find_converter(enum wined3d_fo - - static struct wined3d_texture *surface_convert_format(struct wined3d_surface *source, enum wined3d_format_id to_fmt) +@@ -4306,26 +4306,40 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT * + struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags, + const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter) { -- struct wined3d_map_desc src_map, dst_map; -+ void *dst_data = NULL, *src_data = NULL; +- const struct wined3d_box dst_box = {dst_rect->left, dst_rect->top, dst_rect->right, dst_rect->bottom, 0, 1}; + int bpp, srcheight, srcwidth, dstheight, dstwidth, width; + const struct wined3d_format *src_format, *dst_format; + unsigned int src_fmt_flags, dst_fmt_flags; + struct wined3d_texture *src_texture = NULL; +- struct wined3d_map_desc dst_map, src_map; ++ void *src_data = NULL, *dst_data = NULL; + UINT src_row_pitch, src_slice_pitch, dst_row_pitch, dst_slice_pitch; - const struct d3dfmt_converter_desc *conv; - struct wined3d_texture *ret = NULL; - struct wined3d_resource_desc desc; - struct wined3d_surface *dst; + const BYTE *sbase = NULL; + HRESULT hr = WINED3D_OK; + const BYTE *sbuf; + BYTE *dbuf; + int x, y; ++ struct wined3d_device *device = dst_surface->resource.device; + struct wined3d_context *context = NULL; -+ struct wined3d_device *device = source->resource.device; - conv = find_converter(source->resource.format->id, to_fmt); - if (!conv) -@@ -2281,30 +2284,46 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_surface *so - } - dst = surface_from_resource(wined3d_texture_get_sub_resource(ret, 0)); + TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p, filter %s.\n", + dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), + flags, fx, debug_d3dtexturefiltertype(filter)); -- memset(&src_map, 0, sizeof(src_map)); -- memset(&dst_map, 0, sizeof(dst_map)); -+ wined3d_resource_get_pitch(&source->resource, &src_row_pitch, &src_slice_pitch); -+ wined3d_resource_get_pitch(&ret->resource, &dst_row_pitch, &dst_slice_pitch); - -- if (FAILED(wined3d_surface_map(source, &src_map, NULL, WINED3D_MAP_READONLY))) -- { -- ERR("Failed to lock the source surface.\n"); -- wined3d_texture_decref(ret); -- return NULL; -- } -- if (FAILED(wined3d_surface_map(dst, &dst_map, NULL, 0))) -- { -- ERR("Failed to lock the destination surface.\n"); -- wined3d_surface_unmap(source); -- wined3d_texture_decref(ret); -- return NULL; -- } + if (device->d3d_initialized) + context = context_acquire(device, NULL); + -+ wined3d_resource_load_location(&source->resource, context, source->resource.map_binding); -+ src_data = wined3d_resource_get_map_ptr(&source->resource, context, WINED3D_MAP_READONLY); -+ if (!src_data) ++ if (!wined3d_resource_prepare_map_memory(&dst_surface->resource, context)) ++ { ++ hr = E_OUTOFMEMORY; + goto error; ++ } ++ wined3d_resource_load_location(&dst_surface->resource, context, dst_surface->resource.map_binding); ++ + if (src_surface == dst_surface) + { +- wined3d_surface_map(dst_surface, &dst_map, NULL, 0); +- src_map = dst_map; ++ dst_data = wined3d_resource_get_map_ptr(&dst_surface->resource, context, 0); ++ wined3d_resource_get_pitch(&dst_surface->resource, &dst_row_pitch, &dst_slice_pitch); ++ src_data = dst_data; ++ src_row_pitch = dst_row_pitch; + src_format = dst_surface->resource.format; + dst_format = src_format; + dst_fmt_flags = dst_surface->container->resource.format_flags; +@@ -4337,6 +4351,12 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT * + dst_fmt_flags = dst_surface->container->resource.format_flags; + if (src_surface) + { ++ if (!wined3d_resource_prepare_map_memory(&src_surface->resource, context)) ++ { ++ hr = E_OUTOFMEMORY; ++ goto error; ++ } ++ + if (dst_surface->resource.format->id != src_surface->resource.format->id) + { + if (!(src_texture = surface_convert_format(src_surface, dst_format->id))) +@@ -4347,7 +4367,9 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT * + } + src_surface = surface_from_resource(wined3d_texture_get_sub_resource(src_texture, 0)); + } +- wined3d_surface_map(src_surface, &src_map, NULL, WINED3D_MAP_READONLY); ++ wined3d_resource_load_location(&src_surface->resource, context, src_surface->resource.map_binding); ++ wined3d_resource_get_pitch(&src_surface->resource, &src_row_pitch, &src_slice_pitch); ++ src_data = wined3d_resource_get_map_ptr(&src_surface->resource, context, 0); + src_format = src_surface->resource.format; + src_fmt_flags = src_surface->container->resource.format_flags; + } +@@ -4357,7 +4379,8 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT * + src_fmt_flags = dst_fmt_flags; + } -- conv->convert(src_map.data, dst_map.data, src_map.row_pitch, dst_map.row_pitch, -+ if (!wined3d_resource_prepare_map_memory(&dst->resource, context)) -+ goto error; -+ dst_data = wined3d_resource_get_map_ptr(&dst->resource, context, 0); -+ if (!dst_data) -+ goto error; -+ -+ conv->convert(src_data, dst_data, src_row_pitch, dst_row_pitch, - source->resource.width, source->resource.height); +- wined3d_surface_map(dst_surface, &dst_map, &dst_box, 0); ++ wined3d_resource_get_pitch(&dst_surface->resource, &dst_row_pitch, &dst_slice_pitch); ++ dst_data = wined3d_resource_get_map_ptr(&dst_surface->resource, context, 0); + } -- wined3d_surface_unmap(dst); -- wined3d_surface_unmap(source); -+ wined3d_resource_release_map_ptr(&dst->resource, context); -+ wined3d_resource_release_map_ptr(&source->resource, context); -+ -+ if (context) -+ context_release(context); + bpp = dst_surface->resource.format->byte_count; +@@ -4368,15 +4391,12 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT * + width = (dst_rect->right - dst_rect->left) * bpp; - return ret; + if (src_surface) +- sbase = (BYTE *)src_map.data +- + ((src_rect->top / src_format->block_height) * src_map.row_pitch) ++ sbase = (BYTE *)src_data ++ + ((src_rect->top / src_format->block_height) * src_row_pitch) + + ((src_rect->left / src_format->block_width) * src_format->block_byte_count); +- if (src_surface != dst_surface) +- dbuf = dst_map.data; +- else +- dbuf = (BYTE *)dst_map.data +- + ((dst_rect->top / dst_format->block_height) * dst_map.row_pitch) +- + ((dst_rect->left / dst_format->block_width) * dst_format->block_byte_count); ++ dbuf = (BYTE *)dst_data ++ + ((dst_rect->top / dst_format->block_height) * dst_row_pitch) ++ + ((dst_rect->left / dst_format->block_width) * dst_format->block_byte_count); + + if (src_fmt_flags & dst_fmt_flags & WINED3DFMT_FLAG_BLOCKS) + { +@@ -4411,7 +4431,7 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT * + } + + hr = surface_cpu_blt_compressed(sbase, dbuf, +- src_map.row_pitch, dst_map.row_pitch, dstwidth, dstheight, ++ src_row_pitch, dst_row_pitch, dstwidth, dstheight, + src_format, flags, fx); + goto release; + } +@@ -4419,7 +4439,7 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT * + /* First, all the 'source-less' blits */ + if (flags & WINEDDBLT_COLORFILL) + { +- hr = _Blt_ColorFill(dbuf, dstwidth, dstheight, bpp, dst_map.row_pitch, fx->u5.dwFillColor); ++ hr = _Blt_ColorFill(dbuf, dstwidth, dstheight, bpp, dst_row_pitch, fx->u5.dwFillColor); + flags &= ~WINEDDBLT_COLORFILL; + } + +@@ -4468,19 +4488,19 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT * + for (y = 0; y < dstheight; ++y) + { + memcpy(dbuf, sbuf, width); +- sbuf += src_map.row_pitch; +- dbuf += dst_map.row_pitch; ++ sbuf += src_row_pitch; ++ dbuf += dst_row_pitch; + } + } + else if (dst_rect->top > src_rect->top) + { + /* Copy from bottom upwards. */ +- sbuf += src_map.row_pitch * dstheight; +- dbuf += dst_map.row_pitch * dstheight; ++ sbuf += src_row_pitch * dstheight; ++ dbuf += dst_row_pitch * dstheight; + for (y = 0; y < dstheight; ++y) + { +- sbuf -= src_map.row_pitch; +- dbuf -= dst_map.row_pitch; ++ sbuf -= src_row_pitch; ++ dbuf -= dst_row_pitch; + memcpy(dbuf, sbuf, width); + } + } +@@ -4490,8 +4510,8 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT * + for (y = 0; y < dstheight; ++y) + { + memmove(dbuf, sbuf, width); +- sbuf += src_map.row_pitch; +- dbuf += dst_map.row_pitch; ++ sbuf += src_row_pitch; ++ dbuf += dst_row_pitch; + } + } + } +@@ -4500,9 +4520,9 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT * + /* Stretching in y direction only. */ + for (y = sy = 0; y < dstheight; ++y, sy += yinc) + { +- sbuf = sbase + (sy >> 16) * src_map.row_pitch; ++ sbuf = sbase + (sy >> 16) * src_row_pitch; + memcpy(dbuf, sbuf, width); +- dbuf += dst_map.row_pitch; ++ dbuf += dst_row_pitch; + } + } + } +@@ -4512,13 +4532,13 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT * + int last_sy = -1; + for (y = sy = 0; y < dstheight; ++y, sy += yinc) + { +- sbuf = sbase + (sy >> 16) * src_map.row_pitch; ++ sbuf = sbase + (sy >> 16) * src_row_pitch; + + if ((sy >> 16) == (last_sy >> 16)) + { + /* This source row is the same as last source row - + * Copy the already stretched row. */ +- memcpy(dbuf, dbuf - dst_map.row_pitch, width); ++ memcpy(dbuf, dbuf - dst_row_pitch, width); + } + else + { +@@ -4565,14 +4585,14 @@ do { \ + } + #undef STRETCH_ROW + } +- dbuf += dst_map.row_pitch; ++ dbuf += dst_row_pitch; + last_sy = sy; + } + } + } + else + { +- LONG dstyinc = dst_map.row_pitch, dstxinc = bpp; ++ LONG dstyinc = dst_row_pitch, dstxinc = bpp; + DWORD keylow = 0xffffffff, keyhigh = 0, keymask = 0xffffffff; + DWORD destkeylow = 0x0, destkeyhigh = 0xffffffff, destkeymask = 0xffffffff; + if (flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYDEST | WINEDDBLT_KEYSRCOVERRIDE | WINEDDBLT_KEYDESTOVERRIDE)) +@@ -4622,7 +4642,7 @@ do { \ + LONG tmpxy; + dTopLeft = dbuf; + dTopRight = dbuf + ((dstwidth - 1) * bpp); +- dBottomLeft = dTopLeft + ((dstheight - 1) * dst_map.row_pitch); ++ dBottomLeft = dTopLeft + ((dstheight - 1) * dst_row_pitch); + dBottomRight = dBottomLeft + ((dstwidth - 1) * bpp); + + if (fx->dwDDFX & WINEDDBLTFX_ARITHSTRETCHY) +@@ -4705,7 +4725,7 @@ do { \ + type *d = (type *)dbuf, *dx, tmp; \ + for (y = sy = 0; y < dstheight; ++y, sy += yinc) \ + { \ +- s = (const type *)(sbase + (sy >> 16) * src_map.row_pitch); \ ++ s = (const type *)(sbase + (sy >> 16) * src_row_pitch); \ + dx = d; \ + for (x = sx = 0; x < dstwidth; ++x, sx += xinc) \ + { \ +@@ -4738,7 +4758,7 @@ do { \ + BYTE *d = dbuf, *dx; + for (y = sy = 0; y < dstheight; ++y, sy += yinc) + { +- sbuf = sbase + (sy >> 16) * src_map.row_pitch; ++ sbuf = sbase + (sy >> 16) * src_row_pitch; + dx = d; + for (x = sx = 0; x < dstwidth; ++x, sx+= xinc) + { +@@ -4769,6 +4789,10 @@ do { \ + } + } + ++ wined3d_resource_invalidate_location(&dst_surface->resource, ~dst_surface->resource.map_binding); ++ if (dst_surface->container) ++ wined3d_texture_set_dirty(dst_surface->container); + -+error: -+ ERR("Surface conversion failed.\n"); -+ -+ if (src_data) -+ wined3d_resource_release_map_ptr(&source->resource, context); + error: + if (flags && FIXME_ON(d3d_surface)) + { +@@ -4776,12 +4800,24 @@ error: + } + + release: +- wined3d_surface_unmap(dst_surface); +- if (src_surface && src_surface != dst_surface) +- wined3d_surface_unmap(src_surface); + if (dst_data) -+ wined3d_resource_release_map_ptr(&ret->resource, context); -+ if (ret) -+ wined3d_texture_decref(ret); ++ { ++ wined3d_resource_release_map_ptr(&dst_surface->resource, context); ++ ++ if (dst_surface->container->swapchain ++ && dst_surface->container == dst_surface->container->swapchain->front_buffer) ++ { ++ dst_surface->lockedRect = *dst_rect; ++ dst_surface->surface_ops->surface_frontbuffer_updated(dst_surface); ++ } ++ } ++ if (src_surface && src_surface != dst_surface && src_data) ++ wined3d_resource_release_map_ptr(&src_surface->resource, context); + /* Release the converted surface, if any. */ + if (src_texture) + wined3d_texture_decref(src_texture); + if (context) + context_release(context); -+ return NULL; - } - static HRESULT _Blt_ColorFill(BYTE *buf, unsigned int width, unsigned int height, + return hr; + } -- -2.1.3 +2.6.0 diff --git a/patches/wined3d-CSMT_Main/0043-wined3d-Don-t-call-the-public-map-function-in-surfac.patch b/patches/wined3d-CSMT_Main/0043-wined3d-Don-t-call-the-public-map-function-in-surfac.patch deleted file mode 100644 index e24700d5..00000000 --- a/patches/wined3d-CSMT_Main/0043-wined3d-Don-t-call-the-public-map-function-in-surfac.patch +++ /dev/null @@ -1,282 +0,0 @@ -From 74de56cff82b598bb71d556767bcd1c53dcb16e2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Stefan=20D=C3=B6singer?= -Date: Tue, 24 Sep 2013 00:31:39 +0200 -Subject: wined3d: Don't call the public map function in surface_cpu_blt. - ---- - dlls/wined3d/surface.c | 108 ++++++++++++++++++++++++++++++++----------------- - 1 file changed, 72 insertions(+), 36 deletions(-) - -diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c -index 5c30f78..a32ce1d 100644 ---- a/dlls/wined3d/surface.c -+++ b/dlls/wined3d/surface.c -@@ -4306,26 +4306,40 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT * - struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags, - const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter) - { -- const struct wined3d_box dst_box = {dst_rect->left, dst_rect->top, dst_rect->right, dst_rect->bottom, 0, 1}; - int bpp, srcheight, srcwidth, dstheight, dstwidth, width; - const struct wined3d_format *src_format, *dst_format; - unsigned int src_fmt_flags, dst_fmt_flags; - struct wined3d_texture *src_texture = NULL; -- struct wined3d_map_desc dst_map, src_map; -+ void *src_data = NULL, *dst_data = NULL; -+ UINT src_row_pitch, src_slice_pitch, dst_row_pitch, dst_slice_pitch; - const BYTE *sbase = NULL; - HRESULT hr = WINED3D_OK; - const BYTE *sbuf; - BYTE *dbuf; - int x, y; -+ struct wined3d_device *device = dst_surface->resource.device; -+ struct wined3d_context *context = NULL; - - TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p, filter %s.\n", - dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), - flags, fx, debug_d3dtexturefiltertype(filter)); - -+ if (device->d3d_initialized) -+ context = context_acquire(device, NULL); -+ -+ if (!wined3d_resource_prepare_map_memory(&dst_surface->resource, context)) -+ { -+ hr = E_OUTOFMEMORY; -+ goto error; -+ } -+ wined3d_resource_load_location(&dst_surface->resource, context, dst_surface->resource.map_binding); -+ - if (src_surface == dst_surface) - { -- wined3d_surface_map(dst_surface, &dst_map, NULL, 0); -- src_map = dst_map; -+ dst_data = wined3d_resource_get_map_ptr(&dst_surface->resource, context, 0); -+ wined3d_resource_get_pitch(&dst_surface->resource, &dst_row_pitch, &dst_slice_pitch); -+ src_data = dst_data; -+ src_row_pitch = dst_row_pitch; - src_format = dst_surface->resource.format; - dst_format = src_format; - dst_fmt_flags = dst_surface->container->resource.format_flags; -@@ -4337,6 +4351,12 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT * - dst_fmt_flags = dst_surface->container->resource.format_flags; - if (src_surface) - { -+ if (!wined3d_resource_prepare_map_memory(&src_surface->resource, context)) -+ { -+ hr = E_OUTOFMEMORY; -+ goto error; -+ } -+ - if (dst_surface->resource.format->id != src_surface->resource.format->id) - { - if (!(src_texture = surface_convert_format(src_surface, dst_format->id))) -@@ -4347,7 +4367,9 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT * - } - src_surface = surface_from_resource(wined3d_texture_get_sub_resource(src_texture, 0)); - } -- wined3d_surface_map(src_surface, &src_map, NULL, WINED3D_MAP_READONLY); -+ wined3d_resource_load_location(&src_surface->resource, context, src_surface->resource.map_binding); -+ wined3d_resource_get_pitch(&src_surface->resource, &src_row_pitch, &src_slice_pitch); -+ src_data = wined3d_resource_get_map_ptr(&src_surface->resource, context, 0); - src_format = src_surface->resource.format; - src_fmt_flags = src_surface->container->resource.format_flags; - } -@@ -4357,7 +4379,8 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT * - src_fmt_flags = dst_fmt_flags; - } - -- wined3d_surface_map(dst_surface, &dst_map, &dst_box, 0); -+ wined3d_resource_get_pitch(&dst_surface->resource, &dst_row_pitch, &dst_slice_pitch); -+ dst_data = wined3d_resource_get_map_ptr(&dst_surface->resource, context, 0); - } - - bpp = dst_surface->resource.format->byte_count; -@@ -4368,15 +4391,12 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT * - width = (dst_rect->right - dst_rect->left) * bpp; - - if (src_surface) -- sbase = (BYTE *)src_map.data -- + ((src_rect->top / src_format->block_height) * src_map.row_pitch) -+ sbase = (BYTE *)src_data -+ + ((src_rect->top / src_format->block_height) * src_row_pitch) - + ((src_rect->left / src_format->block_width) * src_format->block_byte_count); -- if (src_surface != dst_surface) -- dbuf = dst_map.data; -- else -- dbuf = (BYTE *)dst_map.data -- + ((dst_rect->top / dst_format->block_height) * dst_map.row_pitch) -- + ((dst_rect->left / dst_format->block_width) * dst_format->block_byte_count); -+ dbuf = (BYTE *)dst_data -+ + ((dst_rect->top / dst_format->block_height) * dst_row_pitch) -+ + ((dst_rect->left / dst_format->block_width) * dst_format->block_byte_count); - - if (src_fmt_flags & dst_fmt_flags & WINED3DFMT_FLAG_BLOCKS) - { -@@ -4411,7 +4431,7 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT * - } - - hr = surface_cpu_blt_compressed(sbase, dbuf, -- src_map.row_pitch, dst_map.row_pitch, dstwidth, dstheight, -+ src_row_pitch, dst_row_pitch, dstwidth, dstheight, - src_format, flags, fx); - goto release; - } -@@ -4419,7 +4439,7 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT * - /* First, all the 'source-less' blits */ - if (flags & WINEDDBLT_COLORFILL) - { -- hr = _Blt_ColorFill(dbuf, dstwidth, dstheight, bpp, dst_map.row_pitch, fx->u5.dwFillColor); -+ hr = _Blt_ColorFill(dbuf, dstwidth, dstheight, bpp, dst_row_pitch, fx->u5.dwFillColor); - flags &= ~WINEDDBLT_COLORFILL; - } - -@@ -4468,19 +4488,19 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT * - for (y = 0; y < dstheight; ++y) - { - memcpy(dbuf, sbuf, width); -- sbuf += src_map.row_pitch; -- dbuf += dst_map.row_pitch; -+ sbuf += src_row_pitch; -+ dbuf += dst_row_pitch; - } - } - else if (dst_rect->top > src_rect->top) - { - /* Copy from bottom upwards. */ -- sbuf += src_map.row_pitch * dstheight; -- dbuf += dst_map.row_pitch * dstheight; -+ sbuf += src_row_pitch * dstheight; -+ dbuf += dst_row_pitch * dstheight; - for (y = 0; y < dstheight; ++y) - { -- sbuf -= src_map.row_pitch; -- dbuf -= dst_map.row_pitch; -+ sbuf -= src_row_pitch; -+ dbuf -= dst_row_pitch; - memcpy(dbuf, sbuf, width); - } - } -@@ -4490,8 +4510,8 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT * - for (y = 0; y < dstheight; ++y) - { - memmove(dbuf, sbuf, width); -- sbuf += src_map.row_pitch; -- dbuf += dst_map.row_pitch; -+ sbuf += src_row_pitch; -+ dbuf += dst_row_pitch; - } - } - } -@@ -4500,9 +4520,9 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT * - /* Stretching in y direction only. */ - for (y = sy = 0; y < dstheight; ++y, sy += yinc) - { -- sbuf = sbase + (sy >> 16) * src_map.row_pitch; -+ sbuf = sbase + (sy >> 16) * src_row_pitch; - memcpy(dbuf, sbuf, width); -- dbuf += dst_map.row_pitch; -+ dbuf += dst_row_pitch; - } - } - } -@@ -4512,13 +4532,13 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT * - int last_sy = -1; - for (y = sy = 0; y < dstheight; ++y, sy += yinc) - { -- sbuf = sbase + (sy >> 16) * src_map.row_pitch; -+ sbuf = sbase + (sy >> 16) * src_row_pitch; - - if ((sy >> 16) == (last_sy >> 16)) - { - /* This source row is the same as last source row - - * Copy the already stretched row. */ -- memcpy(dbuf, dbuf - dst_map.row_pitch, width); -+ memcpy(dbuf, dbuf - dst_row_pitch, width); - } - else - { -@@ -4565,14 +4585,14 @@ do { \ - } - #undef STRETCH_ROW - } -- dbuf += dst_map.row_pitch; -+ dbuf += dst_row_pitch; - last_sy = sy; - } - } - } - else - { -- LONG dstyinc = dst_map.row_pitch, dstxinc = bpp; -+ LONG dstyinc = dst_row_pitch, dstxinc = bpp; - DWORD keylow = 0xffffffff, keyhigh = 0, keymask = 0xffffffff; - DWORD destkeylow = 0x0, destkeyhigh = 0xffffffff, destkeymask = 0xffffffff; - if (flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYDEST | WINEDDBLT_KEYSRCOVERRIDE | WINEDDBLT_KEYDESTOVERRIDE)) -@@ -4622,7 +4642,7 @@ do { \ - LONG tmpxy; - dTopLeft = dbuf; - dTopRight = dbuf + ((dstwidth - 1) * bpp); -- dBottomLeft = dTopLeft + ((dstheight - 1) * dst_map.row_pitch); -+ dBottomLeft = dTopLeft + ((dstheight - 1) * dst_row_pitch); - dBottomRight = dBottomLeft + ((dstwidth - 1) * bpp); - - if (fx->dwDDFX & WINEDDBLTFX_ARITHSTRETCHY) -@@ -4705,7 +4725,7 @@ do { \ - type *d = (type *)dbuf, *dx, tmp; \ - for (y = sy = 0; y < dstheight; ++y, sy += yinc) \ - { \ -- s = (const type *)(sbase + (sy >> 16) * src_map.row_pitch); \ -+ s = (const type *)(sbase + (sy >> 16) * src_row_pitch); \ - dx = d; \ - for (x = sx = 0; x < dstwidth; ++x, sx += xinc) \ - { \ -@@ -4738,7 +4758,7 @@ do { \ - BYTE *d = dbuf, *dx; - for (y = sy = 0; y < dstheight; ++y, sy += yinc) - { -- sbuf = sbase + (sy >> 16) * src_map.row_pitch; -+ sbuf = sbase + (sy >> 16) * src_row_pitch; - dx = d; - for (x = sx = 0; x < dstwidth; ++x, sx+= xinc) - { -@@ -4769,6 +4789,10 @@ do { \ - } - } - -+ wined3d_resource_invalidate_location(&dst_surface->resource, ~dst_surface->resource.map_binding); -+ if (dst_surface->container) -+ wined3d_texture_set_dirty(dst_surface->container); -+ - error: - if (flags && FIXME_ON(d3d_surface)) - { -@@ -4776,12 +4800,24 @@ error: - } - - release: -- wined3d_surface_unmap(dst_surface); -- if (src_surface && src_surface != dst_surface) -- wined3d_surface_unmap(src_surface); -+ if (dst_data) -+ { -+ wined3d_resource_release_map_ptr(&dst_surface->resource, context); -+ -+ if (dst_surface->container->swapchain -+ && dst_surface->container == dst_surface->container->swapchain->front_buffer) -+ { -+ dst_surface->lockedRect = *dst_rect; -+ dst_surface->surface_ops->surface_frontbuffer_updated(dst_surface); -+ } -+ } -+ if (src_surface && src_surface != dst_surface && src_data) -+ wined3d_resource_release_map_ptr(&src_surface->resource, context); - /* Release the converted surface, if any. */ - if (src_texture) - wined3d_texture_decref(src_texture); -+ if (context) -+ context_release(context); - - return hr; - } --- -2.6.0 - diff --git a/patches/wined3d-CSMT_Main/0044-wined3d-Move-the-framebuffer-into-wined3d_state.patch b/patches/wined3d-CSMT_Main/0043-wined3d-Move-the-framebuffer-into-wined3d_state.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0044-wined3d-Move-the-framebuffer-into-wined3d_state.patch rename to patches/wined3d-CSMT_Main/0043-wined3d-Move-the-framebuffer-into-wined3d_state.patch diff --git a/patches/wined3d-CSMT_Main/0045-wined3d-Get-rid-of-state-access-in-shader_generate_g.patch b/patches/wined3d-CSMT_Main/0044-wined3d-Get-rid-of-state-access-in-shader_generate_g.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0045-wined3d-Get-rid-of-state-access-in-shader_generate_g.patch rename to patches/wined3d-CSMT_Main/0044-wined3d-Get-rid-of-state-access-in-shader_generate_g.patch diff --git a/patches/wined3d-CSMT_Main/0046-wined3d-Preload-buffers-if-streamsrc-is-not-dirty.patch b/patches/wined3d-CSMT_Main/0045-wined3d-Preload-buffers-if-streamsrc-is-not-dirty.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0046-wined3d-Preload-buffers-if-streamsrc-is-not-dirty.patch rename to patches/wined3d-CSMT_Main/0045-wined3d-Preload-buffers-if-streamsrc-is-not-dirty.patch diff --git a/patches/wined3d-CSMT_Main/0047-wined3d-Hackily-introduce-a-multithreaded-command-st.patch b/patches/wined3d-CSMT_Main/0046-wined3d-Hackily-introduce-a-multithreaded-command-st.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0047-wined3d-Hackily-introduce-a-multithreaded-command-st.patch rename to patches/wined3d-CSMT_Main/0046-wined3d-Hackily-introduce-a-multithreaded-command-st.patch diff --git a/patches/wined3d-CSMT_Main/0048-wined3d-Wait-for-resource-updates-to-finish-when-usi.patch b/patches/wined3d-CSMT_Main/0047-wined3d-Wait-for-resource-updates-to-finish-when-usi.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0048-wined3d-Wait-for-resource-updates-to-finish-when-usi.patch rename to patches/wined3d-CSMT_Main/0047-wined3d-Wait-for-resource-updates-to-finish-when-usi.patch diff --git a/patches/wined3d-CSMT_Main/0049-wined3d-Don-t-store-pointers-in-struct-wined3d_cs_pr.patch b/patches/wined3d-CSMT_Main/0048-wined3d-Don-t-store-pointers-in-struct-wined3d_cs_pr.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0049-wined3d-Don-t-store-pointers-in-struct-wined3d_cs_pr.patch rename to patches/wined3d-CSMT_Main/0048-wined3d-Don-t-store-pointers-in-struct-wined3d_cs_pr.patch diff --git a/patches/wined3d-CSMT_Main/0050-wined3d-Don-t-put-rectangle-pointers-into-wined3d_cs.patch b/patches/wined3d-CSMT_Main/0049-wined3d-Don-t-put-rectangle-pointers-into-wined3d_cs.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0050-wined3d-Don-t-put-rectangle-pointers-into-wined3d_cs.patch rename to patches/wined3d-CSMT_Main/0049-wined3d-Don-t-put-rectangle-pointers-into-wined3d_cs.patch diff --git a/patches/wined3d-CSMT_Main/0051-wined3d-Store-the-color-in-clear-ops-instead-of-a-po.patch b/patches/wined3d-CSMT_Main/0050-wined3d-Store-the-color-in-clear-ops-instead-of-a-po.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0051-wined3d-Store-the-color-in-clear-ops-instead-of-a-po.patch rename to patches/wined3d-CSMT_Main/0050-wined3d-Store-the-color-in-clear-ops-instead-of-a-po.patch diff --git a/patches/wined3d-CSMT_Main/0052-wined3d-Pass-the-state-to-draw_primitive.patch b/patches/wined3d-CSMT_Main/0051-wined3d-Pass-the-state-to-draw_primitive.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0052-wined3d-Pass-the-state-to-draw_primitive.patch rename to patches/wined3d-CSMT_Main/0051-wined3d-Pass-the-state-to-draw_primitive.patch diff --git a/patches/wined3d-CSMT_Main/0053-wined3d-Wait-for-the-cs-before-destroying-objects.patch b/patches/wined3d-CSMT_Main/0052-wined3d-Wait-for-the-cs-before-destroying-objects.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0053-wined3d-Wait-for-the-cs-before-destroying-objects.patch rename to patches/wined3d-CSMT_Main/0052-wined3d-Wait-for-the-cs-before-destroying-objects.patch diff --git a/patches/wined3d-CSMT_Main/0054-wined3d-Give-the-cs-its-own-state.patch b/patches/wined3d-CSMT_Main/0053-wined3d-Give-the-cs-its-own-state.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0054-wined3d-Give-the-cs-its-own-state.patch rename to patches/wined3d-CSMT_Main/0053-wined3d-Give-the-cs-its-own-state.patch diff --git a/patches/wined3d-CSMT_Main/0055-wined3d-Send-float-constant-updates-through-the-comm.patch b/patches/wined3d-CSMT_Main/0054-wined3d-Send-float-constant-updates-through-the-comm.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0055-wined3d-Send-float-constant-updates-through-the-comm.patch rename to patches/wined3d-CSMT_Main/0054-wined3d-Send-float-constant-updates-through-the-comm.patch diff --git a/patches/wined3d-CSMT_Main/0056-wined3d-Request-a-glFinish-before-modifying-resource.patch b/patches/wined3d-CSMT_Main/0055-wined3d-Request-a-glFinish-before-modifying-resource.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0056-wined3d-Request-a-glFinish-before-modifying-resource.patch rename to patches/wined3d-CSMT_Main/0055-wined3d-Request-a-glFinish-before-modifying-resource.patch diff --git a/patches/wined3d-CSMT_Main/0057-wined3d-Finish-the-cs-before-changing-the-texture-lo.patch b/patches/wined3d-CSMT_Main/0056-wined3d-Finish-the-cs-before-changing-the-texture-lo.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0057-wined3d-Finish-the-cs-before-changing-the-texture-lo.patch rename to patches/wined3d-CSMT_Main/0056-wined3d-Finish-the-cs-before-changing-the-texture-lo.patch diff --git a/patches/wined3d-CSMT_Main/0058-wined3d-Don-t-call-glFinish-after-clears.patch b/patches/wined3d-CSMT_Main/0057-wined3d-Don-t-call-glFinish-after-clears.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0058-wined3d-Don-t-call-glFinish-after-clears.patch rename to patches/wined3d-CSMT_Main/0057-wined3d-Don-t-call-glFinish-after-clears.patch diff --git a/patches/wined3d-CSMT_Main/0059-wined3d-Don-t-call-glFinish-after-draws.patch b/patches/wined3d-CSMT_Main/0058-wined3d-Don-t-call-glFinish-after-draws.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0059-wined3d-Don-t-call-glFinish-after-draws.patch rename to patches/wined3d-CSMT_Main/0058-wined3d-Don-t-call-glFinish-after-draws.patch diff --git a/patches/wined3d-CSMT_Main/0060-wined3d-Shadow-device-offscreenBuffer-in-the-context.patch b/patches/wined3d-CSMT_Main/0059-wined3d-Shadow-device-offscreenBuffer-in-the-context.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0060-wined3d-Shadow-device-offscreenBuffer-in-the-context.patch rename to patches/wined3d-CSMT_Main/0059-wined3d-Shadow-device-offscreenBuffer-in-the-context.patch diff --git a/patches/wined3d-CSMT_Main/0061-wined3d-Don-t-access-the-stateblock-in-find_draw_buf.patch b/patches/wined3d-CSMT_Main/0060-wined3d-Don-t-access-the-stateblock-in-find_draw_buf.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0061-wined3d-Don-t-access-the-stateblock-in-find_draw_buf.patch rename to patches/wined3d-CSMT_Main/0060-wined3d-Don-t-access-the-stateblock-in-find_draw_buf.patch diff --git a/patches/wined3d-CSMT_Main/0062-wined3d-Pass-the-depth-stencil-to-swapchain-present.patch b/patches/wined3d-CSMT_Main/0061-wined3d-Pass-the-depth-stencil-to-swapchain-present.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0062-wined3d-Pass-the-depth-stencil-to-swapchain-present.patch rename to patches/wined3d-CSMT_Main/0061-wined3d-Pass-the-depth-stencil-to-swapchain-present.patch diff --git a/patches/wined3d-CSMT_Main/0063-wined3d-Don-t-store-viewport-pointers-in-the-command.patch b/patches/wined3d-CSMT_Main/0062-wined3d-Don-t-store-viewport-pointers-in-the-command.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0063-wined3d-Don-t-store-viewport-pointers-in-the-command.patch rename to patches/wined3d-CSMT_Main/0062-wined3d-Don-t-store-viewport-pointers-in-the-command.patch diff --git a/patches/wined3d-CSMT_Main/0064-wined3d-Keep-track-of-the-onscreen-depth-stencil-in-.patch b/patches/wined3d-CSMT_Main/0063-wined3d-Keep-track-of-the-onscreen-depth-stencil-in-.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0064-wined3d-Keep-track-of-the-onscreen-depth-stencil-in-.patch rename to patches/wined3d-CSMT_Main/0063-wined3d-Keep-track-of-the-onscreen-depth-stencil-in-.patch diff --git a/patches/wined3d-CSMT_Main/0065-wined3d-Send-base-vertex-index-updates-through-the-c.patch b/patches/wined3d-CSMT_Main/0064-wined3d-Send-base-vertex-index-updates-through-the-c.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0065-wined3d-Send-base-vertex-index-updates-through-the-c.patch rename to patches/wined3d-CSMT_Main/0064-wined3d-Send-base-vertex-index-updates-through-the-c.patch diff --git a/patches/wined3d-CSMT_Main/0066-wined3d-Send-primitive-type-updates-through-the-comm.patch b/patches/wined3d-CSMT_Main/0065-wined3d-Send-primitive-type-updates-through-the-comm.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0066-wined3d-Send-primitive-type-updates-through-the-comm.patch rename to patches/wined3d-CSMT_Main/0065-wined3d-Send-primitive-type-updates-through-the-comm.patch diff --git a/patches/wined3d-CSMT_Main/0067-wined3d-Send-bool-constant-updates-through-the-comma.patch b/patches/wined3d-CSMT_Main/0066-wined3d-Send-bool-constant-updates-through-the-comma.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0067-wined3d-Send-bool-constant-updates-through-the-comma.patch rename to patches/wined3d-CSMT_Main/0066-wined3d-Send-bool-constant-updates-through-the-comma.patch diff --git a/patches/wined3d-CSMT_Main/0068-wined3d-Send-int-constant-updates-through-the-comman.patch b/patches/wined3d-CSMT_Main/0067-wined3d-Send-int-constant-updates-through-the-comman.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0068-wined3d-Send-int-constant-updates-through-the-comman.patch rename to patches/wined3d-CSMT_Main/0067-wined3d-Send-int-constant-updates-through-the-comman.patch diff --git a/patches/wined3d-CSMT_Main/0069-wined3d-Send-light-updates-through-the-command-strea.patch b/patches/wined3d-CSMT_Main/0068-wined3d-Send-light-updates-through-the-command-strea.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0069-wined3d-Send-light-updates-through-the-command-strea.patch rename to patches/wined3d-CSMT_Main/0068-wined3d-Send-light-updates-through-the-command-strea.patch diff --git a/patches/wined3d-CSMT_Main/0070-wined3d-Prevent-the-command-stream-from-running-ahea.patch b/patches/wined3d-CSMT_Main/0069-wined3d-Prevent-the-command-stream-from-running-ahea.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0070-wined3d-Prevent-the-command-stream-from-running-ahea.patch rename to patches/wined3d-CSMT_Main/0069-wined3d-Prevent-the-command-stream-from-running-ahea.patch diff --git a/patches/wined3d-CSMT_Main/0071-wined3d-Wait-for-the-cs-to-finish-before-destroying-.patch b/patches/wined3d-CSMT_Main/0070-wined3d-Wait-for-the-cs-to-finish-before-destroying-.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0071-wined3d-Wait-for-the-cs-to-finish-before-destroying-.patch rename to patches/wined3d-CSMT_Main/0070-wined3d-Wait-for-the-cs-to-finish-before-destroying-.patch diff --git a/patches/wined3d-CSMT_Main/0072-wined3d-Run-the-cs-asynchronously.patch b/patches/wined3d-CSMT_Main/0071-wined3d-Run-the-cs-asynchronously.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0072-wined3d-Run-the-cs-asynchronously.patch rename to patches/wined3d-CSMT_Main/0071-wined3d-Run-the-cs-asynchronously.patch diff --git a/patches/wined3d-CSMT_Main/0073-wined3d-Send-blits-through-the-command-stream.patch b/patches/wined3d-CSMT_Main/0072-wined3d-Send-blits-through-the-command-stream.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0073-wined3d-Send-blits-through-the-command-stream.patch rename to patches/wined3d-CSMT_Main/0072-wined3d-Send-blits-through-the-command-stream.patch diff --git a/patches/wined3d-CSMT_Main/0074-wined3d-Put-update_surface-checks-back-in-place.patch b/patches/wined3d-CSMT_Main/0073-wined3d-Put-update_surface-checks-back-in-place.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0074-wined3d-Put-update_surface-checks-back-in-place.patch rename to patches/wined3d-CSMT_Main/0073-wined3d-Put-update_surface-checks-back-in-place.patch diff --git a/patches/wined3d-CSMT_Main/0075-wined3d-Get-rid-of-WINED3D_BUFFER_FLUSH.patch b/patches/wined3d-CSMT_Main/0074-wined3d-Get-rid-of-WINED3D_BUFFER_FLUSH.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0075-wined3d-Get-rid-of-WINED3D_BUFFER_FLUSH.patch rename to patches/wined3d-CSMT_Main/0074-wined3d-Get-rid-of-WINED3D_BUFFER_FLUSH.patch diff --git a/patches/wined3d-CSMT_Main/0076-wined3d-Don-t-force-strict-draw-ordering-for-multith.patch b/patches/wined3d-CSMT_Main/0075-wined3d-Don-t-force-strict-draw-ordering-for-multith.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0076-wined3d-Don-t-force-strict-draw-ordering-for-multith.patch rename to patches/wined3d-CSMT_Main/0075-wined3d-Don-t-force-strict-draw-ordering-for-multith.patch diff --git a/patches/wined3d-CSMT_Main/0077-wined3d-Send-render-target-view-clears-through-the-c.patch b/patches/wined3d-CSMT_Main/0076-wined3d-Send-render-target-view-clears-through-the-c.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0077-wined3d-Send-render-target-view-clears-through-the-c.patch rename to patches/wined3d-CSMT_Main/0076-wined3d-Send-render-target-view-clears-through-the-c.patch diff --git a/patches/wined3d-CSMT_Main/0078-wined3d-Wait-for-the-CS-in-GetDC.patch b/patches/wined3d-CSMT_Main/0077-wined3d-Wait-for-the-CS-in-GetDC.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0078-wined3d-Wait-for-the-CS-in-GetDC.patch rename to patches/wined3d-CSMT_Main/0077-wined3d-Wait-for-the-CS-in-GetDC.patch diff --git a/patches/wined3d-CSMT_Main/0079-wined3d-send-resource-maps-through-the-command-strea.patch b/patches/wined3d-CSMT_Main/0078-wined3d-send-resource-maps-through-the-command-strea.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0079-wined3d-send-resource-maps-through-the-command-strea.patch rename to patches/wined3d-CSMT_Main/0078-wined3d-send-resource-maps-through-the-command-strea.patch diff --git a/patches/wined3d-CSMT_Main/0080-wined3d-Get-rid-of-the-end_scene-flush-and-finish.patch b/patches/wined3d-CSMT_Main/0079-wined3d-Get-rid-of-the-end_scene-flush-and-finish.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0080-wined3d-Get-rid-of-the-end_scene-flush-and-finish.patch rename to patches/wined3d-CSMT_Main/0079-wined3d-Get-rid-of-the-end_scene-flush-and-finish.patch diff --git a/patches/wined3d-CSMT_Main/0081-wined3d-Replace-the-linked-lists-with-a-ringbuffer.patch b/patches/wined3d-CSMT_Main/0080-wined3d-Replace-the-linked-lists-with-a-ringbuffer.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0081-wined3d-Replace-the-linked-lists-with-a-ringbuffer.patch rename to patches/wined3d-CSMT_Main/0080-wined3d-Replace-the-linked-lists-with-a-ringbuffer.patch diff --git a/patches/wined3d-CSMT_Main/0082-wined3d-Don-t-preload-buffers-on-unmap.patch b/patches/wined3d-CSMT_Main/0081-wined3d-Don-t-preload-buffers-on-unmap.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0082-wined3d-Don-t-preload-buffers-on-unmap.patch rename to patches/wined3d-CSMT_Main/0081-wined3d-Don-t-preload-buffers-on-unmap.patch diff --git a/patches/wined3d-CSMT_Main/0083-wined3d-Don-t-call-glFinish-before-swapping.patch b/patches/wined3d-CSMT_Main/0082-wined3d-Don-t-call-glFinish-before-swapping.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0083-wined3d-Don-t-call-glFinish-before-swapping.patch rename to patches/wined3d-CSMT_Main/0082-wined3d-Don-t-call-glFinish-before-swapping.patch diff --git a/patches/wined3d-CSMT_Main/0084-wined3d-wined3d_-_query_issue-never-fails.patch b/patches/wined3d-CSMT_Main/0083-wined3d-wined3d_-_query_issue-never-fails.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0084-wined3d-wined3d_-_query_issue-never-fails.patch rename to patches/wined3d-CSMT_Main/0083-wined3d-wined3d_-_query_issue-never-fails.patch diff --git a/patches/wined3d-CSMT_Main/0085-wined3d-Add-query-support-to-the-command-stream.patch b/patches/wined3d-CSMT_Main/0084-wined3d-Add-query-support-to-the-command-stream.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0085-wined3d-Add-query-support-to-the-command-stream.patch rename to patches/wined3d-CSMT_Main/0084-wined3d-Add-query-support-to-the-command-stream.patch diff --git a/patches/wined3d-CSMT_Main/0086-wined3d-Check-our-CS-state-to-find-out-if-a-query-is.patch b/patches/wined3d-CSMT_Main/0085-wined3d-Check-our-CS-state-to-find-out-if-a-query-is.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0086-wined3d-Check-our-CS-state-to-find-out-if-a-query-is.patch rename to patches/wined3d-CSMT_Main/0085-wined3d-Check-our-CS-state-to-find-out-if-a-query-is.patch diff --git a/patches/wined3d-CSMT_Main/0087-wined3d-Poll-queries-automatically-in-the-CS.patch b/patches/wined3d-CSMT_Main/0086-wined3d-Poll-queries-automatically-in-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0087-wined3d-Poll-queries-automatically-in-the-CS.patch rename to patches/wined3d-CSMT_Main/0086-wined3d-Poll-queries-automatically-in-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0088-wined3d-Introduce-a-separate-queue-for-priority-comm.patch b/patches/wined3d-CSMT_Main/0087-wined3d-Introduce-a-separate-queue-for-priority-comm.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0088-wined3d-Introduce-a-separate-queue-for-priority-comm.patch rename to patches/wined3d-CSMT_Main/0087-wined3d-Introduce-a-separate-queue-for-priority-comm.patch diff --git a/patches/wined3d-CSMT_Main/0089-wined3d-Destroy-queries-through-the-CS.patch b/patches/wined3d-CSMT_Main/0088-wined3d-Destroy-queries-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0089-wined3d-Destroy-queries-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0088-wined3d-Destroy-queries-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0090-wined3d-Separate-main-and-worker-thread-query-state.patch b/patches/wined3d-CSMT_Main/0089-wined3d-Separate-main-and-worker-thread-query-state.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0090-wined3d-Separate-main-and-worker-thread-query-state.patch rename to patches/wined3d-CSMT_Main/0089-wined3d-Separate-main-and-worker-thread-query-state.patch diff --git a/patches/wined3d-CSMT_Main/0091-wined3d-Don-t-poll-queries-that-failed-to-start.patch b/patches/wined3d-CSMT_Main/0090-wined3d-Don-t-poll-queries-that-failed-to-start.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0091-wined3d-Don-t-poll-queries-that-failed-to-start.patch rename to patches/wined3d-CSMT_Main/0090-wined3d-Don-t-poll-queries-that-failed-to-start.patch diff --git a/patches/wined3d-CSMT_Main/0092-wined3d-Remove-restated-queries-from-the-poll-list.patch b/patches/wined3d-CSMT_Main/0091-wined3d-Remove-restated-queries-from-the-poll-list.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0092-wined3d-Remove-restated-queries-from-the-poll-list.patch rename to patches/wined3d-CSMT_Main/0091-wined3d-Remove-restated-queries-from-the-poll-list.patch diff --git a/patches/wined3d-CSMT_Main/0093-wined3d-Don-t-reset-the-query-state-if-it-doesn-t-ha.patch b/patches/wined3d-CSMT_Main/0092-wined3d-Don-t-reset-the-query-state-if-it-doesn-t-ha.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0093-wined3d-Don-t-reset-the-query-state-if-it-doesn-t-ha.patch rename to patches/wined3d-CSMT_Main/0092-wined3d-Don-t-reset-the-query-state-if-it-doesn-t-ha.patch diff --git a/patches/wined3d-CSMT_Main/0094-wined3d-Put-this-into-the-query-poll-patch.patch b/patches/wined3d-CSMT_Main/0093-wined3d-Put-this-into-the-query-poll-patch.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0094-wined3d-Put-this-into-the-query-poll-patch.patch rename to patches/wined3d-CSMT_Main/0093-wined3d-Put-this-into-the-query-poll-patch.patch diff --git a/patches/wined3d-CSMT_Main/0095-wined3d-Send-update_surface-commands-through-the-CS.patch b/patches/wined3d-CSMT_Main/0094-wined3d-Send-update_surface-commands-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0095-wined3d-Send-update_surface-commands-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0094-wined3d-Send-update_surface-commands-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0096-wined3d-Send-texture-preloads-through-the-CS.patch b/patches/wined3d-CSMT_Main/0095-wined3d-Send-texture-preloads-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0096-wined3d-Send-texture-preloads-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0095-wined3d-Send-texture-preloads-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0097-wined3d-Send-surface-preloads-through-the-CS.patch b/patches/wined3d-CSMT_Main/0096-wined3d-Send-surface-preloads-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0097-wined3d-Send-surface-preloads-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0096-wined3d-Send-surface-preloads-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0098-wined3d-Send-update_texture-calls-through-the-CS.patch b/patches/wined3d-CSMT_Main/0097-wined3d-Send-update_texture-calls-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0098-wined3d-Send-update_texture-calls-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0097-wined3d-Send-update_texture-calls-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0099-wined3d-Get-rid-of-the-surface_upload_data-glFinish.patch b/patches/wined3d-CSMT_Main/0098-wined3d-Get-rid-of-the-surface_upload_data-glFinish.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0099-wined3d-Get-rid-of-the-surface_upload_data-glFinish.patch rename to patches/wined3d-CSMT_Main/0098-wined3d-Get-rid-of-the-surface_upload_data-glFinish.patch diff --git a/patches/wined3d-CSMT_Main/0100-wined3d-Don-t-lock-the-src-volume-in-device_update_v.patch b/patches/wined3d-CSMT_Main/0099-wined3d-Don-t-lock-the-src-volume-in-device_update_v.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0100-wined3d-Don-t-lock-the-src-volume-in-device_update_v.patch rename to patches/wined3d-CSMT_Main/0099-wined3d-Don-t-lock-the-src-volume-in-device_update_v.patch diff --git a/patches/wined3d-CSMT_Main/0101-wined3d-Handle-evit_managed_resources-through-the-CS.patch b/patches/wined3d-CSMT_Main/0100-wined3d-Handle-evit_managed_resources-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0101-wined3d-Handle-evit_managed_resources-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0100-wined3d-Handle-evit_managed_resources-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0102-wined3d-Introduce-resource-fencing.patch b/patches/wined3d-CSMT_Main/0101-wined3d-Introduce-resource-fencing.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0102-wined3d-Introduce-resource-fencing.patch rename to patches/wined3d-CSMT_Main/0101-wined3d-Introduce-resource-fencing.patch diff --git a/patches/wined3d-CSMT_Main/0103-wined3d-Fence-update_texture-and-update_surface-call.patch b/patches/wined3d-CSMT_Main/0102-wined3d-Fence-update_texture-and-update_surface-call.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0103-wined3d-Fence-update_texture-and-update_surface-call.patch rename to patches/wined3d-CSMT_Main/0102-wined3d-Fence-update_texture-and-update_surface-call.patch diff --git a/patches/wined3d-CSMT_Main/0104-wined3d-Dirtify-resources-on-unmap.patch b/patches/wined3d-CSMT_Main/0103-wined3d-Dirtify-resources-on-unmap.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0104-wined3d-Dirtify-resources-on-unmap.patch rename to patches/wined3d-CSMT_Main/0103-wined3d-Dirtify-resources-on-unmap.patch diff --git a/patches/wined3d-CSMT_Main/0105-wined3d-Fence-texture-reads-in-draws.patch b/patches/wined3d-CSMT_Main/0104-wined3d-Fence-texture-reads-in-draws.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0105-wined3d-Fence-texture-reads-in-draws.patch rename to patches/wined3d-CSMT_Main/0104-wined3d-Fence-texture-reads-in-draws.patch diff --git a/patches/wined3d-CSMT_Main/0106-wined3d-Fence-render-targets-and-depth-stencils.patch b/patches/wined3d-CSMT_Main/0105-wined3d-Fence-render-targets-and-depth-stencils.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0106-wined3d-Fence-render-targets-and-depth-stencils.patch rename to patches/wined3d-CSMT_Main/0105-wined3d-Fence-render-targets-and-depth-stencils.patch diff --git a/patches/wined3d-CSMT_Main/0107-wined3d-Fence-blit-operations.patch b/patches/wined3d-CSMT_Main/0106-wined3d-Fence-blit-operations.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0107-wined3d-Fence-blit-operations.patch rename to patches/wined3d-CSMT_Main/0106-wined3d-Fence-blit-operations.patch diff --git a/patches/wined3d-CSMT_Main/0108-wined3d-Fence-color_fill-operations.patch b/patches/wined3d-CSMT_Main/0107-wined3d-Fence-color_fill-operations.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0108-wined3d-Fence-color_fill-operations.patch rename to patches/wined3d-CSMT_Main/0107-wined3d-Fence-color_fill-operations.patch diff --git a/patches/wined3d-CSMT_Main/0109-wined3d-Fence-clear-calls.patch b/patches/wined3d-CSMT_Main/0108-wined3d-Fence-clear-calls.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0109-wined3d-Fence-clear-calls.patch rename to patches/wined3d-CSMT_Main/0108-wined3d-Fence-clear-calls.patch diff --git a/patches/wined3d-CSMT_Main/0110-wined3d-Fence-present-calls.patch b/patches/wined3d-CSMT_Main/0109-wined3d-Fence-present-calls.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0110-wined3d-Fence-present-calls.patch rename to patches/wined3d-CSMT_Main/0109-wined3d-Fence-present-calls.patch diff --git a/patches/wined3d-CSMT_Main/0111-wined3d-Make-resource-maps-and-unmaps-a-priority-com.patch b/patches/wined3d-CSMT_Main/0110-wined3d-Make-resource-maps-and-unmaps-a-priority-com.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0111-wined3d-Make-resource-maps-and-unmaps-a-priority-com.patch rename to patches/wined3d-CSMT_Main/0110-wined3d-Make-resource-maps-and-unmaps-a-priority-com.patch diff --git a/patches/wined3d-CSMT_Main/0112-wined3d-Dirtify-changed-textures-through-the-command.patch b/patches/wined3d-CSMT_Main/0111-wined3d-Dirtify-changed-textures-through-the-command.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0112-wined3d-Dirtify-changed-textures-through-the-command.patch rename to patches/wined3d-CSMT_Main/0111-wined3d-Dirtify-changed-textures-through-the-command.patch diff --git a/patches/wined3d-CSMT_Main/0113-wined3d-Wrap-GL-BOs-in-a-structure.patch b/patches/wined3d-CSMT_Main/0112-wined3d-Wrap-GL-BOs-in-a-structure.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0113-wined3d-Wrap-GL-BOs-in-a-structure.patch rename to patches/wined3d-CSMT_Main/0112-wined3d-Wrap-GL-BOs-in-a-structure.patch diff --git a/patches/wined3d-CSMT_Main/0114-wined3d-Separate-resource-map-and-draw-buffers.patch b/patches/wined3d-CSMT_Main/0113-wined3d-Separate-resource-map-and-draw-buffers.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0114-wined3d-Separate-resource-map-and-draw-buffers.patch rename to patches/wined3d-CSMT_Main/0113-wined3d-Separate-resource-map-and-draw-buffers.patch diff --git a/patches/wined3d-CSMT_Main/0115-wined3d-Implement-DISCARD-resource-maps-with-buffers.patch b/patches/wined3d-CSMT_Main/0114-wined3d-Implement-DISCARD-resource-maps-with-buffers.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0115-wined3d-Implement-DISCARD-resource-maps-with-buffers.patch rename to patches/wined3d-CSMT_Main/0114-wined3d-Implement-DISCARD-resource-maps-with-buffers.patch diff --git a/patches/wined3d-CSMT_Main/0116-wined3d-Implement-DISCARD-resource-maps-with-heap-me.patch b/patches/wined3d-CSMT_Main/0115-wined3d-Implement-DISCARD-resource-maps-with-heap-me.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0116-wined3d-Implement-DISCARD-resource-maps-with-heap-me.patch rename to patches/wined3d-CSMT_Main/0115-wined3d-Implement-DISCARD-resource-maps-with-heap-me.patch diff --git a/patches/wined3d-CSMT_Main/0117-wined3d-Unset-some-objects-in-state_init_default.patch b/patches/wined3d-CSMT_Main/0116-wined3d-Unset-some-objects-in-state_init_default.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0117-wined3d-Unset-some-objects-in-state_init_default.patch rename to patches/wined3d-CSMT_Main/0116-wined3d-Unset-some-objects-in-state_init_default.patch diff --git a/patches/wined3d-CSMT_Main/0118-wined3d-Don-t-request-the-frontbuffer-to-create-dumm.patch b/patches/wined3d-CSMT_Main/0117-wined3d-Don-t-request-the-frontbuffer-to-create-dumm.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0118-wined3d-Don-t-request-the-frontbuffer-to-create-dumm.patch rename to patches/wined3d-CSMT_Main/0117-wined3d-Don-t-request-the-frontbuffer-to-create-dumm.patch diff --git a/patches/wined3d-CSMT_Main/0119-wined3d-Use-double-buffered-buffers-for-multithreade.patch b/patches/wined3d-CSMT_Main/0118-wined3d-Use-double-buffered-buffers-for-multithreade.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0119-wined3d-Use-double-buffered-buffers-for-multithreade.patch rename to patches/wined3d-CSMT_Main/0118-wined3d-Use-double-buffered-buffers-for-multithreade.patch diff --git a/patches/wined3d-CSMT_Main/0120-wined3d-Don-t-synchronize-NOOVERWRITE-buffer-maps.patch b/patches/wined3d-CSMT_Main/0119-wined3d-Don-t-synchronize-NOOVERWRITE-buffer-maps.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0120-wined3d-Don-t-synchronize-NOOVERWRITE-buffer-maps.patch rename to patches/wined3d-CSMT_Main/0119-wined3d-Don-t-synchronize-NOOVERWRITE-buffer-maps.patch diff --git a/patches/wined3d-CSMT_Main/0121-wined3d-Separate-buffer-map-write-and-draw-read-memo.patch b/patches/wined3d-CSMT_Main/0120-wined3d-Separate-buffer-map-write-and-draw-read-memo.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0121-wined3d-Separate-buffer-map-write-and-draw-read-memo.patch rename to patches/wined3d-CSMT_Main/0120-wined3d-Separate-buffer-map-write-and-draw-read-memo.patch diff --git a/patches/wined3d-CSMT_Main/0122-wined3d-Accelerate-DISCARD-buffer-maps.patch b/patches/wined3d-CSMT_Main/0121-wined3d-Accelerate-DISCARD-buffer-maps.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0122-wined3d-Accelerate-DISCARD-buffer-maps.patch rename to patches/wined3d-CSMT_Main/0121-wined3d-Accelerate-DISCARD-buffer-maps.patch diff --git a/patches/wined3d-CSMT_Main/0123-wined3d-Accelerate-READONLY-buffer-maps.patch b/patches/wined3d-CSMT_Main/0122-wined3d-Accelerate-READONLY-buffer-maps.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0123-wined3d-Accelerate-READONLY-buffer-maps.patch rename to patches/wined3d-CSMT_Main/0122-wined3d-Accelerate-READONLY-buffer-maps.patch diff --git a/patches/wined3d-CSMT_Main/0124-wined3d-Access-the-buffer-dirty-areas-through-the-CS.patch b/patches/wined3d-CSMT_Main/0123-wined3d-Access-the-buffer-dirty-areas-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0124-wined3d-Access-the-buffer-dirty-areas-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0123-wined3d-Access-the-buffer-dirty-areas-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0125-wined3d-Ignore-buffer-resource.map_count-in-the-CS.patch b/patches/wined3d-CSMT_Main/0124-wined3d-Ignore-buffer-resource.map_count-in-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0125-wined3d-Ignore-buffer-resource.map_count-in-the-CS.patch rename to patches/wined3d-CSMT_Main/0124-wined3d-Ignore-buffer-resource.map_count-in-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0126-wined3d-Send-buffer-preloads-through-the-CS.patch b/patches/wined3d-CSMT_Main/0125-wined3d-Send-buffer-preloads-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0126-wined3d-Send-buffer-preloads-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0125-wined3d-Send-buffer-preloads-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0127-wined3d-Use-glBufferSubData-instead-of-glMapBufferRa.patch b/patches/wined3d-CSMT_Main/0126-wined3d-Use-glBufferSubData-instead-of-glMapBufferRa.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0127-wined3d-Use-glBufferSubData-instead-of-glMapBufferRa.patch rename to patches/wined3d-CSMT_Main/0126-wined3d-Use-glBufferSubData-instead-of-glMapBufferRa.patch diff --git a/patches/wined3d-CSMT_Main/0128-wined3d-Separate-GL-buffer-discard-control-from-igno.patch b/patches/wined3d-CSMT_Main/0127-wined3d-Separate-GL-buffer-discard-control-from-igno.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0128-wined3d-Separate-GL-buffer-discard-control-from-igno.patch rename to patches/wined3d-CSMT_Main/0127-wined3d-Separate-GL-buffer-discard-control-from-igno.patch diff --git a/patches/wined3d-CSMT_Main/0129-wined3d-Create-buffers-before-mapping-them.patch b/patches/wined3d-CSMT_Main/0128-wined3d-Create-buffers-before-mapping-them.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0129-wined3d-Create-buffers-before-mapping-them.patch rename to patches/wined3d-CSMT_Main/0128-wined3d-Create-buffers-before-mapping-them.patch diff --git a/patches/wined3d-CSMT_Main/0130-wined3d-Destroy-views-through-the-CS.patch b/patches/wined3d-CSMT_Main/0129-wined3d-Destroy-views-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0130-wined3d-Destroy-views-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0129-wined3d-Destroy-views-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0131-wined3d-Remove-another-glFinish.patch b/patches/wined3d-CSMT_Main/0130-wined3d-Remove-another-glFinish.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0131-wined3d-Remove-another-glFinish.patch rename to patches/wined3d-CSMT_Main/0130-wined3d-Remove-another-glFinish.patch diff --git a/patches/wined3d-CSMT_Main/0132-wined3d-Destroy-vertex-declarations-through-the-CS.patch b/patches/wined3d-CSMT_Main/0131-wined3d-Destroy-vertex-declarations-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0132-wined3d-Destroy-vertex-declarations-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0131-wined3d-Destroy-vertex-declarations-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0133-wined3d-Destroy-shaders-through-the-CS.patch b/patches/wined3d-CSMT_Main/0132-wined3d-Destroy-shaders-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0133-wined3d-Destroy-shaders-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0132-wined3d-Destroy-shaders-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0134-wined3d-Create-VBOs-through-the-command-stream.patch b/patches/wined3d-CSMT_Main/0133-wined3d-Create-VBOs-through-the-command-stream.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0134-wined3d-Create-VBOs-through-the-command-stream.patch rename to patches/wined3d-CSMT_Main/0133-wined3d-Create-VBOs-through-the-command-stream.patch diff --git a/patches/wined3d-CSMT_Main/0135-wined3d-Clean-up-resource-data-through-the-CS.patch b/patches/wined3d-CSMT_Main/0134-wined3d-Clean-up-resource-data-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0135-wined3d-Clean-up-resource-data-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0134-wined3d-Clean-up-resource-data-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0136-wined3d-Clean-up-buffer-resource-data-through-the-CS.patch b/patches/wined3d-CSMT_Main/0135-wined3d-Clean-up-buffer-resource-data-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0136-wined3d-Clean-up-buffer-resource-data-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0135-wined3d-Clean-up-buffer-resource-data-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0137-wined3d-Clean-up-volume-resource-data-through-the-CS.patch b/patches/wined3d-CSMT_Main/0136-wined3d-Clean-up-volume-resource-data-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0137-wined3d-Clean-up-volume-resource-data-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0136-wined3d-Clean-up-volume-resource-data-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0138-wined3d-Clean-up-surfaces-through-the-cs.patch b/patches/wined3d-CSMT_Main/0137-wined3d-Clean-up-surfaces-through-the-cs.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0138-wined3d-Clean-up-surfaces-through-the-cs.patch rename to patches/wined3d-CSMT_Main/0137-wined3d-Clean-up-surfaces-through-the-cs.patch diff --git a/patches/wined3d-CSMT_Main/0139-wined3d-Clean-up-texture-resources-through-the-cs.patch b/patches/wined3d-CSMT_Main/0138-wined3d-Clean-up-texture-resources-through-the-cs.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0139-wined3d-Clean-up-texture-resources-through-the-cs.patch rename to patches/wined3d-CSMT_Main/0138-wined3d-Clean-up-texture-resources-through-the-cs.patch diff --git a/patches/wined3d-CSMT_Main/0140-wined3d-Unload-resources-through-the-CS-in-uninit_3d.patch b/patches/wined3d-CSMT_Main/0139-wined3d-Unload-resources-through-the-CS-in-uninit_3d.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0140-wined3d-Unload-resources-through-the-CS-in-uninit_3d.patch rename to patches/wined3d-CSMT_Main/0139-wined3d-Unload-resources-through-the-CS-in-uninit_3d.patch diff --git a/patches/wined3d-CSMT_Main/0141-wined3d-Unload-resources-through-the-CS-in-device_re.patch b/patches/wined3d-CSMT_Main/0140-wined3d-Unload-resources-through-the-CS-in-device_re.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0141-wined3d-Unload-resources-through-the-CS-in-device_re.patch rename to patches/wined3d-CSMT_Main/0140-wined3d-Unload-resources-through-the-CS-in-device_re.patch diff --git a/patches/wined3d-CSMT_Main/0142-wined3d-Don-t-glFinish-after-a-depth-buffer-blit.patch b/patches/wined3d-CSMT_Main/0141-wined3d-Don-t-glFinish-after-a-depth-buffer-blit.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0142-wined3d-Don-t-glFinish-after-a-depth-buffer-blit.patch rename to patches/wined3d-CSMT_Main/0141-wined3d-Don-t-glFinish-after-a-depth-buffer-blit.patch diff --git a/patches/wined3d-CSMT_Main/0143-wined3d-Remove-software-cursor-support.patch b/patches/wined3d-CSMT_Main/0142-wined3d-Remove-software-cursor-support.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0143-wined3d-Remove-software-cursor-support.patch rename to patches/wined3d-CSMT_Main/0142-wined3d-Remove-software-cursor-support.patch diff --git a/patches/wined3d-CSMT_Main/0144-wined3d-Create-dummy-textures-through-the-CS.patch b/patches/wined3d-CSMT_Main/0143-wined3d-Create-dummy-textures-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0144-wined3d-Create-dummy-textures-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0143-wined3d-Create-dummy-textures-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0145-wined3d-Create-the-initial-context-through-the-CS.patch b/patches/wined3d-CSMT_Main/0144-wined3d-Create-the-initial-context-through-the-CS.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0145-wined3d-Create-the-initial-context-through-the-CS.patch rename to patches/wined3d-CSMT_Main/0144-wined3d-Create-the-initial-context-through-the-CS.patch diff --git a/patches/wined3d-CSMT_Main/0146-wined3d-Recreate-ctx-and-dummy-textures-through-the-.patch b/patches/wined3d-CSMT_Main/0145-wined3d-Recreate-ctx-and-dummy-textures-through-the-.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0146-wined3d-Recreate-ctx-and-dummy-textures-through-the-.patch rename to patches/wined3d-CSMT_Main/0145-wined3d-Recreate-ctx-and-dummy-textures-through-the-.patch diff --git a/patches/wined3d-CSMT_Main/0147-wined3d-Ignore-WINED3D_MAP_NO_DIRTY_UPDATE-in-resour.patch b/patches/wined3d-CSMT_Main/0146-wined3d-Ignore-WINED3D_MAP_NO_DIRTY_UPDATE-in-resour.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0147-wined3d-Ignore-WINED3D_MAP_NO_DIRTY_UPDATE-in-resour.patch rename to patches/wined3d-CSMT_Main/0146-wined3d-Ignore-WINED3D_MAP_NO_DIRTY_UPDATE-in-resour.patch diff --git a/patches/wined3d-CSMT_Main/0148-wined3d-Delete-GL-contexts-through-the-CS-in-reset.patch b/patches/wined3d-CSMT_Main/0147-wined3d-Delete-GL-contexts-through-the-CS-in-reset.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0148-wined3d-Delete-GL-contexts-through-the-CS-in-reset.patch rename to patches/wined3d-CSMT_Main/0147-wined3d-Delete-GL-contexts-through-the-CS-in-reset.patch diff --git a/patches/wined3d-CSMT_Main/0149-wined3d-Delete-GL-contexts-through-the-CS-in-uninit_.patch b/patches/wined3d-CSMT_Main/0148-wined3d-Delete-GL-contexts-through-the-CS-in-uninit_.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0149-wined3d-Delete-GL-contexts-through-the-CS-in-uninit_.patch rename to patches/wined3d-CSMT_Main/0148-wined3d-Delete-GL-contexts-through-the-CS-in-uninit_.patch diff --git a/patches/wined3d-CSMT_Main/0150-wined3d-Invoke-surface_unload-through-the-CS-in-wine.patch b/patches/wined3d-CSMT_Main/0149-wined3d-Invoke-surface_unload-through-the-CS-in-wine.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0150-wined3d-Invoke-surface_unload-through-the-CS-in-wine.patch rename to patches/wined3d-CSMT_Main/0149-wined3d-Invoke-surface_unload-through-the-CS-in-wine.patch diff --git a/patches/wined3d-CSMT_Main/0151-wined3d-Use-an-event-to-block-the-worker-thread-when.patch b/patches/wined3d-CSMT_Main/0150-wined3d-Use-an-event-to-block-the-worker-thread-when.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0151-wined3d-Use-an-event-to-block-the-worker-thread-when.patch rename to patches/wined3d-CSMT_Main/0150-wined3d-Use-an-event-to-block-the-worker-thread-when.patch diff --git a/patches/wined3d-CSMT_Main/0152-wined3d-Fence-preload-operations.patch b/patches/wined3d-CSMT_Main/0151-wined3d-Fence-preload-operations.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0152-wined3d-Fence-preload-operations.patch rename to patches/wined3d-CSMT_Main/0151-wined3d-Fence-preload-operations.patch diff --git a/patches/wined3d-CSMT_Main/0153-d3d8-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch b/patches/wined3d-CSMT_Main/0152-d3d8-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0153-d3d8-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch rename to patches/wined3d-CSMT_Main/0152-d3d8-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch diff --git a/patches/wined3d-CSMT_Main/0154-d3d9-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch b/patches/wined3d-CSMT_Main/0153-d3d9-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0154-d3d9-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch rename to patches/wined3d-CSMT_Main/0153-d3d9-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch diff --git a/patches/wined3d-CSMT_Main/0155-wined3d-Completely-reset-the-state-on-reset.patch b/patches/wined3d-CSMT_Main/0154-wined3d-Completely-reset-the-state-on-reset.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0155-wined3d-Completely-reset-the-state-on-reset.patch rename to patches/wined3d-CSMT_Main/0154-wined3d-Completely-reset-the-state-on-reset.patch diff --git a/patches/wined3d-CSMT_Main/0156-wined3d-Send-getdc-and-releasedc-through-the-command.patch b/patches/wined3d-CSMT_Main/0155-wined3d-Send-getdc-and-releasedc-through-the-command.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0156-wined3d-Send-getdc-and-releasedc-through-the-command.patch rename to patches/wined3d-CSMT_Main/0155-wined3d-Send-getdc-and-releasedc-through-the-command.patch diff --git a/patches/wined3d-CSMT_Main/0157-wined3d-Set-map_heap_memory-NULL-when-allocating-a-P.patch b/patches/wined3d-CSMT_Main/0156-wined3d-Set-map_heap_memory-NULL-when-allocating-a-P.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0157-wined3d-Set-map_heap_memory-NULL-when-allocating-a-P.patch rename to patches/wined3d-CSMT_Main/0156-wined3d-Set-map_heap_memory-NULL-when-allocating-a-P.patch diff --git a/patches/wined3d-CSMT_Main/0158-wined3d-Wait-only-for-the-buffer-to-be-idle.patch b/patches/wined3d-CSMT_Main/0157-wined3d-Wait-only-for-the-buffer-to-be-idle.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0158-wined3d-Wait-only-for-the-buffer-to-be-idle.patch rename to patches/wined3d-CSMT_Main/0157-wined3d-Wait-only-for-the-buffer-to-be-idle.patch diff --git a/patches/wined3d-CSMT_Main/0159-wined3d-Add-a-comment-about-worker-thread-lag.patch b/patches/wined3d-CSMT_Main/0158-wined3d-Add-a-comment-about-worker-thread-lag.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0159-wined3d-Add-a-comment-about-worker-thread-lag.patch rename to patches/wined3d-CSMT_Main/0158-wined3d-Add-a-comment-about-worker-thread-lag.patch diff --git a/patches/wined3d-CSMT_Main/0160-wined3d-Remove-the-texture-destroy-glFinish.patch b/patches/wined3d-CSMT_Main/0159-wined3d-Remove-the-texture-destroy-glFinish.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0160-wined3d-Remove-the-texture-destroy-glFinish.patch rename to patches/wined3d-CSMT_Main/0159-wined3d-Remove-the-texture-destroy-glFinish.patch diff --git a/patches/wined3d-CSMT_Main/0161-wined3d-Move-FBO-destruction-into-the-worker-thread.patch b/patches/wined3d-CSMT_Main/0160-wined3d-Move-FBO-destruction-into-the-worker-thread.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0161-wined3d-Move-FBO-destruction-into-the-worker-thread.patch rename to patches/wined3d-CSMT_Main/0160-wined3d-Move-FBO-destruction-into-the-worker-thread.patch diff --git a/patches/wined3d-CSMT_Main/0162-wined3d-Don-t-incref-decref-textures-in-color-depth-.patch b/patches/wined3d-CSMT_Main/0161-wined3d-Don-t-incref-decref-textures-in-color-depth-.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0162-wined3d-Don-t-incref-decref-textures-in-color-depth-.patch rename to patches/wined3d-CSMT_Main/0161-wined3d-Don-t-incref-decref-textures-in-color-depth-.patch diff --git a/patches/wined3d-CSMT_Main/0163-Winex11-complain-about-glfinish.patch b/patches/wined3d-CSMT_Main/0162-Winex11-complain-about-glfinish.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0163-Winex11-complain-about-glfinish.patch rename to patches/wined3d-CSMT_Main/0162-Winex11-complain-about-glfinish.patch diff --git a/patches/wined3d-CSMT_Main/0164-wined3d-Make-sure-the-new-window-is-set-up-before-se.patch b/patches/wined3d-CSMT_Main/0163-wined3d-Make-sure-the-new-window-is-set-up-before-se.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0164-wined3d-Make-sure-the-new-window-is-set-up-before-se.patch rename to patches/wined3d-CSMT_Main/0163-wined3d-Make-sure-the-new-window-is-set-up-before-se.patch diff --git a/patches/wined3d-CSMT_Main/0165-wined3d-Remove-the-device_reset-CS-sync-fixme.patch b/patches/wined3d-CSMT_Main/0164-wined3d-Remove-the-device_reset-CS-sync-fixme.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0165-wined3d-Remove-the-device_reset-CS-sync-fixme.patch rename to patches/wined3d-CSMT_Main/0164-wined3d-Remove-the-device_reset-CS-sync-fixme.patch diff --git a/patches/wined3d-CSMT_Main/0166-wined3d-Put-GL_APPLE_flush_buffer_range-syncing-back.patch b/patches/wined3d-CSMT_Main/0165-wined3d-Put-GL_APPLE_flush_buffer_range-syncing-back.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0166-wined3d-Put-GL_APPLE_flush_buffer_range-syncing-back.patch rename to patches/wined3d-CSMT_Main/0165-wined3d-Put-GL_APPLE_flush_buffer_range-syncing-back.patch diff --git a/patches/wined3d-CSMT_Main/0167-wined3d-Wait-for-the-resource-to-be-idle-when-destro.patch b/patches/wined3d-CSMT_Main/0166-wined3d-Wait-for-the-resource-to-be-idle-when-destro.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0167-wined3d-Wait-for-the-resource-to-be-idle-when-destro.patch rename to patches/wined3d-CSMT_Main/0166-wined3d-Wait-for-the-resource-to-be-idle-when-destro.patch diff --git a/patches/wined3d-CSMT_Main/0168-wined3d-Don-t-sync-on-redundant-discard-calls.patch b/patches/wined3d-CSMT_Main/0167-wined3d-Don-t-sync-on-redundant-discard-calls.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0168-wined3d-Don-t-sync-on-redundant-discard-calls.patch rename to patches/wined3d-CSMT_Main/0167-wined3d-Don-t-sync-on-redundant-discard-calls.patch diff --git a/patches/wined3d-CSMT_Main/0169-wined3d-Don-t-discard-new-buffers.patch b/patches/wined3d-CSMT_Main/0168-wined3d-Don-t-discard-new-buffers.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0169-wined3d-Don-t-discard-new-buffers.patch rename to patches/wined3d-CSMT_Main/0168-wined3d-Don-t-discard-new-buffers.patch diff --git a/patches/wined3d-CSMT_Main/0170-wined3d-Don-t-try-to-sync-VBOs-manually-on-OSX-with-.patch b/patches/wined3d-CSMT_Main/0169-wined3d-Don-t-try-to-sync-VBOs-manually-on-OSX-with-.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0170-wined3d-Don-t-try-to-sync-VBOs-manually-on-OSX-with-.patch rename to patches/wined3d-CSMT_Main/0169-wined3d-Don-t-try-to-sync-VBOs-manually-on-OSX-with-.patch diff --git a/patches/wined3d-CSMT_Main/0171-wined3d-Render-target-lock-hack.patch b/patches/wined3d-CSMT_Main/0170-wined3d-Render-target-lock-hack.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0171-wined3d-Render-target-lock-hack.patch rename to patches/wined3d-CSMT_Main/0170-wined3d-Render-target-lock-hack.patch diff --git a/patches/wined3d-CSMT_Main/0172-wined3d-Avoid-calling-wined3d_surface_blt-from-surfa.patch b/patches/wined3d-CSMT_Main/0171-wined3d-Avoid-calling-wined3d_surface_blt-from-surfa.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0172-wined3d-Avoid-calling-wined3d_surface_blt-from-surfa.patch rename to patches/wined3d-CSMT_Main/0171-wined3d-Avoid-calling-wined3d_surface_blt-from-surfa.patch diff --git a/patches/wined3d-CSMT_Main/0173-wined3d-Only-discard-buffers-that-are-in-use.patch b/patches/wined3d-CSMT_Main/0172-wined3d-Only-discard-buffers-that-are-in-use.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0173-wined3d-Only-discard-buffers-that-are-in-use.patch rename to patches/wined3d-CSMT_Main/0172-wined3d-Only-discard-buffers-that-are-in-use.patch diff --git a/patches/wined3d-CSMT_Main/0174-wined3d-Destroy-samplers-through-the-command-stream.patch b/patches/wined3d-CSMT_Main/0173-wined3d-Destroy-samplers-through-the-command-stream.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0174-wined3d-Destroy-samplers-through-the-command-stream.patch rename to patches/wined3d-CSMT_Main/0173-wined3d-Destroy-samplers-through-the-command-stream.patch diff --git a/patches/wined3d-CSMT_Main/0175-wined3d-Hack-to-reject-unsupported-color-fills.patch b/patches/wined3d-CSMT_Main/0174-wined3d-Hack-to-reject-unsupported-color-fills.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0175-wined3d-Hack-to-reject-unsupported-color-fills.patch rename to patches/wined3d-CSMT_Main/0174-wined3d-Hack-to-reject-unsupported-color-fills.patch diff --git a/patches/wined3d-CSMT_Main/0176-wined3d-Alloc-the-buffer-map-array-before-mapping-th.patch b/patches/wined3d-CSMT_Main/0175-wined3d-Alloc-the-buffer-map-array-before-mapping-th.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0176-wined3d-Alloc-the-buffer-map-array-before-mapping-th.patch rename to patches/wined3d-CSMT_Main/0175-wined3d-Alloc-the-buffer-map-array-before-mapping-th.patch diff --git a/patches/wined3d-CSMT_Main/0177-wined3d-Send-update_sub_resource-calls-through-the-c.patch b/patches/wined3d-CSMT_Main/0176-wined3d-Send-update_sub_resource-calls-through-the-c.patch similarity index 100% rename from patches/wined3d-CSMT_Main/0177-wined3d-Send-update_sub_resource-calls-through-the-c.patch rename to patches/wined3d-CSMT_Main/0176-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 bb8f9c44..e566d2f5 100644 --- a/patches/wined3d-CSMT_Main/9999-IfDefined.patch +++ b/patches/wined3d-CSMT_Main/9999-IfDefined.patch @@ -433,7 +433,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c --- a/dlls/d3d8/tests/visual.c +++ b/dlls/d3d8/tests/visual.c -@@ -5440,7 +5440,11 @@ +@@ -5471,7 +5471,11 @@ fill_surface(surface_managed, 0x0000ff00, D3DLOCK_NO_DIRTY_UPDATE); add_dirty_rect_test_draw(device); color = getPixelColor(device, 320, 240); @@ -1772,7 +1772,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN; -@@ -1015,9 +1045,14 @@ +@@ -1019,9 +1049,14 @@ WORD use_map; /* MAX_ATTRIBS, 16 */ }; @@ -1787,7 +1787,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) DECLSPEC_HIDDEN; #define eps 1e-8f -@@ -1105,8 +1140,10 @@ +@@ -1109,8 +1144,10 @@ struct list entry; GLuint id; struct wined3d_context *context; @@ -1798,7 +1798,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; union wined3d_gl_query_object -@@ -1142,6 +1179,7 @@ +@@ -1146,6 +1183,7 @@ struct list entry; GLuint id; struct wined3d_context *context; @@ -1806,7 +1806,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h UINT64 timestamp; }; -@@ -1177,6 +1215,12 @@ +@@ -1181,6 +1219,12 @@ for (i = 0; i < min(dst->rt_size, src->rt_size); i++) dst->render_targets[i] = src->render_targets[i]; } @@ -1819,7 +1819,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_context { -@@ -1192,7 +1236,9 @@ +@@ -1196,7 +1240,9 @@ DWORD dirtyArray[STATE_HIGHEST + 1]; /* Won't get bigger than that, a state is never marked dirty 2 times */ DWORD numDirtyEntries; DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */ @@ -1829,7 +1829,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_swapchain *swapchain; struct wined3d_surface *current_rt; -@@ -1289,8 +1335,17 @@ +@@ -1293,8 +1339,17 @@ GLfloat fog_coord_value; GLfloat color[4], fogstart, fogend, fogcolor[4]; GLuint dummy_arbfp_prog; @@ -1847,7 +1847,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id); -@@ -1430,8 +1485,12 @@ +@@ -1434,8 +1489,12 @@ void context_apply_blit_state(struct wined3d_context *context, const struct wined3d_device *device) DECLSPEC_HIDDEN; BOOL context_apply_clear_state(struct wined3d_context *context, const struct wined3d_device *device, UINT rt_count, const struct wined3d_fb_state *fb) DECLSPEC_HIDDEN; @@ -1860,7 +1860,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void context_apply_fbo_state_blit(struct wined3d_context *context, GLenum target, struct wined3d_surface *render_target, struct wined3d_surface *depth_stencil, DWORD location) DECLSPEC_HIDDEN; void context_active_texture(struct wined3d_context *context, const struct wined3d_gl_info *gl_info, -@@ -2009,7 +2068,11 @@ +@@ -2013,7 +2072,11 @@ struct wined3d_state { DWORD flags; @@ -1872,7 +1872,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_vertex_declaration *vertex_declaration; struct wined3d_stream_output stream_output[MAX_STREAM_OUT]; -@@ -2054,6 +2117,7 @@ +@@ -2058,6 +2121,7 @@ DWORD render_states[WINEHIGHEST_RENDER_STATE + 1]; }; @@ -1880,7 +1880,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_gl_bo { GLuint name; -@@ -2062,6 +2126,7 @@ +@@ -2066,6 +2130,7 @@ UINT size; }; @@ -1888,7 +1888,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h #define WINED3D_UNMAPPED_STAGE ~0U /* Multithreaded flag. Removed from the public header to signal that -@@ -2117,11 +2182,23 @@ +@@ -2121,11 +2186,23 @@ struct wined3d_rendertarget_view *back_buffer_view; struct wined3d_swapchain **swapchains; UINT swapchain_count; @@ -1912,7 +1912,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /* For rendering to a texture using glCopyTexImage */ GLuint depth_blt_texture; -@@ -2132,6 +2209,9 @@ +@@ -2136,6 +2213,9 @@ UINT xScreenSpace; UINT yScreenSpace; UINT cursorWidth, cursorHeight; @@ -1922,7 +1922,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h HCURSOR hardwareCursor; /* The Wine logo texture */ -@@ -2163,6 +2243,7 @@ +@@ -2167,6 +2247,7 @@ UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc) DECLSPEC_HIDDEN; void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN; void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN; @@ -1930,7 +1930,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h 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; void device_exec_update_texture(struct wined3d_context *context, struct wined3d_texture *src_texture, -@@ -2174,6 +2255,11 @@ +@@ -2178,6 +2259,11 @@ void device_create_dummy_textures(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN; void device_delete_opengl_contexts_cs(struct wined3d_device *device, struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; @@ -1942,7 +1942,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state) { -@@ -2190,9 +2276,11 @@ +@@ -2194,9 +2280,11 @@ ULONG (*resource_incref)(struct wined3d_resource *resource); ULONG (*resource_decref)(struct wined3d_resource *resource); void (*resource_unload)(struct wined3d_resource *resource); @@ -1954,7 +1954,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_resource -@@ -2217,6 +2305,7 @@ +@@ -2221,6 +2309,7 @@ UINT depth; UINT size; DWORD priority; @@ -1962,7 +1962,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void *heap_memory, *map_heap_memory, *user_memory, *bitmap_data; UINT custom_row_pitch, custom_slice_pitch; struct wined3d_gl_bo *buffer, *map_buffer; -@@ -2224,6 +2313,10 @@ +@@ -2228,6 +2317,10 @@ DWORD locations; LONG access_fence; BOOL unmap_dirtify; @@ -1973,7 +1973,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void *parent; const struct wined3d_parent_ops *parent_ops; -@@ -2248,6 +2341,7 @@ +@@ -2252,6 +2345,7 @@ void *parent, const struct wined3d_parent_ops *parent_ops, const struct wined3d_resource_ops *resource_ops) DECLSPEC_HIDDEN; void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN; @@ -1981,7 +1981,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h DWORD wined3d_resource_access_from_location(DWORD location) DECLSPEC_HIDDEN; BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN; void wined3d_resource_changed(struct wined3d_resource *resource, -@@ -2296,6 +2390,15 @@ +@@ -2300,6 +2394,15 @@ { while(InterlockedCompareExchange(&resource->access_fence, 0, 0)); } @@ -1997,7 +1997,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /* Tests show that the start address of resources is 32 byte aligned */ #define RESOURCE_ALIGNMENT 16 -@@ -2383,7 +2486,9 @@ +@@ -2387,7 +2490,9 @@ void wined3d_texture_apply_sampler_desc(struct wined3d_texture *texture, const struct wined3d_sampler_desc *sampler_desc, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; @@ -2007,7 +2007,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void wined3d_texture_bind(struct wined3d_texture *texture, struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN; void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture, -@@ -2417,9 +2522,16 @@ +@@ -2421,9 +2526,16 @@ struct wined3d_resource resource; struct wined3d_texture *container; @@ -2024,7 +2024,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; static inline struct wined3d_volume *volume_from_resource(struct wined3d_resource *resource) -@@ -2427,6 +2539,7 @@ +@@ -2431,6 +2543,7 @@ return CONTAINING_RECORD(resource, struct wined3d_volume, resource); } @@ -2032,7 +2032,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h HRESULT wined3d_volume_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc, unsigned int level, struct wined3d_volume **volume) DECLSPEC_HIDDEN; void wined3d_volume_destroy(struct wined3d_volume *volume) DECLSPEC_HIDDEN; -@@ -2442,6 +2555,27 @@ +@@ -2446,6 +2559,27 @@ struct wined3d_surface_dib { HBITMAP DIBsection; @@ -2060,7 +2060,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h UINT bitmap_size; }; -@@ -2467,7 +2601,11 @@ +@@ -2471,7 +2605,11 @@ struct wined3d_surface_ops { HRESULT (*surface_private_setup)(struct wined3d_surface *surface); @@ -2072,7 +2072,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_surface -@@ -2475,12 +2613,26 @@ +@@ -2479,12 +2617,26 @@ struct wined3d_resource resource; const struct wined3d_surface_ops *surface_ops; struct wined3d_texture *container; @@ -2099,7 +2099,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h GLuint rb_multisample; GLuint rb_resolved; GLenum texture_target; -@@ -2524,10 +2676,19 @@ +@@ -2528,10 +2680,19 @@ GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HIDDEN; void surface_get_drawable_size(const struct wined3d_surface *surface, const struct wined3d_context *context, unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN; @@ -2119,7 +2119,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN; void surface_prepare_rb(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, BOOL multisample) DECLSPEC_HIDDEN; -@@ -2539,6 +2700,7 @@ +@@ -2543,6 +2704,7 @@ const struct wined3d_gl_info *gl_info, void *mem, unsigned int pitch) DECLSPEC_HIDDEN; HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const POINT *dst_point, struct wined3d_surface *src_surface, const RECT *src_rect) DECLSPEC_HIDDEN; @@ -2127,7 +2127,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; -@@ -2553,6 +2715,17 @@ +@@ -2557,6 +2719,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; @@ -2145,7 +2145,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; -@@ -2575,8 +2748,10 @@ +@@ -2579,8 +2752,10 @@ GLuint name; }; @@ -2156,7 +2156,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; -@@ -2605,8 +2780,10 @@ +@@ -2609,8 +2784,10 @@ BOOL half_float_conv_needed; }; @@ -2167,7 +2167,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]; -@@ -2674,6 +2851,7 @@ +@@ -2678,6 +2855,7 @@ void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN; void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN; @@ -2175,7 +2175,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; -@@ -2724,6 +2902,32 @@ +@@ -2728,6 +2906,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; @@ -2208,7 +2208,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; -@@ -2773,6 +2977,7 @@ +@@ -2777,6 +2981,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; @@ -2216,7 +2216,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, -@@ -2836,6 +3041,7 @@ +@@ -2840,6 +3045,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; @@ -2224,7 +2224,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 -@@ -2850,8 +3056,12 @@ +@@ -2854,8 +3060,12 @@ struct wined3d_query_ops { HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags); @@ -2237,7 +2237,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_query -@@ -2865,12 +3075,16 @@ +@@ -2869,12 +3079,16 @@ enum wined3d_query_type type; DWORD data_size; void *extendedData; @@ -2254,7 +2254,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 */ -@@ -2897,7 +3111,9 @@ +@@ -2901,7 +3115,9 @@ GLenum buffer_object_usage; GLenum buffer_type_hint; DWORD flags; @@ -2264,7 +2264,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void *map_ptr; struct wined3d_map_range *maps; -@@ -2922,11 +3138,15 @@ +@@ -2926,11 +3142,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; @@ -2280,7 +2280,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_rendertarget_view { -@@ -2965,8 +3185,10 @@ +@@ -2969,8 +3189,10 @@ return surface_from_resource(resource); } @@ -2291,7 +2291,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_shader_resource_view { LONG refcount; -@@ -2979,8 +3201,12 @@ +@@ -2983,8 +3205,12 @@ struct wined3d_swapchain_ops { void (*swapchain_present)(struct wined3d_swapchain *swapchain, const RECT *src_rect, @@ -2304,7 +2304,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_swapchain -@@ -3019,8 +3245,10 @@ +@@ -3023,8 +3249,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; @@ -2315,7 +2315,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /***************************************************************************** * Utility function prototypes -@@ -3224,7 +3452,9 @@ +@@ -3228,7 +3456,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; @@ -8025,7 +8025,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; -@@ -3746,6 +4603,135 @@ +@@ -3746,6 +4603,130 @@ TRACE("Surface was discarded, nothing to do.\n"); return WINED3D_OK; } @@ -8113,9 +8113,12 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c + memcpy(dst.addr, src.addr, size); +} + ++/* Context activation is done by the caller. */ +static void surface_load_sysmem(struct wined3d_surface *surface, -+ const struct wined3d_gl_info *gl_info, DWORD dst_location) ++ struct wined3d_context *context, DWORD dst_location) +{ ++ const struct wined3d_gl_info *gl_info = context->gl_info; ++ + if (surface->locations & surface_simple_locations) + { + surface_copy_simple_location(surface, dst_location); @@ -8128,18 +8131,10 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c + /* Download the surface to system memory. */ + if (surface->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB)) + { -+ struct wined3d_device *device = surface->resource.device; -+ struct wined3d_context *context; -+ -+ /* TODO: Use already acquired context when possible. */ -+ context = context_acquire(device, NULL); -+ + wined3d_texture_bind_and_dirtify(surface->container, context, + !(surface->locations & WINED3D_LOCATION_TEXTURE_RGB)); + surface_download_data(surface, gl_info, dst_location); + -+ context_release(context); -+ + return; + } + @@ -8161,7 +8156,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)) -@@ -3755,6 +4741,7 @@ +@@ -3755,6 +4736,7 @@ } surface_get_rect(surface, NULL, &r); @@ -8169,10 +8164,11 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c wined3d_resource_load_location(&surface->resource, context, WINED3D_LOCATION_TEXTURE_RGB); surface_blt_to_drawable(surface->resource.device, context, WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r); -@@ -3823,6 +4810,66 @@ +@@ -3823,7 +4805,67 @@ RECT rect = {0, 0, surface->resource.width, surface->resource.height}; surface_blt_fbo(device, context, WINED3D_TEXF_POINT, surface, src_location, +- &rect, surface, dst_location, &rect); +#else /* STAGING_CSMT */ + surface_load_location(surface, WINED3D_LOCATION_TEXTURE_RGB); + surface_blt_to_drawable(surface->resource.device, @@ -8233,10 +8229,11 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c + + surface_blt_fbo(device, WINED3D_TEXF_POINT, surface, src_location, +#endif /* STAGING_CSMT */ - &rect, surface, dst_location, &rect); ++ &rect, surface, dst_location, &rect); return WINED3D_OK; -@@ -3832,6 +4879,7 @@ + } +@@ -3832,6 +4874,7 @@ if (srgb) { @@ -8244,7 +8241,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) { -@@ -3866,6 +4914,45 @@ +@@ -3866,6 +4909,45 @@ width = surface->resource.width; wined3d_resource_get_pitch(&surface->resource, &src_row_pitch, &src_slice_pitch); @@ -8290,7 +8287,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))) -@@ -3874,7 +4961,11 @@ +@@ -3874,7 +4956,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. */ @@ -8302,7 +8299,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c { TRACE("Removing the pbo attached to surface %p.\n", surface); -@@ -3883,6 +4974,7 @@ +@@ -3883,6 +4969,7 @@ else surface->resource.map_binding = WINED3D_LOCATION_SYSMEM; @@ -8310,7 +8307,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); -@@ -3890,6 +4982,14 @@ +@@ -3890,6 +4977,14 @@ } wined3d_resource_get_memory(&surface->resource, surface->resource.locations, &data); @@ -8325,7 +8322,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. */ -@@ -3904,9 +5004,15 @@ +@@ -3904,9 +4999,15 @@ context_release(context); return E_OUTOFMEMORY; } @@ -8341,7 +8338,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c data.addr = mem; } else if (conversion) -@@ -3926,6 +5032,7 @@ +@@ -3926,6 +5027,7 @@ } if (texture->swapchain && texture->swapchain->palette) palette = texture->swapchain->palette; @@ -8349,10 +8346,10 @@ 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; -@@ -3958,6 +5065,40 @@ - struct wined3d_context *context, DWORD location) - { - struct wined3d_surface *surface = surface_from_resource(resource); +@@ -3989,6 +5091,88 @@ + ERR("Surface %p does not have any up to date location.\n", surface); + surface->flags |= SFLAG_LOST; + return; +#else /* STAGING_CSMT */ + conversion->convert(data.addr, src_pitch, mem, dst_pitch, + width, height, palette, &texture->async.gl_color_key); @@ -8386,66 +8383,35 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c +{ + struct wined3d_device *device = surface->resource.device; + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; -+#endif /* STAGING_CSMT */ - HRESULT hr; - - TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location)); -@@ -3965,30 +5106,73 @@ - if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL) - { - if (location == WINED3D_LOCATION_TEXTURE_RGB -+#if defined(STAGING_CSMT) - && surface->resource.locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_DISCARDED)) - { - surface_load_ds_location(surface, context, location); - return; - } -- else if (location & surface->resource.locations -+ else if (location & surface->resource.locations -+ && surface->container->resource.draw_binding != WINED3D_LOCATION_DRAWABLE) -+ { -+ /* Already up to date, nothing to do. */ -+ return; -+ } -+ else -+ { -+ FIXME("Unimplemented copy from %s to %s for depth/stencil buffers.\n", -+ wined3d_debug_location(surface->resource.locations), wined3d_debug_location(location)); -+ return; -+ } -+ } ++ HRESULT hr; ++ struct wined3d_context *context = NULL; + -+ if (!surface->resource.locations) ++ TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location)); ++ ++ if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL) + { -+ ERR("Surface %p does not have any up to date location.\n", surface); -+ surface->flags |= SFLAG_LOST; -+ return; -+#else /* STAGING_CSMT */ ++ if (location == WINED3D_LOCATION_TEXTURE_RGB + && surface->locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_DISCARDED)) + { -+ struct wined3d_context *context = context_acquire(device, NULL); ++ context = context_acquire(device, NULL); + surface_load_ds_location(surface, context, location); + context_release(context); + return WINED3D_OK; + } + else if (location & surface->locations - && surface->container->resource.draw_binding != WINED3D_LOCATION_DRAWABLE) - { - /* Already up to date, nothing to do. */ -- return; ++ && surface->container->resource.draw_binding != WINED3D_LOCATION_DRAWABLE) ++ { ++ /* Already up to date, nothing to do. */ + return WINED3D_OK; - } - else - { - FIXME("Unimplemented copy from %s to %s for depth/stencil buffers.\n", -- wined3d_debug_location(surface->resource.locations), wined3d_debug_location(location)); -- return; ++ } ++ else ++ { ++ FIXME("Unimplemented copy from %s to %s for depth/stencil buffers.\n", + wined3d_debug_location(surface->locations), wined3d_debug_location(location)); + return WINED3DERR_INVALIDCALL; - } - } - -- if (!surface->resource.locations) ++ } ++ } ++ + if (surface->locations & location) + { + TRACE("Location already up to date.\n"); @@ -8461,10 +8427,9 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c + } + + if (!surface->locations) - { - ERR("Surface %p does not have any up to date location.\n", surface); - surface->flags |= SFLAG_LOST; -- return; ++ { ++ ERR("Surface %p does not have any up to date location.\n", surface); ++ surface->flags |= SFLAG_LOST; + return WINED3DERR_DEVICELOST; +#endif /* STAGING_CSMT */ } @@ -8478,12 +8443,16 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c surface_load_sysmem(surface, context, location); break; -@@ -4014,6 +5199,24 @@ +@@ -4014,6 +5199,28 @@ if (FAILED(hr = surface_load_texture(surface, context, location == WINED3D_LOCATION_TEXTURE_SRGB))) return; +#else /* STAGING_CSMT */ -+ surface_load_sysmem(surface, gl_info, location); ++ if (device->d3d_initialized) ++ context = context_acquire(device, NULL); ++ surface_load_sysmem(surface, context, location); ++ if (context) ++ context_release(context); + break; + + case WINED3D_LOCATION_DRAWABLE: @@ -8503,7 +8472,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c break; default: -@@ -4021,12 +5224,21 @@ +@@ -4021,12 +5228,21 @@ break; } @@ -8525,7 +8494,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; } -@@ -4134,6 +5346,7 @@ +@@ -4134,6 +5350,7 @@ const RECT *dst_rect, const struct wined3d_color *color) { const RECT draw_rect = {0, 0, dst_surface->resource.width, dst_surface->resource.height}; @@ -8533,7 +8502,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c struct wined3d_rendertarget_view view, *view_ptr = &view; struct wined3d_fb_state fb = {&view_ptr, NULL, 1}; struct wined3d_texture *texture = dst_surface->container; -@@ -4154,6 +5367,21 @@ +@@ -4154,6 +5371,21 @@ view.sub_resource_idx = dst_surface->texture_layer * texture->level_count + dst_surface->texture_level; device_clear_render_targets(device, 1, &fb, 1, dst_rect, &draw_rect, WINED3DCLEAR_TARGET, color, 0.0f, 0); @@ -8555,7 +8524,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c return WINED3D_OK; } -@@ -4162,6 +5390,7 @@ +@@ -4162,6 +5394,7 @@ const RECT *dst_rect, float depth) { const RECT draw_rect = {0, 0, dst_surface->resource.width, dst_surface->resource.height}; @@ -8563,7 +8532,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c struct wined3d_rendertarget_view view; struct wined3d_fb_state fb = {NULL, &view}; struct wined3d_texture *texture = dst_surface->container; -@@ -4177,6 +5406,20 @@ +@@ -4177,6 +5410,20 @@ view.sub_resource_idx = dst_surface->texture_layer * texture->level_count + dst_surface->texture_level; device_clear_render_targets(device, 0, &fb, 1, dst_rect, &draw_rect, WINED3DCLEAR_ZBUFFER, 0, depth, 0); @@ -8584,7 +8553,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c return WINED3D_OK; } -@@ -4186,8 +5429,10 @@ +@@ -4186,8 +5433,10 @@ struct wined3d_surface *dst_surface, const RECT *dst_rect, const struct wined3d_color_key *color_key) { @@ -8595,7 +8564,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c /* Blit from offscreen surface to render target */ struct wined3d_color_key old_blt_key = src_surface->container->async.src_blt_color_key; DWORD old_color_key_flags = src_surface->container->async.color_key_flags; -@@ -4196,6 +5441,7 @@ +@@ -4196,6 +5445,7 @@ wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT, color_key); @@ -8603,7 +8572,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c context = context_acquire(device, dst_surface); surface_blt_to_drawable(device, context, filter, !!color_key, src_surface, src_rect, dst_surface, dst_rect); -@@ -4207,6 +5453,17 @@ +@@ -4207,6 +5457,17 @@ wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding); wined3d_resource_invalidate_location(&dst_surface->resource, ~dst_surface->container->resource.draw_binding); @@ -8621,7 +8590,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } const struct blit_shader ffp_blit = { -@@ -4362,6 +5619,7 @@ +@@ -4362,6 +5623,7 @@ struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags, const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter) { @@ -8629,7 +8598,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; -@@ -4396,6 +5654,28 @@ +@@ -4396,6 +5658,28 @@ wined3d_resource_get_pitch(&dst_surface->resource, &dst_row_pitch, &dst_slice_pitch); src_data = dst_data; src_row_pitch = dst_row_pitch; @@ -8658,7 +8627,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; -@@ -4407,12 +5687,14 @@ +@@ -4407,12 +5691,14 @@ dst_fmt_flags = dst_surface->container->resource.format_flags; if (src_surface) { @@ -8673,7 +8642,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))) -@@ -4423,9 +5705,13 @@ +@@ -4423,9 +5709,13 @@ } src_surface = surface_from_resource(wined3d_texture_get_sub_resource(src_texture, 0)); } @@ -8687,7 +8656,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; } -@@ -4435,8 +5721,12 @@ +@@ -4435,8 +5725,12 @@ src_fmt_flags = dst_fmt_flags; } @@ -8700,7 +8669,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } bpp = dst_surface->resource.format->byte_count; -@@ -4447,12 +5737,24 @@ +@@ -4447,12 +5741,24 @@ width = (dst_rect->right - dst_rect->left) * bpp; if (src_surface) @@ -8725,7 +8694,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (src_fmt_flags & dst_fmt_flags & WINED3DFMT_FLAG_BLOCKS) { -@@ -4487,7 +5789,11 @@ +@@ -4487,7 +5793,11 @@ } hr = surface_cpu_blt_compressed(sbase, dbuf, @@ -8737,7 +8706,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c src_format, flags, fx); goto release; } -@@ -4495,7 +5801,11 @@ +@@ -4495,7 +5805,11 @@ /* First, all the 'source-less' blits */ if (flags & WINEDDBLT_COLORFILL) { @@ -8749,7 +8718,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c flags &= ~WINEDDBLT_COLORFILL; } -@@ -4544,6 +5854,7 @@ +@@ -4544,6 +5858,7 @@ for (y = 0; y < dstheight; ++y) { memcpy(dbuf, sbuf, width); @@ -8757,7 +8726,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c sbuf += src_row_pitch; dbuf += dst_row_pitch; } -@@ -4557,6 +5868,21 @@ +@@ -4557,6 +5872,21 @@ { sbuf -= src_row_pitch; dbuf -= dst_row_pitch; @@ -8779,7 +8748,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c memcpy(dbuf, sbuf, width); } } -@@ -4566,8 +5892,13 @@ +@@ -4566,8 +5896,13 @@ for (y = 0; y < dstheight; ++y) { memmove(dbuf, sbuf, width); @@ -8793,7 +8762,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } } } -@@ -4576,9 +5907,15 @@ +@@ -4576,9 +5911,15 @@ /* Stretching in y direction only. */ for (y = sy = 0; y < dstheight; ++y, sy += yinc) { @@ -8809,7 +8778,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } } } -@@ -4588,6 +5925,7 @@ +@@ -4588,6 +5929,7 @@ int last_sy = -1; for (y = sy = 0; y < dstheight; ++y, sy += yinc) { @@ -8817,7 +8786,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)) -@@ -4595,6 +5933,15 @@ +@@ -4595,6 +5937,15 @@ /* This source row is the same as last source row - * Copy the already stretched row. */ memcpy(dbuf, dbuf - dst_row_pitch, width); @@ -8833,7 +8802,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } else { -@@ -4641,6 +5988,7 @@ +@@ -4641,6 +5992,7 @@ } #undef STRETCH_ROW } @@ -8841,7 +8810,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c dbuf += dst_row_pitch; last_sy = sy; } -@@ -4649,6 +5997,16 @@ +@@ -4649,6 +6001,16 @@ else { LONG dstyinc = dst_row_pitch, dstxinc = bpp; @@ -8858,7 +8827,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)) -@@ -4698,7 +6056,11 @@ +@@ -4698,7 +6060,11 @@ LONG tmpxy; dTopLeft = dbuf; dTopRight = dbuf + ((dstwidth - 1) * bpp); @@ -8870,7 +8839,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c dBottomRight = dBottomLeft + ((dstwidth - 1) * bpp); if (fx->dwDDFX & WINEDDBLTFX_ARITHSTRETCHY) -@@ -4775,6 +6137,7 @@ +@@ -4775,6 +6141,7 @@ flags &= ~(WINEDDBLT_DDFX); } @@ -8878,7 +8847,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c #define COPY_COLORKEY_FX(type) \ do { \ const type *s; \ -@@ -4796,6 +6159,29 @@ +@@ -4796,6 +6163,29 @@ d = (type *)(((BYTE *)d) + dstyinc); \ } \ } while(0) @@ -8908,7 +8877,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c switch (bpp) { -@@ -4814,7 +6200,11 @@ +@@ -4814,7 +6204,11 @@ BYTE *d = dbuf, *dx; for (y = sy = 0; y < dstheight; ++y, sy += yinc) { @@ -8920,7 +8889,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c dx = d; for (x = sx = 0; x < dstwidth; ++x, sx+= xinc) { -@@ -4845,10 +6235,12 @@ +@@ -4845,10 +6239,12 @@ } } @@ -8933,7 +8902,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c error: if (flags && FIXME_ON(d3d_surface)) { -@@ -4856,6 +6248,7 @@ +@@ -4856,6 +6252,7 @@ } release: @@ -8941,7 +8910,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); -@@ -4874,6 +6267,14 @@ +@@ -4874,6 +6271,14 @@ wined3d_texture_decref(src_texture); if (context) context_release(context); @@ -8956,7 +8925,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c return hr; } -@@ -4918,6 +6319,7 @@ +@@ -4918,6 +6323,7 @@ cpu_blit_blit_surface, }; @@ -8964,7 +8933,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect, struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags, const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter) -@@ -4925,6 +6327,16 @@ +@@ -4925,6 +6331,16 @@ struct wined3d_swapchain *src_swapchain, *dst_swapchain; struct wined3d_device *device = dst_surface->resource.device; DWORD src_ds_flags, dst_ds_flags; @@ -8981,7 +8950,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c BOOL scale, convert; static const DWORD simple_blit = WINEDDBLT_ASYNC -@@ -4935,6 +6347,106 @@ +@@ -4935,6 +6351,106 @@ | WINEDDBLT_DEPTHFILL | WINEDDBLT_DONOTWAIT; @@ -9088,7 +9057,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (!device->d3d_initialized) { WARN("D3D not initialized, using fallback.\n"); -@@ -4977,8 +6489,13 @@ +@@ -4977,8 +6493,13 @@ } scale = src_surface @@ -9102,7 +9071,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c convert = src_surface && src_surface->resource.format->id != dst_surface->resource.format->id; dst_ds_flags = dst_surface->container->resource.format_flags -@@ -4998,6 +6515,7 @@ +@@ -4998,6 +6519,7 @@ TRACE("Depth fill.\n"); if (!surface_convert_depth_to_float(dst_surface, fx->u5.dwFillDepth, &depth)) @@ -9110,7 +9079,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))) -@@ -5008,6 +6526,24 @@ +@@ -5008,6 +6530,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; @@ -9135,7 +9104,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } } else -@@ -5016,8 +6552,13 @@ +@@ -5016,8 +6556,13 @@ /* In principle this would apply to depth blits as well, but we don't * implement those in the CPU blitter at the moment. */ @@ -9149,7 +9118,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c { if (scale) TRACE("Not doing sysmem blit because of scaling.\n"); -@@ -5038,8 +6579,13 @@ +@@ -5038,8 +6583,13 @@ palette, fx->u5.dwFillColor, &color)) goto fallback; @@ -9163,7 +9132,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } else { -@@ -5057,8 +6603,13 @@ +@@ -5057,8 +6607,13 @@ color_key = &src_surface->container->async.src_blt_color_key; blit_op = WINED3D_BLIT_OP_COLOR_BLIT_CKEY; } @@ -9177,7 +9146,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c { /* Upload */ if (scale) -@@ -5067,6 +6618,7 @@ +@@ -5067,6 +6622,7 @@ TRACE("Not doing upload because of format conversion.\n"); else { @@ -9185,7 +9154,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c POINT dst_point = {dst_rect->left, dst_rect->top}; if (SUCCEEDED(surface_upload_from_surface(dst_surface, &dst_point, src_surface, src_rect))) -@@ -5079,6 +6631,15 @@ +@@ -5079,6 +6635,15 @@ context_release(context); } return; @@ -9201,7 +9170,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } } } -@@ -5102,6 +6663,7 @@ +@@ -5102,6 +6667,7 @@ wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, NULL, 0); dst_swapchain->desc.swap_effect = swap_effect; @@ -9209,7 +9178,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c return; } -@@ -5307,6 +6869,49 @@ +@@ -5307,6 +6873,49 @@ wined3d_surface_location_invalidated, wined3d_surface_load_location, }; @@ -9259,7 +9228,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) -@@ -5368,7 +6973,11 @@ +@@ -5368,7 +6977,11 @@ } surface->container = container; @@ -9271,7 +9240,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c list_init(&surface->renderbuffers); list_init(&surface->overlays); -@@ -5400,9 +7009,14 @@ +@@ -5400,9 +7013,14 @@ if (surface->resource.map_binding == WINED3D_LOCATION_DIB) { wined3d_resource_free_sysmem(&surface->resource); @@ -9286,7 +9255,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } return hr; -@@ -5429,7 +7043,11 @@ +@@ -5429,7 +7047,11 @@ if (FAILED(hr = surface_init(object, container, desc, target, level, layer, flags))) { WARN("Failed to initialize surface, returning %#x.\n", hr); @@ -9301,7 +9270,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c -@@ -1867,7 +1867,11 @@ +@@ -1872,7 +1872,11 @@ } } @@ -9313,7 +9282,7 @@ diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c { HeapFree(GetProcessHeap(), 0, shader->output_signature.elements); HeapFree(GetProcessHeap(), 0, shader->input_signature.elements); -@@ -2126,10 +2130,16 @@ +@@ -2131,10 +2135,16 @@ if (!refcount) { @@ -9330,7 +9299,7 @@ diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c } return refcount; -@@ -2407,7 +2417,11 @@ +@@ -2412,7 +2422,11 @@ memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */ if (!gl_info->supported[ARB_FRAMEBUFFER_SRGB] && state->render_states[WINED3D_RS_SRGBWRITEENABLE]) {