Commit Graph

194 Commits

Author SHA1 Message Date
Henri Verbeet 4ec2b09d8f wined3d: Don't check for a "representative" in the MarkStateDirty() functions.
States without representative should never be called. Arguably they shouldn't
exist in the first place, but allowing them simplifies the state table.
2009-08-21 11:10:21 +02:00
Henri Verbeet a36e30b541 wined3d: Mark the correct state dirty. 2009-08-21 11:10:07 +02:00
Jörg Höhle 7763da811b wined3d: Check GL_SUPPORT prior to an ARB occlusion call. 2009-08-17 19:36:41 +02:00
Henri Verbeet b8078fc747 wined3d: Use WINED3D_UNMAPPED_STAGE in some more places. 2009-08-17 13:57:50 +02:00
Henri Verbeet 3b06fc92f4 wined3d: Use EXT_provoking_vertex to match Direct3D's provoking vertex convention. 2009-08-10 13:52:50 +02:00
Stefan Dösinger 4f9f8fef0b wined3d: Dirtify the correct state. 2009-08-07 14:57:09 +02:00
Henri Verbeet 41729ca919 wined3d: Check the return value of wglDeleteContext() in context_destroy_gl_resources(). 2009-08-07 12:11:27 +02:00
Henri Verbeet 7ed116da2e wined3d: Merge the context->current_rt check for rendertarget readback with the code above.
Also update the comments.
2009-08-07 12:11:17 +02:00
Henri Verbeet 3bf0ad4528 wined3d: Explicitly pass the context to the shader_select() handler. 2009-08-07 12:11:06 +02:00
Henri Verbeet a7251f0f4e wined3d: Track render_offscreen in the context.
This makes sure the relevant states in FindContext() are actually marked dirty
when needed.
2009-08-06 17:26:30 +02:00
Henri Verbeet da1e5573da wined3d: Rename WineD3DContext to struct wined3d_context. 2009-08-03 15:01:48 +02:00
Henri Verbeet 0047c55e86 wined3d: Handle destruction of a context's current render target. 2009-08-03 15:01:18 +02:00
Henri Verbeet 9baf7864c5 wined3d: Return proper NULLs from CreateContext(). 2009-07-24 13:11:01 +02:00
Henri Verbeet be536ebe2f wined3d: Get rid of activeContext. 2009-07-24 13:10:57 +02:00
Henri Verbeet fb77678e9f wined3d: Manage event queries in the context. 2009-07-24 13:10:28 +02:00
Henri Verbeet 4ab7af6575 wined3d: Manage occlusion queries in the context. 2009-07-24 13:10:19 +02:00
Henri Verbeet ea2caa9ba1 wined3d: Return the activated context from ActivateContext(). 2009-07-23 11:22:22 +02:00
Henri Verbeet 85e2c05e4f wined3d: Explicitly pass the wined3d context to context_apply_draw_buffer(). 2009-07-23 11:22:18 +02:00
Henri Verbeet 9253bbcb05 wined3d: Get rid of last_device. 2009-07-23 11:22:13 +02:00
Henri Verbeet 401e99b0c0 wined3d: Remove some unnecessary code.
Now that we don't depend on activeContext and lastActiveRenderTarget to be
non-NULL this code can go.
2009-07-23 11:22:08 +02:00
Henri Verbeet 57ccdb7e36 wined3d: Don't reuse contexts marked for destruction. 2009-07-23 11:22:03 +02:00
Henri Verbeet e5d621c081 wined3d: Try to reuse the thread's current context in FindContext(). 2009-07-22 14:42:51 +02:00
Henri Verbeet 9ceda3a6fd wined3d: Move some context selection code from ActivateContext() to FindContext(). 2009-07-22 14:42:51 +02:00
Henri Verbeet 219d3abdd1 wined3d: Simplify FindContext() a bit. 2009-07-22 14:42:51 +02:00
Henri Verbeet ce436a76e2 wined3d: Get rid of getActiveContext(). 2009-07-22 14:42:50 +02:00
Henri Verbeet 377cda97e7 wined3d: Avoid destroying contexts that are current in another thread. 2009-07-22 14:42:50 +02:00
Henri Verbeet 1a43030664 wined3d: Keep track of a thread's wined3d context. 2009-07-22 14:42:50 +02:00
Henri Verbeet c114b04016 wined3d: Remove the useless lastThread field from IWineD3DDeviceImpl. 2009-07-21 14:23:06 +02:00
Henri Verbeet 2d7500600b wined3d: Get rid of lastActiveRenderTarget. 2009-07-21 14:23:02 +02:00
Henri Verbeet 223b9d5c01 wined3d: Get rid of lastActiveRenderTarget in FindContext(). 2009-07-21 14:22:58 +02:00
Henri Verbeet 6c0c1671b2 wined3d: Keep track of a context's current render target. 2009-07-21 14:22:49 +02:00
Henri Verbeet ee4d18cc83 wined3d: Pass NULL to ActivateContext() when we don't need a specific target.
Once we keep track of the wined3d context for each thread,
lastActiveRenderTarget won't do what we want here.
2009-07-21 14:22:44 +02:00
Stefan Dösinger e06997359f wined3d: Set the highest dirty marker after marking shader constants dirty. 2009-07-20 12:23:14 +02:00
Henri Verbeet a80247f58b wined3d: Avoid redundant FBO binds.
Apparently this is an expensive operation for certain drivers, even if the
binding doesn't actually change.
2009-07-17 11:22:07 +02:00
Henri Verbeet 710f6f8456 wined3d: Always use context_bind_fbo() to change the framebuffer binding. 2009-07-17 11:22:07 +02:00
Henri Verbeet 7485173849 wined3d: Pass the context instead of the device to the various context functions. 2009-07-17 11:22:07 +02:00
Henri Verbeet a01616a6c3 wined3d: Store a pointer to wined3d_gl_info in struct WineD3DContext. 2009-07-17 11:22:07 +02:00
Henri Verbeet ae8e8ac73f wined3d: Check the return values for some wgl calls. 2009-07-15 13:24:24 +02:00
Henri Verbeet 476c83522b wined3d: Remove the remains of an ATI_fragment_shader hack.
This was originally added as a workaround for a Mesa bug by commit
ddf52dda15. The other half of the hack has since
been removed. This code causes problems when wglDeleteContext() from a
different thread causes our current context to be destroyed, since
wglGetCurrentContext() will return a destroyed context in that case. That is a
flaw in our wgl implementation, since wglDeleteContext() shouldn't allow a
context that's current in a different thread to be destroyed, but this hack is
a bad idea regardless.
2009-07-15 13:24:19 +02:00
Henri Verbeet 69b7612265 wined3d: Get rid of struct glDescriptor.
In general it might not be a bad idea to group GL specific data into a
separate struct, but IWineD3DSurfaceImpl is currently the only thing that
bothers. It doesn't get it quite right either, since e.g. the PBO isn't in
glDescriptor either.
2009-07-10 12:13:24 +02:00
Henri Verbeet 32fd8f2130 wined3d: checkGLcall() doesn't need a \n. 2009-07-07 11:50:22 +02:00
Henri Verbeet 2ac34bf231 wined3d: Add some missing float suffixes.
The compiler should be smart enough to fix most of these, but it looks sloppy.
2009-07-07 11:50:05 +02:00
Henri Verbeet 50e9ad66e2 wined3d: Clear the last device in WineD3D_CreateFakeGLContext(). 2009-07-02 12:00:44 +02:00
Henri Verbeet f57967c983 wined3d: Always check the result of wglMakeCurrent(). 2009-06-29 12:30:28 +02:00
Henri Verbeet 40565211fb wined3d: Prevent GL calls from DestroyContext() if we failed to make the GL context current.
This can happen if the window is destroyed before the device is released.
2009-06-29 12:30:24 +02:00
Henri Verbeet 7363b6e2e3 wined3d: Document GL context dependencies. 2009-06-26 12:05:07 +02:00
Henri Verbeet 5dcbc40581 wined3d: Make sure we have an active GL context in context_resource_released(). 2009-06-25 11:47:28 +02:00
Henri Verbeet 94cd8656ea wined3d: Make context_resource_released() responsible for activating a different GL context.
In case lastActiveRenderTarget is destroyed.
2009-06-25 11:47:24 +02:00
Henri Verbeet 7422babd88 wined3d: Set FBO stencil attachments for relevant depth stencil formats. 2009-06-08 12:44:27 +02:00
Henri Verbeet a2244051ef wined3d: Use context_attach_depth_stencil_fbo() to clear FBO depth attachments. 2009-06-08 12:44:22 +02:00