mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
wined3d-CSMT_Main: Reenable patchset.
For now, various conflicting changes have just been reverted.
This commit is contained in:
parent
b765f1e594
commit
932dd8fbbc
@ -333,6 +333,7 @@ patch_enable_all ()
|
||||
enable_winecfg_Unmounted_Devices="$1"
|
||||
enable_wined3d_Accounting="$1"
|
||||
enable_wined3d_CSMT_Helper="$1"
|
||||
enable_wined3d_CSMT_Main="$1"
|
||||
enable_wined3d_DXTn="$1"
|
||||
enable_wined3d_Geforce_425M="$1"
|
||||
enable_wined3d_MESA_GPU_Info="$1"
|
||||
@ -1143,6 +1144,9 @@ patch_enable ()
|
||||
wined3d-CSMT_Helper)
|
||||
enable_wined3d_CSMT_Helper="$2"
|
||||
;;
|
||||
wined3d-CSMT_Main)
|
||||
enable_wined3d_CSMT_Main="$2"
|
||||
;;
|
||||
wined3d-DXTn)
|
||||
enable_wined3d_DXTn="$2"
|
||||
;;
|
||||
@ -1879,6 +1883,13 @@ if test "$enable_wpcap_Dynamic_Linking" -eq 1; then
|
||||
enable_wpcap_Several_Fixes=1
|
||||
fi
|
||||
|
||||
if test "$enable_wined3d_CSMT_Main" -eq 1; then
|
||||
if test "$enable_wined3d_CSMT_Helper" -gt 1; then
|
||||
abort "Patchset wined3d-CSMT_Helper disabled, but wined3d-CSMT_Main depends on that."
|
||||
fi
|
||||
enable_wined3d_CSMT_Helper=1
|
||||
fi
|
||||
|
||||
if test "$enable_wined3d_MESA_GPU_Info" -eq 1; then
|
||||
if test "$enable_wined3d_Accounting" -gt 1; then
|
||||
abort "Patchset wined3d-Accounting disabled, but wined3d-MESA_GPU_Info depends on that."
|
||||
@ -6719,6 +6730,377 @@ if test "$enable_wined3d_Silence_FIXMEs" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-CSMT_Main
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
# | * makedep-PARENTSPEC, ntdll-DllOverrides_WOW64, ntdll-Loader_Machine_Type, ntdll-DllRedirects, wined3d-DXTn, wined3d-
|
||||
# | resource_map, wined3d-CSMT_Helper
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#11674] Support for CSMT (command stream) to increase graphic performance
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3d8/tests/visual.c, dlls/d3d9/tests/visual.c, dlls/wined3d/arb_program_shader.c, dlls/wined3d/buffer.c,
|
||||
# | dlls/wined3d/context.c, dlls/wined3d/cs.c, dlls/wined3d/device.c, dlls/wined3d/directx.c, dlls/wined3d/drawprim.c,
|
||||
# | dlls/wined3d/glsl_shader.c, dlls/wined3d/query.c, dlls/wined3d/resource.c, dlls/wined3d/sampler.c,
|
||||
# | dlls/wined3d/shader.c, dlls/wined3d/state.c, dlls/wined3d/stateblock.c, dlls/wined3d/surface.c,
|
||||
# | dlls/wined3d/swapchain.c, dlls/wined3d/texture.c, dlls/wined3d/utils.c, dlls/wined3d/vertexdeclaration.c,
|
||||
# | dlls/wined3d/view.c, dlls/wined3d/volume.c, dlls/wined3d/wined3d_main.c, dlls/wined3d/wined3d_private.h,
|
||||
# | dlls/winex11.drv/opengl.c
|
||||
# |
|
||||
if test "$enable_wined3d_CSMT_Main" -eq 1; then
|
||||
patch_apply wined3d-CSMT_Main/0001-Revert-wined3d-Introduce-wined3d_texture_check_block.patch
|
||||
patch_apply wined3d-CSMT_Main/0002-Revert-wined3d-Introduce-wined3d_texture_get_pitch.patch
|
||||
patch_apply wined3d-CSMT_Main/0003-Revert-wined3d-Use-wined3d_format_calculate_pitch-in.patch
|
||||
patch_apply wined3d-CSMT_Main/0004-Revert-wined3d-Handle-slice-pitch-and-alignment-as-w.patch
|
||||
patch_apply wined3d-CSMT_Main/0005-Revert-wined3d-Store-custom-pitches-in-the-texture-i.patch
|
||||
patch_apply wined3d-CSMT_Main/0006-Revert-wined3d-Store-the-user_memory-pointer-in-the-.patch
|
||||
patch_apply wined3d-CSMT_Main/0007-wined3d-Merge-get_pitch-functions.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-Introduce-a-function-to-retrieve-resource-me.patch
|
||||
patch_apply wined3d-CSMT_Main/0032-wined3d-Make-surface_ops-unmap-specific-for-front-bu.patch
|
||||
patch_apply wined3d-CSMT_Main/0033-wined3d-Move-check_block_align-to-resource.c.patch
|
||||
patch_apply wined3d-CSMT_Main/0034-wined3d-Replace-surface-alloc-functions-with-resourc.patch
|
||||
patch_apply wined3d-CSMT_Main/0035-wined3d-Don-t-delete-the-buffer-in-surface_cleanup.patch
|
||||
patch_apply wined3d-CSMT_Main/0036-wined3d-Use-resource-facilities-to-destroy-PBOs.patch
|
||||
patch_apply wined3d-CSMT_Main/0037-wined3d-Move-simple-location-copying-to-the-resource.patch
|
||||
patch_apply wined3d-CSMT_Main/0038-wined3d-Move-most-of-volume_map-to-resource.c.patch
|
||||
patch_apply wined3d-CSMT_Main/0039-wined3d-Use-resource_map-for-surface_map.patch
|
||||
patch_apply wined3d-CSMT_Main/0040-wined3d-Don-t-call-the-public-map-function-in-surfac.patch
|
||||
patch_apply wined3d-CSMT_Main/0041-wined3d-Don-t-call-the-public-map-function-in-surfac.patch
|
||||
patch_apply wined3d-CSMT_Main/0042-wined3d-Move-the-framebuffer-into-wined3d_state.patch
|
||||
patch_apply wined3d-CSMT_Main/0043-wined3d-Get-rid-of-state-access-in-shader_generate_g.patch
|
||||
patch_apply wined3d-CSMT_Main/0044-wined3d-Preload-buffers-if-streamsrc-is-not-dirty.patch
|
||||
patch_apply wined3d-CSMT_Main/0045-wined3d-Hackily-introduce-a-multithreaded-command-st.patch
|
||||
patch_apply wined3d-CSMT_Main/0046-wined3d-Wait-for-resource-updates-to-finish-when-usi.patch
|
||||
patch_apply wined3d-CSMT_Main/0047-wined3d-Don-t-store-pointers-in-struct-wined3d_cs_pr.patch
|
||||
patch_apply wined3d-CSMT_Main/0048-wined3d-Don-t-put-rectangle-pointers-into-wined3d_cs.patch
|
||||
patch_apply wined3d-CSMT_Main/0049-wined3d-Store-the-color-in-clear-ops-instead-of-a-po.patch
|
||||
patch_apply wined3d-CSMT_Main/0050-wined3d-Pass-the-state-to-draw_primitive.patch
|
||||
patch_apply wined3d-CSMT_Main/0051-wined3d-Wait-for-the-cs-before-destroying-objects.patch
|
||||
patch_apply wined3d-CSMT_Main/0052-wined3d-Give-the-cs-its-own-state.patch
|
||||
patch_apply wined3d-CSMT_Main/0053-wined3d-Send-float-constant-updates-through-the-comm.patch
|
||||
patch_apply wined3d-CSMT_Main/0054-wined3d-Request-a-glFinish-before-modifying-resource.patch
|
||||
patch_apply wined3d-CSMT_Main/0055-wined3d-Finish-the-cs-before-changing-the-texture-lo.patch
|
||||
patch_apply wined3d-CSMT_Main/0056-wined3d-Don-t-call-glFinish-after-clears.patch
|
||||
patch_apply wined3d-CSMT_Main/0057-wined3d-Don-t-call-glFinish-after-draws.patch
|
||||
patch_apply wined3d-CSMT_Main/0058-wined3d-Shadow-device-offscreenBuffer-in-the-context.patch
|
||||
patch_apply wined3d-CSMT_Main/0059-wined3d-Don-t-access-the-stateblock-in-find_draw_buf.patch
|
||||
patch_apply wined3d-CSMT_Main/0060-wined3d-Pass-the-depth-stencil-to-swapchain-present.patch
|
||||
patch_apply wined3d-CSMT_Main/0061-wined3d-Don-t-store-viewport-pointers-in-the-command.patch
|
||||
patch_apply wined3d-CSMT_Main/0062-wined3d-Keep-track-of-the-onscreen-depth-stencil-in-.patch
|
||||
patch_apply wined3d-CSMT_Main/0063-wined3d-Send-base-vertex-index-updates-through-the-c.patch
|
||||
patch_apply wined3d-CSMT_Main/0064-wined3d-Send-primitive-type-updates-through-the-comm.patch
|
||||
patch_apply wined3d-CSMT_Main/0065-wined3d-Send-bool-constant-updates-through-the-comma.patch
|
||||
patch_apply wined3d-CSMT_Main/0066-wined3d-Send-int-constant-updates-through-the-comman.patch
|
||||
patch_apply wined3d-CSMT_Main/0067-wined3d-Send-light-updates-through-the-command-strea.patch
|
||||
patch_apply wined3d-CSMT_Main/0068-wined3d-Prevent-the-command-stream-from-running-ahea.patch
|
||||
patch_apply wined3d-CSMT_Main/0069-wined3d-Wait-for-the-cs-to-finish-before-destroying-.patch
|
||||
patch_apply wined3d-CSMT_Main/0070-wined3d-Run-the-cs-asynchronously.patch
|
||||
patch_apply wined3d-CSMT_Main/0071-wined3d-Send-blits-through-the-command-stream.patch
|
||||
patch_apply wined3d-CSMT_Main/0072-wined3d-Get-rid-of-WINED3D_BUFFER_FLUSH.patch
|
||||
patch_apply wined3d-CSMT_Main/0073-wined3d-Don-t-force-strict-draw-ordering-for-multith.patch
|
||||
patch_apply wined3d-CSMT_Main/0074-wined3d-Send-render-target-view-clears-through-the-c.patch
|
||||
patch_apply wined3d-CSMT_Main/0075-wined3d-Wait-for-the-CS-in-GetDC.patch
|
||||
patch_apply wined3d-CSMT_Main/0076-wined3d-send-resource-maps-through-the-command-strea.patch
|
||||
patch_apply wined3d-CSMT_Main/0077-wined3d-Get-rid-of-the-end_scene-flush-and-finish.patch
|
||||
patch_apply wined3d-CSMT_Main/0078-wined3d-Replace-the-linked-lists-with-a-ringbuffer.patch
|
||||
patch_apply wined3d-CSMT_Main/0079-wined3d-Don-t-preload-buffers-on-unmap.patch
|
||||
patch_apply wined3d-CSMT_Main/0080-wined3d-Don-t-call-glFinish-before-swapping.patch
|
||||
patch_apply wined3d-CSMT_Main/0081-wined3d-wined3d_-_query_issue-never-fails.patch
|
||||
patch_apply wined3d-CSMT_Main/0082-wined3d-Add-query-support-to-the-command-stream.patch
|
||||
patch_apply wined3d-CSMT_Main/0083-wined3d-Check-our-CS-state-to-find-out-if-a-query-is.patch
|
||||
patch_apply wined3d-CSMT_Main/0084-wined3d-Poll-queries-automatically-in-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0085-wined3d-Introduce-a-separate-queue-for-priority-comm.patch
|
||||
patch_apply wined3d-CSMT_Main/0086-wined3d-Destroy-queries-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0087-wined3d-Separate-main-and-worker-thread-query-state.patch
|
||||
patch_apply wined3d-CSMT_Main/0088-wined3d-Don-t-poll-queries-that-failed-to-start.patch
|
||||
patch_apply wined3d-CSMT_Main/0089-wined3d-Remove-restated-queries-from-the-poll-list.patch
|
||||
patch_apply wined3d-CSMT_Main/0090-wined3d-Don-t-reset-the-query-state-if-it-doesn-t-ha.patch
|
||||
patch_apply wined3d-CSMT_Main/0091-wined3d-Put-this-into-the-query-poll-patch.patch
|
||||
patch_apply wined3d-CSMT_Main/0092-wined3d-Send-texture-preloads-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0093-wined3d-Send-update_texture-calls-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0094-wined3d-Get-rid-of-the-surface_upload_data-glFinish.patch
|
||||
patch_apply wined3d-CSMT_Main/0095-wined3d-Don-t-lock-the-src-volume-in-device_update_v.patch
|
||||
patch_apply wined3d-CSMT_Main/0096-wined3d-Handle-evit_managed_resources-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0097-wined3d-Introduce-resource-fencing.patch
|
||||
patch_apply wined3d-CSMT_Main/0098-wined3d-Fence-update_texture-and-update_surface-call.patch
|
||||
patch_apply wined3d-CSMT_Main/0099-wined3d-Dirtify-resources-on-unmap.patch
|
||||
patch_apply wined3d-CSMT_Main/0100-wined3d-Fence-texture-reads-in-draws.patch
|
||||
patch_apply wined3d-CSMT_Main/0101-wined3d-Fence-render-targets-and-depth-stencils.patch
|
||||
patch_apply wined3d-CSMT_Main/0102-wined3d-Fence-blit-operations.patch
|
||||
patch_apply wined3d-CSMT_Main/0103-wined3d-Fence-color_fill-operations.patch
|
||||
patch_apply wined3d-CSMT_Main/0104-wined3d-Fence-clear-calls.patch
|
||||
patch_apply wined3d-CSMT_Main/0105-wined3d-Fence-present-calls.patch
|
||||
patch_apply wined3d-CSMT_Main/0106-wined3d-Make-resource-maps-and-unmaps-a-priority-com.patch
|
||||
patch_apply wined3d-CSMT_Main/0107-wined3d-Dirtify-changed-textures-through-the-command.patch
|
||||
patch_apply wined3d-CSMT_Main/0108-wined3d-Wrap-GL-BOs-in-a-structure.patch
|
||||
patch_apply wined3d-CSMT_Main/0109-wined3d-Separate-resource-map-and-draw-buffers.patch
|
||||
patch_apply wined3d-CSMT_Main/0110-wined3d-Implement-DISCARD-resource-maps-with-buffers.patch
|
||||
patch_apply wined3d-CSMT_Main/0111-wined3d-Implement-DISCARD-resource-maps-with-heap-me.patch
|
||||
patch_apply wined3d-CSMT_Main/0112-wined3d-Unset-some-objects-in-state_init_default.patch
|
||||
patch_apply wined3d-CSMT_Main/0113-wined3d-Don-t-request-the-frontbuffer-to-create-dumm.patch
|
||||
patch_apply wined3d-CSMT_Main/0114-wined3d-Use-double-buffered-buffers-for-multithreade.patch
|
||||
patch_apply wined3d-CSMT_Main/0115-wined3d-Don-t-synchronize-NOOVERWRITE-buffer-maps.patch
|
||||
patch_apply wined3d-CSMT_Main/0116-wined3d-Separate-buffer-map-write-and-draw-read-memo.patch
|
||||
patch_apply wined3d-CSMT_Main/0117-wined3d-Accelerate-DISCARD-buffer-maps.patch
|
||||
patch_apply wined3d-CSMT_Main/0118-wined3d-Accelerate-READONLY-buffer-maps.patch
|
||||
patch_apply wined3d-CSMT_Main/0119-wined3d-Access-the-buffer-dirty-areas-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0120-wined3d-Ignore-buffer-resource.map_count-in-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0121-wined3d-Send-buffer-preloads-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0122-wined3d-Use-glBufferSubData-instead-of-glMapBufferRa.patch
|
||||
patch_apply wined3d-CSMT_Main/0123-wined3d-Separate-GL-buffer-discard-control-from-igno.patch
|
||||
patch_apply wined3d-CSMT_Main/0124-wined3d-Create-buffers-before-mapping-them.patch
|
||||
patch_apply wined3d-CSMT_Main/0125-wined3d-Destroy-views-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0126-wined3d-Remove-another-glFinish.patch
|
||||
patch_apply wined3d-CSMT_Main/0127-wined3d-Destroy-vertex-declarations-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0128-wined3d-Destroy-shaders-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0129-wined3d-Create-VBOs-through-the-command-stream.patch
|
||||
patch_apply wined3d-CSMT_Main/0130-wined3d-Clean-up-resource-data-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0131-wined3d-Clean-up-buffer-resource-data-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0132-wined3d-Clean-up-volume-resource-data-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0133-wined3d-Clean-up-surfaces-through-the-cs.patch
|
||||
patch_apply wined3d-CSMT_Main/0134-wined3d-Clean-up-texture-resources-through-the-cs.patch
|
||||
patch_apply wined3d-CSMT_Main/0135-wined3d-Unload-resources-through-the-CS-in-uninit_3d.patch
|
||||
patch_apply wined3d-CSMT_Main/0136-wined3d-Unload-resources-through-the-CS-in-device_re.patch
|
||||
patch_apply wined3d-CSMT_Main/0137-wined3d-Don-t-glFinish-after-a-depth-buffer-blit.patch
|
||||
patch_apply wined3d-CSMT_Main/0138-wined3d-Remove-software-cursor-support.patch
|
||||
patch_apply wined3d-CSMT_Main/0139-wined3d-Create-dummy-textures-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0140-wined3d-Create-the-initial-context-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0141-wined3d-Recreate-ctx-and-dummy-textures-through-the-.patch
|
||||
patch_apply wined3d-CSMT_Main/0142-wined3d-Ignore-WINED3D_MAP_NO_DIRTY_UPDATE-in-resour.patch
|
||||
patch_apply wined3d-CSMT_Main/0143-wined3d-Delete-GL-contexts-through-the-CS-in-reset.patch
|
||||
patch_apply wined3d-CSMT_Main/0144-wined3d-Delete-GL-contexts-through-the-CS-in-uninit_.patch
|
||||
patch_apply wined3d-CSMT_Main/0145-wined3d-Invoke-surface_unload-through-the-CS-in-wine.patch
|
||||
patch_apply wined3d-CSMT_Main/0146-wined3d-Use-an-event-to-block-the-worker-thread-when.patch
|
||||
patch_apply wined3d-CSMT_Main/0147-wined3d-Fence-preload-operations.patch
|
||||
patch_apply wined3d-CSMT_Main/0148-d3d8-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch
|
||||
patch_apply wined3d-CSMT_Main/0149-d3d9-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch
|
||||
patch_apply wined3d-CSMT_Main/0150-wined3d-Completely-reset-the-state-on-reset.patch
|
||||
patch_apply wined3d-CSMT_Main/0151-wined3d-Send-getdc-and-releasedc-through-the-command.patch
|
||||
patch_apply wined3d-CSMT_Main/0152-wined3d-Set-map_heap_memory-NULL-when-allocating-a-P.patch
|
||||
patch_apply wined3d-CSMT_Main/0153-wined3d-Wait-only-for-the-buffer-to-be-idle.patch
|
||||
patch_apply wined3d-CSMT_Main/0154-wined3d-Add-a-comment-about-worker-thread-lag.patch
|
||||
patch_apply wined3d-CSMT_Main/0155-wined3d-Remove-the-texture-destroy-glFinish.patch
|
||||
patch_apply wined3d-CSMT_Main/0156-wined3d-Move-FBO-destruction-into-the-worker-thread.patch
|
||||
patch_apply wined3d-CSMT_Main/0157-wined3d-Don-t-incref-decref-textures-in-color-depth-.patch
|
||||
patch_apply wined3d-CSMT_Main/0158-Winex11-complain-about-glfinish.patch
|
||||
patch_apply wined3d-CSMT_Main/0159-wined3d-Make-sure-the-new-window-is-set-up-before-se.patch
|
||||
patch_apply wined3d-CSMT_Main/0160-wined3d-Remove-the-device_reset-CS-sync-fixme.patch
|
||||
patch_apply wined3d-CSMT_Main/0161-wined3d-Put-GL_APPLE_flush_buffer_range-syncing-back.patch
|
||||
patch_apply wined3d-CSMT_Main/0162-wined3d-Wait-for-the-resource-to-be-idle-when-destro.patch
|
||||
patch_apply wined3d-CSMT_Main/0163-wined3d-Don-t-sync-on-redundant-discard-calls.patch
|
||||
patch_apply wined3d-CSMT_Main/0164-wined3d-Don-t-discard-new-buffers.patch
|
||||
patch_apply wined3d-CSMT_Main/0165-wined3d-Don-t-try-to-sync-VBOs-manually-on-OSX-with-.patch
|
||||
patch_apply wined3d-CSMT_Main/0166-wined3d-Render-target-lock-hack.patch
|
||||
patch_apply wined3d-CSMT_Main/0167-wined3d-Avoid-calling-wined3d_surface_blt-from-surfa.patch
|
||||
patch_apply wined3d-CSMT_Main/0168-wined3d-Only-discard-buffers-that-are-in-use.patch
|
||||
patch_apply wined3d-CSMT_Main/0169-wined3d-Destroy-samplers-through-the-command-stream.patch
|
||||
patch_apply wined3d-CSMT_Main/0170-wined3d-Hack-to-reject-unsupported-color-fills.patch
|
||||
patch_apply wined3d-CSMT_Main/0171-wined3d-Alloc-the-buffer-map-array-before-mapping-th.patch
|
||||
patch_apply wined3d-CSMT_Main/0172-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", "Revert \"wined3d: Introduce wined3d_texture_check_block_align().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Introduce wined3d_texture_get_pitch().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Use wined3d_format_calculate_pitch() in surface_download_data().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Handle slice pitch and alignment as well in wined3d_format_calculate_pitch().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Store custom pitches in the texture instead of the surface.\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Store the \"user_memory\" pointer in the texture instead of the surface.\".", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Merge get_pitch functions.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Pass a context to surface_load_location.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Make surface_load_location return nothing.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Store volume locations in the resource.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Move validate_location to resource.c.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Move surface locations into the resource.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Remove surface_validate_location.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Move invalidate_location to resource.c.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Invalidate containers via callback.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Remove surface_invalidate_location.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Move bitmap_data and user_memory into the resource.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Move load_location into the resource.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Replace surface_load_location with resource_load_location.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Introduce helper functions for mapping volumes.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Move volume PBO infrastructure into the resource.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Remove surface->pbo.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Use resource buffer mapping facilities in surfaces.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Move buffer creation into the resource.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Handle WINED3D_LOCATION_DISCARDED in surface_load_texture.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Handle LOCATION_DISCARDED in surface_load_drawable.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Handle WINED3D_LOCATION_DISCARDED for sysmem loads.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Discard implicit surfaces on unload.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t try to flip sysmem copies in swapchain_present.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Discard the backbuffer in discard presents.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Introduce a function to retrieve resource memory.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Make surface_ops->unmap specific for front buffers.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Move check_block_align to resource.c.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Replace surface alloc functions with resource ones.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t delete the buffer in surface_cleanup.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Use resource facilities to destroy PBOs.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Move simple location copying to the resource.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Move most of volume_map to resource.c.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Use resource_map for surface_map.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t call the public map function in surface_convert_format.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t call the public map function in surface_cpu_blt.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Move the framebuffer into wined3d_state.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Get rid of state access in shader_generate_glsl_declarations.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Preload buffers if streamsrc is not dirty.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Hackily introduce a multithreaded command stream.", 1 },';
|
||||
echo '+ { "Henri Verbeet", "wined3d: Wait for resource updates to finish when using the multithreaded command stream.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t store pointers in struct wined3d_cs_present.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t put rectangle pointers into wined3d_cs_clear.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Store the color in clear ops instead of a pointer.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Pass the state to draw_primitive.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Wait for the cs before destroying objects.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Give the cs its own state.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Send float constant updates through the command stream.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Request a glFinish before modifying resources outside the cs.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Finish the cs before changing the texture lod.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t call glFinish after clears.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t call glFinish after draws.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Shadow device->offscreenBuffer in the context.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t access the stateblock in find_draw_buffers_mask.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Pass the depth stencil to swapchain->present.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t store viewport pointers in the command stream.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Keep track of the onscreen depth stencil in the command stream instead of the device.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Send base vertex index updates through the cs.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Send primitive type updates through the command stream.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Send bool constant updates through the command stream.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Send int constant updates through the command stream.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Send light updates through the command stream.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Prevent the command stream from running ahead too far.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Wait for the cs to finish before destroying the device.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Run the cs asynchronously.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Send blits through the command stream.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Get rid of WINED3D_BUFFER_FLUSH.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t force strict draw ordering for multithreaded CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Send render target view clears through the command stream.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Wait for the CS in GetDC.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Send resource maps through the command stream.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Get rid of the end_scene flush and finish.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Replace the linked lists with a ringbuffer.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t preload buffers on unmap.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t call glFinish before swapping.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Wined3d_*_query_issue never fails.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Add query support to the command stream.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Check our CS state to find out if a query is done.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Poll queries automatically in the CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Introduce a separate queue for priority commands.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Destroy queries through the CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Separate main and worker thread query state.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t poll queries that failed to start.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Remove restated queries from the poll list.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t reset the query state if it doesn'\''t have a ctx.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Put this into the query poll patch.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Send texture preloads through the CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Send update_texture calls through the CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Get rid of the surface_upload_data glFinish.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t lock the src volume in device_update_volume.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Handle evit_managed_resources through the CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Introduce resource fencing.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Fence update_texture and update_surface calls.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Dirtify resources on unmap.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Fence texture reads in draws.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Fence render targets and depth stencils.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Fence blit operations.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Fence color_fill operations.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Fence clear calls.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Fence present calls.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Make resource maps and unmaps a priority command.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Dirtify changed textures through the command stream.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Wrap GL BOs in a structure.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Separate resource map and draw buffers.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Implement DISCARD resource maps with buffers.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Implement DISCARD resource maps with heap memory.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Unset some objects in state_init_default.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t request the frontbuffer to create dummy textures.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Use double-buffered buffers for multithreaded CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t synchronize NOOVERWRITE buffer maps.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Separate buffer map write and draw read memory pointers.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Accelerate DISCARD buffer maps.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Accelerate READONLY buffer maps.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Access the buffer dirty areas through the CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Ignore buffer->resource.map_count in the CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Send buffer preloads through the CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Use glBufferSubData instead of glMapBufferRange.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Separate GL buffer discard control from ignoring MAP_DISCARD.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Create buffers before mapping them.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Destroy views through the CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Remove another glFinish.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Destroy vertex declarations through the CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Destroy shaders through the CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Create VBOs through the command stream.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Clean up resource data through the CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Clean up buffer resource data through the CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Clean up volume resource data through the CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Clean up surfaces through the cs.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Clean up texture resources through the cs.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Unload resources through the CS in uninit_3d.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Unload resources through the CS in device_reset.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t glFinish after a depth buffer blit.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Remove software cursor support.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Create dummy textures through the CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Create the initial context through the CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Recreate ctx and dummy textures through the CS after resets.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Ignore WINED3D_MAP_NO_DIRTY_UPDATE in resource_map.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Delete GL contexts through the CS in reset.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Delete GL contexts through the CS in uninit_3d.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Invoke surface_unload through the CS in wined3d_surface_update_desc.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Use an event to block the worker thread when it is idle.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Fence preload operations.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "d3d8/tests: D3DLOCK_NO_DIRTY_UPDATE on managed textures is temporarily broken.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "d3d9/tests: D3DLOCK_NO_DIRTY_UPDATE on managed textures is temporarily broken.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Completely reset the state on reset.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Send getdc and releasedc through the command stream.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Set map_heap_memory = NULL when allocating a PBO.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Wait only for the buffer to be idle.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Add a comment about worker thread lag.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Remove the texture destroy glFinish.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Move FBO destruction into the worker thread.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t incref / decref textures in color / depth fill blits.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "Winex11: Complain about glfinish.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Make sure the new window is set up before setting up a context.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Remove the device_reset CS sync fixme.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Put GL_APPLE_flush_buffer_range syncing back in place.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Wait for the resource to be idle when destroying user memory surfaces.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t sync on redundant discard calls.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t discard new buffers.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t try to sync VBOs manually on OSX with CSMT.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Render target lock hack.", 1 },';
|
||||
echo '+ { "Matteo Bruni", "wined3d: Avoid calling wined3d_surface_blt() from surface_upload_from_surface().", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Only discard buffers that are in use.", 1 },';
|
||||
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 '+ { "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"
|
||||
fi
|
||||
|
||||
# Patchset winedevice-Fix_Relocation
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -0,0 +1,171 @@
|
||||
From c007a75501e40d839902fbc8bbfb4ef291f07bb2 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 21 Feb 2016 23:30:15 +0100
|
||||
Subject: Revert "wined3d: Introduce wined3d_texture_check_block_align()."
|
||||
|
||||
This reverts commit 58719f60d5dca15f0f0de625bc307e04b01fc6d9.
|
||||
---
|
||||
dlls/wined3d/surface.c | 31 +++++++++++++++++++++++++++++--
|
||||
dlls/wined3d/texture.c | 29 -----------------------------
|
||||
dlls/wined3d/volume.c | 31 +++++++++++++++++++++++++++++--
|
||||
dlls/wined3d/wined3d_private.h | 2 --
|
||||
4 files changed, 58 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 7858d15..c1d7b18 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -1538,11 +1538,38 @@ void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct w
|
||||
}
|
||||
}
|
||||
|
||||
+static BOOL surface_check_block_align(struct wined3d_surface *surface, const struct wined3d_box *box)
|
||||
+{
|
||||
+ UINT width_mask, height_mask;
|
||||
+
|
||||
+ if (!box->left && !box->top
|
||||
+ && box->right == surface->resource.width
|
||||
+ && box->bottom == surface->resource.height)
|
||||
+ return TRUE;
|
||||
+
|
||||
+ if ((box->left >= box->right)
|
||||
+ || (box->top >= box->bottom)
|
||||
+ || (box->right > surface->resource.width)
|
||||
+ || (box->bottom > surface->resource.height))
|
||||
+ return FALSE;
|
||||
+
|
||||
+ /* This assumes power of two block sizes, but NPOT block sizes would be
|
||||
+ * silly anyway. */
|
||||
+ width_mask = surface->resource.format->block_width - 1;
|
||||
+ height_mask = surface->resource.format->block_height - 1;
|
||||
+
|
||||
+ if (!(box->left & width_mask) && !(box->top & height_mask)
|
||||
+ && !(box->right & width_mask) && !(box->bottom & height_mask))
|
||||
+ return TRUE;
|
||||
+
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
static BOOL surface_check_block_align_rect(struct wined3d_surface *surface, const RECT *rect)
|
||||
{
|
||||
struct wined3d_box box = {rect->left, rect->top, rect->right, rect->bottom, 0, 1};
|
||||
|
||||
- return wined3d_texture_check_block_align(surface->container, surface->texture_level, &box);
|
||||
+ return surface_check_block_align(surface, &box);
|
||||
}
|
||||
|
||||
HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const POINT *dst_point,
|
||||
@@ -2274,7 +2301,7 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
}
|
||||
|
||||
if ((fmt_flags & WINED3DFMT_FLAG_BLOCKS) && box
|
||||
- && !wined3d_texture_check_block_align(surface->container, surface->texture_level, box))
|
||||
+ && !surface_check_block_align(surface, box))
|
||||
{
|
||||
WARN("Map box %s is misaligned for %ux%u blocks.\n",
|
||||
debug_box(box), format->block_width, format->block_height);
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 804856b..7a24ff0 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1201,35 +1201,6 @@ static const struct wined3d_texture_ops texture3d_ops =
|
||||
texture3d_prepare_texture,
|
||||
};
|
||||
|
||||
-BOOL wined3d_texture_check_block_align(const struct wined3d_texture *texture,
|
||||
- unsigned int level, const struct wined3d_box *box)
|
||||
-{
|
||||
- const struct wined3d_format *format = texture->resource.format;
|
||||
- unsigned int height = max(1, texture->resource.height >> level);
|
||||
- unsigned int width = max(1, texture->resource.width >> level);
|
||||
- unsigned int width_mask, height_mask;
|
||||
-
|
||||
- if ((box->left >= box->right)
|
||||
- || (box->top >= box->bottom)
|
||||
- || (box->right > width)
|
||||
- || (box->bottom > height))
|
||||
- return FALSE;
|
||||
-
|
||||
- /* This assumes power of two block sizes, but NPOT block sizes would be
|
||||
- * silly anyway.
|
||||
- *
|
||||
- * This also assumes that the format's block depth is 1. */
|
||||
- width_mask = format->block_width - 1;
|
||||
- height_mask = format->block_height - 1;
|
||||
-
|
||||
- if ((box->left & width_mask) || (box->top & height_mask)
|
||||
- || (box->right & width_mask && box->right != width)
|
||||
- || (box->bottom & height_mask && box->bottom != height))
|
||||
- return FALSE;
|
||||
-
|
||||
- return TRUE;
|
||||
-}
|
||||
-
|
||||
static HRESULT texture3d_resource_sub_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags)
|
||||
{
|
||||
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
index 6f5de73..75585d8 100644
|
||||
--- a/dlls/wined3d/volume.c
|
||||
+++ b/dlls/wined3d/volume.c
|
||||
@@ -433,6 +433,34 @@ static void volume_unload(struct wined3d_resource *resource)
|
||||
resource_unload(resource);
|
||||
}
|
||||
|
||||
+static BOOL volume_check_block_align(const struct wined3d_volume *volume,
|
||||
+ const struct wined3d_box *box)
|
||||
+{
|
||||
+ UINT width_mask, height_mask;
|
||||
+ const struct wined3d_format *format = volume->resource.format;
|
||||
+
|
||||
+ if (!box)
|
||||
+ return TRUE;
|
||||
+
|
||||
+ /* This assumes power of two block sizes, but NPOT block sizes would be
|
||||
+ * silly anyway.
|
||||
+ *
|
||||
+ * This also assumes that the format's block depth is 1. */
|
||||
+ width_mask = format->block_width - 1;
|
||||
+ height_mask = format->block_height - 1;
|
||||
+
|
||||
+ if (box->left & width_mask)
|
||||
+ return FALSE;
|
||||
+ if (box->top & height_mask)
|
||||
+ return FALSE;
|
||||
+ if (box->right & width_mask && box->right != volume->resource.width)
|
||||
+ return FALSE;
|
||||
+ if (box->bottom & height_mask && box->bottom != volume->resource.height)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
static BOOL wined3d_volume_check_box_dimensions(const struct wined3d_volume *volume,
|
||||
const struct wined3d_box *box)
|
||||
{
|
||||
@@ -484,8 +512,7 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
WARN("Map box is invalid.\n");
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
- if ((fmt_flags & WINED3DFMT_FLAG_BLOCKS) && box
|
||||
- && !wined3d_texture_check_block_align(volume->container, volume->texture_level, box))
|
||||
+ if ((fmt_flags & WINED3DFMT_FLAG_BLOCKS) && !volume_check_block_align(volume, box))
|
||||
{
|
||||
WARN("Map box %s is misaligned for %ux%u blocks.\n",
|
||||
debug_box(box), format->block_width, format->block_height);
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index a20bc65..a243727 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2405,8 +2405,6 @@ void wined3d_texture_bind(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
-BOOL wined3d_texture_check_block_align(const struct wined3d_texture *texture,
|
||||
- unsigned int level, const struct wined3d_box *box) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_force_reload(struct wined3d_texture *texture) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_load(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.7.1
|
||||
|
@ -0,0 +1,76 @@
|
||||
From fde2bdfb77c46121de1617f90fbb20662d208edd Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 21 Feb 2016 23:34:22 +0100
|
||||
Subject: Revert "wined3d: Introduce wined3d_texture_get_pitch()."
|
||||
|
||||
This partially reverts commit 65c04ce0409d870bc42ef466027120388abdb83c.
|
||||
---
|
||||
dlls/wined3d/surface.c | 11 ++++++++++-
|
||||
dlls/wined3d/texture.c | 9 ++-------
|
||||
dlls/wined3d/wined3d_private.h | 1 -
|
||||
3 files changed, 12 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 62a1a3c..dad5c22 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -1909,7 +1909,16 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface, const struc
|
||||
surface->resource.format = texture_resource->format;
|
||||
surface->resource.multisample_type = texture_resource->multisample_type;
|
||||
surface->resource.multisample_quality = texture_resource->multisample_quality;
|
||||
- surface->resource.size = surface->container->slice_pitch;
|
||||
+ if (surface->container->row_pitch)
|
||||
+ {
|
||||
+ surface->resource.size = height * surface->container->row_pitch;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* User memory surfaces don't have the regular surface alignment. */
|
||||
+ wined3d_format_calculate_pitch(texture_resource->format, 1, width, height,
|
||||
+ &surface->container->row_pitch, &surface->resource.size);
|
||||
+ }
|
||||
|
||||
/* The format might be changed to a format that needs conversion.
|
||||
* If the surface didn't use PBOs previously but could now, don't
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index b4f679c..487b2ef 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -502,7 +502,7 @@ void CDECL wined3d_texture_get_pitch(const struct wined3d_texture *texture,
|
||||
if (texture->row_pitch)
|
||||
{
|
||||
*row_pitch = texture->row_pitch;
|
||||
- *slice_pitch = texture->slice_pitch;
|
||||
+ *slice_pitch = *row_pitch * height;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -656,12 +656,7 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
texture->resource.height = height;
|
||||
|
||||
texture->user_memory = mem;
|
||||
- if ((texture->row_pitch = pitch))
|
||||
- texture->slice_pitch = height * pitch;
|
||||
- else
|
||||
- /* User memory surfaces don't have the regular surface alignment. */
|
||||
- wined3d_format_calculate_pitch(format, 1, width, height,
|
||||
- &texture->row_pitch, &texture->slice_pitch);
|
||||
+ texture->row_pitch = pitch;
|
||||
|
||||
texture->flags &= ~WINED3D_TEXTURE_COND_NP2_EMULATED;
|
||||
if (((width & (width - 1)) || (height & (height - 1))) && !gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO]
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 0ef64c1..3433ae1 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2367,7 +2367,6 @@ struct wined3d_texture
|
||||
|
||||
void *user_memory;
|
||||
unsigned int row_pitch;
|
||||
- unsigned int slice_pitch;
|
||||
|
||||
/* May only be accessed from the command stream worker thread. */
|
||||
struct wined3d_texture_async
|
||||
--
|
||||
2.7.1
|
||||
|
@ -0,0 +1,55 @@
|
||||
From 979c38f3099fa1d537710254c6f2961e6de7d6d9 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 21 Feb 2016 23:34:31 +0100
|
||||
Subject: Revert "wined3d: Use wined3d_format_calculate_pitch() in
|
||||
surface_download_data()."
|
||||
|
||||
This reverts commit a95524b8f3abfaa28fc21055d95d4a087a9b6d69.
|
||||
---
|
||||
dlls/wined3d/surface.c | 13 +++++++------
|
||||
1 file changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 93bf718..59c6e5c 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -1325,17 +1325,18 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
|
||||
else
|
||||
{
|
||||
unsigned int dst_row_pitch, dst_slice_pitch;
|
||||
- unsigned int src_row_pitch, src_slice_pitch;
|
||||
+ unsigned int src_pitch;
|
||||
GLenum gl_format = format->glFormat;
|
||||
GLenum gl_type = format->glType;
|
||||
void *mem;
|
||||
|
||||
if (surface->container->flags & WINED3D_TEXTURE_COND_NP2_EMULATED)
|
||||
{
|
||||
+ unsigned char alignment = surface->resource.device->surface_alignment;
|
||||
+ src_pitch = format->byte_count * surface->pow2Width;
|
||||
wined3d_texture_get_pitch(surface->container, surface->texture_level, &dst_row_pitch, &dst_slice_pitch);
|
||||
- wined3d_format_calculate_pitch(format, surface->resource.device->surface_alignment,
|
||||
- surface->pow2Width, surface->pow2Height, &src_row_pitch, &src_slice_pitch);
|
||||
- mem = HeapAlloc(GetProcessHeap(), 0, src_slice_pitch);
|
||||
+ src_pitch = (src_pitch + alignment - 1) & ~(alignment - 1);
|
||||
+ mem = HeapAlloc(GetProcessHeap(), 0, src_pitch * surface->pow2Height);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1420,11 +1421,11 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
|
||||
* won't be released, and doesn't have to be re-read. */
|
||||
src_data = mem;
|
||||
dst_data = data.addr;
|
||||
- TRACE("Repacking the surface data from pitch %u to pitch %u.\n", src_row_pitch, dst_row_pitch);
|
||||
+ TRACE("(%p) : Repacking the surface data from pitch %d to pitch %d\n", surface, src_pitch, dst_row_pitch);
|
||||
for (y = 0; y < surface->resource.height; ++y)
|
||||
{
|
||||
memcpy(dst_data, src_data, dst_row_pitch);
|
||||
- src_data += src_row_pitch;
|
||||
+ src_data += src_pitch;
|
||||
dst_data += dst_row_pitch;
|
||||
}
|
||||
|
||||
--
|
||||
2.7.1
|
||||
|
@ -1,377 +0,0 @@
|
||||
From 0121313746277d4ade36ddf19f616fbbb481304e 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 | 75 +++++++++++++++++++-----------------------
|
||||
dlls/wined3d/texture.c | 2 +-
|
||||
dlls/wined3d/volume.c | 28 ++--------------
|
||||
dlls/wined3d/wined3d_private.h | 5 +--
|
||||
5 files changed, 70 insertions(+), 71 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index 44cdb43..ed598cc 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -440,3 +440,34 @@ void wined3d_resource_update_draw_binding(struct wined3d_resource *resource)
|
||||
else
|
||||
resource->draw_binding = WINED3D_LOCATION_TEXTURE_RGB;
|
||||
}
|
||||
+
|
||||
+void wined3d_resource_get_pitch(const struct wined3d_resource *resource, UINT *row_pitch,
|
||||
+ UINT *slice_pitch)
|
||||
+{
|
||||
+ unsigned int alignment;
|
||||
+ const struct wined3d_format *format = resource->format;
|
||||
+
|
||||
+ if (resource->custom_row_pitch)
|
||||
+ {
|
||||
+ *row_pitch = resource->custom_row_pitch;
|
||||
+ *slice_pitch = resource->custom_slice_pitch;
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ alignment = resource->device->surface_alignment;
|
||||
+ *row_pitch = wined3d_format_calculate_pitch(resource->format, resource->width);
|
||||
+ *row_pitch = (*row_pitch + alignment - 1) & ~(alignment - 1);
|
||||
+ if (format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_BLOCKS)
|
||||
+ {
|
||||
+ /* Since compressed formats are block based, pitch means the amount of
|
||||
+ * bytes to the next row of block rather than the next row of pixels. */
|
||||
+ UINT slice_block_count = (resource->height + format->block_height - 1) / format->block_height;
|
||||
+ *slice_pitch = *row_pitch * slice_block_count;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ *slice_pitch = *row_pitch * resource->height;
|
||||
+ }
|
||||
+
|
||||
+ 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 65cb3b7..293b78d 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -364,6 +364,7 @@ HRESULT surface_create_dib_section(struct wined3d_surface *surface)
|
||||
BITMAPINFO *b_info;
|
||||
int extraline = 0;
|
||||
DWORD *masks;
|
||||
+ UINT row_pitch, slice_pitch;
|
||||
|
||||
TRACE("surface %p.\n", surface);
|
||||
|
||||
@@ -409,10 +410,11 @@ HRESULT surface_create_dib_section(struct wined3d_surface *surface)
|
||||
|
||||
b_info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
||||
/* TODO: Is there a nicer way to force a specific alignment? (8 byte for ddraw) */
|
||||
- b_info->bmiHeader.biWidth = wined3d_surface_get_pitch(surface) / format->byte_count;
|
||||
+ wined3d_resource_get_pitch(&surface->resource, &row_pitch, &slice_pitch);
|
||||
+ b_info->bmiHeader.biWidth = row_pitch / format->byte_count;
|
||||
b_info->bmiHeader.biHeight = 0 - surface->resource.height - extraline;
|
||||
b_info->bmiHeader.biSizeImage = (surface->resource.height + extraline)
|
||||
- * wined3d_surface_get_pitch(surface);
|
||||
+ * row_pitch;
|
||||
b_info->bmiHeader.biPlanes = 1;
|
||||
b_info->bmiHeader.biBitCount = format->byte_count * 8;
|
||||
|
||||
@@ -1332,14 +1334,14 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
|
||||
void *mem;
|
||||
GLenum gl_format = format->glFormat;
|
||||
GLenum gl_type = format->glType;
|
||||
- int src_pitch = 0;
|
||||
- int dst_pitch = 0;
|
||||
+ UINT src_pitch = 0;
|
||||
+ UINT dst_row_pitch, dst_slice_pitch;
|
||||
|
||||
if (surface->flags & SFLAG_NONPOW2)
|
||||
{
|
||||
unsigned char alignment = surface->resource.device->surface_alignment;
|
||||
src_pitch = format->byte_count * surface->pow2Width;
|
||||
- dst_pitch = wined3d_surface_get_pitch(surface);
|
||||
+ wined3d_resource_get_pitch(&surface->resource, &dst_row_pitch, &dst_slice_pitch);
|
||||
src_pitch = (src_pitch + alignment - 1) & ~(alignment - 1);
|
||||
mem = HeapAlloc(GetProcessHeap(), 0, src_pitch * surface->pow2Height);
|
||||
}
|
||||
@@ -1426,12 +1428,12 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
|
||||
* won't be released, and doesn't have to be re-read. */
|
||||
src_data = mem;
|
||||
dst_data = data.addr;
|
||||
- TRACE("(%p) : Repacking the surface data from pitch %d to pitch %d\n", surface, src_pitch, dst_pitch);
|
||||
+ TRACE("(%p) : Repacking the surface data from pitch %d to pitch %d\n", surface, src_pitch, dst_row_pitch);
|
||||
for (y = 0; y < surface->resource.height; ++y)
|
||||
{
|
||||
- memcpy(dst_data, src_data, dst_pitch);
|
||||
+ memcpy(dst_data, src_data, dst_row_pitch);
|
||||
src_data += src_pitch;
|
||||
- dst_data += dst_pitch;
|
||||
+ dst_data += dst_row_pitch;
|
||||
}
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, mem);
|
||||
@@ -1599,7 +1601,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
UINT update_w, update_h;
|
||||
UINT dst_w, dst_h;
|
||||
RECT r, dst_rect;
|
||||
- UINT src_pitch;
|
||||
+ UINT src_row_pitch, src_slice_pitch;
|
||||
POINT p;
|
||||
|
||||
TRACE("dst_surface %p, dst_point %s, src_surface %p, src_rect %s.\n",
|
||||
@@ -1687,10 +1689,10 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
|
||||
|
||||
surface_get_memory(src_surface, &data, src_surface->locations);
|
||||
- src_pitch = wined3d_surface_get_pitch(src_surface);
|
||||
+ wined3d_resource_get_pitch(&src_surface->resource, &src_row_pitch, &src_slice_pitch);
|
||||
|
||||
wined3d_surface_upload_data(dst_surface, gl_info, src_format, src_rect,
|
||||
- src_pitch, dst_point, FALSE, wined3d_const_bo_address(&data));
|
||||
+ src_row_pitch, dst_point, FALSE, wined3d_const_bo_address(&data));
|
||||
|
||||
context_release(context);
|
||||
|
||||
@@ -1892,21 +1894,10 @@ void * CDECL wined3d_surface_get_parent(const struct wined3d_surface *surface)
|
||||
|
||||
DWORD CDECL wined3d_surface_get_pitch(const struct wined3d_surface *surface)
|
||||
{
|
||||
- unsigned int alignment;
|
||||
- DWORD pitch;
|
||||
-
|
||||
- TRACE("surface %p.\n", surface);
|
||||
-
|
||||
- if (surface->pitch)
|
||||
- return surface->pitch;
|
||||
-
|
||||
- alignment = surface->resource.device->surface_alignment;
|
||||
- pitch = wined3d_format_calculate_pitch(surface->resource.format, surface->resource.width);
|
||||
- pitch = (pitch + alignment - 1) & ~(alignment - 1);
|
||||
-
|
||||
- TRACE("Returning %u.\n", pitch);
|
||||
-
|
||||
- return pitch;
|
||||
+ UINT row_pitch, slice_pitch;
|
||||
+ const struct wined3d_resource *resource = &surface->resource;
|
||||
+ wined3d_resource_get_pitch(resource, &row_pitch, &slice_pitch);
|
||||
+ return row_pitch;
|
||||
}
|
||||
|
||||
HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
@@ -1959,20 +1950,21 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
surface->resource.map_binding = WINED3D_LOCATION_USER_MEMORY;
|
||||
valid_location = WINED3D_LOCATION_USER_MEMORY;
|
||||
}
|
||||
- surface->pitch = pitch;
|
||||
+ surface->resource.custom_row_pitch = pitch;
|
||||
+ surface->resource.custom_slice_pitch = pitch * surface->resource.height;
|
||||
surface->resource.format = texture_resource->format;
|
||||
surface->resource.multisample_type = texture_resource->multisample_type;
|
||||
surface->resource.multisample_quality = texture_resource->multisample_quality;
|
||||
- if (surface->pitch)
|
||||
+ if (surface->resource.custom_row_pitch)
|
||||
{
|
||||
- surface->resource.size = height * surface->pitch;
|
||||
+ surface->resource.size = height * surface->resource.custom_row_pitch;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* User memory surfaces don't have the regular surface alignment. */
|
||||
surface->resource.size = wined3d_format_calculate_size(texture_resource->format,
|
||||
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);
|
||||
}
|
||||
|
||||
/* The format might be changed to a format that needs conversion.
|
||||
@@ -2594,7 +2586,7 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH)
|
||||
map_desc->row_pitch = surface->resource.width * format->byte_count;
|
||||
else
|
||||
- map_desc->row_pitch = wined3d_surface_get_pitch(surface);
|
||||
+ wined3d_resource_get_pitch(&surface->resource, &map_desc->row_pitch, &map_desc->slice_pitch);
|
||||
map_desc->slice_pitch = surface->resource.height * map_desc->row_pitch;
|
||||
|
||||
if (!box)
|
||||
@@ -2645,6 +2637,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
|
||||
int i;
|
||||
BOOL srcIsUpsideDown;
|
||||
struct wined3d_bo_address data;
|
||||
+ DWORD slice_pitch, pitch;
|
||||
|
||||
surface_get_memory(surface, &data, dst_location);
|
||||
|
||||
@@ -2686,8 +2679,8 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
|
||||
}
|
||||
|
||||
/* Setup pixel store pack state -- to glReadPixels into the correct place */
|
||||
- gl_info->gl_ops.gl.p_glPixelStorei(GL_PACK_ROW_LENGTH,
|
||||
- wined3d_surface_get_pitch(surface) / surface->resource.format->byte_count);
|
||||
+ wined3d_resource_get_pitch(&surface->resource, &pitch, &slice_pitch);
|
||||
+ gl_info->gl_ops.gl.p_glPixelStorei(GL_PACK_ROW_LENGTH, pitch / surface->resource.format->byte_count);
|
||||
checkGLcall("glPixelStorei");
|
||||
|
||||
gl_info->gl_ops.gl.p_glReadPixels(0, 0,
|
||||
@@ -2704,8 +2697,6 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
|
||||
{
|
||||
/* 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);
|
||||
-
|
||||
if (!(row = HeapAlloc(GetProcessHeap(), 0, pitch)))
|
||||
goto error;
|
||||
|
||||
@@ -3859,7 +3850,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
struct wined3d_device *device = surface->resource.device;
|
||||
const struct wined3d_color_key_conversion *conversion;
|
||||
struct wined3d_texture *texture = surface->container;
|
||||
- UINT width, src_pitch, dst_pitch;
|
||||
+ UINT width, src_row_pitch, src_slice_pitch, dst_pitch;
|
||||
struct wined3d_bo_address data;
|
||||
struct wined3d_format format;
|
||||
POINT dst_point = {0, 0};
|
||||
@@ -3944,7 +3935,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
wined3d_texture_bind_and_dirtify(texture, context, srgb);
|
||||
|
||||
width = surface->resource.width;
|
||||
- src_pitch = wined3d_surface_get_pitch(surface);
|
||||
+ wined3d_resource_get_pitch(&surface->resource, &src_row_pitch, &src_slice_pitch);
|
||||
|
||||
format = *texture->resource.format;
|
||||
if ((conversion = wined3d_format_get_color_key_conversion(texture, TRUE)))
|
||||
@@ -3982,9 +3973,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
context_release(context);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
- format.convert(data.addr, mem, src_pitch, src_pitch * height,
|
||||
+ format.convert(data.addr, mem, src_row_pitch, src_row_pitch * height,
|
||||
dst_pitch, dst_pitch * height, width, height, 1);
|
||||
- src_pitch = dst_pitch;
|
||||
+ src_row_pitch = dst_pitch;
|
||||
data.addr = mem;
|
||||
}
|
||||
else if (conversion)
|
||||
@@ -4004,14 +3995,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
}
|
||||
if (texture->swapchain && texture->swapchain->palette)
|
||||
palette = texture->swapchain->palette;
|
||||
- conversion->convert(data.addr, src_pitch, mem, dst_pitch,
|
||||
+ conversion->convert(data.addr, src_row_pitch, mem, dst_pitch,
|
||||
width, height, palette, &texture->async.gl_color_key);
|
||||
- src_pitch = dst_pitch;
|
||||
+ src_row_pitch = dst_pitch;
|
||||
data.addr = mem;
|
||||
}
|
||||
|
||||
wined3d_surface_upload_data(surface, gl_info, &format, &src_rect,
|
||||
- src_pitch, &dst_point, srgb, wined3d_const_bo_address(&data));
|
||||
+ src_row_pitch, &dst_point, srgb, wined3d_const_bo_address(&data));
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, mem);
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 0c48c91..8646e82 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1141,7 +1141,7 @@ static void texture3d_sub_resource_upload_data(struct wined3d_resource *sub_reso
|
||||
struct wined3d_const_bo_address addr;
|
||||
unsigned int row_pitch, slice_pitch;
|
||||
|
||||
- wined3d_volume_get_pitch(volume, &row_pitch, &slice_pitch);
|
||||
+ wined3d_resource_get_pitch(sub_resource, &row_pitch, &slice_pitch);
|
||||
if (row_pitch != data->row_pitch || slice_pitch != data->slice_pitch)
|
||||
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 3ac7f98..9235f3f 100644
|
||||
--- a/dlls/wined3d/volume.c
|
||||
+++ b/dlls/wined3d/volume.c
|
||||
@@ -40,30 +40,6 @@ BOOL volume_prepare_system_memory(struct wined3d_volume *volume)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
-void wined3d_volume_get_pitch(const struct wined3d_volume *volume, UINT *row_pitch, UINT *slice_pitch)
|
||||
-{
|
||||
- const struct wined3d_format *format = volume->resource.format;
|
||||
-
|
||||
- if (volume->container->resource.format_flags & WINED3DFMT_FLAG_BLOCKS)
|
||||
- {
|
||||
- /* Since compressed formats are block based, pitch means the amount of
|
||||
- * bytes to the next row of block rather than the next row of pixels. */
|
||||
- UINT row_block_count = (volume->resource.width + format->block_width - 1) / format->block_width;
|
||||
- UINT slice_block_count = (volume->resource.height + format->block_height - 1) / format->block_height;
|
||||
- *row_pitch = row_block_count * format->block_byte_count;
|
||||
- *slice_pitch = *row_pitch * slice_block_count;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- unsigned char alignment = volume->resource.device->surface_alignment;
|
||||
- *row_pitch = format->byte_count * volume->resource.width; /* Bytes / row */
|
||||
- *row_pitch = (*row_pitch + alignment - 1) & ~(alignment - 1);
|
||||
- *slice_pitch = *row_pitch * volume->resource.height;
|
||||
- }
|
||||
-
|
||||
- TRACE("Returning row pitch %u, slice pitch %u.\n", *row_pitch, *slice_pitch);
|
||||
-}
|
||||
-
|
||||
/* This call just uploads data, the caller is responsible for binding the
|
||||
* correct texture. */
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -95,7 +71,7 @@ void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wine
|
||||
dst_row_pitch = width * format->conv_byte_count;
|
||||
dst_slice_pitch = dst_row_pitch * height;
|
||||
|
||||
- wined3d_volume_get_pitch(volume, &src_row_pitch, &src_slice_pitch);
|
||||
+ wined3d_resource_get_pitch(&volume->resource, &src_row_pitch, &src_slice_pitch);
|
||||
|
||||
converted_mem = HeapAlloc(GetProcessHeap(), 0, dst_slice_pitch * depth);
|
||||
format->convert(data->addr, converted_mem, src_row_pitch, src_slice_pitch,
|
||||
@@ -607,7 +583,7 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
}
|
||||
else
|
||||
{
|
||||
- wined3d_volume_get_pitch(volume, &map_desc->row_pitch, &map_desc->slice_pitch);
|
||||
+ wined3d_resource_get_pitch(&volume->resource, &map_desc->row_pitch, &map_desc->slice_pitch);
|
||||
}
|
||||
|
||||
if (!box)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 8b2cdb2..a0b7681 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2276,6 +2276,7 @@ struct wined3d_resource
|
||||
UINT size;
|
||||
DWORD priority;
|
||||
void *heap_memory;
|
||||
+ UINT custom_row_pitch, custom_slice_pitch;
|
||||
struct list resource_list_entry;
|
||||
|
||||
void *parent;
|
||||
@@ -2303,6 +2304,8 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
|
||||
void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void wined3d_resource_free_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
+void wined3d_resource_get_pitch(const struct wined3d_resource *resource, UINT *row_pitch,
|
||||
+ UINT *slice_pitch) DECLSPEC_HIDDEN;
|
||||
GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN;
|
||||
GLenum wined3d_resource_gl_legacy_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN;
|
||||
BOOL wined3d_resource_is_offscreen(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
@@ -2438,7 +2441,6 @@ BOOL volume_prepare_system_memory(struct wined3d_volume *volume) DECLSPEC_HIDDEN
|
||||
HRESULT wined3d_volume_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc,
|
||||
unsigned int level, struct wined3d_volume **volume) DECLSPEC_HIDDEN;
|
||||
void wined3d_volume_destroy(struct wined3d_volume *volume) DECLSPEC_HIDDEN;
|
||||
-void wined3d_volume_get_pitch(const struct wined3d_volume *volume, UINT *row_pitch, UINT *slice_pitch) DECLSPEC_HIDDEN;
|
||||
void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *context,
|
||||
BOOL srgb_mode) DECLSPEC_HIDDEN;
|
||||
void wined3d_volume_invalidate_location(struct wined3d_volume *volume, DWORD location) DECLSPEC_HIDDEN;
|
||||
@@ -2491,7 +2493,6 @@ struct wined3d_surface
|
||||
|
||||
DWORD flags;
|
||||
|
||||
- UINT pitch;
|
||||
UINT pow2Width;
|
||||
UINT pow2Height;
|
||||
|
||||
--
|
||||
2.7.0
|
||||
|
@ -0,0 +1,250 @@
|
||||
From d26ecafd4c77d62749ea0fe0e7cb4a4cfbad2845 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 21 Feb 2016 23:34:42 +0100
|
||||
Subject: Revert "wined3d: Handle slice pitch and alignment as well in
|
||||
wined3d_format_calculate_pitch()."
|
||||
|
||||
This reverts commit a0beaa4006b0261587204fdecc08ba0bd941567d.
|
||||
---
|
||||
dlls/wined3d/directx.c | 6 +-----
|
||||
dlls/wined3d/surface.c | 29 +++++++++++++------------
|
||||
dlls/wined3d/texture.c | 25 +++++++++++++++++++--
|
||||
dlls/wined3d/utils.c | 49 +++++++++++++++++++++---------------------
|
||||
dlls/wined3d/wined3d_private.h | 3 +--
|
||||
5 files changed, 64 insertions(+), 48 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
|
||||
index 5f995ce..329da15 100644
|
||||
--- a/dlls/wined3d/directx.c
|
||||
+++ b/dlls/wined3d/directx.c
|
||||
@@ -4756,7 +4756,6 @@ UINT CDECL wined3d_calculate_format_pitch(const struct wined3d *wined3d, UINT ad
|
||||
enum wined3d_format_id format_id, UINT width)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
- unsigned int row_pitch, slice_pitch;
|
||||
|
||||
TRACE("wined3d %p, adapter_idx %u, format_id %s, width %u.\n",
|
||||
wined3d, adapter_idx, debug_d3dformat(format_id), width);
|
||||
@@ -4765,10 +4764,7 @@ UINT CDECL wined3d_calculate_format_pitch(const struct wined3d *wined3d, UINT ad
|
||||
return ~0u;
|
||||
|
||||
gl_info = &wined3d->adapters[adapter_idx].gl_info;
|
||||
- wined3d_format_calculate_pitch(wined3d_get_format(gl_info, format_id),
|
||||
- 1, width, 1, &row_pitch, &slice_pitch);
|
||||
-
|
||||
- return row_pitch;
|
||||
+ return wined3d_format_calculate_pitch(wined3d_get_format(gl_info, format_id), width);
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_check_device_format_conversion(const struct wined3d *wined3d, UINT adapter_idx,
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 4d11787..5182b29 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -1917,8 +1917,9 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface, const struc
|
||||
else
|
||||
{
|
||||
/* User memory surfaces don't have the regular surface alignment. */
|
||||
- wined3d_format_calculate_pitch(texture_resource->format, 1, width, height,
|
||||
- &surface->container->row_pitch, &surface->resource.size);
|
||||
+ surface->resource.size = wined3d_format_calculate_size(texture_resource->format,
|
||||
+ 1, width, height, 1);
|
||||
+ surface->container->row_pitch = wined3d_format_calculate_pitch(texture_resource->format, width);
|
||||
}
|
||||
|
||||
/* The format might be changed to a format that needs conversion.
|
||||
@@ -3806,7 +3807,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
|
||||
static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
struct wined3d_context *context, BOOL srgb)
|
||||
{
|
||||
- unsigned int width, src_row_pitch, src_slice_pitch, dst_row_pitch, dst_slice_pitch;
|
||||
+ unsigned int width, src_row_pitch, src_slice_pitch, dst_pitch;
|
||||
const RECT src_rect = {0, 0, surface->resource.width, surface->resource.height};
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
struct wined3d_device *device = surface->resource.device;
|
||||
@@ -3926,17 +3927,17 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
UINT height = surface->resource.height;
|
||||
|
||||
format.byte_count = format.conv_byte_count;
|
||||
- wined3d_format_calculate_pitch(&format, 1, width, height, &dst_row_pitch, &dst_slice_pitch);
|
||||
+ dst_pitch = wined3d_format_calculate_pitch(&format, width);
|
||||
|
||||
- if (!(mem = HeapAlloc(GetProcessHeap(), 0, dst_slice_pitch)))
|
||||
+ if (!(mem = HeapAlloc(GetProcessHeap(), 0, dst_pitch * height)))
|
||||
{
|
||||
- ERR("Out of memory (%u).\n", dst_slice_pitch);
|
||||
+ ERR("Out of memory (%u).\n", dst_pitch * height);
|
||||
context_release(context);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
format.convert(data.addr, mem, src_row_pitch, src_slice_pitch,
|
||||
- dst_row_pitch, dst_slice_pitch, width, height, 1);
|
||||
- src_row_pitch = dst_row_pitch;
|
||||
+ dst_pitch, dst_pitch * height, width, height, 1);
|
||||
+ src_row_pitch = dst_pitch;
|
||||
data.addr = mem;
|
||||
}
|
||||
else if (conversion)
|
||||
@@ -3945,20 +3946,20 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
struct wined3d_palette *palette = NULL;
|
||||
UINT height = surface->resource.height;
|
||||
|
||||
- wined3d_format_calculate_pitch(&format, device->surface_alignment,
|
||||
- width, height, &dst_row_pitch, &dst_slice_pitch);
|
||||
+ dst_pitch = wined3d_format_calculate_pitch(&format, width);
|
||||
+ dst_pitch = (dst_pitch + device->surface_alignment - 1) & ~(device->surface_alignment - 1);
|
||||
|
||||
- if (!(mem = HeapAlloc(GetProcessHeap(), 0, dst_slice_pitch)))
|
||||
+ if (!(mem = HeapAlloc(GetProcessHeap(), 0, dst_pitch * height)))
|
||||
{
|
||||
- ERR("Out of memory (%u).\n", dst_slice_pitch);
|
||||
+ ERR("Out of memory (%u).\n", dst_pitch * height);
|
||||
context_release(context);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
if (texture->swapchain && texture->swapchain->palette)
|
||||
palette = texture->swapchain->palette;
|
||||
- conversion->convert(data.addr, src_row_pitch, mem, dst_row_pitch,
|
||||
+ conversion->convert(data.addr, src_row_pitch, mem, dst_pitch,
|
||||
width, height, palette, &texture->async.gl_color_key);
|
||||
- src_row_pitch = dst_row_pitch;
|
||||
+ src_row_pitch = dst_pitch;
|
||||
data.addr = mem;
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 487b2ef..8fe6251 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -496,6 +496,8 @@ void CDECL wined3d_texture_get_pitch(const struct wined3d_texture *texture,
|
||||
unsigned int level, unsigned int *row_pitch, unsigned int *slice_pitch)
|
||||
{
|
||||
const struct wined3d_resource *resource = &texture->resource;
|
||||
+ const struct wined3d_format *format = resource->format;
|
||||
+ unsigned int alignment = resource->device->surface_alignment;
|
||||
unsigned int width = max(1, texture->resource.width >> level);
|
||||
unsigned int height = max(1, texture->resource.height >> level);
|
||||
|
||||
@@ -506,8 +508,27 @@ void CDECL wined3d_texture_get_pitch(const struct wined3d_texture *texture,
|
||||
return;
|
||||
}
|
||||
|
||||
- wined3d_format_calculate_pitch(resource->format, resource->device->surface_alignment,
|
||||
- width, height, row_pitch, slice_pitch);
|
||||
+ if (resource->format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_BLOCKS)
|
||||
+ {
|
||||
+ unsigned int row_block_count = (width + format->block_width - 1) / format->block_width;
|
||||
+ unsigned int slice_block_count = (height + format->block_height - 1) / format->block_height;
|
||||
+ *row_pitch = row_block_count * format->block_byte_count;
|
||||
+ *row_pitch = (*row_pitch + alignment - 1) & ~(alignment - 1);
|
||||
+ *slice_pitch = *row_pitch * slice_block_count;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ *row_pitch = format->byte_count * width; /* Bytes / row */
|
||||
+ *row_pitch = (*row_pitch + alignment - 1) & ~(alignment - 1);
|
||||
+ *slice_pitch = *row_pitch * height;
|
||||
+ }
|
||||
+
|
||||
+ if (format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_HEIGHT_SCALE)
|
||||
+ {
|
||||
+ /* The D3D format requirements make sure that the resulting format is an integer again */
|
||||
+ *slice_pitch *= format->height_scale.numerator;
|
||||
+ *slice_pitch /= format->height_scale.denominator;
|
||||
+ }
|
||||
}
|
||||
|
||||
DWORD CDECL wined3d_texture_set_lod(struct wined3d_texture *texture, DWORD lod)
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index b52b967..81fb262 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -3199,47 +3199,46 @@ const struct wined3d_format *wined3d_get_format(const struct wined3d_gl_info *gl
|
||||
return &gl_info->formats[idx];
|
||||
}
|
||||
|
||||
-void wined3d_format_calculate_pitch(const struct wined3d_format *format, unsigned int alignment,
|
||||
- unsigned int width, unsigned int height, unsigned int *row_pitch, unsigned int *slice_pitch)
|
||||
+UINT wined3d_format_calculate_pitch(const struct wined3d_format *format, UINT width)
|
||||
{
|
||||
/* For block based formats, pitch means the amount of bytes to the next
|
||||
* row of blocks rather than the next row of pixels. */
|
||||
if (format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_BLOCKS)
|
||||
+ return format->block_byte_count * ((width + format->block_width - 1) / format->block_width);
|
||||
+
|
||||
+ return format->byte_count * width;
|
||||
+}
|
||||
+
|
||||
+UINT wined3d_format_calculate_size(const struct wined3d_format *format, UINT alignment,
|
||||
+ UINT width, UINT height, UINT depth)
|
||||
+{
|
||||
+ UINT pitch = wined3d_format_calculate_pitch(format, width);
|
||||
+ UINT size;
|
||||
+
|
||||
+ if (format->id == WINED3DFMT_UNKNOWN)
|
||||
+ {
|
||||
+ size = 0;
|
||||
+ }
|
||||
+ else if (format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_BLOCKS)
|
||||
{
|
||||
- unsigned int row_block_count = (width + format->block_width - 1) / format->block_width;
|
||||
- unsigned int slice_block_count = (height + format->block_height - 1) / format->block_height;
|
||||
- *row_pitch = row_block_count * format->block_byte_count;
|
||||
- *row_pitch = (*row_pitch + alignment - 1) & ~(alignment - 1);
|
||||
- *slice_pitch = *row_pitch * slice_block_count;
|
||||
+ UINT row_count = (height + format->block_height - 1) / format->block_height;
|
||||
+ size = row_count * ((pitch + alignment - 1) & ~(alignment - 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
- *row_pitch = format->byte_count * width; /* Bytes / row */
|
||||
- *row_pitch = (*row_pitch + alignment - 1) & ~(alignment - 1);
|
||||
- *slice_pitch = *row_pitch * height;
|
||||
+ size = height * ((pitch + alignment - 1) & ~(alignment - 1));
|
||||
}
|
||||
|
||||
if (format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_HEIGHT_SCALE)
|
||||
{
|
||||
/* The D3D format requirements make sure that the resulting format is an integer again */
|
||||
- *slice_pitch *= format->height_scale.numerator;
|
||||
- *slice_pitch /= format->height_scale.denominator;
|
||||
+ size *= format->height_scale.numerator;
|
||||
+ size /= format->height_scale.denominator;
|
||||
}
|
||||
|
||||
- TRACE("Returning row pitch %u, slice pitch %u.\n", *row_pitch, *slice_pitch);
|
||||
-}
|
||||
-
|
||||
-UINT wined3d_format_calculate_size(const struct wined3d_format *format, UINT alignment,
|
||||
- UINT width, UINT height, UINT depth)
|
||||
-{
|
||||
- unsigned int row_pitch, slice_pitch;
|
||||
+ size *= depth;
|
||||
|
||||
- if (format->id == WINED3DFMT_UNKNOWN)
|
||||
- return 0;
|
||||
-
|
||||
- wined3d_format_calculate_pitch(format, alignment, width, height, &row_pitch, &slice_pitch);
|
||||
-
|
||||
- return slice_pitch * depth;
|
||||
+ return size;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 3433ae1..712267c 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3347,8 +3347,7 @@ struct wined3d_format
|
||||
|
||||
const struct wined3d_format *wined3d_get_format(const struct wined3d_gl_info *gl_info,
|
||||
enum wined3d_format_id format_id) DECLSPEC_HIDDEN;
|
||||
-void wined3d_format_calculate_pitch(const struct wined3d_format *format, unsigned int alignment,
|
||||
- unsigned int width, unsigned int height, unsigned int *row_pitch, unsigned int *slice_pitch) DECLSPEC_HIDDEN;
|
||||
+UINT wined3d_format_calculate_pitch(const struct wined3d_format *format, UINT width) DECLSPEC_HIDDEN;
|
||||
UINT wined3d_format_calculate_size(const struct wined3d_format *format,
|
||||
UINT alignment, UINT width, UINT height, UINT depth) DECLSPEC_HIDDEN;
|
||||
DWORD wined3d_format_convert_from_float(const struct wined3d_surface *surface,
|
||||
--
|
||||
2.7.1
|
||||
|
@ -1,33 +1,22 @@
|
||||
From c40334a562447ca292f9699a1d3b2b725a78c844 Mon Sep 17 00:00:00 2001
|
||||
From ced9d2e5e64407781a03c6e3e619fc36ecee4d45 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 10 Feb 2016 02:05:11 +0100
|
||||
Subject: Revert "wined3d: Store custom pitches in the texture instead of the
|
||||
surface."
|
||||
|
||||
This reverts commit 195d16c8267fcd5085048b3513571e2fee0eb548.
|
||||
This partially reverts commit 195d16c8267fcd5085048b3513571e2fee0eb548.
|
||||
---
|
||||
dlls/wined3d/surface.c | 14 ++++++++------
|
||||
dlls/wined3d/texture.c | 3 +--
|
||||
dlls/wined3d/wined3d_private.h | 4 ++--
|
||||
3 files changed, 11 insertions(+), 10 deletions(-)
|
||||
dlls/wined3d/surface.c | 10 ++++++----
|
||||
dlls/wined3d/texture.c | 2 +-
|
||||
dlls/wined3d/wined3d_private.h | 3 ++-
|
||||
3 files changed, 9 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 665af4a..65e07c5 100644
|
||||
index 5182b29..0a8509c 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -1897,8 +1897,8 @@ DWORD CDECL wined3d_surface_get_pitch(const struct wined3d_surface *surface)
|
||||
|
||||
TRACE("surface %p.\n", surface);
|
||||
|
||||
- if (surface->container->row_pitch)
|
||||
- return surface->container->row_pitch;
|
||||
+ if (surface->pitch)
|
||||
+ return surface->pitch;
|
||||
|
||||
alignment = surface->resource.device->surface_alignment;
|
||||
pitch = wined3d_format_calculate_pitch(surface->resource.format, surface->resource.width);
|
||||
@@ -1909,7 +1909,8 @@ DWORD CDECL wined3d_surface_get_pitch(const struct wined3d_surface *surface)
|
||||
return pitch;
|
||||
@@ -1863,7 +1863,8 @@ static inline unsigned short float_32_to_16(const float *in)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info)
|
||||
@ -36,7 +25,7 @@ index 665af4a..65e07c5 100644
|
||||
{
|
||||
struct wined3d_resource *texture_resource = &surface->container->resource;
|
||||
unsigned int width, height;
|
||||
@@ -1958,19 +1959,20 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface, const struc
|
||||
@@ -1907,19 +1908,20 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface, const struc
|
||||
surface->resource.map_binding = WINED3D_LOCATION_USER_MEMORY;
|
||||
valid_location = WINED3D_LOCATION_USER_MEMORY;
|
||||
}
|
||||
@ -61,14 +50,12 @@ index 665af4a..65e07c5 100644
|
||||
|
||||
/* The format might be changed to a format that needs conversion.
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 0a084de..4ded4ca 100644
|
||||
index 8fe6251..f0ed152 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -645,9 +645,8 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
texture->resource.height = height;
|
||||
|
||||
texture->user_memory = mem;
|
||||
- texture->row_pitch = pitch;
|
||||
@@ -684,7 +684,7 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
&& !gl_info->supported[ARB_TEXTURE_RECTANGLE] && !gl_info->supported[WINED3D_GL_NORMALIZED_TEXRECT])
|
||||
texture->flags |= WINED3D_TEXTURE_COND_NP2_EMULATED;
|
||||
|
||||
- return wined3d_surface_update_desc(surface, gl_info);
|
||||
+ return wined3d_surface_update_desc(surface, gl_info, pitch);
|
||||
@ -76,18 +63,10 @@ index 0a084de..4ded4ca 100644
|
||||
|
||||
void wined3d_texture_prepare_texture(struct wined3d_texture *texture, struct wined3d_context *context, BOOL srgb)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 3fadff6..2ff3b99 100644
|
||||
index 712267c..1cf309c 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2365,7 +2365,6 @@ struct wined3d_texture
|
||||
GLenum target;
|
||||
|
||||
void *user_memory;
|
||||
- unsigned int row_pitch;
|
||||
|
||||
/* May only be accessed from the command stream worker thread. */
|
||||
struct wined3d_texture_async
|
||||
@@ -2493,6 +2492,7 @@ struct wined3d_surface
|
||||
@@ -2498,6 +2498,7 @@ struct wined3d_surface
|
||||
|
||||
DWORD flags;
|
||||
|
||||
@ -95,7 +74,7 @@ index 3fadff6..2ff3b99 100644
|
||||
UINT pow2Width;
|
||||
UINT pow2Height;
|
||||
|
||||
@@ -2570,7 +2570,7 @@ void surface_set_texture_target(struct wined3d_surface *surface, GLenum target,
|
||||
@@ -2575,7 +2576,7 @@ void surface_set_texture_target(struct wined3d_surface *surface, GLenum target,
|
||||
void surface_translate_drawable_coords(const struct wined3d_surface *surface, HWND window, RECT *rect) DECLSPEC_HIDDEN;
|
||||
HRESULT wined3d_surface_unmap(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
@ -105,5 +84,5 @@ index 3fadff6..2ff3b99 100644
|
||||
struct wined3d_surface *src_surface, const RECT *src_rect) DECLSPEC_HIDDEN;
|
||||
void surface_validate_location(struct wined3d_surface *surface, DWORD location) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.7.0
|
||||
2.7.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 351ce90ef3980bf24e295982bc4046708255ad1e Mon Sep 17 00:00:00 2001
|
||||
From adf0f2d92cb2c1711518bf519c1c96fb64ceef5a Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 10 Feb 2016 02:05:20 +0100
|
||||
Subject: Revert "wined3d: Store the "user_memory" pointer in the texture
|
||||
@ -7,12 +7,12 @@ Subject: Revert "wined3d: Store the "user_memory" pointer in the texture
|
||||
This reverts commit 77088e3faaded7f583903102240b9a2879a42fe8.
|
||||
---
|
||||
dlls/wined3d/surface.c | 10 +++++-----
|
||||
dlls/wined3d/texture.c | 4 +---
|
||||
dlls/wined3d/wined3d_private.h | 5 ++---
|
||||
3 files changed, 8 insertions(+), 11 deletions(-)
|
||||
dlls/wined3d/texture.c | 3 +--
|
||||
dlls/wined3d/wined3d_private.h | 4 ++--
|
||||
3 files changed, 8 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 65e07c5..65cb3b7 100644
|
||||
index cdbb2be..0be82ff 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -488,7 +488,7 @@ static void surface_get_memory(const struct wined3d_surface *surface, struct win
|
||||
@ -33,7 +33,7 @@ index 65e07c5..65cb3b7 100644
|
||||
ERR("Map binding is set to WINED3D_LOCATION_USER_MEMORY but surface->user_memory is NULL.\n");
|
||||
break;
|
||||
|
||||
@@ -1910,7 +1910,7 @@ DWORD CDECL wined3d_surface_get_pitch(const struct wined3d_surface *surface)
|
||||
@@ -1897,7 +1897,7 @@ DWORD wined3d_surface_get_pitch(const struct wined3d_surface *surface)
|
||||
}
|
||||
|
||||
HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
@ -42,16 +42,16 @@ index 65e07c5..65cb3b7 100644
|
||||
{
|
||||
struct wined3d_resource *texture_resource = &surface->container->resource;
|
||||
unsigned int width, height;
|
||||
@@ -1954,7 +1954,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
else
|
||||
surface->flags &= ~SFLAG_NONPOW2;
|
||||
@@ -1936,7 +1936,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
surface->pow2Height <<= 1;
|
||||
}
|
||||
|
||||
- if (surface->container->user_memory)
|
||||
+ if ((surface->user_memory = mem))
|
||||
{
|
||||
surface->resource.map_binding = WINED3D_LOCATION_USER_MEMORY;
|
||||
valid_location = WINED3D_LOCATION_USER_MEMORY;
|
||||
@@ -2567,7 +2567,7 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
@@ -2549,7 +2549,7 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
break;
|
||||
|
||||
case WINED3D_LOCATION_USER_MEMORY:
|
||||
@ -61,34 +61,39 @@ index 65e07c5..65cb3b7 100644
|
||||
|
||||
case WINED3D_LOCATION_DIB:
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 4ded4ca..0c48c91 100644
|
||||
index e1786c9..ea04663 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -644,9 +644,7 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
@@ -685,7 +685,6 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
texture->resource.width = width;
|
||||
texture->resource.height = height;
|
||||
|
||||
- texture->user_memory = mem;
|
||||
-
|
||||
texture->row_pitch = pitch;
|
||||
|
||||
texture->flags &= ~WINED3D_TEXTURE_COND_NP2_EMULATED;
|
||||
@@ -693,7 +692,7 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
&& !gl_info->supported[ARB_TEXTURE_RECTANGLE] && !gl_info->supported[WINED3D_GL_NORMALIZED_TEXRECT])
|
||||
texture->flags |= WINED3D_TEXTURE_COND_NP2_EMULATED;
|
||||
|
||||
- return wined3d_surface_update_desc(surface, gl_info, pitch);
|
||||
+ return wined3d_surface_update_desc(surface, gl_info, mem, pitch);
|
||||
}
|
||||
|
||||
void wined3d_texture_prepare_texture(struct wined3d_texture *texture, struct wined3d_context *context, BOOL srgb)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 2ff3b99..8b2cdb2 100644
|
||||
index c486c92..a7ba298 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2364,8 +2364,6 @@ struct wined3d_texture
|
||||
@@ -2366,7 +2366,6 @@ struct wined3d_texture
|
||||
DWORD flags;
|
||||
GLenum target;
|
||||
|
||||
- void *user_memory;
|
||||
-
|
||||
unsigned int row_pitch;
|
||||
|
||||
/* May only be accessed from the command stream worker thread. */
|
||||
struct wined3d_texture_async
|
||||
{
|
||||
@@ -2488,6 +2486,7 @@ struct wined3d_surface
|
||||
@@ -2491,6 +2490,7 @@ struct wined3d_surface
|
||||
struct wined3d_resource resource;
|
||||
const struct wined3d_surface_ops *surface_ops;
|
||||
struct wined3d_texture *container;
|
||||
@ -96,7 +101,7 @@ index 2ff3b99..8b2cdb2 100644
|
||||
DWORD locations;
|
||||
|
||||
DWORD flags;
|
||||
@@ -2570,7 +2569,7 @@ void surface_set_texture_target(struct wined3d_surface *surface, GLenum target,
|
||||
@@ -2574,7 +2574,7 @@ void surface_set_texture_target(struct wined3d_surface *surface, GLenum target,
|
||||
void surface_translate_drawable_coords(const struct wined3d_surface *surface, HWND window, RECT *rect) DECLSPEC_HIDDEN;
|
||||
HRESULT wined3d_surface_unmap(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
@ -106,5 +111,5 @@ index 2ff3b99..8b2cdb2 100644
|
||||
struct wined3d_surface *src_surface, const RECT *src_rect) DECLSPEC_HIDDEN;
|
||||
void surface_validate_location(struct wined3d_surface *surface, DWORD location) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.7.0
|
||||
2.7.1
|
||||
|
@ -0,0 +1,195 @@
|
||||
From 2d4d9e65962f93d9aabea0aa891cc95fa1b8ccdc 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 | 22 +++++++++++-----------
|
||||
dlls/wined3d/texture.c | 2 +-
|
||||
dlls/wined3d/volume.c | 2 +-
|
||||
dlls/wined3d/wined3d_private.h | 4 +++-
|
||||
5 files changed, 47 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index 44cdb43..ed598cc 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -440,3 +440,34 @@ void wined3d_resource_update_draw_binding(struct wined3d_resource *resource)
|
||||
else
|
||||
resource->draw_binding = WINED3D_LOCATION_TEXTURE_RGB;
|
||||
}
|
||||
+
|
||||
+void wined3d_resource_get_pitch(const struct wined3d_resource *resource, UINT *row_pitch,
|
||||
+ UINT *slice_pitch)
|
||||
+{
|
||||
+ unsigned int alignment;
|
||||
+ const struct wined3d_format *format = resource->format;
|
||||
+
|
||||
+ if (resource->custom_row_pitch)
|
||||
+ {
|
||||
+ *row_pitch = resource->custom_row_pitch;
|
||||
+ *slice_pitch = resource->custom_slice_pitch;
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ alignment = resource->device->surface_alignment;
|
||||
+ *row_pitch = wined3d_format_calculate_pitch(resource->format, resource->width);
|
||||
+ *row_pitch = (*row_pitch + alignment - 1) & ~(alignment - 1);
|
||||
+ if (format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_BLOCKS)
|
||||
+ {
|
||||
+ /* Since compressed formats are block based, pitch means the amount of
|
||||
+ * bytes to the next row of block rather than the next row of pixels. */
|
||||
+ UINT slice_block_count = (resource->height + format->block_height - 1) / format->block_height;
|
||||
+ *slice_pitch = *row_pitch * slice_block_count;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ *slice_pitch = *row_pitch * resource->height;
|
||||
+ }
|
||||
+
|
||||
+ 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 aff6162..418efa3 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -395,7 +395,7 @@ HRESULT surface_create_dib_section(struct wined3d_surface *surface)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
b_info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
||||
- wined3d_texture_get_pitch(surface->container, surface->texture_level, &row_pitch, &slice_pitch);
|
||||
+ wined3d_resource_get_pitch(&surface->resource, &row_pitch, &slice_pitch);
|
||||
b_info->bmiHeader.biWidth = row_pitch / format->byte_count;
|
||||
b_info->bmiHeader.biHeight = 0 - surface->resource.height;
|
||||
b_info->bmiHeader.biSizeImage = slice_pitch;
|
||||
@@ -1319,7 +1319,7 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
|
||||
{
|
||||
unsigned char alignment = surface->resource.device->surface_alignment;
|
||||
src_pitch = format->byte_count * surface->pow2Width;
|
||||
- wined3d_texture_get_pitch(surface->container, surface->texture_level, &dst_row_pitch, &dst_slice_pitch);
|
||||
+ wined3d_resource_get_pitch(&surface->resource, &dst_row_pitch, &dst_slice_pitch);
|
||||
src_pitch = (src_pitch + alignment - 1) & ~(alignment - 1);
|
||||
mem = HeapAlloc(GetProcessHeap(), 0, src_pitch * surface->pow2Height);
|
||||
}
|
||||
@@ -1667,7 +1667,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
|
||||
|
||||
surface_get_memory(src_surface, &data, src_surface->locations);
|
||||
- wined3d_texture_get_pitch(src_surface->container, src_surface->texture_level, &src_row_pitch, &src_slice_pitch);
|
||||
+ wined3d_resource_get_pitch(&src_surface->resource, &src_row_pitch, &src_slice_pitch);
|
||||
|
||||
wined3d_surface_upload_data(dst_surface, gl_info, src_format, src_rect,
|
||||
src_row_pitch, dst_point, FALSE, wined3d_const_bo_address(&data));
|
||||
@@ -1908,20 +1908,21 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
surface->resource.map_binding = WINED3D_LOCATION_USER_MEMORY;
|
||||
valid_location = WINED3D_LOCATION_USER_MEMORY;
|
||||
}
|
||||
- surface->pitch = pitch;
|
||||
+ surface->resource.custom_row_pitch = pitch;
|
||||
+ surface->resource.custom_slice_pitch = pitch * surface->resource.height;
|
||||
surface->resource.format = texture_resource->format;
|
||||
surface->resource.multisample_type = texture_resource->multisample_type;
|
||||
surface->resource.multisample_quality = texture_resource->multisample_quality;
|
||||
- if (surface->pitch)
|
||||
+ if (surface->resource.custom_row_pitch)
|
||||
{
|
||||
- surface->resource.size = height * surface->pitch;
|
||||
+ surface->resource.size = height * surface->resource.custom_row_pitch;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* User memory surfaces don't have the regular surface alignment. */
|
||||
surface->resource.size = wined3d_format_calculate_size(texture_resource->format,
|
||||
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);
|
||||
}
|
||||
|
||||
/* The format might be changed to a format that needs conversion.
|
||||
@@ -2547,8 +2548,7 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
}
|
||||
else
|
||||
{
|
||||
- wined3d_texture_get_pitch(surface->container, surface->texture_level,
|
||||
- &map_desc->row_pitch, &map_desc->slice_pitch);
|
||||
+ wined3d_resource_get_pitch(&surface->resource, &map_desc->row_pitch, &map_desc->slice_pitch);
|
||||
}
|
||||
|
||||
if (!box)
|
||||
@@ -2640,7 +2640,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
|
||||
checkGLcall("glBindBuffer");
|
||||
}
|
||||
|
||||
- wined3d_texture_get_pitch(surface->container, surface->texture_level, &row_pitch, &slice_pitch);
|
||||
+ wined3d_resource_get_pitch(&surface->resource, &row_pitch, &slice_pitch);
|
||||
|
||||
/* Setup pixel store pack state -- to glReadPixels into the correct place */
|
||||
gl_info->gl_ops.gl.p_glPixelStorei(GL_PACK_ROW_LENGTH, row_pitch / surface->resource.format->byte_count);
|
||||
@@ -3897,7 +3897,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
|
||||
wined3d_texture_prepare_texture(texture, context, srgb);
|
||||
wined3d_texture_bind_and_dirtify(texture, context, srgb);
|
||||
- wined3d_texture_get_pitch(texture, surface->texture_level, &src_row_pitch, &src_slice_pitch);
|
||||
+ wined3d_resource_get_pitch(&surface->resource, &src_row_pitch, &src_slice_pitch);
|
||||
|
||||
width = surface->resource.width;
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index a443b5d..cb7ae9c 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1180,7 +1180,7 @@ static void texture3d_sub_resource_upload_data(struct wined3d_resource *sub_reso
|
||||
struct wined3d_const_bo_address addr;
|
||||
unsigned int row_pitch, slice_pitch;
|
||||
|
||||
- wined3d_texture_get_pitch(volume->container, volume->texture_level, &row_pitch, &slice_pitch);
|
||||
+ wined3d_resource_get_pitch(sub_resource, &row_pitch, &slice_pitch);
|
||||
if (row_pitch != data->row_pitch || slice_pitch != data->slice_pitch)
|
||||
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 75585d8..d97db80 100644
|
||||
--- a/dlls/wined3d/volume.c
|
||||
+++ b/dlls/wined3d/volume.c
|
||||
@@ -71,7 +71,7 @@ void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wine
|
||||
dst_row_pitch = width * format->conv_byte_count;
|
||||
dst_slice_pitch = dst_row_pitch * height;
|
||||
|
||||
- wined3d_texture_get_pitch(volume->container, volume->texture_level, &src_row_pitch, &src_slice_pitch);
|
||||
+ wined3d_resource_get_pitch(&volume->resource, &src_row_pitch, &src_slice_pitch);
|
||||
|
||||
converted_mem = HeapAlloc(GetProcessHeap(), 0, dst_slice_pitch * depth);
|
||||
format->convert(data->addr, converted_mem, src_row_pitch, src_slice_pitch,
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 1dc499e..90a489e 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2277,6 +2277,7 @@ struct wined3d_resource
|
||||
UINT size;
|
||||
DWORD priority;
|
||||
void *heap_memory;
|
||||
+ UINT custom_row_pitch, custom_slice_pitch;
|
||||
struct list resource_list_entry;
|
||||
|
||||
void *parent;
|
||||
@@ -2304,6 +2305,8 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
|
||||
void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void wined3d_resource_free_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
+void wined3d_resource_get_pitch(const struct wined3d_resource *resource, UINT *row_pitch,
|
||||
+ UINT *slice_pitch) DECLSPEC_HIDDEN;
|
||||
GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN;
|
||||
GLenum wined3d_resource_gl_legacy_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN;
|
||||
BOOL wined3d_resource_is_offscreen(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
@@ -2498,7 +2501,6 @@ struct wined3d_surface
|
||||
|
||||
DWORD flags;
|
||||
|
||||
- UINT pitch;
|
||||
UINT pow2Width;
|
||||
UINT pow2Height;
|
||||
|
||||
--
|
||||
2.7.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 00f61862ec59e32534adfabc359009143a9b9651 Mon Sep 17 00:00:00 2001
|
||||
From 5b4915863af63b0df11c80611d327820f63f5d0b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 16 Jan 2014 22:04:55 +0100
|
||||
Subject: wined3d: Move bitmap_data and user_memory into the resource.
|
||||
@ -11,7 +11,7 @@ I may want to change this to keep this in the surface. Not sure yet.
|
||||
3 files changed, 17 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index ad9310a..65eefa9 100644
|
||||
index 79be75f..ad15f4a 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -88,7 +88,7 @@ static void surface_cleanup(struct wined3d_surface *surface)
|
||||
@ -23,7 +23,7 @@ index ad9310a..65eefa9 100644
|
||||
}
|
||||
|
||||
if (surface->overlay_dest)
|
||||
@@ -456,7 +456,7 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
|
||||
@@ -456,7 +456,7 @@ HRESULT surface_create_dib_section(struct wined3d_surface *surface)
|
||||
TRACE("Creating a DIB section with size %dx%dx%d, size=%d.\n",
|
||||
b_info->bmiHeader.biWidth, b_info->bmiHeader.biHeight,
|
||||
b_info->bmiHeader.biBitCount, b_info->bmiHeader.biSizeImage);
|
||||
@ -32,7 +32,7 @@ index ad9310a..65eefa9 100644
|
||||
|
||||
if (!surface->dib.DIBsection)
|
||||
{
|
||||
@@ -465,7 +465,7 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
|
||||
@@ -465,7 +465,7 @@ HRESULT surface_create_dib_section(struct wined3d_surface *surface)
|
||||
return HRESULT_FROM_WIN32(GetLastError());
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ index ad9310a..65eefa9 100644
|
||||
break;
|
||||
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
@@ -2100,7 +2100,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
@@ -1914,7 +1914,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
{
|
||||
DeleteDC(surface->hDC);
|
||||
DeleteObject(surface->dib.DIBsection);
|
||||
@ -84,16 +84,16 @@ index ad9310a..65eefa9 100644
|
||||
surface->flags &= ~SFLAG_DIBSECTION;
|
||||
create_dib = TRUE;
|
||||
}
|
||||
@@ -2132,7 +2132,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
else
|
||||
surface->flags &= ~SFLAG_NONPOW2;
|
||||
@@ -1941,7 +1941,7 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
surface->pow2Height <<= 1;
|
||||
}
|
||||
|
||||
- if ((surface->user_memory = mem))
|
||||
+ if ((surface->resource.user_memory = mem))
|
||||
{
|
||||
surface->resource.map_binding = WINED3D_LOCATION_USER_MEMORY;
|
||||
valid_location = WINED3D_LOCATION_USER_MEMORY;
|
||||
@@ -2750,11 +2750,11 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
|
||||
@@ -2555,11 +2555,11 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
break;
|
||||
|
||||
case WINED3D_LOCATION_USER_MEMORY:
|
||||
@ -108,10 +108,10 @@ index ad9310a..65eefa9 100644
|
||||
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index 4f6be9e..d0b8cf0 100644
|
||||
index 41cd400..3ca22cf 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -666,9 +666,9 @@ static void swapchain_gdi_present(struct wined3d_swapchain *swapchain, const REC
|
||||
@@ -680,9 +680,9 @@ static void swapchain_gdi_present(struct wined3d_swapchain *swapchain, const REC
|
||||
{
|
||||
void *tmp;
|
||||
|
||||
@ -125,10 +125,10 @@ index 4f6be9e..d0b8cf0 100644
|
||||
if (front->resource.heap_memory)
|
||||
ERR("GDI Surface %p has heap memory allocated.\n", front);
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 9d2e40a..3776439 100644
|
||||
index e7c872d..861057d 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2164,7 +2164,7 @@ struct wined3d_resource
|
||||
@@ -2277,7 +2277,7 @@ struct wined3d_resource
|
||||
UINT depth;
|
||||
UINT size;
|
||||
DWORD priority;
|
||||
@ -137,7 +137,7 @@ index 9d2e40a..3776439 100644
|
||||
UINT custom_row_pitch, custom_slice_pitch;
|
||||
struct list resource_list_entry;
|
||||
DWORD locations;
|
||||
@@ -2343,7 +2343,6 @@ void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wine
|
||||
@@ -2459,7 +2459,6 @@ void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wine
|
||||
struct wined3d_surface_dib
|
||||
{
|
||||
HBITMAP DIBsection;
|
||||
@ -145,7 +145,7 @@ index 9d2e40a..3776439 100644
|
||||
UINT bitmap_size;
|
||||
};
|
||||
|
||||
@@ -2377,7 +2376,6 @@ struct wined3d_surface
|
||||
@@ -2493,7 +2492,6 @@ struct wined3d_surface
|
||||
struct wined3d_resource resource;
|
||||
const struct wined3d_surface_ops *surface_ops;
|
||||
struct wined3d_texture *container;
|
||||
@ -154,5 +154,5 @@ index 9d2e40a..3776439 100644
|
||||
DWORD flags;
|
||||
|
||||
--
|
||||
2.5.1
|
||||
2.7.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From cfcfa390db417008fc6824074bc396e0cfa85190 Mon Sep 17 00:00:00 2001
|
||||
From 161bf2744824c3f842c714ebabaee433ef4f58f9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 21 Jan 2014 13:30:59 +0100
|
||||
Subject: wined3d: Use resource buffer mapping facilities in surfaces.
|
||||
@ -35,10 +35,10 @@ index 98653cd..3d5b574 100644
|
||||
|
||||
default:
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 043e257..9b96625 100644
|
||||
index c9cd137..44e0b33 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -692,36 +692,10 @@ static HRESULT surface_private_setup(struct wined3d_surface *surface)
|
||||
@@ -686,36 +686,10 @@ static HRESULT surface_private_setup(struct wined3d_surface *surface)
|
||||
|
||||
static void surface_unmap(struct wined3d_surface *surface)
|
||||
{
|
||||
@ -75,7 +75,7 @@ index 043e257..9b96625 100644
|
||||
if (surface->resource.locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_TEXTURE_RGB))
|
||||
{
|
||||
TRACE("Not dirtified, nothing to do.\n");
|
||||
@@ -2585,6 +2559,8 @@ do { \
|
||||
@@ -2451,6 +2425,8 @@ do { \
|
||||
|
||||
HRESULT wined3d_surface_unmap(struct wined3d_surface *surface)
|
||||
{
|
||||
@ -84,7 +84,7 @@ index 043e257..9b96625 100644
|
||||
TRACE("surface %p.\n", surface);
|
||||
|
||||
if (!surface->resource.map_count)
|
||||
@@ -2594,6 +2570,12 @@ HRESULT wined3d_surface_unmap(struct wined3d_surface *surface)
|
||||
@@ -2460,6 +2436,12 @@ HRESULT wined3d_surface_unmap(struct wined3d_surface *surface)
|
||||
}
|
||||
--surface->resource.map_count;
|
||||
|
||||
@ -97,7 +97,7 @@ index 043e257..9b96625 100644
|
||||
surface->surface_ops->surface_unmap(surface);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2605,8 +2587,7 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
@@ -2471,8 +2453,7 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
const struct wined3d_format *format = surface->resource.format;
|
||||
unsigned int fmt_flags = surface->container->resource.format_flags;
|
||||
struct wined3d_device *device = surface->resource.device;
|
||||
@ -107,7 +107,7 @@ index 043e257..9b96625 100644
|
||||
BYTE *base_memory;
|
||||
|
||||
TRACE("surface %p, map_desc %p, box %s, flags %#x.\n",
|
||||
@@ -2648,6 +2629,9 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
@@ -2514,6 +2495,9 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
}
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ index 043e257..9b96625 100644
|
||||
surface_prepare_map_memory(surface);
|
||||
if (flags & WINED3D_MAP_DISCARD)
|
||||
{
|
||||
@@ -2657,51 +2641,19 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
@@ -2523,51 +2507,19 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -171,7 +171,7 @@ index 043e257..9b96625 100644
|
||||
+ context_release(context);
|
||||
|
||||
if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH)
|
||||
map_desc->row_pitch = surface->resource.width * format->byte_count;
|
||||
{
|
||||
--
|
||||
2.7.0
|
||||
2.7.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 4fbfd7b2bbc5f5dd3b99653d223214901597cbad Mon Sep 17 00:00:00 2001
|
||||
From e8985a5e88de72812ad04d0ef8ce053b026c0445 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Mon, 16 Sep 2013 22:44:33 +0200
|
||||
Subject: wined3d: Introduce a function to retrieve resource memory.
|
||||
@ -10,10 +10,10 @@ Subject: wined3d: Introduce a function to retrieve resource memory.
|
||||
3 files changed, 38 insertions(+), 39 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index b756bf1..40267e7 100644
|
||||
index 8a0ac37..01070a6 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -506,6 +506,36 @@ DWORD wined3d_resource_access_from_location(DWORD location)
|
||||
@@ -532,6 +532,36 @@ DWORD wined3d_resource_access_from_location(DWORD location)
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,10 +51,10 @@ index b756bf1..40267e7 100644
|
||||
void wined3d_resource_load_location(struct wined3d_resource *resource,
|
||||
struct wined3d_context *context, DWORD location)
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 2abc494..857c620 100644
|
||||
index fe657ed..6fa0e10 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -479,39 +479,6 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
|
||||
@@ -479,39 +479,6 @@ HRESULT surface_create_dib_section(struct wined3d_surface *surface)
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ index 2abc494..857c620 100644
|
||||
static void surface_prepare_buffer(struct wined3d_surface *surface)
|
||||
{
|
||||
struct wined3d_context *context;
|
||||
@@ -1265,7 +1232,7 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
|
||||
@@ -1263,7 +1230,7 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
|
||||
return;
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ index 2abc494..857c620 100644
|
||||
|
||||
if (surface->container->resource.format_flags & WINED3DFMT_FLAG_COMPRESSED)
|
||||
{
|
||||
@@ -1641,7 +1608,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -1645,7 +1612,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
wined3d_resource_load_location(&dst_surface->resource, context, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE);
|
||||
|
||||
@ -112,16 +112,16 @@ index 2abc494..857c620 100644
|
||||
wined3d_resource_get_pitch(&src_surface->resource, &src_row_pitch, &src_slice_pitch);
|
||||
|
||||
wined3d_surface_upload_data(dst_surface, gl_info, src_format, src_rect,
|
||||
@@ -2831,7 +2798,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
|
||||
@@ -2562,7 +2529,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
|
||||
BOOL srcIsUpsideDown;
|
||||
struct wined3d_bo_address data;
|
||||
DWORD slice_pitch, pitch;
|
||||
|
||||
- surface_get_memory(surface, &data, dst_location);
|
||||
+ wined3d_resource_get_memory(&surface->resource, dst_location, &data);
|
||||
|
||||
if (surface != old_ctx->current_rt)
|
||||
{
|
||||
@@ -3881,8 +3848,8 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
|
||||
@@ -3642,8 +3609,8 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD
|
||||
struct wined3d_bo_address dst, src;
|
||||
UINT size = surface->resource.size;
|
||||
|
||||
@ -132,7 +132,7 @@ index 2abc494..857c620 100644
|
||||
|
||||
if (dst.buffer_object)
|
||||
{
|
||||
@@ -4094,7 +4061,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -3855,7 +3822,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
surface_remove_pbo(surface, gl_info);
|
||||
}
|
||||
|
||||
@ -142,10 +142,10 @@ index 2abc494..857c620 100644
|
||||
{
|
||||
/* This code is entered for texture formats which need a fixup. */
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 49d9674..dec7787 100644
|
||||
index 292deed..f926b42 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2211,6 +2211,8 @@ BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPE
|
||||
@@ -2313,6 +2313,8 @@ BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPE
|
||||
void wined3d_resource_free_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource,
|
||||
const struct wined3d_context *context, DWORD flags) DECLSPEC_HIDDEN;
|
||||
@ -155,5 +155,5 @@ index 49d9674..dec7787 100644
|
||||
UINT *slice_pitch) DECLSPEC_HIDDEN;
|
||||
GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.6.1
|
||||
2.7.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 50d846247350c8fbc9823769337016e6f800064e Mon Sep 17 00:00:00 2001
|
||||
From fad67dd2abc5311a596066f749a29a86daf7488f 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
|
||||
@ -8,9 +8,9 @@ sysmem blits. Surfaces and volume have different block alignment and
|
||||
boundary check behaviours.
|
||||
---
|
||||
dlls/wined3d/resource.c | 111 +++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/wined3d/volume.c | 97 +++--------------------------------
|
||||
dlls/wined3d/volume.c | 98 +++---------------------------------
|
||||
dlls/wined3d/wined3d_private.h | 3 ++
|
||||
3 files changed, 120 insertions(+), 91 deletions(-)
|
||||
3 files changed, 120 insertions(+), 92 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index 2a73c0e..a08631f 100644
|
||||
@ -132,7 +132,7 @@ index 2a73c0e..a08631f 100644
|
||||
+ return WINED3D_OK;
|
||||
+}
|
||||
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
index e598e1b..925c833 100644
|
||||
index e10318b..925c833 100644
|
||||
--- a/dlls/wined3d/volume.c
|
||||
+++ b/dlls/wined3d/volume.c
|
||||
@@ -368,26 +368,16 @@ static BOOL wined3d_volume_check_box_dimensions(const struct wined3d_volume *vol
|
||||
@ -163,7 +163,7 @@ index e598e1b..925c833 100644
|
||||
if (!wined3d_volume_check_box_dimensions(volume, box))
|
||||
{
|
||||
WARN("Map box is invalid.\n");
|
||||
@@ -400,91 +390,16 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
@@ -400,92 +390,16 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -195,7 +195,8 @@ index e598e1b..925c833 100644
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- wined3d_resource_get_pitch(&volume->resource, &map_desc->row_pitch, &map_desc->slice_pitch);
|
||||
- wined3d_texture_get_pitch(volume->container, volume->texture_level,
|
||||
- &map_desc->row_pitch, &map_desc->slice_pitch);
|
||||
- }
|
||||
-
|
||||
- if (!box)
|
||||
@ -261,10 +262,10 @@ index e598e1b..925c833 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 647abec..4fc4784 100644
|
||||
index 501d3f0..9ad7fd0 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2323,12 +2323,15 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO
|
||||
@@ -2325,12 +2325,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;
|
||||
@ -281,5 +282,5 @@ index 647abec..4fc4784 100644
|
||||
void wined3d_resource_validate_location(struct wined3d_resource *resource, DWORD location) DECLSPEC_HIDDEN;
|
||||
|
||||
--
|
||||
2.7.0
|
||||
2.7.1
|
||||
|
@ -1,13 +1,13 @@
|
||||
From 90e387618c439a928d4a7cebc299415f4d1e381e Mon Sep 17 00:00:00 2001
|
||||
From 6da727c0a938c724326cf09fb1f988d9b0822a0c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 19 Sep 2013 18:00:23 +0200
|
||||
Subject: wined3d: Use resource_map for surface_map.
|
||||
|
||||
---
|
||||
dlls/wined3d/resource.c | 2 +-
|
||||
dlls/wined3d/surface.c | 99 ++++++-------------------------------------------
|
||||
dlls/wined3d/volume.c | 7 +++-
|
||||
3 files changed, 18 insertions(+), 90 deletions(-)
|
||||
dlls/wined3d/resource.c | 2 +-
|
||||
dlls/wined3d/surface.c | 103 ++++++------------------------------------------
|
||||
dlls/wined3d/volume.c | 7 +++-
|
||||
3 files changed, 18 insertions(+), 94 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index a08631f..8d372b9 100644
|
||||
@ -23,10 +23,10 @@ index a08631f..8d372b9 100644
|
||||
|
||||
if (device->d3d_initialized)
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 8392614..4d3b47f 100644
|
||||
index 28d641c..64c2276 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -2381,28 +2381,18 @@ do { \
|
||||
@@ -2247,28 +2247,18 @@ do { \
|
||||
|
||||
HRESULT wined3d_surface_unmap(struct wined3d_surface *surface)
|
||||
{
|
||||
@ -60,7 +60,7 @@ index 8392614..4d3b47f 100644
|
||||
}
|
||||
|
||||
HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_desc *map_desc,
|
||||
@@ -2410,18 +2400,6 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
@@ -2276,18 +2266,6 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
{
|
||||
const struct wined3d_format *format = surface->resource.format;
|
||||
unsigned int fmt_flags = surface->container->resource.format_flags;
|
||||
@ -79,7 +79,7 @@ index 8392614..4d3b47f 100644
|
||||
|
||||
if ((fmt_flags & WINED3DFMT_FLAG_BLOCKS) && box
|
||||
&& !surface_check_block_align(surface, box))
|
||||
@@ -2433,11 +2411,6 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
@@ -2299,11 +2277,6 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ index 8392614..4d3b47f 100644
|
||||
/* Performance optimization: Count how often a surface is mapped, if it is
|
||||
* mapped regularly do not throw away the system memory copy. This avoids
|
||||
* the need to download the surface from OpenGL all the time. The surface
|
||||
@@ -2453,72 +2426,22 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
@@ -2319,76 +2292,22 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,17 +106,12 @@ index 8392614..4d3b47f 100644
|
||||
- wined3d_resource_validate_location(&surface->resource, surface->resource.map_binding);
|
||||
- }
|
||||
- else
|
||||
+ if (box)
|
||||
{
|
||||
- {
|
||||
- if (surface->resource.usage & WINED3DUSAGE_DYNAMIC)
|
||||
- WARN_(d3d_perf)("Mapping a dynamic surface without WINED3D_MAP_DISCARD.\n");
|
||||
-
|
||||
- wined3d_resource_load_location(&surface->resource, context, surface->resource.map_binding);
|
||||
+ surface->lockedRect.left = box->left;
|
||||
+ surface->lockedRect.top = box->top;
|
||||
+ surface->lockedRect.right = box->right;
|
||||
+ surface->lockedRect.bottom = box->bottom;
|
||||
}
|
||||
- }
|
||||
-
|
||||
- if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY)))
|
||||
- wined3d_resource_invalidate_location(&surface->resource, ~surface->resource.map_binding);
|
||||
@ -127,13 +122,22 @@ index 8392614..4d3b47f 100644
|
||||
- context_release(context);
|
||||
-
|
||||
- if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH)
|
||||
+ if (box)
|
||||
{
|
||||
- map_desc->row_pitch = surface->resource.width * format->byte_count;
|
||||
- map_desc->slice_pitch = surface->resource.height * map_desc->row_pitch;
|
||||
+ surface->lockedRect.left = box->left;
|
||||
+ surface->lockedRect.top = box->top;
|
||||
+ surface->lockedRect.right = box->right;
|
||||
+ surface->lockedRect.bottom = box->bottom;
|
||||
}
|
||||
else
|
||||
{
|
||||
- wined3d_resource_get_pitch(&surface->resource, &map_desc->row_pitch, &map_desc->slice_pitch);
|
||||
- map_desc->slice_pitch = surface->resource.height * map_desc->row_pitch;
|
||||
- }
|
||||
-
|
||||
- if (!box)
|
||||
{
|
||||
- {
|
||||
- map_desc->data = base_memory;
|
||||
surface->lockedRect.left = 0;
|
||||
surface->lockedRect.top = 0;
|
||||
@ -189,5 +193,5 @@ index 925c833..fc43958 100644
|
||||
|
||||
static ULONG volume_resource_incref(struct wined3d_resource *resource)
|
||||
--
|
||||
2.7.0
|
||||
2.7.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 74de56cff82b598bb71d556767bcd1c53dcb16e2 Mon Sep 17 00:00:00 2001
|
||||
From 47ef978f9df066194e25874a30f54033105e520b 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.
|
||||
@ -8,12 +8,12 @@ Subject: wined3d: Don't call the public map function in surface_cpu_blt.
|
||||
1 file changed, 72 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 5c30f78..a32ce1d 100644
|
||||
index ca15221..eb1397e 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -4306,26 +4306,40 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -4067,26 +4067,40 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
|
||||
const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter)
|
||||
const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
|
||||
{
|
||||
- const struct wined3d_box dst_box = {dst_rect->left, dst_rect->top, dst_rect->right, dst_rect->bottom, 0, 1};
|
||||
int bpp, srcheight, srcwidth, dstheight, dstwidth, width;
|
||||
@ -56,7 +56,7 @@ index 5c30f78..a32ce1d 100644
|
||||
src_format = dst_surface->resource.format;
|
||||
dst_format = src_format;
|
||||
dst_fmt_flags = dst_surface->container->resource.format_flags;
|
||||
@@ -4337,6 +4351,12 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -4098,6 +4112,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)
|
||||
{
|
||||
@ -69,7 +69,7 @@ index 5c30f78..a32ce1d 100644
|
||||
if (dst_surface->resource.format->id != src_surface->resource.format->id)
|
||||
{
|
||||
if (!(src_texture = surface_convert_format(src_surface, dst_format->id)))
|
||||
@@ -4347,7 +4367,9 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -4108,7 +4128,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));
|
||||
}
|
||||
@ -80,7 +80,7 @@ index 5c30f78..a32ce1d 100644
|
||||
src_format = src_surface->resource.format;
|
||||
src_fmt_flags = src_surface->container->resource.format_flags;
|
||||
}
|
||||
@@ -4357,7 +4379,8 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -4118,7 +4140,8 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
src_fmt_flags = dst_fmt_flags;
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ index 5c30f78..a32ce1d 100644
|
||||
}
|
||||
|
||||
bpp = dst_surface->resource.format->byte_count;
|
||||
@@ -4368,15 +4391,12 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -4129,15 +4152,12 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
width = (dst_rect->right - dst_rect->left) * bpp;
|
||||
|
||||
if (src_surface)
|
||||
@ -111,7 +111,7 @@ index 5c30f78..a32ce1d 100644
|
||||
|
||||
if (src_fmt_flags & dst_fmt_flags & WINED3DFMT_FLAG_BLOCKS)
|
||||
{
|
||||
@@ -4411,7 +4431,7 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -4172,7 +4192,7 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
}
|
||||
|
||||
hr = surface_cpu_blt_compressed(sbase, dbuf,
|
||||
@ -120,16 +120,16 @@ index 5c30f78..a32ce1d 100644
|
||||
src_format, flags, fx);
|
||||
goto release;
|
||||
}
|
||||
@@ -4419,7 +4439,7 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -4180,7 +4200,7 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
/* First, all the 'source-less' blits */
|
||||
if (flags & WINEDDBLT_COLORFILL)
|
||||
if (flags & WINED3D_BLT_COLOR_FILL)
|
||||
{
|
||||
- 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;
|
||||
- hr = _Blt_ColorFill(dbuf, dstwidth, dstheight, bpp, dst_map.row_pitch, fx->fill_color);
|
||||
+ hr = _Blt_ColorFill(dbuf, dstwidth, dstheight, bpp, dst_row_pitch, fx->fill_color);
|
||||
flags &= ~WINED3D_BLT_COLOR_FILL;
|
||||
}
|
||||
|
||||
@@ -4468,19 +4488,19 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -4224,19 +4244,19 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
for (y = 0; y < dstheight; ++y)
|
||||
{
|
||||
memcpy(dbuf, sbuf, width);
|
||||
@ -155,7 +155,7 @@ index 5c30f78..a32ce1d 100644
|
||||
memcpy(dbuf, sbuf, width);
|
||||
}
|
||||
}
|
||||
@@ -4490,8 +4510,8 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -4246,8 +4266,8 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
for (y = 0; y < dstheight; ++y)
|
||||
{
|
||||
memmove(dbuf, sbuf, width);
|
||||
@ -166,7 +166,7 @@ index 5c30f78..a32ce1d 100644
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4500,9 +4520,9 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -4256,9 +4276,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)
|
||||
{
|
||||
@ -178,7 +178,7 @@ index 5c30f78..a32ce1d 100644
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4512,13 +4532,13 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
||||
@@ -4268,13 +4288,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)
|
||||
{
|
||||
@ -194,7 +194,7 @@ index 5c30f78..a32ce1d 100644
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4565,14 +4585,14 @@ do { \
|
||||
@@ -4321,14 +4341,14 @@ do { \
|
||||
}
|
||||
#undef STRETCH_ROW
|
||||
}
|
||||
@ -210,8 +210,8 @@ index 5c30f78..a32ce1d 100644
|
||||
+ LONG dstyinc = dst_row_pitch, dstxinc = bpp;
|
||||
DWORD keylow = 0xffffffff, keyhigh = 0, keymask = 0xffffffff;
|
||||
DWORD destkeylow = 0x0, destkeyhigh = 0xffffffff, destkeymask = 0xffffffff;
|
||||
if (flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYDEST | WINEDDBLT_KEYSRCOVERRIDE | WINEDDBLT_KEYDESTOVERRIDE))
|
||||
@@ -4622,7 +4642,7 @@ do { \
|
||||
if (flags & (WINED3D_BLT_SRC_CKEY | WINED3D_BLT_DST_CKEY
|
||||
@@ -4380,7 +4400,7 @@ do { \
|
||||
LONG tmpxy;
|
||||
dTopLeft = dbuf;
|
||||
dTopRight = dbuf + ((dstwidth - 1) * bpp);
|
||||
@ -219,8 +219,8 @@ index 5c30f78..a32ce1d 100644
|
||||
+ dBottomLeft = dTopLeft + ((dstheight - 1) * dst_row_pitch);
|
||||
dBottomRight = dBottomLeft + ((dstwidth - 1) * bpp);
|
||||
|
||||
if (fx->dwDDFX & WINEDDBLTFX_ARITHSTRETCHY)
|
||||
@@ -4705,7 +4725,7 @@ do { \
|
||||
if (fx->fx & WINEDDBLTFX_ARITHSTRETCHY)
|
||||
@@ -4463,7 +4483,7 @@ do { \
|
||||
type *d = (type *)dbuf, *dx, tmp; \
|
||||
for (y = sy = 0; y < dstheight; ++y, sy += yinc) \
|
||||
{ \
|
||||
@ -229,7 +229,7 @@ index 5c30f78..a32ce1d 100644
|
||||
dx = d; \
|
||||
for (x = sx = 0; x < dstwidth; ++x, sx += xinc) \
|
||||
{ \
|
||||
@@ -4738,7 +4758,7 @@ do { \
|
||||
@@ -4496,7 +4516,7 @@ do { \
|
||||
BYTE *d = dbuf, *dx;
|
||||
for (y = sy = 0; y < dstheight; ++y, sy += yinc)
|
||||
{
|
||||
@ -238,7 +238,7 @@ index 5c30f78..a32ce1d 100644
|
||||
dx = d;
|
||||
for (x = sx = 0; x < dstwidth; ++x, sx+= xinc)
|
||||
{
|
||||
@@ -4769,6 +4789,10 @@ do { \
|
||||
@@ -4527,6 +4547,10 @@ do { \
|
||||
}
|
||||
}
|
||||
|
||||
@ -249,7 +249,7 @@ index 5c30f78..a32ce1d 100644
|
||||
error:
|
||||
if (flags && FIXME_ON(d3d_surface))
|
||||
{
|
||||
@@ -4776,12 +4800,24 @@ error:
|
||||
@@ -4534,12 +4558,24 @@ error:
|
||||
}
|
||||
|
||||
release:
|
||||
@ -278,5 +278,5 @@ index 5c30f78..a32ce1d 100644
|
||||
return hr;
|
||||
}
|
||||
--
|
||||
2.6.0
|
||||
2.7.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From b3df89b2eae0cadfa805fa54211b0a29601dcf8a Mon Sep 17 00:00:00 2001
|
||||
From 426922ff0b4f47661031f865c90529fb29f61d38 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 20 Dec 2012 13:09:17 +0100
|
||||
Subject: wined3d: Move the framebuffer into wined3d_state
|
||||
@ -42,7 +42,7 @@ index eb09795..21290d8 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index f3d9dbe..61e05e7 100644
|
||||
index 4a3abed..af5b210 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -1511,6 +1511,12 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
@ -205,7 +205,7 @@ index 316ccb8..eefa142 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
}
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 1fffabc..57dce0b 100644
|
||||
index 4e5c762..68163e5 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -931,7 +931,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
|
||||
@ -318,15 +318,15 @@ index 1fffabc..57dce0b 100644
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2021,7 +1999,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
|
||||
|| !(texture->resource.format_flags & WINED3DFMT_FLAG_DEPTH))
|
||||
return;
|
||||
surface = surface_from_resource(texture->sub_resources[0]);
|
||||
- if (!(depth_stencil = wined3d_rendertarget_view_get_surface(state->fb->depth_stencil)))
|
||||
+ if (!(depth_stencil = wined3d_rendertarget_view_get_surface(state->fb.depth_stencil)))
|
||||
|| !(dst_texture->resource.format_flags & WINED3DFMT_FLAG_DEPTH))
|
||||
return;
|
||||
|
||||
SetRect(&dst_rect, 0, 0, surface->resource.width, surface->resource.height);
|
||||
@@ -3385,6 +3363,8 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
- if (!(src_view = state->fb->depth_stencil))
|
||||
+ if (!(src_view = state->fb.depth_stencil))
|
||||
return;
|
||||
if (src_view->resource->type == WINED3D_RTYPE_BUFFER)
|
||||
{
|
||||
@@ -3391,6 +3369,8 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_count,
|
||||
const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
|
||||
{
|
||||
@ -335,7 +335,7 @@ index 1fffabc..57dce0b 100644
|
||||
TRACE("device %p, rect_count %u, rects %p, flags %#x, color {%.8e, %.8e, %.8e, %.8e}, depth %.8e, stencil %u.\n",
|
||||
device, rect_count, rects, flags, color->r, color->g, color->b, color->a, depth, stencil);
|
||||
|
||||
@@ -3396,7 +3376,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
@@ -3402,7 +3382,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
|
||||
if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
|
||||
{
|
||||
@ -344,7 +344,7 @@ index 1fffabc..57dce0b 100644
|
||||
if (!ds)
|
||||
{
|
||||
WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n");
|
||||
@@ -3405,8 +3385,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
@@ -3411,8 +3391,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
}
|
||||
else if (flags & WINED3DCLEAR_TARGET)
|
||||
{
|
||||
@ -355,7 +355,7 @@ index 1fffabc..57dce0b 100644
|
||||
{
|
||||
WARN("Silently ignoring depth and target clear with mismatching sizes\n");
|
||||
return WINED3D_OK;
|
||||
@@ -3756,8 +3736,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
|
||||
@@ -3762,8 +3742,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
|
||||
if (state->render_states[WINED3D_RS_ZENABLE] || state->render_states[WINED3D_RS_ZWRITEENABLE]
|
||||
|| state->render_states[WINED3D_RS_STENCILENABLE])
|
||||
{
|
||||
@ -366,7 +366,7 @@ index 1fffabc..57dce0b 100644
|
||||
|
||||
if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
|
||||
{
|
||||
@@ -4176,20 +4156,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
|
||||
@@ -4162,20 +4142,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -390,7 +390,7 @@ index 1fffabc..57dce0b 100644
|
||||
|
||||
TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n",
|
||||
device, view_idx, view, set_viewport);
|
||||
@@ -4229,13 +4210,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
@@ -4215,13 +4196,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
}
|
||||
|
||||
|
||||
@ -406,7 +406,7 @@ index 1fffabc..57dce0b 100644
|
||||
wined3d_cs_emit_set_rendertarget_view(device->cs, view_idx, view);
|
||||
/* Release after the assignment, to prevent device_resource_released()
|
||||
* from seeing the surface as still in use. */
|
||||
@@ -4247,18 +4228,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
@@ -4233,18 +4214,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
|
||||
void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view)
|
||||
{
|
||||
@ -428,7 +428,7 @@ index 1fffabc..57dce0b 100644
|
||||
wined3d_rendertarget_view_incref(view);
|
||||
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
|
||||
if (prev)
|
||||
@@ -4625,10 +4607,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4611,10 +4593,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
wined3d_texture_decref(device->cursor_texture);
|
||||
device->cursor_texture = NULL;
|
||||
}
|
||||
@ -440,7 +440,7 @@ index 1fffabc..57dce0b 100644
|
||||
{
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@@ -4637,6 +4618,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4623,6 +4604,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
}
|
||||
wined3d_device_set_depth_stencil_view(device, NULL);
|
||||
|
||||
@ -452,7 +452,7 @@ index 1fffabc..57dce0b 100644
|
||||
if (device->onscreen_depth_stencil)
|
||||
{
|
||||
wined3d_texture_decref(device->onscreen_depth_stencil->container);
|
||||
@@ -4860,7 +4846,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4846,7 +4832,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
if (device->d3d_initialized)
|
||||
delete_opengl_contexts(device, swapchain);
|
||||
|
||||
@ -461,7 +461,7 @@ index 1fffabc..57dce0b 100644
|
||||
&device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT)))
|
||||
ERR("Failed to initialize device state, hr %#x.\n", hr);
|
||||
device->update_state = &device->state;
|
||||
@@ -4869,22 +4855,21 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4855,22 +4841,21 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
}
|
||||
else if (device->back_buffer_view)
|
||||
{
|
||||
@ -489,7 +489,7 @@ index 1fffabc..57dce0b 100644
|
||||
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
|
||||
}
|
||||
|
||||
@@ -4979,17 +4964,17 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
@@ -4965,17 +4950,17 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@ -511,7 +511,7 @@ index 1fffabc..57dce0b 100644
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -5151,7 +5136,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
@@ -5111,7 +5096,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
|
||||
device->blitter = adapter->blitter;
|
||||
|
||||
@ -575,7 +575,7 @@ index 0afeff9..4e66f01 100644
|
||||
|
||||
surface_modify_ds_location(ds, location, ds->ds_current_size.cx, ds->ds_current_size.cy);
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index 1b82858..ec761ad 100644
|
||||
index a2ce187..9e50d7b 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -1627,7 +1627,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
@ -588,10 +588,10 @@ index 1b82858..ec761ad 100644
|
||||
const struct wined3d_shader_lconst *lconst;
|
||||
const char *prefix;
|
||||
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
index 8ec8a8e..07936ad 100644
|
||||
index 88c064c..da51493 100644
|
||||
--- a/dlls/wined3d/shader.c
|
||||
+++ b/dlls/wined3d/shader.c
|
||||
@@ -2615,7 +2615,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
@@ -2662,7 +2662,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
UINT i;
|
||||
|
||||
memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */
|
||||
@ -601,7 +601,7 @@ index 8ec8a8e..07936ad 100644
|
||||
static unsigned int warned = 0;
|
||||
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index 903f0d4..db8b4a2 100644
|
||||
index 58d2fed..0e874b0 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -105,7 +105,7 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_
|
||||
@ -660,7 +660,7 @@ index 903f0d4..db8b4a2 100644
|
||||
float scale;
|
||||
|
||||
union
|
||||
@@ -4544,7 +4544,7 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine
|
||||
@@ -4543,7 +4543,7 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine
|
||||
|
||||
static void viewport_miscpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
@ -669,7 +669,7 @@ index 903f0d4..db8b4a2 100644
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
struct wined3d_viewport vp = state->viewport;
|
||||
|
||||
@@ -4722,7 +4722,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
@@ -4721,7 +4721,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -678,7 +678,7 @@ index 903f0d4..db8b4a2 100644
|
||||
UINT height;
|
||||
UINT width;
|
||||
|
||||
@@ -4790,7 +4790,7 @@ void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state
|
||||
@@ -4789,7 +4789,7 @@ void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state
|
||||
|
||||
TRACE("context %p, state %p, state_id %#x.\n", context, state, state_id);
|
||||
|
||||
@ -788,21 +788,21 @@ index cb3d494..6b348b8 100644
|
||||
|
||||
if (FAILED(hr = stateblock_allocate_shader_constants(stateblock)))
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index b9341b8..6087e26 100644
|
||||
index 293210c..341197d 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -3145,8 +3145,8 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
enum wined3d_texture_filter_type filter)
|
||||
@@ -3066,8 +3066,8 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
|
||||
{
|
||||
struct wined3d_device *device = dst_surface->resource.device;
|
||||
- const struct wined3d_surface *rt = wined3d_rendertarget_view_get_surface(device->fb.render_targets[0]);
|
||||
struct wined3d_swapchain *src_swapchain, *dst_swapchain;
|
||||
+ const struct wined3d_surface *rt = wined3d_rendertarget_view_get_surface(device->state.fb.render_targets[0]);
|
||||
|
||||
TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, blt_fx %p, filter %s.\n",
|
||||
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),
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index dbf2c8b..73730cd 100644
|
||||
index 0454eb7..cca2a93 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -427,7 +427,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
@ -815,10 +815,10 @@ index dbf2c8b..73730cd 100644
|
||||
struct wined3d_context *context;
|
||||
struct wined3d_surface *front;
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index 4d00281..7421b4a 100644
|
||||
index 81fb262..457b3f4 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -3890,7 +3890,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
|
||||
@@ -4117,7 +4117,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
|
||||
float y_offset = context->render_offscreen
|
||||
? (center_offset - (2.0f * y) - h) / h
|
||||
: (center_offset - (2.0f * y) - h) / -h;
|
||||
@ -827,7 +827,7 @@ index 4d00281..7421b4a 100644
|
||||
state->render_states[WINED3D_RS_ZENABLE] : WINED3D_ZB_FALSE;
|
||||
float z_scale = zenable ? 2.0f : 0.0f;
|
||||
float z_offset = zenable ? -1.0f : 0.0f;
|
||||
@@ -4684,7 +4684,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
|
||||
@@ -4911,7 +4911,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -837,7 +837,7 @@ index 4d00281..7421b4a 100644
|
||||
|| !state->render_states[WINED3D_RS_CLIPPLANEENABLE])
|
||||
{
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index bc9b316..cb1ee99 100644
|
||||
index a1962bc..c042259 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1230,6 +1230,36 @@ struct wined3d_timestamp_query
|
||||
@ -898,7 +898,7 @@ index bc9b316..cb1ee99 100644
|
||||
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
|
||||
|
||||
struct StateEntry
|
||||
@@ -2075,7 +2100,7 @@ struct wined3d_stream_state
|
||||
@@ -2076,7 +2101,7 @@ struct wined3d_stream_state
|
||||
struct wined3d_state
|
||||
{
|
||||
DWORD flags;
|
||||
@ -907,7 +907,7 @@ index bc9b316..cb1ee99 100644
|
||||
|
||||
struct wined3d_vertex_declaration *vertex_declaration;
|
||||
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
|
||||
@@ -2181,7 +2206,6 @@ struct wined3d_device
|
||||
@@ -2182,7 +2207,6 @@ struct wined3d_device
|
||||
struct wine_rb_tree samplers;
|
||||
|
||||
/* Render Target Support */
|
||||
@ -915,7 +915,7 @@ index bc9b316..cb1ee99 100644
|
||||
struct wined3d_surface *onscreen_depth_stencil;
|
||||
struct wined3d_rendertarget_view *auto_depth_stencil_view;
|
||||
|
||||
@@ -2706,9 +2730,8 @@ struct wined3d_stateblock
|
||||
@@ -2710,9 +2734,8 @@ struct wined3d_stateblock
|
||||
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
|
||||
|
||||
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
@ -927,7 +927,7 @@ index bc9b316..cb1ee99 100644
|
||||
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
|
||||
struct wined3d_cs_ops
|
||||
@@ -2721,7 +2744,6 @@ struct wined3d_cs
|
||||
@@ -2725,7 +2748,6 @@ struct wined3d_cs
|
||||
{
|
||||
const struct wined3d_cs_ops *ops;
|
||||
struct wined3d_device *device;
|
||||
@ -936,5 +936,5 @@ index bc9b316..cb1ee99 100644
|
||||
|
||||
size_t data_size;
|
||||
--
|
||||
2.7.0
|
||||
2.7.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 534d7a18db58161682a42210ced42e8e7cf55ba8 Mon Sep 17 00:00:00 2001
|
||||
From a0164715382370f9c695094e906a242d96c504f0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Wed, 3 Apr 2013 18:01:34 +0200
|
||||
Subject: wined3d: Wait for the cs before destroying objects
|
||||
@ -17,7 +17,7 @@ the CS.
|
||||
7 files changed, 31 insertions(+)
|
||||
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
index 8165d6b..bc34050 100644
|
||||
index bd01aca..6271307 100644
|
||||
--- a/dlls/wined3d/buffer.c
|
||||
+++ b/dlls/wined3d/buffer.c
|
||||
@@ -552,6 +552,12 @@ ULONG CDECL wined3d_buffer_decref(struct wined3d_buffer *buffer)
|
||||
@ -34,10 +34,10 @@ index 8165d6b..bc34050 100644
|
||||
{
|
||||
context = context_acquire(buffer->resource.device, NULL);
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index eac7739..8823c9a 100644
|
||||
index 680e2bc..f192006 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -1188,12 +1188,14 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
@@ -1303,12 +1303,14 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
{
|
||||
wined3d_cs_st_require_space,
|
||||
wined3d_cs_st_submit,
|
||||
@ -53,10 +53,10 @@ index eac7739..8823c9a 100644
|
||||
|
||||
/* FIXME: wined3d_device_uninit_3d() should either flush and wait, or be an
|
||||
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
index cc969b8..0faabaa 100644
|
||||
index da51493..e9a7cc1 100644
|
||||
--- a/dlls/wined3d/shader.c
|
||||
+++ b/dlls/wined3d/shader.c
|
||||
@@ -1957,6 +1957,11 @@ ULONG CDECL wined3d_shader_decref(struct wined3d_shader *shader)
|
||||
@@ -2379,6 +2379,11 @@ ULONG CDECL wined3d_shader_decref(struct wined3d_shader *shader)
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
@ -69,7 +69,7 @@ index cc969b8..0faabaa 100644
|
||||
shader->parent_ops->wined3d_object_destroyed(shader->parent);
|
||||
HeapFree(GetProcessHeap(), 0, shader);
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 8fa2c9f..8f8af4d 100644
|
||||
index 5bdfdc3..9d40ba9 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -42,6 +42,12 @@ static void surface_cleanup(struct wined3d_surface *surface)
|
||||
@ -86,10 +86,10 @@ index 8fa2c9f..8f8af4d 100644
|
||||
|| surface->rb_resolved || !list_empty(&surface->renderbuffers))
|
||||
{
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index ec5c847..68889e5 100644
|
||||
index 42ed30e..5dc9ac5 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -136,6 +136,12 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
|
||||
@@ -111,6 +111,12 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
|
||||
|
||||
TRACE("texture %p.\n", texture);
|
||||
|
||||
@ -101,12 +101,12 @@ index ec5c847..68889e5 100644
|
||||
+
|
||||
for (i = 0; i < sub_count; ++i)
|
||||
{
|
||||
struct wined3d_resource *sub_resource = texture->sub_resources[i];
|
||||
struct wined3d_resource *sub_resource = texture->sub_resources[i].resource;
|
||||
diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c
|
||||
index cf5378c..3f4d5e4 100644
|
||||
index 9eb5907..601a5f5 100644
|
||||
--- a/dlls/wined3d/vertexdeclaration.c
|
||||
+++ b/dlls/wined3d/vertexdeclaration.c
|
||||
@@ -56,6 +56,11 @@ ULONG CDECL wined3d_vertex_declaration_decref(struct wined3d_vertex_declaration
|
||||
@@ -58,6 +58,11 @@ ULONG CDECL wined3d_vertex_declaration_decref(struct wined3d_vertex_declaration
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
@ -119,10 +119,10 @@ index cf5378c..3f4d5e4 100644
|
||||
declaration->parent_ops->wined3d_object_destroyed(declaration->parent);
|
||||
HeapFree(GetProcessHeap(), 0, declaration);
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index a48cc7d..b856b6f 100644
|
||||
index 7f7bf5f..c14a3a7 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2544,6 +2544,7 @@ struct wined3d_cs_ops
|
||||
@@ -2761,6 +2761,7 @@ struct wined3d_cs_ops
|
||||
{
|
||||
void *(*require_space)(struct wined3d_cs *cs, size_t size);
|
||||
void (*submit)(struct wined3d_cs *cs);
|
||||
@ -131,5 +131,5 @@ index a48cc7d..b856b6f 100644
|
||||
|
||||
struct wined3d_cs
|
||||
--
|
||||
2.1.3
|
||||
2.7.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 3c4dad98dfe1a841fd219dc8ac304a8358f11513 Mon Sep 17 00:00:00 2001
|
||||
From 1cef78c738df6bffaeb1674962f5793444747119 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 4 Apr 2013 11:50:09 +0200
|
||||
Subject: wined3d: Request a glFinish before modifying resources outside the cs
|
||||
@ -113,7 +113,7 @@ index a675ce9..e42cbe0 100644
|
||||
|
||||
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 3697a9f..83b1bf65 100644
|
||||
index 533df12..7cc2574 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -2857,6 +2857,13 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO
|
||||
@ -205,11 +205,11 @@ index 8d372b9..fb84a0f 100644
|
||||
context = context_acquire(device, NULL);
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index ec56882..d19b40a 100644
|
||||
index 3fc06c5..ca4209d 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -4759,6 +4759,13 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
flags &= ~WINEDDBLT_DONOTWAIT;
|
||||
@@ -4728,6 +4728,13 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
flags &= ~WINED3D_BLT_DO_NOT_WAIT;
|
||||
}
|
||||
|
||||
+ if (wined3d_settings.cs_multithreaded)
|
||||
@ -223,10 +223,10 @@ index ec56882..d19b40a 100644
|
||||
{
|
||||
WARN("D3D not initialized, using fallback.\n");
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 3b5e753..377da6b 100644
|
||||
index f6bd5b9..6deba20 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2826,6 +2826,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
|
||||
@@ -2827,6 +2827,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register, const float *constants,
|
||||
UINT vector4f_count, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
|
||||
@ -235,5 +235,5 @@ index 3b5e753..377da6b 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.7.0
|
||||
2.7.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 5d8735b2ffacc388879177422898deffd32ef841 Mon Sep 17 00:00:00 2001
|
||||
From a35d4ddddcacffd1a7a74c6d91b91dcf11de000e 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.
|
||||
@ -7,13 +7,13 @@ 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 | 260 +++++++++++++++++++++++------------------
|
||||
dlls/wined3d/cs.c | 50 ++++++++++
|
||||
dlls/wined3d/surface.c | 222 +++++++++++++++++++++++------------------
|
||||
dlls/wined3d/wined3d_private.h | 8 ++
|
||||
4 files changed, 204 insertions(+), 116 deletions(-)
|
||||
4 files changed, 185 insertions(+), 97 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index 8b56dbe..ae4004a 100644
|
||||
index 274777b..c0fa17a 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -1339,7 +1339,7 @@ static void color_fill_test(void)
|
||||
@ -26,7 +26,7 @@ index 8b56dbe..ae4004a 100644
|
||||
* 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 de9fc9b..9fc92cf 100644
|
||||
index de9fc9b..87f93bf 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -74,6 +74,7 @@ enum wined3d_cs_op
|
||||
@ -49,7 +49,7 @@ index de9fc9b..9fc92cf 100644
|
||||
+ struct wined3d_surface *src_surface;
|
||||
+ RECT src_rect;
|
||||
+ DWORD flags;
|
||||
+ WINEDDBLTFX fx;
|
||||
+ struct wined3d_blt_fx fx;
|
||||
+ enum wined3d_texture_filter_type filter;
|
||||
+};
|
||||
+
|
||||
@ -83,7 +83,7 @@ index de9fc9b..9fc92cf 100644
|
||||
+
|
||||
+void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surface,
|
||||
+ const RECT *dst_rect, struct wined3d_surface *src_surface,
|
||||
+ const RECT *src_rect, DWORD flags, const WINEDDBLTFX *fx,
|
||||
+ const RECT *src_rect, DWORD flags, const struct wined3d_blt_fx *fx,
|
||||
+ enum wined3d_texture_filter_type filter)
|
||||
+{
|
||||
+ struct wined3d_cs_blt *op;
|
||||
@ -122,21 +122,21 @@ index de9fc9b..9fc92cf 100644
|
||||
{
|
||||
struct wined3d_cs_block *block;
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 9fafb6b..dfe5c73 100644
|
||||
index ca4209d..5028d33 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -4857,7 +4857,7 @@ const struct blit_shader cpu_blit = {
|
||||
@@ -4639,7 +4639,7 @@ const struct blit_shader cpu_blit = {
|
||||
cpu_blit_blit_surface,
|
||||
};
|
||||
|
||||
-HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect,
|
||||
+void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect,
|
||||
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
|
||||
const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter)
|
||||
const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
|
||||
{
|
||||
@@ -4875,103 +4875,6 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
| WINEDDBLT_DONOTWAIT
|
||||
| WINEDDBLT_ALPHATEST;
|
||||
@@ -4657,84 +4657,6 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
| WINED3D_BLT_DO_NOT_WAIT
|
||||
| WINED3D_BLT_ALPHA_TEST;
|
||||
|
||||
- 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),
|
||||
@ -145,33 +145,14 @@ index 9fafb6b..dfe5c73 100644
|
||||
-
|
||||
- if (fx)
|
||||
- {
|
||||
- TRACE("dwSize %#x.\n", fx->dwSize);
|
||||
- TRACE("dwDDFX %#x.\n", fx->dwDDFX);
|
||||
- TRACE("dwROP %#x.\n", fx->dwROP);
|
||||
- TRACE("dwDDROP %#x.\n", fx->dwDDROP);
|
||||
- TRACE("dwRotationAngle %#x.\n", fx->dwRotationAngle);
|
||||
- TRACE("dwZBufferOpCode %#x.\n", fx->dwZBufferOpCode);
|
||||
- TRACE("dwZBufferLow %#x.\n", fx->dwZBufferLow);
|
||||
- TRACE("dwZBufferHigh %#x.\n", fx->dwZBufferHigh);
|
||||
- TRACE("dwZBufferBaseDest %#x.\n", fx->dwZBufferBaseDest);
|
||||
- TRACE("dwZDestConstBitDepth %#x.\n", fx->dwZDestConstBitDepth);
|
||||
- TRACE("lpDDSZBufferDest %p.\n", fx->u1.lpDDSZBufferDest);
|
||||
- TRACE("dwZSrcConstBitDepth %#x.\n", fx->dwZSrcConstBitDepth);
|
||||
- TRACE("lpDDSZBufferSrc %p.\n", fx->u2.lpDDSZBufferSrc);
|
||||
- TRACE("dwAlphaEdgeBlendBitDepth %#x.\n", fx->dwAlphaEdgeBlendBitDepth);
|
||||
- TRACE("dwAlphaEdgeBlend %#x.\n", fx->dwAlphaEdgeBlend);
|
||||
- TRACE("dwReserved %#x.\n", fx->dwReserved);
|
||||
- TRACE("dwAlphaDestConstBitDepth %#x.\n", fx->dwAlphaDestConstBitDepth);
|
||||
- TRACE("lpDDSAlphaDest %p.\n", fx->u3.lpDDSAlphaDest);
|
||||
- TRACE("dwAlphaSrcConstBitDepth %#x.\n", fx->dwAlphaSrcConstBitDepth);
|
||||
- TRACE("lpDDSAlphaSrc %p.\n", fx->u4.lpDDSAlphaSrc);
|
||||
- TRACE("lpDDSPattern %p.\n", fx->u5.lpDDSPattern);
|
||||
- TRACE("ddckDestColorkey {%#x, %#x}.\n",
|
||||
- fx->ddckDestColorkey.color_space_low_value,
|
||||
- fx->ddckDestColorkey.color_space_high_value);
|
||||
- TRACE("ddckSrcColorkey {%#x, %#x}.\n",
|
||||
- fx->ddckSrcColorkey.color_space_low_value,
|
||||
- fx->ddckSrcColorkey.color_space_high_value);
|
||||
- TRACE("fx %#x.\n", fx->fx);
|
||||
- TRACE("fill_color 0x%08x.\n", fx->fill_color);
|
||||
- TRACE("dst_color_key {0x%08x, 0x%08x}.\n",
|
||||
- fx->dst_color_key.color_space_low_value,
|
||||
- fx->dst_color_key.color_space_high_value);
|
||||
- TRACE("src_color_key {0x%08x, 0x%08x}.\n",
|
||||
- fx->src_color_key.color_space_low_value,
|
||||
- fx->src_color_key.color_space_high_value);
|
||||
- }
|
||||
-
|
||||
- if (dst_surface->resource.map_count || (src_surface && src_surface->resource.map_count))
|
||||
@ -203,29 +184,29 @@ index 9fafb6b..dfe5c73 100644
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (!fx || !(fx->dwDDFX))
|
||||
- flags &= ~WINEDDBLT_DDFX;
|
||||
- if (!fx || !(fx->fx))
|
||||
- flags &= ~WINED3D_BLT_FX;
|
||||
-
|
||||
- if (flags & WINEDDBLT_WAIT)
|
||||
- flags &= ~WINEDDBLT_WAIT;
|
||||
- if (flags & WINED3D_BLT_WAIT)
|
||||
- flags &= ~WINED3D_BLT_WAIT;
|
||||
-
|
||||
- if (flags & WINEDDBLT_ASYNC)
|
||||
- if (flags & WINED3D_BLT_ASYNC)
|
||||
- {
|
||||
- static unsigned int once;
|
||||
-
|
||||
- if (!once++)
|
||||
- FIXME("Can't handle WINEDDBLT_ASYNC flag.\n");
|
||||
- flags &= ~WINEDDBLT_ASYNC;
|
||||
- FIXME("Can't handle WINED3D_BLT_ASYNC flag.\n");
|
||||
- flags &= ~WINED3D_BLT_ASYNC;
|
||||
- }
|
||||
-
|
||||
- /* WINEDDBLT_DONOTWAIT appeared in DX7. */
|
||||
- if (flags & WINEDDBLT_DONOTWAIT)
|
||||
- /* WINED3D_BLT_DO_NOT_WAIT appeared in DX7. */
|
||||
- if (flags & WINED3D_BLT_DO_NOT_WAIT)
|
||||
- {
|
||||
- static unsigned int once;
|
||||
-
|
||||
- if (!once++)
|
||||
- FIXME("Can't handle WINEDDBLT_DONOTWAIT flag.\n");
|
||||
- flags &= ~WINEDDBLT_DONOTWAIT;
|
||||
- FIXME("Can't handle WINED3D_BLT_DO_NOT_WAIT flag.\n");
|
||||
- flags &= ~WINED3D_BLT_DO_NOT_WAIT;
|
||||
- }
|
||||
-
|
||||
- if (wined3d_settings.cs_multithreaded)
|
||||
@ -238,10 +219,10 @@ index 9fafb6b..dfe5c73 100644
|
||||
if (!device->d3d_initialized)
|
||||
{
|
||||
WARN("D3D not initialized, using fallback.\n");
|
||||
@@ -5035,22 +4938,16 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4798,22 +4720,16 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
TRACE("Depth fill.\n");
|
||||
|
||||
if (!surface_convert_depth_to_float(dst_surface, fx->u5.dwFillDepth, &depth))
|
||||
if (!surface_convert_depth_to_float(dst_surface, fx->fill_color, &depth))
|
||||
- return WINED3DERR_INVALIDCALL;
|
||||
+ return;
|
||||
|
||||
@ -264,7 +245,7 @@ index 9fafb6b..dfe5c73 100644
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -5082,7 +4979,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4845,7 +4761,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
goto fallback;
|
||||
|
||||
if (SUCCEEDED(surface_color_fill(dst_surface, dst_rect, &color)))
|
||||
@ -273,7 +254,7 @@ index 9fafb6b..dfe5c73 100644
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5125,7 +5022,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4888,7 +4804,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
dst_surface->container->resource.draw_binding);
|
||||
context_release(context);
|
||||
}
|
||||
@ -282,7 +263,7 @@ index 9fafb6b..dfe5c73 100644
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5149,7 +5046,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4912,7 +4828,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, NULL, 0);
|
||||
dst_swapchain->desc.swap_effect = swap_effect;
|
||||
|
||||
@ -291,7 +272,7 @@ index 9fafb6b..dfe5c73 100644
|
||||
}
|
||||
|
||||
if (fbo_blit_supported(&device->adapter->gl_info, blit_op,
|
||||
@@ -5168,7 +5065,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4931,7 +4847,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding);
|
||||
wined3d_resource_invalidate_location(&dst_surface->resource, ~dst_surface->container->resource.draw_binding);
|
||||
|
||||
@ -300,7 +281,7 @@ index 9fafb6b..dfe5c73 100644
|
||||
}
|
||||
|
||||
blitter = wined3d_select_blitter(&device->adapter->gl_info, &device->adapter->d3d_info, blit_op,
|
||||
@@ -5178,18 +5075,151 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
@@ -4941,18 +4857,132 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
{
|
||||
blitter->blit_surface(device, blit_op, filter, src_surface,
|
||||
src_rect, dst_surface, dst_rect, color_key);
|
||||
@ -329,7 +310,7 @@ index 9fafb6b..dfe5c73 100644
|
||||
+
|
||||
+HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect,
|
||||
+ struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
|
||||
+ const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter)
|
||||
+ const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
|
||||
+{
|
||||
+ struct wined3d_device *device = dst_surface->resource.device;
|
||||
+
|
||||
@ -340,33 +321,14 @@ index 9fafb6b..dfe5c73 100644
|
||||
+
|
||||
+ if (fx)
|
||||
+ {
|
||||
+ TRACE("dwSize %#x.\n", fx->dwSize);
|
||||
+ TRACE("dwDDFX %#x.\n", fx->dwDDFX);
|
||||
+ TRACE("dwROP %#x.\n", fx->dwROP);
|
||||
+ TRACE("dwDDROP %#x.\n", fx->dwDDROP);
|
||||
+ TRACE("dwRotationAngle %#x.\n", fx->dwRotationAngle);
|
||||
+ TRACE("dwZBufferOpCode %#x.\n", fx->dwZBufferOpCode);
|
||||
+ TRACE("dwZBufferLow %#x.\n", fx->dwZBufferLow);
|
||||
+ TRACE("dwZBufferHigh %#x.\n", fx->dwZBufferHigh);
|
||||
+ TRACE("dwZBufferBaseDest %#x.\n", fx->dwZBufferBaseDest);
|
||||
+ TRACE("dwZDestConstBitDepth %#x.\n", fx->dwZDestConstBitDepth);
|
||||
+ TRACE("lpDDSZBufferDest %p.\n", fx->u1.lpDDSZBufferDest);
|
||||
+ TRACE("dwZSrcConstBitDepth %#x.\n", fx->dwZSrcConstBitDepth);
|
||||
+ TRACE("lpDDSZBufferSrc %p.\n", fx->u2.lpDDSZBufferSrc);
|
||||
+ TRACE("dwAlphaEdgeBlendBitDepth %#x.\n", fx->dwAlphaEdgeBlendBitDepth);
|
||||
+ TRACE("dwAlphaEdgeBlend %#x.\n", fx->dwAlphaEdgeBlend);
|
||||
+ TRACE("dwReserved %#x.\n", fx->dwReserved);
|
||||
+ TRACE("dwAlphaDestConstBitDepth %#x.\n", fx->dwAlphaDestConstBitDepth);
|
||||
+ TRACE("lpDDSAlphaDest %p.\n", fx->u3.lpDDSAlphaDest);
|
||||
+ TRACE("dwAlphaSrcConstBitDepth %#x.\n", fx->dwAlphaSrcConstBitDepth);
|
||||
+ TRACE("lpDDSAlphaSrc %p.\n", fx->u4.lpDDSAlphaSrc);
|
||||
+ TRACE("lpDDSPattern %p.\n", fx->u5.lpDDSPattern);
|
||||
+ TRACE("ddckDestColorkey {%#x, %#x}.\n",
|
||||
+ fx->ddckDestColorkey.color_space_low_value,
|
||||
+ fx->ddckDestColorkey.color_space_high_value);
|
||||
+ TRACE("ddckSrcColorkey {%#x, %#x}.\n",
|
||||
+ fx->ddckSrcColorkey.color_space_low_value,
|
||||
+ fx->ddckSrcColorkey.color_space_high_value);
|
||||
+ TRACE("fx %#x.\n", fx->fx);
|
||||
+ TRACE("fill_color 0x%08x.\n", fx->fill_color);
|
||||
+ TRACE("dst_color_key {0x%08x, 0x%08x}.\n",
|
||||
+ fx->dst_color_key.color_space_low_value,
|
||||
+ fx->dst_color_key.color_space_high_value);
|
||||
+ TRACE("src_color_key {0x%08x, 0x%08x}.\n",
|
||||
+ fx->src_color_key.color_space_low_value,
|
||||
+ fx->src_color_key.color_space_high_value);
|
||||
+ }
|
||||
+
|
||||
+ if (dst_surface->resource.map_count || (src_surface && src_surface->resource.map_count))
|
||||
@ -423,29 +385,29 @@ index 9fafb6b..dfe5c73 100644
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!fx || !(fx->dwDDFX))
|
||||
+ flags &= ~WINEDDBLT_DDFX;
|
||||
+ if (!fx || !(fx->fx))
|
||||
+ flags &= ~WINED3D_BLT_FX;
|
||||
+
|
||||
+ if (flags & WINEDDBLT_WAIT)
|
||||
+ flags &= ~WINEDDBLT_WAIT;
|
||||
+ if (flags & WINED3D_BLT_WAIT)
|
||||
+ flags &= ~WINED3D_BLT_WAIT;
|
||||
+
|
||||
+ if (flags & WINEDDBLT_ASYNC)
|
||||
+ if (flags & WINED3D_BLT_ASYNC)
|
||||
+ {
|
||||
+ static unsigned int once;
|
||||
+
|
||||
+ if (!once++)
|
||||
+ FIXME("Can't handle WINEDDBLT_ASYNC flag.\n");
|
||||
+ flags &= ~WINEDDBLT_ASYNC;
|
||||
+ FIXME("Can't handle WINED3D_BLT_ASYNC flag.\n");
|
||||
+ flags &= ~WINED3D_BLT_ASYNC;
|
||||
+ }
|
||||
+
|
||||
+ /* WINEDDBLT_DONOTWAIT appeared in DX7. */
|
||||
+ if (flags & WINEDDBLT_DONOTWAIT)
|
||||
+ if (flags & WINED3D_BLT_DO_NOT_WAIT)
|
||||
+ {
|
||||
+ static unsigned int once;
|
||||
+
|
||||
+ if (!once++)
|
||||
+ FIXME("Can't handle WINEDDBLT_DONOTWAIT flag.\n");
|
||||
+ flags &= ~WINEDDBLT_DONOTWAIT;
|
||||
+ FIXME("Can't handle WINED3D_BLT_DO_NOT_WAIT flag.\n");
|
||||
+ flags &= ~WINED3D_BLT_DO_NOT_WAIT;
|
||||
+ }
|
||||
+
|
||||
+ TRACE("Emitting blit %p <== %p\n", dst_surface, src_surface);
|
||||
@ -457,20 +419,20 @@ index 9fafb6b..dfe5c73 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 6b95f46..b93988c 100644
|
||||
index 7c17009..2e5cc5d 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2557,6 +2557,9 @@ void wined3d_surface_destroy(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
@@ -2617,6 +2617,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;
|
||||
+void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect_in,
|
||||
+ struct wined3d_surface *src_surface, const RECT *src_rect_in, DWORD flags,
|
||||
+ const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
||||
+ const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
||||
|
||||
void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context,
|
||||
const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
||||
@@ -2703,6 +2706,7 @@ struct wined3d_cs
|
||||
@@ -2763,6 +2766,7 @@ struct wined3d_cs
|
||||
struct wined3d_device *device;
|
||||
struct wined3d_state state;
|
||||
HANDLE thread;
|
||||
@ -478,17 +440,17 @@ index 6b95f46..b93988c 100644
|
||||
DWORD tls_idx;
|
||||
struct wined3d_surface *onscreen_depth_stencil;
|
||||
|
||||
@@ -2781,6 +2785,10 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs,
|
||||
@@ -2841,6 +2845,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;
|
||||
+void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surface,
|
||||
+ const RECT *dst_rect, struct wined3d_surface *src_surface,
|
||||
+ const RECT *src_rect, DWORD flags, const WINEDDBLTFX *fx,
|
||||
+ const RECT *src_rect, DWORD flags, const struct wined3d_blt_fx *fx,
|
||||
+ enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
||||
|
||||
/* Direct3D terminology with little modifications. We do not have an issued state
|
||||
* because only the driver knows about it, but we have a created state because d3d
|
||||
--
|
||||
2.7.0
|
||||
2.7.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 793b7f174651b67263e170e1144b3c293eac651f Mon Sep 17 00:00:00 2001
|
||||
From 3a7588ec98653110e1a5f1e4d3d14d26d6cf062e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 4 Jul 2013 21:10:16 +0200
|
||||
Subject: wined3d: Send render target view clears through the command stream
|
||||
@ -10,10 +10,10 @@ Subject: wined3d: Send render target view clears through the command stream
|
||||
3 files changed, 40 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index dcaedfd..366a4d3 100644
|
||||
index 87f93bf..7596fc3 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -74,6 +74,7 @@ enum wined3d_cs_op
|
||||
@@ -75,6 +75,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_SET_LIGHT,
|
||||
WINED3D_CS_OP_SET_LIGHT_ENABLE,
|
||||
WINED3D_CS_OP_BLT,
|
||||
@ -21,7 +21,7 @@ index dcaedfd..366a4d3 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -343,6 +344,14 @@ struct wined3d_cs_blt
|
||||
@@ -353,6 +354,14 @@ struct wined3d_cs_blt
|
||||
enum wined3d_texture_filter_type filter;
|
||||
};
|
||||
|
||||
@ -36,7 +36,7 @@ index dcaedfd..366a4d3 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)
|
||||
{
|
||||
@@ -1652,6 +1661,32 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
@@ -1766,6 +1775,32 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ index dcaedfd..366a4d3 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
@@ -1692,6 +1727,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1807,6 +1842,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_SET_LIGHT */ wined3d_cs_exec_set_light,
|
||||
/* WINED3D_CS_OP_SET_LIGHT_ENABLE */ wined3d_cs_exec_set_light_enable,
|
||||
/* WINED3D_CS_OP_BLT */ wined3d_cs_exec_blt,
|
||||
@ -78,10 +78,10 @@ index dcaedfd..366a4d3 100644
|
||||
|
||||
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 599a25d..b2e7ec3 100644
|
||||
index b3e67a3..a6cad5e 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3917,16 +3917,8 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
@@ -4105,16 +4105,8 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
rect = &r;
|
||||
}
|
||||
|
||||
@ -101,12 +101,12 @@ index 599a25d..b2e7ec3 100644
|
||||
|
||||
struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(const struct wined3d_device *device,
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 0d76377..e554099 100644
|
||||
index 2e5cc5d..6556ee9 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2638,6 +2638,8 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
@@ -2849,6 +2849,8 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
const RECT *dst_rect, struct wined3d_surface *src_surface,
|
||||
const RECT *src_rect, DWORD flags, const WINEDDBLTFX *fx,
|
||||
const RECT *src_rect, DWORD flags, const struct wined3d_blt_fx *fx,
|
||||
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;
|
||||
@ -114,5 +114,5 @@ index 0d76377..e554099 100644
|
||||
/* Direct3D terminology with little modifications. We do not have an issued state
|
||||
* because only the driver knows about it, but we have a created state because d3d
|
||||
--
|
||||
2.1.3
|
||||
2.7.1
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user