mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
wined3d-CSMT_Main: Reenable patchset.
This commit is contained in:
parent
dcca430467
commit
95643287d3
@ -348,6 +348,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"
|
||||
@ -1204,6 +1205,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"
|
||||
;;
|
||||
@ -1943,6 +1947,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."
|
||||
@ -7002,6 +7013,403 @@ 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-Call-wined3d_texture_set_dirty-in-win.patch
|
||||
patch_apply wined3d-CSMT_Main/0002-Revert-wined3d-Merge-surface_remove_pbo-and-wined3d_.patch
|
||||
patch_apply wined3d-CSMT_Main/0003-Revert-wined3d-Merge-surface_prepare_buffer-and-wine.patch
|
||||
patch_apply wined3d-CSMT_Main/0004-Revert-wined3d-Cleanup-sub-resource-buffer-objects-i.patch
|
||||
patch_apply wined3d-CSMT_Main/0005-Revert-wined3d-Store-surface-volume-buffer-objects-i.patch
|
||||
patch_apply wined3d-CSMT_Main/0006-Revert-wined3d-Avoid-volume_from_resource-in-texture.patch
|
||||
patch_apply wined3d-CSMT_Main/0007-Revert-wined3d-Avoid-surface_from_resource-in-swapch.patch
|
||||
patch_apply wined3d-CSMT_Main/0008-Revert-wined3d-Avoid-surface_from_resource-in-textur.patch
|
||||
patch_apply wined3d-CSMT_Main/0009-Revert-wined3d-Avoid-surface_from_resource-in-wined3.patch
|
||||
patch_apply wined3d-CSMT_Main/0010-Revert-wined3d-Use-a-single-allocation-for-texture-s.patch
|
||||
patch_apply wined3d-CSMT_Main/0011-Revert-wined3d-Get-rid-of-wined3d_surface_ops.surfac.patch
|
||||
patch_apply wined3d-CSMT_Main/0012-Revert-wined3d-Keep-track-of-front-buffer-updates-in.patch
|
||||
patch_apply wined3d-CSMT_Main/0013-Revert-wined3d-Get-rid-of-the-offscreenBuffer-field-.patch
|
||||
patch_apply wined3d-CSMT_Main/0014-Revert-wined3d-Introduce-wined3d_texture_check_block.patch
|
||||
patch_apply wined3d-CSMT_Main/0015-Revert-wined3d-Introduce-wined3d_texture_get_pitch.patch
|
||||
patch_apply wined3d-CSMT_Main/0016-Revert-wined3d-Use-wined3d_format_calculate_pitch-in.patch
|
||||
patch_apply wined3d-CSMT_Main/0017-Revert-wined3d-Handle-slice-pitch-and-alignment-as-w.patch
|
||||
patch_apply wined3d-CSMT_Main/0018-Revert-wined3d-Store-custom-pitches-in-the-texture-i.patch
|
||||
patch_apply wined3d-CSMT_Main/0019-Revert-wined3d-Store-the-user_memory-pointer-in-the-.patch
|
||||
patch_apply wined3d-CSMT_Main/0020-wined3d-Merge-get_pitch-functions.patch
|
||||
patch_apply wined3d-CSMT_Main/0021-wined3d-Pass-a-context-to-surface_load_location.patch
|
||||
patch_apply wined3d-CSMT_Main/0022-wined3d-Make-surface_load_location-return-nothing.patch
|
||||
patch_apply wined3d-CSMT_Main/0023-wined3d-Store-volume-locations-in-the-resource.patch
|
||||
patch_apply wined3d-CSMT_Main/0024-wined3d-Move-validate_location-to-resource.c.patch
|
||||
patch_apply wined3d-CSMT_Main/0025-wined3d-Move-surface-locations-into-the-resource.patch
|
||||
patch_apply wined3d-CSMT_Main/0026-wined3d-Remove-surface_validate_location.patch
|
||||
patch_apply wined3d-CSMT_Main/0027-wined3d-Move-invalidate_location-to-resource.c.patch
|
||||
patch_apply wined3d-CSMT_Main/0028-wined3d-Invalidate-containers-via-callback.patch
|
||||
patch_apply wined3d-CSMT_Main/0029-wined3d-Remove-surface_invalidate_location.patch
|
||||
patch_apply wined3d-CSMT_Main/0030-wined3d-Move-bitmap_data-and-user_memory-into-the-re.patch
|
||||
patch_apply wined3d-CSMT_Main/0031-wined3d-Move-load_location-into-the-resource.patch
|
||||
patch_apply wined3d-CSMT_Main/0032-wined3d-Replace-surface_load_location-with-resource_.patch
|
||||
patch_apply wined3d-CSMT_Main/0033-wined3d-Introduce-helper-functions-for-mapping-volum.patch
|
||||
patch_apply wined3d-CSMT_Main/0034-wined3d-Move-volume-PBO-infrastructure-into-the-reso.patch
|
||||
patch_apply wined3d-CSMT_Main/0035-wined3d-Remove-surface-pbo.patch
|
||||
patch_apply wined3d-CSMT_Main/0036-wined3d-Use-resource-buffer-mapping-facilities-in-su.patch
|
||||
patch_apply wined3d-CSMT_Main/0037-wined3d-Move-buffer-creation-into-the-resource.patch
|
||||
patch_apply wined3d-CSMT_Main/0038-wined3d-Handle-WINED3D_LOCATION_DISCARDED-in-surface.patch
|
||||
patch_apply wined3d-CSMT_Main/0039-wined3d-Handle-LOCATION_DISCARDED-in-surface_load_dr.patch
|
||||
patch_apply wined3d-CSMT_Main/0040-wined3d-Handle-WINED3D_LOCATION_DISCARDED-for-sysmem.patch
|
||||
patch_apply wined3d-CSMT_Main/0041-wined3d-Discard-implicit-surfaces-on-unload.patch
|
||||
patch_apply wined3d-CSMT_Main/0042-wined3d-Don-t-try-to-flip-sysmem-copies-in-swapchain.patch
|
||||
patch_apply wined3d-CSMT_Main/0043-wined3d-Discard-the-backbuffer-in-discard-presents.patch
|
||||
patch_apply wined3d-CSMT_Main/0044-wined3d-Introduce-a-function-to-retrieve-resource-me.patch
|
||||
patch_apply wined3d-CSMT_Main/0045-wined3d-Make-surface_ops-unmap-specific-for-front-bu.patch
|
||||
patch_apply wined3d-CSMT_Main/0046-wined3d-Move-check_block_align-to-resource.c.patch
|
||||
patch_apply wined3d-CSMT_Main/0047-wined3d-Replace-surface-alloc-functions-with-resourc.patch
|
||||
patch_apply wined3d-CSMT_Main/0048-wined3d-Don-t-delete-the-buffer-in-surface_cleanup.patch
|
||||
patch_apply wined3d-CSMT_Main/0049-wined3d-Use-resource-facilities-to-destroy-PBOs.patch
|
||||
patch_apply wined3d-CSMT_Main/0050-wined3d-Move-simple-location-copying-to-the-resource.patch
|
||||
patch_apply wined3d-CSMT_Main/0051-wined3d-Move-most-of-volume_map-to-resource.c.patch
|
||||
patch_apply wined3d-CSMT_Main/0052-wined3d-Use-resource_map-for-surface_map.patch
|
||||
patch_apply wined3d-CSMT_Main/0053-wined3d-Don-t-call-the-public-map-function-in-surfac.patch
|
||||
patch_apply wined3d-CSMT_Main/0054-wined3d-Don-t-call-the-public-map-function-in-surfac.patch
|
||||
patch_apply wined3d-CSMT_Main/0055-wined3d-Move-the-framebuffer-into-wined3d_state.patch
|
||||
patch_apply wined3d-CSMT_Main/0056-wined3d-Get-rid-of-state-access-in-shader_generate_g.patch
|
||||
patch_apply wined3d-CSMT_Main/0057-wined3d-Preload-buffers-if-streamsrc-is-not-dirty.patch
|
||||
patch_apply wined3d-CSMT_Main/0058-wined3d-Hackily-introduce-a-multithreaded-command-st.patch
|
||||
patch_apply wined3d-CSMT_Main/0059-wined3d-Wait-for-resource-updates-to-finish-when-usi.patch
|
||||
patch_apply wined3d-CSMT_Main/0060-wined3d-Don-t-store-pointers-in-struct-wined3d_cs_pr.patch
|
||||
patch_apply wined3d-CSMT_Main/0061-wined3d-Don-t-put-rectangle-pointers-into-wined3d_cs.patch
|
||||
patch_apply wined3d-CSMT_Main/0062-wined3d-Store-the-color-in-clear-ops-instead-of-a-po.patch
|
||||
patch_apply wined3d-CSMT_Main/0063-wined3d-Pass-the-state-to-draw_primitive.patch
|
||||
patch_apply wined3d-CSMT_Main/0064-wined3d-Wait-for-the-cs-before-destroying-objects.patch
|
||||
patch_apply wined3d-CSMT_Main/0065-wined3d-Give-the-cs-its-own-state.patch
|
||||
patch_apply wined3d-CSMT_Main/0066-wined3d-Send-float-constant-updates-through-the-comm.patch
|
||||
patch_apply wined3d-CSMT_Main/0067-wined3d-Request-a-glFinish-before-modifying-resource.patch
|
||||
patch_apply wined3d-CSMT_Main/0068-wined3d-Finish-the-cs-before-changing-the-texture-lo.patch
|
||||
patch_apply wined3d-CSMT_Main/0069-wined3d-Don-t-call-glFinish-after-clears.patch
|
||||
patch_apply wined3d-CSMT_Main/0070-wined3d-Don-t-call-glFinish-after-draws.patch
|
||||
patch_apply wined3d-CSMT_Main/0071-wined3d-Shadow-device-offscreenBuffer-in-the-context.patch
|
||||
patch_apply wined3d-CSMT_Main/0072-wined3d-Don-t-access-the-stateblock-in-find_draw_buf.patch
|
||||
patch_apply wined3d-CSMT_Main/0073-wined3d-Pass-the-depth-stencil-to-swapchain-present.patch
|
||||
patch_apply wined3d-CSMT_Main/0074-wined3d-Don-t-store-viewport-pointers-in-the-command.patch
|
||||
patch_apply wined3d-CSMT_Main/0075-wined3d-Keep-track-of-the-onscreen-depth-stencil-in-.patch
|
||||
patch_apply wined3d-CSMT_Main/0076-wined3d-Send-base-vertex-index-updates-through-the-c.patch
|
||||
patch_apply wined3d-CSMT_Main/0077-wined3d-Send-primitive-type-updates-through-the-comm.patch
|
||||
patch_apply wined3d-CSMT_Main/0078-wined3d-Send-bool-constant-updates-through-the-comma.patch
|
||||
patch_apply wined3d-CSMT_Main/0079-wined3d-Send-int-constant-updates-through-the-comman.patch
|
||||
patch_apply wined3d-CSMT_Main/0080-wined3d-Send-light-updates-through-the-command-strea.patch
|
||||
patch_apply wined3d-CSMT_Main/0081-wined3d-Prevent-the-command-stream-from-running-ahea.patch
|
||||
patch_apply wined3d-CSMT_Main/0082-wined3d-Wait-for-the-cs-to-finish-before-destroying-.patch
|
||||
patch_apply wined3d-CSMT_Main/0083-wined3d-Run-the-cs-asynchronously.patch
|
||||
patch_apply wined3d-CSMT_Main/0084-wined3d-Send-blits-through-the-command-stream.patch
|
||||
patch_apply wined3d-CSMT_Main/0085-wined3d-Get-rid-of-WINED3D_BUFFER_FLUSH.patch
|
||||
patch_apply wined3d-CSMT_Main/0086-wined3d-Don-t-force-strict-draw-ordering-for-multith.patch
|
||||
patch_apply wined3d-CSMT_Main/0087-wined3d-Send-render-target-view-clears-through-the-c.patch
|
||||
patch_apply wined3d-CSMT_Main/0088-wined3d-Wait-for-the-CS-in-GetDC.patch
|
||||
patch_apply wined3d-CSMT_Main/0089-wined3d-send-resource-maps-through-the-command-strea.patch
|
||||
patch_apply wined3d-CSMT_Main/0090-wined3d-Get-rid-of-the-end_scene-flush-and-finish.patch
|
||||
patch_apply wined3d-CSMT_Main/0091-wined3d-Replace-the-linked-lists-with-a-ringbuffer.patch
|
||||
patch_apply wined3d-CSMT_Main/0092-wined3d-Don-t-preload-buffers-on-unmap.patch
|
||||
patch_apply wined3d-CSMT_Main/0093-wined3d-Don-t-call-glFinish-before-swapping.patch
|
||||
patch_apply wined3d-CSMT_Main/0094-wined3d-wined3d_-_query_issue-never-fails.patch
|
||||
patch_apply wined3d-CSMT_Main/0095-wined3d-Add-query-support-to-the-command-stream.patch
|
||||
patch_apply wined3d-CSMT_Main/0096-wined3d-Check-our-CS-state-to-find-out-if-a-query-is.patch
|
||||
patch_apply wined3d-CSMT_Main/0097-wined3d-Poll-queries-automatically-in-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0098-wined3d-Introduce-a-separate-queue-for-priority-comm.patch
|
||||
patch_apply wined3d-CSMT_Main/0099-wined3d-Destroy-queries-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0100-wined3d-Separate-main-and-worker-thread-query-state.patch
|
||||
patch_apply wined3d-CSMT_Main/0101-wined3d-Don-t-poll-queries-that-failed-to-start.patch
|
||||
patch_apply wined3d-CSMT_Main/0102-wined3d-Remove-restated-queries-from-the-poll-list.patch
|
||||
patch_apply wined3d-CSMT_Main/0103-wined3d-Don-t-reset-the-query-state-if-it-doesn-t-ha.patch
|
||||
patch_apply wined3d-CSMT_Main/0104-wined3d-Put-this-into-the-query-poll-patch.patch
|
||||
patch_apply wined3d-CSMT_Main/0105-wined3d-Send-texture-preloads-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0106-wined3d-Send-update_texture-calls-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0107-wined3d-Get-rid-of-the-surface_upload_data-glFinish.patch
|
||||
patch_apply wined3d-CSMT_Main/0108-wined3d-Don-t-lock-the-src-volume-in-device_update_v.patch
|
||||
patch_apply wined3d-CSMT_Main/0109-wined3d-Handle-evit_managed_resources-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0110-wined3d-Introduce-resource-fencing.patch
|
||||
patch_apply wined3d-CSMT_Main/0111-wined3d-Fence-update_texture-and-update_surface-call.patch
|
||||
patch_apply wined3d-CSMT_Main/0112-wined3d-Dirtify-resources-on-unmap.patch
|
||||
patch_apply wined3d-CSMT_Main/0113-wined3d-Fence-texture-reads-in-draws.patch
|
||||
patch_apply wined3d-CSMT_Main/0114-wined3d-Fence-render-targets-and-depth-stencils.patch
|
||||
patch_apply wined3d-CSMT_Main/0115-wined3d-Fence-blit-operations.patch
|
||||
patch_apply wined3d-CSMT_Main/0116-wined3d-Fence-color_fill-operations.patch
|
||||
patch_apply wined3d-CSMT_Main/0117-wined3d-Fence-clear-calls.patch
|
||||
patch_apply wined3d-CSMT_Main/0118-wined3d-Fence-present-calls.patch
|
||||
patch_apply wined3d-CSMT_Main/0119-wined3d-Make-resource-maps-and-unmaps-a-priority-com.patch
|
||||
patch_apply wined3d-CSMT_Main/0120-wined3d-Dirtify-changed-textures-through-the-command.patch
|
||||
patch_apply wined3d-CSMT_Main/0121-wined3d-Wrap-GL-BOs-in-a-structure.patch
|
||||
patch_apply wined3d-CSMT_Main/0122-wined3d-Separate-resource-map-and-draw-buffers.patch
|
||||
patch_apply wined3d-CSMT_Main/0123-wined3d-Implement-DISCARD-resource-maps-with-buffers.patch
|
||||
patch_apply wined3d-CSMT_Main/0124-wined3d-Implement-DISCARD-resource-maps-with-heap-me.patch
|
||||
patch_apply wined3d-CSMT_Main/0125-wined3d-Unset-some-objects-in-state_init_default.patch
|
||||
patch_apply wined3d-CSMT_Main/0126-wined3d-Don-t-request-the-frontbuffer-to-create-dumm.patch
|
||||
patch_apply wined3d-CSMT_Main/0127-wined3d-Use-double-buffered-buffers-for-multithreade.patch
|
||||
patch_apply wined3d-CSMT_Main/0128-wined3d-Don-t-synchronize-NOOVERWRITE-buffer-maps.patch
|
||||
patch_apply wined3d-CSMT_Main/0129-wined3d-Separate-buffer-map-write-and-draw-read-memo.patch
|
||||
patch_apply wined3d-CSMT_Main/0130-wined3d-Accelerate-DISCARD-buffer-maps.patch
|
||||
patch_apply wined3d-CSMT_Main/0131-wined3d-Accelerate-READONLY-buffer-maps.patch
|
||||
patch_apply wined3d-CSMT_Main/0132-wined3d-Access-the-buffer-dirty-areas-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0133-wined3d-Ignore-buffer-resource.map_count-in-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0134-wined3d-Send-buffer-preloads-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0135-wined3d-Use-glBufferSubData-instead-of-glMapBufferRa.patch
|
||||
patch_apply wined3d-CSMT_Main/0136-wined3d-Separate-GL-buffer-discard-control-from-igno.patch
|
||||
patch_apply wined3d-CSMT_Main/0137-wined3d-Create-buffers-before-mapping-them.patch
|
||||
patch_apply wined3d-CSMT_Main/0138-wined3d-Destroy-views-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0139-wined3d-Remove-another-glFinish.patch
|
||||
patch_apply wined3d-CSMT_Main/0140-wined3d-Destroy-vertex-declarations-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0141-wined3d-Destroy-shaders-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0142-wined3d-Create-VBOs-through-the-command-stream.patch
|
||||
patch_apply wined3d-CSMT_Main/0143-wined3d-Clean-up-resource-data-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0144-wined3d-Clean-up-buffer-resource-data-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0145-wined3d-Clean-up-volume-resource-data-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0146-wined3d-Clean-up-surfaces-through-the-cs.patch
|
||||
patch_apply wined3d-CSMT_Main/0147-wined3d-Clean-up-texture-resources-through-the-cs.patch
|
||||
patch_apply wined3d-CSMT_Main/0148-wined3d-Unload-resources-through-the-CS-in-uninit_3d.patch
|
||||
patch_apply wined3d-CSMT_Main/0149-wined3d-Unload-resources-through-the-CS-in-device_re.patch
|
||||
patch_apply wined3d-CSMT_Main/0150-wined3d-Don-t-glFinish-after-a-depth-buffer-blit.patch
|
||||
patch_apply wined3d-CSMT_Main/0151-wined3d-Remove-software-cursor-support.patch
|
||||
patch_apply wined3d-CSMT_Main/0152-wined3d-Create-dummy-textures-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0153-wined3d-Create-the-initial-context-through-the-CS.patch
|
||||
patch_apply wined3d-CSMT_Main/0154-wined3d-Recreate-ctx-and-dummy-textures-through-the-.patch
|
||||
patch_apply wined3d-CSMT_Main/0155-wined3d-Ignore-WINED3D_MAP_NO_DIRTY_UPDATE-in-resour.patch
|
||||
patch_apply wined3d-CSMT_Main/0156-wined3d-Delete-GL-contexts-through-the-CS-in-reset.patch
|
||||
patch_apply wined3d-CSMT_Main/0157-wined3d-Delete-GL-contexts-through-the-CS-in-uninit_.patch
|
||||
patch_apply wined3d-CSMT_Main/0158-wined3d-Invoke-surface_unload-through-the-CS-in-wine.patch
|
||||
patch_apply wined3d-CSMT_Main/0159-wined3d-Use-an-event-to-block-the-worker-thread-when.patch
|
||||
patch_apply wined3d-CSMT_Main/0160-wined3d-Fence-preload-operations.patch
|
||||
patch_apply wined3d-CSMT_Main/0161-d3d8-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch
|
||||
patch_apply wined3d-CSMT_Main/0162-d3d9-tests-D3DLOCK_NO_DIRTY_UPDATE-on-managed-textur.patch
|
||||
patch_apply wined3d-CSMT_Main/0163-wined3d-Completely-reset-the-state-on-reset.patch
|
||||
patch_apply wined3d-CSMT_Main/0164-wined3d-Send-getdc-and-releasedc-through-the-command.patch
|
||||
patch_apply wined3d-CSMT_Main/0165-wined3d-Set-map_heap_memory-NULL-when-allocating-a-P.patch
|
||||
patch_apply wined3d-CSMT_Main/0166-wined3d-Wait-only-for-the-buffer-to-be-idle.patch
|
||||
patch_apply wined3d-CSMT_Main/0167-wined3d-Add-a-comment-about-worker-thread-lag.patch
|
||||
patch_apply wined3d-CSMT_Main/0168-wined3d-Remove-the-texture-destroy-glFinish.patch
|
||||
patch_apply wined3d-CSMT_Main/0169-wined3d-Move-FBO-destruction-into-the-worker-thread.patch
|
||||
patch_apply wined3d-CSMT_Main/0170-wined3d-Don-t-incref-decref-textures-in-color-depth-.patch
|
||||
patch_apply wined3d-CSMT_Main/0171-Winex11-complain-about-glfinish.patch
|
||||
patch_apply wined3d-CSMT_Main/0172-wined3d-Make-sure-the-new-window-is-set-up-before-se.patch
|
||||
patch_apply wined3d-CSMT_Main/0173-wined3d-Remove-the-device_reset-CS-sync-fixme.patch
|
||||
patch_apply wined3d-CSMT_Main/0174-wined3d-Put-GL_APPLE_flush_buffer_range-syncing-back.patch
|
||||
patch_apply wined3d-CSMT_Main/0175-wined3d-Wait-for-the-resource-to-be-idle-when-destro.patch
|
||||
patch_apply wined3d-CSMT_Main/0176-wined3d-Don-t-sync-on-redundant-discard-calls.patch
|
||||
patch_apply wined3d-CSMT_Main/0177-wined3d-Don-t-discard-new-buffers.patch
|
||||
patch_apply wined3d-CSMT_Main/0178-wined3d-Don-t-try-to-sync-VBOs-manually-on-OSX-with-.patch
|
||||
patch_apply wined3d-CSMT_Main/0179-wined3d-Render-target-lock-hack.patch
|
||||
patch_apply wined3d-CSMT_Main/0180-wined3d-Avoid-calling-wined3d_surface_blt-from-surfa.patch
|
||||
patch_apply wined3d-CSMT_Main/0181-wined3d-Only-discard-buffers-that-are-in-use.patch
|
||||
patch_apply wined3d-CSMT_Main/0182-wined3d-Destroy-samplers-through-the-command-stream.patch
|
||||
patch_apply wined3d-CSMT_Main/0183-wined3d-Hack-to-reject-unsupported-color-fills.patch
|
||||
patch_apply wined3d-CSMT_Main/0184-wined3d-Alloc-the-buffer-map-array-before-mapping-th.patch
|
||||
patch_apply wined3d-CSMT_Main/0185-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: Call wined3d_texture_set_dirty() in wined3d_volume_invalidate_location().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Merge surface_remove_pbo() and wined3d_volume_free_pbo().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Merge surface_prepare_buffer() and wined3d_volume_prepare_pbo().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Cleanup sub-resource buffer objects in wined3d_texture_cleanup().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Store surface/volume buffer objects in the sub-resource structure.\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Avoid volume_from_resource() in texture3d_prepare_texture().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Avoid surface_from_resource() in swapchain_gl_frontbuffer_updated().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Avoid surface_from_resource() in texture2d_prepare_texture().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Avoid surface_from_resource() in wined3d_texture_update_desc().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Use a single allocation for texture sub-resource objects.\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Get rid of wined3d_surface_ops.surface_unmap().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Keep track of front buffer updates in the swapchain.\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Get rid of the offscreenBuffer field in struct wined3d_device.\".", 1 },';
|
||||
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,41 @@
|
||||
From f4f3123974b03c4c7d671ce36f41bef336b1a8a6 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 6 Mar 2016 22:08:15 +0100
|
||||
Subject: Revert "wined3d: Call wined3d_texture_set_dirty() in
|
||||
wined3d_volume_invalidate_location()."
|
||||
|
||||
This reverts commit b23f21a9fb6e09afad6ac3327233130f8be979b2.
|
||||
---
|
||||
dlls/wined3d/volume.c | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
index 457067d..2d88af6 100644
|
||||
--- a/dlls/wined3d/volume.c
|
||||
+++ b/dlls/wined3d/volume.c
|
||||
@@ -109,11 +109,7 @@ void wined3d_volume_validate_location(struct wined3d_volume *volume, DWORD locat
|
||||
void wined3d_volume_invalidate_location(struct wined3d_volume *volume, DWORD location)
|
||||
{
|
||||
TRACE("Volume %p, clearing %s.\n", volume, wined3d_debug_location(location));
|
||||
-
|
||||
- if (location & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
- wined3d_texture_set_dirty(volume->container);
|
||||
volume->locations &= ~location;
|
||||
-
|
||||
TRACE("new location flags are %s.\n", wined3d_debug_location(volume->locations));
|
||||
}
|
||||
|
||||
@@ -556,7 +552,10 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
}
|
||||
|
||||
if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY)))
|
||||
+ {
|
||||
+ wined3d_texture_set_dirty(texture);
|
||||
wined3d_volume_invalidate_location(volume, ~volume->resource.map_binding);
|
||||
+ }
|
||||
|
||||
volume->resource.map_count++;
|
||||
|
||||
--
|
||||
2.7.1
|
||||
|
@ -0,0 +1,167 @@
|
||||
From 50e69e1a480a8910aa50b5e6201213ef9d35fea5 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 6 Mar 2016 22:08:35 +0100
|
||||
Subject: Revert "wined3d: Merge surface_remove_pbo() and
|
||||
wined3d_volume_free_pbo()."
|
||||
|
||||
This reverts commit 5141c082caabd0f18698fe611b57e885adf25fe7.
|
||||
---
|
||||
dlls/wined3d/surface.c | 19 ++++++++++++++++++-
|
||||
dlls/wined3d/texture.c | 27 ---------------------------
|
||||
dlls/wined3d/volume.c | 22 ++++++++++++++++++++++
|
||||
dlls/wined3d/wined3d_private.h | 2 --
|
||||
4 files changed, 40 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 469a493..3cd3782 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -996,6 +996,19 @@ static HRESULT wined3d_surface_depth_blt(struct wined3d_surface *src_surface, DW
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
+/* Context activation is done by the caller. */
|
||||
+static void surface_remove_pbo(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info)
|
||||
+{
|
||||
+ GLuint *buffer_object;
|
||||
+
|
||||
+ buffer_object = &surface->container->sub_resources[surface_get_sub_resource_idx(surface)].buffer_object;
|
||||
+ GL_EXTCALL(glDeleteBuffers(1, buffer_object));
|
||||
+ checkGLcall("glDeleteBuffers(1, buffer_object)");
|
||||
+
|
||||
+ *buffer_object = 0;
|
||||
+ surface_invalidate_location(surface, WINED3D_LOCATION_BUFFER);
|
||||
+}
|
||||
+
|
||||
static ULONG surface_resource_incref(struct wined3d_resource *resource)
|
||||
{
|
||||
struct wined3d_surface *surface = surface_from_resource(resource);
|
||||
@@ -1058,6 +1071,10 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
surface_invalidate_location(surface, ~surface->resource.map_binding);
|
||||
}
|
||||
|
||||
+ /* Destroy PBOs, but load them into real sysmem before */
|
||||
+ if (surface->container->sub_resources[surface_get_sub_resource_idx(surface)].buffer_object)
|
||||
+ surface_remove_pbo(surface, gl_info);
|
||||
+
|
||||
/* Destroy fbo render buffers. This is needed for implicit render targets, for
|
||||
* all application-created targets the application has to release the surface
|
||||
* before calling _Reset
|
||||
@@ -3664,7 +3681,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
|
||||
surface_prepare_map_memory(surface);
|
||||
surface_load_location(surface, context, surface->resource.map_binding);
|
||||
- wined3d_texture_remove_buffer_object(texture, surface_get_sub_resource_idx(surface), gl_info);
|
||||
+ surface_remove_pbo(surface, gl_info);
|
||||
}
|
||||
|
||||
surface_get_memory(surface, &data, surface->locations);
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 90a3978..9846f07 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -74,23 +74,6 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
-/* Context activation is done by the caller. */
|
||||
-void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture,
|
||||
- unsigned int sub_resource_idx, const struct wined3d_gl_info *gl_info)
|
||||
-{
|
||||
- GLuint *buffer_object;
|
||||
-
|
||||
- buffer_object = &texture->sub_resources[sub_resource_idx].buffer_object;
|
||||
- GL_EXTCALL(glDeleteBuffers(1, buffer_object));
|
||||
- checkGLcall("glDeleteBuffers");
|
||||
- texture->texture_ops->texture_sub_resource_invalidate_location(
|
||||
- texture->sub_resources[sub_resource_idx].resource, WINED3D_LOCATION_BUFFER);
|
||||
- *buffer_object = 0;
|
||||
-
|
||||
- TRACE("Deleted buffer object %u for texture %p, sub-resource %u.\n",
|
||||
- *buffer_object, texture, sub_resource_idx);
|
||||
-}
|
||||
-
|
||||
/* A GL context is provided by the caller */
|
||||
static void gltexture_delete(struct wined3d_device *device, const struct wined3d_gl_info *gl_info,
|
||||
struct gl_texture *tex)
|
||||
@@ -996,7 +979,6 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
|
||||
{
|
||||
struct wined3d_texture *texture = wined3d_texture_from_resource(resource);
|
||||
UINT sub_count = texture->level_count * texture->layer_count;
|
||||
- struct wined3d_context *context = NULL;
|
||||
UINT i;
|
||||
|
||||
TRACE("texture %p.\n", texture);
|
||||
@@ -1006,16 +988,7 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
|
||||
struct wined3d_resource *sub_resource = texture->sub_resources[i].resource;
|
||||
|
||||
sub_resource->resource_ops->resource_unload(sub_resource);
|
||||
-
|
||||
- if (texture->sub_resources[i].buffer_object)
|
||||
- {
|
||||
- if (!context)
|
||||
- context = context_acquire(texture->resource.device, NULL);
|
||||
- wined3d_texture_remove_buffer_object(texture, i, context->gl_info);
|
||||
- }
|
||||
}
|
||||
- if (context)
|
||||
- context_release(context);
|
||||
|
||||
wined3d_texture_force_reload(texture);
|
||||
wined3d_texture_unload_gl_texture(texture);
|
||||
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
index 2d88af6..fcadd39 100644
|
||||
--- a/dlls/wined3d/volume.c
|
||||
+++ b/dlls/wined3d/volume.c
|
||||
@@ -362,6 +362,19 @@ void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *
|
||||
srgb_mode ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB);
|
||||
}
|
||||
|
||||
+static void wined3d_volume_free_pbo(struct wined3d_volume *volume)
|
||||
+{
|
||||
+ GLuint *buffer_object = &volume->container->sub_resources[volume->texture_level].buffer_object;
|
||||
+ struct wined3d_context *context = context_acquire(volume->resource.device, NULL);
|
||||
+ const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
+
|
||||
+ TRACE("Deleting PBO %u belonging to volume %p.\n", *buffer_object, volume);
|
||||
+ GL_EXTCALL(glDeleteBuffers(1, buffer_object));
|
||||
+ checkGLcall("glDeleteBuffers");
|
||||
+ *buffer_object = 0;
|
||||
+ context_release(context);
|
||||
+}
|
||||
+
|
||||
void wined3d_volume_cleanup(struct wined3d_volume *volume)
|
||||
{
|
||||
TRACE("volume %p.\n", volume);
|
||||
@@ -394,6 +407,15 @@ static void volume_unload(struct wined3d_resource *resource)
|
||||
wined3d_volume_invalidate_location(volume, ~WINED3D_LOCATION_DISCARDED);
|
||||
}
|
||||
|
||||
+ if (volume->container->sub_resources[volume->texture_level].buffer_object)
|
||||
+ {
|
||||
+ /* Should not happen because only dynamic default pool volumes
|
||||
+ * have a buffer, and those are not evicted by device_evit_managed_resources
|
||||
+ * and must be freed before a non-ex device reset. */
|
||||
+ ERR("Unloading a volume with a buffer\n");
|
||||
+ wined3d_volume_free_pbo(volume);
|
||||
+ }
|
||||
+
|
||||
/* The texture name is managed by the container. */
|
||||
|
||||
resource_unload(resource);
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index da36985..28121b7 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2424,8 +2424,6 @@ void wined3d_texture_prepare_buffer_object(struct wined3d_texture *texture,
|
||||
unsigned int sub_resource_idx, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_prepare_texture(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
-void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture,
|
||||
- unsigned int sub_resource_idx, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_set_dirty(struct wined3d_texture *texture) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_set_swapchain(struct wined3d_texture *texture,
|
||||
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.7.1
|
||||
|
@ -0,0 +1,176 @@
|
||||
From b7cf2e2b12b808a6f7fc16b4b8b3b0d3f00bdb48 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 6 Mar 2016 22:08:36 +0100
|
||||
Subject: Revert "wined3d: Merge surface_prepare_buffer() and
|
||||
wined3d_volume_prepare_pbo()."
|
||||
|
||||
This reverts commit 87143e60ed5708b976754da872f7643ce0982172.
|
||||
---
|
||||
dlls/wined3d/surface.c | 44 ++++++++++++++++++++++++++++++++++--------
|
||||
dlls/wined3d/texture.c | 21 --------------------
|
||||
dlls/wined3d/volume.c | 20 ++++++++++++++++++-
|
||||
dlls/wined3d/wined3d_private.h | 2 --
|
||||
4 files changed, 55 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 3cd3782..208c254 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -489,6 +489,40 @@ static void surface_get_memory(const struct wined3d_surface *surface, struct win
|
||||
data->buffer_object = 0;
|
||||
}
|
||||
|
||||
+static void surface_prepare_buffer(struct wined3d_surface *surface)
|
||||
+{
|
||||
+ struct wined3d_context *context;
|
||||
+ GLuint *buffer_object;
|
||||
+ GLenum error;
|
||||
+ const struct wined3d_gl_info *gl_info;
|
||||
+
|
||||
+ buffer_object = &surface->container->sub_resources[surface_get_sub_resource_idx(surface)].buffer_object;
|
||||
+ if (*buffer_object)
|
||||
+ return;
|
||||
+
|
||||
+ context = context_acquire(surface->resource.device, NULL);
|
||||
+ gl_info = context->gl_info;
|
||||
+
|
||||
+ GL_EXTCALL(glGenBuffers(1, buffer_object));
|
||||
+ error = gl_info->gl_ops.gl.p_glGetError();
|
||||
+ if (!*buffer_object || error != GL_NO_ERROR)
|
||||
+ ERR("Failed to create a PBO with error %s (%#x).\n", debug_glerror(error), error);
|
||||
+
|
||||
+ TRACE("Binding PBO %u.\n", *buffer_object);
|
||||
+
|
||||
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, *buffer_object));
|
||||
+ checkGLcall("glBindBuffer");
|
||||
+
|
||||
+ GL_EXTCALL(glBufferData(GL_PIXEL_UNPACK_BUFFER, surface->resource.size + 4,
|
||||
+ NULL, GL_STREAM_DRAW));
|
||||
+ checkGLcall("glBufferData");
|
||||
+
|
||||
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
|
||||
+ checkGLcall("glBindBuffer");
|
||||
+
|
||||
+ context_release(context);
|
||||
+}
|
||||
+
|
||||
static void surface_prepare_system_memory(struct wined3d_surface *surface)
|
||||
{
|
||||
TRACE("surface %p.\n", surface);
|
||||
@@ -507,9 +541,6 @@ static void surface_prepare_system_memory(struct wined3d_surface *surface)
|
||||
|
||||
void surface_prepare_map_memory(struct wined3d_surface *surface)
|
||||
{
|
||||
- struct wined3d_texture *texture = surface->container;
|
||||
- struct wined3d_context *context;
|
||||
-
|
||||
switch (surface->resource.map_binding)
|
||||
{
|
||||
case WINED3D_LOCATION_SYSMEM:
|
||||
@@ -517,7 +548,7 @@ void surface_prepare_map_memory(struct wined3d_surface *surface)
|
||||
break;
|
||||
|
||||
case WINED3D_LOCATION_USER_MEMORY:
|
||||
- if (!texture->user_memory)
|
||||
+ if (!surface->container->user_memory)
|
||||
ERR("Map binding is set to WINED3D_LOCATION_USER_MEMORY but surface->user_memory is NULL.\n");
|
||||
break;
|
||||
|
||||
@@ -527,10 +558,7 @@ void surface_prepare_map_memory(struct wined3d_surface *surface)
|
||||
break;
|
||||
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
- context = context_acquire(texture->resource.device, NULL);
|
||||
- wined3d_texture_prepare_buffer_object(texture,
|
||||
- surface_get_sub_resource_idx(surface), context->gl_info);
|
||||
- context_release(context);
|
||||
+ surface_prepare_buffer(surface);
|
||||
break;
|
||||
|
||||
default:
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 9846f07..a8e9194 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -690,27 +690,6 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
return wined3d_surface_update_desc(surface, gl_info);
|
||||
}
|
||||
|
||||
-/* Context activation is done by the caller. */
|
||||
-void wined3d_texture_prepare_buffer_object(struct wined3d_texture *texture,
|
||||
- unsigned int sub_resource_idx, const struct wined3d_gl_info *gl_info)
|
||||
-{
|
||||
- GLuint *buffer_object;
|
||||
-
|
||||
- buffer_object = &texture->sub_resources[sub_resource_idx].buffer_object;
|
||||
- if (*buffer_object)
|
||||
- return;
|
||||
-
|
||||
- GL_EXTCALL(glGenBuffers(1, buffer_object));
|
||||
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, *buffer_object));
|
||||
- GL_EXTCALL(glBufferData(GL_PIXEL_UNPACK_BUFFER,
|
||||
- texture->sub_resources[sub_resource_idx].resource->size, NULL, GL_STREAM_DRAW));
|
||||
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
|
||||
- checkGLcall("Create buffer object");
|
||||
-
|
||||
- TRACE("Created buffer object %u for texture %p, sub-resource %u.\n",
|
||||
- *buffer_object, texture, sub_resource_idx);
|
||||
-}
|
||||
-
|
||||
void wined3d_texture_prepare_texture(struct wined3d_texture *texture, struct wined3d_context *context, BOOL srgb)
|
||||
{
|
||||
DWORD alloc_flag = srgb ? WINED3D_TEXTURE_SRGB_ALLOCATED : WINED3D_TEXTURE_RGB_ALLOCATED;
|
||||
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
index fcadd39..ef0d69b 100644
|
||||
--- a/dlls/wined3d/volume.c
|
||||
+++ b/dlls/wined3d/volume.c
|
||||
@@ -362,6 +362,24 @@ void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *
|
||||
srgb_mode ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB);
|
||||
}
|
||||
|
||||
+/* Context activation is done by the caller. */
|
||||
+static void wined3d_volume_prepare_pbo(struct wined3d_volume *volume, struct wined3d_context *context)
|
||||
+{
|
||||
+ GLuint *buffer_object = &volume->container->sub_resources[volume->texture_level].buffer_object;
|
||||
+ const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
+
|
||||
+ if (*buffer_object)
|
||||
+ return;
|
||||
+
|
||||
+ GL_EXTCALL(glGenBuffers(1, buffer_object));
|
||||
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, *buffer_object));
|
||||
+ GL_EXTCALL(glBufferData(GL_PIXEL_UNPACK_BUFFER, volume->resource.size, NULL, GL_STREAM_DRAW));
|
||||
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
|
||||
+ checkGLcall("Create PBO");
|
||||
+
|
||||
+ TRACE("Created PBO %u for volume %p.\n", *buffer_object, volume);
|
||||
+}
|
||||
+
|
||||
static void wined3d_volume_free_pbo(struct wined3d_volume *volume)
|
||||
{
|
||||
GLuint *buffer_object = &volume->container->sub_resources[volume->texture_level].buffer_object;
|
||||
@@ -488,7 +506,7 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
context = context_acquire(device, NULL);
|
||||
gl_info = context->gl_info;
|
||||
|
||||
- wined3d_texture_prepare_buffer_object(texture, volume->texture_level, gl_info);
|
||||
+ wined3d_volume_prepare_pbo(volume, context);
|
||||
if (flags & WINED3D_MAP_DISCARD)
|
||||
wined3d_volume_validate_location(volume, WINED3D_LOCATION_BUFFER);
|
||||
else
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 28121b7..468ff11 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2420,8 +2420,6 @@ struct wined3d_resource *wined3d_texture_get_sub_resource(const struct wined3d_t
|
||||
UINT sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_load(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
-void wined3d_texture_prepare_buffer_object(struct wined3d_texture *texture,
|
||||
- unsigned int sub_resource_idx, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_prepare_texture(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_set_dirty(struct wined3d_texture *texture) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.7.1
|
||||
|
@ -0,0 +1,102 @@
|
||||
From 9d8d5fb99efea2a4d8628429c811457b1b347647 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 6 Mar 2016 22:08:37 +0100
|
||||
Subject: Revert "wined3d: Cleanup sub-resource buffer objects in
|
||||
wined3d_texture_cleanup()."
|
||||
|
||||
This reverts commit 45fa5b6471093db4f97f90b661d1f89d56aa48e7.
|
||||
---
|
||||
dlls/wined3d/surface.c | 11 ++++++++++-
|
||||
dlls/wined3d/texture.c | 27 ---------------------------
|
||||
dlls/wined3d/volume.c | 3 +++
|
||||
3 files changed, 13 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 208c254..994756d 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -48,10 +48,13 @@ static unsigned int surface_get_sub_resource_idx(const struct wined3d_surface *s
|
||||
void wined3d_surface_cleanup(struct wined3d_surface *surface)
|
||||
{
|
||||
struct wined3d_surface *overlay, *cur;
|
||||
+ GLuint buffer_object;
|
||||
|
||||
TRACE("surface %p.\n", surface);
|
||||
|
||||
- if (surface->rb_multisample || surface->rb_resolved || !list_empty(&surface->renderbuffers))
|
||||
+ buffer_object = surface->container->sub_resources[surface_get_sub_resource_idx(surface)].buffer_object;
|
||||
+ if (buffer_object || surface->rb_multisample
|
||||
+ || surface->rb_resolved || !list_empty(&surface->renderbuffers))
|
||||
{
|
||||
struct wined3d_renderbuffer_entry *entry, *entry2;
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
@@ -61,6 +64,12 @@ void wined3d_surface_cleanup(struct wined3d_surface *surface)
|
||||
context = context_acquire(device, NULL);
|
||||
gl_info = context->gl_info;
|
||||
|
||||
+ if (buffer_object)
|
||||
+ {
|
||||
+ TRACE("Deleting buffer object %u.\n", buffer_object);
|
||||
+ GL_EXTCALL(glDeleteBuffers(1, &buffer_object));
|
||||
+ }
|
||||
+
|
||||
if (surface->rb_multisample)
|
||||
{
|
||||
TRACE("Deleting multisample renderbuffer %u.\n", surface->rb_multisample);
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index a8e9194..cb2b310f 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -108,35 +108,8 @@ static void wined3d_texture_unload_gl_texture(struct wined3d_texture *texture)
|
||||
|
||||
static void wined3d_texture_cleanup(struct wined3d_texture *texture)
|
||||
{
|
||||
- unsigned int sub_count = texture->level_count * texture->layer_count;
|
||||
- struct wined3d_device *device = texture->resource.device;
|
||||
- struct wined3d_context *context = NULL;
|
||||
- const struct wined3d_gl_info *gl_info;
|
||||
- GLuint buffer_object;
|
||||
- unsigned int i;
|
||||
-
|
||||
TRACE("texture %p.\n", texture);
|
||||
|
||||
- for (i = 0; i < sub_count; ++i)
|
||||
- {
|
||||
- if (!(buffer_object = texture->sub_resources[i].buffer_object))
|
||||
- continue;
|
||||
-
|
||||
- TRACE("Deleting buffer object %u.\n", buffer_object);
|
||||
-
|
||||
- /* We may not be able to get a context in wined3d_texture_cleanup() in
|
||||
- * general, but if a buffer object was previously created we can. */
|
||||
- if (!context)
|
||||
- {
|
||||
- context = context_acquire(device, NULL);
|
||||
- gl_info = context->gl_info;
|
||||
- }
|
||||
-
|
||||
- GL_EXTCALL(glDeleteBuffers(1, &buffer_object));
|
||||
- }
|
||||
- if (context)
|
||||
- context_release(context);
|
||||
-
|
||||
texture->texture_ops->texture_cleanup_sub_resources(texture);
|
||||
wined3d_texture_unload_gl_texture(texture);
|
||||
resource_cleanup(&texture->resource);
|
||||
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
index ef0d69b..3782642 100644
|
||||
--- a/dlls/wined3d/volume.c
|
||||
+++ b/dlls/wined3d/volume.c
|
||||
@@ -397,6 +397,9 @@ void wined3d_volume_cleanup(struct wined3d_volume *volume)
|
||||
{
|
||||
TRACE("volume %p.\n", volume);
|
||||
|
||||
+ if (volume->container->sub_resources[volume->texture_level].buffer_object)
|
||||
+ wined3d_volume_free_pbo(volume);
|
||||
+
|
||||
resource_cleanup(&volume->resource);
|
||||
}
|
||||
|
||||
--
|
||||
2.7.1
|
||||
|
@ -0,0 +1,422 @@
|
||||
From 0a30deac1b8dc66d9877369442f4cbc7fbde21cb Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 6 Mar 2016 22:08:39 +0100
|
||||
Subject: Revert "wined3d: Store surface/volume buffer objects in the
|
||||
sub-resource structure."
|
||||
|
||||
This reverts commit fbe27375370c426c781ba50841ef93ea6ff44502.
|
||||
---
|
||||
dlls/wined3d/surface.c | 52 ++++++++++++---------------------
|
||||
dlls/wined3d/texture.c | 4 +--
|
||||
dlls/wined3d/volume.c | 65 +++++++++++++++++-------------------------
|
||||
dlls/wined3d/wined3d_private.h | 6 ++--
|
||||
4 files changed, 51 insertions(+), 76 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 994756d..303bdc7 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -40,20 +40,13 @@ static const DWORD surface_simple_locations =
|
||||
WINED3D_LOCATION_SYSMEM | WINED3D_LOCATION_USER_MEMORY
|
||||
| WINED3D_LOCATION_DIB | WINED3D_LOCATION_BUFFER;
|
||||
|
||||
-static unsigned int surface_get_sub_resource_idx(const struct wined3d_surface *surface)
|
||||
-{
|
||||
- return surface->texture_layer * surface->container->level_count + surface->texture_level;
|
||||
-}
|
||||
-
|
||||
void wined3d_surface_cleanup(struct wined3d_surface *surface)
|
||||
{
|
||||
struct wined3d_surface *overlay, *cur;
|
||||
- GLuint buffer_object;
|
||||
|
||||
TRACE("surface %p.\n", surface);
|
||||
|
||||
- buffer_object = surface->container->sub_resources[surface_get_sub_resource_idx(surface)].buffer_object;
|
||||
- if (buffer_object || surface->rb_multisample
|
||||
+ if (surface->pbo || surface->rb_multisample
|
||||
|| surface->rb_resolved || !list_empty(&surface->renderbuffers))
|
||||
{
|
||||
struct wined3d_renderbuffer_entry *entry, *entry2;
|
||||
@@ -64,10 +57,10 @@ void wined3d_surface_cleanup(struct wined3d_surface *surface)
|
||||
context = context_acquire(device, NULL);
|
||||
gl_info = context->gl_info;
|
||||
|
||||
- if (buffer_object)
|
||||
+ if (surface->pbo)
|
||||
{
|
||||
- TRACE("Deleting buffer object %u.\n", buffer_object);
|
||||
- GL_EXTCALL(glDeleteBuffers(1, &buffer_object));
|
||||
+ TRACE("Deleting PBO %u.\n", surface->pbo);
|
||||
+ GL_EXTCALL(glDeleteBuffers(1, &surface->pbo));
|
||||
}
|
||||
|
||||
if (surface->rb_multisample)
|
||||
@@ -471,7 +464,7 @@ static void surface_get_memory(const struct wined3d_surface *surface, struct win
|
||||
if (location & WINED3D_LOCATION_BUFFER)
|
||||
{
|
||||
data->addr = NULL;
|
||||
- data->buffer_object = surface->container->sub_resources[surface_get_sub_resource_idx(surface)].buffer_object;
|
||||
+ data->buffer_object = surface->pbo;
|
||||
return;
|
||||
}
|
||||
if (location & WINED3D_LOCATION_USER_MEMORY)
|
||||
@@ -501,25 +494,23 @@ static void surface_get_memory(const struct wined3d_surface *surface, struct win
|
||||
static void surface_prepare_buffer(struct wined3d_surface *surface)
|
||||
{
|
||||
struct wined3d_context *context;
|
||||
- GLuint *buffer_object;
|
||||
GLenum error;
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
|
||||
- buffer_object = &surface->container->sub_resources[surface_get_sub_resource_idx(surface)].buffer_object;
|
||||
- if (*buffer_object)
|
||||
+ if (surface->pbo)
|
||||
return;
|
||||
|
||||
context = context_acquire(surface->resource.device, NULL);
|
||||
gl_info = context->gl_info;
|
||||
|
||||
- GL_EXTCALL(glGenBuffers(1, buffer_object));
|
||||
+ GL_EXTCALL(glGenBuffers(1, &surface->pbo));
|
||||
error = gl_info->gl_ops.gl.p_glGetError();
|
||||
- if (!*buffer_object || error != GL_NO_ERROR)
|
||||
+ if (!surface->pbo || error != GL_NO_ERROR)
|
||||
ERR("Failed to create a PBO with error %s (%#x).\n", debug_glerror(error), error);
|
||||
|
||||
- TRACE("Binding PBO %u.\n", *buffer_object);
|
||||
+ TRACE("Binding PBO %u.\n", surface->pbo);
|
||||
|
||||
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, *buffer_object));
|
||||
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, surface->pbo));
|
||||
checkGLcall("glBindBuffer");
|
||||
|
||||
GL_EXTCALL(glBufferData(GL_PIXEL_UNPACK_BUFFER, surface->resource.size + 4,
|
||||
@@ -1036,13 +1027,10 @@ static HRESULT wined3d_surface_depth_blt(struct wined3d_surface *src_surface, DW
|
||||
/* Context activation is done by the caller. */
|
||||
static void surface_remove_pbo(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info)
|
||||
{
|
||||
- GLuint *buffer_object;
|
||||
+ GL_EXTCALL(glDeleteBuffers(1, &surface->pbo));
|
||||
+ checkGLcall("glDeleteBuffers(1, &surface->pbo)");
|
||||
|
||||
- buffer_object = &surface->container->sub_resources[surface_get_sub_resource_idx(surface)].buffer_object;
|
||||
- GL_EXTCALL(glDeleteBuffers(1, buffer_object));
|
||||
- checkGLcall("glDeleteBuffers(1, buffer_object)");
|
||||
-
|
||||
- *buffer_object = 0;
|
||||
+ surface->pbo = 0;
|
||||
surface_invalidate_location(surface, WINED3D_LOCATION_BUFFER);
|
||||
}
|
||||
|
||||
@@ -1109,7 +1097,7 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
}
|
||||
|
||||
/* Destroy PBOs, but load them into real sysmem before */
|
||||
- if (surface->container->sub_resources[surface_get_sub_resource_idx(surface)].buffer_object)
|
||||
+ if (surface->pbo)
|
||||
surface_remove_pbo(surface, gl_info);
|
||||
|
||||
/* Destroy fbo render buffers. This is needed for implicit render targets, for
|
||||
@@ -2179,9 +2167,9 @@ do { \
|
||||
HRESULT wined3d_surface_unmap(struct wined3d_surface *surface)
|
||||
{
|
||||
struct wined3d_device *device = surface->resource.device;
|
||||
- struct wined3d_texture *texture = surface->container;
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
struct wined3d_context *context;
|
||||
+ struct wined3d_texture *texture;
|
||||
|
||||
TRACE("surface %p.\n", surface);
|
||||
|
||||
@@ -2203,8 +2191,7 @@ HRESULT wined3d_surface_unmap(struct wined3d_surface *surface)
|
||||
context = context_acquire(device, NULL);
|
||||
gl_info = context->gl_info;
|
||||
|
||||
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER,
|
||||
- texture->sub_resources[surface_get_sub_resource_idx(surface)].buffer_object));
|
||||
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, surface->pbo));
|
||||
GL_EXTCALL(glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER));
|
||||
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
|
||||
checkGLcall("glUnmapBuffer");
|
||||
@@ -2218,6 +2205,7 @@ HRESULT wined3d_surface_unmap(struct wined3d_surface *surface)
|
||||
|
||||
if (!(surface->locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_TEXTURE_RGB)))
|
||||
{
|
||||
+ texture = surface->container;
|
||||
if (texture->swapchain && texture->swapchain->front_buffer == texture)
|
||||
texture->swapchain->swapchain_ops->swapchain_frontbuffer_updated(texture->swapchain);
|
||||
else if (texture->resource.format_flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
|
||||
@@ -2319,8 +2307,7 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
context = context_acquire(device, NULL);
|
||||
gl_info = context->gl_info;
|
||||
|
||||
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER,
|
||||
- texture->sub_resources[surface_get_sub_resource_idx(surface)].buffer_object));
|
||||
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, surface->pbo));
|
||||
base_memory = GL_EXTCALL(glMapBuffer(GL_PIXEL_UNPACK_BUFFER, GL_READ_WRITE));
|
||||
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
|
||||
checkGLcall("map PBO");
|
||||
@@ -3706,8 +3693,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
/* Don't use PBOs for converted surfaces. During PBO conversion we look at
|
||||
* WINED3D_TEXTURE_CONVERTED but it isn't set (yet) in all cases it is
|
||||
* getting called. */
|
||||
- if ((format.convert || conversion)
|
||||
- && texture->sub_resources[surface_get_sub_resource_idx(surface)].buffer_object)
|
||||
+ if ((format.convert || conversion) && surface->pbo)
|
||||
{
|
||||
TRACE("Removing the pbo attached to surface %p.\n", surface);
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index cb2b310f..01f54a9 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1770,8 +1770,8 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
if (!(surface->resource.map_binding == WINED3D_LOCATION_USER_MEMORY
|
||||
- || texture->flags & WINED3D_TEXTURE_PIN_SYSMEM
|
||||
- || texture->sub_resources[sub_resource_idx].buffer_object))
|
||||
+ || surface->container->flags & WINED3D_TEXTURE_PIN_SYSMEM
|
||||
+ || surface->pbo))
|
||||
surface->resource.map_binding = WINED3D_LOCATION_DIB;
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
index 3782642..4b726d7 100644
|
||||
--- a/dlls/wined3d/volume.c
|
||||
+++ b/dlls/wined3d/volume.c
|
||||
@@ -214,7 +214,6 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume,
|
||||
struct wined3d_context *context, DWORD location)
|
||||
{
|
||||
DWORD required_access = volume_access_from_location(location);
|
||||
- struct wined3d_texture *texture = volume->container;
|
||||
|
||||
TRACE("Volume %p, loading %s, have %s.\n", volume, wined3d_debug_location(location),
|
||||
wined3d_debug_location(volume->locations));
|
||||
@@ -237,9 +236,9 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume,
|
||||
case WINED3D_LOCATION_TEXTURE_RGB:
|
||||
case WINED3D_LOCATION_TEXTURE_SRGB:
|
||||
if ((location == WINED3D_LOCATION_TEXTURE_RGB
|
||||
- && !(texture->flags & WINED3D_TEXTURE_RGB_ALLOCATED))
|
||||
+ && !(volume->container->flags & WINED3D_TEXTURE_RGB_ALLOCATED))
|
||||
|| (location == WINED3D_LOCATION_TEXTURE_SRGB
|
||||
- && !(texture->flags & WINED3D_TEXTURE_SRGB_ALLOCATED)))
|
||||
+ && !(volume->container->flags & WINED3D_TEXTURE_SRGB_ALLOCATED)))
|
||||
ERR("Trying to load (s)RGB texture without prior allocation.\n");
|
||||
|
||||
if (volume->locations & WINED3D_LOCATION_DISCARDED)
|
||||
@@ -250,18 +249,14 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume,
|
||||
else if (volume->locations & WINED3D_LOCATION_SYSMEM)
|
||||
{
|
||||
struct wined3d_const_bo_address data = {0, volume->resource.heap_memory};
|
||||
- wined3d_texture_bind_and_dirtify(texture, context,
|
||||
+ wined3d_texture_bind_and_dirtify(volume->container, context,
|
||||
location == WINED3D_LOCATION_TEXTURE_SRGB);
|
||||
wined3d_volume_upload_data(volume, context, &data);
|
||||
}
|
||||
else if (volume->locations & WINED3D_LOCATION_BUFFER)
|
||||
{
|
||||
- struct wined3d_const_bo_address data =
|
||||
- {
|
||||
- texture->sub_resources[volume->texture_level].buffer_object,
|
||||
- NULL
|
||||
- };
|
||||
- wined3d_texture_bind_and_dirtify(texture, context,
|
||||
+ struct wined3d_const_bo_address data = {volume->pbo, NULL};
|
||||
+ wined3d_texture_bind_and_dirtify(volume->container, context,
|
||||
location == WINED3D_LOCATION_TEXTURE_SRGB);
|
||||
wined3d_volume_upload_data(volume, context, &data);
|
||||
}
|
||||
@@ -299,9 +294,9 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume,
|
||||
struct wined3d_bo_address data = {0, volume->resource.heap_memory};
|
||||
|
||||
if (volume->locations & WINED3D_LOCATION_TEXTURE_RGB)
|
||||
- wined3d_texture_bind_and_dirtify(texture, context, FALSE);
|
||||
+ wined3d_texture_bind_and_dirtify(volume->container, context, FALSE);
|
||||
else
|
||||
- wined3d_texture_bind_and_dirtify(texture, context, TRUE);
|
||||
+ wined3d_texture_bind_and_dirtify(volume->container, context, TRUE);
|
||||
|
||||
volume->download_count++;
|
||||
wined3d_volume_download_data(volume, context, &data);
|
||||
@@ -316,7 +311,7 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume,
|
||||
break;
|
||||
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
- if (!texture->sub_resources[volume->texture_level].buffer_object)
|
||||
+ if (!volume->pbo)
|
||||
ERR("Trying to load WINED3D_LOCATION_BUFFER without setting it up first.\n");
|
||||
|
||||
if (volume->locations & WINED3D_LOCATION_DISCARDED)
|
||||
@@ -326,16 +321,12 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume,
|
||||
}
|
||||
else if (volume->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
{
|
||||
- struct wined3d_bo_address data =
|
||||
- {
|
||||
- texture->sub_resources[volume->texture_level].buffer_object,
|
||||
- NULL
|
||||
- };
|
||||
+ struct wined3d_bo_address data = {volume->pbo, NULL};
|
||||
|
||||
if (volume->locations & WINED3D_LOCATION_TEXTURE_RGB)
|
||||
- wined3d_texture_bind_and_dirtify(texture, context, FALSE);
|
||||
+ wined3d_texture_bind_and_dirtify(volume->container, context, FALSE);
|
||||
else
|
||||
- wined3d_texture_bind_and_dirtify(texture, context, TRUE);
|
||||
+ wined3d_texture_bind_and_dirtify(volume->container, context, TRUE);
|
||||
|
||||
wined3d_volume_download_data(volume, context, &data);
|
||||
}
|
||||
@@ -365,31 +356,29 @@ void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *
|
||||
/* Context activation is done by the caller. */
|
||||
static void wined3d_volume_prepare_pbo(struct wined3d_volume *volume, struct wined3d_context *context)
|
||||
{
|
||||
- GLuint *buffer_object = &volume->container->sub_resources[volume->texture_level].buffer_object;
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
|
||||
- if (*buffer_object)
|
||||
+ if (volume->pbo)
|
||||
return;
|
||||
|
||||
- GL_EXTCALL(glGenBuffers(1, buffer_object));
|
||||
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, *buffer_object));
|
||||
+ GL_EXTCALL(glGenBuffers(1, &volume->pbo));
|
||||
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, volume->pbo));
|
||||
GL_EXTCALL(glBufferData(GL_PIXEL_UNPACK_BUFFER, volume->resource.size, NULL, GL_STREAM_DRAW));
|
||||
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
|
||||
checkGLcall("Create PBO");
|
||||
|
||||
- TRACE("Created PBO %u for volume %p.\n", *buffer_object, volume);
|
||||
+ TRACE("Created PBO %u for volume %p.\n", volume->pbo, volume);
|
||||
}
|
||||
|
||||
static void wined3d_volume_free_pbo(struct wined3d_volume *volume)
|
||||
{
|
||||
- GLuint *buffer_object = &volume->container->sub_resources[volume->texture_level].buffer_object;
|
||||
struct wined3d_context *context = context_acquire(volume->resource.device, NULL);
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
|
||||
- TRACE("Deleting PBO %u belonging to volume %p.\n", *buffer_object, volume);
|
||||
- GL_EXTCALL(glDeleteBuffers(1, buffer_object));
|
||||
+ TRACE("Deleting PBO %u belonging to volume %p.\n", volume->pbo, volume);
|
||||
+ GL_EXTCALL(glDeleteBuffers(1, &volume->pbo));
|
||||
checkGLcall("glDeleteBuffers");
|
||||
- *buffer_object = 0;
|
||||
+ volume->pbo = 0;
|
||||
context_release(context);
|
||||
}
|
||||
|
||||
@@ -397,7 +386,7 @@ void wined3d_volume_cleanup(struct wined3d_volume *volume)
|
||||
{
|
||||
TRACE("volume %p.\n", volume);
|
||||
|
||||
- if (volume->container->sub_resources[volume->texture_level].buffer_object)
|
||||
+ if (volume->pbo)
|
||||
wined3d_volume_free_pbo(volume);
|
||||
|
||||
resource_cleanup(&volume->resource);
|
||||
@@ -428,7 +417,7 @@ static void volume_unload(struct wined3d_resource *resource)
|
||||
wined3d_volume_invalidate_location(volume, ~WINED3D_LOCATION_DISCARDED);
|
||||
}
|
||||
|
||||
- if (volume->container->sub_resources[volume->texture_level].buffer_object)
|
||||
+ if (volume->pbo)
|
||||
{
|
||||
/* Should not happen because only dynamic default pool volumes
|
||||
* have a buffer, and those are not evicted by device_evit_managed_resources
|
||||
@@ -468,12 +457,11 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags)
|
||||
{
|
||||
struct wined3d_device *device = volume->resource.device;
|
||||
- struct wined3d_texture *texture = volume->container;
|
||||
struct wined3d_context *context;
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
BYTE *base_memory;
|
||||
const struct wined3d_format *format = volume->resource.format;
|
||||
- const unsigned int fmt_flags = texture->resource.format_flags;
|
||||
+ const unsigned int fmt_flags = volume->container->resource.format_flags;
|
||||
|
||||
TRACE("volume %p, map_desc %p, box %s, flags %#x.\n",
|
||||
volume, map_desc, debug_box(box), flags);
|
||||
@@ -495,7 +483,7 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
if ((fmt_flags & WINED3DFMT_FLAG_BLOCKS) && box
|
||||
- && !wined3d_texture_check_block_align(texture, volume->texture_level, box))
|
||||
+ && !wined3d_texture_check_block_align(volume->container, volume->texture_level, box))
|
||||
{
|
||||
WARN("Map box %s is misaligned for %ux%u blocks.\n",
|
||||
debug_box(box), format->block_width, format->block_height);
|
||||
@@ -515,7 +503,7 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
else
|
||||
wined3d_volume_load_location(volume, context, WINED3D_LOCATION_BUFFER);
|
||||
|
||||
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, texture->sub_resources[volume->texture_level].buffer_object));
|
||||
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, volume->pbo));
|
||||
|
||||
if (gl_info->supported[ARB_MAP_BUFFER_RANGE])
|
||||
{
|
||||
@@ -566,7 +554,7 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
}
|
||||
else
|
||||
{
|
||||
- wined3d_texture_get_pitch(texture, volume->texture_level,
|
||||
+ wined3d_texture_get_pitch(volume->container, volume->texture_level,
|
||||
&map_desc->row_pitch, &map_desc->slice_pitch);
|
||||
}
|
||||
|
||||
@@ -596,7 +584,7 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
|
||||
if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY)))
|
||||
{
|
||||
- wined3d_texture_set_dirty(texture);
|
||||
+ wined3d_texture_set_dirty(volume->container);
|
||||
wined3d_volume_invalidate_location(volume, ~volume->resource.map_binding);
|
||||
}
|
||||
|
||||
@@ -624,8 +612,7 @@ HRESULT wined3d_volume_unmap(struct wined3d_volume *volume)
|
||||
struct wined3d_context *context = context_acquire(device, NULL);
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
|
||||
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER,
|
||||
- volume->container->sub_resources[volume->texture_level].buffer_object));
|
||||
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, volume->pbo));
|
||||
GL_EXTCALL(glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER));
|
||||
GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
|
||||
checkGLcall("Unmap PBO");
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 468ff11..1774039 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2391,8 +2391,6 @@ struct wined3d_texture
|
||||
struct wined3d_surface *surface;
|
||||
struct wined3d_volume *volume;
|
||||
} u;
|
||||
-
|
||||
- GLuint buffer_object;
|
||||
} sub_resources[1];
|
||||
};
|
||||
|
||||
@@ -2447,6 +2445,7 @@ struct wined3d_volume
|
||||
DWORD locations;
|
||||
GLint texture_level;
|
||||
DWORD download_count;
|
||||
+ GLuint pbo;
|
||||
};
|
||||
|
||||
static inline struct wined3d_volume *volume_from_resource(struct wined3d_resource *resource)
|
||||
@@ -2522,6 +2521,9 @@ struct wined3d_surface
|
||||
|
||||
UINT pow2Width;
|
||||
UINT pow2Height;
|
||||
+
|
||||
+ /* PBO */
|
||||
+ GLuint pbo;
|
||||
GLuint rb_multisample;
|
||||
GLuint rb_resolved;
|
||||
GLenum texture_target;
|
||||
--
|
||||
2.7.1
|
||||
|
@ -0,0 +1,27 @@
|
||||
From 0b0c0691884fbf0335df4d89bf94774205622da4 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 6 Mar 2016 22:08:40 +0100
|
||||
Subject: Revert "wined3d: Avoid volume_from_resource() in
|
||||
texture3d_prepare_texture()."
|
||||
|
||||
This reverts commit 09c862b6a23c35c2157842f1f7a1fa9a8d17da1d.
|
||||
---
|
||||
dlls/wined3d/texture.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 01f54a9..af1c1de 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1207,7 +1207,7 @@ static void texture3d_prepare_texture(struct wined3d_texture *texture, struct wi
|
||||
|
||||
for (i = 0; i < sub_count; ++i)
|
||||
{
|
||||
- struct wined3d_volume *volume = texture->sub_resources[i].u.volume;
|
||||
+ struct wined3d_volume *volume = volume_from_resource(texture->sub_resources[i].resource);
|
||||
|
||||
GL_EXTCALL(glTexImage3D(GL_TEXTURE_3D, volume->texture_level,
|
||||
srgb ? format->glGammaInternal : format->glInternal,
|
||||
--
|
||||
2.7.1
|
||||
|
@ -0,0 +1,27 @@
|
||||
From a3ec578ff5afb88dddec526bb21981343f7429ea Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 6 Mar 2016 22:08:41 +0100
|
||||
Subject: Revert "wined3d: Avoid surface_from_resource() in
|
||||
swapchain_gl_frontbuffer_updated()."
|
||||
|
||||
This reverts commit c059191e0fe795e4643e56bb2ab806c9ce994055.
|
||||
---
|
||||
dlls/wined3d/swapchain.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index 299a47a..9b8d04c 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -652,7 +652,7 @@ static void swapchain_gl_frontbuffer_updated(struct wined3d_swapchain *swapchain
|
||||
struct wined3d_surface *surface;
|
||||
struct wined3d_context *context;
|
||||
|
||||
- surface = swapchain->front_buffer->sub_resources[0].u.surface;
|
||||
+ surface = surface_from_resource(swapchain->front_buffer->sub_resources[0].resource);
|
||||
context = context_acquire(swapchain->device, surface);
|
||||
surface_load_location(surface, context, surface->container->resource.draw_binding);
|
||||
context_release(context);
|
||||
--
|
||||
2.7.1
|
||||
|
@ -0,0 +1,27 @@
|
||||
From 22489d4035d07941ef326dc05ac4fda8fee8b985 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 6 Mar 2016 22:08:43 +0100
|
||||
Subject: Revert "wined3d: Avoid surface_from_resource() in
|
||||
texture2d_prepare_texture()."
|
||||
|
||||
This reverts commit b309b831deb81f47b22f0c25a5fc0a1db6759d6d.
|
||||
---
|
||||
dlls/wined3d/texture.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index af1c1de..651318c 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -868,7 +868,7 @@ static void texture2d_prepare_texture(struct wined3d_texture *texture, struct wi
|
||||
|
||||
for (i = 0; i < sub_count; ++i)
|
||||
{
|
||||
- struct wined3d_surface *surface = texture->sub_resources[i].u.surface;
|
||||
+ struct wined3d_surface *surface = surface_from_resource(texture->sub_resources[i].resource);
|
||||
GLsizei height = surface->pow2Height;
|
||||
GLsizei width = surface->pow2Width;
|
||||
|
||||
--
|
||||
2.7.1
|
||||
|
@ -0,0 +1,27 @@
|
||||
From a88ae9c0bcb8ba8eb4fd9892a6928f38c9add605 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 6 Mar 2016 22:08:44 +0100
|
||||
Subject: Revert "wined3d: Avoid surface_from_resource() in
|
||||
wined3d_texture_update_desc()."
|
||||
|
||||
This reverts commit aad8f74cc8b6cf382026bbaf2f929d240f2d326f.
|
||||
---
|
||||
dlls/wined3d/texture.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 651318c..a664155 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -631,7 +631,7 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
- surface = texture->sub_resources[0].u.surface;
|
||||
+ surface = surface_from_resource(texture->sub_resources[0].resource);
|
||||
if (surface->resource.map_count || (surface->flags & SFLAG_DCINUSE))
|
||||
{
|
||||
WARN("Surface is mapped or the DC is in use.\n");
|
||||
--
|
||||
2.7.1
|
||||
|
@ -0,0 +1,519 @@
|
||||
From 36e2eb72fa6debbdb8b5064a448e1fc0a4abfab1 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 6 Mar 2016 22:08:45 +0100
|
||||
Subject: Revert "wined3d: Use a single allocation for texture sub-resource
|
||||
objects."
|
||||
|
||||
This reverts commit e3e5dcd2cd548bed34cc193383da96c1898fee2c.
|
||||
---
|
||||
dlls/wined3d/surface.c | 57 +++++++++++++++++-
|
||||
dlls/wined3d/texture.c | 130 +++++++++++------------------------------
|
||||
dlls/wined3d/volume.c | 47 ++++++++++++++-
|
||||
dlls/wined3d/wined3d_private.h | 25 ++++----
|
||||
4 files changed, 142 insertions(+), 117 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 303bdc7..01095e9 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -40,7 +40,7 @@ static const DWORD surface_simple_locations =
|
||||
WINED3D_LOCATION_SYSMEM | WINED3D_LOCATION_USER_MEMORY
|
||||
| WINED3D_LOCATION_DIB | WINED3D_LOCATION_BUFFER;
|
||||
|
||||
-void wined3d_surface_cleanup(struct wined3d_surface *surface)
|
||||
+static void surface_cleanup(struct wined3d_surface *surface)
|
||||
{
|
||||
struct wined3d_surface *overlay, *cur;
|
||||
|
||||
@@ -107,6 +107,15 @@ void wined3d_surface_cleanup(struct wined3d_surface *surface)
|
||||
resource_cleanup(&surface->resource);
|
||||
}
|
||||
|
||||
+void wined3d_surface_destroy(struct wined3d_surface *surface)
|
||||
+{
|
||||
+ TRACE("surface %p.\n", surface);
|
||||
+
|
||||
+ surface_cleanup(surface);
|
||||
+ surface->resource.parent_ops->wined3d_object_destroyed(surface->resource.parent);
|
||||
+ HeapFree(GetProcessHeap(), 0, surface);
|
||||
+}
|
||||
+
|
||||
void surface_get_drawable_size(const struct wined3d_surface *surface, const struct wined3d_context *context,
|
||||
unsigned int *width, unsigned int *height)
|
||||
{
|
||||
@@ -5003,7 +5012,7 @@ cpu:
|
||||
return surface_cpu_blt(dst_surface, dst_rect, src_surface, src_rect, flags, fx, filter);
|
||||
}
|
||||
|
||||
-HRESULT wined3d_surface_init(struct wined3d_surface *surface, struct wined3d_texture *container,
|
||||
+static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_texture *container,
|
||||
const struct wined3d_resource_desc *desc, GLenum target, unsigned int level, unsigned int layer, DWORD flags)
|
||||
{
|
||||
struct wined3d_device *device = container->resource.device;
|
||||
@@ -5081,7 +5090,7 @@ HRESULT wined3d_surface_init(struct wined3d_surface *surface, struct wined3d_tex
|
||||
if (FAILED(hr = surface->surface_ops->surface_private_setup(surface)))
|
||||
{
|
||||
ERR("Private setup failed, hr %#x.\n", hr);
|
||||
- wined3d_surface_cleanup(surface);
|
||||
+ surface_cleanup(surface);
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -5102,6 +5111,48 @@ HRESULT wined3d_surface_init(struct wined3d_surface *surface, struct wined3d_tex
|
||||
return hr;
|
||||
}
|
||||
|
||||
+HRESULT wined3d_surface_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc,
|
||||
+ GLenum target, unsigned int level, unsigned int layer, DWORD flags, struct wined3d_surface **surface)
|
||||
+{
|
||||
+ struct wined3d_device_parent *device_parent = container->resource.device->device_parent;
|
||||
+ const struct wined3d_parent_ops *parent_ops;
|
||||
+ struct wined3d_surface *object;
|
||||
+ void *parent;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ TRACE("container %p, width %u, height %u, format %s, usage %s (%#x), pool %s, "
|
||||
+ "multisample_type %#x, multisample_quality %u, target %#x, level %u, layer %u, flags %#x, surface %p.\n",
|
||||
+ container, desc->width, desc->height, debug_d3dformat(desc->format),
|
||||
+ debug_d3dusage(desc->usage), desc->usage, debug_d3dpool(desc->pool),
|
||||
+ desc->multisample_type, desc->multisample_quality, target, level, layer, flags, surface);
|
||||
+
|
||||
+ if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ if (FAILED(hr = surface_init(object, container, desc, target, level, layer, flags)))
|
||||
+ {
|
||||
+ WARN("Failed to initialize surface, returning %#x.\n", hr);
|
||||
+ HeapFree(GetProcessHeap(), 0, object);
|
||||
+ return hr;
|
||||
+ }
|
||||
+
|
||||
+ if (FAILED(hr = device_parent->ops->surface_created(device_parent,
|
||||
+ container, layer * container->level_count + level, &parent, &parent_ops)))
|
||||
+ {
|
||||
+ WARN("Failed to create surface parent, hr %#x.\n", hr);
|
||||
+ wined3d_surface_destroy(object);
|
||||
+ return hr;
|
||||
+ }
|
||||
+
|
||||
+ TRACE("Created surface %p, parent %p, parent_ops %p.\n", object, parent, parent_ops);
|
||||
+
|
||||
+ object->resource.parent = parent;
|
||||
+ object->resource.parent_ops = parent_ops;
|
||||
+ *surface = object;
|
||||
+
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
/* Context activation is done by the caller. */
|
||||
void wined3d_surface_prepare(struct wined3d_surface *surface, struct wined3d_context *context, DWORD location)
|
||||
{
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index a664155..e96b029 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -108,9 +108,19 @@ static void wined3d_texture_unload_gl_texture(struct wined3d_texture *texture)
|
||||
|
||||
static void wined3d_texture_cleanup(struct wined3d_texture *texture)
|
||||
{
|
||||
+ UINT sub_count = texture->level_count * texture->layer_count;
|
||||
+ UINT i;
|
||||
+
|
||||
TRACE("texture %p.\n", texture);
|
||||
|
||||
- texture->texture_ops->texture_cleanup_sub_resources(texture);
|
||||
+ for (i = 0; i < sub_count; ++i)
|
||||
+ {
|
||||
+ struct wined3d_resource *sub_resource = texture->sub_resources[i].resource;
|
||||
+
|
||||
+ if (sub_resource)
|
||||
+ texture->texture_ops->texture_sub_resource_cleanup(sub_resource);
|
||||
+ }
|
||||
+
|
||||
wined3d_texture_unload_gl_texture(texture);
|
||||
resource_cleanup(&texture->resource);
|
||||
}
|
||||
@@ -794,6 +804,13 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
|
||||
surface_invalidate_location(surface, ~surface->resource.map_binding);
|
||||
}
|
||||
|
||||
+static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource)
|
||||
+{
|
||||
+ struct wined3d_surface *surface = surface_from_resource(sub_resource);
|
||||
+
|
||||
+ wined3d_surface_destroy(surface);
|
||||
+}
|
||||
+
|
||||
static void texture2d_sub_resource_invalidate_location(struct wined3d_resource *sub_resource, DWORD location)
|
||||
{
|
||||
struct wined3d_surface *surface = surface_from_resource(sub_resource);
|
||||
@@ -887,34 +904,15 @@ static void texture2d_prepare_texture(struct wined3d_texture *texture, struct wi
|
||||
}
|
||||
}
|
||||
|
||||
-static void texture2d_cleanup_sub_resources(struct wined3d_texture *texture)
|
||||
-{
|
||||
- unsigned int sub_count = texture->level_count * texture->layer_count;
|
||||
- struct wined3d_surface *surface;
|
||||
- unsigned int i;
|
||||
-
|
||||
- for (i = 0; i < sub_count; ++i)
|
||||
- {
|
||||
- if ((surface = texture->sub_resources[i].u.surface))
|
||||
- {
|
||||
- TRACE("surface %p.\n", surface);
|
||||
-
|
||||
- wined3d_surface_cleanup(surface);
|
||||
- surface->resource.parent_ops->wined3d_object_destroyed(surface->resource.parent);
|
||||
- }
|
||||
- }
|
||||
- HeapFree(GetProcessHeap(), 0, texture->sub_resources[0].u.surface);
|
||||
-}
|
||||
-
|
||||
static const struct wined3d_texture_ops texture2d_ops =
|
||||
{
|
||||
texture2d_sub_resource_load,
|
||||
texture2d_sub_resource_add_dirty_region,
|
||||
+ texture2d_sub_resource_cleanup,
|
||||
texture2d_sub_resource_invalidate_location,
|
||||
texture2d_sub_resource_validate_location,
|
||||
texture2d_sub_resource_upload_data,
|
||||
texture2d_prepare_texture,
|
||||
- texture2d_cleanup_sub_resources,
|
||||
};
|
||||
|
||||
static ULONG texture_resource_incref(struct wined3d_resource *resource)
|
||||
@@ -980,10 +978,8 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
unsigned int layer_count, unsigned int level_count, DWORD flags, struct wined3d_device *device,
|
||||
void *parent, const struct wined3d_parent_ops *parent_ops)
|
||||
{
|
||||
- struct wined3d_device_parent *device_parent = device->device_parent;
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
struct wined3d_resource_desc surface_desc;
|
||||
- struct wined3d_surface *surfaces;
|
||||
UINT pow2_width, pow2_height;
|
||||
unsigned int i, j;
|
||||
HRESULT hr;
|
||||
@@ -1092,12 +1088,6 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
}
|
||||
TRACE("xf(%f) yf(%f)\n", texture->pow2_matrix[0], texture->pow2_matrix[5]);
|
||||
|
||||
- if (!(surfaces = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*surfaces) * level_count * layer_count)))
|
||||
- {
|
||||
- wined3d_texture_cleanup(texture);
|
||||
- return E_OUTOFMEMORY;
|
||||
- }
|
||||
-
|
||||
/* Generate all the surfaces. */
|
||||
surface_desc = *desc;
|
||||
surface_desc.resource_type = WINED3D_RTYPE_SURFACE;
|
||||
@@ -1118,32 +1108,16 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
unsigned int idx = j * texture->level_count + i;
|
||||
struct wined3d_surface *surface;
|
||||
|
||||
- surface = &surfaces[idx];
|
||||
- if (FAILED(hr = wined3d_surface_init(surface, texture, &surface_desc, target, i, j, flags)))
|
||||
- {
|
||||
- WARN("Failed to initialize surface, returning %#x.\n", hr);
|
||||
- wined3d_texture_cleanup(texture);
|
||||
- if (!idx)
|
||||
- HeapFree(GetProcessHeap(), 0, surfaces);
|
||||
- return hr;
|
||||
- }
|
||||
-
|
||||
- if (FAILED(hr = device_parent->ops->surface_created(device_parent,
|
||||
- texture, idx, &parent, &parent_ops)))
|
||||
+ if (FAILED(hr = wined3d_surface_create(texture, &surface_desc,
|
||||
+ target, i, j, flags, &surface)))
|
||||
{
|
||||
- WARN("Failed to create surface parent, hr %#x.\n", hr);
|
||||
- wined3d_surface_cleanup(surface);
|
||||
+ WARN("Failed to create surface, hr %#x.\n", hr);
|
||||
wined3d_texture_cleanup(texture);
|
||||
return hr;
|
||||
}
|
||||
|
||||
- TRACE("parent %p, parent_ops %p.\n", parent, parent_ops);
|
||||
-
|
||||
- surface->resource.parent = parent;
|
||||
- surface->resource.parent_ops = parent_ops;
|
||||
texture->sub_resources[idx].resource = &surface->resource;
|
||||
- texture->sub_resources[idx].u.surface = surface;
|
||||
- TRACE("Created surface level %u, layer %u @ %p.\n", i, j, surface);
|
||||
+ TRACE("Created surface level %u @ %p.\n", i, surface);
|
||||
}
|
||||
/* Calculate the next mipmap level. */
|
||||
surface_desc.width = max(1, surface_desc.width >> 1);
|
||||
@@ -1165,6 +1139,13 @@ static void texture3d_sub_resource_add_dirty_region(struct wined3d_resource *sub
|
||||
wined3d_texture_set_dirty(volume_from_resource(sub_resource)->container);
|
||||
}
|
||||
|
||||
+static void texture3d_sub_resource_cleanup(struct wined3d_resource *sub_resource)
|
||||
+{
|
||||
+ struct wined3d_volume *volume = volume_from_resource(sub_resource);
|
||||
+
|
||||
+ wined3d_volume_destroy(volume);
|
||||
+}
|
||||
+
|
||||
static void texture3d_sub_resource_invalidate_location(struct wined3d_resource *sub_resource, DWORD location)
|
||||
{
|
||||
struct wined3d_volume *volume = volume_from_resource(sub_resource);
|
||||
@@ -1217,34 +1198,15 @@ static void texture3d_prepare_texture(struct wined3d_texture *texture, struct wi
|
||||
}
|
||||
}
|
||||
|
||||
-static void texture3d_cleanup_sub_resources(struct wined3d_texture *texture)
|
||||
-{
|
||||
- unsigned int sub_count = texture->level_count * texture->layer_count;
|
||||
- struct wined3d_volume *volume;
|
||||
- unsigned int i;
|
||||
-
|
||||
- for (i = 0; i < sub_count; ++i)
|
||||
- {
|
||||
- if ((volume = texture->sub_resources[i].u.volume))
|
||||
- {
|
||||
- TRACE("volume %p.\n", volume);
|
||||
-
|
||||
- wined3d_volume_cleanup(volume);
|
||||
- volume->resource.parent_ops->wined3d_object_destroyed(volume->resource.parent);
|
||||
- }
|
||||
- }
|
||||
- HeapFree(GetProcessHeap(), 0, texture->sub_resources[0].u.volume);
|
||||
-}
|
||||
-
|
||||
static const struct wined3d_texture_ops texture3d_ops =
|
||||
{
|
||||
texture3d_sub_resource_load,
|
||||
texture3d_sub_resource_add_dirty_region,
|
||||
+ texture3d_sub_resource_cleanup,
|
||||
texture3d_sub_resource_invalidate_location,
|
||||
texture3d_sub_resource_validate_location,
|
||||
texture3d_sub_resource_upload_data,
|
||||
texture3d_prepare_texture,
|
||||
- texture3d_cleanup_sub_resources,
|
||||
};
|
||||
|
||||
BOOL wined3d_texture_check_block_align(const struct wined3d_texture *texture,
|
||||
@@ -1309,10 +1271,8 @@ static const struct wined3d_resource_ops texture3d_resource_ops =
|
||||
static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct wined3d_resource_desc *desc,
|
||||
UINT levels, struct wined3d_device *device, void *parent, const struct wined3d_parent_ops *parent_ops)
|
||||
{
|
||||
- struct wined3d_device_parent *device_parent = device->device_parent;
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
struct wined3d_resource_desc volume_desc;
|
||||
- struct wined3d_volume *volumes;
|
||||
unsigned int i;
|
||||
HRESULT hr;
|
||||
|
||||
@@ -1387,12 +1347,6 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
texture->pow2_matrix[15] = 1.0f;
|
||||
texture->target = GL_TEXTURE_3D;
|
||||
|
||||
- if (!(volumes = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*volumes) * levels)))
|
||||
- {
|
||||
- wined3d_texture_cleanup(texture);
|
||||
- return E_OUTOFMEMORY;
|
||||
- }
|
||||
-
|
||||
/* Generate all the surfaces. */
|
||||
volume_desc = *desc;
|
||||
volume_desc.resource_type = WINED3D_RTYPE_VOLUME;
|
||||
@@ -1400,32 +1354,14 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
{
|
||||
struct wined3d_volume *volume;
|
||||
|
||||
- volume = &volumes[i];
|
||||
- if (FAILED(hr = wined3d_volume_init(volume, texture, &volume_desc, i)))
|
||||
- {
|
||||
- WARN("Failed to initialize volume, returning %#x.\n", hr);
|
||||
- wined3d_texture_cleanup(texture);
|
||||
- if (!i)
|
||||
- HeapFree(GetProcessHeap(), 0, volumes);
|
||||
- return hr;
|
||||
- }
|
||||
-
|
||||
- if (FAILED(hr = device_parent->ops->volume_created(device_parent,
|
||||
- texture, i, &parent, &parent_ops)))
|
||||
+ if (FAILED(hr = wined3d_volume_create(texture, &volume_desc, i, &volume)))
|
||||
{
|
||||
- WARN("Failed to create volume parent, hr %#x.\n", hr);
|
||||
- wined3d_volume_cleanup(volume);
|
||||
+ ERR("Creating a volume for the volume texture failed, hr %#x.\n", hr);
|
||||
wined3d_texture_cleanup(texture);
|
||||
return hr;
|
||||
}
|
||||
|
||||
- TRACE("parent %p, parent_ops %p.\n", parent, parent_ops);
|
||||
-
|
||||
- volume->resource.parent = parent;
|
||||
- volume->resource.parent_ops = parent_ops;
|
||||
texture->sub_resources[i].resource = &volume->resource;
|
||||
- texture->sub_resources[i].u.volume = volume;
|
||||
- TRACE("Created volume level %u @ %p.\n", i, volume);
|
||||
|
||||
/* Calculate the next mipmap level. */
|
||||
volume_desc.width = max(1, volume_desc.width >> 1);
|
||||
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
|
||||
index 4b726d7..6f5de73 100644
|
||||
--- a/dlls/wined3d/volume.c
|
||||
+++ b/dlls/wined3d/volume.c
|
||||
@@ -382,7 +382,7 @@ static void wined3d_volume_free_pbo(struct wined3d_volume *volume)
|
||||
context_release(context);
|
||||
}
|
||||
|
||||
-void wined3d_volume_cleanup(struct wined3d_volume *volume)
|
||||
+void wined3d_volume_destroy(struct wined3d_volume *volume)
|
||||
{
|
||||
TRACE("volume %p.\n", volume);
|
||||
|
||||
@@ -390,6 +390,8 @@ void wined3d_volume_cleanup(struct wined3d_volume *volume)
|
||||
wined3d_volume_free_pbo(volume);
|
||||
|
||||
resource_cleanup(&volume->resource);
|
||||
+ volume->resource.parent_ops->wined3d_object_destroyed(volume->resource.parent);
|
||||
+ HeapFree(GetProcessHeap(), 0, volume);
|
||||
}
|
||||
|
||||
static void volume_unload(struct wined3d_resource *resource)
|
||||
@@ -663,7 +665,7 @@ static const struct wined3d_resource_ops volume_resource_ops =
|
||||
volume_resource_sub_resource_unmap,
|
||||
};
|
||||
|
||||
-HRESULT wined3d_volume_init(struct wined3d_volume *volume, struct wined3d_texture *container,
|
||||
+static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_texture *container,
|
||||
const struct wined3d_resource_desc *desc, UINT level)
|
||||
{
|
||||
struct wined3d_device *device = container->resource.device;
|
||||
@@ -706,3 +708,44 @@ HRESULT wined3d_volume_init(struct wined3d_volume *volume, struct wined3d_textur
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
+
|
||||
+HRESULT wined3d_volume_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc,
|
||||
+ unsigned int level, struct wined3d_volume **volume)
|
||||
+{
|
||||
+ struct wined3d_device_parent *device_parent = container->resource.device->device_parent;
|
||||
+ const struct wined3d_parent_ops *parent_ops;
|
||||
+ struct wined3d_volume *object;
|
||||
+ void *parent;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ TRACE("container %p, width %u, height %u, depth %u, level %u, format %s, "
|
||||
+ "usage %#x, pool %s, volume %p.\n",
|
||||
+ container, desc->width, desc->height, desc->depth, level, debug_d3dformat(desc->format),
|
||||
+ desc->usage, debug_d3dpool(desc->pool), volume);
|
||||
+
|
||||
+ if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ if (FAILED(hr = volume_init(object, container, desc, level)))
|
||||
+ {
|
||||
+ WARN("Failed to initialize volume, returning %#x.\n", hr);
|
||||
+ HeapFree(GetProcessHeap(), 0, object);
|
||||
+ return hr;
|
||||
+ }
|
||||
+
|
||||
+ if (FAILED(hr = device_parent->ops->volume_created(device_parent,
|
||||
+ container, level, &parent, &parent_ops)))
|
||||
+ {
|
||||
+ WARN("Failed to create volume parent, hr %#x.\n", hr);
|
||||
+ wined3d_volume_destroy(object);
|
||||
+ return hr;
|
||||
+ }
|
||||
+
|
||||
+ TRACE("Created volume %p, parent %p, parent_ops %p.\n", object, parent, parent_ops);
|
||||
+
|
||||
+ object->resource.parent = parent;
|
||||
+ object->resource.parent_ops = parent_ops;
|
||||
+ *volume = object;
|
||||
+
|
||||
+ return WINED3D_OK;
|
||||
+}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 1774039..d89bd24 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2326,13 +2326,13 @@ struct wined3d_texture_ops
|
||||
struct wined3d_context *context, BOOL srgb);
|
||||
void (*texture_sub_resource_add_dirty_region)(struct wined3d_resource *sub_resource,
|
||||
const struct wined3d_box *dirty_region);
|
||||
+ void (*texture_sub_resource_cleanup)(struct wined3d_resource *sub_resource);
|
||||
void (*texture_sub_resource_invalidate_location)(struct wined3d_resource *sub_resource, DWORD location);
|
||||
void (*texture_sub_resource_validate_location)(struct wined3d_resource *sub_resource, DWORD location);
|
||||
void (*texture_sub_resource_upload_data)(struct wined3d_resource *sub_resource,
|
||||
const struct wined3d_context *context, const struct wined3d_sub_resource_data *data);
|
||||
void (*texture_prepare_texture)(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb);
|
||||
- void (*texture_cleanup_sub_resources)(struct wined3d_texture *texture);
|
||||
};
|
||||
|
||||
#define WINED3D_TEXTURE_COND_NP2 0x00000001
|
||||
@@ -2386,11 +2386,6 @@ struct wined3d_texture
|
||||
struct
|
||||
{
|
||||
struct wined3d_resource *resource;
|
||||
- union
|
||||
- {
|
||||
- struct wined3d_surface *surface;
|
||||
- struct wined3d_volume *volume;
|
||||
- } u;
|
||||
} sub_resources[1];
|
||||
};
|
||||
|
||||
@@ -2454,12 +2449,12 @@ static inline struct wined3d_volume *volume_from_resource(struct wined3d_resourc
|
||||
}
|
||||
|
||||
BOOL volume_prepare_system_memory(struct wined3d_volume *volume) DECLSPEC_HIDDEN;
|
||||
-void wined3d_volume_cleanup(struct wined3d_volume *volume) DECLSPEC_HIDDEN;
|
||||
-HRESULT wined3d_volume_init(struct wined3d_volume *volume, struct wined3d_texture *container,
|
||||
- const struct wined3d_resource_desc *desc, UINT level) DECLSPEC_HIDDEN;
|
||||
-void wined3d_volume_invalidate_location(struct wined3d_volume *volume, DWORD location) 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_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;
|
||||
HRESULT wined3d_volume_map(struct wined3d_volume *volume,
|
||||
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags) DECLSPEC_HIDDEN;
|
||||
void wined3d_volume_validate_location(struct wined3d_volume *volume, DWORD location) DECLSPEC_HIDDEN;
|
||||
@@ -2568,16 +2563,13 @@ static inline GLuint surface_get_texture_name(const struct wined3d_surface *surf
|
||||
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 struct wined3d_blt_fx *blt_fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
||||
-void wined3d_surface_cleanup(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
+void surface_set_dirty(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
HRESULT surface_color_fill(struct wined3d_surface *s,
|
||||
const RECT *rect, const struct wined3d_color *color) DECLSPEC_HIDDEN;
|
||||
HRESULT surface_create_dib_section(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
void surface_get_drawable_size(const struct wined3d_surface *surface, const struct wined3d_context *context,
|
||||
unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN;
|
||||
-HRESULT wined3d_surface_init(struct wined3d_surface *surface,
|
||||
- struct wined3d_texture *container, const struct wined3d_resource_desc *desc,
|
||||
- GLenum target, unsigned int level, unsigned int layer, DWORD flags) DECLSPEC_HIDDEN;
|
||||
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location) DECLSPEC_HIDDEN;
|
||||
void surface_load(struct wined3d_surface *surface, struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
void surface_load_ds_location(struct wined3d_surface *surface,
|
||||
@@ -2593,7 +2585,6 @@ void wined3d_surface_prepare(struct wined3d_surface *surface, struct wined3d_con
|
||||
DWORD location) DECLSPEC_HIDDEN;
|
||||
void surface_set_compatible_renderbuffer(struct wined3d_surface *surface,
|
||||
const struct wined3d_surface *rt) DECLSPEC_HIDDEN;
|
||||
-void surface_set_dirty(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
void surface_set_texture_target(struct wined3d_surface *surface, GLenum target, GLint level) DECLSPEC_HIDDEN;
|
||||
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;
|
||||
@@ -2602,6 +2593,10 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const POINT *dst_point,
|
||||
struct wined3d_surface *src_surface, const RECT *src_rect) DECLSPEC_HIDDEN;
|
||||
void surface_validate_location(struct wined3d_surface *surface, DWORD location) DECLSPEC_HIDDEN;
|
||||
+HRESULT wined3d_surface_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc,
|
||||
+ GLenum target, unsigned int level, unsigned int layer, DWORD flags,
|
||||
+ struct wined3d_surface **surface) DECLSPEC_HIDDEN;
|
||||
+void wined3d_surface_destroy(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
void surface_prepare_map_memory(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,
|
||||
--
|
||||
2.7.1
|
||||
|
@ -0,0 +1,264 @@
|
||||
From ceed7fb12e24d85bc317417adefe267c77249df8 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 6 Mar 2016 22:08:50 +0100
|
||||
Subject: Revert "wined3d: Get rid of wined3d_surface_ops.surface_unmap()."
|
||||
|
||||
This reverts commit a7316e1927a847e65494caa9fc892e724b81f48b.
|
||||
---
|
||||
dlls/wined3d/surface.c | 101 ++++++++++++++++++++++++++---------------
|
||||
dlls/wined3d/swapchain.c | 30 +++---------
|
||||
dlls/wined3d/wined3d_private.h | 4 +-
|
||||
3 files changed, 75 insertions(+), 60 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 01095e9..1acc3b6 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -672,6 +672,55 @@ static HRESULT surface_private_setup(struct wined3d_surface *surface)
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
+static void surface_unmap(struct wined3d_surface *surface)
|
||||
+{
|
||||
+ struct wined3d_device *device = surface->resource.device;
|
||||
+ const struct wined3d_gl_info *gl_info;
|
||||
+ struct wined3d_context *context;
|
||||
+ struct wined3d_texture *texture;
|
||||
+
|
||||
+ TRACE("surface %p.\n", surface);
|
||||
+
|
||||
+ switch (surface->resource.map_binding)
|
||||
+ {
|
||||
+ case WINED3D_LOCATION_SYSMEM:
|
||||
+ case WINED3D_LOCATION_USER_MEMORY:
|
||||
+ case WINED3D_LOCATION_DIB:
|
||||
+ break;
|
||||
+
|
||||
+ case WINED3D_LOCATION_BUFFER:
|
||||
+ context = context_acquire(device, NULL);
|
||||
+ gl_info = context->gl_info;
|
||||
+
|
||||
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, surface->pbo));
|
||||
+ GL_EXTCALL(glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER));
|
||||
+ GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
|
||||
+ checkGLcall("glUnmapBuffer");
|
||||
+ context_release(context);
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ ERR("Unexpected map binding %s.\n", wined3d_debug_location(surface->resource.map_binding));
|
||||
+ }
|
||||
+
|
||||
+ if (surface->locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_TEXTURE_RGB))
|
||||
+ {
|
||||
+ TRACE("Not dirtified, nothing to do.\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ texture = surface->container;
|
||||
+ if (texture->swapchain && texture->swapchain->front_buffer == texture)
|
||||
+ {
|
||||
+ context = context_acquire(device, surface);
|
||||
+ surface_load_location(surface, context, texture->resource.draw_binding);
|
||||
+ context_release(context);
|
||||
+ memset(&texture->swapchain->front_buffer_update, 0, sizeof(texture->swapchain->front_buffer_update));
|
||||
+ }
|
||||
+ else if (texture->resource.format_flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
|
||||
+ FIXME("Depth / stencil buffer locking is not implemented.\n");
|
||||
+}
|
||||
+
|
||||
static BOOL surface_is_full_rect(const struct wined3d_surface *surface, const RECT *r)
|
||||
{
|
||||
if ((r->left && r->right) || abs(r->right - r->left) != surface->resource.width)
|
||||
@@ -1166,6 +1215,7 @@ static const struct wined3d_resource_ops surface_resource_ops =
|
||||
static const struct wined3d_surface_ops surface_ops =
|
||||
{
|
||||
surface_private_setup,
|
||||
+ surface_unmap,
|
||||
};
|
||||
|
||||
/*****************************************************************************
|
||||
@@ -1209,9 +1259,23 @@ static HRESULT gdi_surface_private_setup(struct wined3d_surface *surface)
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
+static void gdi_surface_unmap(struct wined3d_surface *surface)
|
||||
+{
|
||||
+ struct wined3d_texture *texture = surface->container;
|
||||
+
|
||||
+ TRACE("surface %p.\n", surface);
|
||||
+
|
||||
+ /* Tell the swapchain to update the screen. */
|
||||
+ if (texture->swapchain && texture == texture->swapchain->front_buffer)
|
||||
+ x11_copy_to_screen(texture->swapchain, &texture->swapchain->front_buffer_update);
|
||||
+
|
||||
+ memset(&texture->swapchain->front_buffer_update, 0, sizeof(texture->swapchain->front_buffer_update));
|
||||
+}
|
||||
+
|
||||
static const struct wined3d_surface_ops gdi_surface_ops =
|
||||
{
|
||||
gdi_surface_private_setup,
|
||||
+ gdi_surface_unmap,
|
||||
};
|
||||
|
||||
/* This call just downloads data, the caller is responsible for binding the
|
||||
@@ -2175,11 +2239,6 @@ do { \
|
||||
|
||||
HRESULT wined3d_surface_unmap(struct wined3d_surface *surface)
|
||||
{
|
||||
- struct wined3d_device *device = surface->resource.device;
|
||||
- const struct wined3d_gl_info *gl_info;
|
||||
- struct wined3d_context *context;
|
||||
- struct wined3d_texture *texture;
|
||||
-
|
||||
TRACE("surface %p.\n", surface);
|
||||
|
||||
if (!surface->resource.map_count)
|
||||
@@ -2189,37 +2248,7 @@ HRESULT wined3d_surface_unmap(struct wined3d_surface *surface)
|
||||
}
|
||||
--surface->resource.map_count;
|
||||
|
||||
- switch (surface->resource.map_binding)
|
||||
- {
|
||||
- case WINED3D_LOCATION_SYSMEM:
|
||||
- case WINED3D_LOCATION_USER_MEMORY:
|
||||
- case WINED3D_LOCATION_DIB:
|
||||
- break;
|
||||
-
|
||||
- case WINED3D_LOCATION_BUFFER:
|
||||
- context = context_acquire(device, NULL);
|
||||
- gl_info = context->gl_info;
|
||||
-
|
||||
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, surface->pbo));
|
||||
- GL_EXTCALL(glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER));
|
||||
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
|
||||
- checkGLcall("glUnmapBuffer");
|
||||
- context_release(context);
|
||||
- break;
|
||||
-
|
||||
- default:
|
||||
- ERR("Unexpected map binding %s.\n", wined3d_debug_location(surface->resource.map_binding));
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- if (!(surface->locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_TEXTURE_RGB)))
|
||||
- {
|
||||
- texture = surface->container;
|
||||
- if (texture->swapchain && texture->swapchain->front_buffer == texture)
|
||||
- texture->swapchain->swapchain_ops->swapchain_frontbuffer_updated(texture->swapchain);
|
||||
- else if (texture->resource.format_flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
|
||||
- FIXME("Depth / stencil buffer locking is not implemented.\n");
|
||||
- }
|
||||
+ surface->surface_ops->surface_unmap(surface);
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index 9b8d04c..becad97 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -647,25 +647,13 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
context_release(context);
|
||||
}
|
||||
|
||||
-static void swapchain_gl_frontbuffer_updated(struct wined3d_swapchain *swapchain)
|
||||
-{
|
||||
- struct wined3d_surface *surface;
|
||||
- struct wined3d_context *context;
|
||||
-
|
||||
- surface = surface_from_resource(swapchain->front_buffer->sub_resources[0].resource);
|
||||
- context = context_acquire(swapchain->device, surface);
|
||||
- surface_load_location(surface, context, surface->container->resource.draw_binding);
|
||||
- context_release(context);
|
||||
- SetRectEmpty(&swapchain->front_buffer_update);
|
||||
-}
|
||||
-
|
||||
static const struct wined3d_swapchain_ops swapchain_gl_ops =
|
||||
{
|
||||
swapchain_gl_present,
|
||||
- swapchain_gl_frontbuffer_updated,
|
||||
};
|
||||
|
||||
-static void swapchain_gdi_frontbuffer_updated(struct wined3d_swapchain *swapchain)
|
||||
+/* Helper function that blits the front buffer contents to the target window. */
|
||||
+void x11_copy_to_screen(const struct wined3d_swapchain *swapchain, const RECT *rect)
|
||||
{
|
||||
struct wined3d_surface *front;
|
||||
POINT offset = {0, 0};
|
||||
@@ -673,7 +661,7 @@ static void swapchain_gdi_frontbuffer_updated(struct wined3d_swapchain *swapchai
|
||||
RECT draw_rect;
|
||||
HWND window;
|
||||
|
||||
- TRACE("swapchain %p.\n", swapchain);
|
||||
+ TRACE("swapchain %p, rect %s.\n", swapchain, wine_dbgstr_rect(rect));
|
||||
|
||||
front = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0));
|
||||
if (swapchain->palette)
|
||||
@@ -701,14 +689,14 @@ static void swapchain_gdi_frontbuffer_updated(struct wined3d_swapchain *swapchai
|
||||
draw_rect.right = front->resource.width;
|
||||
draw_rect.top = 0;
|
||||
draw_rect.bottom = front->resource.height;
|
||||
- IntersectRect(&draw_rect, &draw_rect, &swapchain->front_buffer_update);
|
||||
+
|
||||
+ if (rect)
|
||||
+ IntersectRect(&draw_rect, &draw_rect, rect);
|
||||
|
||||
BitBlt(dst_dc, draw_rect.left - offset.x, draw_rect.top - offset.y,
|
||||
draw_rect.right - draw_rect.left, draw_rect.bottom - draw_rect.top,
|
||||
src_dc, draw_rect.left, draw_rect.top, SRCCOPY);
|
||||
ReleaseDC(window, dst_dc);
|
||||
-
|
||||
- SetRectEmpty(&swapchain->front_buffer_update);
|
||||
}
|
||||
|
||||
static void swapchain_gdi_present(struct wined3d_swapchain *swapchain, const RECT *src_rect_in,
|
||||
@@ -767,16 +755,12 @@ static void swapchain_gdi_present(struct wined3d_swapchain *swapchain, const REC
|
||||
}
|
||||
}
|
||||
|
||||
- SetRect(&swapchain->front_buffer_update, 0, 0,
|
||||
- swapchain->front_buffer->resource.width,
|
||||
- swapchain->front_buffer->resource.height);
|
||||
- swapchain_gdi_frontbuffer_updated(swapchain);
|
||||
+ x11_copy_to_screen(swapchain, NULL);
|
||||
}
|
||||
|
||||
static const struct wined3d_swapchain_ops swapchain_gdi_ops =
|
||||
{
|
||||
swapchain_gdi_present,
|
||||
- swapchain_gdi_frontbuffer_updated,
|
||||
};
|
||||
|
||||
static void swapchain_update_render_to_fbo(struct wined3d_swapchain *swapchain)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index ce2f196..4066c79 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2500,6 +2500,7 @@ struct fbo_entry
|
||||
struct wined3d_surface_ops
|
||||
{
|
||||
HRESULT (*surface_private_setup)(struct wined3d_surface *surface);
|
||||
+ void (*surface_unmap)(struct wined3d_surface *surface);
|
||||
};
|
||||
|
||||
struct wined3d_surface
|
||||
@@ -2915,7 +2916,6 @@ struct wined3d_swapchain_ops
|
||||
{
|
||||
void (*swapchain_present)(struct wined3d_swapchain *swapchain, const RECT *src_rect,
|
||||
const RECT *dst_rect, const RGNDATA *dirty_region, DWORD flags);
|
||||
- void (*swapchain_frontbuffer_updated)(struct wined3d_swapchain *swaphchain);
|
||||
};
|
||||
|
||||
struct wined3d_swapchain
|
||||
@@ -2948,6 +2948,8 @@ struct wined3d_swapchain
|
||||
HWND backup_wnd;
|
||||
};
|
||||
|
||||
+void x11_copy_to_screen(const struct wined3d_swapchain *swapchain, const RECT *rect) DECLSPEC_HIDDEN;
|
||||
+
|
||||
void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activate) DECLSPEC_HIDDEN;
|
||||
struct wined3d_context *swapchain_get_context(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
void swapchain_destroy_contexts(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.7.1
|
||||
|
@ -0,0 +1,183 @@
|
||||
From c5c6d38be8d73ef6b217cd836c8bc579e731b809 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 6 Mar 2016 22:08:51 +0100
|
||||
Subject: Revert "wined3d: Keep track of front buffer updates in the
|
||||
swapchain."
|
||||
|
||||
This reverts commit 29c27b9bab922a485e02ad816a5e34802c1f4227.
|
||||
---
|
||||
dlls/wined3d/surface.c | 56 +++++++++++++++++++-----------------------
|
||||
dlls/wined3d/wined3d_private.h | 3 ++-
|
||||
2 files changed, 27 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 1acc3b6..ee6588e 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -677,10 +677,11 @@ static void surface_unmap(struct wined3d_surface *surface)
|
||||
struct wined3d_device *device = surface->resource.device;
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
struct wined3d_context *context;
|
||||
- struct wined3d_texture *texture;
|
||||
|
||||
TRACE("surface %p.\n", surface);
|
||||
|
||||
+ memset(&surface->lockedRect, 0, sizeof(surface->lockedRect));
|
||||
+
|
||||
switch (surface->resource.map_binding)
|
||||
{
|
||||
case WINED3D_LOCATION_SYSMEM:
|
||||
@@ -709,15 +710,13 @@ static void surface_unmap(struct wined3d_surface *surface)
|
||||
return;
|
||||
}
|
||||
|
||||
- texture = surface->container;
|
||||
- if (texture->swapchain && texture->swapchain->front_buffer == texture)
|
||||
+ if (surface->container->swapchain && surface->container->swapchain->front_buffer == surface->container)
|
||||
{
|
||||
context = context_acquire(device, surface);
|
||||
- surface_load_location(surface, context, texture->resource.draw_binding);
|
||||
+ surface_load_location(surface, context, surface->container->resource.draw_binding);
|
||||
context_release(context);
|
||||
- memset(&texture->swapchain->front_buffer_update, 0, sizeof(texture->swapchain->front_buffer_update));
|
||||
}
|
||||
- else if (texture->resource.format_flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
|
||||
+ else if (surface->container->resource.format_flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
|
||||
FIXME("Depth / stencil buffer locking is not implemented.\n");
|
||||
}
|
||||
|
||||
@@ -1261,15 +1260,13 @@ static HRESULT gdi_surface_private_setup(struct wined3d_surface *surface)
|
||||
|
||||
static void gdi_surface_unmap(struct wined3d_surface *surface)
|
||||
{
|
||||
- struct wined3d_texture *texture = surface->container;
|
||||
-
|
||||
TRACE("surface %p.\n", surface);
|
||||
|
||||
/* Tell the swapchain to update the screen. */
|
||||
- if (texture->swapchain && texture == texture->swapchain->front_buffer)
|
||||
- x11_copy_to_screen(texture->swapchain, &texture->swapchain->front_buffer_update);
|
||||
+ if (surface->container->swapchain && surface->container == surface->container->swapchain->front_buffer)
|
||||
+ x11_copy_to_screen(surface->container->swapchain, &surface->lockedRect);
|
||||
|
||||
- memset(&texture->swapchain->front_buffer_update, 0, sizeof(texture->swapchain->front_buffer_update));
|
||||
+ memset(&surface->lockedRect, 0, sizeof(RECT));
|
||||
}
|
||||
|
||||
static const struct wined3d_surface_ops gdi_surface_ops =
|
||||
@@ -2256,10 +2253,9 @@ HRESULT wined3d_surface_unmap(struct wined3d_surface *surface)
|
||||
HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_desc *map_desc,
|
||||
const struct wined3d_box *box, DWORD flags)
|
||||
{
|
||||
- struct wined3d_texture *texture = surface->container;
|
||||
- const struct wined3d_format *format = texture->resource.format;
|
||||
- struct wined3d_device *device = texture->resource.device;
|
||||
- unsigned int fmt_flags = texture->resource.format_flags;
|
||||
+ const struct wined3d_format *format = surface->resource.format;
|
||||
+ unsigned int fmt_flags = surface->container->resource.format_flags;
|
||||
+ struct wined3d_device *device = surface->resource.device;
|
||||
struct wined3d_context *context;
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
BYTE *base_memory;
|
||||
@@ -2274,7 +2270,7 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
}
|
||||
|
||||
if ((fmt_flags & WINED3DFMT_FLAG_BLOCKS) && box
|
||||
- && !wined3d_texture_check_block_align(texture, surface->texture_level, box))
|
||||
+ && !wined3d_texture_check_block_align(surface->container, surface->texture_level, box))
|
||||
{
|
||||
WARN("Map box %s is misaligned for %ux%u blocks.\n",
|
||||
debug_box(box), format->block_width, format->block_height);
|
||||
@@ -2293,13 +2289,13 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
* the need to download the surface from OpenGL all the time. The surface
|
||||
* is still downloaded if the OpenGL texture is changed. Note that this
|
||||
* only really makes sense for managed textures.*/
|
||||
- if (!(texture->flags & WINED3D_TEXTURE_DYNAMIC_MAP)
|
||||
+ if (!(surface->container->flags & WINED3D_TEXTURE_DYNAMIC_MAP)
|
||||
&& surface->resource.map_binding == WINED3D_LOCATION_SYSMEM)
|
||||
{
|
||||
if (++surface->lockCount > MAXLOCKCOUNT)
|
||||
{
|
||||
TRACE("Surface is mapped regularly, not freeing the system memory copy any more.\n");
|
||||
- texture->flags |= WINED3D_TEXTURE_DYNAMIC_MAP;
|
||||
+ surface->container->flags |= WINED3D_TEXTURE_DYNAMIC_MAP;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2334,7 +2330,7 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
break;
|
||||
|
||||
case WINED3D_LOCATION_USER_MEMORY:
|
||||
- base_memory = texture->user_memory;
|
||||
+ base_memory = surface->container->user_memory;
|
||||
break;
|
||||
|
||||
case WINED3D_LOCATION_DIB:
|
||||
@@ -2365,13 +2361,17 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
}
|
||||
else
|
||||
{
|
||||
- wined3d_texture_get_pitch(texture, surface->texture_level,
|
||||
+ wined3d_texture_get_pitch(surface->container, surface->texture_level,
|
||||
&map_desc->row_pitch, &map_desc->slice_pitch);
|
||||
}
|
||||
|
||||
if (!box)
|
||||
{
|
||||
map_desc->data = base_memory;
|
||||
+ surface->lockedRect.left = 0;
|
||||
+ surface->lockedRect.top = 0;
|
||||
+ surface->lockedRect.right = surface->resource.width;
|
||||
+ surface->lockedRect.bottom = surface->resource.height;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2389,19 +2389,13 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
+ (map_desc->row_pitch * box->top)
|
||||
+ (box->left * format->byte_count);
|
||||
}
|
||||
+ surface->lockedRect.left = box->left;
|
||||
+ surface->lockedRect.top = box->top;
|
||||
+ surface->lockedRect.right = box->right;
|
||||
+ surface->lockedRect.bottom = box->bottom;
|
||||
}
|
||||
|
||||
- if (texture->swapchain && texture->swapchain->front_buffer == texture)
|
||||
- {
|
||||
- RECT *r = &texture->swapchain->front_buffer_update;
|
||||
-
|
||||
- if (!box)
|
||||
- SetRect(r, 0, 0, texture->resource.width, texture->resource.height);
|
||||
- else
|
||||
- SetRect(r, box->left, box->top, box->right, box->bottom);
|
||||
- TRACE("Mapped front buffer %s.\n", wine_dbgstr_rect(r));
|
||||
- }
|
||||
-
|
||||
+ TRACE("Locked rect %s.\n", wine_dbgstr_rect(&surface->lockedRect));
|
||||
TRACE("Returning memory %p, pitch %u.\n", map_desc->data, map_desc->row_pitch);
|
||||
|
||||
return WINED3D_OK;
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 4066c79..409ab36 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2522,6 +2522,8 @@ struct wined3d_surface
|
||||
GLenum texture_target;
|
||||
unsigned int texture_level;
|
||||
unsigned int texture_layer;
|
||||
+
|
||||
+ RECT lockedRect;
|
||||
int lockCount;
|
||||
|
||||
/* For GetDC */
|
||||
@@ -2934,7 +2936,6 @@ struct wined3d_swapchain
|
||||
BOOL render_to_fbo, reapply_mode;
|
||||
const struct wined3d_format *ds_format;
|
||||
struct wined3d_palette *palette;
|
||||
- RECT front_buffer_update;
|
||||
|
||||
LONG prev_time, frames; /* Performance tracking */
|
||||
|
||||
--
|
||||
2.7.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a51564803334f940d200b0f3f1f7a94cfc13425f Mon Sep 17 00:00:00 2001
|
||||
From 3afe02f9f12be379dabe3f085cf222a86d41d94c Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 2 Mar 2016 16:28:44 +0100
|
||||
Subject: Revert "wined3d: Get rid of the offscreenBuffer field in struct
|
||||
@ -13,7 +13,7 @@ This reverts commit 9dc89561027f32b08978b9fb75da5a0d0966f999.
|
||||
4 files changed, 41 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 6f065ba..d0deff9 100644
|
||||
index 7048175..3a6bc5c 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -2419,30 +2419,14 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
|
||||
@ -39,7 +39,7 @@ index 6f065ba..d0deff9 100644
|
||||
-static DWORD context_generate_rt_mask_no_fbo(const struct wined3d_context *context, const struct wined3d_surface *rt)
|
||||
+static DWORD context_generate_rt_mask_no_fbo(const struct wined3d_device *device, const struct wined3d_surface *rt)
|
||||
{
|
||||
if (!rt || rt->resource.format->id == WINED3DFMT_NULL)
|
||||
if (!rt || rt->container->resource.format->id == WINED3DFMT_NULL)
|
||||
return 0;
|
||||
else if (rt->container->swapchain)
|
||||
return context_generate_rt_mask_from_surface(rt);
|
||||
@ -154,10 +154,10 @@ index ded1229..4cebcb8 100644
|
||||
|
||||
context_release(context);
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index ee6588e..bd6be49 100644
|
||||
index 7f97b27..4e59ca8 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -2435,7 +2435,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
|
||||
@@ -2588,7 +2588,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
|
||||
/* Mapping the primary render target which is not on a swapchain.
|
||||
* Read from the back buffer. */
|
||||
TRACE("Mapping offscreen render target.\n");
|
||||
@ -166,7 +166,7 @@ index ee6588e..bd6be49 100644
|
||||
srcIsUpsideDown = TRUE;
|
||||
}
|
||||
else
|
||||
@@ -2541,7 +2541,7 @@ void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb, struct
|
||||
@@ -2694,7 +2694,7 @@ void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb, struct
|
||||
TRACE("Reading back offscreen render target %p.\n", surface);
|
||||
|
||||
if (wined3d_resource_is_offscreen(&surface->container->resource))
|
||||
@ -175,7 +175,7 @@ index ee6588e..bd6be49 100644
|
||||
else
|
||||
gl_info->gl_ops.gl.p_glReadBuffer(surface_get_gl_buffer(surface));
|
||||
checkGLcall("glReadBuffer");
|
||||
@@ -2646,7 +2646,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
|
||||
@@ -2799,7 +2799,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
|
||||
{
|
||||
TRACE("Reading from an offscreen target\n");
|
||||
upsidedown = !upsidedown;
|
||||
@ -184,7 +184,7 @@ index ee6588e..bd6be49 100644
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2735,7 +2735,6 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
@@ -2888,7 +2888,6 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
struct wined3d_context *context;
|
||||
GLenum drawBuffer = GL_BACK;
|
||||
@ -192,7 +192,7 @@ index ee6588e..bd6be49 100644
|
||||
GLenum texture_target;
|
||||
BOOL noBackBufferBackup;
|
||||
BOOL src_offscreen;
|
||||
@@ -2749,8 +2748,6 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
@@ -2902,8 +2901,6 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
context_apply_blit_state(context, device);
|
||||
wined3d_texture_load(dst_surface->container, context, FALSE);
|
||||
|
||||
@ -201,7 +201,7 @@ index ee6588e..bd6be49 100644
|
||||
src_offscreen = wined3d_resource_is_offscreen(&src_surface->container->resource);
|
||||
noBackBufferBackup = src_offscreen && wined3d_settings.offscreen_rendering_mode == ORM_FBO;
|
||||
if (!noBackBufferBackup && !src_surface->container->texture_rgb.name)
|
||||
@@ -2767,7 +2764,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
@@ -2920,7 +2917,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
/* Got more than one aux buffer? Use the 2nd aux buffer */
|
||||
drawBuffer = GL_AUX1;
|
||||
}
|
||||
@ -210,7 +210,7 @@ index ee6588e..bd6be49 100644
|
||||
{
|
||||
/* Only one aux buffer, but it isn't used (Onscreen rendering, or non-aux orm)? Use it! */
|
||||
drawBuffer = GL_AUX0;
|
||||
@@ -2808,7 +2805,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
@@ -2961,7 +2958,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
|
||||
{
|
||||
TRACE("Reading from an offscreen target\n");
|
||||
upsidedown = !upsidedown;
|
||||
@ -220,10 +220,10 @@ index ee6588e..bd6be49 100644
|
||||
else
|
||||
{
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 409ab36..eef58a3 100644
|
||||
index 3039180..0b622c0 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1507,7 +1507,6 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
|
||||
@@ -1508,7 +1508,6 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
|
||||
void context_free_event_query(struct wined3d_event_query *query) DECLSPEC_HIDDEN;
|
||||
void context_free_occlusion_query(struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN;
|
||||
struct wined3d_context *context_get_current(void) DECLSPEC_HIDDEN;
|
||||
@ -231,7 +231,7 @@ index 409ab36..eef58a3 100644
|
||||
DWORD context_get_tls_idx(void) DECLSPEC_HIDDEN;
|
||||
void context_gl_resource_released(struct wined3d_device *device,
|
||||
GLuint name, BOOL rb_namespace) DECLSPEC_HIDDEN;
|
||||
@@ -2142,6 +2141,9 @@ struct wined3d_device
|
||||
@@ -2143,6 +2142,9 @@ struct wined3d_device
|
||||
LONG style;
|
||||
LONG exStyle;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c007a75501e40d839902fbc8bbfb4ef291f07bb2 Mon Sep 17 00:00:00 2001
|
||||
From f647fdb1959507c9efac2160fc333defca6c2eb0 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()."
|
||||
@ -12,10 +12,10 @@ This reverts commit 58719f60d5dca15f0f0de625bc307e04b01fc6d9.
|
||||
4 files changed, 58 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 7858d15..c1d7b18 100644
|
||||
index 4e59ca8..6ddf257 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
|
||||
@@ -1539,11 +1539,38 @@ void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct w
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ index 7858d15..c1d7b18 100644
|
||||
}
|
||||
|
||||
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_
|
||||
@@ -2423,7 +2450,7 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
|
||||
}
|
||||
|
||||
if ((fmt_flags & WINED3DFMT_FLAG_BLOCKS) && box
|
||||
@ -65,10 +65,10 @@ index 7858d15..c1d7b18 100644
|
||||
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
|
||||
index 24f149b..c4ba1c5 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1201,35 +1201,6 @@ static const struct wined3d_texture_ops texture3d_ops =
|
||||
@@ -1209,35 +1209,6 @@ static const struct wined3d_texture_ops texture3d_ops =
|
||||
texture3d_prepare_texture,
|
||||
};
|
||||
|
||||
@ -154,18 +154,18 @@ index 6f5de73..75585d8 100644
|
||||
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
|
||||
index cce0929..cf51a38 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,
|
||||
@@ -2407,8 +2407,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;
|
||||
struct wined3d_resource *wined3d_texture_get_sub_resource(const struct wined3d_texture *texture,
|
||||
UINT sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.7.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 5fd6833b3750a7ab995be0800b6686196196b0cc Mon Sep 17 00:00:00 2001
|
||||
From 89a286bd8881e0252faa108a98a07cc6712789ea Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 21 Jan 2014 12:22:30 +0100
|
||||
Subject: wined3d: Move surface locations into the resource.
|
||||
@ -13,17 +13,17 @@ Subject: wined3d: Move surface locations into the resource.
|
||||
6 files changed, 57 insertions(+), 57 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index 6f73dd2..90f2183 100644
|
||||
index 956986c..f0b99bf 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -7873,7 +7873,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, enum wined3d_blit_
|
||||
@@ -7875,7 +7875,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, enum wined3d_blit_
|
||||
|
||||
/* Now load the surface */
|
||||
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
|
||||
- && (src_surface->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_DRAWABLE))
|
||||
+ && (src_surface->resource.locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_DRAWABLE))
|
||||
== WINED3D_LOCATION_DRAWABLE
|
||||
&& !wined3d_resource_is_offscreen(&src_surface->container->resource))
|
||||
&& !wined3d_resource_is_offscreen(&src_texture->resource))
|
||||
{
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 4cebcb8..5e37a2d 100644
|
||||
@ -443,10 +443,10 @@ index becad97..3fe5d71 100644
|
||||
surface_prev = surface;
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index d71f64b..1113eaa 100644
|
||||
index 4329d5c..258977c 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2511,7 +2511,6 @@ struct wined3d_surface
|
||||
@@ -2514,7 +2514,6 @@ struct wined3d_surface
|
||||
const struct wined3d_surface_ops *surface_ops;
|
||||
struct wined3d_texture *container;
|
||||
void *user_memory;
|
@ -1,4 +1,4 @@
|
||||
From 0d24fc66a870c629094b145ba89ef41389f8e3be Mon Sep 17 00:00:00 2001
|
||||
From 4ccd25e66f95d7a23f4c17e597e5107c68398dc4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sat, 4 Jan 2014 00:53:47 +0100
|
||||
Subject: wined3d: Remove surface_validate_location.
|
||||
@ -13,16 +13,16 @@ Subject: wined3d: Remove surface_validate_location.
|
||||
6 files changed, 20 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index 90f2183..60d2560 100644
|
||||
index f0b99bf..a95090a 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -7918,7 +7918,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, enum wined3d_blit_
|
||||
@@ -7919,7 +7919,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, enum wined3d_blit_
|
||||
|
||||
context_release(context);
|
||||
|
||||
- surface_validate_location(dst_surface, dst_surface->container->resource.draw_binding);
|
||||
+ wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding);
|
||||
surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
|
||||
- surface_validate_location(dst_surface, dst_texture->resource.draw_binding);
|
||||
+ wined3d_resource_validate_location(&dst_surface->resource, dst_texture->resource.draw_binding);
|
||||
surface_invalidate_location(dst_surface, ~dst_texture->resource.draw_binding);
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
@ -213,7 +213,7 @@ index 3fe5d71..8ee0f82 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 14d5645..8c8d098 100644
|
||||
index 89eb024..54769c2 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -835,9 +835,7 @@ static void texture2d_sub_resource_invalidate_location(struct wined3d_resource *
|
||||
@ -228,10 +228,10 @@ index 14d5645..8c8d098 100644
|
||||
|
||||
static void texture2d_sub_resource_upload_data(struct wined3d_resource *sub_resource,
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 1113eaa..e0ff3b1 100644
|
||||
index 258977c..09bbb88 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2594,7 +2594,6 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
@@ -2597,7 +2597,6 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
|
||||
const struct wined3d_gl_info *gl_info, void *mem, unsigned int pitch) DECLSPEC_HIDDEN;
|
||||
HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const POINT *dst_point,
|
||||
struct wined3d_surface *src_surface, const RECT *src_rect) DECLSPEC_HIDDEN;
|
@ -1,4 +1,4 @@
|
||||
From 17d147ac91bdf126f87fea0e4da5365fba35dd63 Mon Sep 17 00:00:00 2001
|
||||
From 571452f299b7308530caafd2b197947a74307930 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sat, 4 Jan 2014 01:02:15 +0100
|
||||
Subject: wined3d: Remove surface_invalidate_location.
|
||||
@ -15,23 +15,23 @@ Subject: wined3d: Remove surface_invalidate_location.
|
||||
8 files changed, 31 insertions(+), 43 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index 60d2560..eb09795 100644
|
||||
index a95090a..bcc7f84 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -7919,7 +7919,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, enum wined3d_blit_
|
||||
@@ -7920,7 +7920,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, enum wined3d_blit_
|
||||
context_release(context);
|
||||
|
||||
wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding);
|
||||
- surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
|
||||
+ wined3d_resource_invalidate_location(&dst_surface->resource, ~dst_surface->container->resource.draw_binding);
|
||||
wined3d_resource_validate_location(&dst_surface->resource, dst_texture->resource.draw_binding);
|
||||
- surface_invalidate_location(dst_surface, ~dst_texture->resource.draw_binding);
|
||||
+ wined3d_resource_invalidate_location(&dst_surface->resource, ~dst_texture->resource.draw_binding);
|
||||
}
|
||||
|
||||
static HRESULT arbfp_blit_color_fill(struct wined3d_device *device, struct wined3d_rendertarget_view *view,
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index d0deff9..6ff5f4a 100644
|
||||
index be6530f..007bc29 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -3443,7 +3443,7 @@ static void context_setup_target(struct wined3d_context *context, struct wined3d
|
||||
@@ -3445,7 +3445,7 @@ static void context_setup_target(struct wined3d_context *context, struct wined3d
|
||||
if (texture->texture_srgb.name)
|
||||
wined3d_texture_load(texture, context, TRUE);
|
||||
wined3d_texture_load(texture, context, FALSE);
|
||||
@ -275,7 +275,7 @@ index 8ee0f82..dae2aa5 100644
|
||||
|
||||
/* MSDN says we're only allowed a single fullscreen swapchain per device,
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 373c906..9b5bd1b 100644
|
||||
index 9af1cad..8faaefb 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -816,7 +816,7 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
|
||||
@ -298,7 +298,7 @@ index 373c906..9b5bd1b 100644
|
||||
}
|
||||
|
||||
static void texture2d_sub_resource_validate_location(struct wined3d_resource *sub_resource, DWORD location)
|
||||
@@ -1698,7 +1696,7 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
|
||||
@@ -1696,7 +1694,7 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
|
||||
}
|
||||
|
||||
surface_load_location(surface, context, WINED3D_LOCATION_DIB);
|
||||
@ -307,7 +307,7 @@ index 373c906..9b5bd1b 100644
|
||||
|
||||
if (context)
|
||||
context_release(context);
|
||||
@@ -1761,7 +1759,7 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
@@ -1759,7 +1757,7 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
context = context_acquire(device, NULL);
|
||||
|
||||
surface_load_location(surface, context, surface->resource.map_binding);
|
||||
@ -317,10 +317,10 @@ index 373c906..9b5bd1b 100644
|
||||
context_release(context);
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 0039805..36a82f8 100644
|
||||
index 07f276e..6f74709 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2572,7 +2572,6 @@ HRESULT surface_create_dib_section(struct wined3d_surface *surface) DECLSPEC_HID
|
||||
@@ -2575,7 +2575,6 @@ HRESULT surface_create_dib_section(struct wined3d_surface *surface) DECLSPEC_HID
|
||||
GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
void surface_get_drawable_size(const struct wined3d_surface *surface, const struct wined3d_context *context,
|
||||
unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN;
|
@ -1,4 +1,4 @@
|
||||
From 7be737c0da2f427cb2dae44d83f6baf57a95e73d Mon Sep 17 00:00:00 2001
|
||||
From 510e47c448434c0633f4fbfaa854318768974dfd Mon Sep 17 00:00:00 2001
|
||||
From: Henri Verbeet <hverbeet@codeweavers.com>
|
||||
Date: Sat, 8 Dec 2012 19:28:54 +0100
|
||||
Subject: wined3d: Wait for resource updates to finish when using the
|
||||
@ -17,10 +17,10 @@ then it's probably useful for debugging.
|
||||
6 files changed, 40 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index 21290d8..260228f 100644
|
||||
index 3d832d4..f2e083a 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -7911,7 +7911,9 @@ static void arbfp_blit_surface(struct wined3d_device *device, enum wined3d_blit_
|
||||
@@ -7913,7 +7913,9 @@ static void arbfp_blit_surface(struct wined3d_device *device, enum wined3d_blit_
|
||||
/* Leave the opengl state valid for blitting */
|
||||
arbfp_blit_unset(context->gl_info);
|
||||
|
||||
@ -28,9 +28,9 @@ index 21290d8..260228f 100644
|
||||
+ if (wined3d_settings.cs_multithreaded)
|
||||
+ context->gl_info->gl_ops.gl.p_glFinish();
|
||||
+ else if (wined3d_settings.strict_draw_ordering
|
||||
|| (dst_surface->container->swapchain
|
||||
&& (dst_surface->container->swapchain->front_buffer == dst_surface->container)))
|
||||
|| (dst_texture->swapchain && (dst_texture->swapchain->front_buffer == dst_texture)))
|
||||
context->gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
|
||||
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
index 7eef51e..fa1ddc4 100644
|
||||
--- a/dlls/wined3d/buffer.c
|
@ -1,4 +1,4 @@
|
||||
From 61077043981635623c0f2eda20aa252c18fc4104 Mon Sep 17 00:00:00 2001
|
||||
From 26c3d4fdb5c95ed5d17e2b9b50b8e2e3940785eb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 4 Apr 2013 14:43:23 +0200
|
||||
Subject: wined3d: Don't access the stateblock in find_draw_buffers_mask
|
||||
@ -8,17 +8,17 @@ Subject: wined3d: Don't access the stateblock in find_draw_buffers_mask
|
||||
1 file changed, 9 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index fc66ff1..39c9464 100644
|
||||
index 2836d04..1d95dad 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -2231,14 +2231,14 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
|
||||
@@ -2429,14 +2429,14 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
|
||||
context_set_render_offscreen(context, TRUE);
|
||||
}
|
||||
|
||||
-static DWORD context_generate_rt_mask_no_fbo(const struct wined3d_device *device, const struct wined3d_surface *rt)
|
||||
+static DWORD context_generate_rt_mask_no_fbo(const struct wined3d_context *context, const struct wined3d_surface *rt)
|
||||
{
|
||||
if (!rt || rt->resource.format->id == WINED3DFMT_NULL)
|
||||
if (!rt || rt->container->resource.format->id == WINED3DFMT_NULL)
|
||||
return 0;
|
||||
else if (rt->container->swapchain)
|
||||
return context_generate_rt_mask_from_surface(rt);
|
||||
@ -28,7 +28,7 @@ index fc66ff1..39c9464 100644
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -2270,7 +2270,7 @@ void context_apply_blit_state(struct wined3d_context *context, const struct wine
|
||||
@@ -2468,7 +2468,7 @@ void context_apply_blit_state(struct wined3d_context *context, const struct wine
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -37,7 +37,7 @@ index fc66ff1..39c9464 100644
|
||||
}
|
||||
|
||||
cur_mask = context->current_fbo ? &context->current_fbo->rt_mask : &context->draw_buffers_mask;
|
||||
@@ -2356,7 +2356,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2557,7 +2557,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -46,7 +46,7 @@ index fc66ff1..39c9464 100644
|
||||
rt_count ? wined3d_rendertarget_view_get_surface(rts[0]) : NULL);
|
||||
}
|
||||
|
||||
@@ -2373,7 +2373,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2574,7 +2574,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -55,7 +55,7 @@ index fc66ff1..39c9464 100644
|
||||
rt_count ? wined3d_rendertarget_view_get_surface(rts[0]) : NULL);
|
||||
}
|
||||
|
||||
@@ -2408,16 +2408,15 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2618,16 +2618,15 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ index fc66ff1..39c9464 100644
|
||||
else if (!context->render_offscreen)
|
||||
return context_generate_rt_mask_from_surface(wined3d_rendertarget_view_get_surface(rts[0]));
|
||||
|
||||
@@ -2440,9 +2439,8 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
@@ -2650,9 +2649,8 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
/* Context activation is done by the caller. */
|
||||
void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
@ -85,7 +85,7 @@ index fc66ff1..39c9464 100644
|
||||
DWORD *cur_mask;
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
@@ -2710,13 +2708,12 @@ static void context_update_tex_unit_map(struct wined3d_context *context, const s
|
||||
@@ -2931,13 +2929,12 @@ static void context_update_tex_unit_map(struct wined3d_context *context, const s
|
||||
/* Context activation is done by the caller. */
|
||||
void context_state_drawbuf(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
@ -101,5 +101,5 @@ index fc66ff1..39c9464 100644
|
||||
{
|
||||
context_apply_draw_buffers(context, rt_mask);
|
||||
--
|
||||
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