wined3d-CSMT_Main: Update patchset for CSMT (commandstream multithreading), to keep in sync with upstream repository.

This commit is contained in:
Sebastian Lackner 2015-09-04 21:39:34 +02:00
parent a4e76e0849
commit 12beeb3ac9
185 changed files with 1525 additions and 994 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,6 @@
wine-staging (1.7.51) UNRELEASED; urgency=low
* Update patchset for CSMT (commandstream multithreading), to keep in sync
with upstream repository.
* Added patch to fix bug in wineserver debug_children inheritance (fixes Wine
Staging Bug #525).
* Added patch to fix access violation in MSYS2 git when when cloning

View File

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

View File

@ -1,18 +1,18 @@
From 0bff3caeafd1080f6fd6244abdf8a87ddff6c3d2 Mon Sep 17 00:00:00 2001
From b8718b23cf22dcdb8cfde0bb64101c7243ae44b5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 19 Sep 2013 14:22:24 +0200
Subject: wined3d: Merge get_pitch functions.
---
dlls/wined3d/resource.c | 31 +++++++++++++++++
dlls/wined3d/surface.c | 78 ++++++++++++++++++++----------------------
dlls/wined3d/surface.c | 75 +++++++++++++++++++-----------------------
dlls/wined3d/texture.c | 2 +-
dlls/wined3d/volume.c | 28 ++-------------
dlls/wined3d/volume.c | 28 ++--------------
dlls/wined3d/wined3d_private.h | 5 +--
5 files changed, 74 insertions(+), 70 deletions(-)
5 files changed, 70 insertions(+), 71 deletions(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 1891165..0968cd2 100644
index 1891165..86441d1 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -414,3 +414,34 @@ void wined3d_resource_update_draw_binding(struct wined3d_resource *resource)
@ -20,7 +20,7 @@ index 1891165..0968cd2 100644
resource->draw_binding = WINED3D_LOCATION_TEXTURE_RGB;
}
+
+void wined3d_resource_get_pitch(const struct wined3d_resource *resource, UINT *row_pitch,
+void CDECL wined3d_resource_get_pitch(const struct wined3d_resource *resource, UINT *row_pitch,
+ UINT *slice_pitch)
+{
+ unsigned int alignment;
@ -51,7 +51,7 @@ index 1891165..0968cd2 100644
+ TRACE("Returning row pitch %u, slice pitch %u.\n", *row_pitch, *slice_pitch);
+}
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 2b5e734..c96c44c 100644
index e9e0620..f6be430 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -364,6 +364,7 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
@ -158,7 +158,7 @@ index 2b5e734..c96c44c 100644
}
HRESULT CDECL wined3d_surface_set_overlay_position(struct wined3d_surface *surface, LONG x, LONG y)
@@ -2109,20 +2100,22 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
@@ -2109,20 +2100,21 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
surface->resource.map_binding = WINED3D_LOCATION_USER_MEMORY;
valid_location = WINED3D_LOCATION_USER_MEMORY;
}
@ -181,11 +181,10 @@ index 2b5e734..c96c44c 100644
1, width, height, 1);
- surface->pitch = wined3d_format_calculate_pitch(texture_resource->format, width);
+ surface->resource.custom_row_pitch = wined3d_format_calculate_pitch(texture_resource->format, width);
+ surface->resource.custom_slice_pitch = surface->resource.custom_row_pitch * surface->resource.height; /* FIXME */
}
/* The format might be changed to a format that needs conversion.
@@ -2589,7 +2582,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2742,7 +2734,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH)
map_desc->row_pitch = surface->resource.width * format->byte_count;
else
@ -194,7 +193,7 @@ index 2b5e734..c96c44c 100644
map_desc->slice_pitch = 0;
if (!rect)
@@ -2716,6 +2709,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
@@ -2869,6 +2861,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
int i;
BOOL srcIsUpsideDown;
struct wined3d_bo_address data;
@ -202,7 +201,7 @@ index 2b5e734..c96c44c 100644
surface_get_memory(surface, &data, dst_location);
@@ -2752,8 +2746,8 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
@@ -2905,8 +2898,8 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
}
/* Setup pixel store pack state -- to glReadPixels into the correct place */
@ -213,18 +212,16 @@ index 2b5e734..c96c44c 100644
checkGLcall("glPixelStorei");
gl_info->gl_ops.gl.p_glReadPixels(0, 0,
@@ -2770,7 +2764,9 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
@@ -2923,8 +2916,6 @@ static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_loc
{
/* glReadPixels returns the image upside down, and there is no way to prevent this.
* Flip the lines in software. */
- UINT pitch = wined3d_surface_get_pitch(surface);
+ UINT pitch, slice_pitch;
+
+ wined3d_resource_get_pitch(&surface->resource, &pitch, &slice_pitch);
-
if (!(row = HeapAlloc(GetProcessHeap(), 0, pitch)))
goto error;
@@ -3967,7 +3963,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4120,7 +4111,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
const struct wined3d_color_key_conversion *conversion;
struct wined3d_texture *texture = surface->container;
struct wined3d_context *context;
@ -233,7 +230,7 @@ index 2b5e734..c96c44c 100644
struct wined3d_bo_address data;
struct wined3d_format format;
POINT dst_point = {0, 0};
@@ -4055,7 +4051,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4208,7 +4199,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
wined3d_texture_bind_and_dirtify(texture, context, srgb);
width = surface->resource.width;
@ -242,7 +239,7 @@ index 2b5e734..c96c44c 100644
format = *texture->resource.format;
if ((conversion = wined3d_format_get_color_key_conversion(texture, TRUE)))
@@ -4093,9 +4089,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4246,9 +4237,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
context_release(context);
return E_OUTOFMEMORY;
}
@ -254,7 +251,7 @@ index 2b5e734..c96c44c 100644
data.addr = mem;
}
else if (conversion)
@@ -4115,14 +4111,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
@@ -4268,14 +4259,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
}
if (texture->swapchain && texture->swapchain->palette)
palette = texture->swapchain->palette;
@ -286,7 +283,7 @@ index b369809..3485ac2 100644
FIXME("Ignoring row/slice pitch (%u/%u).\n", data->row_pitch, data->slice_pitch);
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index 4e1c415..eec1492 100644
index 424938a..b672d4a 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -40,30 +40,6 @@ BOOL volume_prepare_system_memory(struct wined3d_volume *volume)
@ -339,7 +336,7 @@ index 4e1c415..eec1492 100644
if (!box)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index d1ba5e4..77463aa 100644
index 919e818..7c26e44 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2164,6 +2164,7 @@ struct wined3d_resource

