Rebase against c2dc6f3ef26fb18e7766956ef0a8cbadccc364d6.

This commit is contained in:
Sebastian Lackner 2015-10-13 19:14:09 +02:00
parent e3ea1eef0d
commit 317fa9382c
179 changed files with 672 additions and 784 deletions

View File

@ -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 },';

View File

@ -1,79 +0,0 @@
From d802d551603f20fde872cf45d43064426bea4434 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
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

View File

@ -0,0 +1,101 @@
From 89a2597787017d7bc966c2a146fa4c4fc59e9ebb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
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

View File

@ -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?= <stefan@codeweavers.com>
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

View File

@ -1,282 +0,0 @@
From 74de56cff82b598bb71d556767bcd1c53dcb16e2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
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

Some files were not shown because too many files have changed in this diff Show More