Commit Graph

2419 Commits

Author SHA1 Message Date
Stefan Dösinger b0c4673779 wined3d: Update the surface locations in Present. 2008-08-05 14:09:37 +02:00
Stefan Dösinger 851dd7339e wined3d: Implement overlay flipping. 2008-08-05 14:09:36 +02:00
Stefan Dösinger fad3f9ba98 wined3d: Basic overlay emulation with opengl. 2008-08-05 14:09:36 +02:00
Stefan Dösinger e795d842ec wined3d: Implement overlay position tracking. 2008-08-05 14:09:36 +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 eb0264e2b3 wined3d: Remove a glFlush. 2008-08-05 14:09:36 +02:00
Stefan Dösinger 44d419ad8e wined3d: Call glFlush outside the GL lock. 2008-08-05 14:09:36 +02:00
H. Verbeet 2d6d879562 wined3d: Handle CTXUSAGE_BLIT with offscreen targets and FBO ORM.
This is mostly for correctness, in practice we should always be able
to avoid using CTXUSAGE_BLIT for offscreen targets when FBO ORM is
used.
2008-08-05 14:09:34 +02:00
H. Verbeet b685b84e66 wined3d: Apply FBO state in ActivateContext().
Fixes some GL errors due to calling glDrawBuffer(GL_BACK) when an FBO
is still active.
2008-08-05 14:09:34 +02:00
H. Verbeet 9a9414dfe2 wined3d: Mark STATE_SCISSORRECT dirty in color_fill_fbo().
As pointed out by Alexander Dorofeyev.
2008-08-05 14:09:34 +02:00
Tobias Jakobi 2583975ec7 wined3d: Remove arb_tex_npot for NV FX series in fixup_extensions. 2008-08-04 14:05:01 +02:00
H. Verbeet d28a310f92 wined3d: Use CTXUSAGE_RESOURCELOAD for ActivateContext() in color_fill_fbo().
CTXUSAGE_CLEAR will apply the FBO state in a later patch.
2008-08-04 13:52:16 +02:00
H. Verbeet f037eb8696 wined3d: Move setting the draw buffer to a separate function. 2008-08-04 13:52:09 +02:00
Stefan Dösinger e9827cc916 wined3d: Always load glFinish and glFlush from opengl32.dll. 2008-08-04 13:12:10 +02:00
Stefan Dösinger 399825cd8e wined3d: Report the pitch alignment to ddraw. 2008-08-04 13:10:37 +02:00
Stefan Dösinger 8ee4159e4f wined3d: Only set D3D caps when GL was loaded successfully. 2008-08-04 13:10:20 +02:00
Stefan Dösinger a47e7badb9 ddraw: Set ddraw caps in wined3d.
Currently the ddraw capabilities were almost static, except of D3D
support. When overlay support is added, the caps depend on certain
settings in WineD3D or capabilities available from OpenGL and Xv. So
set those caps in wined3d as well.
2008-08-04 13:10:11 +02:00
Stefan Dösinger 474e7ed98c wined3d: Beware of the frontbuffer coordinate system difference. 2008-08-04 13:09:43 +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
Stefan Dösinger 228f2cf3c2 wined3d: Initialize the texture op function properly. 2008-08-04 13:07:26 +02:00
Francois Gouget a793888a28 Assorted spelling fixes. 2008-08-04 13:04:48 +02:00
Aric Stewart eb4ee4f4ad wined3d: Rework surface Blt a bit to only lock the part of the destination surface being drawn to. 2008-07-31 13:41:14 +02:00
Aric Stewart c08e4927f9 wined3d: Check validity of rects before locking surface in Blt. 2008-07-31 13:41:07 +02:00
H. Verbeet daa59e00be wined3d: Call LoadLocation() on higher render targets as well, simplify some code in drawPrimitive.
It's probably rare for higher render targets to get locked or updated
from sysmem, but this should still be more correct. It also makes the
code simpler.
2008-07-31 13:04:08 +02:00
Stefan Dösinger 14b24058d6 wined3d: GL_ARB_fragment_program ffp implementation. 2008-07-31 13:02:04 +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
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