View File

@ -1,38 +0,0 @@
From 8dc59ef56211678a681315041c0fd23bd490ad25 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 29 Jul 2015 06:35:07 +0200
Subject: wined3d: Properly initialize format_flags for surfaces and volumes.
---
dlls/wined3d/surface.c | 2 ++
dlls/wined3d/volume.c | 1 +
2 files changed, 3 insertions(+)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 3b033db..38a233d 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -5603,6 +5603,8 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
}
surface->container = container;
+ surface->resource.format_flags = container->resource.format_flags;
+
surface_validate_location(surface, WINED3D_LOCATION_SYSMEM);
list_init(&surface->renderbuffers);
list_init(&surface->overlays);
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index 424938a..4e1c415 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -779,6 +779,7 @@ static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_texture
}
volume->container = container;
+ volume->resource.format_flags = container->resource.format_flags;
return WINED3D_OK;
}
--
2.4.5

View File

@ -1,4 +1,4 @@
From 09cdb67f93b21136003250e7cb60ec1a55877e26 Mon Sep 17 00:00:00 2001
From 013c83727f4fbbf15bbbe7ccb12d42d58d17e18d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sat, 4 Jan 2014 00:53:47 +0100
Subject: wined3d: Remove surface_validate_location.
@ -48,7 +48,7 @@ index 1ef681a..2683140 100644
}
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index b669ca3..4b4769f 100644
index 1dd4b69..4f646e4 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1170,7 +1170,7 @@ static void surface_unload(struct wined3d_resource *resource)
@ -69,7 +69,7 @@ index b669ca3..4b4769f 100644
surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB);
return WINED3D_OK;
@@ -2170,7 +2170,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
@@ -2169,7 +2169,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
valid_location = WINED3D_LOCATION_SYSMEM;
}
@ -78,7 +78,7 @@ index b669ca3..4b4769f 100644
return WINED3D_OK;
}
@@ -2716,7 +2716,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2715,7 +2715,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
{
TRACE("WINED3D_MAP_DISCARD flag passed, marking %s as up to date.\n",
wined3d_debug_location(surface->resource.map_binding));
@ -87,7 +87,7 @@ index b669ca3..4b4769f 100644
}
else
{
@@ -3288,7 +3288,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
@@ -3283,7 +3283,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
/* The texture is now most up to date - If the surface is a render target
* and has a drawable, this path is never entered. */
@ -96,7 +96,7 @@ index b669ca3..4b4769f 100644
surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB);
}
@@ -3561,7 +3561,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
@@ -3556,7 +3556,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
/* The texture is now most up to date - If the surface is a render target
* and has a drawable, this path is never entered. */
@ -105,7 +105,7 @@ index b669ca3..4b4769f 100644
surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB);
}
@@ -4067,13 +4067,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4062,13 +4062,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
surface->ds_current_size.cy = surface->resource.height;
}
@ -119,7 +119,7 @@ index b669ca3..4b4769f 100644
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location)
{
TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location));
@@ -4461,7 +4454,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
@@ -4456,7 +4449,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte
break;
}
@ -128,7 +128,7 @@ index b669ca3..4b4769f 100644
if (location != WINED3D_LOCATION_SYSMEM && (surface->resource.locations & WINED3D_LOCATION_SYSMEM))
surface_evict_sysmem(surface);
@@ -4635,7 +4628,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, DWORD filter,
@@ -4630,7 +4623,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, DWORD filter,
wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT,
(old_color_key_flags & WINED3D_CKEY_SRC_BLT) ? &old_blt_key : NULL);
@ -137,7 +137,7 @@ index b669ca3..4b4769f 100644
surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
}
@@ -5615,7 +5608,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5610,7 +5603,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
dst_surface, dst_surface->container->resource.draw_binding, &dst_rect);
context_release(context);
@ -146,16 +146,16 @@ index b669ca3..4b4769f 100644
surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
return WINED3D_OK;
@@ -5707,7 +5700,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
surface->container = container;
surface->resource.format_flags = container->resource.format_flags;
@@ -5700,7 +5693,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
}
surface->container = container;
- surface_validate_location(surface, WINED3D_LOCATION_SYSMEM);
+ wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_SYSMEM);
list_init(&surface->renderbuffers);
list_init(&surface->overlays);
@@ -5739,7 +5732,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
@@ -5732,7 +5725,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
if (surface->resource.map_binding == WINED3D_LOCATION_DIB)
{
wined3d_resource_free_sysmem(&surface->resource);

View File

@ -1,16 +1,16 @@
From 441b1121637291e4f7e87640911111c8f6398c4f Mon Sep 17 00:00:00 2001
From 8d5263c4675ba0456a486cba995fa6e41f056aa2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 16 Jan 2014 22:07:17 +0100
Subject: wined3d: Move volume PBO infrastructure into the resource.
---
dlls/wined3d/resource.c | 64 +++++++++++++++++++++++++++++-
dlls/wined3d/volume.c | 90 +++++++-----------------------------------
dlls/wined3d/resource.c | 64 ++++++++++++++++++++++++++++-
dlls/wined3d/volume.c | 92 +++++++-----------------------------------
dlls/wined3d/wined3d_private.h | 7 +++-
3 files changed, 82 insertions(+), 79 deletions(-)
3 files changed, 83 insertions(+), 80 deletions(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 39df397..5f0a98e 100644
index 9ec6a6a..c652c99 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -373,7 +373,7 @@ GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags)
@ -89,7 +89,7 @@ index 39df397..5f0a98e 100644
+ }
+}
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index 17502ee..de96508 100644
index 17502ee..ea54b97 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -218,7 +218,7 @@ static void wined3d_volume_load_location(struct wined3d_resource *resource,
@ -146,10 +146,11 @@ index 17502ee..de96508 100644
- TRACE("Deleting PBO %u belonging to volume %p.\n", volume->pbo, volume);
- GL_EXTCALL(glDeleteBuffers(1, &volume->pbo));
- checkGLcall("glDeleteBuffers");
- volume->pbo = 0;
+ TRACE("Deleting PBO %u belonging to volume %p.\n", volume->resource.buffer_object, volume);
+ GL_EXTCALL(glDeleteBuffers(1, &volume->resource.buffer_object));
checkGLcall("glDeleteBuffers");
- volume->pbo = 0;
+ checkGLcall("glDeleteBuffersARB");
+ volume->resource.buffer_object = 0;
context_release(context);
}
@ -267,10 +268,10 @@ index 17502ee..de96508 100644
volume->resource.map_count--;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 53fd864..c8c44d3 100644
index ece63d0..1710b7c 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2166,6 +2166,7 @@ struct wined3d_resource
@@ -2168,6 +2168,7 @@ struct wined3d_resource
DWORD priority;
void *heap_memory, *user_memory, *bitmap_data;
UINT custom_row_pitch, custom_slice_pitch;
@ -278,7 +279,7 @@ index 53fd864..c8c44d3 100644
struct list resource_list_entry;
DWORD locations;
@@ -2195,14 +2196,17 @@ void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
@@ -2197,14 +2198,17 @@ void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
DWORD wined3d_resource_access_from_location(DWORD location) DECLSPEC_HIDDEN;
BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void wined3d_resource_free_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
@ -297,7 +298,7 @@ index 53fd864..c8c44d3 100644
DWORD wined3d_resource_sanitize_map_flags(const struct wined3d_resource *resource, DWORD flags) DECLSPEC_HIDDEN;
void wined3d_resource_update_draw_binding(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void wined3d_resource_validate_location(struct wined3d_resource *resource, DWORD location) DECLSPEC_HIDDEN;
@@ -2326,7 +2330,6 @@ struct wined3d_volume
@@ -2328,7 +2332,6 @@ struct wined3d_volume
DWORD flags;
GLint texture_level;
DWORD download_count;
@ -306,5 +307,5 @@ index 53fd864..c8c44d3 100644
static inline struct wined3d_volume *volume_from_resource(struct wined3d_resource *resource)
--
2.4.5
2.5.1

View File

@ -1,4 +1,4 @@
From 6bbf121fadc87b21f96f54cdc573218ace005098 Mon Sep 17 00:00:00 2001
From 2bec3781b41cc3f0b809a5cd8782b11f93fcc6d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 18 Sep 2013 22:49:34 +0200
Subject: wined3d: Move buffer creation into the resource.
@ -15,10 +15,10 @@ surface_load_location will write a lot of ERRs.
4 files changed, 72 insertions(+), 63 deletions(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 358a29e..032371f 100644
index 40cbbb2..5ad3201 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -142,6 +142,18 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
@@ -223,6 +223,18 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
return WINED3D_OK;
}
@ -37,7 +37,7 @@ index 358a29e..032371f 100644
void resource_cleanup(struct wined3d_resource *resource)
{
const struct wined3d *d3d = resource->device->wined3d;
@@ -154,6 +166,9 @@ void resource_cleanup(struct wined3d_resource *resource)
@@ -235,6 +247,9 @@ void resource_cleanup(struct wined3d_resource *resource)
adapter_adjust_memory(resource->device->adapter, (INT64)0 - resource->size);
}
@ -47,7 +47,7 @@ index 358a29e..032371f 100644
wined3d_resource_free_sysmem(resource);
device_resource_released(resource->device, resource);
@@ -164,6 +179,9 @@ void resource_unload(struct wined3d_resource *resource)
@@ -245,6 +260,9 @@ void resource_unload(struct wined3d_resource *resource)
if (resource->map_count)
ERR("Resource %p is being unloaded while mapped.\n", resource);
@ -57,7 +57,7 @@ index 358a29e..032371f 100644
context_resource_unloaded(resource->device,
resource, resource->type);
}
@@ -498,3 +516,51 @@ void wined3d_resource_release_map_ptr(const struct wined3d_resource *resource,
@@ -581,3 +599,51 @@ void wined3d_resource_release_map_ptr(const struct wined3d_resource *resource,
return;
}
}
@ -110,10 +110,10 @@ index 358a29e..032371f 100644
+ }
+}
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 066219d..9981703 100644
index a6fc6ba..d5d00e7 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1374,7 +1374,7 @@ static void texture3d_prepare_texture(struct wined3d_texture *texture, struct wi
@@ -1276,7 +1276,7 @@ static void texture3d_prepare_texture(struct wined3d_texture *texture, struct wi
void *mem = NULL;
if (gl_info->supported[APPLE_CLIENT_STORAGE] && !format->convert
@ -123,10 +123,10 @@ index 066219d..9981703 100644
TRACE("Enabling GL_UNPACK_CLIENT_STORAGE_APPLE for volume %p\n", volume);
gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE);
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index db3a68c..8e72b17 100644
index ea54b97..ecdaa40 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -312,42 +312,10 @@ void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *
@@ -316,42 +316,10 @@ void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *
srgb_mode ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB);
}
@ -154,7 +154,7 @@ index db3a68c..8e72b17 100644
-
- TRACE("Deleting PBO %u belonging to volume %p.\n", volume->resource.buffer_object, volume);
- GL_EXTCALL(glDeleteBuffers(1, &volume->resource.buffer_object));
- checkGLcall("glDeleteBuffers");
- checkGLcall("glDeleteBuffersARB");
- volume->resource.buffer_object = 0;
- context_release(context);
-}
@ -169,7 +169,7 @@ index db3a68c..8e72b17 100644
resource_cleanup(&volume->resource);
volume->resource.parent_ops->wined3d_object_destroyed(volume->resource.parent);
HeapFree(GetProcessHeap(), 0, volume);
@@ -364,7 +332,7 @@ static void volume_unload(struct wined3d_resource *resource)
@@ -368,7 +336,7 @@ static void volume_unload(struct wined3d_resource *resource)
TRACE("texture %p.\n", resource);
@ -178,7 +178,7 @@ index db3a68c..8e72b17 100644
{
context = context_acquire(device, NULL);
wined3d_resource_load_location(&volume->resource, context, WINED3D_LOCATION_SYSMEM);
@@ -378,15 +346,6 @@ static void volume_unload(struct wined3d_resource *resource)
@@ -382,15 +350,6 @@ static void volume_unload(struct wined3d_resource *resource)
wined3d_resource_invalidate_location(&volume->resource, ~WINED3D_LOCATION_DISCARDED);
}
@ -194,7 +194,7 @@ index db3a68c..8e72b17 100644
/* The texture name is managed by the container. */
volume->flags &= ~WINED3D_VFLAG_CLIENT_STORAGE;
@@ -476,24 +435,6 @@ static BOOL wined3d_volume_check_box_dimensions(const struct wined3d_volume *vol
@@ -480,24 +439,6 @@ static BOOL wined3d_volume_check_box_dimensions(const struct wined3d_volume *vol
return TRUE;
}
@ -219,7 +219,7 @@ index db3a68c..8e72b17 100644
HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags)
{
@@ -531,7 +472,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
@@ -536,7 +477,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
flags = wined3d_resource_sanitize_map_flags(&volume->resource, flags);
context = context_acquire(device, NULL);
@ -229,10 +229,10 @@ index db3a68c..8e72b17 100644
WARN("Out of memory.\n");
map_desc->data = NULL;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 7efecd4..4605542 100644
index 523b98f..d005e61 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2132,6 +2132,9 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO
@@ -2207,6 +2207,9 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO
BOOL wined3d_resource_is_offscreen(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void wined3d_resource_load_location(struct wined3d_resource *resource,
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
@ -242,7 +242,7 @@ index 7efecd4..4605542 100644
void wined3d_resource_release_map_ptr(const struct wined3d_resource *resource,
const struct wined3d_context *context) DECLSPEC_HIDDEN;
DWORD wined3d_resource_sanitize_map_flags(const struct wined3d_resource *resource, DWORD flags) DECLSPEC_HIDDEN;
@@ -2273,7 +2276,6 @@ static inline struct wined3d_volume *volume_from_resource(struct wined3d_resourc
@@ -2339,7 +2342,6 @@ static inline struct wined3d_volume *volume_from_resource(struct wined3d_resourc
return CONTAINING_RECORD(resource, struct wined3d_volume, resource);
}
@ -251,5 +251,5 @@ index 7efecd4..4605542 100644
unsigned int level, struct wined3d_volume **volume) DECLSPEC_HIDDEN;
void wined3d_volume_destroy(struct wined3d_volume *volume) DECLSPEC_HIDDEN;
--
2.2.1
2.5.1

View File

@ -1,4 +1,4 @@
From 2ae05213ea4af0cb5725b2b88b51bd7ef2f893c5 Mon Sep 17 00:00:00 2001
From 6ec55bf77d18523e178ca2e35553693c754827d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 19 Sep 2013 17:51:38 +0200
Subject: wined3d: Move most of volume_map to resource.c
@ -13,10 +13,10 @@ boundary check behaviours.
3 files changed, 124 insertions(+), 95 deletions(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 11136de..ba18baa 100644
index ab83637..8ab137d 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -756,3 +756,118 @@ BOOL wined3d_resource_check_block_align(const struct wined3d_resource *resource,
@@ -765,3 +765,118 @@ BOOL wined3d_resource_check_block_align(const struct wined3d_resource *resource,
return TRUE;
}
@ -28,7 +28,7 @@ index 11136de..ba18baa 100644
+ struct wined3d_context *context = NULL;
+ BYTE *base_memory;
+ const struct wined3d_format *format = resource->format;
+ const unsigned int fmt_flags = resource->format_flags;
+ const unsigned int fmt_flags = resource->format->flags[WINED3D_GL_RES_TYPE_TEX_2D];
+
+ TRACE("resource %p, map_desc %p, box %p, flags %#x.\n",
+ resource, map_desc, box, flags);
@ -136,7 +136,7 @@ index 11136de..ba18baa 100644
+ return WINED3D_OK;
+}
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index e70fcf4..dd49d01 100644
index 6b17044..983ae90 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -404,26 +404,16 @@ static BOOL wined3d_volume_check_box_dimensions(const struct wined3d_volume *vol
@ -167,7 +167,7 @@ index e70fcf4..dd49d01 100644
if (!wined3d_volume_check_box_dimensions(volume, box))
{
WARN("Map box is invalid.\n");
@@ -437,74 +427,11 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
@@ -436,74 +426,11 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
return WINED3DERR_INVALIDCALL;
}
@ -246,7 +246,7 @@ index e70fcf4..dd49d01 100644
}
struct wined3d_volume * CDECL wined3d_volume_from_resource(struct wined3d_resource *resource)
@@ -514,23 +441,7 @@ struct wined3d_volume * CDECL wined3d_volume_from_resource(struct wined3d_resour
@@ -513,23 +440,7 @@ struct wined3d_volume * CDECL wined3d_volume_from_resource(struct wined3d_resour
HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume)
{
@ -272,10 +272,10 @@ index e70fcf4..dd49d01 100644
static ULONG volume_resource_incref(struct wined3d_resource *resource)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 8c511c1..9d33eb6 100644
index 3dff204..db8126f 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2182,12 +2182,15 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO
@@ -2212,12 +2212,15 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO
BOOL wined3d_resource_is_offscreen(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void wined3d_resource_load_location(struct wined3d_resource *resource,
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
@ -292,5 +292,5 @@ index 8c511c1..9d33eb6 100644
void wined3d_resource_validate_location(struct wined3d_resource *resource, DWORD location) DECLSPEC_HIDDEN;
--
2.4.2
2.5.1

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,277 @@
From 89a2597787017d7bc966c2a146fa4c4fc59e9ebb Mon Sep 17 00:00:00 2001
From 9d0010d5add477e39747ac3e458d16b5b1fa101f 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 | 107 +++++++++++++++++++++++++++++++++----------------
1 file changed, 72 insertions(+), 35 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 303a0dc..045ede5 100644
index ff83f29..df8aea6 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;
@@ -4428,21 +4428,36 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
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;
@@ -4454,6 +4469,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)))
@@ -4464,7 +4485,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;
}
@@ -4474,7 +4497,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_rect, 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;
@@ -4485,15 +4509,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)
{
@@ -4528,7 +4549,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;
}
@@ -4536,7 +4557,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;
}
@@ -4585,19 +4606,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);
}
}
@@ -4607,8 +4628,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;
}
}
}
@@ -4617,9 +4638,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;
}
}
}
@@ -4629,13 +4650,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
{
@@ -4682,14 +4703,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))
@@ -4739,7 +4760,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)
@@ -4822,7 +4843,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) \
{ \
@@ -4855,7 +4876,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)
{
@@ -4886,6 +4907,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))
{
@@ -4893,12 +4918,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.4.2

View File

@ -1,277 +0,0 @@
From 9d0010d5add477e39747ac3e458d16b5b1fa101f 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 | 107 +++++++++++++++++++++++++++++++++----------------
1 file changed, 72 insertions(+), 35 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index ff83f29..df8aea6 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4428,21 +4428,36 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
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;
@@ -4454,6 +4469,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)))
@@ -4464,7 +4485,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;
}
@@ -4474,7 +4497,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_rect, 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;
@@ -4485,15 +4509,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)
{
@@ -4528,7 +4549,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;
}
@@ -4536,7 +4557,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;
}
@@ -4585,19 +4606,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);
}
}
@@ -4607,8 +4628,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;
}
}
}
@@ -4617,9 +4638,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;
}
}
}
@@ -4629,13 +4650,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
{
@@ -4682,14 +4703,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))
@@ -4739,7 +4760,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)
@@ -4822,7 +4843,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) \
{ \
@@ -4855,7 +4876,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)
{
@@ -4886,6 +4907,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))
{
@@ -4893,12 +4918,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.4.2

View File

@ -1,4 +1,4 @@
From ff38f01388324b055bcda33d46929169f76ce3eb Mon Sep 17 00:00:00 2001
From 48138b14119c096c1a27b659ac1dd473132daf11 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Mon, 29 Apr 2013 18:49:53 +0200
Subject: wined3d: Send blits through the command stream.
@ -6,11 +6,25 @@ Subject: wined3d: Send blits through the command stream.
This needs more work. This patch breaks error handling, and the split
between surface_blt and surface_blt_ugly isn't particularly nice.
---
dlls/d3d9/tests/visual.c | 2 +-
dlls/wined3d/cs.c | 50 +++++++
dlls/wined3d/surface.c | 309 +++++++++++++++++++++++------------------
dlls/wined3d/wined3d_private.h | 8 ++
3 files changed, 228 insertions(+), 139 deletions(-)
4 files changed, 229 insertions(+), 140 deletions(-)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index d49d3b2..e08d739 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -1164,7 +1164,7 @@ static void color_fill_test(void)
* result on Wine.
* {D3DFMT_YUY2, "D3DFMT_YUY2", BLOCKS, 0},
* {D3DFMT_UYVY, "D3DFMT_UYVY", BLOCKS, 0}, */
- {D3DFMT_DXT1, "D3DFMT_DXT1", BLOCKS | TODO_FILL_RETURN, 0},
+ {D3DFMT_DXT1, "D3DFMT_DXT1", BLOCKS, 0},
/* Vendor-specific formats like ATI2N are a non-issue here since they're not
* supported as offscreen plain surfaces and do not support D3DUSAGE_RENDERTARGET
* when created as texture. */
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index fcc5ed7..550206f 100644
--- a/dlls/wined3d/cs.c
@ -108,10 +122,10 @@ index fcc5ed7..550206f 100644
{
struct wined3d_cs_block *block;
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index bd048c2..8cec730 100644
index f08e32e..a119718 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -5002,14 +5002,13 @@ const struct blit_shader cpu_blit = {
@@ -5000,14 +5000,13 @@ const struct blit_shader cpu_blit = {
cpu_blit_blit_surface,
};
@ -128,7 +142,7 @@ index bd048c2..8cec730 100644
BOOL scale, convert;
static const DWORD simple_blit = WINEDDBLT_ASYNC
@@ -5020,111 +5019,6 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5018,111 +5017,6 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
| WINEDDBLT_DEPTHFILL
| WINEDDBLT_DONOTWAIT;
@ -240,7 +254,7 @@ index bd048c2..8cec730 100644
if (!device->d3d_initialized)
{
WARN("D3D not initialized, using fallback.\n");
@@ -5167,8 +5061,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5165,8 +5059,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
}
scale = src_surface
@ -251,7 +265,7 @@ index bd048c2..8cec730 100644
convert = src_surface && src_surface->resource.format->id != dst_surface->resource.format->id;
dst_ds_flags = dst_surface->container->resource.format_flags
@@ -5188,22 +5082,16 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5186,22 +5080,16 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
TRACE("Depth fill.\n");
if (!surface_convert_depth_to_float(dst_surface, fx->u5.dwFillDepth, &depth))
@ -279,7 +293,7 @@ index bd048c2..8cec730 100644
}
}
else
@@ -5234,8 +5122,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5232,8 +5120,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
palette, fx->u5.dwFillColor, &color))
goto fallback;
@ -290,7 +304,7 @@ index bd048c2..8cec730 100644
}
else
{
@@ -5263,9 +5151,9 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5261,9 +5149,9 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
TRACE("Not doing upload because of format conversion.\n");
else
{
@ -302,7 +316,7 @@ index bd048c2..8cec730 100644
{
if (!wined3d_resource_is_offscreen(&dst_surface->container->resource))
{
@@ -5274,7 +5162,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5272,7 +5160,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
dst_surface->container->resource.draw_binding);
context_release(context);
}
@ -311,7 +325,7 @@ index bd048c2..8cec730 100644
}
}
}
@@ -5298,50 +5186,193 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
@@ -5296,50 +5184,193 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, NULL, 0);
dst_swapchain->desc.swap_effect = swap_effect;
@ -519,10 +533,10 @@ index bd048c2..8cec730 100644
static const struct wined3d_resource_ops surface_resource_ops =
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index e153b0b..77317a5 100644
index 576a9ef..f8a9860 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2491,6 +2491,9 @@ void wined3d_surface_destroy(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
@@ -2490,6 +2490,9 @@ void wined3d_surface_destroy(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info,
const struct wined3d_format *format, const RECT *src_rect, UINT src_pitch, const POINT *dst_point,
BOOL srgb, const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN;
@ -532,7 +546,7 @@ index e153b0b..77317a5 100644
void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context,
const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
@@ -2640,6 +2643,7 @@ struct wined3d_cs
@@ -2639,6 +2642,7 @@ struct wined3d_cs
struct wined3d_device *device;
struct wined3d_state state;
HANDLE thread;
@ -540,7 +554,7 @@ index e153b0b..77317a5 100644
DWORD tls_idx;
struct wined3d_surface *onscreen_depth_stencil;
@@ -2718,6 +2722,10 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs,
@@ -2717,6 +2721,10 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs,
GLenum primitive_type) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light_info *light) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enable) DECLSPEC_HIDDEN;

