Commit Graph

178 Commits

Author SHA1 Message Date
Henri Verbeet 4aa00e8a21 wined3d: Rename texture_stage_op.color_correction to texture_stage_op.color_fixup.
This is consistent with other uses of struct color_fixup_desc.
2008-12-10 10:50:24 +01:00
Stefan Dösinger e04556bb16 wined3d: Fix D3DFMT_R32F, R16F, G16R16F, ... in the pixel shader.
This allows us to drop the load time conversion and the clear
readback hack and replaces it with a color fixup in the fixed
function pipeline replacement.
2008-12-04 12:00:15 +01:00
Henri Verbeet 89139b7589 wined3d: Make shader texture format fixups more generic.
Based on a patch by Stefan Dösinger. This is more flexible, and allows
the shader backend implementation to be simpler, since it doesn't have
to know about specific formats. The next patch makes use of this.
2008-12-04 11:59:58 +01:00
Henri Verbeet b451048eb7 wined3d: Move GlPixelFormatDesc to wined3d_private.h where it belongs.
Also remove the silly typedef.
2008-12-04 11:59:06 +01:00
Henri Verbeet 5532c990b6 wined3d: Const correctness fixes. 2008-12-02 14:04:15 +01:00
Henri Verbeet eb78c2a082 wined3d: Const correctness fixes for utils.c. 2008-11-26 12:04:56 +01:00
Stefan Dösinger 33482a732e wined3d: Enable blue = 1.0 fixup for D3DFMT_V8U8.
The dx7 sdk demos need this.
2008-11-25 13:07:14 +01:00
Stefan Dösinger 5c79a9f437 wined3d: Rename the fragment ffp desc structures.
This reflects the fact that they describe the fragment pipeline.
The vertex pipeline will use its own structures.
2008-11-20 12:17:45 +01:00
Stefan Dösinger 620a423b22 wined3d: Kill the GL_ATI_envmap_bumpmap code.
GL_ATI_envmap_bumpmap provides two things: Signed V8U8 pixel formats,
and bump mapping. The extension is only supported on fglrx, and this
driver also supports GL_ARB_fragment_program.  Thus the bump mapping
code is never used on any driver out there.  Furthermore, if it is
used, it tends to crash the driver

