Commit Graph

240 Commits

Author SHA1 Message Date
Henri Verbeet 7363b6e2e3 wined3d: Document GL context dependencies. 2009-06-26 12:05:07 +02:00
Stefan Dösinger 85af0b2943 wined3d: Don't emulate clipplanes with ffp vp and fix a wrong if condition.
b2f09fd204 accidentally got the
device->vs_clipping check wrong. The FFP replacement should emulate
clipping if GL can't do this natively with vertex shaders, not the
other way. Also don't emulate clipping if we're using fixed function
vertex processing because (a) clipping is always supported by GL in
this case, and (b), fragment.texcoord[7] is undefined. (Or in the
worst case set to something bad by the app).
2009-06-23 15:53:00 +02:00
Henri Verbeet e5e4d1e9a7 wined3d: Add an rtInternal fallback for WINED3DFMT_R16G16_UNORM. 2009-06-22 12:59:21 +02:00
Henri Verbeet 550a3bbf96 wined3d: Reuse the FBO for check_fbo_compat(). 2009-06-18 15:17:27 +02:00
Henri Verbeet 7599520321 wined3d: Avoid checking depth/stencil and compressed formats in init_format_fbo_compat_info().
Checking these is somewhat pointless since they should never be
color-renderable according to the FBO spec. This patch also happens to avoid
dereferencing a NULL pointer inside fglrx.
2009-06-12 17:33:15 +02:00
Henri Verbeet 1ad485ff83 wined3d: Improve some TRACEs in init_format_fbo_compat_info(). 2009-06-11 11:53:54 +02:00
Henri Verbeet 61fd875bb4 wined3d: Store compression information about compressed formats. 2009-06-10 11:51:04 +02:00
Frank Richter 6136884120 d3d9: Fix bitmask for A2R10G10B10 format. 2009-06-08 16:22:18 +02:00
Henri Verbeet 13aea3a131 wined3d: Use GL_DEPTH32F_STENCIL8 for WINED3DFMT_D24FS8. 2009-06-08 12:44:17 +02:00
Henri Verbeet 4bc2180821 wined3d: Use GL_DEPTH_COMPONENT32F for WINED3DFMT_D32F_LOCKABLE. 2009-06-08 12:44:13 +02:00
Henri Verbeet f8c4832276 wined3d: Use GL_DEPTH24_STENCIL8_EXT for depth stencil formats. 2009-06-05 15:19:56 +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 786408fb95 wined3d: Check FBO compatibility on all formats with a GL format.
Instead of just the ones that have a fallback specified.
2009-06-05 14:43:25 +02:00
Henri Verbeet b93c3b3253 wined3d: Set texture filtering to NEAREST in check_fbo_compat(). 2009-06-05 14:43:25 +02:00
Henri Verbeet 0571ebcee3 wined3d: Add extension detection to the GL format template table. 2009-06-05 14:43:25 +02:00
Henri Verbeet cae6a32b08 wined3d: Check the result from wine_rb_get() before using it in WINE_RB_ENTRY_VALUE. 2009-06-05 14:43:25 +02:00
Henri Verbeet 0a059aafbe wined3d: Check FBO compatibility after the fixups are applied. 2009-06-04 12:18:47 +02:00
Henri Verbeet faaea93573 wined3d: Remove WINED3DFMT_R16G16B16A16_SNORM from the GL formats template.
This entry obviously can't work correctly.
2009-06-04 12:18:42 +02:00
Henri Verbeet 0cf49767ad wined3d: Remove entries without an internal format from the GL formats template. 2009-06-04 12:18:33 +02:00
Henri Verbeet ad6279de9f wined3d: Replace the wined3d hash table with the generic red-black tree. 2009-06-03 11:40:14 +02:00
Henri Verbeet 6a9212a1b2 wined3d: Fix debug_d3dusagequery() to handle combinations of flags. 2009-05-25 11:23:53 +02:00
Henri Verbeet 7c2e91c592 wined3d: Fix debug_d3dusage() to handle combinations of flags. 2009-05-25 11:23:47 +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 3022a4a73c wined3d: Add missing GL locking to check_fbo_compat(). 2009-05-15 10:25:32 +02:00
Stefan Dösinger d2e12a19ca wined3d: Make use of GL_ARB_half_float_vertex.
This extension is a subset of GL_NV_half_float that defines support
for the stream format(same constant), but doesn't define texture
formats or immediate mode entrypoints.
2009-05-05 14:13:02 +02:00
Stefan Dösinger bc07ad0579 d3d8, d3d9: Don't rely on the wined3d buffer type. 2009-04-08 11:35:29 +02:00
Stefan Dösinger 3e099d0147 wined3d: Advertise post pixelshader blending for a few more formats.
Windows advertises it on all these formats(Nvidia Geforce 7400), and
Trackmania Nations needs it on D3DFMT_Q8W8V8U8 to accept ps_3_0 support.
2009-03-30 14:22:06 +02:00
Henri Verbeet 4434d00f84 wined3d: Unify vertex and texture formats.
Some fields should be redundant now, eg. gl_vtx_type and glType. I'll leave
that for a different patch to fix though.
2009-03-27 15:51:25 +01:00
Henri Verbeet 5390628e6f wined3d: Make sure the format actually exists in init_format_texture_info(). 2009-03-27 15:51:24 +01:00
Henri Verbeet 837f163662 wined3d: Create a separate function for setting a format's GL texture info. 2009-03-27 15:50:24 +01:00
Henri Verbeet b8f25ef6f2 wined3d: Create a separate function for setting format fixups. 2009-03-27 15:50:16 +01:00
Henri Verbeet 7874a6b74b wined3d: Create a separate function for checking a format's FBO compatibility. 2009-03-27 15:50:08 +01:00
Henri Verbeet 1407bd6b1a wined3d: Create a separate function for setting basic format info. 2009-03-27 11:23:41 +01:00
Henri Verbeet dd1f0d9c48 wined3d: Pass format_desc to getColorBits() and getDepthStencilBits(). 2009-03-24 12:57:38 +01:00
Henri Verbeet a56a143461 wined3d: Set the byte count for WINED3DFMT_UNKNOWN to 0.
As far as I can tell nothing depends on this being 1, and there's some code
that checks for WINED3DFMT_UNKNOWN and uses 0 for the byte count in that case.
2009-03-24 12:57:12 +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 53bf5c2658 wined3d: Add fields from StaticPixelFormatDesc to struct GlPixelFormatDesc.
The idea here is that we should lookup format information in struct
GlPixelFormatDesc, while StaticPixelFormatDesc and GlPixelFormatDescTemplate
will only be used to build the table.
2009-03-13 11:29:01 +01:00
Henri Verbeet e3bcc7544c wined3d: Remove the shader_color_fixup field from IWineD3DBaseTextureClass.
This is redundant now.
2009-03-12 13:09:55 +01:00
Henri Verbeet 4ff5736edf wined3d: Don't compare texUnitMap entries to -1. 2009-03-09 14:39:34 +01:00
Henri Verbeet 3b07e7059e wined3d: Add d3d10 primitive types. 2009-03-05 16:16:24 +01:00
Henri Verbeet b4830feb34 wined3d: Accept WINED3DFMT_R8G8B8A8_UNORM in getColorBits(). 2009-02-25 12:37:06 +01:00
Henri Verbeet 399d992a07 wined3d: Add IWineD3DBuffer, use it in d3d10core. 2009-02-23 12:20:45 +01:00
Henri Verbeet 8cefc47d81 wined3d: Add DXGI formats to WINED3DFORMAT. 2009-02-20 11:10:37 +01:00
Francois Gouget 5b60258f0d wined3d: Make debug{fixup_channel_source,yuv_fixup}() static. 2009-02-18 12:17:38 +01:00
Stefan Dösinger 68c251f327 wined3d: Add a debug function for surface locations. 2009-02-17 12:51:17 +01:00
Michael Stefaniuc 118c75a8c7 wined3d: Remove superfluous pointer casts. 2009-02-03 12:40:14 +01:00
Michael Stefaniuc cc6b283d3a wined3d: Remove some unused defines. 2009-02-03 12:40:12 +01:00
Stefan Dösinger 50109aa969 wined3d: Get rid of last_was_foggy_shader & friends.
The fog settings do not depend on wether the shader writes to oFog or not,
instead they depend on the FOGVERTEXMODE and FOGTABLEMODE settings, and if a
vertex shader is bound at all.

It works the same way as with the fixed function, and having a vertex shader
is the same as using pretransformed vertices, just that the fog coord comes
from the shader instead of the specular color:

FOGTABLEMODE != NONE: The Z coord is used, oFog is ignored
FOGTABLEMODE == NONE, with VS: oFog is used
FOGTABLEMODE == NONE, no VS, XYZ: Z is used
FOGTABLEMODE == NONE, no VS, XYZRHW: diffuse color is used
2009-01-20 12:45:40 +01:00
Henri Verbeet 5d875906c1 wined3d: Remove some superfluous pointer casts. 2009-01-20 12:34:05 +01:00
Henri Verbeet 45a61d1ac4 wined3d: Enable GL_HALF_FLOAT_NV when NV_HALF_FLOAT is supported.
This makes more sense than the other way around.
2009-01-08 13:21:56 +01:00