Commit Graph

2308 Commits

Author SHA1 Message Date
Stefan Dösinger 2d7cdc3ec2 wined3d: Remove the DLL load init function. 2008-07-08 21:08:54 +02:00
Stefan Dösinger 94b723505f wined3d: Communicate the atifs functions via the fragment pipeline impl.
Move those things out of the state table.
2008-07-08 21:08:54 +02:00
Stefan Dösinger c15dfb87e9 wined3d: Create fragment processing state templates and select one.
For now the atifs selection sticks to the old rules, thus it is bound to
the available and selected shader capabilities. We may want to change that
in the future.
2008-07-08 21:08:54 +02:00
Stefan Dösinger bdfaab5a94 wined3d: Move texture transform flag stuff to the vertex pipeline states. 2008-07-08 21:08:54 +02:00
Stefan Dösinger 68948f0c71 wined3d: Move transforms to the vertex code.
Some fragment pipeline implementations may want to register their own
texture transform handlers.
2008-07-08 21:08:54 +02:00
Stefan Dösinger 1f5bce3454 wined3d: indexbuffer -> misc. 2008-07-08 21:08:54 +02:00
Stefan Dösinger b4bee02556 wined3d: Move the viewport to the vertex and misc pipeline states. 2008-07-08 21:08:54 +02:00
Stefan Dösinger 4b831a5d3e wined3d: Move shader constants to the misc states. 2008-07-08 21:08:54 +02:00
H. Verbeet a637fda7bf wined3d: Store the current GLSL program in the backend's private data. 2008-07-08 10:47:30 +02:00
Stefan Dösinger 95099404d5 wined3d: Move lights to the vertex pipeline states. 2008-07-08 10:47:20 +02:00
Stefan Dösinger 298c953b25 wined3d: Move the scissor rect to the misc states. 2008-07-08 10:47:12 +02:00
Stefan Dösinger 3668f7508f wined3d: Move clipplanes to vertex states. 2008-07-08 10:47:05 +02:00
Stefan Dösinger eb9d3d2a8f wined3d: Move the frontfacing state to the misc state table. 2008-07-08 10:46:57 +02:00
Stefan Dösinger 956bfca1e2 wined3d: Move material application to the vertex pipeline. 2008-07-08 10:46:50 +02:00
Stefan Dösinger 141f31f05d wined3d: Move stream source and vshader to misc and vertex pipeline tables. 2008-07-08 10:46:42 +02:00
Stefan Dösinger 6675374dda wined3d: Make the stream source application a regular state function. 2008-07-08 10:46:32 +02:00
Stefan Dösinger 68dec9d161 wined3d: Implement the state merger and start to use it. 2008-07-08 10:46:20 +02:00
Stefan Dösinger 98faed8ff5 wined3d: Start the state splitup.
The idea of this patchset is to split the monolithic state set into 3
parts, vertex processing, fragment processing and other states(depth,
stencil, scissor, ...). The states will be provided in templates which
can be (mostly) independently combined, and are merged into a single
state table at device creation time. This way we retain the advantages
of the single state table and having the advantage of separated
pipeline implementations which can be combined without any manually
written glue code.
2008-07-08 10:45:56 +02:00
Stefan Dösinger 155d3ac4cc wined3d: Remove an unneeded atifs hack.
The atifs fragment processing implementation doesn't borrow a pixel shader
implementation from anywhere. It was a hack during development, but never needed.
2008-07-08 10:45:05 +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
Maarten Lankhorst 422d71f630 wined3d: Fix a deadlock that may occur during initialization. 2008-07-03 11:50:52 +02:00
H. Verbeet 4f77c29bcf wined3d: Track depth stencil location per-surface.
This gets rid of depth_copy_state in the device, and instead tracks
the most up to date location per-surface. This makes things a lot
easier to follow, and allows us to make a copy when switching depth
stencils in SetDepthStencilSurface().
2008-07-03 11:50:52 +02:00
H. Verbeet e7d0ef72ba wined3d: Use dst_fbo to do the depth blit.
This makes the depth copy independent of the currently attached render
targets. This is important for the next patch because it might do a
depth copy when the render targets aren't in a valid configuration
(SetDepthStencilSurface()).
2008-07-03 11:50:51 +02:00
H. Verbeet 22421b8476 wined3d: Make sure the FBO doesn't have any depth attachments in color_fill_fbo() and stretch_rect_fbo().
Currently this is already true, but the next patch will break that assumption.
2008-07-03 11:50:51 +02:00
Stefan Dösinger 8d930f6009 wined3d: Restore the gamma when destroying the swapchain. 2008-07-02 12:27:05 +02:00
Stefan Dösinger 2d4d18b59d wined3d: Delay render target activation.
The ActivateContext in SetRenderTarget was an old regression prevention,
but now it is time to remove it.
2008-07-02 12:25:12 +02:00
Stefan Dösinger 1c7f39ed1e wined3d: Use CTXUSAGE_RESOURCELOAD for fb->texture reads.
There is no need for _BLIT usage. RESOURCELOAD should be faster.
2008-07-02 12:24:54 +02:00
Stefan Dösinger 74c5684f90 wined3d: Update the blit ortho on size changes.
SetupForBlit sets up the GL viewport and projection matrix for
screen-cordinate access to the framebuffer. These settings were not
updated if the other gl states were already set up for blitting. Guild
Wars reads back an offscreen rendered texture from the framebuffer,
which currently sets up CTXUSAGE_BLIT, then changes the render target,
and draws to the texture, which has to be reloaded from system memory
before it can be rendered to(since GW loaded some data into it). If the
two render targets had different size this failed.
2008-07-02 12:24:35 +02:00
Stefan Dösinger c4eae160d7 wined3d: RENDERTARGET | AUTOGENMIPMAP are compatible.
The test used D3DPOOL_MANAGED which is mutually exclusive with
RENDERTARGET usage, thus the call failed.
2008-07-02 12:24:12 +02:00
H. Verbeet d5a8875b93 wined3d: Extract an attach_depth_stencil_fbo() function.
The idea is to make setting depth attachments a bit more consistent
with set_render_target_fbo()/attach_surface_fbo(). I've also got an
upcoming patch in my tree that needs this.
2008-07-02 11:37:31 +02:00
H. Verbeet a1a14fb2c3 wined3d: Get rid of a redundant local variable. 2008-07-02 11:37:25 +02:00
H. Verbeet d76de4eede wined3d: Specify the GLSL language version our shaders are written to.
This prevents some driver warnings when using language features from
1.20, like "first class arrays".
2008-07-01 12:26:05 +02:00
H. Verbeet d5cbb8375e wined3d: Use ModifyLocation() to force a reload on color key change.
Just unsetting SFLAG_INTEXTURE doesn't work for FBOs because the
drawable and texture are the same there (and ModifyLocation() is the
correct way to do this anyway). Fixes another ddraw test failure with
FBO ORM.
2008-07-01 12:25:54 +02:00
H. Verbeet 8d6dc9daa7 wined3d: Move setting a palette up a couple of lines in BltOverride().
This prevents a few failures in the ddraw tests when using FBOs due to
using P8 surfaces without a palette set.
2008-06-30 12:47:34 +02:00
H. Verbeet 469e791f00 wined3d: Invert "upsidedown" in fb_copy_to_texture_direct() and fb_copy_to_texture_hwstretch() rather than BltOverride().
This inversion is specific to the blit implementation being used,
stretch_rect_fbo() doesn't need it.
2008-06-30 12:47:25 +02:00
H. Verbeet 90b7efe2c4 wined3d: Delete depth_blt_texture on IWineD3DDeviceImpl_Uninit3D(). 2008-06-27 11:10:11 +02:00
H. Verbeet ad59eaf998 wined3d: Report WINED3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING.
As far as I can tell we support post ps blending in combination with
MRTs fine. Tabula Rasa needs this cap in order to enable some of the
higher graphics settings.
2008-06-27 11:10:04 +02:00
Francois Gouget 756b401f8d wined3d: Add a trailing '\n' to a couple of shader_addline() calls. 2008-06-26 21:08:35 +02:00
H. Verbeet c433562a68 wined3d: Explicitly enable depth buffer writing in depth_blt().
This prevents conflicts with WINED3DRS_ZWRITEENABLE.
2008-06-25 10:43:08 +02:00
H. Verbeet ebcb5f23a1 wined3d: Half float formats need ARB_TEXTURE_FLOAT as well.
Currently we only check if ARB_HALF_FLOAT_PIXEL is supported. This is
not enough, we need ARB_TEXTURE_FLOAT as well. This fixes some errors
when running the d3d9 visual test with Mesa swrast.
2008-06-23 12:55:08 +02:00
H. Verbeet 02a2ba9d2f wined3d: Report post pixelshader blending on WINED3DFMT_A16B16G16R16F. 2008-06-23 12:55:02 +02:00
Roderick Colenbrander ee3bbccf6e wined3d: Update the Nvidia driver version to 173.41 and also put it in the right format e.g. 7.15.11.7341 instead of 7.15.10.17341. 2008-06-23 12:53:45 +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 c835b00a36 wined3d: Handle depth formats like any other format in CheckDeviceFormat.
Currently depth formats are handled separately from the other formats,
but depth formats can support things like filtering as well, so we
should check those caps as well.
2008-06-20 11:19:58 +02:00
H. Verbeet a6fa6a4a31 wined3d: Use gl_Color and gl_SecondaryColor to support more varyings in SM3.0 shaders.
SM3.0 requires 10 4 component float varyings for passing stuff between
vertex and pixel shaders. GF7 and earlier report 8 generic varyings +
gl_Color and gl_SecondaryColor in GLSL. This patch allows us to use
gl_Color and gl_SecondaryColor to get 2 extra varyings, which some
games, like C&C3 with highest gfx settings, require.
2008-06-19 11:47:52 +02:00
H. Verbeet 4a4ab5f2ae wined3d: Add support for ARB_color_buffer_float. 2008-06-19 11:47:34 +02:00
Roderick Colenbrander 88b4f29222 wined3d: Add a Geforce9 driver version (right now garbage is returned). 2008-06-18 15:21:56 +02:00
Stefan Dösinger 535e61892c wined3d: Only read back offscreen targets on a target change.
This avoids calling PreLoad needlessly on a thread change during offscreen
rendering and breaks up the endless recursion due to lastTID != newTID.
2008-06-13 10:15:48 +02:00
Stefan Dösinger 78d963039b wined3d: Do not PreLoad the new render target.
There is no reason to do that, now that the SetGLTextureDesc bug is
fixed. This avoids an infinite recursion because PreLoad calls
ActivateContext at some point.
2008-06-13 10:15:26 +02:00