wine-orson.git
10 years agod3dx9: Implement D3DXSHMultiply5 wine-patches-csmt
Nozomi Kodama [Thu, 11 Apr 2013 06:06:23 +0000 (20:06 -1000)]
d3dx9: Implement D3DXSHMultiply5

10 years agowined3d: Add a registry key to configure buffer object placement
Stefan Dösinger [Mon, 1 Apr 2013 08:30:12 +0000 (10:30 +0200)]
wined3d: Add a registry key to configure buffer object placement

This can provide huge speed improvements in some games, but please test it properly
before recommending it in HOWTOs.

10 years agod3d9: Make IDirect3DDevice9Ex::PresentEx hookable. csmt-rebased
Stefan Dösinger [Wed, 22 Jan 2014 13:56:13 +0000 (14:56 +0100)]
d3d9: Make IDirect3DDevice9Ex::PresentEx hookable.

Fraps hooks this without minding the existing code.

10 years agowined3d: Completely reset the state on reset.
Stefan Dösinger [Fri, 10 Jan 2014 16:57:03 +0000 (17:57 +0100)]
wined3d: Completely reset the state on reset.

10 years agowined3d: Send palette updates through the command stream.
Stefan Dösinger [Mon, 6 Jan 2014 20:53:28 +0000 (21:53 +0100)]
wined3d: Send palette updates through the command stream.

Right now the main purpose of this patch is to avoid a context
activation issue in the ddraw tests that was triggered by the
context_acquire call in the main thread. It is barely tested and missing
some pieces, like a synchronization concept that is better than just
waiting for the CS to finish.

10 years agod3d9/tests: D3DLOCK_NO_DIRTY_UPDATE on managed textures is temporarily broken.
Stefan Dösinger [Wed, 20 Nov 2013 17:06:02 +0000 (18:06 +0100)]
d3d9/tests: D3DLOCK_NO_DIRTY_UPDATE on managed textures is temporarily broken.

10 years agod3d8/tests: D3DLOCK_NO_DIRTY_UPDATE on managed textures is temporarily broken.
Stefan Dösinger [Wed, 20 Nov 2013 17:04:50 +0000 (18:04 +0100)]
d3d8/tests: D3DLOCK_NO_DIRTY_UPDATE on managed textures is temporarily broken.

10 years agowined3d: Fence preload operations.
Stefan Dösinger [Thu, 24 Oct 2013 20:38:26 +0000 (22:38 +0200)]
wined3d: Fence preload operations.

Otherwise texture data might get lost, thanks to surface/volume_evict_sysmem:

1) preload(texture)
2) map(texture)
    -> Loads sysmem / sets it with discard map.
3) unmap(texture)
    -> enqueues a resource_changed operation
4) preload is executed.
    -> Uploads data written in 3. Discards sysmem. Questionable if
       DISCARD was passed, but without it, no harm done.
    -> texture is only up to date location.
5) resource_changed executed.
    -> Discards texture.

And data is lost. This patch prevents that by stalling the map until the
PreLoad is done.

What's left open is finding out why anyone (I'm looking at you EVE
online) preloads a texture right before mapping it...

10 years agowined3d: Use an event to block the worker thread when it is idle.
Stefan Dösinger [Thu, 24 Oct 2013 16:56:13 +0000 (18:56 +0200)]
wined3d: Use an event to block the worker thread when it is idle.

I could not find a canonical implementation for this. Suggestions are
welcome.

The main goal was to avoid SetEvent / WaitForSingleObject / ResetEvent
calls at all costs. They go straight to wineserver, bringing it to 25%
CPU time and cutting framerates in half. Hence the extra BOOL to tell
cs_submit when to set the event.

Finding the correct spin count is tricky. The value I set is high enough
to prevent 3DMark2001 car chase high detail from waiting. This benchmark
maps a lot of in-use managed buffers and thus waits for the CS. But what
the ideal number is depends a lot on the game and CPU.

A better heuristic is needed. E.g. we could tell the worker thread when
the main thread is waiting for a resource to become idle and avoid
waiting for the event in that case. We may have to use POSIX
synchronization primitives for efficiency. On the other hand, the
current implementation probably still spins way too much for an
application that throttles the framerate to 30 fps by waiting in its own
code. So it is probably only good enough for Microsoft Powerpoint.

