Commit Graph

545 Commits

Author SHA1 Message Date
Stefan Dösinger 6a19339207 wined3d: Remove needless NULL checks (coverity). 2009-12-03 11:45:15 +01:00
Marcus Meissner 9f8a73ab96 wined3d: Check for NULL before context_release (Coverity). 2009-11-03 21:22:46 +01:00
Henri Verbeet bf10dbe8a6 wined3d: Map D3DFMT_D24S8 to WINED3DFMT_D24_UNORM_S8_UINT.
The internal order of the depth and stencil bits is unspecified since the
format isn't lockable.
2009-10-30 11:28:52 +01:00
Henri Verbeet 111307dfba wined3d: Get rid of the GL_SUPPORT macro. 2009-10-29 13:09:33 +01:00
Henri Verbeet 48e03bc189 wined3d: Introduce a separate structure for various OpenGL implementation limits. 2009-10-29 13:09:27 +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
Henri Verbeet ade350b4d4 wined3d: Compare and copy the actual palette in palette9_changed() (Valgrind). 2009-10-23 12:03:37 +02:00
Henri Verbeet 6be41fd59a wined3d: Get rid of GL_LIMITS. 2009-10-22 10:46:05 +02:00
Henri Verbeet 55047f811a wined3d: Fix some GLINFO_LOCATION abuse. 2009-10-22 10:45:57 +02:00
Henri Verbeet 47c84f4f7f wined3d: Use the DXGI naming convention for all formats. 2009-09-25 15:15:44 +02:00
Stefan Dösinger 4fe014cb54 wined3d: Fix sRGB->RGB copy condition.
The old condition happened to work, because SFLAG_INTEXTURE was not
set(we're loading it), and neither was SFLAG_INDRAWABLE(otherwise
INTEXTURE would be set too). If the fbo INDRAWABLE == INTEXTURE is
replaced by INDRAWABLE == INSRGBTEX this doesn't hold true any longer
because SFLAG_INDRAWABLE is set, but not used because the drawable
readback is never used for fbos.
2009-09-23 13:25:33 +02:00
Stefan Dösinger 33ca3c0207 wined3d: Don't mark SFLAG_INTEXTURE up to date with fbo stretchrect.
FBO stretchrect marks SFLAG_INDRAWABLE up to date, which currently
also marks SFLAG_INTEXTURE up to date. However, this will change when
we enable rendering to the srgb copy, in which case the drawable could
be equal to the srgb copy, not the rgb copy.
2009-09-23 13:25:21 +02:00
Stefan Dösinger 5b5e3bd0d2 wined3d: Track GL texture states in a separate structure. 2009-09-23 13:24:16 +02:00
Henri Verbeet 34dd27e3a8 wined3d: Don't create a depthstencil renderbuffer if ARB_framebuffer_object is supported. 2009-09-23 12:37:06 +02:00
Henri Verbeet ec97383f6f wined3d: Add support for ARB_framebuffer_object. 2009-09-23 12:37:00 +02:00
Henri Verbeet 0a4fa886a7 wined3d: Revert 4ba16b84a9.
Unfortunately surface_can_stretch_rect() doesn't check just for
WINED3DFMT_FLAG_FBO_ATTACHABLE.
2009-09-22 16:16:55 +02:00
Henri Verbeet dbc4dfc495 wined3d: Move "parent_ops" to IWineD3DResourceClass. 2009-09-18 08:55:33 -05:00
Henri Verbeet 4ba16b84a9 wined3d: Get rid of some redundant checks for ORM_FBO.
ORM_FBO is already implied by surface_can_stretch_rect() because
WINED3DFMT_FLAG_FBO_ATTACHABLE can only be set when ORM_FBO is.
2009-09-17 10:09:50 -05:00
Henri Verbeet a5214c306f wined3d: Don't free D3D surfaces until the wined3d surface is destroyed.
This prevents for example a d3d9 depth stencil from being destroyed when it
has no external references but is still in use by the device/stateblock. A
nice side effect is that it simplifies handling of "implicit" surfaces like
the frontbuffer and backbuffers, as well as the forwarding of reference counts
for surfaces that are part of a texture.
2009-09-16 13:04:32 -05:00
Stefan Dösinger e1469961d4 wined3d: Test and fix ddraw and d3d9 GetDC differences.
The MSDN is not totally correct: A8R8G8B8 and A1R5G5B5 also allow GetDC. The
main differences that have to be filtered out in d3d9.dll are GetDC on
A8B8G8R8, X8B8G8R8 and P8.
2009-09-08 13:04:52 +02:00
Henri Verbeet 560d63548d wined3d: Remove trailing spaces. 2009-08-27 11:45:37 +02:00
Stefan Dösinger 52731a80c8 wined3d: Make it clear that glFlush and glFinish are WGL functions. 2009-08-26 14:35:41 +02:00
Rico Schüller d9784c1a2f wined3d: Fix some checkGLcalls. 2009-08-19 14:41:49 +02:00
Henri Verbeet b8078fc747 wined3d: Use WINED3D_UNMAPPED_STAGE in some more places. 2009-08-17 13:57:50 +02:00
Henri Verbeet ecd2dc7603 wined3d: Make RTL_READTEX the default rendertarget locking method.
For most cards this should make more sense than RTL_READDRAW, even if e.g.
surface_upload_data() has some room for improvement.
2009-08-14 13:59:09 +02:00
Roderick Colenbrander 5a00c8053e wined3d: Get rid of two dead render target lock mode options. 2009-08-10 13:10:49 +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 351d6de818 wined3d: Add functions to lookup texture filters. 2009-08-05 11:20:09 +02:00
Stefan Dösinger f3b39d9085 wined3d: Preload the correct texture location. 2009-08-05 11:19:35 +02:00
Henri Verbeet b7812932bc wined3d: Don't respecify compressed textures in surface_upload_data().
Passing NULL to glCompressedTexImage2DARB() doesn't work particularly well
when both client storage and PBOs are enabled. Also, two years is long enough
to give driver developers a chance to fix the bug this was supposed to work
around.
2009-08-03 15:01:55 +02:00
Henri Verbeet da1e5573da wined3d: Rename WineD3DContext to struct wined3d_context. 2009-08-03 15:01:48 +02:00
Henri Verbeet be536ebe2f wined3d: Get rid of activeContext. 2009-07-24 13:10:57 +02:00
Henri Verbeet c8fe24d29e wined3d: Explicitly pass the context to surface_load_ds_location(). 2009-07-24 13:10:47 +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
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 43e6686a78 wined3d: Rename _WineD3D_GL_Info to struct wined3d_gl_info. 2009-07-17 11:22:07 +02:00
Stefan Dösinger 3c2fa6aea4 wined3d: Set the depth blit helper texture address mode to clamp.
On ATI cards we use the driver's GL_ARB_texture_non_power_of_two emulation to
support conditional NP2 textures without having to deal with the denormalized
coordinates. The default GL_TEXTURE_2D address mode is incompatible with
GL_ARB_texture_rectangle however.
2009-07-15 13:17:12 +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 038d939941 wined3d: Remove GetGlDesc() from the public IWineD3DSurface interface. 2009-07-10 12:13:09 +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 532b99078e wined3d: Don't abuse blending to disable color writes in surface_depth_blt(). 2009-07-03 13:05:52 +02:00
Henri Verbeet 7363b6e2e3 wined3d: Document GL context dependencies. 2009-06-26 12:05:07 +02:00
Henri Verbeet 626baad817 wined3d: Make sure we have an active GL context before calling d3dfmt_p8_upload_palette(). 2009-06-26 12:05:00 +02:00
Henri Verbeet 1b306c25e2 wined3d: Make sure we have an active GL context before calling surface_remove_pbo(). 2009-06-26 12:04:57 +02:00
Henri Verbeet db5b126da6 wined3d: Make sure we have an active GL context in IWineD3DSurfaceImpl_UnLoad(). 2009-06-26 12:04:53 +02:00
Stefan Dösinger 20401fa9af wined3d: Invalidate the srgb tex in surface::unload. 2009-06-22 11:25:57 +02:00
Henri Verbeet 51902b89fb wined3d: Remove a redundant ActivateContext() call in IWineD3DSurfaceImpl_UnlockRect().
The various LoadLocation() handlers already take care of activating an
appropriate context.
2009-06-18 15:17:27 +02:00
Henri Verbeet c7b684f345 wined3d: Simplify IWineD3DSurfaceImpl_LockRect() a bit. 2009-06-18 15:17:27 +02:00