Commit Graph

542 Commits

Author SHA1 Message Date
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 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
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 141f31f05d wined3d: Move stream source and vshader to misc and vertex pipeline tables. 2008-07-08 10:46:42 +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
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
Stefan Dösinger 8d930f6009 wined3d: Restore the gamma when destroying the swapchain. 2008-07-02 12:27:05 +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
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
Roderick Colenbrander 042d0394dc wined3d: Add a registry key to allow/disallow multisampling.
Right now it is set to disabled due to an Nvidia GLXBadDrawable
bug. Second there is some issue (driver bug too?) in FBO mode.
2008-06-03 11:17:09 +02:00
Francois Gouget 42a61d7ed7 Assorted spelling fixes. 2008-05-06 16:10:20 +02:00
Roderick Colenbrander 7b5561cbb8 wined3d: Allow stencil support when it wasn't requested on broken drivers. 2008-05-05 21:03:39 +02:00
Roderick Colenbrander 628e4eece3 wined3d: Add multisampling support. 2008-04-30 10:23:25 +02:00
Roderick Colenbrander 31dc00a073 wined3d: Store more information about pixel formats. This is needed for some WineD3D_ChoosePixelFormat restructuring. 2008-04-28 13:27:51 +02:00
Stefan Dösinger 9ee7e42de8 wined3d: Call activate_dimensions from the atifs code. 2008-04-24 11:54:28 +02:00
Stefan Dösinger 1c9f1f8ddd wined3d: Support framebuffer reading from texture_rectangle sources. 2008-04-24 11:43:18 +02:00
Stefan Dösinger e3bd5b6dcd wined3d: Use the shader backend to enable / disable atifs and nvts.
The previous logic assumed that if NVTS or ATIFS are available they
will be used. This happens to be true for NVTS, but ATIFS is only used
if neither ARBFP nor GLSL are supported. This breaks fixed function
fragment processing on ATI r300 and newer cards
2008-04-24 11:37:17 +02:00
Austin English 6e59cd2c34 Spelling fixes. 2008-04-22 12:20:12 +02:00
Stefan Dösinger 481bcdfe2a wined3d: Disable MAG filters on formats that do not support them. 2008-04-09 11:53:35 +02:00
Stefan Dösinger a22203adeb wined3d: Make the mag filter lookup a separate array.
This makes it easier to make this a per texture / per adapter property.
Somewhen we should rename the remaining lookup type in the general
lookup table to wraplookup.
2008-04-09 11:48:30 +02:00
Stefan Dösinger 0cbd08b2b9 wined3d: Disable texture filtering on textures that do not support it.
OpenGL always offers filtering on all formats, and if the hardware
doesn't support it the driver falls back to software. Direct3D on the
other hand silently disables filtering, so that's what we should do too.
2008-04-09 11:48:13 +02:00
Stefan Dösinger 4bb54a1ab7 wined3d: Make the min mip lookup type a texture property. 2008-04-09 11:47:58 +02:00
Stefan Dösinger 67e0943ba3 wined3d: Store the number of aux buffers in the context. 2008-04-09 11:47:24 +02:00
Alexander Dorofeyev d6ba069d9e wined3d: Improve detection of device palette change. 2008-04-03 11:31:57 +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 9e831a8733 wined3d: Create a fake non-gl adapter. 2008-04-01 20:31:30 +02:00
Alexander Dorofeyev 165970992a wined3d: Make device palettes dynamically allocated. 2008-03-27 11:09:06 +01:00
Stefan Dösinger 4640be8dc8 wined3d: Fragment processing using GL_ATI_fragment_shader.
This adds code for handling fixed function fragment processing with the
GL_ATI_fragment_shader extension. This is a sort-of programmable
interface for fragment processing at the level of shader model 1.4 in
d3d. This code is of use on r200, r250 and r280 cards(radeon 8500 to
9200) which do not support GL_ARB_fragment_program, but support pixel
shader 1.4 on Windows. This code is somewhat a counterpart to the
existing fragment processing code using GL_NV_register_combiners and
GL_NV_texture_shader.
2008-03-25 19:50:32 +01:00
Stefan Dösinger a440051016 wined3d: Add a shader DLL init callback. 2008-03-25 19:49:17 +01:00
Stefan Dösinger ee7e149998 wined3d: Move shader caps setting into the arb and glsl shader backends. 2008-03-25 19:39:23 +01:00
Stefan Dösinger 5ab5202e0f wined3d: Set shader specific caps in the shader backend.
The whole control structures in directx.c get terribly confusing with
the various codepaths for texturing and different shader
implementations. It is also hard to reflect the shader model
decisions this way too. This patch moves the shader specific parts of
the caps code into the shader backend where we can set our caps
dependent of the shader model decisions and without complex caps flag
checks.
2008-03-25 19:39:11 +01:00
Stefan Dösinger a66fb40d83 wined3d: Move shader generation into the shader backend.
Generating the shader ID and parts of the shader prolog and epilog was
done by the common vertexshader.c / pixelshader.c, which is ugly.

This patch doesn't get rid of all the uglyness, somewhen we'll still
have to sort out the relationship of [arb|glsl]_generate_shader and
[arb|glsl]_generate_declarations.
2008-03-25 19:35:58 +01:00
Stefan Dösinger 84258723f9 wined3d: Make the state table a property of the shader backend. 2008-03-25 19:35:32 +01:00
Roderick Colenbrander 51a8162330 wined3d: Check pixel formats of the same pixel type. 2008-03-21 15:19:05 +01:00
Roderick Colenbrander d44c295651 wined3d: Check the render target capabilities of a resource type. 2008-03-17 11:42:19 +01:00
Stefan Dösinger 167a271434 wined3d: Support more than one texbem instruction per shader. 2008-03-05 19:22:44 +01:00
Stefan Dösinger aeb0e43e3e wined3d: Hardcode local constants in ARB shaders if possible. 2008-03-04 12:15:26 +01:00
Stefan Dösinger 107e80a79c wined3d: Implement a different constant dirtification algorithm.
Add a new property of the shader backend which indicates whether the
shader backend is able to dirtify single constants rather than
dirtifying vshader and pshader constants as a whole. Depending on this
a different Set*ConstantF implementation is used which marks constants
dirty. The ARB shader backend uses this and marks constants clean
after uploading.
2008-03-04 12:15:16 +01:00
Stefan Dösinger 32be503c62 wined3d: Give occlusion queries their own vtable. 2008-03-03 11:58:10 +01:00
Stefan Dösinger 071d4afb2b wined3d: Subclass queries. 2008-03-03 11:57:59 +01:00
Stefan Dösinger 8c758a62e8 wined3d: Remove VBFLAG_LOAD. 2008-02-28 20:10:40 +01:00
Stefan Dösinger f912f18b13 wined3d: Move shader model private data into its own structure. 2008-02-26 11:31:39 +01:00
Stefan Dösinger 825506d5ff wined3d: General cross format blitting infrastrucutre, R32F->R16F blits. 2008-02-26 11:31:19 +01:00
Stefan Dösinger 81de2fa10a wined3d: Add a test for the vFace register. 2008-02-15 09:40:03 +01:00
Stefan Dösinger e7393a8a11 wined3d: Move vertex buffer vbo creation to PreLoad. 2008-02-05 12:42:30 +01:00
Stefan Dösinger 1424e7fd09 wined3d: Make Clear aware of the depth stencil sharing. 2008-02-05 12:37:01 +01:00