Commit Graph

2394 Commits

Author SHA1 Message Date
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
Alexander Dorofeyev 76e02581a9 wined3d: Add ActivateContext in color_fill_fbo.
Also removes dirtifying of SCISSORTESTENABLE state that is made
redundant by ActivateContext(...,CTXUSAGE_CLEAR).
2008-07-30 13:54:40 +02:00
H. Verbeet c7da79ded3 wined3d: FBO texture == drawable handling is already handled in LoadLocation(). 2008-07-30 12:44:18 +02:00
H. Verbeet 9b47996b41 wined3d: Container dirtification is already handled in ModifyLocation(). 2008-07-30 12:44:12 +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 40cfec2582 wined3d: Do not enable GL_TEXTURE_SHADER_NV unconditionally. 2008-07-28 11:36: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 370b8299ab wined3d: Honor the texcoordindex when setting the texture matrix. 2008-07-24 11:56:02 +02:00
Stefan Dösinger b554cdbb5a d3d: D3DDECLTYPE_UNUSED is not valid in vertex declarations. 2008-07-24 11:55:42 +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
Stefan Dösinger bfd1ac26e2 wined3d: Set WINED3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET. 2008-07-22 13:01:15 +02:00
Stefan Dösinger 448fee2879 wined3d: Whitespace fix. 2008-07-22 13:01:07 +02:00
Stefan Dösinger d66c05ce1d wined3d: Fix a copy and paste bug.
This happened to work because most cards have the same amount of
pshader and vshader constants, but for some reason this doesn't hold
true on this macbook pro here, which lead to a crash due to heap
corruption
2008-07-22 13:00:58 +02:00
Stefan Dösinger 1219e3d4a7 wined3d: Use less strict pixel format matching if the match fails.
Some drivers(the open source ones most notably) cannot satisfy all
possible D3D formats. This doesn't mean we should fall back to the
emergency fallback instantly. Instead, try to loosen the requirements
step by step.
2008-07-22 13:00:47 +02:00
Stefan Dösinger cafec08516 wined3d: Use the nofilter mipmap lookup for np2 textures.
This is cleaner than the if statements in the code. Also np2 textures
should in theory support linear filtering, but fglrx doesn't seem to
like it. This needs further investigation. So far we've never used
linear filtering on np2 textures, so there should not be a
regression. Furthermore I think shader support is more important than
filtering, since NP2 textures are mostly used for 1:1 copying to the
screen.
2008-07-18 11:41:21 +02:00
Stefan Dösinger c088edeae7 wined3d: Use GL_ARB_texture_non_power_of_two emulation.
ATI cards prior to the radeon HD series did not have unconditional non
power of two support. So far we've used texture_rectangle for that, or
created a bigger power of two texture with padding. This had the
disadvantage that we had to correct the coordinates, which causes
extreme problems with shaders(doesn't work, pretty much).

Both the MacOS and the fglrx driver have support for
GL_ARB_texture_non_power_of_two, and run it on the hardware as long as
we stay within the texture_rectangle limitations. This allows us to
have conditional non power of two textures with normalized
coordinates. This patch adds an internal extension, and the code
creates a regular GL_TEXTURE_2D texture with NP2 size, but refuses
mipmapping, filtering and texture_rectangle incompatible
operations. This makes np2 textures work with shaders on fglrx and
macos.
2008-07-18 11:41:09 +02:00
Stefan Dösinger a0cc79f0bf wined3d: Correct the D3DTOP_LERP parameter order. 2008-07-18 11:40:40 +02:00
Stefan Dösinger 5b846adffd wined3d: Fix the MULTIPLYADD parameter orders in atifs. 2008-07-18 11:40:33 +02:00
Stefan Dösinger 55ab14a4ed wined3d: Move an VBO support check to the state template. 2008-07-18 11:40:19 +02:00
Stefan Dösinger dc203d36c9 wined3d: Remove more dead code.
The opengl extension mentioned in that code was never finished, and as
far as I know there is no way to make use of tangent data in the d3d
fixed function pipeline as well.
2008-07-18 11:40:12 +02:00
Stefan Dösinger e5f42f91b6 wined3d: Remove GL_EXT_vertex_weighting stubs. 2008-07-18 11:40:00 +02:00
Stefan Dösinger ebc77732c1 wined3d: Move the vertexblend support check to the template. 2008-07-18 11:39:44 +02:00
Stefan Dösinger f981afd7d3 wined3d: Check for ATI_ENVMAP_BUMPMAP in the template.
Note that GL_ATI_envmap_bumpmap is not the same as
GL_ATI_fragment_shader. envmap_bumpmap is used together with the
regular opengl ffp pipeline and is not used (other than for
pixelformats) if GL_ATI_fragment_shader is used.
2008-07-18 11:39:38 +02:00
Stefan Dösinger 8bb11dad76 wined3d: Only register the np2 texture fixup if needed. 2008-07-18 11:39:18 +02:00
Stefan Dösinger d247953687 wined3d: Test for multisampling in the template. 2008-07-17 11:45:00 +02:00
Stefan Dösinger 9c1b6581c6 wined3d: Move the point sprite support test into the template. 2008-07-17 11:44:54 +02:00
Stefan Dösinger 94e455343d wined3d: Split the psizemax state handler. 2008-07-17 11:44:48 +02:00
Stefan Dösinger 7740dda1da wined3d: Split the psizemin handler. 2008-07-17 11:44:42 +02:00
Stefan Dösinger 710b9a76b3 wined3d: Move the range fog support test to the template. 2008-07-17 11:44:34 +02:00
Stefan Dösinger df4dcc34aa wined3d: Move a few extension checks into the state template. 2008-07-17 11:44:28 +02:00
Stefan Dösinger 3ee9de462e wined3d: Move an extension check into the state template. 2008-07-17 11:44:21 +02:00
Stefan Dösinger ed49f9a848 wined3d: Coalesce the nvrc and nvts+nvrc state template. 2008-07-17 11:44:15 +02:00
Stefan Dösinger 35f33ef409 wined3d: Add extension information to the states.
This patch adds a new field to the state templates. If this extension
field is != 0, then the line is only applied to the final state table
if the extension is supported. Once a line is applied to the final
table, all further templates for this state from the same pipeline
part are ignored. This allows removing some extension checks from the
state handlers, which cleans them up and saves a few CPU cycles when
applying the states.
2008-07-17 11:44:08 +02:00
H. Verbeet c72c70d609 wined3d: Store the texture in a local variable in sampler_texmatrix().
Slightly improves readability.
2008-07-17 11:36:42 +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
H. Verbeet 7f741f0414 wined3d: Use rev_tex_unit_map instead of assuming there's a 1:1 mapping between samplers and texture units. 2008-07-16 17:54:41 +02:00
H. Verbeet be405c71c0 wined3d: Improve some shader traces.
Make it clear the traced values are hexadecimal.
2008-07-16 17:54:23 +02:00
Andrew Talbot 0064976d54 wined3d: Remove unneeded address-of operators from array names. 2008-07-14 11:50:22 +02:00
Stefan Dösinger e27734779c wined3d: Remove some dead code. 2008-07-14 11:46:33 +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 88ae2fe14a wined3d: Give nv* fixed function stuff its own state template. 2008-07-14 11:46:11 +02:00
Stefan Dösinger 38934fe70d wined3d: Move shader constant affecting states to the misc pipeline.
As long as we have the shader constants in misc, it is best to keep
all the code that affects shader constants, like bumpenvmat setting,
in there as well.
2008-07-14 11:44:48 +02:00
Stefan Dösinger 84d39a95e5 wined3d: WINED3DTSS_TEXCOORDINDEX belongs to the vertex pipeline. 2008-07-14 11:44:36 +02:00
Stefan Dösinger 86b033bbb9 wined3d: Give the nvts/nvrc code its own pipeline implementation.
This code creates the structures and the pipeline selection, as well
as the caps filling. It does not yet move the actual code around,
since this will be a bigger task.
2008-07-14 11:44:26 +02:00
Stefan Dösinger 7c216b8ab5 wined3d: Simplify the fragment pipeline selection.
This should do the same as the existing code, but it is more obvious.
2008-07-14 11:43:51 +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