Commit Graph

521 Commits

Author SHA1 Message Date
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
Stefan Doesinger 7d5285acc1 wined3d: Properly free srgb textures. 2009-06-18 15:17:26 +02:00
Michael Abbott 2e119a2718 wined3d: Remove division from inner loop. 2009-06-18 15:17:26 +02:00
Henri Verbeet dad6c311ec wined3d: Fix a typo. 2009-06-17 12:13:07 +02:00
Henri Verbeet 23231d5a62 wined3d: Add format conversions for some depth stencil formats.
Although these formats aren't lockable, we still explicitly set the initial
surface data when creating the texture. Unfortunately that means we'll need
the conversion functions, even though all they'll ever convert will be zeroes.
2009-06-16 13:37:06 +02:00
Henri Verbeet fede35d1c5 wined3d: Introduce surface_calculate_size(). 2009-06-15 13:42:28 +02:00
Henri Verbeet 5f581975dc wined3d: Introduce surface_init() to handle most of the surface initialization. 2009-06-15 13:42:28 +02:00
Henri Verbeet 32613eb628 wined3d: Introduce surface_cleanup(). 2009-06-15 13:42:28 +02:00
Henri Verbeet 669891c817 wined3d: Respect the "srgb" parameter to IWineD3DSurfaceImpl_BindTexture().
This is mostly for consistency, standalone surfaces can't be used for
texturing, so in practice "srgb" should always be FALSE in this path.
2009-06-12 17:33:15 +02:00
Henri Verbeet 8f67918f1d wined3d: Use WINED3DFMT_FLAG_COMPRESSED instead of checking for specific formats. 2009-06-12 17:33:15 +02:00
Henri Verbeet b052c6e8aa wined3d: Remove some redundant s3tc extension checks.
If the extension isn't available to surface shouldn't have been created. We
don't do extension checks for all the other formats either.
2009-06-11 11:53:54 +02:00
Henri Verbeet a25e63c62d wined3d: Check the correct extensions in d3dfmt_get_conv().
According to Stefan these are either typos or leftovers from using GL_HILO8_NV.
2009-06-10 11:50:44 +02:00
Henri Verbeet 5ac8a7b054 wined3d: Set explicitly sized internal formats for color key conversion in d3dfmt_get_conv(). 2009-06-10 11:50:31 +02:00
Henri Verbeet 910455e435 wined3d: Add some FIXMEs about blitting with unsupported fixups. 2009-06-09 17:01:14 +02:00
Henri Verbeet 08d95233e3 wined3d: Don't modify the internal format in d3dfmt_get_conv().
For most conversions the internal format is irrelevant. Color key conversions
are an exception, because they need to ensure an alpha channel is present.
2009-06-09 17:01:14 +02:00
Henri Verbeet fb7531599f wined3d: Only use stretch_rect_fbo() on surfaces that are FBO attachable. 2009-06-05 15:19:35 +02:00
Henri Verbeet 85107d81f4 wined3d: Remove some unnecessary forward declarations. 2009-05-25 11:23:32 +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 177d883d95 wined3d: Add missing GL locking to ffp_blit_set() and ffp_blit_unset(). 2009-05-15 10:25:27 +02:00
Henri Verbeet 5bc449553b wined3d: Add missing GL locking to d3dfmt_p8_upload_palette(). 2009-05-15 10:25:22 +02:00
Francois Gouget 514c5f2648 wined3d: Make surface_force_reload() static. 2009-05-13 12:45:36 +02:00
Stefan Dösinger 8513f64a01 wined3d: Emulate R16G16F and R32G32F if GL_ARB_texture_rg is not supported.
Nvidia doesn't offer it on geforce 7 and earlier cards, but some games need
it. This is surprising because the extension was made specifically for
compatibility purposes for older cards.
2009-04-28 13:10:03 +02:00
Henri Verbeet 4469fbd43d wined3d: Don't use rtInternal for surfaces that are on a swapchain.
These surfaces won't be attached to an FBO anyway, so avoid the cost of a
potential format conversion when blitting from a non-RT surface. This is
mostly an issue for ddraw applications with 16 bit render targets.
2009-03-25 11:12:49 +01:00
Henri Verbeet 899df56ebe wined3d: Add a more convenient way to check if a surface is on a swapchain.
This won't help if we actually need the swapchain, of course.
2009-03-25 11:12:40 +01:00
Henri Verbeet afc5744e70 wined3d: Pass format_desc to set_shader().
This should be the last unnecessary getFormatDescEntry() call.
2009-03-24 12:57:45 +01:00