We should also think about blocking the main thread with events if it is
waiting for the worker thread when waiting for resources, the swap
counter or space in the command Stream. This should preserve power when
vsync is turned on.

10 years agowined3d: Don't switch directly from one context to another (hack).
Stefan Dösinger [Tue, 15 Oct 2013 14:58:23 +0000 (16:58 +0200)]
wined3d: Don't switch directly from one context to another (hack).

Switching from one context to another non-NULL context and then deleting
the original context triggers a bug in the Nvidia blob that causes a
crash on process cleanup. Other context changes on the same thread can
undo the damage. So usually we don't see the problem because the device
creation / destruction hides the problem.

The next patch however will eliminate the GL context for all threads
except the worker thread, uncovering this bug. Clearing the context
before activating the new one avoids the problem. This can be seen in
the ddraw overlay and d3d8/9 stateblock tests.

I must admit that I don't fully understand it yet. I haven't tried to
reproduce the issue in a stand-alone application yet, and for some
reason the crash occurs in the worker thread instead of the main thread,
but long after the worker thread has ended, and after THREAD_DETACH and
PROCESS_DETACH events have been processed. Lots of context activation /
deactivation activity in the worker can also hide the bug. In theory the
single threaded command stream should show this problem if an
application only creates a IDirect3D9 object without creating a device,
destroys it and then exits.

10 years agowined3d: Invoke surface_unload through the CS in wined3d_surface_update_desc.
Stefan Dösinger [Fri, 11 Oct 2013 10:09:37 +0000 (12:09 +0200)]
wined3d: Invoke surface_unload through the CS in wined3d_surface_update_desc.

This fixes another case where we use a GL context in the main thread and
crash fglrx in doing so.

10 years agowined3d: Delete GL contexts through the CS in uninit_3d.
Stefan Dösinger [Fri, 11 Oct 2013 08:17:42 +0000 (10:17 +0200)]
wined3d: Delete GL contexts through the CS in uninit_3d.

10 years agowined3d: Delete GL contexts through the CS in reset.
Stefan Dösinger [Fri, 11 Oct 2013 08:11:13 +0000 (10:11 +0200)]
wined3d: Delete GL contexts through the CS in reset.

Let's see if this fixes the remaining fglrx crashes...

10 years agowined3d: Ignore WINED3D_MAP_NO_DIRTY_UPDATE in resource_map.
Stefan Dösinger [Thu, 10 Oct 2013 17:18:06 +0000 (19:18 +0200)]
wined3d: Ignore WINED3D_MAP_NO_DIRTY_UPDATE in resource_map.

TODO: This flag and add_dirty_rect need tests.

The primary purpose of this patch is to fix a memory leak in World of
Warcraft. WoW uses WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_DISCARD on
sysmem surfaces. A new block of memory is allocated, but never assigned
to heap_mem because wined3d_cs_emit_resource_changed is not called.

The bigger picture is that we don't know how this flag and AddDirtyRect
/ AddDirtyBox are supposed to work. Msdn mentions some interaction with
update_surface and update_texture, but personally I think it is more
likely that this functionality is used to update separate rectangles in
a texture, similar to what can be achieved by mapping a buffer twice.

10 years agowined3d: Recreate ctx and dummy textures through the CS after resets.
Stefan Dösinger [Thu, 10 Oct 2013 16:40:04 +0000 (18:40 +0200)]
wined3d: Recreate ctx and dummy textures through the CS after resets.

10 years agowined3d: Create the initial context through the CS.
Stefan Dösinger [Thu, 10 Oct 2013 14:43:19 +0000 (16:43 +0200)]
wined3d: Create the initial context through the CS.

Very hacky.

10 years agowined3d: Create dummy textures through the CS.
Stefan Dösinger [Thu, 10 Oct 2013 14:29:42 +0000 (16:29 +0200)]
wined3d: Create dummy textures through the CS.

Hacky version. Just good enough to see if the double context during init is what makes fglrx
crash.

10 years agowined3d: Remove software cursor support.
Stefan Dösinger [Thu, 3 Oct 2013 17:23:24 +0000 (19:23 +0200)]
wined3d: Remove software cursor support.

This has been broken since quite some time and only serves to crash fglrx by acquiring a context
in the main thread.

FIXME: Make sure wined3d_device_show_cursor returns the correct value if a software cursor is set.

