Henri Verbeet
37491bb5d1
wined3d: Simplify the transformed position fixup a bit.
2009-06-22 12:58:54 +02:00
Stefan Dösinger
95788401af
wined3d: GLSL 1.20 includes gl_FragData[] syntax.
...
This means we don't have to enable ARB_draw_buffers explicitly.
2009-06-22 11:27:20 +02:00
Stefan Dösinger
3845b37a21
wined3d: Advertise SM 3.0 in ARB if the extensions are available.
2009-06-22 11:27:11 +02:00
Stefan Dösinger
e211a0b4a4
wined3d: Enable Shader Model 2.0 in ARB.
...
If the needed constants are available, we can support all vs_2_0 and ps_2_0
requirements with the plain ARB extensions. We cannot however, run SM 2.0a or
SM 2.0b.
2009-06-22 11:27:05 +02:00
Stefan Dösinger
e1c6b73e2d
wined3d: Make the ARB index offset work with emulated MOVA.
2009-06-22 11:26:57 +02:00
Stefan Dösinger
77820d5ea5
wined3d: XXXC CC doesn't work even with NV_FP2 on.
2009-06-22 11:26:50 +02:00
Stefan Dösinger
26d17fe04c
wined3d: Implement MRTs in ARB.
2009-06-22 11:26:43 +02:00
Stefan Dösinger
bb8bcf5878
wined3d: Reload the first 8 constants on a 1.x and != 1.x ps switch.
...
ps 1.x constants are clamped to [-1;1], constants in >= 2.0 pshaders
are not. This means we have to reload constants when switching between
those shader types in ARB. In GLSL this is not a concern because
constants are tied to program objects and are reloaded on a shader
change anyway.
2009-06-22 11:26:33 +02:00
Stefan Dösinger
2364ce08e5
d3d9: Add a SGN test.
2009-06-22 11:26:14 +02:00
Stefan Dösinger
20401fa9af
wined3d: Invalidate the srgb tex in surface::unload.
2009-06-22 11:25:57 +02:00
Robert Key
89b08bc6e2
wined3d: Add missing HD 3400 renderer string.
2009-06-19 14:54:58 +02:00
Stefan Doesinger
0188f96dd2
wined3d: Implement EvictManagedResources.
2009-06-19 14:54:04 +02:00
Stefan Doesinger
b2f09fd204
wined3d: Emulate clipplanes in ARB if the NV extensions are not available.
...
This patch tries to find a free texture coordinate to load up to 4 clip
coordinates into the pixel shader, and uses KIL to throw away fragments
that are cut by a clipplane. If no free texture coordinate is found,
clipping is not done. If more than 4 clipplanes are used, only the first
4 are actually enabled. That should be pretty rare though.
2009-06-19 14:54:00 +02:00
Stefan Doesinger
7baf7c6518
wined3d: Implement vertex texture fetch in ARB.
2009-06-19 14:53:50 +02:00
Stefan Doesinger
f1e97cdfbc
wined3d: Don't run out of varyings because of clipplanes.
2009-06-19 14:53:43 +02:00
Stefan Doesinger
b53b5909ff
wined3d: Handle SM 3.0 varyings in ARB.
2009-06-19 14:53:20 +02:00
Henri Verbeet
dcc490e82f
wined3d: Don't load a rendertarget just because alpha test is enabled.
...
Unlike the depth test, the alpha test doesn't compare to the existing fragment
but against a reference value.
2009-06-19 13:52:47 +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
Henri Verbeet
9f252cd815
wined3d: Remove some useless code in IWineD3DDeviceImpl_SetLightEnable().
2009-06-18 15:17:27 +02:00
Henri Verbeet
550a3bbf96
wined3d: Reuse the FBO for check_fbo_compat().
2009-06-18 15:17:27 +02:00
Henri Verbeet
41d93e1dd1
wined3d: Make sure we have a context in stretch_rect_fbo().
...
Specifically, in case the source surface was offscreen, we would sometimes to
GL calls without active context.
2009-06-18 15:17:27 +02:00
Stefan Doesinger
3aaa530ca9
wined3d: Properly load the y correction.
2009-06-18 15:17:26 +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
Yann Droneaud
a203876cc7
wined3d: Improved ATI Radeon HD 4xxx detection.
2009-06-17 12:43:20 +02:00
Stefan Doesinger
c9ef1ed28c
wined3d: Deal with instructions that do not support _SAT.
2009-06-17 12:24:43 +02:00
Stefan Doesinger
a7b605af64
wined3d: Implement D3DSPDM_PARTIALPRECISION support.
2009-06-17 12:24:35 +02:00
Stefan Doesinger
dfd338de77
wined3d: Add modifier support to tex and friends.
2009-06-17 12:20:54 +02:00
Stefan Doesinger
7856c1c26f
wined3d: Fix texm3x3pad.
...
The register number is already in the name we got from get_register_name,
don't add it twice.
2009-06-17 12:20:48 +02:00
Stefan Doesinger
cd348ac897
wined3d: Use bitfields for reg_maps uses* members.
2009-06-17 12:19:45 +02:00
Stefan Doesinger
58c3a0c832
wined3d: Implement vpos and vface.
2009-06-17 12:19:31 +02:00
Stefan Doesinger
ae600fe0c8
wined3d: Implement texldl in ARB.
2009-06-17 12:19:15 +02:00
Henri Verbeet
60317d027a
wined3d: Avoid some unneeded rendertarget copies.
2009-06-17 12:13:07 +02:00
Henri Verbeet
8be020776b
wined3d: Avoid some unneeded depthstencil copies.
2009-06-17 12:13:07 +02:00
Henri Verbeet
2c009e4d87
wined3d: Only initialize unused components of varyings that are read.
2009-06-17 12:13:07 +02:00
Henri Verbeet
fccb3d82fd
wined3d: Fall back to backbuffer offscreen rendering if FBOs are unavailable.
...
Backbuffer appears to be a better choice than PBuffer at the moment, since
PBuffer appears to be somewhat broken.
2009-06-17 12:13:07 +02:00
Henri Verbeet
dad6c311ec
wined3d: Fix a typo.
2009-06-17 12:13:07 +02:00
Stefan Doesinger
4830a29101
wined3d: Implement texldd in ARB.
2009-06-16 13:57:34 +02:00
Stefan Doesinger
2f6a713805
wined3d: Use flags instead of bools to control shader_hw_sample.
2009-06-16 13:57:30 +02:00
Stefan Doesinger
e608ef856e
wined3d: Implement IFC in ARB.
2009-06-16 13:57:20 +02:00
Stefan Doesinger
dfefbcd00d
wined3d: Implement break and breakc.
2009-06-16 13:57:15 +02:00
Stefan Doesinger
c220bafa2c
wined3d: Unroll loops in ARB if needed.
...
This is needed to allow us to claim vs_2_0 support with plain
GL_ARB_vertex_program. vs_2_0 allows loops without breaks.
2009-06-16 13:57:04 +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
88162fabb8
wined3d: Get rid of the pointers in WINED3DSURFACE_DESC.
2009-06-15 13:42:29 +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
bbfdfb2f1f
wined3d: Introduce surface_gdi_cleanup().
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
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
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
4bc6b376e0
wined3d: Remove the useless "resource_type" parameter from IWineD3DDevice::CreateSurface().
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
71e12ae936
wined3d: Use the compressed format info in IWineD3DBaseSurfaceImpl_LockRect().
2009-06-12 17:33:15 +02:00
Rico Schüller
3ea66d6026
wined3d: Don't allow a negative lock_count in buffer_Unmap.
2009-06-11 13:23:25 +02:00
Henri Verbeet
5fbf895da6
wined3d: Use the format info to calculate compressed surface pitch in IWineD3DBaseSurfaceImpl_GetPitch().
2009-06-11 11:53:55 +02:00
Henri Verbeet
da12ac05a4
wined3d: Use the format info to calculate compressed surface size in IWineD3DBaseSurfaceImpl_SetFormat().
2009-06-11 11:53:55 +02:00
Henri Verbeet
e255f971e4
wined3d: Use the format info to calculate compressed surface size in IWineD3DDeviceImpl_CreateSurface().
2009-06-11 11:53:55 +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
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
Stefan Dösinger
3f5936f6f7
wined3d: Don't set unloaded arrays to zero.
...
This causes memory corruption on MacOS, even if the app does not
reference undeclared arrays. Trying to avoid potential breakage in
broken apps which provoke undefined behavior is pointless if it causes
actual breakage in well-behaved apps (on ill-behaved drivers).
2009-06-10 11:52:58 +02:00
Stefan Dösinger
8e259d9fcd
wined3d: A small atifs bump map improvement.
...
Thanks to Roland Scheidegger from Tungsten Graphics for the suggestion to
replace the 2 movs + dp2add with two MADs, where one can conveniently be
coissued with the other dp2add.
2009-06-10 11:52:24 +02:00
Stefan Dösinger
258d99d289
wined3d: Implement dsy in ARB.
2009-06-10 11:52:15 +02:00
Stefan Dösinger
51cdc9d361
wined3d: Implement loops with the NV extensions.
2009-06-10 11:52:01 +02:00
Stefan Dösinger
298bd3c50d
wined3d: Store the bumpmap ARB constants in ARB structures.
2009-06-10 11:51:49 +02:00
Henri Verbeet
e83fa982ca
wined3d: Use the format info for doing compressed surface blits in BltFast().
2009-06-10 11:51:12 +02:00
Henri Verbeet
61fd875bb4
wined3d: Store compression information about compressed formats.
2009-06-10 11:51:04 +02:00
Henri Verbeet
9d71a5f1e0
wined3d: Round rows up to whole blocks for compressed surface blits in BltFast().
2009-06-10 11:50:57 +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
621da64245
wined3d: Get rid of the silly pointers in WINED3DVOLUME_DESC.
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
fcf6a27a9b
wined3d: Simplify some code in set_glsl_shader_program().
2009-06-09 17:01:14 +02:00
Henri Verbeet
a6dc31e442
wined3d: Avoid comparing shader compile args if the relevant shader isn't present.
2009-06-09 17:01:14 +02:00
Frank Richter
6136884120
d3d9: Fix bitmask for A2R10G10B10 format.
2009-06-08 16:22:18 +02:00
Gerald Pfeifer
6d1a76fb10
wined3d: Fix (and simplify) the ATI case in IWineD3DImpl_FillGLCaps.
2009-06-08 14:29:01 +02:00
Gerald Pfeifer
7856ac3c19
wined3d: Use & instead of && for bit test in IWineD3DDeviceImpl_CreateSurface().
2009-06-08 14:28:54 +02:00
Henri Verbeet
7422babd88
wined3d: Set FBO stencil attachments for relevant depth stencil formats.
2009-06-08 12:44:27 +02:00
Henri Verbeet
a2244051ef
wined3d: Use context_attach_depth_stencil_fbo() to clear FBO depth attachments.
2009-06-08 12:44:22 +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
d3bc045f26
wined3d: Add support for the ARB_depth_buffer_float extension.
2009-06-08 12:44:08 +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
d08f4fb5f5
wined3d: Add support for EXT_packed_depth_stencil.
2009-06-05 15:19:56 +02:00
Henri Verbeet
a5876bb91e
wined3d: Use FBOs for offscreen rendering by default.
2009-06-05 15:19:40 +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
a2440aed7e
wined3d: Add extension detection for ARB_depth_texture.
2009-06-05 14:43:25 +02:00
Henri Verbeet
daeb86d620
wined3d: Don't use the vertex/pixel shader when we're not supposed to.
...
This also avoids removing programs from lists they're not in in
delete_glsl_program_entry().
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
a44f84fdf7
wined3d: Add a proper enum value for "no extension".
...
This would allow an extension check for ARB_COLOR_BUFFER_FLOAT to work.
2009-06-04 12:19:02 +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
37bdcd6b9b
wined3d: Free priv->stack in shader_glsl_free().
2009-06-04 12:18:27 +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
97f320a77b
wined3d: Introduce volumetexture_init() to handle most of the volume texture initialization.
2009-06-03 11:39:16 +02:00