Commit Graph

4016 Commits

Author SHA1 Message Date
Henri Verbeet 7c930589bc wined3d: Avoid some common invalid context accesses.
Unfortunately there are plenty of other places left. Perhaps we should
consider creating our own window when the context becomes invalid and making
the context current on that instead.
2010-03-18 10:25:09 +01:00
Henri Verbeet 135f364110 wined3d: Kill VTRACE. 2010-03-18 10:25:02 +01:00
Henri Verbeet f2bcd32bff wined3d: Replace some VTRACEs with proper TRACEs. 2010-03-18 10:24:51 +01:00
Henri Verbeet e5673ddbc3 wined3d: Add a quirk to rebind FBOs when one of their attached textures is updated.
Updating a texture while it is attached to the currently bound FBO is
something GL implementations tend to get wrong. NVIDIA fails at
glTexSubImage2D(), fglrx and Mesa with glTexImage2D(). I'm afraid to try what
happens on OS X. Fortunately we never use glTexImage2D() while a texture is
attached to an FBO, so we only need to care about glTexSubImage2D().
2010-03-18 10:24:41 +01:00
Henri Verbeet bd4fb33a52 wined3d: Unify GLINFO_LOCATION in surface.c. 2010-03-18 10:24:33 +01:00
Henri Verbeet 914c8cb8ea ddraw: Acquire/release the focus window from the correct location. 2010-03-18 10:24:15 +01:00
Henri Verbeet 0838d0ab64 wined3d: Make the focus window also the foreground window. 2010-03-18 10:24:05 +01:00
Stefan Dösinger d790530df3 wined3d: Make resources 16 byte aligned. 2010-03-17 13:36:39 +01:00
Stefan Dösinger b621fac215 wined3d: Merge two if conditions in buffer.c. 2010-03-17 13:36:17 +01:00
Sandijs Ribaks e385748258 wined3d: Add surface conversion function from WINED3DFMT_YUY2 to WINED3DFMT_B8G8R8X8_UNORM. 2010-03-17 10:59:18 +01:00
Henri Verbeet 4e48ae2629 ddraw: Implement IDirectDrawImpl_GetSurfaceFromDC().
This is a pretty naive implementation, should that become a performance
problem it's easy enough to speed up with a search tree of some kind.
2010-03-17 10:06:25 +01:00
Henri Verbeet 7b52c2fbed wined3d: Cleanup IWineD3DDeviceImpl_SetFrontBackBuffers(). 2010-03-17 10:06:21 +01:00
Henri Verbeet e9dbd5bff8 wined3d: Don't change the draw buffer in IWineD3DDeviceImpl_SetFrontBackBuffers().
This should be handled by the context's draw buffer management.
2010-03-17 10:06:18 +01:00
Henri Verbeet 509b038cf5 wined3d: Simplify the IWineD3DDeviceImpl_ClearSurface() surface loading code. 2010-03-17 10:06:15 +01:00
Henri Verbeet 2b86950c3b wined3d: Simplify context_apply_attachment_filter_states() flow a bit. 2010-03-17 10:06:12 +01:00
Henri Verbeet ec10c1ed8d wined3d: Add missing checkGLcall's to buffer_Map(). 2010-03-17 10:06:09 +01:00
Henri Verbeet 570f865bad wined3d: Don't use framebuffer blit for backbuffer formats with fixups in swapchain_blit(). 2010-03-17 10:06:06 +01:00
Henri Verbeet 60e98cc3ad wined3d: Don't use filtering on textures that need complex fixups in swapchain_blit().
For example, interpolating palette indices doesn't have the desired result.
Should we really want filtering for these cases we could implement it inside
the relevant shaders, after the fixup, but I doubt it's worth the effort.
2010-03-17 10:06:03 +01:00
Henri Verbeet c48adfe201 wined3d: Use "gl_filter" in the non-FBO path of swapchain_blit() as well. 2010-03-17 10:05:59 +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
Alexandre Julliard bef5645eb1 makefiles: Remove the no longer needed explicit separators for dependencies. 2010-03-16 13:28:19 +01:00
Ričardas Barkauskas a7aa4a87e2 wined3d: Fix ATI2N pitch and offset calculations. 2010-03-16 13:03:30 +01:00
Henri Verbeet 78166b0b23 wined3d: Implement SetDestWindowOverride() by simply making the context current on a different window. 2010-03-16 11:45:15 +01:00
Henri Verbeet cd9a8b74b9 wined3d: Store the device window in the swapchain.
The swapchain's current window might be changed by SetDestWindowOverride().
2010-03-16 11:45:11 +01:00
Henri Verbeet aa819fe888 wined3d: Simplify a comparison in IWineD3DDeviceImpl_Reset(). 2010-03-16 11:45:06 +01:00
Henri Verbeet d6bbe90b85 wined3d: The swapchain should always have a window handle. 2010-03-16 11:45:01 +01:00
Henri Verbeet 0ae49c35fb wined3d: Use the context's window handle in IWineD3DSurfaceImpl_BltOverride(). 2010-03-16 11:44:55 +01:00
Henri Verbeet 7b0b16fafe wined3d: Use the context's window handle in stretch_rect_fbo(). 2010-03-16 11:44:50 +01:00
Henri Verbeet 18ec2525a4 wined3d: Store the swapchain instead of the surface in the context. 2010-03-16 11:44:44 +01:00
Henri Verbeet b281f23efe wined3d: Add a separate function to set the pixel format in context_create(). 2010-03-16 11:44:38 +01:00
Henri Verbeet 4133a0a4ff wined3d: Use "gl_info" in some more places in context_create(). 2010-03-16 11:44:32 +01:00
Henri Verbeet 4b671f4d54 wined3d: Move device context array functions to device.c. 2010-03-15 15:55:57 +01:00
Henri Verbeet 6ed7906852 wined3d: Don't partially initialize contexts in AddContextToArray().
Just add a context to the device's context array.
2010-03-15 15:55:51 +01:00
Henri Verbeet 8a107bc63a wined3d: Kill pbuffer offscreen rendering support.
Our pbuffer support is broken, nobody cares.
2010-03-15 15:55:38 +01:00
Roderick Colenbrander 604caf0caa wined3d: Remove oversize texture support. 2010-03-15 14:23:15 +01:00
Roderick Colenbrander 74bf524a99 wined3d: Use surface_get_blt_info to compute texture coordinates for surface_blt_to_drawable. 2010-03-15 14:22:57 +01:00
Roderick Colenbrander 360384277b wined3d: Extend surface_get_depth_blt_info with texture coordinate code from surface_blt_to_drawable. 2010-03-15 14:22:44 +01:00
Paul Andrew Panon 482fbe91e2 wined3d: Update to add Mesa ATI card detection code. 2010-03-05 12:46:46 +01:00
Kusanagi Kouichi f4bce098ea wined3d: Fix a failure of card vendor detection. 2010-03-05 12:39:30 +01:00
Stefan Dösinger bd0641d37f wined3d: Add wined3d_event_query_create and destroy.
This also moves the event query faking code back to the external
interface and removes the temporary WINED3D_EVENT_QUERY_UNSUPPORTED
return value since wined3d_event_query_create properly fails if no
event query GL extension is supported.
2010-03-05 12:39:23 +01:00
Stefan Dösinger 6863af3ebb wined3d: Introduce wined3d_event_query_issue. 2010-03-05 12:39:15 +01:00
Stefan Dösinger a0d1a55650 wined3d: Create a wined3d internal event query interface.
The newly created wined3d_event_query_test will be available for
wined3d-internal use, primarily for synchronizing buffer updates when
using GL_APPLE_flush_buffer_range.

The wined3d_event_query interface will contain most of the functionality:
* Selecting the proper GL extension
* Context handling
* Thread handling

The IWineD3DEventQuery COM interface will use the internal interface
and implement event query faking on top of it (to enable games that
require event queries able to run on drivers that don't implement the
GL extension).
2010-03-05 12:39:07 +01:00
Henri Verbeet ba519be60f wined3d: Split TEXT shader comments into separate lines.
Based on a patch by Christian Costa.
2010-03-04 17:29:16 +01:00
Paul Andrew Panon 74a059d21b wined3d: Add Mesa ATI card detection code. 2010-03-03 16:13:23 +01:00
Paul Andrew Panon 85b07b9d38 wined3d: Add a card detection table and refactor wined3d_guess_card. 2010-03-03 16:13:09 +01:00
Paul Andrew Panon 1735b4ee92 wined3d: Adjust the quirks to use the new GL_VENDOR codes. 2010-03-03 16:06:40 +01:00
Paul Andrew Panon 7a9734dc68 wined3d: Add a real GL vendor detection. 2010-03-03 16:06:28 +01:00