10 years agowined3d: Don't glFinish after a depth buffer blit.
Stefan Dösinger [Thu, 3 Oct 2013 15:39:08 +0000 (17:39 +0200)]
wined3d: Don't glFinish after a depth buffer blit.

10 years agowined3d: Unload resources through the CS in device_reset.
Stefan Dösinger [Wed, 2 Oct 2013 21:40:20 +0000 (23:40 +0200)]
wined3d: Unload resources through the CS in device_reset.

10 years agowined3d: Unload resources through the CS in uninit_3d.
Stefan Dösinger [Wed, 2 Oct 2013 21:28:56 +0000 (23:28 +0200)]
wined3d: Unload resources through the CS in uninit_3d.

10 years agowined3d: Clean up texture resources through the cs.
Stefan Dösinger [Sun, 6 Oct 2013 14:20:32 +0000 (16:20 +0200)]
wined3d: Clean up texture resources through the cs.

10 years agowined3d: Clean up surfaces through the cs.
Stefan Dösinger [Sun, 6 Oct 2013 14:12:24 +0000 (16:12 +0200)]
wined3d: Clean up surfaces through the cs.

10 years agowined3d: Clean up volume resource data through the CS.
Stefan Dösinger [Wed, 2 Oct 2013 20:54:57 +0000 (22:54 +0200)]
wined3d: Clean up volume resource data through the CS.

10 years agowined3d: Clean up buffer resource data through the CS.
Stefan Dösinger [Wed, 2 Oct 2013 20:50:08 +0000 (22:50 +0200)]
wined3d: Clean up buffer resource data through the CS.

10 years agowined3d: Clean up resource data through the CS.
Stefan Dösinger [Wed, 2 Oct 2013 20:38:51 +0000 (22:38 +0200)]
wined3d: Clean up resource data through the CS.

10 years agowined3d: Create VBOs through the command stream.
Stefan Dösinger [Wed, 2 Oct 2013 19:47:08 +0000 (21:47 +0200)]
wined3d: Create VBOs through the command stream.

A stop-gap solution to make fglrx happier until buffers are updated.

10 years agowined3d: Don't request the frontbuffer to create dummy textures.
Stefan Dösinger [Wed, 2 Oct 2013 10:36:02 +0000 (12:36 +0200)]
wined3d: Don't request the frontbuffer to create dummy textures.

10 years agowined3d: Unset some objects in state_init_default.
Stefan Dösinger [Tue, 1 Oct 2013 19:30:07 +0000 (21:30 +0200)]
wined3d: Unset some objects in state_init_default.

FIXME: Many more are needed.

10 years agowined3d: Put update_surface checks back in place
Stefan Dösinger [Tue, 1 Oct 2013 18:23:05 +0000 (20:23 +0200)]
wined3d: Put update_surface checks back in place

Unfortunately I can't remove the code from surface_update_from_surface
yet because blits depend on them.

10 years agowined3d: Implement DISCARD resource maps with heap memory.
Stefan Dösinger [Fri, 27 Sep 2013 17:24:21 +0000 (19:24 +0200)]
wined3d: Implement DISCARD resource maps with heap memory.

10 years agowined3d: Implement DISCARD resource maps with buffers.
Stefan Dösinger [Fri, 27 Sep 2013 17:06:41 +0000 (19:06 +0200)]
wined3d: Implement DISCARD resource maps with buffers.

10 years agowined3d: Separate resource map and draw buffers
Stefan Dösinger [Fri, 30 Aug 2013 15:06:29 +0000 (17:06 +0200)]
wined3d: Separate resource map and draw buffers

10 years agowined3d: Wrap GL BOs in a structure
Stefan Dösinger [Fri, 30 Aug 2013 15:00:35 +0000 (17:00 +0200)]
wined3d: Wrap GL BOs in a structure

The idea is to use those structures for mapping through the command stream and caching
them for DISCARD maps.

10 years agowined3d: Dirtify changed textures through the command stream.
Stefan Dösinger [Fri, 27 Sep 2013 16:46:19 +0000 (18:46 +0200)]
wined3d: Dirtify changed textures through the command stream.

This makes sure unsynchronized maps (NOOVERWRITE /DISCARD) are reflected
in the volume's location flags at the right time.

10 years agowined3d: Make resource maps and unmaps a priority command.
Stefan Dösinger [Fri, 27 Sep 2013 15:58:25 +0000 (17:58 +0200)]
wined3d: Make resource maps and unmaps a priority command.

