Commit Graph

111 Commits

Author SHA1 Message Date
H. Verbeet f5c2e85b46 wined3d: Return the correct pixelshader in
IWineD3DDeviceImpl_GetPixelShader.
2006-01-20 16:13:12 +01:00
H. Verbeet 4e7b2557b5 wined3d: Cleanup shader constants code a little bit.
Improved bounds checking.
2005-12-20 11:46:52 +01:00
Oliver Stieber 8ff9a7eb55 wined3d: Allow NULL multi sample quality.
Allow MultiSampleQuality to be passed as NULL, this is a
requirement for DirectX 8 and lower.
2005-12-16 12:49:22 +01:00
Oliver Stieber 74e28a354f wined3d: Vertex declaration recording state.
Stop SetVertexDeclaration from reference counting if a stateblock is
being recorded.
2005-12-16 12:38:24 +01:00
Oliver Stieber e76969b0d6 wined3d: Internal reference counting.
Change most references to resources parent into references to the
resource, so that external reference counts match DirectX but object
aren't released if they are still referenced by the stateblock.
2005-12-15 10:25:47 +01:00
H. Verbeet dabcbe83e7 wined3d: Return the correct vertex declaration.
In IWineD3DDeviceImpl_GetVertexDeclaration, return the vertex
declaration in This->stateblock instead of the one in
This->updateStateBlock.
2005-12-14 10:50:27 +01:00
H. Verbeet 6077c63feb wined3d: Don't change the shader's refcount in SetVertexShader and
SetPixelShader.
2005-12-13 11:11:01 +01:00
Oliver Stieber 7c482cb9a1 wined3d: Vertex shader 8 support.
Start to add support for DirectX 8 vertex shaders, constants and
registers are now correctly assigned and loaded allowing support for
most basic d3d8 shaders.
2005-12-09 11:23:52 +01:00
H. Verbeet 4880c586d8 wined3d: return D3DERR_INVALIDCALL when calling BeginStateBlock and
already recording.
2005-12-03 18:04:26 +01:00
Oliver Stieber aa9ce3577a Added support for vertex and pixel shader constants that have no type
i.e. they haven't been set yet or are clear.
2005-11-29 17:05:54 +01:00
Oliver Stieber 5903c5df1b Stop reporting not having swapchain 0 as an error and add an internal
variable instead of modifying a parameter.
2005-11-28 10:59:41 +01:00
Francois Gouget 6d442aeb34 Assorted spelling fixes. 2005-11-23 20:14:43 +01:00
Oliver Stieber 932815d6f0 Implement a pixel shader parser and cross compiler. All version of
shaders up to 3 should be parsed correctly, but only shaders 1-1.4
will be cross compiled.
2005-11-21 16:27:55 +00:00
Oliver Stieber bcb4201130 Disable support for creation FMT_Unknown textures. This gets most of
the d3d8 demos from www.codesampler.com working.
2005-11-17 11:40:43 +00:00
Raphael Junqueira 705aec5a6f - defined D3DCOLOR_B macros to access byte values of D3DCOLOR
- use D3DCOLOR macros instead of using shift + masks
- fix a bug where diffuse.lpData checked instead of specular.lpData
- implement color fixup on ARB VShader compilation code:
 -> on input parameters using swizzle
 -> add is_color parameter on vshader_program_add_param
