Commit Graph

102 Commits

Author SHA1 Message Date
Henri Verbeet b3defd4c80 wined3d: Rename "wineD3DDevice" to "device". 2009-12-10 11:54:47 +01:00
Henri Verbeet 111307dfba wined3d: Get rid of the GL_SUPPORT macro. 2009-10-29 13:09:33 +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 342a71b281 wined3d: Replace the "stateLookup" tables with a single "wrap_lookup" table. 2009-10-23 12:03:15 +02:00
Stefan Dösinger ba6fac697a wined3d: Create a separate function for deleting GL textures. 2009-09-23 13:25:02 +02:00
Stefan Dösinger 529e6737d3 wined3d: Use the correct enum. 2009-09-23 13:24:25 +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 dbc4dfc495 wined3d: Move "parent_ops" to IWineD3DResourceClass. 2009-09-18 08:55:33 -05:00
Stefan Dösinger 9281bdb478 wined3d: SetLOD is ignored on D3DPOOL_DEFAULT textures.
I am not testing SYSTEMMEM and SCRATCH textures. SCRATCH textures
cannot be created, SYSTEMMEM ones cannot be used for texturing on
Windows.
2009-08-31 12:18:56 +02:00
Stefan Dösinger edf1c50b54 wined3d: Handle per-texture max LOD level.
GL_TEXTURE_BASE_LEVEL matches the basetexture::SetLOD functionality.
D3DSAMP_MAXMIPLEVEL essentially does the same as SetLOD. The test included in
this patch shows that the smallest mipmap level is used.
2009-08-31 12:18:41 +02:00
Stefan Dösinger eafc00e173 wined3d: Add a comment about D3DSAMP_MAXMIPLEVEL. 2009-08-31 12:18:10 +02:00
Henri Verbeet 7165bd19c1 wined3d: WINED3DTEXF_NONE only makes sense as a mip filter. 2009-08-05 11:20:43 +02:00
Henri Verbeet 9e8f7898c9 wined3d: Get rid of the ANISOTROPIC entry from the filter lookup tables.
Anisotropy and texture filters are orthogonal in GL. In D3D
D3DTEXF_ANISOTROPIC just selects the best (linear) filter type and enables
anisotropy.
2009-08-05 11:20:36 +02:00
Henri Verbeet 62ac872b36 wined3d: Remove a redundant check from basetexture_get_autogen_filter_type().
This is already initialized to an appropriate value in basetexture_init().
Also fix the indentation while we're at it.
2009-08-05 11:20:24 +02:00
Henri Verbeet a86f31658b wined3d: Move texture filter lookup table initialization to basetexture_init(). 2009-08-05 11:20:19 +02:00
Henri Verbeet 351d6de818 wined3d: Add functions to lookup texture filters. 2009-08-05 11:20:09 +02:00
Henri Verbeet efb78aca64 wined3d: Update the WINED3DSAMP_MAGFILTER state even if we didn't recognize the value.
It's a bit pointless to keep printing FIXMEs after the first time.
2009-08-04 13:03:44 +02:00
Henri Verbeet 10906e6b8e wined3d: Set the initial value of WINED3DTEXSTA_MAXANISOTROPY to 1. 2009-08-04 13:03:40 +02:00
Henri Verbeet 2f3e993e7e wined3d: Properly calculate GL_TEXTURE_MAX_ANISOTROPY_EXT. 2009-08-04 13:03:34 +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 7363b6e2e3 wined3d: Document GL context dependencies. 2009-06-26 12:05:07 +02:00
Stefan Doesinger 7d5285acc1 wined3d: Properly free srgb textures. 2009-06-18 15:17:26 +02:00
Henri Verbeet 451a416fcf wined3d: Call resource_init() from basetexture_init(). 2009-06-02 11:57:22 +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 91c3a5eac1 wined3d: Directly call basetexture_apply_state_changes().
All the implementations of IWineD3DBaseTexture::ApplyStateChanges() forward to
basetexture_apply_state_changes().
2009-05-13 11:55:01 +02:00
Tobias Jakobi 31f8cd9621 wined3d: Add pow2Matrix_identity flag to BaseTextureClass struct.
New flag helps to quickly find out whether the pow2Matrix is a
identity matrix (no texcoord fixup needed) or not.
2009-03-31 12:39:27 +02:00
Stefan Dösinger c585b4de99 wined3d: Duplicate GL textures for srgb switching.
This reduces the number of srgb switching reloads quite a lot. The only
situation in which a reload is needed is if the rgb copy is modified on the GL
side and the srgb copy is needed.
2009-02-17 12:48:05 +01:00
Henri Verbeet 87627c811e wined3d: Get rid of D3DINITIALIZEBASETEXTURE. 2009-01-12 13:21:56 +01:00
Henri Verbeet 9d8c6326c0 wined3d: Remove stray tabs. 2009-01-09 14:06:14 +01:00
Henri Verbeet 2acf8d7947 wined3d: Rename resource functions to reflect that they're not COM functions. 2008-12-03 09:47:26 +01:00
Henri Verbeet 4d60b6633c wined3d: Rename basetexture functions to reflect that they're not COM functions. 2008-12-03 09:47:16 +01:00
Henri Verbeet 92b93172df wined3d: Remove some unused code. 2008-12-02 14:04:40 +01:00
Henri Verbeet 89241081f6 wined3d: IWineD3DBaseTexture and IWineD3DResource don't need Vtbl's. 2008-12-02 14:04:27 +01:00
Henri Verbeet c7880e8916 wined3d: Make minMipLookup_noFilter and magLookup_noFilter const.
Note that minMipLookup and magLookup aren't particularly safe to use,
they're global arrays initialized from IWineD3DImpl_FillGLCaps(). The same
goes for the other global dynamic lookup tables.
2008-11-28 12:53:57 +01:00
Alexandre Julliard 6cfef95ce7 wined3d: Convert source files to utf-8. 2008-10-18 19:21:20 +02:00
Henri Verbeet 99981f2604 wined3d: Remove some assumptions that PreLoad() will always bind the texture. 2008-09-17 20:49:38 +02:00
Stefan Dösinger 750973cec5 wined3d: Remove BaseTexture::UnBindTexture. 2008-08-28 11:24:49 +02:00
Stefan Dösinger cafec08516 wined3d: Use the nofilter mipmap lookup for np2 textures.
This is cleaner than the if statements in the code. Also np2 textures
should in theory support linear filtering, but fglrx doesn't seem to
like it. This needs further investigation. So far we've never used
linear filtering on np2 textures, so there should not be a
regression. Furthermore I think shader support is more important than
filtering, since NP2 textures are mostly used for 1:1 copying to the
screen.
2008-07-18 11:41:21 +02:00
Stefan Dösinger c088edeae7 wined3d: Use GL_ARB_texture_non_power_of_two emulation.
ATI cards prior to the radeon HD series did not have unconditional non
power of two support. So far we've used texture_rectangle for that, or
created a bigger power of two texture with padding. This had the
disadvantage that we had to correct the coordinates, which causes
extreme problems with shaders(doesn't work, pretty much).

Both the MacOS and the fglrx driver have support for
GL_ARB_texture_non_power_of_two, and run it on the hardware as long as
we stay within the texture_rectangle limitations. This allows us to
have conditional non power of two textures with normalized
coordinates. This patch adds an internal extension, and the code
creates a regular GL_TEXTURE_2D texture with NP2 size, but refuses
mipmapping, filtering and texture_rectangle incompatible
operations. This makes np2 textures work with shaders on fglrx and
macos.
2008-07-18 11:41:09 +02:00
Andrew Talbot aeb3ba2869 wined3d: Remove test for value of unsigned variable being less than zero. 2008-05-12 11:42:17 +02:00
Marcus Meissner 8d8b7ffbc7 wined3d: Handle out of array bounds state. 2008-04-17 11:40:39 +02:00
Jörg Höhle b36d4a1d51 wined3d: Fix missing break inside switch in SetAutoGenFilterType. 2008-04-14 23:50:13 +02:00
Stefan Dösinger 481bcdfe2a wined3d: Disable MAG filters on formats that do not support them. 2008-04-09 11:53:35 +02:00
Stefan Dösinger a22203adeb wined3d: Make the mag filter lookup a separate array.
This makes it easier to make this a per texture / per adapter property.
Somewhen we should rename the remaining lookup type in the general
lookup table to wraplookup.
2008-04-09 11:48:30 +02:00
Stefan Dösinger 4bb54a1ab7 wined3d: Make the min mip lookup type a texture property. 2008-04-09 11:47:58 +02:00
Stefan Dösinger b1d8af7926 wined3d: Update copyright lines. 2008-04-02 20:22:42 +02:00
Stefan Dösinger 635daf8b5d wined3d: D3DTADDRESS_WRAP on conditional NP2 textures clamps to edge.
Conditional NP2 textures in Direct3D do not support D3DTADDRESS_WRAP
texture addressing. Similarly, GL_ARB_texture_rectangle textures do
not support GL_REPEAT. This patch adds a test which shows that _WRAP
clamps to the texture edge and implements that.
2008-02-05 12:37:49 +01:00
Stefan Dösinger 093d7d00c5 wined3d: Mark textures dirty on UnLoad. 2008-02-05 12:33:05 +01:00
Stefan Dösinger a0f2e6e55e wined3d: Move some UnLoad code to the base texture class. 2008-02-05 12:32:58 +01:00
Francois Gouget d0794c4aeb Assorted spelling fixes. 2008-01-23 21:16:22 +01:00