Commit Graph

177 Commits

Author SHA1 Message Date
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
Stefan Dösinger 0629585c24 wined3d: Work around an ARBFP vs GLSL bug in Mac OS. 2009-05-27 11:57:54 +02:00
Chris Robinson 12799db349 wined3d: Decrement fbo_entry_count when one is removed from the list. 2009-05-25 11:22:25 +02:00
Henri Verbeet b35e469d9d wined3d: Document functions that depend on the caller to do GL locking. 2009-05-15 10:25:41 +02:00
Henri Verbeet e260132701 wined3d: Add missing GL locking to set_blit_dimension() calls. 2009-05-14 11:12:46 +02:00
Henri Verbeet 1070e075e4 wined3d: Add missing GL locking to calls to FBO functions. 2009-05-14 11:12:38 +02:00
Henri Verbeet b7ac22004f wined3d: Add missing GL locking to shader_backend_t.shader_select() calls. 2009-05-13 12:01:57 +02:00
Henri Verbeet 7f14ea01c6 wined3d: Add missing GL locking to state table calls. 2009-05-13 12:01:52 +02:00
Henri Verbeet 0d446053da wined3d: Don't create more than WINED3D_MAX_FBO_ENTRIES FBO entries.
This essentially turns the FBO entry list into an LRU cache.
2009-05-12 11:18:15 +02:00
Stefan Dösinger 668328a697 wined3d: Work around a bad crash in fglrx. 2009-05-08 12:16:50 +02:00
Henri Verbeet 42e31a4242 wined3d: Fix a few sign compare warnings. 2009-03-25 11:12:30 +01:00
Henri Verbeet dd1f0d9c48 wined3d: Pass format_desc to getColorBits() and getDepthStencilBits(). 2009-03-24 12:57:38 +01:00
Henri Verbeet 1f4e7b27ed wined3d: Set the currently active context to NULL when it's destroyed.
This should make us crash when trying to use the "currently active" context
after it has been destroyed, rather than messing around with freed memory.
2009-03-23 14:08:02 +01:00
Henri Verbeet 2dc7fc2916 wined3d: Remove the format field from IWineD3DResourceClass. 2009-03-13 11:29:19 +01:00
Henri Verbeet a56e3a102b wined3d: Only return a pointer to struct GlPixelFormatDesc from getFormatDescEntry(). 2009-03-13 11:29:10 +01:00
Henri Verbeet 4e2c87dd22 wined3d: Handle error conditions better in RemoveContextFromArray(). 2009-03-09 14:44:02 +01:00
Stefan Dösinger 4386a827e9 wined3d: Pass the requested srgb flag to PreLoad.
Add a new wined3d-internal PreLoad function to textures and surfaces
that takes a parameter specifying wether the rgb or srgb texture
should be loaded.
2009-02-17 12:51:36 +01:00
Stefan Dösinger 365e1f3b07 wined3d: Avoid hooking non-fog glEnable/glDisable calls.
This prevents fallout from the GL_EXT_fog_coord emulation. glEnable
and glDisable calls other than those that change GL_FOG are not
hooked. The glEnableWINE and glDisableWINE functions can be used to
add other hooks too if ever needed.
2009-01-12 13:03:47 +01:00