Commit Graph

166 Commits

Author SHA1 Message Date
Henri Verbeet d1e44ff775 wined3d: Pass a resource to wined3d_resource_free_sysmem(). 2013-09-16 12:51:13 +02:00
Henri Verbeet 261246ef21 wined3d: Pass a resource to wined3d_resource_allocate_sysmem(). 2013-09-16 12:51:13 +02:00
Stefan Dösinger b8eb171b6b wined3d: Explicitly pass the state information to buffer_internal_preload. 2013-09-12 17:48:20 +02:00
Stefan Dösinger d8c43aabf7 wined3d: Move the decoded stream info into the context. 2013-09-12 17:48:14 +02:00
Stefan Dösinger a0b56d9c59 wined3d: Pass stream info and needed fixups to buffer_find_decl. 2013-09-12 17:48:11 +02:00
Stefan Dösinger cd203b38a6 wined3d: Pass the context to the main buffer preload function. 2013-09-09 22:10:01 +02:00
Stefan Dösinger 87f931dc64 wined3d: Only invalidate STATE_INDEXBUFFER for the current context in buffer_get_sysmem(). 2013-09-09 22:10:00 +02:00
Stefan Dösinger 1cf192172e wined3d: Only invalidate STATE_INDEXBUFFER for the current context in buffer_create_buffer_object(). 2013-09-09 22:10:00 +02:00
Henri Verbeet b5e0c5d052 wined3d: Get rid of some leftover comments referring to the GL lock. 2013-09-02 18:02:26 +02:00
Henri Verbeet 35a8bf0e1e wined3d: Move the buffer flags to buffer.c. 2013-08-30 11:18:43 +02:00
Henri Verbeet b85c2a74bb wined3d: Replace the "stateBlock" wined3d_device field with a wined3d_state structure. 2013-08-27 11:50:53 +02:00
Stefan Dösinger bd866c0294 wined3d: Implement NOOVERWRITE and DISCARD volume maps. 2013-08-26 19:01:53 +02:00
Stefan Dösinger 4dd4a6913b wined3d: Add a function for allocating aligned resource memory. 2013-08-21 19:53:20 +02:00
Henri Verbeet cbaa17d3cf wined3d: Assume the buffer has a buffer object in buffer_add_dirty_area(). 2013-08-15 16:24:09 +02:00
Henri Verbeet 4eb39ec5f4 wined3d: Make buffer_add_dirty_area() never fail. 2013-08-15 16:24:07 +02:00
Henri Verbeet 5e64fd7049 wined3d: Don't bother downloading buffer contents on destruction. 2013-08-15 16:24:04 +02:00
Henri Verbeet ffc9f535eb wined3d: Handle pre-transformed vertices in the GLSL vertex pipe.
This also avoids a fallback to drawStridedSlow().
2013-06-14 11:46:31 +02:00
Henri Verbeet c756496326 wined3d: Rename the device "strided_streams" field to "stream_info".
The "strided" in there is mostly historic, it hasn't really been accurate for
a while now.
2013-04-22 15:26:11 +02:00
Henri Verbeet 00cc81dc69 wined3d: Simplify DISCARD / READONLY handling in wined3d_buffer_map() a bit. 2013-04-16 12:13:59 +02:00
Henri Verbeet 12a05be5b6 wined3d: Use GL_STATIC_DRAW_ARB for static buffers.
This mostly affects the initial placement of the VBO. If an application really
does use a static buffer as if it was a dynamic one the driver is likely to
migrate it out of VRAM anyway, we shouldn't penalize more well-behaved
applications for that.
2013-04-15 15:16:11 +02:00
Michael Stefaniuc 50a9fb579c wined3d: Remove ERR() on HeapAlloc failure for small sizes known at compile time. 2013-02-06 09:04:41 +01:00
Stefan Dösinger 151407e5bf wined3d: Shadow buffers in sysmem when software vertexprocessing is used. 2013-01-15 16:24:50 +01:00
Henri Verbeet 78984cf46c wined3d: Get rid of ENTER_GL / LEAVE_GL. 2012-12-11 12:03:39 +01:00
Henri Verbeet 894d161891 wined3d: Call core GL functions through gl_info.gl_ops as well. 2012-07-25 20:10:08 +02:00
Alexandre Julliard d7250e97ed wined3d: Fetch GL functions from the WGL driver table, including glFinish and glFlush. 2012-07-20 13:21:27 +02:00
Henri Verbeet a6ffab3bf5 wined3d: Rename WINED3DLOCK_* to WINED3D_MAP_*. 2012-06-18 17:48:56 +02:00
Henri Verbeet 0610d1eec9 wined3d: Invalidate the entire buffer on maps with WINED3DLOCK_DISCARD. 2012-06-12 17:27:43 +02:00
Henri Verbeet 69bdff6253 wined3d: Avoid moving buffers while they're mapped. 2012-05-22 18:06:51 +02:00
Henri Verbeet f2fb3f11f9 wined3d: Move the resource map count field up to wined3d_resource. 2012-05-21 21:30:52 +02:00
Henri Verbeet a331ed032e wined3d: Properly check for transformed position in buffer_check_attribute(). 2012-05-03 23:45:21 +02:00
Henri Verbeet de43de510a wined3d: Move the resource bind_count field up to wined3d_resource. 2012-04-26 19:26:14 +02:00
Henri Verbeet e53a277305 wined3d: Get rid of the WINED3DPOOL typedef. 2012-01-18 12:37:38 +01:00
Henri Verbeet 6a5a098b23 wined3d: Get rid of the WINED3DRESOURCETYPE typedef. 2012-01-18 12:37:38 +01:00
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