Henri Verbeet
9a8491045e
wined3d: Get rid of the WINED3DMULTISAMPLE_TYPE typedef.
2012-01-09 12:22:17 +01:00
Henri Verbeet
117af3a2b1
wined3d: Make the buffer parameter to buffer_sanitize_flags() const.
2011-11-02 12:27:55 +01:00
Henri Verbeet
da64996159
wined3d: Make the buffer parameter to buffer_is_fully_dirty() const.
2011-10-31 23:53:04 +01:00
Henri Verbeet
b9b2288796
wined3d: Make the buffer parameter to buffer_is_dirty() const.
2011-10-31 23:53:02 +01:00
Stefan Dösinger
5d1d07abcf
wined3d: Call glFlush after updating a buffer.
2011-08-24 11:52:06 +02:00
Henri Verbeet
b06e32184b
wined3d: Only invalidate state for the current context in wined3d_buffer_unmap().
2011-07-29 12:09:17 +02:00
Henri Verbeet
487cc9729b
wined3d: Only invalidate state for the current context in wined3d_buffer_map().
2011-07-28 11:29:27 +02:00
Henri Verbeet
7ee4bda63e
wined3d: Add stream offsets in device_stream_info_from_declaration().
...
They're not going to change until the next time the stream info is updated.
This would of course mainly be useful if we managed to do more than one or two
draws with the same stream info.
2011-07-15 10:08:02 +02:00
Henri Verbeet
cf421e1b3f
wined3d: Don't set GL_MAP_UNSYNCHRONIZED_BIT for WINED3D_BUFFER_DISCARD maps.
...
WINED3D_BUFFER_DISCARD means the (current) buffer contents are undefined for
subsequent operations. I.e., the map doesn't have to wait for any pending
operations to finish, and can just return a new buffer with undefined
contents. GL_MAP_UNSYNCHRONIZED_BIT means the driver doesn't wait for previous
operations to finish, and just maps a buffer that's potentially in use. Proper
synchronization is left to the application. Note that we set both
GL_MAP_INVALIDATE_BUFFER_BIT and GL_MAP_UNSYNCHRONIZED_BIT.
GL_MAP_INVALIDATE_BUFFER_BIT corresponds to WINED3D_BUFFER_DISCARD, and might
cause the driver to return a new buffer, but it's not required to make that
optimization.
2011-07-15 10:07:41 +02:00
Henri Verbeet
c5d457c8b4
wined3d: Store a struct wined3d_bo_address in struct wined3d_stream_info_element.
...
Instead of using separate fields for the buffer object and offset.
2011-07-11 11:53:42 +02:00
Henri Verbeet
89bf30a25e
wined3d: Return data as struct wined3d_bo_address in buffer_get_memory().
2011-07-11 11:53:39 +02:00
Henri Verbeet
b1664a2c85
wined3d: Get rid of some IWineD3D* references.
2011-07-04 13:44:41 +02:00
Henri Verbeet
c3c131ab34
wined3d: Only invalidate STATE_STREAMSRC for bound buffers.
2011-06-23 09:47:35 +02:00
Henri Verbeet
14bc0e9ef2
wined3d: Invalidate STATE_STREAMSRC when dropping VBOs.
2011-06-22 11:25:34 +02:00
Stefan Dösinger
68b15bc5ff
wined3d: Give GL_ARB_map_buffer_range another try.
...
Nvidia's 270.xx.yy driver series fix the glMapBuffer alignment issues that caused major
performance problems. If the user is using an older driver we now drop the VBO instead of using
doublebuffered loading, which means that we fall back to the current behavior(no dynamic VBO) as
needed. Dynamic VBOs are needed on Nvidia drivers for GL_ARB_instanced_arrays.
2011-06-17 15:37:45 +02:00
Stefan Dösinger
12140b5158
wined3d: Drop the VBO when the GL alignment doesn't fit on dynamic buffers.
2011-06-17 15:37:41 +02:00
Henri Verbeet
37d70103a1
d3d8: Implement IDirect3DIndexBuffer8 private data handling on top of wined3d_resource.
2011-06-17 11:02:43 +02:00
Henri Verbeet
469eba24c0
d3d9: Implement IDirect3DVertexBuffer9 private data handling on top of wined3d_resource.
2011-06-17 11:02:28 +02:00
Henri Verbeet
c8f26a1345
wined3d: Rename IWineD3DDeviceImpl_MarkStateDirty() to device_invalidate_state().
2011-06-06 16:18:41 +02:00
Henri Verbeet
0e0e5c3e38
wined3d: Get rid of the IWineD3DDevice typedefs.
2011-05-17 10:06:23 +02:00
Henri Verbeet
00a5f38595
wined3d: Remove object creation methods from the IWineD3DDevice interface.
2011-05-11 14:56:48 +02:00
Henri Verbeet
efc080e3a3
wined3d: Get rid of wined3d_buffer_get_type().
2011-04-22 10:44:20 +02:00
Stefan Dösinger
c79864f871
wined3d: Only acquire a context in buffer::PreLoad if we have to.
2011-04-13 16:03:27 +02:00
Stefan Dösinger
5627ee49ea
wined3d: Remove FLOAT16 vertex attribute conversion support.
...
All mayor drivers support GL_ARB_half_float_vertex now and the half
float conversion doesn't work well in practise. The only game that was
ever playable with it was Eve online.
2011-04-12 17:42:12 +02:00
Stefan Dösinger
46d879eef6
wined3d: Don't drop VBOs for full buffer reloading without conversion.
2011-04-12 17:42:12 +02:00
Henri Verbeet
adb1e10979
wined3d: Get rid of wined3d_buffer_get_desc().
2011-03-11 11:40:47 +01:00
Henri Verbeet
4be256a47c
wined3d: Introduce wined3d_resource_get_desc() to retrieve the resource desc.
2011-03-10 12:52:58 +01:00
Henri Verbeet
ac9c592ca9
wined3d: Store all the resource desc information in struct wined3d_resource.
2011-03-09 12:29:17 +01:00
Henri Verbeet
756fdb7c5a
wined3d: Merge the various resource desc structures.
2011-03-09 12:28:58 +01:00
Henri Verbeet
bea8d0a713
wined3d: Get rid of the IWineD3DBuffer typedef.
2011-03-04 16:25:58 +01:00
Henri Verbeet
a27ee75ed2
wined3d: Remove COM from the buffer implementation.
2011-03-04 16:25:58 +01:00
Henri Verbeet
1de6adfbae
wined3d: Make IWineD3DResourceImpl an independent structure.
2011-03-01 13:21:59 +01:00
Henri Verbeet
39497ff4d1
wined3d: Remove IWineD3DResource::UnLoad() from the public interface.
2011-02-28 11:09:48 +01:00
Henri Verbeet
c117248bd1
wined3d: Pass an IWineD3DResourceImpl pointer to resource_get_type().
2011-01-07 10:23:37 +01:00
Henri Verbeet
7e67bcedfd
wined3d: Pass an IWineD3DResourceImpl pointer to resource_set_priority().
2011-01-07 10:23:25 +01:00
Henri Verbeet
2d9748b1e3
wined3d: Pass an IWineD3DResourceImpl pointer to resource_get_priority().
2011-01-07 10:23:21 +01:00
Henri Verbeet
a80749fd57
wined3d: Pass an IWineD3DResourceImpl pointer to resource_set_private_data().
2011-01-07 10:23:17 +01:00
Henri Verbeet
92e439b0f0
wined3d: Pass an IWineD3DResourceImpl pointer to resource_get_private_data().
2011-01-06 11:33:33 +01:00
Henri Verbeet
a97ae0db6a
wined3d: Pass an IWineD3DResourceImpl pointer to resource_free_private_data().
2011-01-06 11:33:29 +01:00
Henri Verbeet
134137cdb4
wined3d: Pass an IWineD3DResourceImpl pointer to resource_cleanup().
2011-01-06 11:33:24 +01:00
Henri Verbeet
7080922e0e
wined3d: Pass an IWineD3DResourceImpl pointer to resource_init().
2011-01-06 11:33:19 +01:00
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
Stefan Dösinger
f90b8b6352
wined3d: Rename conversion_count to something more appropriate.
2009-12-29 11:03:44 +01:00
Stefan Dösinger
1d37ae6f61
wined3d: Use unload instead of duplicating buffer remove code.
2009-12-29 11:03:24 +01:00
Stefan Dösinger
4590dc4806
wined3d: Free buffer conversion info when freeing the buffer.
2009-12-29 11:03:10 +01:00
Stefan Dösinger
8eeb513b1a
wined3d: Fix VBO buffer usage.
2009-12-16 13:04:19 +01:00
Henri Verbeet
b3defd4c80
wined3d: Rename "wineD3DDevice" to "device".
2009-12-10 11:54:47 +01:00
Henri Verbeet
b6ef17f23d
wined3d: Remove unused GetDevice() implementations.
2009-12-09 13:51:04 +01:00
Stefan Dösinger
d4275e87f1
wined3d: Add a usage flag for static buffer declarations.
2009-11-03 21:21:55 +01:00
Henri Verbeet
111307dfba
wined3d: Get rid of the GL_SUPPORT macro.
2009-10-29 13:09:33 +01:00
Henri Verbeet
eeb54b9922
wined3d: Keep better track of where we're using wined3d contexts.
...
The idea here is that we can restore the thread's current GL context on
context_release() if it doesn't correspond to the current wined3d context on
context_acquire().
2009-10-28 11:15:19 +01:00