10 years agowined3d: Fence present calls.
Stefan Dösinger [Fri, 27 Sep 2013 15:55:35 +0000 (17:55 +0200)]
wined3d: Fence present calls.

10 years agowined3d: Fence clear calls.
Stefan Dösinger [Fri, 27 Sep 2013 15:04:47 +0000 (17:04 +0200)]
wined3d: Fence clear calls.

10 years agowined3d: Fence color_fill operations.
Stefan Dösinger [Fri, 27 Sep 2013 14:58:13 +0000 (16:58 +0200)]
wined3d: Fence color_fill operations.

10 years agowined3d: Fence blit operations.
Stefan Dösinger [Fri, 27 Sep 2013 14:57:01 +0000 (16:57 +0200)]
wined3d: Fence blit operations.

10 years agowined3d: Fence render targets and depth stencils
Stefan Dösinger [Fri, 27 Sep 2013 14:55:58 +0000 (16:55 +0200)]
wined3d: Fence render targets and depth stencils

10 years agowined3d: Fence texture reads in draws
Stefan Dösinger [Fri, 30 Aug 2013 20:42:33 +0000 (22:42 +0200)]
wined3d: Fence texture reads in draws

This is probably stricter than necessary. GL BOs and allocated sysmem
are just staging resources. After they have been uploaded into the GL
texture, it's in theory OK to write new data buffer without interfering
with old draws. However, it is impossible to tell when if data has been
transfered into the texture because texture loads are delayed until draw
time. Specifically, it is difficult to separate two consecutive maps
from a map, draw, map sequence, where the draw hasn't been executed by
the time the second map occurs.

The other problem is that sRGB may cause a texture load from
buffer/sysmem even though the GL texture is thought to be loaded. This
is limited to situations where sRGB textures are supported, but
sRGB_decode isn't.

10 years agowined3d: Dirtify resources on unmap
Stefan Dösinger [Thu, 26 Sep 2013 15:25:01 +0000 (17:25 +0200)]
wined3d: Dirtify resources on unmap

10 years agowined3d: Put this into the query poll patch
Stefan Dösinger [Fri, 30 Aug 2013 11:53:48 +0000 (13:53 +0200)]
wined3d: Put this into the query poll patch

10 years agowined3d: Fence update_texture and update_surface calls
Stefan Dösinger [Fri, 30 Aug 2013 08:41:42 +0000 (10:41 +0200)]
wined3d: Fence update_texture and update_surface calls

10 years agowined3d: Use finer-grained buffer fencing
Stefan Dösinger [Fri, 30 Aug 2013 08:03:26 +0000 (10:03 +0200)]
wined3d: Use finer-grained buffer fencing

TODO: This could be more efficient. Find out which streams are
referenced in a vertex declaration at decl creation time and fence the
buffers in those streams only once.

10 years agowined3d: Don't lock the src volume in device_update_volume
Stefan Dösinger [Thu, 29 Aug 2013 20:25:14 +0000 (22:25 +0200)]
wined3d: Don't lock the src volume in device_update_volume

This will attempt to wait for the CS, but this code is executed by the CS, so
it will, among other problems, break the single producer, single consumer
assumption of the work queue.

10 years agowined3d: Create buffers before mapping them.
Stefan Dösinger [Thu, 29 Aug 2013 15:35:53 +0000 (17:35 +0200)]
wined3d: Create buffers before mapping them.

10 years agowined3d: Send flips through the command stream
Stefan Dösinger [Tue, 6 Aug 2013 15:39:26 +0000 (17:39 +0200)]
wined3d: Send flips through the command stream

TODO: This remove this patch and flip_surface / surface_flip.

10 years agowined3d: Handle evit_managed_resources through the CS
Stefan Dösinger [Tue, 6 Aug 2013 11:50:31 +0000 (13:50 +0200)]
wined3d: Handle evit_managed_resources through the CS

10 years agowined3d: Don't reset the query state if it doesn't have a ctx
Stefan Dösinger [Mon, 5 Aug 2013 11:07:42 +0000 (13:07 +0200)]
wined3d: Don't reset the query state if it doesn't have a ctx

The CS recreates occlusion queries and changes the context variable.
This leads to incorrect query results.

TODO: Before sending, find out why the line was there in the first place
and if it is needed with the multithreaded and/or singlethreaded CS.

