Rebase against bf4493404cee43a345fe853b5c11b053cdd22322.

This commit is contained in:
Sebastian Lackner 2015-10-15 20:01:55 +02:00
parent e80a1b9b96
commit 032bf69aa7
177 changed files with 484 additions and 925 deletions

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "79361d3bc056ed7659fb63880ed91019837a4906"
echo "bf4493404cee43a345fe853b5c11b053cdd22322"
}
# Show version information
@ -5605,188 +5605,182 @@ 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-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-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/0002-wined3d-Pass-a-context-to-surface_multisample_resolv.patch
patch_apply wined3d-CSMT_Main/0003-wined3d-Pass-a-context-to-surface_load_texture.patch
patch_apply wined3d-CSMT_Main/0004-wined3d-Pass-a-context-to-surface_load_location.patch
patch_apply wined3d-CSMT_Main/0005-wined3d-Make-surface_load_location-return-nothing.patch
patch_apply wined3d-CSMT_Main/0006-wined3d-Store-volume-locations-in-the-resource.patch
patch_apply wined3d-CSMT_Main/0007-wined3d-Move-validate_location-to-resource.c.patch
patch_apply wined3d-CSMT_Main/0008-wined3d-Move-surface-locations-into-the-resource.patch
patch_apply wined3d-CSMT_Main/0009-wined3d-Remove-surface_validate_location.patch
patch_apply wined3d-CSMT_Main/0010-wined3d-Move-invalidate_location-to-resource.c.patch
patch_apply wined3d-CSMT_Main/0011-wined3d-Invalidate-containers-via-callback.patch
patch_apply wined3d-CSMT_Main/0012-wined3d-Remove-surface_invalidate_location.patch
patch_apply wined3d-CSMT_Main/0013-wined3d-Move-bitmap_data-and-user_memory-into-the-re.patch
patch_apply wined3d-CSMT_Main/0014-wined3d-Move-load_location-into-the-resource.patch
patch_apply wined3d-CSMT_Main/0015-wined3d-Replace-surface_load_location-with-resource_.patch
patch_apply wined3d-CSMT_Main/0016-wined3d-Introduce-helper-functions-for-mapping-volum.patch
patch_apply wined3d-CSMT_Main/0017-wined3d-Move-volume-PBO-infrastructure-into-the-reso.patch
patch_apply wined3d-CSMT_Main/0018-wined3d-Remove-surface-pbo.patch
patch_apply wined3d-CSMT_Main/0019-wined3d-Use-resource-buffer-mapping-facilities-in-su.patch
patch_apply wined3d-CSMT_Main/0020-wined3d-Move-buffer-creation-into-the-resource.patch
patch_apply wined3d-CSMT_Main/0021-wined3d-Handle-WINED3D_LOCATION_DISCARDED-in-surface.patch
patch_apply wined3d-CSMT_Main/0022-wined3d-Handle-LOCATION_DISCARDED-in-surface_load_dr.patch
patch_apply wined3d-CSMT_Main/0023-wined3d-Handle-WINED3D_LOCATION_DISCARDED-for-sysmem.patch
patch_apply wined3d-CSMT_Main/0024-wined3d-Discard-implicit-surfaces-on-unload.patch
patch_apply wined3d-CSMT_Main/0025-wined3d-Don-t-try-to-flip-sysmem-copies-in-swapchain.patch
patch_apply wined3d-CSMT_Main/0026-wined3d-Discard-the-backbuffer-in-discard-presents.patch
patch_apply wined3d-CSMT_Main/0027-wined3d-Allocate-sysmem-for-client-storage-if-it-doe.patch
patch_apply wined3d-CSMT_Main/0028-wined3d-Introduce-a-function-to-retrieve-resource-me.patch
patch_apply wined3d-CSMT_Main/0029-wined3d-Make-surface_ops-unmap-specific-for-front-bu.patch
patch_apply wined3d-CSMT_Main/0030-wined3d-Move-check_block_align-to-resource.c.patch
patch_apply wined3d-CSMT_Main/0031-wined3d-Replace-surface-alloc-functions-with-resourc.patch
patch_apply wined3d-CSMT_Main/0032-wined3d-Don-t-delete-the-buffer-in-surface_cleanup.patch
patch_apply wined3d-CSMT_Main/0033-wined3d-Use-resource-facilities-to-destroy-PBOs.patch
patch_apply wined3d-CSMT_Main/0034-wined3d-Move-simple-location-copying-to-the-resource.patch
patch_apply wined3d-CSMT_Main/0035-wined3d-Move-most-of-volume_map-to-resource.c.patch
patch_apply wined3d-CSMT_Main/0036-wined3d-Use-resource_map-for-surface_map.patch
patch_apply wined3d-CSMT_Main/0037-wined3d-Use-client-storage-with-DIB-sections.patch
patch_apply wined3d-CSMT_Main/0038-wined3d-Don-t-call-the-public-map-function-in-surfac.patch
patch_apply wined3d-CSMT_Main/0039-wined3d-Don-t-call-the-public-map-function-in-surfac.patch
patch_apply wined3d-CSMT_Main/0040-wined3d-Move-the-framebuffer-into-wined3d_state.patch
patch_apply wined3d-CSMT_Main/0041-wined3d-Get-rid-of-state-access-in-shader_generate_g.patch
patch_apply wined3d-CSMT_Main/0042-wined3d-Preload-buffers-if-streamsrc-is-not-dirty.patch
patch_apply wined3d-CSMT_Main/0043-wined3d-Hackily-introduce-a-multithreaded-command-st.patch
patch_apply wined3d-CSMT_Main/0044-wined3d-Wait-for-resource-updates-to-finish-when-usi.patch
patch_apply wined3d-CSMT_Main/0045-wined3d-Don-t-store-pointers-in-struct-wined3d_cs_pr.patch
patch_apply wined3d-CSMT_Main/0046-wined3d-Don-t-put-rectangle-pointers-into-wined3d_cs.patch
patch_apply wined3d-CSMT_Main/0047-wined3d-Store-the-color-in-clear-ops-instead-of-a-po.patch
patch_apply wined3d-CSMT_Main/0048-wined3d-Pass-the-state-to-draw_primitive.patch
patch_apply wined3d-CSMT_Main/0049-wined3d-Wait-for-the-cs-before-destroying-objects.patch
patch_apply wined3d-CSMT_Main/0050-wined3d-Give-the-cs-its-own-state.patch
patch_apply wined3d-CSMT_Main/0051-wined3d-Send-float-constant-updates-through-the-comm.patch
patch_apply wined3d-CSMT_Main/0052-wined3d-Request-a-glFinish-before-modifying-resource.patch
patch_apply wined3d-CSMT_Main/0053-wined3d-Finish-the-cs-before-changing-the-texture-lo.patch
patch_apply wined3d-CSMT_Main/0054-wined3d-Don-t-call-glFinish-after-clears.patch
patch_apply wined3d-CSMT_Main/0055-wined3d-Don-t-call-glFinish-after-draws.patch
patch_apply wined3d-CSMT_Main/0056-wined3d-Shadow-device-offscreenBuffer-in-the-context.patch
patch_apply wined3d-CSMT_Main/0057-wined3d-Don-t-access-the-stateblock-in-find_draw_buf.patch
patch_apply wined3d-CSMT_Main/0058-wined3d-Pass-the-depth-stencil-to-swapchain-present.patch
patch_apply wined3d-CSMT_Main/0059-wined3d-Don-t-store-viewport-pointers-in-the-command.patch
patch_apply wined3d-CSMT_Main/0060-wined3d-Keep-track-of-the-onscreen-depth-stencil-in-.patch
patch_apply wined3d-CSMT_Main/0061-wined3d-Send-base-vertex-index-updates-through-the-c.patch
patch_apply wined3d-CSMT_Main/0062-wined3d-Send-primitive-type-updates-through-the-comm.patch
patch_apply wined3d-CSMT_Main/0063-wined3d-Send-bool-constant-updates-through-the-comma.patch
patch_apply wined3d-CSMT_Main/0064-wined3d-Send-int-constant-updates-through-the-comman.patch
patch_apply wined3d-CSMT_Main/0065-wined3d-Send-light-updates-through-the-command-strea.patch
patch_apply wined3d-CSMT_Main/0066-wined3d-Prevent-the-command-stream-from-running-ahea.patch
patch_apply wined3d-CSMT_Main/0067-wined3d-Wait-for-the-cs-to-finish-before-destroying-.patch
patch_apply wined3d-CSMT_Main/0068-wined3d-Run-the-cs-asynchronously.patch
patch_apply wined3d-CSMT_Main/0069-wined3d-Send-blits-through-the-command-stream.patch
patch_apply wined3d-CSMT_Main/0070-wined3d-Put-update_surface-checks-back-in-place.patch
patch_apply wined3d-CSMT_Main/0071-wined3d-Get-rid-of-WINED3D_BUFFER_FLUSH.patch
patch_apply wined3d-CSMT_Main/0072-wined3d-Don-t-force-strict-draw-ordering-for-multith.patch
patch_apply wined3d-CSMT_Main/0073-wined3d-Send-render-target-view-clears-through-the-c.patch
patch_apply wined3d-CSMT_Main/0074-wined3d-Wait-for-the-CS-in-GetDC.patch
patch_apply wined3d-CSMT_Main/0075-wined3d-send-resource-maps-through-the-command-strea.patch
patch_apply wined3d-CSMT_Main/0076-wined3d-Get-rid-of-the-end_scene-flush-and-finish.patch
patch_apply wined3d-CSMT_Main/0077-wined3d-Replace-the-linked-lists-with-a-ringbuffer.patch
patch_apply wined3d-CSMT_Main/0078-wined3d-Don-t-preload-buffers-on-unmap.patch
patch_apply wined3d-CSMT_Main/0079-wined3d-Don-t-call-glFinish-before-swapping.patch
patch_apply wined3d-CSMT_Main/0080-wined3d-wined3d_-_query_issue-never-fails.patch
patch_apply wined3d-CSMT_Main/0081-wined3d-Add-query-support-to-the-command-stream.patch
patch_apply wined3d-CSMT_Main/0082-wined3d-Check-our-CS-state-to-find-out-if-a-query-is.patch
patch_apply wined3d-CSMT_Main/0083-wined3d-Poll-queries-automatically-in-the-CS.patch
patch_apply wined3d-CSMT_Main/0084-wined3d-Introduce-a-separate-queue-for-priority-comm.patch
patch_apply wined3d-CSMT_Main/0085-wined3d-Destroy-queries-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0086-wined3d-Separate-main-and-worker-thread-query-state.patch
patch_apply wined3d-CSMT_Main/0087-wined3d-Don-t-poll-queries-that-failed-to-start.patch
patch_apply wined3d-CSMT_Main/0088-wined3d-Remove-restated-queries-from-the-poll-list.patch
patch_apply wined3d-CSMT_Main/0089-wined3d-Don-t-reset-the-query-state-if-it-doesn-t-ha.patch
patch_apply wined3d-CSMT_Main/0090-wined3d-Put-this-into-the-query-poll-patch.patch
patch_apply wined3d-CSMT_Main/0091-wined3d-Send-update_surface-commands-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0092-wined3d-Send-texture-preloads-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0093-wined3d-Send-surface-preloads-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0094-wined3d-Send-update_texture-calls-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0095-wined3d-Get-rid-of-the-surface_upload_data-glFinish.patch
patch_apply wined3d-CSMT_Main/0096-wined3d-Don-t-lock-the-src-volume-in-device_update_v.patch
patch_apply wined3d-CSMT_Main/0097-wined3d-Handle-evit_managed_resources-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0098-wined3d-Introduce-resource-fencing.patch
patch_apply wined3d-CSMT_Main/0099-wined3d-Fence-update_texture-and-update_surface-call.patch
patch_apply wined3d-CSMT_Main/0100-wined3d-Dirtify-resources-on-unmap.patch
patch_apply wined3d-CSMT_Main/0101-wined3d-Fence-texture-reads-in-draws.patch
patch_apply wined3d-CSMT_Main/0102-wined3d-Fence-render-targets-and-depth-stencils.patch
patch_apply wined3d-CSMT_Main/0103-wined3d-Fence-blit-operations.patch
patch_apply wined3d-CSMT_Main/0104-wined3d-Fence-color_fill-operations.patch
patch_apply wined3d-CSMT_Main/0105-wined3d-Fence-clear-calls.patch
patch_apply wined3d-CSMT_Main/0106-wined3d-Fence-present-calls.patch
patch_apply wined3d-CSMT_Main/0107-wined3d-Make-resource-maps-and-unmaps-a-priority-com.patch
patch_apply wined3d-CSMT_Main/0108-wined3d-Dirtify-changed-textures-through-the-command.patch
patch_apply wined3d-CSMT_Main/0109-wined3d-Wrap-GL-BOs-in-a-structure.patch
patch_apply wined3d-CSMT_Main/0110-wined3d-Separate-resource-map-and-draw-buffers.patch
patch_apply wined3d-CSMT_Main/0111-wined3d-Implement-DISCARD-resource-maps-with-buffers.patch
patch_apply wined3d-CSMT_Main/0112-wined3d-Implement-DISCARD-resource-maps-with-heap-me.patch
patch_apply wined3d-CSMT_Main/0113-wined3d-Unset-some-objects-in-state_init_default.patch
patch_apply wined3d-CSMT_Main/0114-wined3d-Don-t-request-the-frontbuffer-to-create-dumm.patch
patch_apply wined3d-CSMT_Main/0115-wined3d-Use-double-buffered-buffers-for-multithreade.patch
patch_apply wined3d-CSMT_Main/0116-wined3d-Don-t-synchronize-NOOVERWRITE-buffer-maps.patch
patch_apply wined3d-CSMT_Main/0117-wined3d-Separate-buffer-map-write-and-draw-read-memo.patch
patch_apply wined3d-CSMT_Main/0118-wined3d-Accelerate-DISCARD-buffer-maps.patch
patch_apply wined3d-CSMT_Main/0119-wined3d-Accelerate-READONLY-buffer-maps.patch
patch_apply wined3d-CSMT_Main/0120-wined3d-Access-the-buffer-dirty-areas-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0121-wined3d-Ignore-buffer-resource.map_count-in-the-CS.patch
patch_apply wined3d-CSMT_Main/0122-wined3d-Send-buffer-preloads-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0123-wined3d-Use-glBufferSubData-instead-of-glMapBufferRa.patch
patch_apply wined3d-CSMT_Main/0124-wined3d-Separate-GL-buffer-discard-control-from-igno.patch
patch_apply wined3d-CSMT_Main/0125-wined3d-Create-buffers-before-mapping-them.patch
patch_apply wined3d-CSMT_Main/0126-wined3d-Destroy-views-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0127-wined3d-Remove-another-glFinish.patch
patch_apply wined3d-CSMT_Main/0128-wined3d-Destroy-vertex-declarations-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0129-wined3d-Destroy-shaders-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0130-wined3d-Create-VBOs-through-the-command-stream.patch
patch_apply wined3d-CSMT_Main/0131-wined3d-Clean-up-resource-data-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0132-wined3d-Clean-up-buffer-resource-data-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0133-wined3d-Clean-up-volume-resource-data-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0134-wined3d-Clean-up-surfaces-through-the-cs.patch
patch_apply wined3d-CSMT_Main/0135-wined3d-Clean-up-texture-resources-through-the-cs.patch
patch_apply wined3d-CSMT_Main/0136-wined3d-Unload-resources-through-the-CS-in-uninit_3d.patch
patch_apply wined3d-CSMT_Main/0137-wined3d-Unload-resources-through-the-CS-in-device_re.patch
patch_apply wined3d-CSMT_Main/0138-wined3d-Don-t-glFinish-after-a-depth-buffer-blit.patch
patch_apply wined3d-CSMT_Main/0139-wined3d-Remove-software-cursor-support.patch
patch_apply wined3d-CSMT_Main/0140-wined3d-Create-dummy-textures-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0141-wined3d-Create-the-initial-context-through-the-CS.patch
patch_apply wined3d-CSMT_Main/0142-wined3d-Recreate-ctx-and-dummy-textures-through-the-.patch
patch_apply wined3d-CSMT_Main/0143-wined3d-Ignore-WINED3D_MAP_NO_DIRTY_UPDATE-in-resour.patch
patch_apply wined3d-CSMT_Main/0144-wined3d-Delete-GL-contexts-through-the-CS-in-reset.patch
patch_apply wined3d-CSMT_Main/0145-wined3d-Delete-GL-contexts-through-the-CS-in-uninit_.patch
patch_apply wined3d-CSMT_Main/0146-wined3d-Invoke-surface_unload-through-the-CS-in-wine.patch
patch_apply wined3d-CSMT_Main/0147-wined3d-Use-an-event-to-block-the-worker-thread-when.patch
patch_apply wined3d-CSMT_Main/0148-wined3d-Fence-preload-operations.patch
patch_apply wined3d-CSMT_Main/0149-d3d8-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch
patch_apply wined3d-CSMT_Main/0150-d3d9-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch
patch_apply wined3d-CSMT_Main/0151-wined3d-Completely-reset-the-state-on-reset.patch
patch_apply wined3d-CSMT_Main/0152-wined3d-Send-getdc-and-releasedc-through-the-command.patch
patch_apply wined3d-CSMT_Main/0153-wined3d-Set-map_heap_memory-NULL-when-allocating-a-P.patch
patch_apply wined3d-CSMT_Main/0154-wined3d-Wait-only-for-the-buffer-to-be-idle.patch
patch_apply wined3d-CSMT_Main/0155-wined3d-Add-a-comment-about-worker-thread-lag.patch
patch_apply wined3d-CSMT_Main/0156-wined3d-Remove-the-texture-destroy-glFinish.patch
patch_apply wined3d-CSMT_Main/0157-wined3d-Move-FBO-destruction-into-the-worker-thread.patch
patch_apply wined3d-CSMT_Main/0158-wined3d-Don-t-incref-decref-textures-in-color-depth-.patch
patch_apply wined3d-CSMT_Main/0159-Winex11-complain-about-glfinish.patch
patch_apply wined3d-CSMT_Main/0160-wined3d-Make-sure-the-new-window-is-set-up-before-se.patch
patch_apply wined3d-CSMT_Main/0161-wined3d-Remove-the-device_reset-CS-sync-fixme.patch
patch_apply wined3d-CSMT_Main/0162-wined3d-Put-GL_APPLE_flush_buffer_range-syncing-back.patch
patch_apply wined3d-CSMT_Main/0163-wined3d-Wait-for-the-resource-to-be-idle-when-destro.patch
patch_apply wined3d-CSMT_Main/0164-wined3d-Don-t-sync-on-redundant-discard-calls.patch
patch_apply wined3d-CSMT_Main/0165-wined3d-Don-t-discard-new-buffers.patch
patch_apply wined3d-CSMT_Main/0166-wined3d-Don-t-try-to-sync-VBOs-manually-on-OSX-with-.patch
patch_apply wined3d-CSMT_Main/0167-wined3d-Render-target-lock-hack.patch
patch_apply wined3d-CSMT_Main/0168-wined3d-Avoid-calling-wined3d_surface_blt-from-surfa.patch
patch_apply wined3d-CSMT_Main/0169-wined3d-Only-discard-buffers-that-are-in-use.patch
patch_apply wined3d-CSMT_Main/0170-wined3d-Destroy-samplers-through-the-command-stream.patch
patch_apply wined3d-CSMT_Main/0171-wined3d-Hack-to-reject-unsupported-color-fills.patch
patch_apply wined3d-CSMT_Main/0172-wined3d-Alloc-the-buffer-map-array-before-mapping-th.patch
patch_apply wined3d-CSMT_Main/0173-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 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 },';
echo '+ { "Stefan Dösinger", "wined3d: Pass a context to surface_multisample_resolve.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Pass a context to surface_load_texture.", 1 },';
echo '+ { "Stefan Dösinger", "wined3d: Pass a context to surface_load_location.", 1 },';