The signed pixel format is used, as it can be used by pixel shaders or
the ARBfp replacement. However, the format is broken in fglrx, and
negative values are clamped to 0.0. This results in test
failures. WineD3D has an alternative codepath using scale+bias to
enable V8U8 using a standard signed RGB which works correctly on
fglrx.
2008-11-04 11:41:14 +01:00
Vitaliy Margolen a2b2a4cf79 wined3d: Add one more FBO error status code. 2008-10-18 19:35:20 +02:00
Alexandre Julliard 6cfef95ce7 wined3d: Convert source files to utf-8. 2008-10-18 19:21:20 +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
Henri Verbeet b4f43e372e wined3d: Remove useless hash_table_t typedef. 2008-08-29 12:26:55 +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 ec4955630e wined3d: Silence some format spam. 2008-08-28 11:24:49 +02:00
Stefan Dösinger 4635315655 wined3d: Replace a #if 0 with if(0). 2008-08-28 11:24:49 +02:00
Stefan Dösinger b294e43206 wined3d: D3DTOP_DOTPRODUCT3 colorop overrides the alphaop.
Note that the fix is only implemented in the arbfp and atifs fragment
pipeline. Unfortunately nvrc doesn't support dot3 as alpha operation.
2008-08-27 13:21:24 +02:00
Stefan Dösinger f39e122477 wined3d: Add fixed function sRGB write correction. 2008-08-25 12:25:13 +02:00
Chris Robinson 9f82368908 wined3d: Use the proper internal type for some formats. 2008-08-25 12:23:00 +02:00
H. Verbeet b917bdaa52 wined3d: Remove useless hash_table_entry_t typedef.
It doesn't add much.
2008-08-22 10:39:08 +02:00
Stefan Dösinger 46109da87d wined3d: Don't skip applying texdims with shaders.
There's no need to do that with the nvts and opengl ffp fixed function
fragment pipeline, it's perfectly well defined in GL which one takes
effect. This removes a few more troubles when switching between
shaders and arbfp.
2008-08-21 13:33:30 +02:00
Stefan Dösinger 8fe6bf0bad wined3d: Fix the unused arg marker. 2008-08-20 12:34:44 +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 6a24b28b75 wined3d: Support YUV formats with GL_APPLE_ycbcr_422. 2008-08-20 12:25:00 +02:00
Stefan Dösinger 228f2cf3c2 wined3d: Initialize the texture op function properly. 2008-08-04 13:07:26 +02:00
Stefan Dösinger bc4435e406 wined3d: Use a hashmap to store the ffp shaders. 2008-07-31 13:01:50 +02:00
Stefan Dösinger d4d133f032 wined3d: Use C bitfields to compact the ffp description. 2008-07-31 13:01:36 +02:00
Stefan Dösinger 294f1b4aad wined3d: Add fog and tex types to the ffp fragment description. 2008-07-28 11:36:15 +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 eea2c95727 wined3d: Move set_tex_op(_nvrc) to their specific files. 2008-07-22 13:01:45 +02:00
Stefan Dösinger 212ff6ff57 wined3d: Remove some #ifdefs. 2008-07-22 13:01:22 +02:00
Philip Nilsson 9528b1c63e wined3d: Enable filtering for D3DFMT_A4R4G4B4.
This patch enables texture filtering for textures using the A4R4G4B4
format, I can see no reason why it shouldn't be filtered (especially
considering X4R4G4B4 has it).
2008-07-16 19:56:24 +02:00
Stefan Dösinger 197f472ea8 wined3d: Separate texture_activate_dimensions.
This creates an nvts version of this function, and removes the nvts
code from the original one. The nvts version is used by the nvts
pipeline implementation, the original one by the nvrc-only, atifs and
ffp one.
2008-07-14 11:46:25 +02:00
Stefan Dösinger 51e64b3fe9 wined3d: Move fixed function texture dimension updates to the fragment pipeline.
This is a further separation of the sampler state, and a preparation
to move the nv texture shader stuff to its own pipeline implementation.
2008-07-14 11:43:41 +02:00
H. Verbeet 02a2ba9d2f wined3d: Report post pixelshader blending on WINED3DFMT_A16B16G16R16F. 2008-06-23 12:55:02 +02:00
H. Verbeet e081d69bc1 wined3d: Report WINED3DFMT_FLAG_FILTERING on WINED3DFMT_D24X8.
We report this for WINED3DFMT_D24S8, so there should be no reason
WINED3DFMT_D24X8 can't do it. Fixes a regression in 3DMark06.
2008-06-20 11:20:05 +02:00
H. Verbeet 3687207a04 wined3d: Fix WINED3DTOP_MULTIPLYADD for ATI cards. 2008-06-03 11:11:30 +02:00
H. Verbeet 8e6c7aaf1f wined3d: Fix the nvrc implementation of WINED3DTOP_MULTIPLYADD and WINED3DTOP_LERP. 2008-05-27 12:04:22 +02:00
H. Verbeet e891a9938a wined3d: Add WINED3DTOP_ADDSIGNED2X to debug_d3dtop(). 2008-05-27 12:04:11 +02:00
Stefan Dösinger 9ee7e42de8 wined3d: Call activate_dimensions from the atifs code. 2008-04-24 11:54:28 +02:00
Austin English c531e2abdb Spelling fixes. 2008-04-23 12:31:07 +02:00
Stefan Dösinger b1d8af7926 wined3d: Update copyright lines. 2008-04-02 20:22:42 +02:00
Stefan Dösinger bd68237096 wined3d: Implement TSSARGTEMP with register combiners. 2008-04-02 20:07:40 +02:00
Stefan Dösinger 287f60a2b2 wined3d: Implement D3DTA_TEMP in the GL_ATI_fragment_shader codepath. 2008-04-02 20:07:19 +02:00
Stefan Dösinger 8673be0bd7 wined3d: Return a fake pixel format if gl is not loaded. 2008-04-01 20:31:37 +02:00
Roderick Colenbrander c0be6047ef wined3d: Also move the rendertarget capability to the formats table. 2008-03-29 10:31:50 +01:00
Roderick Colenbrander ef73fe5d47 wined3d: Add a depthstencil flag to the formats table and make use of it in CheckDepthStencilCapability. 2008-03-29 10:31:36 +01:00
Roderick Colenbrander e1bf1cd640 wined3d: Make the filtering capability of a format a flag in the formats table. 2008-03-29 10:31:18 +01:00
Roderick Colenbrander 4eaa424c79 wined3d: Initial post pixelshader blending support. [attempt 2].
For each pixel format we store a flag in the table whether it supports
post pixelshader blending. Before applying blending or during a
context switch we verify that blending is turned off for the
format. In case of R32F this gave a 5-6x performance boost (without
filtering and software conversion).
2008-03-28 15:50:24 +01:00