10 years agowined3d: Get rid of the surface_upload_data glFinish
Stefan Dösinger [Wed, 31 Jul 2013 23:43:35 +0000 (01:43 +0200)]
wined3d: Get rid of the surface_upload_data glFinish

10 years agowined3d: Send update_texture calls through the CS
Stefan Dösinger [Wed, 31 Jul 2013 22:33:48 +0000 (00:33 +0200)]
wined3d: Send update_texture calls through the CS

10 years agowined3d: Send surface preloads through the CS
Stefan Dösinger [Wed, 31 Jul 2013 22:15:58 +0000 (00:15 +0200)]
wined3d: Send surface preloads through the CS

10 years agowined3d: Send texture preloads through the CS
Stefan Dösinger [Wed, 31 Jul 2013 22:10:40 +0000 (00:10 +0200)]
wined3d: Send texture preloads through the CS

10 years agowined3d: Send update_surface commands through the CS
Stefan Dösinger [Wed, 31 Jul 2013 22:00:26 +0000 (00:00 +0200)]
wined3d: Send update_surface commands through the CS

10 years agowined3d: CS debug message cleanup
Stefan Dösinger [Wed, 31 Jul 2013 21:27:32 +0000 (23:27 +0200)]
wined3d: CS debug message cleanup

10 years agowined3d: Destroy shaders through the CS
Stefan Dösinger [Wed, 31 Jul 2013 21:18:28 +0000 (23:18 +0200)]
wined3d: Destroy shaders through the CS

10 years agowined3d: Destroy vertex declarations through the CS
Stefan Dösinger [Wed, 31 Jul 2013 21:06:27 +0000 (23:06 +0200)]
wined3d: Destroy vertex declarations through the CS

10 years agowined3d: Control WINED3D_BUFFER_DISCARD from the worker thread
Stefan Dösinger [Tue, 30 Jul 2013 20:17:10 +0000 (22:17 +0200)]
wined3d: Control WINED3D_BUFFER_DISCARD from the worker thread

10 years agowined3d: Remove restated queries from the poll list
Stefan Dösinger [Wed, 24 Jul 2013 15:50:16 +0000 (17:50 +0200)]
wined3d: Remove restated queries from the poll list

10 years agowined3d: Don't poll queries that failed to start
Stefan Dösinger [Wed, 24 Jul 2013 15:27:35 +0000 (17:27 +0200)]
wined3d: Don't poll queries that failed to start

10 years agowined3d: Separate main and worker thread query state
Stefan Dösinger [Wed, 24 Jul 2013 14:34:17 +0000 (16:34 +0200)]
wined3d: Separate main and worker thread query state

10 years agowined3d: Use glBufferSubData instead of glMapBufferRange
Stefan Dösinger [Wed, 24 Jul 2013 11:02:06 +0000 (13:02 +0200)]
wined3d: Use glBufferSubData instead of glMapBufferRange

This is faster on Nvidia once we're stuck in double-buffer mode for some
reason (e.g. using threaded cs). For other cards, we want to be able to
do mapbuffer through the CS.

10 years agowinex11: complain if glFlush or glFinish are called
Stefan Dösinger [Tue, 23 Jul 2013 20:32:18 +0000 (22:32 +0200)]
winex11: complain if glFlush or glFinish are called

10 years agowined3d: Send buffer preloads through the CS
Stefan Dösinger [Sun, 7 Jul 2013 10:02:59 +0000 (12:02 +0200)]
wined3d: Send buffer preloads through the CS

Think about making this a fast command. Might help if the driver
supports async data transfer, but synchronization side effects, esp. wrt
the dirty area list, have to be considered.

10 years agowined3d: Add a debug FIXME to catch cs->finish calls
Stefan Dösinger [Sun, 7 Jul 2013 10:03:13 +0000 (12:03 +0200)]
wined3d: Add a debug FIXME to catch cs->finish calls

10 years agowined3d: Ignore buffer->resource.map_count in the CS
Stefan Dösinger [Sat, 6 Jul 2013 20:52:06 +0000 (22:52 +0200)]
wined3d: Ignore buffer->resource.map_count in the CS

This fixes sporadic test failures caused by preload refusing to load
data into the GL buffer.

It's fine to preload or create a VBO if a DISCARD or NOOVERWRITE map is
happening at the same time. A non-dynamic map will finish the CS before
incrementing map_count.

