269 Commits

Author SHA1 Message Date
Henri Verbeet
17ab7f6b83 wined3d: Support some more depth blt texture types for arb programs. 2008-10-29 11:51:54 +01:00
Henri Verbeet
437b342424 wined3d: Pass explicit texcoords to depth blt. 2008-10-28 12:33:27 +01:00
Henri Verbeet
57401fcab2 wined3d: Pass the texture type to the shader depth blt function. 2008-10-28 12:33:18 +01:00
Roderick Colenbrander
3a1aeef7c7 wined3d: Add ENTER_GL/LEAVE_GL to gen_yuv_shader. 2008-10-20 11:37:54 +02:00
Roderick Colenbrander
5163a360e0 wined3d: arbfp_blit_unset should call ENTER_GL/LEAVE_GL instead of the caller. 2008-10-20 11:37:46 +02:00
Roderick Colenbrander
8a002b09c1 wined3d: arbfp_set_shader_blit should handle ENTER_GL/LEAVE_GL instead of the caller. 2008-10-20 11:37:38 +02:00
Alexandre Julliard
6cfef95ce7 wined3d: Convert source files to utf-8. 2008-10-18 19:21:20 +02:00
Henri Verbeet
9aaccfe77f wined3d: Correct some swizzles and write masks in arb_program_shader. 2008-10-09 12:14:21 +02:00
Henri Verbeet
a0940051eb wined3d: Make some more ARB program functions private to the backend. 2008-09-24 12:53:16 +02:00
Henri Verbeet
2e76954097 wined3d: Move part of the shader instruction table to the backend. 2008-09-24 12:53:05 +02:00
Henri Verbeet
ca28930113 wined3d: Merge pshader_hw_map2gl() and vshader_hw_map2gl().
This isn't the prettiest way to merge those functions, but it's a start.
2008-09-23 12:25:27 +02:00
Henri Verbeet
ee49230cd2 Make some ARB program structs and functions private to the backend. 2008-09-16 22:33:42 +02:00
Roderick Colenbrander
e3e113383e wined3d: Degrade an ERR to a TRACE. 2008-09-15 11:29:20 +02:00
Stefan Dösinger
ae7572217d wined3d: Some ARB code fixes. 2008-09-11 11:43:34 +02:00
Stefan Dösinger
035729ab97 wined3d: Don't disable arbfp if the pipeline replacement is in. 2008-09-11 11:43:30 +02:00
Jeff Zaroyko
6a14bcc824 wined3d: Add missing HeapFree. 2008-09-08 12:31:43 +02:00
Stefan Dösinger
271f56c9f1 wined3d: Close a pshader on-off switching loophole. 2008-09-05 11:23:19 +02:00
Stefan Dösinger
ab74030ec5 wined3d: Optimize the projected bump map handling. 2008-09-02 14:56:57 +02:00
Stefan Dösinger
d60ece20b5 wined3d: Implement secondary color in the arbfp ffp pipeline. 2008-09-02 14:56:15 +02:00
Stefan Dösinger
422eebd2c3 wined3d: BLENDTEXTUREALPHAPM reads the texture. 2008-09-02 14:55:57 +02:00
Stefan Dösinger
3b48660f43 wined3d: Implement YV12 support for emulated overlays.
This is the prefered format of many codecs, and for some codecs this
is the only supported output format. As usual I try to handle all the
conversion in the GPU and keep the CPU involvement minimal to gain the
full performance of PBO transfers.
2008-09-02 14:55:50 +02:00
Stefan Dösinger
af8d268a39 wined3d: Handle projected textures properly in arbfp and atifs.
GL_ARB_fragment_program and GL_ATI_fragment_shader can disable
projected textures properly, and they can also handle
D3DTTFF_PROJECTED | D3DTTFF_COUNT3 properly.
2008-08-28 11:24:49 +02:00
Stefan Dösinger
005e5e868e wined3d: Replace an #if 0 with if(0). 2008-08-28 11:24:49 +02:00
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