View File

@ -1,4 +1,4 @@
From 045f2277ef36b36927912fd153e251bc60ba290c Mon Sep 17 00:00:00 2001
From 6abbf0a97d9e72b5f599f48c5a591a0d2917eee6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 26 Sep 2013 16:40:34 +0200
Subject: wined3d: Wait for the CS in GetDC.
@ -8,16 +8,16 @@ Subject: wined3d: Wait for the CS in GetDC.
1 file changed, 14 insertions(+)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 676200d..4d68292 100644
index bef62bb..3653626 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2561,6 +2561,20 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
@@ -2548,6 +2548,20 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
TRACE("surface %p, dc %p.\n", surface, dc);
+ if (!(surface->container->resource.format_flags & WINED3DFMT_FLAG_GETDC))
+ {
+ WARN("Cannot use GetDC on a %s surface.\n", debug_d3dformat(surface->container->resource.format->id));
+ WARN("Cannot use GetDC on a %s surface.\n", debug_d3dformat(surface->resource.format->id));
+ return WINED3DERR_INVALIDCALL;
+ }
+
@ -33,5 +33,5 @@ index 676200d..4d68292 100644
if (surface->flags & SFLAG_DCINUSE)
return WINEDDERR_DCALREADYCREATED;
--
2.4.2
2.5.1

