146 Commits

Author SHA1 Message Date
Stefan Dösinger
dda59e361c wined3d: Update the arbfp shader on a texturetransformflags change. 2008-08-27 13:21:24 +02:00
Stefan Dösinger
9b94c0abb9 wined3d: Make the alphaop == colorop matching a bit smarter. 2008-08-26 12:07:41 +02:00
Stefan Dösinger
4767be8cde wined3d: The final luminance factor is clamped. 2008-08-26 12:07:41 +02:00
Stefan Dösinger
f8ead75566 wined3d: Declare the texture factor when D3DTOP_BLENDFACTORALPHA is used. 2008-08-26 12:07:41 +02:00
Stefan Dösinger
8fc2cfe432 wined3d: Fix projected bump mapping. 2008-08-26 12:07:41 +02:00
Stefan Dösinger
6c6a6a2e61 wined3d: Implement D3DTA_ALPHAREPLICATE in arbfp and atifs.
Also adds a simple test for this. In the fixed function and nvrc/nvts
code this already works properly.
2008-08-26 12:07:41 +02:00
Stefan Dösinger
6c12b81552 wined3d: Implement D3DTOP_BUMPENVMAPLUMINANCE. 2008-08-26 12:07:41 +02:00
Stefan Dösinger
f39e122477 wined3d: Add fixed function sRGB write correction. 2008-08-25 12:25:13 +02:00
Stefan Dösinger
f0f32912a6 wined3d: Make sure the pixel shader is compiled.
If we're heading out of the pixelshader handler early, and a pixel
shader is in use, the pixel shader may not be compiled. The vertex
shader handler then checks if the pixel shader is dirty, and calls the
shader backend to apply the shader if it isn't.  Thus, in the case of
GLSL, the shader code could attempt to link an uncompiled shader into
the program. This isn't much of a problem because when the fog is
applied, the pixel shader is compiled and the program re-linked.
2008-08-25 12:24:24 +02:00
Stefan Dösinger
bbf313e76a d3d9: Test for fixed function value clamping. 2008-08-21 13:27:58 +02:00
Stefan Dösinger
8fe6bf0bad wined3d: Fix the unused arg marker. 2008-08-20 12:34:44 +02:00
Stefan Dösinger
1f4cf3513d wined3d: Implement YUV emulation with GL_ARB_fragment_program. 2008-08-20 12:26:14 +02:00
Stefan Dösinger
bfe7067973 wined3d: Ask the ffp/shader/blit implementation about format support.
If a format is not supported natively by opengl, a shader may be able
to convert it. Up to now, CheckDeviceFormat had magic knowldge which
GL extensions lead to which supported format. This patch adds
functions that allow CheckDeviceFormat to ask the actual
implementation for its capabilities.
2008-08-20 12:26:02 +02:00
Stefan Dösinger
a7d5b1e9a5 wined3d: Move the pshader fog update to the vertex pipeline. 2008-08-05 14:09:36 +02:00
Stefan Dösinger
016efe7d94 wined3d: Clamp results in the arbfp pipeline replacement.
Fixed function processing can only deal with values between 0 and 1
generally. Clamp the results of instructions that could produce bigger
or smaller values.
2008-08-04 13:07:53 +02:00
Francois Gouget
a793888a28 Assorted spelling fixes. 2008-08-04 13:04:48 +02:00
Stefan Dösinger
14b24058d6 wined3d: GL_ARB_fragment_program ffp implementation. 2008-07-31 13:02:04 +02:00
Stefan Dösinger
5a6b4e9f47 wined3d: Make the MAC ARBvp implementation happy about ARL. 2008-07-24 11:56:52 +02:00
Stefan Dösinger
726d9d47af wined3d: ATI2N support using GL_EXT_texture_compression_rgtc. 2008-07-24 11:56:42 +02:00
Stefan Dösinger
dc25a86cc5 wined3d: Support ATI's D3DFMT_ATI2N format.
This is an ATI specific format designed for compressed normal maps,
and quite a few games check for its existence. While it is an
ATI-specific "extension" in d3d9, it is a core part of
D3D10(DXGI_FORMAT_BC5), and supported on Geforce 8 cards.
2008-07-24 11:56:24 +02:00
Stefan Dösinger
c48195e417 wined3d: Move shader_fragment_enable to the fragment pipeline implementation.
It isn't related to the shader backend any longer. The nvts_enable in
the ffp code isn't quite right as well, it should be moved away once
there is a dedicated nvts fragment pipeline replacement
2008-07-11 14:32:37 +02:00
H. Verbeet
b37cc08721 wined3d: Don't call shader_select() in depth_blt().
Calling shader_select() from inside depth_blt() isn't necessarily
safe. shader_select() assumes CompileShader() has been called for the
current shaders, but that depends on STATE_VSHADER / STATE_PIXELSHADER
being applied. That isn't always true when depth_blt() gets called,
with the result that sometimes GLSL programs could be created with no
shader objects attached.
2008-07-10 20:33:29 +02:00
H. Verbeet
54ae3ebfd4 wined3d: Destroy depth_blt resources in the backend's destructor.
No need to expose this in the interface.
2008-07-10 12:17:06 +02:00
Stefan Dösinger
3a2743f25d wined3d: Remove the state table from the shader backend. 2008-07-08 21:08:54 +02:00
Stefan Dösinger
2d7cdc3ec2 wined3d: Remove the DLL load init function. 2008-07-08 21:08:54 +02:00
Stefan Dösinger
9be8f36c2e wined3d: Correct an off-by-one error in constant dirtification.
Constant numbers start at 0, and the loading loop has a for(i; i <
dirtyconsts; i++). This means that the highest dirty constant isn't
loaded correctly. Rather than replacing the < with <=, which would
make it impossible to have no dirty constant, add 1 to the dirty
constant counter.
2008-07-07 12:33:41 +02:00
Andrew Talbot
6ced8a3f55 wined3d: Remove unneeded address-of operators from function names. 2008-07-07 12:32:39 +02:00
Stefan Dösinger
2173fde722 wined3d: Avoid float->string conversion in arb shaders. 2008-06-06 10:28:24 +02:00
Andrew Talbot
0de14c37e5 wined3d: Remove unused variables. 2008-04-30 10:25:47 +02:00
Stefan Dösinger
e3bd5b6dcd wined3d: Use the shader backend to enable / disable atifs and nvts.
The previous logic assumed that if NVTS or ATIFS are available they
will be used. This happens to be true for NVTS, but ATIFS is only used
if neither ARBFP nor GLSL are supported. This breaks fixed function
fragment processing on ATI r300 and newer cards
2008-04-24 11:37:17 +02:00
Austin English
6e59cd2c34 Spelling fixes. 2008-04-22 12:20:12 +02:00
Francois Gouget
8a18e0e43a Assorted spelling fixes. 2008-04-07 13:36:18 +02:00
Stefan Dösinger
20e63160df wined3d: Initialize some ARB shader output parameters. 2008-04-03 12:01:32 +02:00
Stefan Dösinger
b1d8af7926 wined3d: Update copyright lines. 2008-04-02 20:22:42 +02:00
Stefan Dösinger
0f1c2370b1 wined3d: Do not report pixel shaders if not supported. 2008-04-02 20:07:30 +02:00
Stefan Dösinger
a440051016 wined3d: Add a shader DLL init callback. 2008-03-25 19:49:17 +01:00
Stefan Dösinger
ee7e149998 wined3d: Move shader caps setting into the arb and glsl shader backends. 2008-03-25 19:39:23 +01:00
Stefan Dösinger
5ab5202e0f wined3d: Set shader specific caps in the shader backend.
The whole control structures in directx.c get terribly confusing with
the various codepaths for texturing and different shader
implementations. It is also hard to reflect the shader model
decisions this way too. This patch moves the shader specific parts of
the caps code into the shader backend where we can set our caps
dependent of the shader model decisions and without complex caps flag
checks.
2008-03-25 19:39:11 +01:00
Stefan Dösinger
a66fb40d83 wined3d: Move shader generation into the shader backend.
Generating the shader ID and parts of the shader prolog and epilog was
done by the common vertexshader.c / pixelshader.c, which is ugly.