10 years agowined3d: Remove another glFinish
Stefan Dösinger [Sat, 6 Jul 2013 20:08:39 +0000 (22:08 +0200)]
wined3d: Remove another glFinish

I don't think this is needed any more.

10 years agowined3d: Destroy queries through the CS
Stefan Dösinger [Sat, 6 Jul 2013 19:54:45 +0000 (21:54 +0200)]
wined3d: Destroy queries through the CS

10 years agowined3d: Poll queries automatically in the CS
Stefan Dösinger [Sat, 6 Jul 2013 19:28:59 +0000 (21:28 +0200)]
wined3d: Poll queries automatically in the CS

Hopefully this is faster than a communication roundtrip between the main
and worker threads. The priority queue can be removed again as well.

10 years agowined3d: Use the priority queue to retrieve query data
Stefan Dösinger [Sat, 6 Jul 2013 17:18:48 +0000 (19:18 +0200)]
wined3d: Use the priority queue to retrieve query data

10 years agowined3d: Introduce a separate queue for priority commands
Stefan Dösinger [Sat, 6 Jul 2013 17:18:03 +0000 (19:18 +0200)]
wined3d: Introduce a separate queue for priority commands

10 years agowined3d: Check our CS state to find out if a query is done
Stefan Dösinger [Sat, 6 Jul 2013 16:31:41 +0000 (18:31 +0200)]
wined3d: Check our CS state to find out if a query is done

10 years agowined3d: Add query support to the command stream
Stefan Dösinger [Sat, 6 Jul 2013 16:26:11 +0000 (18:26 +0200)]
wined3d: Add query support to the command stream

10 years agowined3d: wined3d_*_query_issue never fails
Stefan Dösinger [Sat, 6 Jul 2013 16:15:00 +0000 (18:15 +0200)]
wined3d: wined3d_*_query_issue never fails

10 years agowined3d: Access the buffer dirty areas through the CS
Stefan Dösinger [Sat, 6 Jul 2013 15:05:12 +0000 (17:05 +0200)]
wined3d: Access the buffer dirty areas through the CS

This avoids the following issues:

1) The worker thread uploading a dirtified area before the application
unlocks the buffer and marking it clean

2) The worker thread uploading data from the old memory and marking the
area clean although the data was written to a new block of memory.

However, this adds more synchronization than necessary. The first
problem could be solved by moving dirtification to unmap, e.g. via a
flag in each dirty area. The second problem can be fixed by not
dirtifying in map if map_mem != resource.allocatedMemory and dirtifying
the entire buffer in buffer_swap_memory (DISCARD dirtifies the entire
buffer anyway, and this could be the reason why).

If one of those ideas is used, access to the dirty area array needs to
be protected by locks.

10 years agowined3d: Accelerate READONLY buffer maps
Stefan Dösinger [Sat, 6 Jul 2013 14:44:35 +0000 (16:44 +0200)]
wined3d: Accelerate READONLY buffer maps

FIXME: ProcessVertices can write to buffers

10 years agowined3d: Accelerate DISCARD buffer maps
Stefan Dösinger [Sat, 6 Jul 2013 14:14:16 +0000 (16:14 +0200)]
wined3d: Accelerate DISCARD buffer maps

TODO: Make this generic for all resources.
TODO2: Merge this with the patch that controlls BUFFER_DISCARD in the CS thread
TODO3: Clean up the map_mem allocation mess.

10 years agowined3d: Separate buffer map write and draw read memory pointers
Stefan Dösinger [Sat, 6 Jul 2013 13:59:11 +0000 (15:59 +0200)]
wined3d: Separate buffer map write and draw read memory pointers

TODO: Think about making this generic for all resources.
TODO 2: The name collision of map_mem and map_ptr is unfortunate.

10 years agowined3d: Don't call glFinish before swapping
Stefan Dösinger [Thu, 4 Jul 2013 21:50:20 +0000 (23:50 +0200)]
wined3d: Don't call glFinish before swapping

The code is probably not ready yet, so delay this patch until everything
is CSified. Right now I need it for performance testing.

10 years agowined3d: Don't synchronize NOOVERWRITE buffer maps
Stefan Dösinger [Thu, 4 Jul 2013 21:49:26 +0000 (23:49 +0200)]
wined3d: Don't synchronize NOOVERWRITE buffer maps

TODO: Put the patch that makes PreLoad ignore the mapped state here.

