mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
wined3d-CSMT_Main: Reenable CSMT patchset.
This commit is contained in:
parent
206ef39564
commit
56ed08d2e1
@ -365,6 +365,7 @@ patch_enable_all ()
|
||||
enable_wined3d_1DTextures="$1"
|
||||
enable_wined3d_Accounting="$1"
|
||||
enable_wined3d_CSMT_Helper="$1"
|
||||
enable_wined3d_CSMT_Main="$1"
|
||||
enable_wined3d_DXTn="$1"
|
||||
enable_wined3d_GTX_560M="$1"
|
||||
enable_wined3d_Limit_Vram="$1"
|
||||
@ -1274,6 +1275,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"
|
||||
;;
|
||||
@ -1994,6 +1998,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_CSMT_Helper" -eq 1; then
|
||||
if test "$enable_makedep_PARENTSPEC" -gt 1; then
|
||||
abort "Patchset makedep-PARENTSPEC disabled, but wined3d-CSMT_Helper depends on that."
|
||||
@ -7599,6 +7610,163 @@ if test "$enable_wined3d_check_format_support" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-CSMT_Main
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
# | * makedep-PARENTSPEC, ntdll-Attach_Process_DLLs, ntdll-DllOverrides_WOW64, ntdll-Loader_Machine_Type, ntdll-DllRedirects,
|
||||
# | wined3d-1DTextures, wined3d-Accounting, wined3d-DXTn, wined3d-QUERY_Stubs, wined3d-Revert_Pixel_Center_Offset, wined3d-
|
||||
# | Silence_FIXMEs, wined3d-CSMT_Helper
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#11674] Support for CSMT (command stream) to increase graphic performance
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/arb_program_shader.c, dlls/wined3d/buffer.c, dlls/wined3d/context.c, dlls/wined3d/cs.c,
|
||||
# | dlls/wined3d/device.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/view.c,
|
||||
# | dlls/wined3d/wined3d_main.c, dlls/wined3d/wined3d_private.h, include/wine/wined3d.h
|
||||
# |
|
||||
if test "$enable_wined3d_CSMT_Main" -eq 1; then
|
||||
patch_apply wined3d-CSMT_Main/9999-IfDefined.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Return location from wined3d_buffer_get_memory().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Use unsynchronized buffer updates only if there has been at least one buffer map.\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Avoid unsynchronized buffer update when reloading whole buffer.\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Introduce wined3d_rendertarget_view_get_drawable_size() as replacement for surface_get_drawable_size().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Move surface_get_drawable_size() to view.c file.\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Mark buffers as used in wined3d_buffer_copy().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Use wined3d_vec4 in fixup_transformed_pos().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Invalidate STATE_CONSTANT_BUFFER(*) device state in buffer_destroy_buffer_object() when needed.\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Fix style issues in delete_gl_buffer().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Pass context to delete_gl_buffer().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Invalidate device state based on buffer bind flags when buffer is deleted.\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Compute \"buffer_type_hint\" from buffer bind flags.\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Use buffer_bind() in buffer_conversion_upload().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Fix index offset for immediate mode draws.\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Introduce buffer_conversion_upload() helper function.\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Replace wined3d_buffer_load_sysmem() calls with wined3d_buffer_load_location().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Prefer current locations to WINED3D_LOCATION_SYSMEM in wined3d_buffer_copy().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Introduce wined3d_buffer_get_memory().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Implement wined3d_buffer_prepare_location() for WINED3D_LOCATION_BUFFER.\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Move buffer_get_memory() under wined3d_buffer_load_sysmem().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Do not assume that WINED3D_LOCATION_SYSMEM is always valid for double buffered buffers.\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Introduce wined3d_buffer_load_location().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Introduce wined3d_buffer_prepapre_location().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Explicitly track locations for buffers.\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Clean up buffer_internal_preload().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Let buffer_direct_upload() invalidate STATE_INDEXBUFFER if needed.\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Sanitise resource map flags in wined3d_resource_map().\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Send resource unmaps through the command stream.\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Send resource maps through the command stream.\".", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "Revert \"wined3d: Send shader constant updates through the command stream.\".", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Make surface_load_location return nothing.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Call texture_load_location instead of surface_load_location.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Share surface and volume system memory loading code.", 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: 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: 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: Pass the depth stencil to swapchain->present.", 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: Hack to reject unsupported color fills.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Restore some wined3d_device_copy_sub_resource_region checks.", 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: Send texture 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: 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: 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: Put this into the query poll patch.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Don'\''t access device state in clears.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Avoid destroying views in color and depth fills.", 1 },';
|
||||
echo '+ { "Matteo Bruni", "wined3d: Avoid calling wined3d_surface_blt() from surface_upload_from_surface().", 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: Fence update_texture calls.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Dirtify resources on unmap.", 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: Make resource maps and unmaps a priority command.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Send update_sub_resource calls through the command stream.", 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 texture maps with PBOs.", 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: 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: 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: Remove another glFinish.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Create VBOs through the command stream.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "Swapchain waits.", 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: Use surface_blt_ugly in swapchain_gl_present.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Use an event to block the worker thread when it is idle.", 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: Put GL_APPLE_flush_buffer_range syncing back in place.", 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: Only discard buffers that are in use.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Send getdc and releasedc through the command stream.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Ignore WINED3D_MAP_NO_DIRTY_UPDATE in resource_map.", 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: Call create_default_sampler from create_dummy_textures.", 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: Update the swap interval through the CS in reset.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Do the sampler GL init through the CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Create initial DCs through the CS.", 1 },';
|
||||
echo '+ { "Stefan Dösinger", "wined3d: Assign a read buffer when discarding a new texture.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "wined3d: Do not query available GPU memory on main thread when CSMT is enabled.", 1 },';
|
||||
echo '+ { "Nils Kuhnhenn", "wined3d: Fix incorrect return value in wined3d_cs_exec_set_light.", 1 },';
|
||||
echo '+ { "Nils Kuhnhenn", "wined3d: Fix context_acquire not being called from the command thread in wined3d_texture_add_dirty_region.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "wined3d: Do not signal CS event when we manage to unset waiting_for_event quickly enough.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "wined3d: Enable CSMT by default, print a winediag message informing about this patchset.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset winedevice-Fix_Relocation
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 2bd4f2e4ad2310471f7c3cd85f59f261314cd6c4 Mon Sep 17 00:00:00 2001
|
||||
From 9e7a6ec77afd6a2a0304b2a09697792f80c2a595 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 15 Nov 2016 22:07:56 +0100
|
||||
Subject: Revert "wined3d: Introduce
|
||||
@ -14,7 +14,7 @@ This reverts commit 5cdb8f2486cf00a61c1aac20daef8c7cac0d8312.
|
||||
4 files changed, 10 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index d7349fcf..a611531 100644
|
||||
index ae8ca97..c526266 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -291,8 +291,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
||||
@ -37,10 +37,10 @@ index d7349fcf..a611531 100644
|
||||
else
|
||||
{
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index cd3763c..9e36bcd 100644
|
||||
index 3a899b3..6e89fbc 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -4624,7 +4624,7 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine
|
||||
@@ -4633,7 +4633,7 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine
|
||||
if (vp.height > target->height)
|
||||
vp.height = target->height;
|
||||
|
||||
@ -49,7 +49,7 @@ index cd3763c..9e36bcd 100644
|
||||
}
|
||||
else if (depth_stencil)
|
||||
{
|
||||
@@ -4668,7 +4668,7 @@ static void viewport_miscpart_cc(struct wined3d_context *context,
|
||||
@@ -4675,7 +4675,7 @@ static void viewport_miscpart_cc(struct wined3d_context *context,
|
||||
if (vp.height > target->height)
|
||||
vp.height = target->height;
|
||||
|
||||
@ -58,7 +58,7 @@ index cd3763c..9e36bcd 100644
|
||||
}
|
||||
else if (depth_stencil)
|
||||
{
|
||||
@@ -4853,7 +4853,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
@@ -4860,7 +4860,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
UINT height;
|
||||
UINT width;
|
||||
|
||||
@ -68,10 +68,10 @@ index cd3763c..9e36bcd 100644
|
||||
}
|
||||
checkGLcall("glScissor");
|
||||
diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
|
||||
index a67c506..1f819e6 100644
|
||||
index 10eecc8..cfd2ce1 100644
|
||||
--- a/dlls/wined3d/view.c
|
||||
+++ b/dlls/wined3d/view.c
|
||||
@@ -94,21 +94,10 @@ struct wined3d_resource * CDECL wined3d_rendertarget_view_get_resource(const str
|
||||
@@ -195,21 +195,10 @@ struct wined3d_resource * CDECL wined3d_rendertarget_view_get_resource(const str
|
||||
return view->resource;
|
||||
}
|
||||
|
||||
@ -97,10 +97,10 @@ index a67c506..1f819e6 100644
|
||||
/* The drawable size of an onscreen drawable is the surface size.
|
||||
* (Actually: The window size, but the surface is created in window
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 503f7f2..19b650e 100644
|
||||
index f14ad98..52bf790 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2908,6 +2908,8 @@ HRESULT surface_color_fill(struct wined3d_surface *s,
|
||||
@@ -2973,6 +2973,8 @@ HRESULT surface_color_fill(struct wined3d_surface *s,
|
||||
const RECT *rect, const struct wined3d_color *color) DECLSPEC_HIDDEN;
|
||||
HRESULT wined3d_surface_create_dc(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
void wined3d_surface_destroy_dc(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
@ -109,16 +109,16 @@ index 503f7f2..19b650e 100644
|
||||
void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb,
|
||||
struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
HRESULT surface_load_location(struct wined3d_surface *surface,
|
||||
@@ -3224,9 +3226,6 @@ static inline struct wined3d_surface *wined3d_rendertarget_view_get_surface(
|
||||
@@ -3291,9 +3293,6 @@ static inline struct wined3d_surface *wined3d_rendertarget_view_get_surface(
|
||||
return texture->sub_resources[view->sub_resource_idx].u.surface;
|
||||
}
|
||||
|
||||
-void wined3d_rendertarget_view_get_drawable_size(const struct wined3d_rendertarget_view *view,
|
||||
- const struct wined3d_context *context, unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN;
|
||||
-
|
||||
struct wined3d_shader_resource_view
|
||||
struct wined3d_gl_view
|
||||
{
|
||||
LONG refcount;
|
||||
GLenum target;
|
||||
--
|
||||
2.9.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 1a411d1906c961dc1d754181823b2ce92301937a Mon Sep 17 00:00:00 2001
|
||||
From 3d5e571fff02e6e1ca260c00025864230e9a058f Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 15 Nov 2016 22:08:06 +0100
|
||||
Subject: Revert "wined3d: Move surface_get_drawable_size() to view.c file."
|
||||
@ -10,7 +10,7 @@ This reverts commit 4beb9e5922301b76c16f6ea885bc1cb604f9eb91.
|
||||
2 files changed, 33 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index bba855a..1c211ed 100644
|
||||
index 3fb3394..630d463 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -36,6 +36,39 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_perf);
|
||||
@ -54,10 +54,10 @@ index bba855a..1c211ed 100644
|
||||
{
|
||||
GLenum binding;
|
||||
diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
|
||||
index 1f819e6..7f07d57 100644
|
||||
index cfd2ce1..95f7453 100644
|
||||
--- a/dlls/wined3d/view.c
|
||||
+++ b/dlls/wined3d/view.c
|
||||
@@ -94,39 +94,6 @@ struct wined3d_resource * CDECL wined3d_rendertarget_view_get_resource(const str
|
||||
@@ -195,39 +195,6 @@ struct wined3d_resource * CDECL wined3d_rendertarget_view_get_resource(const str
|
||||
return view->resource;
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ index 1f819e6..7f07d57 100644
|
||||
-}
|
||||
-
|
||||
static HRESULT wined3d_rendertarget_view_init(struct wined3d_rendertarget_view *view,
|
||||
const struct wined3d_rendertarget_view_desc *desc, struct wined3d_resource *resource,
|
||||
const struct wined3d_view_desc *desc, struct wined3d_resource *resource,
|
||||
void *parent, const struct wined3d_parent_ops *parent_ops)
|
||||
--
|
||||
2.9.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 244b077b597e99f5a68b9c905114ee6a82781c73 Mon Sep 17 00:00:00 2001
|
||||
From 9364fbffd1a4a65bb2b833f3d53cfa24bcf9a3b2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 20 Dec 2012 13:09:17 +0100
|
||||
Subject: wined3d: Move the framebuffer into wined3d_state
|
||||
@ -20,7 +20,7 @@ Subject: wined3d: Move the framebuffer into wined3d_state
|
||||
13 files changed, 194 insertions(+), 135 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index cbdc871..5a0bb65 100644
|
||||
index 5de7c02..d3d35c5 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -704,7 +704,7 @@ static void shader_arb_load_constants_internal(struct shader_arb_priv *priv,
|
||||
@ -42,10 +42,10 @@ index cbdc871..5a0bb65 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index e7d0121..200a899 100644
|
||||
index 0642766..0545e57 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -1705,6 +1705,11 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
@@ -1706,6 +1706,11 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ index e7d0121..200a899 100644
|
||||
/* Initialize the texture unit mapping to a 1:1 mapping */
|
||||
for (s = 0; s < MAX_COMBINED_SAMPLERS; ++s)
|
||||
{
|
||||
@@ -2013,6 +2018,7 @@ out:
|
||||
@@ -2026,6 +2031,7 @@ out:
|
||||
if (hdc) wined3d_release_dc(swapchain->win_handle, hdc);
|
||||
device->shader_backend->shader_free_context_data(ret);
|
||||
device->adapter->fragment_pipe->free_context_data(ret);
|
||||
@ -65,7 +65,7 @@ index e7d0121..200a899 100644
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_event_queries);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries);
|
||||
@@ -2060,6 +2066,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
|
||||
@@ -2073,6 +2079,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
|
||||
device->shader_backend->shader_free_context_data(context);
|
||||
device->adapter->fragment_pipe->free_context_data(context);
|
||||
HeapFree(GetProcessHeap(), 0, context->fbo_key);
|
||||
@ -73,7 +73,7 @@ index e7d0121..200a899 100644
|
||||
HeapFree(GetProcessHeap(), 0, context->draw_buffers);
|
||||
HeapFree(GetProcessHeap(), 0, context->blit_targets);
|
||||
device_context_remove(device, context);
|
||||
@@ -2614,7 +2621,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2627,7 +2634,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
DWORD rt_mask = 0, *cur_mask;
|
||||
UINT i;
|
||||
|
||||
@ -82,7 +82,7 @@ index e7d0121..200a899 100644
|
||||
|| rt_count != gl_info->limits.buffers)
|
||||
{
|
||||
if (!context_validate_rt_config(rt_count, rts, dsv))
|
||||
@@ -2659,6 +2666,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2672,6 +2679,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
rt_mask = context_generate_rt_mask_no_fbo(context,
|
||||
rt_count ? wined3d_rendertarget_view_get_surface(rts[0])->container : NULL);
|
||||
}
|
||||
@ -91,7 +91,7 @@ index e7d0121..200a899 100644
|
||||
}
|
||||
else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
|
||||
&& (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource)))
|
||||
@@ -2716,7 +2725,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2729,7 +2738,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
|
||||
static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const struct wined3d_state *state)
|
||||
{
|
||||
@ -100,7 +100,7 @@ index e7d0121..200a899 100644
|
||||
struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL];
|
||||
DWORD rt_mask, rt_mask_bits;
|
||||
unsigned int i;
|
||||
@@ -2746,7 +2755,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
@@ -2759,7 +2768,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
DWORD rt_mask = find_draw_buffers_mask(context, state);
|
||||
@ -109,7 +109,7 @@ index e7d0121..200a899 100644
|
||||
DWORD *cur_mask;
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
@@ -3035,6 +3044,8 @@ void context_state_drawbuf(struct wined3d_context *context, const struct wined3d
|
||||
@@ -3048,6 +3057,8 @@ void context_state_drawbuf(struct wined3d_context *context, const struct wined3d
|
||||
context_apply_draw_buffers(context, rt_mask);
|
||||
*cur_mask = rt_mask;
|
||||
}
|
||||
@ -118,7 +118,7 @@ index e7d0121..200a899 100644
|
||||
}
|
||||
|
||||
static BOOL fixed_get_input(BYTE usage, BYTE usage_idx, unsigned int *regnum)
|
||||
@@ -3409,7 +3420,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
|
||||
@@ -3479,7 +3490,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
|
||||
const struct wined3d_device *device, const struct wined3d_state *state)
|
||||
{
|
||||
const struct StateEntry *state_table = context->state_table;
|
||||
@ -128,10 +128,10 @@ index e7d0121..200a899 100644
|
||||
WORD map;
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index b4cbcab..0beb6c2 100644
|
||||
index 1029c1a..3bca1bd 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -342,19 +342,19 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
@@ -350,19 +350,19 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
state = &device->state;
|
||||
wined3d_get_draw_rect(state, &draw_rect);
|
||||
device_clear_render_targets(device, device->adapter->gl_info.limits.buffers,
|
||||
@ -155,7 +155,7 @@ index b4cbcab..0beb6c2 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
|
||||
@@ -377,12 +377,12 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -385,12 +385,12 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
{
|
||||
for (i = 0; i < cs->device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@ -171,7 +171,7 @@ index b4cbcab..0beb6c2 100644
|
||||
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
@@ -420,11 +420,11 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@@ -428,11 +428,11 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
}
|
||||
for (i = 0; i < cs->device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@ -187,7 +187,7 @@ index b4cbcab..0beb6c2 100644
|
||||
for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i)
|
||||
{
|
||||
if (!(shader = state->shader[i]))
|
||||
@@ -481,11 +481,11 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
@@ -489,11 +489,11 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
}
|
||||
for (i = 0; i < cs->device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@ -203,7 +203,7 @@ index b4cbcab..0beb6c2 100644
|
||||
for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i)
|
||||
{
|
||||
if (!(shader = state->shader[i]))
|
||||
@@ -573,7 +573,7 @@ static void wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const v
|
||||
@@ -581,7 +581,7 @@ static void wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const v
|
||||
{
|
||||
const struct wined3d_cs_set_rendertarget_view *op = data;
|
||||
|
||||
@ -212,7 +212,7 @@ index b4cbcab..0beb6c2 100644
|
||||
device_invalidate_state(cs->device, STATE_FRAMEBUFFER);
|
||||
}
|
||||
|
||||
@@ -596,7 +596,7 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
@@ -604,7 +604,7 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
struct wined3d_device *device = cs->device;
|
||||
struct wined3d_rendertarget_view *prev;
|
||||
|
||||
@ -221,7 +221,7 @@ index b4cbcab..0beb6c2 100644
|
||||
{
|
||||
struct wined3d_surface *prev_surface = wined3d_rendertarget_view_get_surface(prev);
|
||||
|
||||
@@ -612,7 +612,7 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
@@ -620,7 +620,7 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
}
|
||||
}
|
||||
|
||||
@ -230,7 +230,7 @@ index b4cbcab..0beb6c2 100644
|
||||
|
||||
if (!prev != !op->view)
|
||||
{
|
||||
@@ -1201,11 +1201,13 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
@@ -1238,11 +1238,13 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
struct wined3d_adapter *adapter = cs->device->adapter;
|
||||
@ -246,7 +246,7 @@ index b4cbcab..0beb6c2 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1374,15 +1376,13 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1412,15 +1414,13 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
if (!(cs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*cs))))
|
||||
return NULL;
|
||||
|
||||
@ -264,7 +264,7 @@ index b4cbcab..0beb6c2 100644
|
||||
cs->ops = &wined3d_cs_st_ops;
|
||||
cs->device = device;
|
||||
|
||||
@@ -1390,7 +1390,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1428,7 +1428,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
if (!(cs->data = HeapAlloc(GetProcessHeap(), 0, cs->data_size)))
|
||||
{
|
||||
state_cleanup(&cs->state);
|
||||
@ -272,7 +272,7 @@ index b4cbcab..0beb6c2 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
return NULL;
|
||||
}
|
||||
@@ -1401,7 +1400,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1439,7 +1438,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
{
|
||||
state_cleanup(&cs->state);
|
||||
@ -281,7 +281,7 @@ index b4cbcab..0beb6c2 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
}
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index c08dda6..6356b64 100644
|
||||
index 1ce6d76..9757cd5 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1004,7 +1004,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
|
||||
@ -311,7 +311,7 @@ index c08dda6..6356b64 100644
|
||||
if (FAILED(hr = device->shader_backend->shader_alloc_private(device,
|
||||
device->adapter->vertex_pipe, device->adapter->fragment_pipe)))
|
||||
{
|
||||
@@ -1112,7 +1108,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
@@ -1114,7 +1110,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
return WINED3D_OK;
|
||||
|
||||
err_out:
|
||||
@ -319,7 +319,7 @@ index c08dda6..6356b64 100644
|
||||
HeapFree(GetProcessHeap(), 0, device->swapchains);
|
||||
device->swapchain_count = 0;
|
||||
if (device->back_buffer_view)
|
||||
@@ -1190,8 +1185,25 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1192,8 +1187,25 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
if (device->cursor_texture)
|
||||
wined3d_texture_decref(device->cursor_texture);
|
||||
|
||||
@ -345,7 +345,7 @@ index c08dda6..6356b64 100644
|
||||
/* Unload resources */
|
||||
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
|
||||
{
|
||||
@@ -1218,37 +1230,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1220,37 +1232,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
|
||||
context_release(context);
|
||||
|
||||
@ -383,7 +383,7 @@ index c08dda6..6356b64 100644
|
||||
if (device->back_buffer_view)
|
||||
{
|
||||
wined3d_rendertarget_view_decref(device->back_buffer_view);
|
||||
@@ -1266,9 +1247,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1268,9 +1249,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
device->swapchains = NULL;
|
||||
device->swapchain_count = 0;
|
||||
|
||||
@ -393,7 +393,7 @@ index c08dda6..6356b64 100644
|
||||
device->d3d_initialized = FALSE;
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2085,7 +2063,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
|
||||
@@ -2087,7 +2065,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
|
||||
|| !(dst_texture->resource.format_flags & WINED3DFMT_FLAG_DEPTH))
|
||||
return;
|
||||
|
||||
@ -402,7 +402,7 @@ index c08dda6..6356b64 100644
|
||||
return;
|
||||
if (src_view->resource->type == WINED3D_RTYPE_BUFFER)
|
||||
{
|
||||
@@ -3485,6 +3463,8 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
@@ -3513,6 +3491,8 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_count,
|
||||
const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
|
||||
{
|
||||
@ -411,7 +411,7 @@ index c08dda6..6356b64 100644
|
||||
TRACE("device %p, rect_count %u, rects %p, flags %#x, color %s, depth %.8e, stencil %u.\n",
|
||||
device, rect_count, rects, flags, debug_color(color), depth, stencil);
|
||||
|
||||
@@ -3496,7 +3476,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
@@ -3524,7 +3504,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
|
||||
if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
|
||||
{
|
||||
@ -420,7 +420,7 @@ index c08dda6..6356b64 100644
|
||||
if (!ds)
|
||||
{
|
||||
WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n");
|
||||
@@ -3505,8 +3485,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
@@ -3533,8 +3513,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
}
|
||||
else if (flags & WINED3DCLEAR_TARGET)
|
||||
{
|
||||
@ -431,7 +431,7 @@ index c08dda6..6356b64 100644
|
||||
{
|
||||
WARN("Silently ignoring depth and target clear with mismatching sizes\n");
|
||||
return WINED3D_OK;
|
||||
@@ -3822,8 +3802,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
|
||||
@@ -3850,8 +3830,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
|
||||
if (state->render_states[WINED3D_RS_ZENABLE] || state->render_states[WINED3D_RS_ZWRITEENABLE]
|
||||
|| state->render_states[WINED3D_RS_STENCILENABLE])
|
||||
{
|
||||
@ -442,7 +442,7 @@ index c08dda6..6356b64 100644
|
||||
|
||||
if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
|
||||
{
|
||||
@@ -4281,20 +4261,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
|
||||
@@ -4287,20 +4267,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -466,7 +466,7 @@ index c08dda6..6356b64 100644
|
||||
|
||||
TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n",
|
||||
device, view_idx, view, set_viewport);
|
||||
@@ -4331,13 +4312,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
@@ -4337,13 +4318,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
}
|
||||
|
||||
|
||||
@ -482,7 +482,7 @@ index c08dda6..6356b64 100644
|
||||
wined3d_cs_emit_set_rendertarget_view(device->cs, view_idx, view);
|
||||
/* Release after the assignment, to prevent device_resource_released()
|
||||
* from seeing the surface as still in use. */
|
||||
@@ -4349,18 +4330,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
@@ -4355,18 +4336,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
|
||||
void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view)
|
||||
{
|
||||
@ -504,7 +504,7 @@ index c08dda6..6356b64 100644
|
||||
wined3d_rendertarget_view_incref(view);
|
||||
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
|
||||
if (prev)
|
||||
@@ -4721,10 +4703,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4727,10 +4709,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
wined3d_texture_decref(device->cursor_texture);
|
||||
device->cursor_texture = NULL;
|
||||
}
|
||||
@ -516,7 +516,7 @@ index c08dda6..6356b64 100644
|
||||
{
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@@ -4733,6 +4714,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4739,6 +4720,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
}
|
||||
wined3d_device_set_depth_stencil_view(device, NULL);
|
||||
|
||||
@ -528,7 +528,7 @@ index c08dda6..6356b64 100644
|
||||
if (device->onscreen_depth_stencil)
|
||||
{
|
||||
wined3d_texture_decref(device->onscreen_depth_stencil->container);
|
||||
@@ -4901,27 +4887,28 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4911,27 +4897,28 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
if (device->d3d_initialized)
|
||||
delete_opengl_contexts(device, swapchain);
|
||||
|
||||
@ -564,7 +564,7 @@ index c08dda6..6356b64 100644
|
||||
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
|
||||
}
|
||||
|
||||
@@ -5011,11 +4998,11 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
@@ -5021,11 +5008,11 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@ -578,7 +578,7 @@ index c08dda6..6356b64 100644
|
||||
ERR("Resource %p is still in use as depth/stencil buffer.\n", resource);
|
||||
|
||||
switch (type)
|
||||
@@ -5140,8 +5127,12 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
@@ -5150,8 +5137,12 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
|
||||
device->blitter = adapter->blitter;
|
||||
|
||||
@ -594,10 +594,10 @@ index c08dda6..6356b64 100644
|
||||
|
||||
if (!(device->cs = wined3d_cs_create(device)))
|
||||
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
|
||||
index e5b30db..1188009 100644
|
||||
index 06c5bc9..fa92f25 100644
|
||||
--- a/dlls/wined3d/drawprim.c
|
||||
+++ b/dlls/wined3d/drawprim.c
|
||||
@@ -412,7 +412,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
|
||||
@@ -413,7 +413,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
|
||||
int base_vertex_idx, unsigned int start_idx, unsigned int index_count,
|
||||
unsigned int start_instance, unsigned int instance_count, BOOL indexed)
|
||||
{
|
||||
@ -607,10 +607,10 @@ index e5b30db..1188009 100644
|
||||
struct wined3d_event_query *ib_query = NULL;
|
||||
struct wined3d_stream_info si_emulated;
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index 3fa02c2..35b2abe55 100644
|
||||
index a3c2190..4edeb01 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -1514,7 +1514,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
@@ -1561,7 +1561,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
const struct wined3d_vec4 correction_params =
|
||||
{
|
||||
/* Position is relative to the framebuffer, not the viewport. */
|
||||
@ -620,10 +620,10 @@ index 3fa02c2..35b2abe55 100644
|
||||
0.0f,
|
||||
0.0f,
|
||||
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
index 61509d9..a2fb749 100644
|
||||
index 24051cc..5c28bff 100644
|
||||
--- a/dlls/wined3d/shader.c
|
||||
+++ b/dlls/wined3d/shader.c
|
||||
@@ -3066,7 +3066,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
@@ -3198,7 +3198,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
UINT i;
|
||||
|
||||
memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */
|
||||
@ -633,7 +633,7 @@ index 61509d9..a2fb749 100644
|
||||
static unsigned int warned = 0;
|
||||
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index 8ac23bc..60e1ea6 100644
|
||||
index 6e89fbc..519c084 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -152,7 +152,7 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_
|
||||
@ -661,7 +661,7 @@ index 8ac23bc..60e1ea6 100644
|
||||
/* Disable blending in all cases even without pixelshaders.
|
||||
* With blending on we could face a big performance penalty.
|
||||
@@ -858,7 +858,7 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
|
||||
GLint depthFail_ccw;
|
||||
GLint depthFail_back;
|
||||
|
||||
/* No stencil test without a stencil buffer. */
|
||||
- if (!state->fb->depth_stencil)
|
||||
@ -737,10 +737,10 @@ index 8ac23bc..60e1ea6 100644
|
||||
else
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_FRAMEBUFFER_SRGB);
|
||||
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
|
||||
index 2fbfa2c..bb3c0cc 100644
|
||||
index fd01752..2fd4ef4 100644
|
||||
--- a/dlls/wined3d/stateblock.c
|
||||
+++ b/dlls/wined3d/stateblock.c
|
||||
@@ -430,6 +430,7 @@ void state_unbind_resources(struct wined3d_state *state)
|
||||
@@ -431,6 +431,7 @@ void state_unbind_resources(struct wined3d_state *state)
|
||||
struct wined3d_texture *texture;
|
||||
struct wined3d_buffer *buffer;
|
||||
struct wined3d_shader *shader;
|
||||
@ -748,8 +748,8 @@ index 2fbfa2c..bb3c0cc 100644
|
||||
unsigned int i, j;
|
||||
|
||||
if ((decl = state->vertex_declaration))
|
||||
@@ -506,6 +507,31 @@ void state_unbind_resources(struct wined3d_state *state)
|
||||
}
|
||||
@@ -516,6 +517,31 @@ void state_unbind_resources(struct wined3d_state *state)
|
||||
wined3d_unordered_access_view_decref(uav);
|
||||
}
|
||||
}
|
||||
+
|
||||
@ -780,7 +780,7 @@ index 2fbfa2c..bb3c0cc 100644
|
||||
}
|
||||
|
||||
void state_cleanup(struct wined3d_state *state)
|
||||
@@ -530,6 +556,8 @@ void state_cleanup(struct wined3d_state *state)
|
||||
@@ -540,6 +566,8 @@ void state_cleanup(struct wined3d_state *state)
|
||||
HeapFree(GetProcessHeap(), 0, light);
|
||||
}
|
||||
}
|
||||
@ -789,7 +789,7 @@ index 2fbfa2c..bb3c0cc 100644
|
||||
}
|
||||
|
||||
ULONG CDECL wined3d_stateblock_decref(struct wined3d_stateblock *stateblock)
|
||||
@@ -1244,32 +1272,41 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
|
||||
@@ -1254,32 +1282,41 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
|
||||
}
|
||||
}
|
||||
|
||||
@ -837,10 +837,10 @@ index 2fbfa2c..bb3c0cc 100644
|
||||
if (type == WINED3D_SBT_RECORDED)
|
||||
return WINED3D_OK;
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 08f6d10..b87bbab 100644
|
||||
index d21b293..6db9ca8 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -2568,7 +2568,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
@@ -2572,7 +2572,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
{
|
||||
struct wined3d_texture *dst_texture = dst_surface->container;
|
||||
struct wined3d_device *device = dst_texture->resource.device;
|
||||
@ -850,7 +850,7 @@ index 08f6d10..b87bbab 100644
|
||||
struct wined3d_texture *src_texture;
|
||||
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index d5478f4..f649b2f 100644
|
||||
index dc7f5de..2773d2f 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -488,7 +488,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain,
|
||||
@ -863,10 +863,10 @@ index d5478f4..f649b2f 100644
|
||||
struct wined3d_texture *logo_texture;
|
||||
struct wined3d_context *context;
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index cb3ae62..267e884 100644
|
||||
index 3eed41a..ea4d94d 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -4532,7 +4532,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
|
||||
@@ -4583,7 +4583,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
|
||||
float y_offset = flip
|
||||
? (center_offset - (2.0f * y) - h) / h
|
||||
: (center_offset - (2.0f * y) - h) / -h;
|
||||
@ -875,7 +875,7 @@ index cb3ae62..267e884 100644
|
||||
state->render_states[WINED3D_RS_ZENABLE] : WINED3D_ZB_FALSE;
|
||||
float z_scale = zenable ? clip_control ? 1.0f : 2.0f : 0.0f;
|
||||
float z_offset = zenable ? clip_control ? 0.0f : -1.0f : 0.0f;
|
||||
@@ -5331,7 +5331,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
|
||||
@@ -5382,7 +5382,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -885,10 +885,10 @@ index cb3ae62..267e884 100644
|
||||
|| !state->render_states[WINED3D_RS_CLIPPLANEENABLE])
|
||||
{
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index f338c55..8bb5957 100644
|
||||
index df28689..497b79a 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1447,6 +1447,36 @@ struct wined3d_timestamp_query
|
||||
@@ -1504,6 +1504,36 @@ struct wined3d_timestamp_query
|
||||
void context_alloc_timestamp_query(struct wined3d_context *context, struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN;
|
||||
void context_free_timestamp_query(struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN;
|
||||
|
||||
@ -925,7 +925,7 @@ index f338c55..8bb5957 100644
|
||||
struct wined3d_context
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
@@ -1461,6 +1491,7 @@ struct wined3d_context
|
||||
@@ -1518,6 +1548,7 @@ struct wined3d_context
|
||||
DWORD dirtyArray[STATE_HIGHEST + 1]; /* Won't get bigger than that, a state is never marked dirty 2 times */
|
||||
DWORD numDirtyEntries;
|
||||
DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */
|
||||
@ -933,7 +933,7 @@ index f338c55..8bb5957 100644
|
||||
|
||||
struct wined3d_device *device;
|
||||
struct wined3d_swapchain *swapchain;
|
||||
@@ -1571,12 +1602,6 @@ struct wined3d_context
|
||||
@@ -1630,12 +1661,6 @@ struct wined3d_context
|
||||
GLuint dummy_arbfp_prog;
|
||||
};
|
||||
|
||||
@ -946,7 +946,7 @@ index f338c55..8bb5957 100644
|
||||
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
|
||||
|
||||
struct StateEntry
|
||||
@@ -2380,7 +2405,7 @@ struct wined3d_stream_state
|
||||
@@ -2442,7 +2467,7 @@ struct wined3d_stream_state
|
||||
struct wined3d_state
|
||||
{
|
||||
DWORD flags;
|
||||
@ -955,7 +955,7 @@ index f338c55..8bb5957 100644
|
||||
|
||||
struct wined3d_vertex_declaration *vertex_declaration;
|
||||
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
|
||||
@@ -2485,7 +2510,6 @@ struct wined3d_device
|
||||
@@ -2548,7 +2573,6 @@ struct wined3d_device
|
||||
struct wine_rb_tree samplers;
|
||||
|
||||
/* Render Target Support */
|
||||
@ -963,7 +963,7 @@ index f338c55..8bb5957 100644
|
||||
struct wined3d_surface *onscreen_depth_stencil;
|
||||
struct wined3d_rendertarget_view *auto_depth_stencil_view;
|
||||
|
||||
@@ -3035,9 +3059,8 @@ struct wined3d_stateblock
|
||||
@@ -3098,9 +3122,8 @@ struct wined3d_stateblock
|
||||
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
|
||||
|
||||
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
@ -975,7 +975,7 @@ index f338c55..8bb5957 100644
|
||||
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
|
||||
struct wined3d_cs_ops
|
||||
@@ -3050,7 +3073,6 @@ struct wined3d_cs
|
||||
@@ -3113,7 +3136,6 @@ struct wined3d_cs
|
||||
{
|
||||
const struct wined3d_cs_ops *ops;
|
||||
struct wined3d_device *device;
|
||||
|
@ -1,16 +1,16 @@
|
||||
From 6e78f864b5f4c377f49483ea35859db2429917c3 Mon Sep 17 00:00:00 2001
|
||||
From 43060700de61d94ba910752b26d9a4327b56fc2c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 1 Oct 2013 14:31:56 +0200
|
||||
Subject: wined3d: Hackily introduce a multithreaded command stream
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 377 +++++++++++++++++++++++++++++++++++++----
|
||||
dlls/wined3d/cs.c | 381 +++++++++++++++++++++++++++++++++++++----
|
||||
dlls/wined3d/wined3d_main.c | 9 +
|
||||
dlls/wined3d/wined3d_private.h | 18 ++
|
||||
3 files changed, 372 insertions(+), 32 deletions(-)
|
||||
3 files changed, 375 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 0beb6c2..b25aab3 100644
|
||||
index 3bca1bd..59725a3 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -24,8 +24,19 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
||||
@ -33,7 +33,7 @@ index 0beb6c2..b25aab3 100644
|
||||
WINED3D_CS_OP_PRESENT,
|
||||
WINED3D_CS_OP_CLEAR,
|
||||
WINED3D_CS_OP_DRAW,
|
||||
@@ -57,6 +68,18 @@ enum wined3d_cs_op
|
||||
@@ -58,6 +69,18 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_QUERY_ISSUE,
|
||||
WINED3D_CS_OP_PRELOAD_RESOURCE,
|
||||
WINED3D_CS_OP_UNLOAD_RESOURCE,
|
||||
@ -52,7 +52,7 @@ index 0beb6c2..b25aab3 100644
|
||||
};
|
||||
|
||||
struct wined3d_cs_present
|
||||
@@ -289,7 +312,134 @@ struct wined3d_cs_unload_resource
|
||||
@@ -297,7 +320,134 @@ struct wined3d_cs_unload_resource
|
||||
struct wined3d_resource *resource;
|
||||
};
|
||||
|
||||
@ -188,7 +188,7 @@ index 0beb6c2..b25aab3 100644
|
||||
{
|
||||
const struct wined3d_cs_present *op = data;
|
||||
struct wined3d_swapchain *swapchain;
|
||||
@@ -305,6 +455,8 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
@@ -313,6 +463,8 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
wined3d_resource_release(&swapchain->back_buffers[i]->resource);
|
||||
}
|
||||
@ -197,7 +197,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
|
||||
@@ -330,13 +482,14 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -338,13 +490,14 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -213,7 +213,7 @@ index 0beb6c2..b25aab3 100644
|
||||
|
||||
device = cs->device;
|
||||
state = &device->state;
|
||||
@@ -355,6 +508,8 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
@@ -363,6 +516,8 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
}
|
||||
if (op->flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
|
||||
wined3d_resource_release(state->fb.depth_stencil->resource);
|
||||
@ -222,7 +222,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
|
||||
@@ -387,7 +542,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -395,7 +550,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -231,7 +231,7 @@ index 0beb6c2..b25aab3 100644
|
||||
{
|
||||
struct wined3d_state *state = &cs->device->state;
|
||||
struct wined3d_shader_sampler_map_entry *entry;
|
||||
@@ -446,6 +601,8 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@@ -454,6 +609,8 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
wined3d_resource_release(view->resource);
|
||||
}
|
||||
}
|
||||
@ -240,7 +240,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned int start_idx,
|
||||
@@ -511,12 +668,14 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
@@ -519,12 +676,14 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -256,7 +256,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query *predicate, BOOL value)
|
||||
@@ -531,12 +690,14 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
@@ -539,12 +698,14 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -272,7 +272,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport)
|
||||
@@ -550,12 +711,14 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
@@ -558,12 +719,14 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -288,7 +288,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -569,12 +732,14 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -577,12 +740,14 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -304,7 +304,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int view_idx,
|
||||
@@ -590,7 +755,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
@@ -598,7 +763,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -313,7 +313,7 @@ index 0beb6c2..b25aab3 100644
|
||||
{
|
||||
const struct wined3d_cs_set_depth_stencil_view *op = data;
|
||||
struct wined3d_device *device = cs->device;
|
||||
@@ -629,6 +794,8 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
@@ -637,6 +802,8 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
}
|
||||
|
||||
device_invalidate_state(device, STATE_FRAMEBUFFER);
|
||||
@ -322,7 +322,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view)
|
||||
@@ -642,12 +809,14 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
@@ -650,12 +817,14 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -338,7 +338,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3d_vertex_declaration *declaration)
|
||||
@@ -661,7 +830,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
@@ -669,7 +838,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -347,7 +347,7 @@ index 0beb6c2..b25aab3 100644
|
||||
{
|
||||
const struct wined3d_cs_set_stream_source *op = data;
|
||||
struct wined3d_stream_state *stream;
|
||||
@@ -679,6 +848,8 @@ static void wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void
|
||||
@@ -687,6 +856,8 @@ static void wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_STREAMSRC);
|
||||
@ -356,7 +356,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -696,7 +867,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -704,7 +875,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -365,7 +365,7 @@ index 0beb6c2..b25aab3 100644
|
||||
{
|
||||
const struct wined3d_cs_set_stream_source_freq *op = data;
|
||||
struct wined3d_stream_state *stream;
|
||||
@@ -706,6 +877,8 @@ static void wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const
|
||||
@@ -714,6 +885,8 @@ static void wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const
|
||||
stream->flags = op->flags;
|
||||
|
||||
device_invalidate_state(cs->device, STATE_STREAMSRC);
|
||||
@ -374,7 +374,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_idx, UINT frequency, UINT flags)
|
||||
@@ -721,7 +894,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
@@ -729,7 +902,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -383,7 +383,7 @@ index 0beb6c2..b25aab3 100644
|
||||
{
|
||||
const struct wined3d_cs_set_stream_output *op = data;
|
||||
struct wined3d_stream_output *stream;
|
||||
@@ -736,6 +909,8 @@ static void wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
|
||||
@@ -744,6 +917,8 @@ static void wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
|
||||
InterlockedIncrement(&op->buffer->resource.bind_count);
|
||||
if (prev)
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
@ -392,7 +392,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -752,7 +927,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -760,7 +935,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -401,7 +401,7 @@ index 0beb6c2..b25aab3 100644
|
||||
{
|
||||
const struct wined3d_cs_set_index_buffer *op = data;
|
||||
struct wined3d_buffer *prev;
|
||||
@@ -768,6 +943,8 @@ static void wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *
|
||||
@@ -776,6 +951,8 @@ static void wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_INDEXBUFFER);
|
||||
@ -410,7 +410,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
|
||||
@@ -784,7 +961,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
@@ -792,7 +969,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -419,7 +419,7 @@ index 0beb6c2..b25aab3 100644
|
||||
{
|
||||
const struct wined3d_cs_set_constant_buffer *op = data;
|
||||
struct wined3d_buffer *prev;
|
||||
@@ -798,6 +975,7 @@ static void wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
|
||||
@@ -806,6 +983,7 @@ static void wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_CONSTANT_BUFFER(op->type));
|
||||
@ -427,7 +427,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -814,7 +992,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
@@ -822,7 +1000,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -436,7 +436,7 @@ index 0beb6c2..b25aab3 100644
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info;
|
||||
const struct wined3d_d3d_info *d3d_info = &cs->device->adapter->d3d_info;
|
||||
@@ -891,6 +1069,8 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
@@ -899,6 +1077,8 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
|
||||
if (new_use_color_key)
|
||||
device_invalidate_state(cs->device, STATE_COLOR_KEY);
|
||||
@ -445,7 +445,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined3d_texture *texture)
|
||||
@@ -905,12 +1085,14 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -913,12 +1093,14 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -460,8 +460,26 @@ index 0beb6c2..b25aab3 100644
|
||||
+ return sizeof(*op);
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, unsigned int view_idx,
|
||||
@@ -934,7 +1116,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, unsigned i
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
-static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, const void *data)
|
||||
+static UINT wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_set_unordered_access_view *op = data;
|
||||
struct wined3d_unordered_access_view *prev;
|
||||
@@ -948,6 +1130,8 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con
|
||||
InterlockedDecrement(&prev->resource->bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_UNORDERED_ACCESS_VIEW_BINDING);
|
||||
+
|
||||
+ return sizeof(*op);
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -927,12 +1109,14 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
@@ -964,12 +1148,14 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -477,7 +495,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -949,13 +1133,15 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -986,13 +1172,15 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -494,7 +512,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type type, struct wined3d_shader *shader)
|
||||
@@ -970,12 +1156,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1007,12 +1195,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -510,7 +528,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -990,12 +1178,14 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -1027,12 +1217,14 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -526,7 +544,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value)
|
||||
@@ -1010,12 +1200,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
@@ -1047,12 +1239,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -542,7 +560,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1032,12 +1224,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1069,12 +1263,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -558,7 +576,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1054,13 +1248,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1091,13 +1287,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -575,7 +593,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state,
|
||||
@@ -1076,12 +1272,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -1113,12 +1311,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -591,7 +609,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const struct wined3d_vec4 *plane)
|
||||
@@ -1096,7 +1294,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
@@ -1133,7 +1333,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -600,7 +618,7 @@ index 0beb6c2..b25aab3 100644
|
||||
{
|
||||
const struct wined3d_cs_set_color_key *op = data;
|
||||
struct wined3d_texture *texture = op->texture;
|
||||
@@ -1157,6 +1355,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
|
||||
@@ -1194,6 +1394,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -609,7 +627,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
@@ -1179,12 +1379,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1216,12 +1418,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -625,7 +643,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material)
|
||||
@@ -1198,7 +1400,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
@@ -1235,7 +1439,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -634,7 +652,7 @@ index 0beb6c2..b25aab3 100644
|
||||
{
|
||||
struct wined3d_adapter *adapter = cs->device->adapter;
|
||||
HRESULT hr;
|
||||
@@ -1208,6 +1410,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1245,6 +1449,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
if (FAILED(hr = state_init(&cs->state, &adapter->gl_info, &adapter->d3d_info,
|
||||
WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT)))
|
||||
ERR("Failed to initialize CS state, hr %#x.\n", hr);
|
||||
@ -643,7 +661,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1220,11 +1424,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1257,11 +1463,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -658,7 +676,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void *object), void *object)
|
||||
@@ -1239,12 +1445,14 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
|
||||
@@ -1276,12 +1484,14 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -674,7 +692,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags)
|
||||
@@ -1259,13 +1467,15 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
@@ -1296,13 +1506,15 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -691,7 +709,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
|
||||
@@ -1281,13 +1491,15 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
@@ -1318,13 +1530,15 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -708,7 +726,7 @@ index 0beb6c2..b25aab3 100644
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
|
||||
@@ -1303,8 +1515,9 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
@@ -1340,8 +1554,9 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -719,7 +737,7 @@ index 0beb6c2..b25aab3 100644
|
||||
/* WINED3D_CS_OP_PRESENT */ wined3d_cs_exec_present,
|
||||
/* WINED3D_CS_OP_CLEAR */ wined3d_cs_exec_clear,
|
||||
/* WINED3D_CS_OP_DRAW */ wined3d_cs_exec_draw,
|
||||
@@ -1368,6 +1581,58 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
@@ -1406,6 +1621,58 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
wined3d_cs_st_submit,
|
||||
};
|
||||
|
||||
@ -778,7 +796,7 @@ index 0beb6c2..b25aab3 100644
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
@@ -1394,12 +1659,60 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1432,12 +1699,60 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -867,10 +885,10 @@ index 1dd6a8b..f573dcb 100644
|
||||
|
||||
if (appkey) RegCloseKey( appkey );
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index eca8601..481f384 100644
|
||||
index 751b66f..5cbb7b5 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -310,6 +310,7 @@ struct wined3d_settings
|
||||
@@ -307,6 +307,7 @@ struct wined3d_settings
|
||||
unsigned int max_sm_ps;
|
||||
unsigned int max_sm_cs;
|
||||
BOOL no_3d;
|
||||
@ -878,7 +896,7 @@ index eca8601..481f384 100644
|
||||
};
|
||||
|
||||
extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN;
|
||||
@@ -3033,6 +3034,18 @@ HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl
|
||||
@@ -3126,6 +3127,18 @@ HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl
|
||||
const struct wined3d_d3d_info *d3d_info, DWORD flags) DECLSPEC_HIDDEN;
|
||||
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
|
||||
@ -897,7 +915,7 @@ index eca8601..481f384 100644
|
||||
struct wined3d_cs_ops
|
||||
{
|
||||
void *(*require_space)(struct wined3d_cs *cs, size_t size);
|
||||
@@ -3044,9 +3057,14 @@ struct wined3d_cs
|
||||
@@ -3137,9 +3150,14 @@ struct wined3d_cs
|
||||
const struct wined3d_cs_ops *ops;
|
||||
struct wined3d_device *device;
|
||||
struct wined3d_state state;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 9ddf0916b91ba7b9cc77b79ac3b4030d5b6c9dee Mon Sep 17 00:00:00 2001
|
||||
From ba98f5859e765933043d191026c88840864f40b7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
|
||||
Date: Sun, 3 Apr 2016 19:34:19 +0100
|
||||
Subject: wined3d: send texture maps through the command stream
|
||||
@ -11,10 +11,10 @@ Slow version only. Good enough to dodge some Nvidia bugs in the ddraw tests.
|
||||
3 files changed, 168 insertions(+), 85 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index f6b6b49..6dd95af 100644
|
||||
index d6a37f9..bf4a07a 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -80,6 +80,8 @@ enum wined3d_cs_op
|
||||
@@ -82,6 +82,8 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_SET_LIGHT_ENABLE,
|
||||
WINED3D_CS_OP_BLT,
|
||||
WINED3D_CS_OP_CLEAR_RTV,
|
||||
@ -23,7 +23,7 @@ index f6b6b49..6dd95af 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -396,6 +398,22 @@ struct wined3d_cs_clear_rtv
|
||||
@@ -411,6 +413,22 @@ struct wined3d_cs_clear_rtv
|
||||
const struct blit_shader *blitter;
|
||||
};
|
||||
|
||||
@ -46,7 +46,7 @@ index f6b6b49..6dd95af 100644
|
||||
/* FIXME: The list synchronization probably isn't particularly fast. */
|
||||
static void wined3d_cs_list_enqueue(struct wined3d_cs_list *list, struct wined3d_cs_block *block)
|
||||
{
|
||||
@@ -2061,6 +2079,59 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
@@ -2134,6 +2152,59 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ index f6b6b49..6dd95af 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
@@ -2107,6 +2178,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2182,6 +2253,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_SET_LIGHT_ENABLE */ wined3d_cs_exec_set_light_enable,
|
||||
/* WINED3D_CS_OP_BLT */ wined3d_cs_exec_blt,
|
||||
/* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
|
||||
@ -116,10 +116,10 @@ index f6b6b49..6dd95af 100644
|
||||
|
||||
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index b1ac7bf..1acf5d5 100644
|
||||
index 4a27e6f..43cb895 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1749,6 +1749,63 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
|
||||
@@ -2127,6 +2127,63 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
|
||||
wined3d_texture_unload_gl_texture(texture);
|
||||
}
|
||||
|
||||
@ -183,7 +183,7 @@ index b1ac7bf..1acf5d5 100644
|
||||
static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags)
|
||||
{
|
||||
@@ -1756,13 +1813,9 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@@ -2134,13 +2191,9 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
struct wined3d_texture_sub_resource *sub_resource;
|
||||
struct wined3d_device *device = resource->device;
|
||||
unsigned int fmt_flags = resource->format_flags;
|
||||
@ -197,7 +197,7 @@ index b1ac7bf..1acf5d5 100644
|
||||
|
||||
TRACE("resource %p, sub_resource_idx %u, map_desc %p, box %s, flags %#x.\n",
|
||||
resource, sub_resource_idx, map_desc, debug_box(box), flags);
|
||||
@@ -1807,53 +1860,9 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@@ -2185,53 +2238,9 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -252,7 +252,7 @@ index b1ac7bf..1acf5d5 100644
|
||||
|
||||
if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH)
|
||||
{
|
||||
@@ -1889,17 +1898,6 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@@ -2267,17 +2276,6 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
}
|
||||
}
|
||||
|
||||
@ -270,7 +270,7 @@ index b1ac7bf..1acf5d5 100644
|
||||
++resource->map_count;
|
||||
++sub_resource->map_count;
|
||||
|
||||
@@ -1909,14 +1907,38 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@@ -2287,14 +2285,38 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@ -313,7 +313,7 @@ index b1ac7bf..1acf5d5 100644
|
||||
|
||||
TRACE("resource %p, sub_resource_idx %u.\n", resource, sub_resource_idx);
|
||||
|
||||
@@ -1932,27 +1954,7 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
|
||||
@@ -2310,27 +2332,7 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso
|
||||
return WINEDDERR_NOTLOCKED;
|
||||
}
|
||||
|
||||
@ -343,10 +343,10 @@ index b1ac7bf..1acf5d5 100644
|
||||
--sub_resource->map_count;
|
||||
if (!--resource->map_count && texture->update_map_binding)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 4862f79..d9c33c6 100644
|
||||
index 4415c46..36a85bd 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2787,6 +2787,8 @@ void *wined3d_texture_map_bo_address(const struct wined3d_bo_address *data, size
|
||||
@@ -2884,6 +2884,8 @@ void *wined3d_texture_map_bo_address(const struct wined3d_bo_address *data, size
|
||||
const struct wined3d_gl_info *gl_info, GLenum binding, DWORD flags) DECLSPEC_HIDDEN;
|
||||
BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
|
||||
@ -355,16 +355,16 @@ index 4862f79..d9c33c6 100644
|
||||
void wined3d_texture_prepare_texture(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_set_map_binding(struct wined3d_texture *texture, DWORD map_binding) DECLSPEC_HIDDEN;
|
||||
@@ -2794,6 +2796,8 @@ void wined3d_texture_set_swapchain(struct wined3d_texture *texture,
|
||||
@@ -2891,6 +2893,8 @@ void wined3d_texture_set_swapchain(struct wined3d_texture *texture,
|
||||
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_unmap_bo_address(const struct wined3d_bo_address *data,
|
||||
const struct wined3d_gl_info *gl_info, GLenum binding) DECLSPEC_HIDDEN;
|
||||
+void wined3d_texture_unmap_internal(struct wined3d_texture *texture,
|
||||
+ unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
const struct wined3d_context *context, const struct wined3d_const_bo_address *data,
|
||||
unsigned int row_pitch, unsigned int slice_pitch) DECLSPEC_HIDDEN;
|
||||
@@ -3146,6 +3150,10 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
const struct wined3d_context *context, const struct wined3d_box *box,
|
||||
const struct wined3d_const_bo_address *data, unsigned int row_pitch, unsigned int slice_pitch) DECLSPEC_HIDDEN;
|
||||
@@ -3246,6 +3250,10 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, unsigned i
|
||||
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
|
||||
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
|
||||
|
@ -1,15 +1,15 @@
|
||||
From a636b8ad1d800fe7f288838c93e09a5c96358e55 Mon Sep 17 00:00:00 2001
|
||||
From e98d093b203282ceebd6fb95a948932c3f1a0948 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 4 Jul 2013 23:33:14 +0200
|
||||
Subject: wined3d: Replace the linked lists with a ringbuffer
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 373 ++++++++++++++++++-----------------------
|
||||
dlls/wined3d/cs.c | 375 ++++++++++++++++++-----------------------
|
||||
dlls/wined3d/wined3d_private.h | 20 +--
|
||||
2 files changed, 166 insertions(+), 227 deletions(-)
|
||||
2 files changed, 167 insertions(+), 228 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 880cecc..d8cc7e0 100644
|
||||
index bf4a07a..2643713 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -22,20 +22,10 @@
|
||||
@ -35,7 +35,7 @@ index 880cecc..d8cc7e0 100644
|
||||
WINED3D_CS_OP_FENCE,
|
||||
WINED3D_CS_OP_PRESENT,
|
||||
WINED3D_CS_OP_CLEAR,
|
||||
@@ -421,99 +411,30 @@ struct wined3d_cs_texture_unmap
|
||||
@@ -429,99 +419,30 @@ struct wined3d_cs_texture_unmap
|
||||
unsigned int sub_resource_idx;
|
||||
};
|
||||
|
||||
@ -149,7 +149,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_fence(struct wined3d_cs *cs, const void *data)
|
||||
@@ -534,14 +455,14 @@ static void wined3d_cs_emit_fence(struct wined3d_cs *cs, BOOL *signalled)
|
||||
@@ -542,14 +463,14 @@ static void wined3d_cs_emit_fence(struct wined3d_cs *cs, BOOL *signalled)
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_FENCE;
|
||||
op->signalled = signalled;
|
||||
@ -166,7 +166,7 @@ index 880cecc..d8cc7e0 100644
|
||||
|
||||
/* A busy wait should be fine, we're not supposed to have to wait very
|
||||
* long. */
|
||||
@@ -594,7 +515,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -602,7 +523,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
|
||||
pending = InterlockedIncrement(&cs->pending_presents);
|
||||
|
||||
@ -175,7 +175,7 @@ index 880cecc..d8cc7e0 100644
|
||||
|
||||
/* D3D10 documentation suggests that Windows allows the game to run
|
||||
* 3 frames ahead of the GPU. Increasing this above 1 causes uneven
|
||||
@@ -644,8 +565,8 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -652,8 +573,8 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
const struct wined3d_state *state = &cs->device->state;
|
||||
struct wined3d_cs_clear *op;
|
||||
unsigned int i;
|
||||
@ -186,7 +186,7 @@ index 880cecc..d8cc7e0 100644
|
||||
op->opcode = WINED3D_CS_OP_CLEAR;
|
||||
op->flags = flags;
|
||||
op->color = *color;
|
||||
@@ -665,7 +586,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -673,7 +594,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
|
||||
wined3d_resource_acquire(state->fb.depth_stencil->resource);
|
||||
|
||||
@ -195,7 +195,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@@ -806,7 +727,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
@@ -814,7 +735,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
}
|
||||
}
|
||||
|
||||
@ -204,7 +204,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_predication(struct wined3d_cs *cs, const void *data)
|
||||
@@ -828,7 +749,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
@@ -836,7 +757,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
op->predicate = predicate;
|
||||
op->value = value;
|
||||
|
||||
@ -213,7 +213,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_viewport(struct wined3d_cs *cs, const void *data)
|
||||
@@ -849,7 +770,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
@@ -857,7 +778,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
op->opcode = WINED3D_CS_OP_SET_VIEWPORT;
|
||||
op->viewport = *viewport;
|
||||
|
||||
@ -222,7 +222,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_scissor_rect(struct wined3d_cs *cs, const void *data)
|
||||
@@ -870,7 +791,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -878,7 +799,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
op->opcode = WINED3D_CS_OP_SET_SCISSOR_RECT;
|
||||
op->rect = *rect;
|
||||
|
||||
@ -231,7 +231,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const void *data)
|
||||
@@ -893,7 +814,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
@@ -901,7 +822,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
op->view_idx = view_idx;
|
||||
op->view = view;
|
||||
|
||||
@ -240,7 +240,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const void *data)
|
||||
@@ -947,7 +868,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
@@ -955,7 +876,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
op->opcode = WINED3D_CS_OP_SET_DEPTH_STENCIL_VIEW;
|
||||
op->view = view;
|
||||
|
||||
@ -249,7 +249,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_vertex_declaration(struct wined3d_cs *cs, const void *data)
|
||||
@@ -968,7 +889,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
@@ -976,7 +897,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
op->opcode = WINED3D_CS_OP_SET_VERTEX_DECLARATION;
|
||||
op->declaration = declaration;
|
||||
|
||||
@ -258,7 +258,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1005,7 +926,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -1013,7 +934,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
op->offset = offset;
|
||||
op->stride = stride;
|
||||
|
||||
@ -267,7 +267,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1032,7 +953,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
@@ -1040,7 +961,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
op->frequency = frequency;
|
||||
op->flags = flags;
|
||||
|
||||
@ -276,7 +276,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1065,7 +986,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -1073,7 +994,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
op->buffer = buffer;
|
||||
op->offset = offset;
|
||||
|
||||
@ -285,7 +285,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1099,7 +1020,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
@@ -1107,7 +1028,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
op->format_id = format_id;
|
||||
op->offset = offset;
|
||||
|
||||
@ -294,7 +294,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1130,7 +1051,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
@@ -1138,7 +1059,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
op->cb_idx = cb_idx;
|
||||
op->buffer = buffer;
|
||||
|
||||
@ -303,7 +303,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1222,7 +1143,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -1230,7 +1151,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
op->opcode = WINED3D_CS_OP_SET_TEXTURE;
|
||||
op->stage = stage;
|
||||
op->texture = texture;
|
||||
@ -312,7 +312,16 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1246,7 +1167,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
@@ -1253,7 +1174,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, unsigned i
|
||||
op->view_idx = view_idx;
|
||||
op->view = view;
|
||||
|
||||
- cs->ops->submit(cs);
|
||||
+ cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1285,7 +1206,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
op->view_idx = view_idx;
|
||||
op->view = view;
|
||||
|
||||
@ -321,7 +330,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1270,7 +1191,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1309,7 +1230,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
op->sampler_idx = sampler_idx;
|
||||
op->sampler = sampler;
|
||||
|
||||
@ -330,7 +339,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1293,7 +1214,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1332,7 +1253,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
op->type = type;
|
||||
op->shader = shader;
|
||||
|
||||
@ -339,7 +348,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_rasterizer_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1315,7 +1236,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -1354,7 +1275,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
op->opcode = WINED3D_CS_OP_SET_RASTERIZER_STATE;
|
||||
op->state = rasterizer_state;
|
||||
|
||||
@ -348,7 +357,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_vs_consts_f(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1348,8 +1269,9 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1387,8 +1308,9 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
const struct wined3d_vec4 *constants, enum wined3d_shader_type type)
|
||||
{
|
||||
struct wined3d_cs_set_consts_f *op;
|
||||
@ -359,7 +368,7 @@ index 880cecc..d8cc7e0 100644
|
||||
switch (type)
|
||||
{
|
||||
case WINED3D_SHADER_TYPE_PIXEL:
|
||||
@@ -1374,7 +1296,7 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1413,7 +1335,7 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
op->count = count;
|
||||
memcpy(op->constants, constants, sizeof(op->constants[0]) * count);
|
||||
|
||||
@ -368,7 +377,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_render_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1396,8 +1318,8 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
@@ -1435,8 +1357,8 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@ -379,7 +388,7 @@ index 880cecc..d8cc7e0 100644
|
||||
|
||||
static UINT wined3d_cs_exec_set_vs_consts_b(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
@@ -1427,8 +1349,9 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1466,8 +1388,9 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
unsigned int count, const BOOL *constants, enum wined3d_shader_type type)
|
||||
{
|
||||
struct wined3d_cs_set_consts_b *op;
|
||||
@ -390,7 +399,7 @@ index 880cecc..d8cc7e0 100644
|
||||
switch (type)
|
||||
{
|
||||
case WINED3D_SHADER_TYPE_PIXEL:
|
||||
@@ -1453,7 +1376,7 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1492,7 +1415,7 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
op->count = count;
|
||||
memcpy(op->constants, constants, sizeof(op->constants[0]) * count);
|
||||
|
||||
@ -399,7 +408,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_vs_consts_i(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1484,8 +1407,9 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1523,8 +1446,9 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
const struct wined3d_ivec4 *constants, enum wined3d_shader_type type)
|
||||
{
|
||||
struct wined3d_cs_set_consts_i *op;
|
||||
@ -410,7 +419,7 @@ index 880cecc..d8cc7e0 100644
|
||||
switch (type)
|
||||
{
|
||||
case WINED3D_SHADER_TYPE_PIXEL:
|
||||
@@ -1510,7 +1434,7 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
@@ -1549,7 +1473,7 @@ void wined3d_cs_emit_set_consts_i(struct wined3d_cs *cs, unsigned int start_idx,
|
||||
op->count = count;
|
||||
memcpy(op->constants, constants, sizeof(op->constants[0]) * count);
|
||||
|
||||
@ -419,7 +428,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1534,7 +1458,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1573,7 +1497,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@ -428,7 +437,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_sampler_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1558,7 +1482,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1597,7 +1521,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
|
||||
@ -437,7 +446,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_transform(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1582,7 +1506,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -1621,7 +1545,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
op->state = state;
|
||||
op->matrix = *matrix;
|
||||
|
||||
@ -446,7 +455,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_clip_plane(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1604,7 +1528,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
@@ -1643,7 +1567,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
op->plane_idx = plane_idx;
|
||||
op->plane = *plane;
|
||||
|
||||
@ -455,7 +464,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1689,7 +1613,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1728,7 +1652,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
else
|
||||
op->set = 0;
|
||||
|
||||
@ -464,7 +473,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_material(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1710,7 +1634,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
@@ -1749,7 +1673,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
op->opcode = WINED3D_CS_OP_SET_MATERIAL;
|
||||
op->material = *material;
|
||||
|
||||
@ -473,7 +482,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1734,7 +1658,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1773,7 +1697,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_RESET_STATE;
|
||||
|
||||
@ -482,7 +491,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_destroy_object(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1755,7 +1679,7 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
|
||||
@@ -1794,7 +1718,7 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
|
||||
op->callback = callback;
|
||||
op->object = object;
|
||||
|
||||
@ -491,7 +500,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1777,7 +1701,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
@@ -1816,7 +1740,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
op->query = query;
|
||||
op->flags = flags;
|
||||
|
||||
@ -500,7 +509,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_preload_resource(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1801,7 +1725,7 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
@@ -1840,7 +1764,7 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
|
||||
wined3d_resource_acquire(resource);
|
||||
|
||||
@ -509,7 +518,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_unload_resource(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1825,7 +1749,7 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
@@ -1864,7 +1788,7 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
|
||||
wined3d_resource_acquire(resource);
|
||||
|
||||
@ -518,7 +527,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_glfinish(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1851,7 +1775,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
@@ -1890,7 +1814,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_GLFINISH;
|
||||
|
||||
@ -527,7 +536,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_base_vertex_index(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1873,7 +1797,7 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
|
||||
@@ -1912,7 +1836,7 @@ void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
|
||||
op->opcode = WINED3D_CS_OP_SET_BASE_VERTEX_INDEX;
|
||||
op->base_vertex_index = base_vertex_index;
|
||||
|
||||
@ -536,7 +545,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_primitive_type(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1899,7 +1823,7 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
|
||||
@@ -1938,7 +1862,7 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
|
||||
op->opcode = WINED3D_CS_OP_SET_PRIMITIVE_TYPE;
|
||||
op->gl_primitive_type = primitive_type;
|
||||
|
||||
@ -545,7 +554,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_light(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1956,7 +1880,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
|
||||
@@ -1995,7 +1919,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
|
||||
op->opcode = WINED3D_CS_OP_SET_LIGHT;
|
||||
op->light = *light;
|
||||
|
||||
@ -554,7 +563,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *data)
|
||||
@@ -2045,7 +1969,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
|
||||
@@ -2084,7 +2008,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
|
||||
op->idx = idx;
|
||||
op->enable = enable;
|
||||
|
||||
@ -563,7 +572,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_blt(struct wined3d_cs *cs, const void *data)
|
||||
@@ -2077,7 +2001,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
@@ -2116,7 +2040,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
if (fx)
|
||||
op->fx = *fx;
|
||||
|
||||
@ -572,7 +581,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
|
||||
@@ -2110,7 +2034,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
@@ -2149,7 +2073,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
op->stencil = stencil;
|
||||
op->blitter = blitter;
|
||||
|
||||
@ -581,7 +590,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
static UINT wined3d_cs_exec_texture_map(struct wined3d_cs *cs, const void *data)
|
||||
@@ -2135,12 +2059,14 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -2174,12 +2098,14 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
|
||||
op->flags = flags;
|
||||
op->mem = &ret;
|
||||
|
||||
@ -597,7 +606,7 @@ index 880cecc..d8cc7e0 100644
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -2163,11 +2089,13 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -2202,11 +2128,13 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
op->texture = texture;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
|
||||
@ -612,7 +621,7 @@ index 880cecc..d8cc7e0 100644
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
/* WINED3D_CS_OP_PRESENT */ wined3d_cs_exec_present,
|
||||
/* WINED3D_CS_OP_CLEAR */ wined3d_cs_exec_clear,
|
||||
@@ -2217,42 +2145,59 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2257,42 +2185,59 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
|
||||
};
|
||||
|
||||
@ -695,7 +704,7 @@ index 880cecc..d8cc7e0 100644
|
||||
};
|
||||
|
||||
/* FIXME: wined3d_device_uninit_3d() should either flush and wait, or be an
|
||||
@@ -2264,9 +2209,38 @@ static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
|
||||
@@ -2304,9 +2249,38 @@ static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
|
||||
op = wined3d_cs_mt_require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_STOP;
|
||||
|
||||
@ -735,7 +744,7 @@ index 880cecc..d8cc7e0 100644
|
||||
void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
|
||||
struct wined3d_context *context, struct wined3d_surface *depth_stencil)
|
||||
{
|
||||
@@ -2290,31 +2264,32 @@ void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
|
||||
@@ -2330,31 +2304,32 @@ void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
|
||||
static DWORD WINAPI wined3d_cs_run(void *thread_param)
|
||||
{
|
||||
struct wined3d_cs *cs = thread_param;
|
||||
@ -782,7 +791,7 @@ index 880cecc..d8cc7e0 100644
|
||||
}
|
||||
|
||||
done:
|
||||
@@ -2339,25 +2314,10 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2379,25 +2354,10 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
cs->ops = &wined3d_cs_st_ops;
|
||||
cs->device = device;
|
||||
|
||||
@ -808,7 +817,7 @@ index 880cecc..d8cc7e0 100644
|
||||
if (!(cs->thread = CreateThread(NULL, 0, wined3d_cs_run, cs, 0, NULL)))
|
||||
{
|
||||
ERR("Failed to create wined3d command stream thread.\n");
|
||||
@@ -2369,12 +2329,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2409,12 +2369,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
|
||||
err:
|
||||
if (cs)
|
||||
@ -821,7 +830,7 @@ index 880cecc..d8cc7e0 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
return NULL;
|
||||
}
|
||||
@@ -2393,17 +2348,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
@@ -2433,17 +2388,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
CloseHandle(cs->thread);
|
||||
if (ret != WAIT_OBJECT_0)
|
||||
ERR("Wait failed (%#x).\n", ret);
|
||||
@ -840,7 +849,7 @@ index 880cecc..d8cc7e0 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index f3912a1..24c54b2 100644
|
||||
index 36a85bd..12835d0 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -31,6 +31,7 @@
|
||||
@ -851,7 +860,7 @@ index f3912a1..24c54b2 100644
|
||||
#include <stdarg.h>
|
||||
#include <math.h>
|
||||
#include <limits.h>
|
||||
@@ -3042,19 +3043,17 @@ struct wined3d_cs_list
|
||||
@@ -3135,19 +3136,17 @@ struct wined3d_cs_list
|
||||
struct list blocks;
|
||||
};
|
||||
|
||||
@ -876,7 +885,7 @@ index f3912a1..24c54b2 100644
|
||||
void (*finish)(struct wined3d_cs *cs);
|
||||
};
|
||||
|
||||
@@ -3065,14 +3064,9 @@ struct wined3d_cs
|
||||
@@ -3158,14 +3157,9 @@ struct wined3d_cs
|
||||
struct wined3d_state state;
|
||||
HANDLE thread;
|
||||
DWORD thread_id;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 2fb1651ce03c957a505acbbf282c04c59e47265b Mon Sep 17 00:00:00 2001
|
||||
From b5aa14996c4b4968eb011080fc0f9b6211c486aa Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sat, 6 Jul 2013 18:26:11 +0200
|
||||
Subject: wined3d: Add query support to the command stream
|
||||
@ -10,10 +10,10 @@ Subject: wined3d: Add query support to the command stream
|
||||
3 files changed, 49 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index c04f293..20be430 100644
|
||||
index 2643713..ee57a56 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -72,6 +72,7 @@ enum wined3d_cs_op
|
||||
@@ -74,6 +74,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_CLEAR_RTV,
|
||||
WINED3D_CS_OP_TEXTURE_MAP,
|
||||
WINED3D_CS_OP_TEXTURE_UNMAP,
|
||||
@ -21,7 +21,7 @@ index c04f293..20be430 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -410,6 +411,13 @@ struct wined3d_cs_skip
|
||||
@@ -425,6 +426,13 @@ struct wined3d_cs_skip
|
||||
DWORD size;
|
||||
};
|
||||
|
||||
@ -35,7 +35,7 @@ index c04f293..20be430 100644
|
||||
static void wined3d_cs_submit(struct wined3d_cs *cs, size_t size)
|
||||
{
|
||||
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
|
||||
@@ -2050,6 +2058,33 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -2131,6 +2139,33 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ index c04f293..20be430 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2100,6 +2135,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2183,6 +2218,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
|
||||
/* WINED3D_CS_OP_TEXTURE_MAP */ wined3d_cs_exec_texture_map,
|
||||
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
|
||||
@ -78,7 +78,7 @@ index c04f293..20be430 100644
|
||||
|
||||
static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
|
||||
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
index 8b15765..c64e5fb 100644
|
||||
index 902e01a..d8cfb64 100644
|
||||
--- a/dlls/wined3d/query.c
|
||||
+++ b/dlls/wined3d/query.c
|
||||
@@ -338,8 +338,13 @@ HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query,
|
||||
@ -97,7 +97,7 @@ index 8b15765..c64e5fb 100644
|
||||
|
||||
if (data)
|
||||
memcpy(data, query->data, min(data_size, query->data_size));
|
||||
@@ -479,7 +484,7 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
@@ -491,7 +496,7 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
* restart. */
|
||||
if (flags & WINED3DISSUE_BEGIN)
|
||||
{
|
||||
@ -106,7 +106,7 @@ index 8b15765..c64e5fb 100644
|
||||
{
|
||||
if (oq->context->tid != GetCurrentThreadId())
|
||||
{
|
||||
@@ -509,13 +514,14 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
@@ -521,13 +526,14 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
checkGLcall("glBeginQuery()");
|
||||
|
||||
context_release(context);
|
||||
@ -122,7 +122,7 @@ index 8b15765..c64e5fb 100644
|
||||
{
|
||||
if (oq->context->tid != GetCurrentThreadId())
|
||||
{
|
||||
@@ -531,6 +537,7 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
@@ -543,6 +549,7 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
|
||||
context_release(context);
|
||||
}
|
||||
}
|
||||
@ -131,18 +131,18 @@ index 8b15765..c64e5fb 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index d894b3b..8b0f2a6 100644
|
||||
index 12835d0..2f6a586 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1437,6 +1437,7 @@ struct wined3d_occlusion_query
|
||||
@@ -1491,6 +1491,7 @@ struct wined3d_occlusion_query
|
||||
GLuint id;
|
||||
struct wined3d_context *context;
|
||||
DWORD samples;
|
||||
UINT64 samples;
|
||||
+ BOOL started;
|
||||
};
|
||||
|
||||
struct wined3d_timestamp_query
|
||||
@@ -3089,6 +3090,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
@@ -3187,6 +3188,7 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
|
||||
const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD flags) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) DECLSPEC_HIDDEN;
|
||||
|
@ -1,32 +1,34 @@
|
||||
From 02a0a49d5329dd8c17b22e3014d28d37e4231e88 Mon Sep 17 00:00:00 2001
|
||||
From d02f39e6b45855a3f1ea963961f767330f4b0e61 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
|
||||
Date: Thu, 7 Apr 2016 20:04:17 +0100
|
||||
Subject: wined3d: Avoid destroying views in color and depth fills.
|
||||
|
||||
---
|
||||
dlls/wined3d/surface.c | 50 ++++++++++++++++++++++----------------------------
|
||||
1 file changed, 22 insertions(+), 28 deletions(-)
|
||||
dlls/wined3d/surface.c | 54 ++++++++++++++++++++------------------------------
|
||||
1 file changed, 22 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 978c826..7e060ae 100644
|
||||
index c5e14d6..6c47743 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -717,8 +717,7 @@ static HRESULT wined3d_surface_depth_fill(struct wined3d_surface *surface, const
|
||||
@@ -713,8 +713,7 @@ static HRESULT wined3d_surface_depth_fill(struct wined3d_surface *surface, const
|
||||
{
|
||||
struct wined3d_resource *resource = &surface->container->resource;
|
||||
struct wined3d_device *device = resource->device;
|
||||
- struct wined3d_rendertarget_view_desc view_desc;
|
||||
- struct wined3d_rendertarget_view *view;
|
||||
- struct wined3d_view_desc view_desc;
|
||||
+ struct wined3d_rendertarget_view view;
|
||||
const struct blit_shader *blitter;
|
||||
HRESULT hr;
|
||||
|
||||
@@ -729,19 +728,17 @@ static HRESULT wined3d_surface_depth_fill(struct wined3d_surface *surface, const
|
||||
@@ -725,21 +724,17 @@ static HRESULT wined3d_surface_depth_fill(struct wined3d_surface *surface, const
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
- view_desc.format_id = resource->format->id;
|
||||
- view_desc.flags = 0;
|
||||
- view_desc.u.texture.level_idx = surface->texture_level;
|
||||
- view_desc.u.texture.level_count = 1;
|
||||
- view_desc.u.texture.layer_idx = surface->texture_layer;
|
||||
- view_desc.u.texture.layer_count = 1;
|
||||
- if (FAILED(hr = wined3d_rendertarget_view_create(&view_desc,
|
||||
@ -51,22 +53,24 @@ index 978c826..7e060ae 100644
|
||||
|
||||
return hr;
|
||||
}
|
||||
@@ -2398,8 +2395,7 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const st
|
||||
@@ -2547,8 +2542,7 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const st
|
||||
{
|
||||
struct wined3d_resource *resource = &s->container->resource;
|
||||
struct wined3d_device *device = resource->device;
|
||||
- struct wined3d_rendertarget_view_desc view_desc;
|
||||
- struct wined3d_rendertarget_view *view;
|
||||
- struct wined3d_view_desc view_desc;
|
||||
+ struct wined3d_rendertarget_view view;
|
||||
const struct blit_shader *blitter;
|
||||
HRESULT hr;
|
||||
|
||||
@@ -2410,19 +2406,17 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const st
|
||||
@@ -2559,21 +2553,17 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const st
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
- view_desc.format_id = resource->format->id;
|
||||
- view_desc.flags = 0;
|
||||
- view_desc.u.texture.level_idx = s->texture_level;
|
||||
- view_desc.u.texture.level_count = 1;
|
||||
- view_desc.u.texture.layer_idx = s->texture_layer;
|
||||
- view_desc.u.texture.layer_count = 1;
|
||||
- if (FAILED(hr = wined3d_rendertarget_view_create(&view_desc,
|
||||
@ -92,5 +96,5 @@ index 978c826..7e060ae 100644
|
||||
return hr;
|
||||
}
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a7ae79e550f236f00a348b8cfdad719f69a0323c Mon Sep 17 00:00:00 2001
|
||||
From 4e4f075820bce1fb670507e957fe61ea1e0889dc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 1 Aug 2013 00:33:48 +0200
|
||||
Subject: wined3d: Send update_texture calls through the CS
|
||||
@ -11,10 +11,10 @@ FIXME: This logic duplication is ugly.
|
||||
3 files changed, 137 insertions(+), 82 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 87763b5..40d7c91 100644
|
||||
index d5c8295..ef02d3e 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -73,6 +73,7 @@ enum wined3d_cs_op
|
||||
@@ -74,6 +74,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_CLEAR_RTV,
|
||||
WINED3D_CS_OP_TEXTURE_MAP,
|
||||
WINED3D_CS_OP_TEXTURE_UNMAP,
|
||||
@ -22,7 +22,7 @@ index 87763b5..40d7c91 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -417,6 +418,12 @@ struct wined3d_cs_skip
|
||||
@@ -425,6 +426,12 @@ struct wined3d_cs_skip
|
||||
DWORD size;
|
||||
};
|
||||
|
||||
@ -35,7 +35,7 @@ index 87763b5..40d7c91 100644
|
||||
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
|
||||
{
|
||||
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
|
||||
@@ -2129,6 +2136,31 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -2168,6 +2175,31 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ index 87763b5..40d7c91 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2180,6 +2212,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2220,6 +2252,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
|
||||
/* WINED3D_CS_OP_TEXTURE_MAP */ wined3d_cs_exec_texture_map,
|
||||
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
|
||||
@ -76,10 +76,10 @@ index 87763b5..40d7c91 100644
|
||||
|
||||
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index ad2da77..aa6d796 100644
|
||||
index 99bb0c2..6a0b9cd2 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3567,34 +3567,17 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
@@ -3604,34 +3604,17 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
start_idx, index_count, start_instance, instance_count, TRUE);
|
||||
}
|
||||
|
||||
@ -118,7 +118,7 @@ index ad2da77..aa6d796 100644
|
||||
|
||||
/* Only a prepare, since we're uploading entire volumes. */
|
||||
wined3d_texture_prepare_texture(dst_texture, context, FALSE);
|
||||
@@ -3602,32 +3585,89 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
@@ -3639,32 +3622,89 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
|
||||
for (i = 0; i < level_count; ++i)
|
||||
{
|
||||
@ -130,7 +130,7 @@ index ad2da77..aa6d796 100644
|
||||
|
||||
data.buffer_object = 0;
|
||||
data.addr = src.data;
|
||||
wined3d_texture_upload_data(dst_texture, i, context, &data, src.row_pitch, src.slice_pitch);
|
||||
wined3d_texture_upload_data(dst_texture, i, context, NULL, &data, src.row_pitch, src.slice_pitch);
|
||||
wined3d_texture_invalidate_location(dst_texture, i, ~WINED3D_LOCATION_TEXTURE_RGB);
|
||||
|
||||
- if (FAILED(hr = wined3d_resource_unmap(&src_texture->resource, src_level + i)))
|
||||
@ -218,7 +218,7 @@ index ad2da77..aa6d796 100644
|
||||
|
||||
TRACE("device %p, src_texture %p, dst_texture %p.\n", device, src_texture, dst_texture);
|
||||
|
||||
@@ -3664,70 +3704,48 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
@@ -3701,70 +3741,48 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -319,10 +319,10 @@ index ad2da77..aa6d796 100644
|
||||
|
||||
HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index bd3bebf..7ba4fd3 100644
|
||||
index a90cd93..6733d91 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2539,6 +2539,8 @@ void device_resource_add(struct wined3d_device *device, struct wined3d_resource
|
||||
@@ -2631,6 +2631,8 @@ void device_resource_add(struct wined3d_device *device, struct wined3d_resource
|
||||
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
|
||||
void device_invalidate_shader_constants(const struct wined3d_device *device, DWORD mask) DECLSPEC_HIDDEN;
|
||||
@ -331,7 +331,7 @@ index bd3bebf..7ba4fd3 100644
|
||||
|
||||
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
|
||||
{
|
||||
@@ -3161,6 +3163,8 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -3256,6 +3258,8 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
|
||||
void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 1feae0a25e88a0f7f7c51f1cd2f9484e0927f558 Mon Sep 17 00:00:00 2001
|
||||
From a7fc603682b132869b5775fc6892899a455dc2d6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 29 Aug 2013 22:25:14 +0200
|
||||
Subject: wined3d: Don't lock the src volume in device_update_volume
|
||||
@ -17,10 +17,10 @@ since its a sysmem texture.
|
||||
1 file changed, 7 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index de927cc..896e7a1 100644
|
||||
index 6a0b9cd2..480da33 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3563,8 +3563,8 @@ static void wined3d_device_update_texture_3d(struct wined3d_context *context,
|
||||
@@ -3609,8 +3609,8 @@ static void wined3d_device_update_texture_3d(struct wined3d_context *context,
|
||||
struct wined3d_texture *src_texture, unsigned int src_level,
|
||||
struct wined3d_texture *dst_texture, unsigned int level_count)
|
||||
{
|
||||
@ -31,7 +31,7 @@ index de927cc..896e7a1 100644
|
||||
unsigned int i;
|
||||
|
||||
TRACE("context %p, src_texture %p, src_level %u, dst_texture %p, level_count %u.\n",
|
||||
@@ -3576,17 +3576,13 @@ static void wined3d_device_update_texture_3d(struct wined3d_context *context,
|
||||
@@ -3622,17 +3622,13 @@ static void wined3d_device_update_texture_3d(struct wined3d_context *context,
|
||||
|
||||
for (i = 0; i < level_count; ++i)
|
||||
{
|
||||
@ -44,8 +44,8 @@ index de927cc..896e7a1 100644
|
||||
|
||||
- data.buffer_object = 0;
|
||||
- data.addr = src.data;
|
||||
- wined3d_texture_upload_data(dst_texture, i, context, &data, src.row_pitch, src.slice_pitch);
|
||||
+ wined3d_texture_upload_data(dst_texture, i, context, wined3d_const_bo_address(&data),
|
||||
- wined3d_texture_upload_data(dst_texture, i, context, NULL, &data, src.row_pitch, src.slice_pitch);
|
||||
+ wined3d_texture_upload_data(dst_texture, i, context, NULL, wined3d_const_bo_address(&data),
|
||||
+ row_pitch, slice_pitch);
|
||||
wined3d_texture_invalidate_location(dst_texture, i, ~WINED3D_LOCATION_TEXTURE_RGB);
|
||||
-
|
||||
|
@ -1,19 +1,19 @@
|
||||
From 3831f30d2549855400978627d4912ea6b28e4333 Mon Sep 17 00:00:00 2001
|
||||
From 52b35f31cc613857f6131ea7662150ebba7f3a75 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Fri, 4 Sep 2015 15:22:49 +0200
|
||||
Subject: wined3d: Send update_sub_resource calls through the command stream.
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 95 ++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/wined3d/device.c | 53 ++++-------------------
|
||||
dlls/wined3d/device.c | 22 +---------
|
||||
dlls/wined3d/wined3d_private.h | 3 ++
|
||||
3 files changed, 105 insertions(+), 46 deletions(-)
|
||||
3 files changed, 99 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 5375f04..6857e8c 100644
|
||||
index 9a1c076..011020f 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -74,6 +74,7 @@ enum wined3d_cs_op
|
||||
@@ -75,6 +75,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_TEXTURE_MAP,
|
||||
WINED3D_CS_OP_TEXTURE_UNMAP,
|
||||
WINED3D_CS_OP_UPDATE_TEXTURE,
|
||||
@ -21,7 +21,7 @@ index 5375f04..6857e8c 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -424,6 +425,15 @@ struct wined3d_cs_update_texture
|
||||
@@ -432,6 +433,15 @@ struct wined3d_cs_update_texture
|
||||
struct wined3d_texture *src, *dst;
|
||||
};
|
||||
|
||||
@ -37,7 +37,7 @@ index 5375f04..6857e8c 100644
|
||||
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
|
||||
{
|
||||
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
|
||||
@@ -2199,6 +2209,90 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
@@ -2238,6 +2248,90 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@ -128,7 +128,7 @@ index 5375f04..6857e8c 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2251,6 +2345,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2291,6 +2385,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_TEXTURE_MAP */ wined3d_cs_exec_texture_map,
|
||||
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
|
||||
/* WINED3D_CS_OP_UPDATE_TEXTURE */ wined3d_cs_exec_update_texture,
|
||||
@ -137,80 +137,36 @@ index 5375f04..6857e8c 100644
|
||||
|
||||
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 2597aa2..a8403b6 100644
|
||||
index 480da33..172b7ee 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -4117,14 +4117,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4154,8 +4154,6 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
unsigned int depth_pitch)
|
||||
{
|
||||
struct wined3d_texture_sub_resource *sub_resource;
|
||||
- const struct wined3d_gl_info *gl_info;
|
||||
unsigned int width, height, depth, level;
|
||||
- struct wined3d_const_bo_address addr;
|
||||
- unsigned int width, height, level;
|
||||
- struct wined3d_context *context;
|
||||
struct wined3d_texture *texture;
|
||||
- struct wined3d_surface *surface;
|
||||
- POINT dst_point;
|
||||
- RECT src_rect;
|
||||
|
||||
TRACE("device %p, resource %p, sub_resource_idx %u, box %s, data %p, row_pitch %u, depth_pitch %u.\n",
|
||||
device, resource, sub_resource_idx, debug_box(box), data, row_pitch, depth_pitch);
|
||||
@@ -4158,16 +4151,15 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
WARN("Invalid sub_resource_idx %u.\n", sub_resource_idx);
|
||||
@@ -4205,25 +4203,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
return;
|
||||
}
|
||||
- surface = sub_resource->u.surface;
|
||||
|
||||
- level = sub_resource_idx % texture->level_count;
|
||||
- width = wined3d_texture_get_level_width(texture, level);
|
||||
- height = wined3d_texture_get_level_height(texture, level);
|
||||
-
|
||||
- src_rect.left = 0;
|
||||
- src_rect.top = 0;
|
||||
if (box)
|
||||
{
|
||||
+ unsigned int width, height, level;
|
||||
+
|
||||
+ level = sub_resource_idx % texture->level_count;
|
||||
+ width = wined3d_texture_get_level_width(texture, level);
|
||||
+ height = wined3d_texture_get_level_height(texture, level);
|
||||
+
|
||||
if (box->left >= box->right || box->right > width
|
||||
|| box->top >= box->bottom || box->bottom > height
|
||||
|| box->front >= box->back)
|
||||
@@ -4175,40 +4167,9 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
WARN("Invalid box %s specified.\n", debug_box(box));
|
||||
return;
|
||||
}
|
||||
-
|
||||
- src_rect.right = box->right - box->left;
|
||||
- src_rect.bottom = box->bottom - box->top;
|
||||
- dst_point.x = box->left;
|
||||
- dst_point.y = box->top;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- src_rect.right = width;
|
||||
- src_rect.bottom = height;
|
||||
- dst_point.x = 0;
|
||||
- dst_point.y = 0;
|
||||
}
|
||||
|
||||
- addr.buffer_object = 0;
|
||||
- addr.addr = data;
|
||||
-
|
||||
- context = context_acquire(resource->device, NULL);
|
||||
- gl_info = context->gl_info;
|
||||
-
|
||||
- /* Only load the surface for partial updates. */
|
||||
- if (!dst_point.x && !dst_point.y && src_rect.right == width && src_rect.bottom == height)
|
||||
- /* Only load the sub-resource for partial updates. */
|
||||
- if (!box || (!box->left && !box->top && !box->front
|
||||
- && box->right == width && box->bottom == height && box->back == depth))
|
||||
- wined3d_texture_prepare_texture(texture, context, FALSE);
|
||||
- else
|
||||
- wined3d_texture_load_location(texture, sub_resource_idx, context, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
- wined3d_texture_bind_and_dirtify(texture, context, FALSE);
|
||||
-
|
||||
- wined3d_surface_upload_data(surface, gl_info, resource->format,
|
||||
- &src_rect, row_pitch, &dst_point, FALSE, &addr);
|
||||
- wined3d_texture_upload_data(texture, sub_resource_idx, context, box, &addr, row_pitch, depth_pitch);
|
||||
-
|
||||
- context_release(context);
|
||||
-
|
||||
@ -221,10 +177,10 @@ index 2597aa2..a8403b6 100644
|
||||
|
||||
HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device,
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index c3f104e..9db3cf1 100644
|
||||
index 643f366..e832af2 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3164,6 +3164,9 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -3259,6 +3259,9 @@ void *wined3d_cs_emit_texture_map(struct wined3d_cs *cs, struct wined3d_texture
|
||||
void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 67f6c320ba0d32d73a7cde737a1ecea30f627cca Mon Sep 17 00:00:00 2001
|
||||
From 420f9451c9d2267ad8133abdf9821e185a0b6515 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Fri, 30 Aug 2013 17:00:35 +0200
|
||||
Subject: wined3d: Wrap GL BOs in a structure
|
||||
@ -13,10 +13,10 @@ them for DISCARD maps.
|
||||
4 files changed, 93 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 56d45e5..824fa89 100644
|
||||
index 172b7ee..afc94b9 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -5241,3 +5241,56 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
@@ -5242,3 +5242,56 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
else
|
||||
return CallWindowProcA(proc, window, message, wparam, lparam);
|
||||
}
|
||||
@ -74,7 +74,7 @@ index 56d45e5..824fa89 100644
|
||||
+ wined3d_device_destroy_bo(device, context, bo);
|
||||
+}
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index a0b6d62..e187742 100644
|
||||
index 7c37160..344299b 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -3075,7 +3075,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@ -87,7 +87,7 @@ index a0b6d62..e187742 100644
|
||||
TRACE("Removing the pbo attached to surface %p.\n", surface);
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 6ca00ce..06ae160 100644
|
||||
index 4fc6c38..6160b6b 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -342,7 +342,7 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su
|
||||
@ -99,7 +99,7 @@ index 6ca00ce..06ae160 100644
|
||||
return;
|
||||
}
|
||||
if (locations & WINED3D_LOCATION_USER_MEMORY)
|
||||
@@ -439,18 +439,17 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
|
||||
@@ -441,18 +441,17 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
static void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture,
|
||||
@ -124,7 +124,7 @@ index 6ca00ce..06ae160 100644
|
||||
}
|
||||
|
||||
static void wined3d_texture_update_map_binding(struct wined3d_texture *texture)
|
||||
@@ -470,7 +469,7 @@ static void wined3d_texture_update_map_binding(struct wined3d_texture *texture)
|
||||
@@ -472,7 +471,7 @@ static void wined3d_texture_update_map_binding(struct wined3d_texture *texture)
|
||||
&& !wined3d_texture_load_location(texture, i, context, map_binding))
|
||||
ERR("Failed to load location %s.\n", wined3d_debug_location(map_binding));
|
||||
if (texture->resource.map_binding == WINED3D_LOCATION_BUFFER)
|
||||
@ -133,7 +133,7 @@ index 6ca00ce..06ae160 100644
|
||||
}
|
||||
|
||||
if (context)
|
||||
@@ -627,28 +626,25 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
|
||||
@@ -629,28 +628,25 @@ 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;
|
||||
@ -167,7 +167,7 @@ index 6ca00ce..06ae160 100644
|
||||
}
|
||||
if (context)
|
||||
context_release(context);
|
||||
@@ -1321,22 +1317,19 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
@@ -1330,22 +1326,19 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
static void wined3d_texture_prepare_buffer_object(struct wined3d_texture *texture,
|
||||
@ -195,7 +195,7 @@ index 6ca00ce..06ae160 100644
|
||||
}
|
||||
|
||||
static void wined3d_texture_force_reload(struct wined3d_texture *texture)
|
||||
@@ -1462,7 +1455,7 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
|
||||
@@ -1471,7 +1464,7 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
|
||||
return TRUE;
|
||||
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
@ -204,7 +204,7 @@ index 6ca00ce..06ae160 100644
|
||||
return TRUE;
|
||||
|
||||
case WINED3D_LOCATION_TEXTURE_RGB:
|
||||
@@ -1742,7 +1735,7 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
@@ -1762,7 +1755,7 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
}
|
||||
else if (sub_resource->locations & WINED3D_LOCATION_BUFFER)
|
||||
{
|
||||
@ -212,8 +212,8 @@ index 6ca00ce..06ae160 100644
|
||||
+ struct wined3d_const_bo_address data = {sub_resource->buffer->name, NULL};
|
||||
wined3d_texture_bind_and_dirtify(texture, context, location == WINED3D_LOCATION_TEXTURE_SRGB);
|
||||
wined3d_texture_get_pitch(texture, sub_resource_idx, &row_pitch, &slice_pitch);
|
||||
texture1d_upload_data(texture, sub_resource_idx, context, &data, row_pitch, slice_pitch);
|
||||
@@ -1787,7 +1780,7 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
texture1d_upload_data(texture, sub_resource_idx, context, NULL, &data, row_pitch, slice_pitch);
|
||||
@@ -1807,7 +1800,7 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
{
|
||||
@ -222,7 +222,7 @@ index 6ca00ce..06ae160 100644
|
||||
|
||||
if (sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB)
|
||||
wined3d_texture_bind_and_dirtify(texture, context, FALSE);
|
||||
@@ -2068,8 +2061,8 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
|
||||
@@ -2101,8 +2094,8 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
|
||||
wined3d_texture_invalidate_location(texture, i, ~WINED3D_LOCATION_DISCARDED);
|
||||
}
|
||||
|
||||
@ -233,7 +233,7 @@ index 6ca00ce..06ae160 100644
|
||||
|
||||
if (resource->type == WINED3D_RTYPE_TEXTURE_2D)
|
||||
{
|
||||
@@ -2845,7 +2838,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
@@ -2897,7 +2890,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
}
|
||||
else if (sub_resource->locations & WINED3D_LOCATION_BUFFER)
|
||||
{
|
||||
@ -242,7 +242,7 @@ index 6ca00ce..06ae160 100644
|
||||
wined3d_texture_bind_and_dirtify(texture, context,
|
||||
location == WINED3D_LOCATION_TEXTURE_SRGB);
|
||||
wined3d_texture_get_pitch(texture, sub_resource_idx, &row_pitch, &slice_pitch);
|
||||
@@ -2891,7 +2884,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
@@ -2943,7 +2936,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
{
|
||||
@ -252,10 +252,10 @@ index 6ca00ce..06ae160 100644
|
||||
if (sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB)
|
||||
wined3d_texture_bind_and_dirtify(texture, context, FALSE);
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index e6d6647..3796ebb 100644
|
||||
index d19b380..4f8abb8 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2433,6 +2433,14 @@ struct wined3d_state
|
||||
@@ -2520,6 +2520,14 @@ struct wined3d_state
|
||||
struct wined3d_rasterizer_state *rasterizer_state;
|
||||
};
|
||||
|
||||
@ -270,7 +270,7 @@ index e6d6647..3796ebb 100644
|
||||
#define WINED3D_UNMAPPED_STAGE ~0U
|
||||
|
||||
/* Multithreaded flag. Removed from the public header to signal that
|
||||
@@ -2543,6 +2551,11 @@ void device_invalidate_state(const struct wined3d_device *device, DWORD state) D
|
||||
@@ -2633,6 +2641,11 @@ void device_invalidate_state(const struct wined3d_device *device, DWORD state) D
|
||||
void device_invalidate_shader_constants(const struct wined3d_device *device, DWORD mask) DECLSPEC_HIDDEN;
|
||||
void device_exec_update_texture(struct wined3d_context *context, struct wined3d_texture *src_texture,
|
||||
struct wined3d_texture *dst_texture) DECLSPEC_HIDDEN;
|
||||
@ -282,7 +282,7 @@ index e6d6647..3796ebb 100644
|
||||
|
||||
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
|
||||
{
|
||||
@@ -2731,7 +2744,7 @@ struct wined3d_texture
|
||||
@@ -2822,7 +2835,7 @@ struct wined3d_texture
|
||||
|
||||
unsigned int map_count;
|
||||
DWORD locations;
|
||||
@ -292,5 +292,5 @@ index e6d6647..3796ebb 100644
|
||||
} sub_resources[1];
|
||||
};
|
||||
--
|
||||
2.8.1
|
||||
2.9.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 9feb9ed51972175002f84d899915fe57a82d509d Mon Sep 17 00:00:00 2001
|
||||
From 2d336621af183127636cfcc5ed502490046b2068 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Fri, 30 Aug 2013 17:06:29 +0200
|
||||
Subject: wined3d: Separate resource map and draw buffers
|
||||
@ -11,10 +11,10 @@ Subject: wined3d: Separate resource map and draw buffers
|
||||
4 files changed, 34 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 928fcda..92f9034 100644
|
||||
index afc94b9..25a6ee5 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3577,7 +3577,7 @@ static void wined3d_device_update_texture_3d(struct wined3d_context *context,
|
||||
@@ -3623,7 +3623,7 @@ static void wined3d_device_update_texture_3d(struct wined3d_context *context,
|
||||
for (i = 0; i < level_count; ++i)
|
||||
{
|
||||
wined3d_texture_get_memory(src_texture, src_level + i, &data,
|
||||
@ -22,12 +22,12 @@ index 928fcda..92f9034 100644
|
||||
+ src_texture->resource.map_binding, FALSE);
|
||||
wined3d_texture_get_pitch(src_texture, src_level + i, &row_pitch, &slice_pitch);
|
||||
|
||||
wined3d_texture_upload_data(dst_texture, i, context, wined3d_const_bo_address(&data),
|
||||
wined3d_texture_upload_data(dst_texture, i, context, NULL, wined3d_const_bo_address(&data),
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 46f79db..4b2cdad 100644
|
||||
index 344299b..87d4f93 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -324,7 +324,7 @@ void wined3d_surface_destroy_dc(struct wined3d_surface *surface)
|
||||
@@ -322,7 +322,7 @@ void wined3d_surface_destroy_dc(struct wined3d_surface *surface)
|
||||
gl_info = context->gl_info;
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ index 46f79db..4b2cdad 100644
|
||||
wined3d_texture_unmap_bo_address(&data, gl_info, GL_PIXEL_UNPACK_BUFFER);
|
||||
|
||||
if (context)
|
||||
@@ -360,7 +360,7 @@ HRESULT wined3d_surface_create_dc(struct wined3d_surface *surface)
|
||||
@@ -358,7 +358,7 @@ HRESULT wined3d_surface_create_dc(struct wined3d_surface *surface)
|
||||
gl_info = context->gl_info;
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ index 46f79db..4b2cdad 100644
|
||||
desc.pMemory = wined3d_texture_map_bo_address(&data, texture->sub_resources[sub_resource_idx].size,
|
||||
gl_info, GL_PIXEL_UNPACK_BUFFER, 0);
|
||||
|
||||
@@ -808,7 +808,7 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
|
||||
@@ -804,7 +804,7 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ index 46f79db..4b2cdad 100644
|
||||
|
||||
if (texture->flags & WINED3D_TEXTURE_COND_NP2_EMULATED)
|
||||
{
|
||||
@@ -1210,7 +1210,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -1208,7 +1208,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
wined3d_texture_bind_and_dirtify(dst_texture, context, FALSE);
|
||||
|
||||
wined3d_texture_get_memory(src_texture, src_sub_resource_idx, &data,
|
||||
@ -63,7 +63,7 @@ index 46f79db..4b2cdad 100644
|
||||
wined3d_texture_get_pitch(src_texture, src_surface->texture_level, &src_row_pitch, &src_slice_pitch);
|
||||
|
||||
wined3d_surface_upload_data(dst_surface, gl_info, src_format, src_rect,
|
||||
@@ -1758,7 +1758,7 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_texture *sr
|
||||
@@ -1756,7 +1756,7 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_texture *sr
|
||||
wined3d_texture_load_location(src_texture, sub_resource_idx, context,
|
||||
src_texture->resource.map_binding);
|
||||
wined3d_texture_get_memory(src_texture, sub_resource_idx, &src_bo_addr,
|
||||
@ -72,7 +72,7 @@ index 46f79db..4b2cdad 100644
|
||||
src_data = wined3d_texture_map_bo_address(&src_bo_addr,
|
||||
src_texture->sub_resources[sub_resource_idx].size,
|
||||
context->gl_info, GL_PIXEL_UNPACK_BUFFER, WINED3D_MAP_READONLY);
|
||||
@@ -1771,7 +1771,7 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_texture *sr
|
||||
@@ -1769,7 +1769,7 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_texture *sr
|
||||
|
||||
wined3d_texture_prepare_location(dst_texture, 0, context, dst_texture->resource.map_binding);
|
||||
wined3d_texture_get_memory(dst_texture, 0, &dst_bo_addr,
|
||||
@ -81,7 +81,7 @@ index 46f79db..4b2cdad 100644
|
||||
dst_data = wined3d_texture_map_bo_address(&dst_bo_addr,
|
||||
dst_texture->sub_resources[0].size,
|
||||
context->gl_info, GL_PIXEL_UNPACK_BUFFER, 0);
|
||||
@@ -1900,7 +1900,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
|
||||
@@ -1898,7 +1898,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface,
|
||||
BOOL srcIsUpsideDown;
|
||||
struct wined3d_bo_address data;
|
||||
|
||||
@ -90,7 +90,7 @@ index 46f79db..4b2cdad 100644
|
||||
|
||||
restore_rt = context_get_rt_surface(old_ctx);
|
||||
if (restore_rt != surface)
|
||||
@@ -3088,7 +3088,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
@@ -3083,7 +3083,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
|
||||
wined3d_texture_set_map_binding(texture, WINED3D_LOCATION_SYSMEM);
|
||||
}
|
||||
|
||||
@ -99,7 +99,7 @@ index 46f79db..4b2cdad 100644
|
||||
if (format.convert)
|
||||
{
|
||||
/* This code is entered for texture formats which need a fixup. */
|
||||
@@ -3579,7 +3579,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
|
||||
@@ -3576,7 +3576,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
|
||||
same_sub_resource = TRUE;
|
||||
|
||||
wined3d_texture_get_memory(dst_texture, dst_sub_resource_idx, &dst_bo_addr,
|
||||
@ -108,7 +108,7 @@ index 46f79db..4b2cdad 100644
|
||||
dst_map.data = wined3d_texture_map_bo_address(&dst_bo_addr,
|
||||
dst_texture->sub_resources[dst_sub_resource_idx].size,
|
||||
context->gl_info, GL_PIXEL_UNPACK_BUFFER, 0);
|
||||
@@ -3615,7 +3615,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
|
||||
@@ -3612,7 +3612,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
|
||||
wined3d_texture_get_pitch(src_texture, src_sub_resource_idx % src_texture->level_count,
|
||||
&src_map.row_pitch, &src_map.slice_pitch);
|
||||
wined3d_texture_get_memory(src_texture, src_sub_resource_idx, &src_bo_addr,
|
||||
@ -117,7 +117,7 @@ index 46f79db..4b2cdad 100644
|
||||
src_map.data = wined3d_texture_map_bo_address(&src_bo_addr,
|
||||
src_texture->sub_resources[src_sub_resource_idx].size,
|
||||
context->gl_info, GL_PIXEL_UNPACK_BUFFER, 0);
|
||||
@@ -3630,7 +3630,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
|
||||
@@ -3627,7 +3627,7 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
|
||||
}
|
||||
|
||||
wined3d_texture_get_memory(dst_texture, dst_sub_resource_idx, &dst_bo_addr,
|
||||
@ -127,10 +127,10 @@ index 46f79db..4b2cdad 100644
|
||||
dst_texture->sub_resources[dst_sub_resource_idx].size,
|
||||
context->gl_info, GL_PIXEL_UNPACK_BUFFER, 0);
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index afb1738..729863c 100644
|
||||
index 6160b6b..827dfd4 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -163,9 +163,9 @@ static BOOL wined3d_texture_copy_sysmem_location(struct wined3d_texture *texture
|
||||
@@ -168,9 +168,9 @@ static BOOL wined3d_texture_copy_sysmem_location(struct wined3d_texture *texture
|
||||
|
||||
wined3d_texture_prepare_location(texture, sub_resource_idx, context, location);
|
||||
|
||||
@ -142,7 +142,7 @@ index afb1738..729863c 100644
|
||||
|
||||
if (dst.buffer_object)
|
||||
{
|
||||
@@ -326,7 +326,7 @@ void wined3d_texture_unmap_bo_address(const struct wined3d_bo_address *data,
|
||||
@@ -331,7 +331,7 @@ void wined3d_texture_unmap_bo_address(const struct wined3d_bo_address *data,
|
||||
}
|
||||
|
||||
void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
@ -151,7 +151,7 @@ index afb1738..729863c 100644
|
||||
{
|
||||
struct wined3d_texture_sub_resource *sub_resource;
|
||||
|
||||
@@ -337,7 +337,10 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su
|
||||
@@ -342,7 +342,10 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su
|
||||
if (locations & WINED3D_LOCATION_BUFFER)
|
||||
{
|
||||
data->addr = NULL;
|
||||
@ -163,7 +163,7 @@ index afb1738..729863c 100644
|
||||
return;
|
||||
}
|
||||
if (locations & WINED3D_LOCATION_USER_MEMORY)
|
||||
@@ -439,8 +442,13 @@ static void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture
|
||||
@@ -446,8 +449,13 @@ static void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture
|
||||
struct wined3d_gl_bo *buffer = texture->sub_resources[sub_resource_idx].buffer;
|
||||
GLuint name = buffer->name;
|
||||
|
||||
@ -177,7 +177,7 @@ index afb1738..729863c 100644
|
||||
wined3d_texture_invalidate_location(texture, sub_resource_idx, WINED3D_LOCATION_BUFFER);
|
||||
|
||||
TRACE("Deleted buffer object %u for texture %p, sub-resource %u.\n",
|
||||
@@ -628,6 +636,10 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
|
||||
@@ -635,6 +643,10 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
|
||||
|
||||
for (i = 0; i < sub_count; ++i)
|
||||
{
|
||||
@ -188,7 +188,7 @@ index afb1738..729863c 100644
|
||||
if (!(buffer = texture->sub_resources[i].buffer))
|
||||
continue;
|
||||
|
||||
@@ -640,6 +652,7 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
|
||||
@@ -647,6 +659,7 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
|
||||
|
||||
wined3d_device_release_bo(device, buffer, context);
|
||||
texture->sub_resources[i].buffer = NULL;
|
||||
@ -196,7 +196,7 @@ index afb1738..729863c 100644
|
||||
}
|
||||
if (context)
|
||||
context_release(context);
|
||||
@@ -1322,6 +1335,7 @@ static void wined3d_texture_prepare_buffer_object(struct wined3d_texture *textur
|
||||
@@ -1336,6 +1349,7 @@ static void wined3d_texture_prepare_buffer_object(struct wined3d_texture *textur
|
||||
|
||||
sub_resource->buffer = wined3d_device_get_bo(texture->resource.device,
|
||||
sub_resource->size, GL_STREAM_DRAW, GL_PIXEL_UNPACK_BUFFER, context);
|
||||
@ -204,7 +204,7 @@ index afb1738..729863c 100644
|
||||
|
||||
TRACE("Created buffer object %u for texture %p, sub-resource %u.\n",
|
||||
sub_resource->buffer->name, texture, sub_resource_idx);
|
||||
@@ -1779,7 +1793,7 @@ void *wined3d_texture_map_internal(struct wined3d_texture *texture, unsigned int
|
||||
@@ -2158,7 +2172,7 @@ void *wined3d_texture_map_internal(struct wined3d_texture *texture, unsigned int
|
||||
if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY)))
|
||||
sub_resource->unmap_dirtify = TRUE;
|
||||
|
||||
@ -213,7 +213,7 @@ index afb1738..729863c 100644
|
||||
data = wined3d_texture_map_bo_address(&bo_data, sub_resource->size,
|
||||
context->gl_info, GL_PIXEL_UNPACK_BUFFER, flags);
|
||||
|
||||
@@ -1913,7 +1927,7 @@ void wined3d_texture_unmap_internal(struct wined3d_texture *texture, unsigned in
|
||||
@@ -2292,7 +2306,7 @@ void wined3d_texture_unmap_internal(struct wined3d_texture *texture, unsigned in
|
||||
if (texture->resource.device->d3d_initialized)
|
||||
context = context_acquire(texture->resource.device, NULL);
|
||||
|
||||
@ -223,10 +223,10 @@ index afb1738..729863c 100644
|
||||
|
||||
if (context)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index c56e454..cbcb923 100644
|
||||
index 4f8abb8..77dd83e 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2735,7 +2735,7 @@ struct wined3d_texture
|
||||
@@ -2835,7 +2835,7 @@ struct wined3d_texture
|
||||
|
||||
unsigned int map_count;
|
||||
DWORD locations;
|
||||
@ -235,7 +235,7 @@ index c56e454..cbcb923 100644
|
||||
BOOL unmap_dirtify;
|
||||
} sub_resources[1];
|
||||
};
|
||||
@@ -2793,7 +2793,7 @@ BOOL wined3d_texture_check_block_align(const struct wined3d_texture *texture,
|
||||
@@ -2893,7 +2893,7 @@ BOOL wined3d_texture_check_block_align(const struct wined3d_texture *texture,
|
||||
unsigned int level, const struct wined3d_box *box) DECLSPEC_HIDDEN;
|
||||
GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 21a06ced85ce0e69abdb0d0ed89cc9f3ee2910b9 Mon Sep 17 00:00:00 2001
|
||||
From 03bf69ef24be95096e195766f0d9afca5dcde9ef Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
|
||||
Date: Sat, 7 May 2016 21:16:47 +0100
|
||||
Subject: wined3d: Call create_default_sampler from create_dummy_textures.
|
||||
@ -9,7 +9,7 @@ I should really rename it, don't feel like it now.
|
||||
1 file changed, 34 insertions(+), 41 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index e0ef122..1da8384 100644
|
||||
index 75897b7..9836106 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -663,6 +663,39 @@ out:
|
||||
@ -30,7 +30,7 @@ index e0ef122..1da8384 100644
|
||||
+ */
|
||||
+ GL_EXTCALL(glGenSamplers(1, &device->default_sampler));
|
||||
+ GL_EXTCALL(glSamplerParameteri(device->default_sampler, GL_TEXTURE_MAG_FILTER, GL_NEAREST));
|
||||
+ GL_EXTCALL(glSamplerParameteri(device->default_sampler, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST));
|
||||
+ GL_EXTCALL(glSamplerParameteri(device->default_sampler, GL_TEXTURE_MIN_FILTER, GL_NEAREST));
|
||||
+ checkGLcall("Create default sampler");
|
||||
+
|
||||
+ /* In D3D10+, a NULL sampler maps to the default sampler state. */
|
||||
@ -78,7 +78,7 @@ index e0ef122..1da8384 100644
|
||||
- */
|
||||
- GL_EXTCALL(glGenSamplers(1, &device->default_sampler));
|
||||
- GL_EXTCALL(glSamplerParameteri(device->default_sampler, GL_TEXTURE_MAG_FILTER, GL_NEAREST));
|
||||
- GL_EXTCALL(glSamplerParameteri(device->default_sampler, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST));
|
||||
- GL_EXTCALL(glSamplerParameteri(device->default_sampler, GL_TEXTURE_MIN_FILTER, GL_NEAREST));
|
||||
- checkGLcall("Create default sampler");
|
||||
-
|
||||
- /* In D3D10+, a NULL sampler maps to the default sampler state. */
|
||||
@ -108,7 +108,7 @@ index e0ef122..1da8384 100644
|
||||
DWORD clear_flags = 0;
|
||||
HRESULT hr;
|
||||
|
||||
@@ -1063,9 +1063,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
@@ -1065,9 +1065,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
device_init_swapchain_state(device, swapchain);
|
||||
|
||||
wined3d_cs_emit_create_dummy_textures(device->cs);
|
||||
@ -118,7 +118,7 @@ index e0ef122..1da8384 100644
|
||||
|
||||
device->contexts[0]->last_was_rhw = 0;
|
||||
|
||||
@@ -4607,7 +4604,6 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
|
||||
@@ -4632,7 +4629,6 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
|
||||
|
||||
static HRESULT create_primary_opengl_context(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
|
||||
{
|
||||
@ -126,7 +126,7 @@ index e0ef122..1da8384 100644
|
||||
HRESULT hr;
|
||||
|
||||
if (FAILED(hr = device->shader_backend->shader_alloc_private(device,
|
||||
@@ -4634,9 +4630,6 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
@@ -4659,9 +4655,6 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
}
|
||||
|
||||
wined3d_cs_emit_create_dummy_textures(device->cs);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,6 @@ Fixes: [11674] Support for CSMT (command stream) to increase graphic performance
|
||||
Apply-After: dlls/wined3d/*
|
||||
Depends: wined3d-CSMT_Helper
|
||||
IfDefined: STAGING_CSMT
|
||||
Disabled: true
|
||||
|
||||
# Known issues:
|
||||
# https://bugs.wine-staging.com/buglist.cgi?component=Bugs&keywords=csmt%2C%20&keywords_type=allwords&list_id=3690&query_format=advanced&resolution=---
|
||||
|
Loading…
x
Reference in New Issue
Block a user