Commit Graph

92 Commits

Author SHA1 Message Date
Henri Verbeet 5fc53941ef wined3d: Pass a wined3d_buffer structure to buffer_get_memory(). 2010-12-08 11:27:40 +01:00
Henri Verbeet a147fd9c36 wined3d: Fix the indentation in buffer_direct_upload(). 2010-11-23 13:15:39 +01:00
Henri Verbeet fadd192cba wined3d: buffer_get_sysmem() potentially invalidates the current element array buffer binding.
This fixes a regression introduced by commit
2a7a237170.
2010-11-16 13:48:46 +01:00
Henri Verbeet 70f4e66f84 wined3d: IWineD3DBuffer_Unmap() can't fail. 2010-10-15 16:19:54 +02:00
Henri Verbeet 9224751a13 wined3d: Pass a wined3d_state structure to use_vs(). 2010-09-28 17:33:17 +02:00
Henri Verbeet 153d8d43aa wined3d: Move stream state to wined3d_state. 2010-09-21 14:16:58 +02:00
Henri Verbeet e31ea51bab wined3d: Move the vertex declaration to wined3d_state. 2010-09-18 13:05:54 +02:00
Henri Verbeet 6ce848bee4 wined3d: Introduce a structure for stream state. 2010-09-14 11:43:54 -05:00
Henri Verbeet b68d257710 wined3d: Get rid of redundant comparisons against NULL / 0. 2010-09-14 09:43:33 -05:00
Henri Verbeet fd7c1cbf05 wined3d: IWineD3DBuffer_GetDesc() should never fail. 2010-09-14 09:43:22 -05:00
Henri Verbeet bc2db78c3a wined3d: Explicitly document some more consequences of GL locking policy.
The basic rule is that you can't call anything that takes the user32 / gdi32
lock while under the GL (winex11) lock. As a consequence, you can't call
anything like context_acquire() or context_destroy() either.
2010-09-03 11:05:10 +02:00
Henri Verbeet 6c4c351791 wined3d: Don't require wined3d object parents to be COM objects. 2010-09-01 14:01:02 +02:00
Henri Verbeet 3a7f08a56f wined3d: Rename wined3d_format_desc to wined3d_format. 2010-08-31 14:23:47 +02:00
Henri Verbeet b233e7b301 wined3d: Rename the "format" field in wined3d_format_desc to "id". 2010-08-26 12:41:44 +02:00
Henri Verbeet cc5271d1b7 wined3d: Rename WINED3DFORMAT to wined3d_format_id. 2010-08-24 12:25:01 +02:00
Henri Verbeet 5f2fcfdd6b wined3d: Reattach FBO attachments when any of the corresponding surfaces is unloaded. 2010-08-16 13:47:08 +02:00
Henri Verbeet 64e2525ba0 wined3d: Release the context on an error path in buffer_PreLoad(). 2010-06-07 12:22:44 +02:00
Henri Verbeet e8ac9bbd7f wined3d: Get rid of GLINFO_LOCATION. 2010-05-25 13:29:00 +02:00
Henri Verbeet 5dff410254 wined3d: Explicitly pass GL info to buffer_get_sysmem(). 2010-05-21 14:37:52 +02:00
Henri Verbeet e647309402 wined3d: Explicitly pass GL info to buffer_create_buffer_object(). 2010-05-21 14:37:52 +02:00
Henri Verbeet e536f99871 wined3d: Set the buffer.c GLINFO_LOCATION to *gl_info. 2010-05-21 14:37:52 +02:00
Stefan Dösinger 481aca47ad wined3d: Don't use GL_ARB_map_buffer_range for now.
There are numerous problems with this extension, and there are no
visible upsides. In the best case dynamic VBOs are just as fast as no
VBO at all.
2010-05-10 13:45:16 +02:00
Henri Verbeet 49e076eabd wined3d: Separate context acquisition and state application. 2010-05-04 13:14:59 +02:00
Henri Verbeet a4fad54134 wined3d: Don't write past the end of the buffer's conversion_map. 2010-04-12 11:33:32 +02:00
Alexandre Julliard 90f4ae6948 wined3d: Remove unused offset parameter in buffer_get_memory. 2010-04-09 15:47:23 +02:00
Henri Verbeet 2533860114 wined3d: Initialization functions don't allocate. 2010-03-30 14:49:31 +02:00
Stefan Dösinger 1181762f99 wined3d: Implement manual buffer fencing. 2010-03-23 12:31:15 +01:00
Stefan Dösinger fd13a6ae23 wined3d: Partially implement unserialized buffers with the apple extension. 2010-03-23 12:30:18 +01:00
Stefan Dösinger 5d94fe2095 wined3d: Add a function for deleting the GL buffer. 2010-03-23 12:29:33 +01:00
Henri Verbeet 3aaa6ee6e7 wined3d: Rename GlPixelFormatDesc to wined3d_format_desc. 2010-03-19 14:31:47 +01:00
Stefan Dösinger b621fac215 wined3d: Merge two if conditions in buffer.c. 2010-03-17 13:36:17 +01:00
Henri Verbeet ec10c1ed8d wined3d: Add missing checkGLcall's to buffer_Map(). 2010-03-17 10:06:09 +01:00
Stefan Dösinger cc6d17ba7c wined3d: Check the alignment of mapped buffer pointers.
Windows returns 32 byte aligned pointers when locking vertex and index
buffers, and some applications(Half Life 2, Alpha Prime, possibly others)
rely on this. Check the alignment and fall back to double buffered
buffers with HeapAlloced and aligned pointers if the alignment doesn't
fit.
2010-03-16 17:03:13 +01:00
Stefan Dösinger 6c53871d30 wined3d: Implement unfenced updates of double buffered buffers. 2010-03-16 17:02:50 +01:00
Stefan Dösinger 1691a6d7d0 wined3d: Use glMapBuffer for 1:1 uploads in PreLoad.
This is needed to take advantage of asynchronous uploads with double buffered buffers
2010-03-16 17:02:43 +01:00
Stefan Dösinger 04752991b1 wined3d: Don't DISCARD or NOOVERWRITE non-dynamic buffers.
Shaiya locks a non-dynamic buffer with the DISCARD flag and expects
the contents to be retained. The SDK says DISCARD requires dynamic
resources, and Windows 7 returns an error in this situation, crashing
Shaiya. This patch sticks to the Windows XP behavior and allows the
lock, but ignores the DISCARD flag to retain the buffer contents.
2010-03-16 17:02:34 +01:00
Stefan Dösinger 24e2308670 wined3d: Don't use GL_MAP_FLUSH_EXPLICIT_BIT without GL_MAP_WRITE_BIT. 2010-02-09 11:33:44 +01:00
Stefan Dösinger 8625f0cdbf wined3d: Don't record dirty areas in a readonly lock. 2010-02-09 11:33:34 +01:00
Stefan Dösinger 224043d6cf wined3d: Implement dynamic buffers with GL_ARB_map_buffer_range. 2010-02-02 14:09:14 +01:00
Stefan Dösinger d499073c10 wined3d: Catch invalid buffer map parameters. 2010-01-29 14:59:02 +01:00
Stefan Dösinger ee720f05d1 wined3d: Put the APPLE_flush_buffer_range code into the right branch. 2010-01-26 12:18:59 +01:00
Henri Verbeet 98568f0ba1 wined3d: Add support for ARB_vertex_array_bgra. 2010-01-26 12:08:27 +01:00
Stefan Dösinger a756caac0c wined3d: Implement subrange flushing with GL_APPLE_flush_buffer_range. 2010-01-04 12:09:34 +01:00
Stefan Dösinger 5296d5b016 wined3d: Prepare for dynamic vertex buffers. 2010-01-04 12:09:28 +01:00
Stefan Dösinger 716520b4b8 wined3d: Track separate dirty ranges in buffers. 2010-01-04 12:08:14 +01:00
Stefan Dösinger 1bd98719e6 wined3d: Set WINED3D_BUFFER_CREATEBO in buffer_init(). 2010-01-04 12:07:50 +01:00
Stefan Dösinger b9976c3d20 wined3d: Revert the GL usage confusion.
This is functionally a revert of
8eeb513b1a. The language of the extension
is slightly confusing to me, but GL_STREAM_*_ARB is more dynamic than
GL_DYNAMIC_*_ARB. So use GL_STREAM usage for D3DUSAGE_DYNAMIC buffers and
GL_DYNAMIC usage for non-dynamic buffers.
2010-01-04 12:07:45 +01:00
Henri Verbeet ea2f7a2739 wined3d: Remove some redundant returns. 2009-12-30 13:31:26 +01:00
Stefan Dösinger 4f594777a2 wined3d: Drop the VBO if too many full buffer conversions occur. 2009-12-29 11:04:03 +01:00
Stefan Dösinger 9750cca9b1 wined3d: Increment the buffer draw count if the buffer was clean. 2009-12-29 11:03:51 +01:00