View File

@ -1,81 +0,0 @@
From fb2ae897035c342f2d78590928eaa62f8bb2b47e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 17 Nov 2013 19:16:40 +0100
Subject: wined3d: Pass a context to read_from_framebuffer.
In the average case the function will not be able to reuse it, because
it requires a specific context to access the WGL framebuffer. It will
restore the original context afterwards to hide the context change from
load_location / preload callers. This is related to bug 34574.
---
dlls/wined3d/surface.c | 29 +++++++++++++++++++++++++----
1 file changed, 25 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 534a152..534d4bd 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2935,11 +2935,13 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
return WINED3D_OK;
}
-static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_location)
+static void read_from_framebuffer(struct wined3d_surface *surface,
+ struct wined3d_context *old_ctx, DWORD dst_location)
{
struct wined3d_device *device = surface->resource.device;
const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
+ struct wined3d_surface *restore_rt;
BYTE *mem;
BYTE *row, *top, *bottom;
int i;
@@ -2948,7 +2950,21 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
surface_get_memory(surface, &data, dst_location);
- context = context_acquire(device, surface);
+ /* Context_release does not restore the original context in case of
+ * nested context_acquire calls. Only read_from_framebuffer and
+ * surface_blt_to_drawable use nested context_acquire calls. Manually
+ * restore the original context at the end of the function if needed. */
+ if (old_ctx->current_rt == surface)
+ {
+ restore_rt = NULL;
+ context = old_ctx;
+ }
+ else
+ {
+ restore_rt = old_ctx->current_rt;
+ context = context_acquire(device, surface);
+ }
+
context_apply_blit_state(context, device);
gl_info = context->gl_info;
@@ -3036,7 +3052,12 @@ error:
checkGLcall("glBindBuffer");
}
- context_release(context);
+ if (restore_rt)
+ {
+ context_release(context);
+ context = context_acquire(device, restore_rt);
+ context_release(context);
+ }
}
/* Read the framebuffer contents into a texture. Note that this function
@@ -4191,7 +4212,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
if (surface->locations & WINED3D_LOCATION_DRAWABLE)
{
- read_from_framebuffer(surface, dst_location);
+ read_from_framebuffer(surface, context, dst_location);
return;
}
--
2.2.1

View File

@ -1,121 +0,0 @@
From 0f7f57e440a198c31920c7077a6c7b0661945039 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 17 Nov 2013 19:34:26 +0100
Subject: wined3d: Pass a context to surface_load_drawable and
surface_blt_to_drawable.
---
dlls/wined3d/surface.c | 41 +++++++++++++++++++++++++++++++++++------
1 file changed, 35 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 9351ab2..1b3def9 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3536,19 +3536,35 @@ void surface_translate_drawable_coords(const struct wined3d_surface *surface, HW
rect->bottom = drawable_height - rect->bottom;
}
+/* Context activation is done by the caller. */
static void surface_blt_to_drawable(const struct wined3d_device *device,
+ struct wined3d_context *old_ctx,
enum wined3d_texture_filter_type filter, BOOL alpha_test,
struct wined3d_surface *src_surface, const RECT *src_rect_in,
struct wined3d_surface *dst_surface, const RECT *dst_rect_in)
{
const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
+ struct wined3d_surface *restore_rt;
RECT src_rect, dst_rect;
src_rect = *src_rect_in;
dst_rect = *dst_rect_in;
- context = context_acquire(device, dst_surface);
+ /* Context_release does not restore the original context in case of
+ * nested context_acquire calls. Only read_from_framebuffer and
+ * surface_blt_to_drawable use nested context_acquire calls. Manually
+ * restore the original context at the end of the function if needed. */
+ if (old_ctx->current_rt == dst_surface)
+ {
+ restore_rt = NULL;
+ context = old_ctx;
+ }
+ else
+ {
+ restore_rt = old_ctx->current_rt;
+ context = context_acquire(device, dst_surface);
+ }
gl_info = context->gl_info;
/* Make sure the surface is up-to-date. This should probably use
@@ -3601,7 +3617,12 @@ static void surface_blt_to_drawable(const struct wined3d_device *device,
&& dst_surface->container->swapchain->front_buffer == dst_surface->container))
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
- context_release(context);
+ if (restore_rt)
+ {
+ context_release(context);
+ context = context_acquire(device, restore_rt);
+ context_release(context);
+ }
}
HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const struct wined3d_color *color)
@@ -4101,8 +4122,9 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
surface, wined3d_debug_location(surface->locations));
}
+/* Context activation is done by the caller. */
static HRESULT surface_load_drawable(struct wined3d_surface *surface,
- const struct wined3d_gl_info *gl_info)
+ struct wined3d_context *context)
{
RECT r;
@@ -4115,7 +4137,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
surface_get_rect(surface, NULL, &r);
surface_load_location(surface, WINED3D_LOCATION_TEXTURE_RGB);
- surface_blt_to_drawable(surface->resource.device,
+ surface_blt_to_drawable(surface->resource.device, context,
WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r);
return WINED3D_OK;
@@ -4373,7 +4395,10 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location)
break;
case WINED3D_LOCATION_DRAWABLE:
- if (FAILED(hr = surface_load_drawable(surface, gl_info)))
+ context = context_acquire(device, NULL);
+ hr = surface_load_drawable(surface, context);
+ context_release(context);
+ if (FAILED(hr))
return hr;
break;
@@ -4547,6 +4572,8 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, DWORD filter,
struct wined3d_surface *dst_surface, const RECT *dst_rect,
const struct wined3d_color_key *color_key)
{
+ struct wined3d_context *context;
+
/* 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;
@@ -4555,8 +4582,10 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, DWORD filter,
wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT, color_key);
- surface_blt_to_drawable(device, filter,
+ context = context_acquire(device, dst_surface);
+ surface_blt_to_drawable(device, context, filter,
!!color_key, src_surface, src_rect, dst_surface, dst_rect);
+ context_release(context);
/* Restore the color key parameters */
wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT,
--
2.5.1

View File

@ -1,140 +0,0 @@
From 0d11e8c92575dae298bcf9b830ef155689823c04 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 17 Nov 2013 19:49:38 +0100
Subject: wined3d: Pass a context to surface_blt_fbo.
---
dlls/wined3d/surface.c | 53 +++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 42 insertions(+), 11 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index f4b9071..8ca5bda 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -860,13 +860,15 @@ static void surface_depth_blt_fbo(const struct wined3d_device *device,
}
/* Blit between surface locations. Onscreen on different swapchains is not supported.
- * Depth / stencil is not supported. */
-static void surface_blt_fbo(const struct wined3d_device *device, enum wined3d_texture_filter_type filter,
+ * Depth / stencil is not supported. Context activation is done by the caller. */
+static void surface_blt_fbo(const struct wined3d_device *device,
+ struct wined3d_context *old_ctx, enum wined3d_texture_filter_type filter,
struct wined3d_surface *src_surface, DWORD src_location, const RECT *src_rect_in,
struct wined3d_surface *dst_surface, DWORD dst_location, const RECT *dst_rect_in)
{
const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
+ struct wined3d_surface *required_rt, *restore_rt;
RECT src_rect, dst_rect;
GLenum gl_filter;
GLenum buffer;
@@ -909,9 +911,20 @@ static void surface_blt_fbo(const struct wined3d_device *device, enum wined3d_te
if (!surface_is_full_rect(dst_surface, &dst_rect))
surface_load_location(dst_surface, dst_location);
- if (src_location == WINED3D_LOCATION_DRAWABLE) context = context_acquire(device, src_surface);
- else if (dst_location == WINED3D_LOCATION_DRAWABLE) context = context_acquire(device, dst_surface);
- else context = context_acquire(device, NULL);
+ if (src_location == WINED3D_LOCATION_DRAWABLE) required_rt = src_surface;
+ else if (dst_location == WINED3D_LOCATION_DRAWABLE) required_rt = dst_surface;
+ else required_rt = NULL;
+
+ if (required_rt && required_rt != old_ctx->current_rt)
+ {
+ restore_rt = old_ctx->current_rt;
+ context = context_acquire(device, required_rt);
+ }
+ else
+ {
+ restore_rt = NULL;
+ context = old_ctx;
+ }
if (!context->valid)
{
@@ -974,7 +987,12 @@ static void surface_blt_fbo(const struct wined3d_device *device, enum wined3d_te
&& dst_surface->container->swapchain->front_buffer == dst_surface->container))
gl_info->gl_ops.gl.p_glFlush();
- context_release(context);
+ if (restore_rt)
+ {
+ context_release(context);
+ context = context_acquire(device, restore_rt);
+ context_release(context);
+ }
}
static BOOL fbo_blit_supported(const struct wined3d_gl_info *gl_info, enum wined3d_blit_op blit_op,
@@ -4294,13 +4312,17 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
NULL, surface->resource.usage, surface->resource.pool, surface->resource.format,
NULL, surface->resource.usage, surface->resource.pool, surface->resource.format))
{
+ context = context_acquire(device, NULL);
+
if (srgb)
- surface_blt_fbo(device, WINED3D_TEXF_POINT, surface, WINED3D_LOCATION_TEXTURE_RGB,
+ surface_blt_fbo(device, context, WINED3D_TEXF_POINT, surface, WINED3D_LOCATION_TEXTURE_RGB,
&src_rect, surface, WINED3D_LOCATION_TEXTURE_SRGB, &src_rect);
else
- surface_blt_fbo(device, WINED3D_TEXF_POINT, surface, WINED3D_LOCATION_TEXTURE_SRGB,
+ surface_blt_fbo(device, context, WINED3D_TEXF_POINT, surface, WINED3D_LOCATION_TEXTURE_SRGB,
&src_rect, surface, WINED3D_LOCATION_TEXTURE_RGB, &src_rect);
+ context_release(context);
+
return WINED3D_OK;
}
@@ -4315,8 +4337,10 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
DWORD dst_location = srgb ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB;
RECT rect = {0, 0, surface->resource.width, surface->resource.height};
- surface_blt_fbo(device, WINED3D_TEXF_POINT, surface, src_location,
+ context = context_acquire(device, NULL);
+ surface_blt_fbo(device, context, WINED3D_TEXF_POINT, surface, src_location,
&rect, surface, dst_location, &rect);
+ context_release(context);
return WINED3D_OK;
}
@@ -4447,14 +4471,17 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
static void surface_multisample_resolve(struct wined3d_surface *surface)
{
+ struct wined3d_context *context;
RECT rect = {0, 0, surface->resource.width, surface->resource.height};
if (!(surface->locations & WINED3D_LOCATION_RB_MULTISAMPLE))
ERR("Trying to resolve multisampled surface %p, but location WINED3D_LOCATION_RB_MULTISAMPLE not current.\n",
surface);
- surface_blt_fbo(surface->resource.device, WINED3D_TEXF_POINT,
+ context = context_acquire(surface->resource.device, NULL);
+ surface_blt_fbo(surface->resource.device, context, WINED3D_TEXF_POINT,
surface, WINED3D_LOCATION_RB_MULTISAMPLE, &rect, surface, WINED3D_LOCATION_RB_RESOLVED, &rect);
+ context_release(context);
}
HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location)
@@ -5629,11 +5656,15 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
&src_rect, src_surface->resource.usage, src_surface->resource.pool, src_surface->resource.format,
&dst_rect, dst_surface->resource.usage, dst_surface->resource.pool, dst_surface->resource.format))
{
+ struct wined3d_context *context;
TRACE("Using FBO blit.\n");
- surface_blt_fbo(device, filter,
+ context = context_acquire(device, NULL);
+ surface_blt_fbo(device, context, filter,
src_surface, src_surface->container->resource.draw_binding, &src_rect,
dst_surface, dst_surface->container->resource.draw_binding, &dst_rect);
+ context_release(context);
+
surface_validate_location(dst_surface, dst_surface->container->resource.draw_binding);
surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
--
2.2.1

View File

@ -1,4 +1,4 @@
From 42dbd273c1097c5dcd5fb13e94ee7950551db75d Mon Sep 17 00:00:00 2001
From 4fbfd7b2bbc5f5dd3b99653d223214901597cbad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Mon, 16 Sep 2013 22:44:33 +0200
Subject: wined3d: Introduce a function to retrieve resource memory.
@ -51,7 +51,7 @@ index b756bf1..40267e7 100644
void wined3d_resource_load_location(struct wined3d_resource *resource,
struct wined3d_context *context, DWORD location)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 4fe3d72..1f51116 100644
index 2abc494..857c620 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -479,39 +479,6 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
@ -94,7 +94,7 @@ index 4fe3d72..1f51116 100644
static void surface_prepare_buffer(struct wined3d_surface *surface)
{
struct wined3d_context *context;
@@ -1274,7 +1241,7 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
@@ -1265,7 +1232,7 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
return;
}
@ -103,7 +103,7 @@ index 4fe3d72..1f51116 100644
if (surface->container->resource.format_flags & WINED3DFMT_FLAG_COMPRESSED)
{
@@ -1643,7 +1610,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
@@ -1641,7 +1608,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
wined3d_resource_load_location(&dst_surface->resource, context, WINED3D_LOCATION_TEXTURE_RGB);
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
@ -112,16 +112,16 @@ index 4fe3d72..1f51116 100644
wined3d_resource_get_pitch(&src_surface->resource, &src_row_pitch, &src_slice_pitch);
wined3d_surface_upload_data(dst_surface, gl_info, src_format, src_rect,
@@ -2713,7 +2680,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
@@ -2831,7 +2798,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
struct wined3d_bo_address data;
DWORD slice_pitch, pitch;
- surface_get_memory(surface, &data, dst_location);
+ wined3d_resource_get_memory(&surface->resource, dst_location, &data);
/* Context_release does not restore the original context in case of
* nested context_acquire calls. Only read_from_framebuffer and
@@ -3868,8 +3835,8 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
if (surface != old_ctx->current_rt)
{
@@ -3881,8 +3848,8 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
struct wined3d_bo_address dst, src;
UINT size = surface->resource.size;
@ -132,7 +132,7 @@ index 4fe3d72..1f51116 100644
if (dst.buffer_object)
{
@@ -4081,7 +4048,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4094,7 +4061,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
surface_remove_pbo(surface, gl_info);
}
@ -142,10 +142,10 @@ index 4fe3d72..1f51116 100644
{
/* This code is entered for texture formats which need a fixup. */
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index f3ab20f..ab938f0 100644
index 49d9674..dec7787 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2200,6 +2200,8 @@ BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPE
@@ -2211,6 +2211,8 @@ BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPE
void wined3d_resource_free_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource,
const struct wined3d_context *context, DWORD flags) DECLSPEC_HIDDEN;
@ -155,5 +155,5 @@ index f3ab20f..ab938f0 100644
UINT *slice_pitch) DECLSPEC_HIDDEN;
GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN;
--
2.5.1
2.6.1

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