This patch doesn't get rid of all the uglyness, somewhen we'll still
have to sort out the relationship of [arb|glsl]_generate_shader and
[arb|glsl]_generate_declarations.
2008-03-25 19:35:58 +01:00
Stefan Dösinger
84258723f9 wined3d: Make the state table a property of the shader backend. 2008-03-25 19:35:32 +01:00
Stefan Dösinger
20e57ea607 wined3d: Mark constants dirty in the EXT_gpu_program_parameters path. 2008-03-07 11:01:07 +01:00
Stefan Dösinger
167a271434 wined3d: Support more than one texbem instruction per shader. 2008-03-05 19:22:44 +01:00
Stefan Dösinger
739278baf1 wined3d: Add a number to the ARB program shader bumpenvmat matrices. 2008-03-05 19:22:31 +01:00
Stefan Dösinger
8b28ca720e wined3d: Use GL_EXT_gpu_program_parameters if available. 2008-03-04 12:15:32 +01:00
Stefan Dösinger
aeb0e43e3e wined3d: Hardcode local constants in ARB shaders if possible. 2008-03-04 12:15:26 +01:00
Stefan Dösinger
107e80a79c wined3d: Implement a different constant dirtification algorithm.
Add a new property of the shader backend which indicates whether the
shader backend is able to dirtify single constants rather than
dirtifying vshader and pshader constants as a whole. Depending on this
a different Set*ConstantF implementation is used which marks constants
dirty. The ARB shader backend uses this and marks constants clean
after uploading.
2008-03-04 12:15:16 +01:00
Stefan Dösinger
f912f18b13 wined3d: Move shader model private data into its own structure. 2008-02-26 11:31:39 +01:00
Stefan Dösinger
3d2aa7afa0 wined3d: De-Statify depth blit opengl resources. 2008-02-05 12:33:15 +01:00
Austin English
3471f841a1 wined3d: Spelling fixes. 2008-01-18 12:53:33 +01:00
Stefan Dösinger
1156194881 wined3d: Destroy arb shaders on shader destroy. 2008-01-14 15:21:01 +01:00