10 years agowined3d: Use double-buffered buffers for multithreaded CS
Stefan Dösinger [Thu, 4 Jul 2013 21:44:11 +0000 (23:44 +0200)]
wined3d: Use double-buffered buffers for multithreaded CS

10 years agowined3d: Don't preload buffers on unmap
Stefan Dösinger [Thu, 4 Jul 2013 21:40:56 +0000 (23:40 +0200)]
wined3d: Don't preload buffers on unmap

10 years agowined3d: Replace the linked lists with a ringbuffer
Stefan Dösinger [Thu, 4 Jul 2013 21:33:14 +0000 (23:33 +0200)]
wined3d: Replace the linked lists with a ringbuffer

10 years agowined3d: Get rid of the end_scene flush and finish
Stefan Dösinger [Thu, 4 Jul 2013 20:59:33 +0000 (22:59 +0200)]
wined3d: Get rid of the end_scene flush and finish

Either keep the patch this way, or send a flush through the CS. I'm not
sure it's worth it though, this has never had any real performance
impact.

10 years agowined3d: send resource maps through the command stream
Stefan Dösinger [Thu, 26 Sep 2013 14:41:00 +0000 (16:41 +0200)]
wined3d: send resource maps through the command stream

Slow version only. Good enough to dodge some Nvidia bugs in the ddraw tests.

10 years agowined3d: Send surface maps through the command stream
Stefan Dösinger [Thu, 26 Sep 2013 14:40:34 +0000 (16:40 +0200)]
wined3d: Send surface maps through the command stream

Slow version only. Good enough to dodge some nvidia bugs in the ddraw
tests.

10 years agowined3d: Send color fills through the command stream
Stefan Dösinger [Thu, 4 Jul 2013 19:10:16 +0000 (21:10 +0200)]
wined3d: Send color fills through the command stream

10 years agowined3d: Don't force strict draw ordering for multithreaded CS
Stefan Dösinger [Thu, 4 Jul 2013 19:00:17 +0000 (21:00 +0200)]
wined3d: Don't force strict draw ordering for multithreaded CS

Shouldn't be needed any more

10 years agowined3d: Add cs waiting debug code
Stefan Dösinger [Thu, 4 Jul 2013 18:40:39 +0000 (20:40 +0200)]
wined3d: Add cs waiting debug code

10 years agowined3d: Get rid of WINED3D_BUFFER_FLUSH
Stefan Dösinger [Tue, 7 May 2013 12:53:48 +0000 (14:53 +0200)]
wined3d: Get rid of WINED3D_BUFFER_FLUSH

10 years agowined3d: Send blits through the command stream.
Stefan Dösinger [Mon, 29 Apr 2013 16:49:53 +0000 (18:49 +0200)]
wined3d: Send blits through the command stream.

This needs more work. This patch breaks error handling, and the split
between surface_blt and surface_blt_ugly isn't particularly nice.

10 years agowined3d: Run the cs asynchronously
Stefan Dösinger [Wed, 10 Apr 2013 18:12:27 +0000 (20:12 +0200)]
wined3d: Run the cs asynchronously

10 years agowined3d: Wait for the cs to finish before destroying the device
Stefan Dösinger [Wed, 10 Apr 2013 18:09:55 +0000 (20:09 +0200)]
wined3d: Wait for the cs to finish before destroying the device

10 years agowined3d: Prevent the command stream from running ahead too far
Stefan Dösinger [Wed, 10 Apr 2013 17:10:41 +0000 (19:10 +0200)]
wined3d: Prevent the command stream from running ahead too far

10 years agowined3d: Send light updates through the command stream
Stefan Dösinger [Wed, 10 Apr 2013 15:16:02 +0000 (17:16 +0200)]
wined3d: Send light updates through the command stream

10 years agowined3d: Send int constant updates through the command stream
Stefan Dösinger [Wed, 10 Apr 2013 12:20:47 +0000 (14:20 +0200)]
wined3d: Send int constant updates through the command stream

10 years agowined3d: Send bool constant updates through the command stream
Stefan Dösinger [Tue, 9 Apr 2013 19:50:30 +0000 (21:50 +0200)]
wined3d: Send bool constant updates through the command stream

10 years agowined3d: Send primitive type updates through the command stream
Stefan Dösinger [Sun, 7 Apr 2013 15:53:43 +0000 (17:53 +0200)]
wined3d: Send primitive type updates through the command stream