View File

@ -1,4 +1,4 @@
From 872dc7c0c6fd6f54f1522bad4787fdd358eb69af Mon Sep 17 00:00:00 2001
From 84bfd1772cafbfdfba4f0fa02703c24fba74c3bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 26 Sep 2013 16:41:00 +0200
Subject: wined3d: send resource maps through the command stream
@ -11,7 +11,7 @@ Slow version only. Good enough to dodge some Nvidia bugs in the ddraw tests.
3 files changed, 120 insertions(+), 33 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 25d92a1..f920107 100644
index 6ade585..5e96859 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -76,6 +76,8 @@ enum wined3d_cs_op
@ -44,7 +44,7 @@ index 25d92a1..f920107 100644
/* FIXME: The list synchronization probably isn't particularly fast. */
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
{
@@ -1800,6 +1816,57 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
@@ -1801,6 +1817,57 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
cs->ops->submit(cs);
}
@ -102,7 +102,7 @@ index 25d92a1..f920107 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
@@ -1842,6 +1909,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1843,6 +1910,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_SET_LIGHT_ENABLE */ wined3d_cs_exec_set_light_enable,
/* WINED3D_CS_OP_BLT */ wined3d_cs_exec_blt,
/* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
@ -112,10 +112,10 @@ index 25d92a1..f920107 100644
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 39b7c32..083fd70 100644
index 8594992..a2fdefb 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -695,32 +695,11 @@ BOOL wined3d_resource_check_block_align(const struct wined3d_resource *resource,
@@ -766,32 +766,11 @@ BOOL wined3d_resource_check_block_align(const struct wined3d_resource *resource,
return TRUE;
}
@ -127,7 +127,7 @@ index 39b7c32..083fd70 100644
struct wined3d_context *context = NULL;
- BYTE *base_memory;
- const struct wined3d_format *format = resource->format;
- const unsigned int fmt_flags = resource->format_flags;
- const unsigned int fmt_flags = resource->format->flags[WINED3D_GL_RES_TYPE_TEX_2D];
-
- TRACE("resource %p, map_desc %p, box %p, flags %#x.\n",
- resource, map_desc, box, flags);
@ -150,7 +150,7 @@ index 39b7c32..083fd70 100644
if (device->d3d_initialized)
context = context_acquire(device, NULL);
@@ -728,9 +707,8 @@ HRESULT wined3d_resource_map(struct wined3d_resource *resource,
@@ -799,9 +778,8 @@ HRESULT wined3d_resource_map(struct wined3d_resource *resource,
if (!wined3d_resource_prepare_map_memory(resource, context))
{
WARN("Out of memory.\n");
@ -161,7 +161,7 @@ index 39b7c32..083fd70 100644
}
if (flags & WINED3D_MAP_DISCARD)
@@ -738,11 +716,40 @@ HRESULT wined3d_resource_map(struct wined3d_resource *resource,
@@ -809,11 +787,40 @@ HRESULT wined3d_resource_map(struct wined3d_resource *resource,
else
wined3d_resource_load_location(resource, context, resource->map_binding);
@ -180,7 +180,7 @@ index 39b7c32..083fd70 100644
+ struct wined3d_device *device = resource->device;
+ BYTE *base_memory;
+ const struct wined3d_format *format = resource->format;
+ const unsigned int fmt_flags = resource->format_flags;
+ const unsigned int fmt_flags = resource->format->flags[WINED3D_GL_RES_TYPE_TEX_2D];
+
+ TRACE("resource %p, map_desc %p, box %p, flags %#x.\n",
+ resource, map_desc, box, flags);
@ -203,7 +203,7 @@ index 39b7c32..083fd70 100644
TRACE("Base memory pointer %p.\n", base_memory);
if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH)
@@ -794,10 +801,21 @@ HRESULT wined3d_resource_map(struct wined3d_resource *resource,
@@ -865,10 +872,21 @@ HRESULT wined3d_resource_map(struct wined3d_resource *resource,
return WINED3D_OK;
}
@ -226,7 +226,7 @@ index 39b7c32..083fd70 100644
TRACE("resource %p.\n", resource);
if (!resource->map_count)
@@ -806,12 +824,7 @@ HRESULT wined3d_resource_unmap(struct wined3d_resource *resource)
@@ -877,12 +895,7 @@ HRESULT wined3d_resource_unmap(struct wined3d_resource *resource)
return WINEDDERR_NOTLOCKED;
}
@ -241,10 +241,10 @@ index 39b7c32..083fd70 100644
return WINED3D_OK;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 26fb1cf..d2bfc21 100644
index aa7b47b..3592bcc 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2193,6 +2193,7 @@ void wined3d_resource_load_location(struct wined3d_resource *resource,
@@ -2239,6 +2239,7 @@ void wined3d_resource_load_location(struct wined3d_resource *resource,
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
HRESULT wined3d_resource_map(struct wined3d_resource *resource, struct wined3d_map_desc *map_desc,
const struct wined3d_box *box, DWORD flags) DECLSPEC_HIDDEN;
@ -252,7 +252,7 @@ index 26fb1cf..d2bfc21 100644
BOOL wined3d_resource_prepare_map_memory(struct wined3d_resource *resource,
struct wined3d_context *context) DECLSPEC_HIDDEN;
BOOL wined3d_resource_prepare_system_memory(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
@@ -2200,6 +2201,7 @@ void wined3d_resource_release_map_ptr(const struct wined3d_resource *resource,
@@ -2246,6 +2247,7 @@ void wined3d_resource_release_map_ptr(const struct wined3d_resource *resource,
const struct wined3d_context *context) DECLSPEC_HIDDEN;
DWORD wined3d_resource_sanitize_map_flags(const struct wined3d_resource *resource, DWORD flags) DECLSPEC_HIDDEN;
HRESULT wined3d_resource_unmap(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
@ -260,7 +260,7 @@ index 26fb1cf..d2bfc21 100644
void wined3d_resource_update_draw_binding(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void wined3d_resource_validate_location(struct wined3d_resource *resource, DWORD location) DECLSPEC_HIDDEN;
@@ -2682,6 +2684,9 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
@@ -2728,6 +2730,9 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
const RECT *rect, const struct wined3d_color *color) DECLSPEC_HIDDEN;
@ -271,5 +271,5 @@ index 26fb1cf..d2bfc21 100644
/* Direct3D terminology with little modifications. We do not have an issued state
* because only the driver knows about it, but we have a created state because d3d
--
2.3.5
2.5.1

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