2005-11-15 12:03:13 +00:00
Oliver Stieber a8d9a2a4ac Fix an intermittent lockup with ATI's driver, I expect the problem is
trying to clear the display before it's visible. Also correct the
clear alpha value.
2005-11-14 12:28:59 +00:00
Francois Gouget 0edbaf7e80 Remove spaces before '\n' in traces. 2005-11-10 12:14:56 +00:00
Oliver Stieber 39d6e30db0 Prevent SetFVF from clearing down the vertex declaration of the FVF is
zero. This is required for Prince of Persia, The sands of time.
2005-11-07 11:12:38 +00:00
Oliver Stieber 0e3a3555e9 Tidy up UpdateTexture and add support for updating cube textures. 2005-11-04 12:39:17 +00:00
Oliver Stieber f52f6ce93d Add support for updating to D3DFMT_UNKNOWN surfaces and tidy up update
surface a little.
2005-11-04 11:13:45 +00:00
Oliver Stieber d6fcc69ddb Implement D3DFMT_UNKNOWN surfaces, this seems to be used a lot in d3d8
but I haven't found any d3d9 application that uses D3DFMT_UNKNOWN
surfaces yet.
2005-11-02 20:01:54 +00:00
Oliver Stieber 1f2a9e2c31 Move the softwareVertexProcessing flag from the stateblock to the
device because its state shouldn't be recorded in a stateblock.
2005-10-29 10:30:36 +00:00
Vincent Béron 5eae622f44 Don't define some functions/variables if they won't be used after in
wined3d.
2005-09-29 10:47:59 +00:00
Oliver Stieber b3563daca2 Implement state tracking for pixel shader constants. 2005-09-28 10:13:00 +00:00
Francois Gouget a8c7284f92 Assorted spelling fixes. 2005-09-26 10:58:41 +00:00
Oliver Stieber 9e6957bbdc Optionally repack nonpower 2 textures to the expected span length when
a textures is locked. This is necessary for buggy games like Warhammer
40k that don't work with the odd span sizes produce by default
nonpower 2 support.
2005-09-23 11:08:03 +00:00
Oliver Stieber 357a484a7e Enable dxt2 and dxt4 compressed textures to be created via
Device_CreateSurface.
2005-09-23 10:48:01 +00:00
Oliver Stieber 0fac2d96fc Clean up all the objects bound to the device when the device is
destroyed as a result of its ref count reaching zero.
2005-09-23 10:07:46 +00:00
Alexandre Julliard 0ec0f048e6 Removed unused debug channels. 2005-09-22 10:44:40 +00:00
Oliver Stieber 329d017db3 Start to implement TestCooperativeLevel. 2005-09-21 10:55:03 +00:00
Oliver Stieber 0c2fcf2efe Added support for state management of vertex shader constants via
stateblocks.
2005-09-21 10:19:29 +00:00
Oliver Stieber 5ea96a851f Implemented occlusion queries using either GL_ARB_occlusion_query or
GL_NV_occlusion_query.
2005-09-21 09:43:13 +00:00
Oliver Stieber 7df17cecce Stop vertex shader constants from being set at the same time as the
vertex shader when a stateblock is applied.
2005-09-19 14:30:34 +00:00
Oliver Stieber f7413fd63f Implemented point sprites using ARB_POINT_SPRITE extension. 2005-09-03 09:36:48 +00:00
Oliver Stieber 55124ec05e Added the tracking of stream frequency and flags. Stream flags and
frequency aren't handled at the moment.
2005-09-02 11:17:17 +00:00
Oliver Stieber 33b2c1fd3c Added support for DXT2 and DXT4. 2005-08-29 12:20:02 +00:00
Oliver Stieber f1a2ee521d Implemented IWineD3DDevice_GetRenderTargetData. 2005-08-29 10:15:47 +00:00
Oliver Stieber 42eff0f92b Moved GetRasterStatus from device to swapchain. 2005-08-27 09:58:53 +00:00
Oliver Stieber 2af36c646e Implemented stubbed out pixel shaders and their states in wined3d. 2005-08-25 19:24:21 +00:00
Oliver Stieber 3f24b9164d Fix quite a few texturing problems and cases where text isn't being
correctly displated.
2005-08-22 10:07:10 +00:00
Oliver Stieber 45033446bb Tidy up some formatting, improve error handling and error logging and
fix a couple of spelling mistakes.
2005-08-22 09:13:49 +00:00
Oliver Stieber 1be54d8b79 Integrate hardware vertex shaders into the drawing pipeline. 2005-08-19 10:05:00 +00:00
Oliver Stieber 2c0e97e641 Copy the parser and cross compiler from d3d8 and update everything to
vertex shaders 3.0.
The Parser will now display the input shader in DirectX style, and the
cross compiler now generates valid ARB_VERTEX_PROGRAM programs and
outputs the result in ARB_VERTEX_PROGRAM style.
Support for a number of extended attributes has been added, but this
may not be complete, and dereferencing from loop counters isn't
properly parsed yet.
2005-08-17 11:34:03 +00:00
Oliver Stieber 9b0b803b47 Add support for vertex shader constants to the stateblock. 2005-08-17 10:27:01 +00:00
Francois Gouget bcd56fe0e5 Assorted spelling fixes. 2005-08-12 18:22:06 +00:00
Oliver Stieber 2e851544dd Allow the palette to be set and retrieved. 2005-08-11 10:57:20 +00:00
Oliver Stieber 313b01073c Track the state of softwareVertexProcessing. 2005-08-11 10:31:40 +00:00
Oliver Stieber e31bc6cea4 Moved support for non power 2 texture to hardware.
Fix for the texture state separation patches, ApplyTextureStates is
now called instead of being commented out.
2005-08-03 19:49:05 +00:00
Oliver Stieber bb6f9b022b Move the setting of states from device to basetexture, states that
relate to the opengl texture object will only be updated when they are
out of sync, this reduces the number of texture object state changes
during game play in Axis and allies from several hundreds to 0 or 1.
2005-08-03 11:00:28 +00:00
Oliver Stieber d344162f41 Separate the setting of the DirectX texture and sampler states from
the setting of OpenGL states (now in applyTextureStateState and
applySamplerState).
2005-08-01 10:58:31 +00:00