Commit Graph

45 Commits

Author SHA1 Message Date
Henri Verbeet 00a5f38595 wined3d: Remove object creation methods from the IWineD3DDevice interface. 2011-05-11 14:56:48 +02:00
Henri Verbeet f8f83ff2f7 wined3d: Remove COM from the shader implementation. 2011-03-31 12:37:46 +02:00
Henri Verbeet 3d4fe0b750 wined3d: Get rid of IWineD3DPixelShader. 2011-03-30 12:18:03 +02:00
Henri Verbeet 49725ba583 wined3d: Get rid of IWineD3DVertexShader. 2011-03-30 12:17:51 +02:00
Michael Stefaniuc bc6786d0e5 d3d8: COM cleanup in shader.c. 2011-03-15 17:14:07 +01:00
Henri Verbeet 29ed11e55f d3d8: Merge vertex and pixel shader implementations into a single file. 2010-09-02 11:50:40 +02:00
Roderick Colenbrander d13469c1d8 d3d8: Moved the remaining code over to WineD3D (based on patches by
Oliver Stieber).
2006-02-27 12:20:03 +01:00
Roderick Colenbrander b24e69dc38 d3d8: Move the capability detection code over to WineD3D.
Let the few existing parts which need the capabiliteis use the WineD3D
capability structure (gl_info). This info structure contains next to
'flags' inidicating certain features also all GL/GLX functions
pointers. Because D3D8 moves over to the wined3d gl_info structure all
the gl prototypes in d3dcore_gl.h were unneeded and removed.
2006-02-21 11:28:58 +01:00
Francois Gouget 6d442aeb34 Assorted spelling fixes. 2005-11-23 20:14:43 +01:00
Francois Gouget 0edbaf7e80 Remove spaces before '\n' in traces. 2005-11-10 12:14:56 +00:00
Francois Gouget 6ccb80d9a5 Documentation tweaks to make winapi_check happy. 2005-09-26 09:52:56 +00:00
Oliver Stieber f7eb64ce97 Correct the number of parameters (and partly their names) for the
undocumented functions ValidatePixelShader and ValidateVertexShader.
2005-09-21 09:42:20 +00:00
Marcus Meissner 8e0fb66664 Fixed signedness issues. 2005-07-10 17:48:20 +00:00
Rémi Assailly 6063b542aa char -> const char fixes. 2005-01-24 11:29:44 +00:00
Christian Costa 0de664aa73 S/W vshader fixes (spotted by Eric Pouech). 2004-12-06 16:11:38 +00:00
Eric Pouech 0a258964c2 Const correctness fixes. 2004-11-30 21:38:57 +00:00
Jeroen Janssen cead7c0e81 Updated some MSDN links in the code. 2004-07-30 00:03:02 +00:00
Raphael Junqueira 5f395061ef - the hardware GL vendors (NVidia and ATI) can support more than 95
constants (the Mesa bug) and VRally use the 0..95 indexes so fix it
- fix normalize for some HW VertexShader inputs
- trying to fix the combination of NV_texture_combine_4 with
texture_combine_EXT (impl of D3DTOP_DISABLE, D3DTOP_MODULATE for
NV_texture_combine_4)
- if shaders disabled declare to support 0 for MaxVertexShaderConst.
2004-05-27 01:56:56 +00:00
Christian Costa 1cda8c774b Enabled pixel shaders 1.4.
Fixed handling of macros at the end of vertex shaders.
Handled NOP and PHASE instructions.
Fixed versions of several instructions.
Improved pixel shader dump traces.
Fixed write mask.
Fixed X2 and -X2 source modifiers and implements DZ and DW ones.
Implemented texcrd, texld, texm3x3pad, texm3x3tex, texm3x3spec and
texm3x3vspec instructions (and partially texbem).
Added cnd, cmp and lrp instructions.
Rewrite of the "autoparam" code so we can add more complicated
instructions (only cnd and cmp as well as simple instructions use that
code at the moment).
2004-05-18 00:45:21 +00:00
Christian Costa 0f7b0a089b Implemented pixel shaders using ARB_fragment_program extension. 2004-05-10 19:57:51 +00:00
Francois Gouget 0345908a27 Assorted spelling fixes. 2004-04-28 00:24:44 +00:00
Marcus Meissner 3795a08149 Fixed some strict aliasing issues in dlls/d3d8.
Incorporated bugfix from Christian Costa in vshader_expp.
2004-04-26 20:15:02 +00:00
Raphael Junqueira e4a96cd571 Don't try to create HW Vertex Shaders when code is NULL (ie use
default rendering code using VertexShaderDeclaration for datas) as GL
drivers don't like empty programs.
2004-04-23 21:28:02 +00:00
Francois Gouget 552dae7bf9 Fixed typos. 2004-04-20 20:16:16 +00:00
Christian Costa 1337f2084f Fixed relative addressing.
Enable hw vertex shaders by default.
Moved registry d3d config key to Software\Wine\Direct3D.
2004-04-20 00:28:48 +00:00
Raphael Junqueira c87fd95f1f - fix the SetTextureStageState for D3DTADDRESS_MIRROR using dynamic GL
detection (and not build time GL headers)
- add a new debug channel for hardware vertex shaders
- hardware VS "compiler" fixes:
  -> special case for address registers (MOV must be replaced by ARL)
  -> add line numbers to trace (better to find why NVidia drivers complains)
  -> one parse to determine temporary and address registers needs
    (@todo: check GL limits)
  -> remove duplicate traces from Generic ParseProgram
2004-04-19 23:04:58 +00:00
Alexandre Julliard 4f56863300 Authors: Jason Edmeades <us@the-edmeades.demon.co.uk>, Christian Costa <titan.costa@wanadoo.fr>
Added support for vertex shader (using ARB_vertex_program extension).
2004-04-15 23:58:15 +00:00
Alexandre Julliard e8a339c1d2 Portability fixes for LSB compatibility. 2004-03-01 21:32:02 +00:00
Raphael Junqueira 63c1093f24 - stupid typos fixes on software vertex shader operands
- CopyRects fix (problem in error paths) based on Carlos Lozano patch
2003-11-11 00:43:51 +00:00
Jason Edmeades b3ca47c689 Add real support for VS1.1, ie make the relative addressing mode
work.
2003-09-25 20:22:40 +00:00
Alexandre Julliard e37c6e18d0 Fixed header dependencies to be fully compatible with the Windows
headers (with help from Dimitrie O. Paun).
2003-09-05 23:08:26 +00:00
Jason Edmeades 3cf874bb04 Make the fixed function pipeline support multiple streams for created
vertex shaders with no function supplied. Also split down draw
primitive along the lines of the d3dcore requirements and put in some
diagnostic aids.
2003-06-13 18:09:05 +00:00
Raphael Junqueira b050a3dbf1 - pixel shader program dump code
- pixel shader code split into a new "COM object" (as done before for
  vertex shader)
- some fixes on Validate* functions call types
- add pixel shader (ie fragment_program) detection on caps code
2003-06-04 22:45:57 +00:00
Raphael Junqueira 3cae8cfa69 - implemented render to surfaces (and render to new rendertargets)
using glx pbuffers (with a useful debug code to display rendered
  surface into window drawable)
- better cubetextures
- split utilities functions into utils.c and added more
- more readable debug again
- a better caps code (not perfect but i'll use glx code later)
- use of the new caps code
- begin of UpdateTexture
- begin of Cursor support
- cleaning most of deprecated #if 0/#endif
- correct some lockable/unlockable behavior
- correct some returns code
2003-06-04 21:55:29 +00:00
Raphael Junqueira 9489f8bdc0 - mor usefull debug functions debug_d3dusage and debug_d3ddevicetype
- fix a crash in pixel shader parser (happened with unreal2)
- currently desactive pixel shaders caps (with #define) while hw
  shaders code isn't merged
- when we have a special debug channel for shader, use it ;)
- fix again some stubs return value
- more more readable traces now (principaly IDirect3D8 capacities
  check and surface locking code) using new debug functions
- fix/cleaning the surface locking code
- now we support D3DTOP_SUBSTRACT so declare it in caps
- now support true 32bit (well X 24 bit can be used as 32 bit in caps
  code)
- first try to get D3DTSS_TCI_CAMERASPACENORMAL and
  D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR look good
- native support 32 bit support (now application can choose 16 or 32
  bit support) if current resolution is 24 bit (as we can only launch
  games in windowed mode)
- textures palettes support
- fix reflexion placement code (the sdk sample begin to work)
- fix a stupid crash when using traces in vshaderdeclaration
- more more readable traces (init/caps)
- more cubetextures fixes
2003-05-17 18:33:02 +00:00
Raphael Junqueira c816f31416 - new debug channel for shaders code 'd3d_shader'
- more debugging traces
2003-05-14 19:34:00 +00:00
Jason Edmeades 8534f79124 - Move texture loading into PreLoad for 2D textures (needs doing for
the others as well), and call when needed as well.
- Change D3DFMT_R5G6B5 handling to make backdrop of Max Payne appear.
- Add code to reject attempts to use invalid texture units (Max Payne
  did this a lot).
- ValidateDevice fixme silenced as harmless but occurs frequently.
- Add trace which can be compiled in to debug vertex shaders, and
  correct fixmes and dprintf's into appropriate trace statements.
- Ensure we trace what we return when querying the device caps.
- Correct bug with negative numbers in vertex shader code.
2003-05-08 03:49:04 +00:00
Alexandre Julliard 31e78f479e Header files must not include config.h. 2003-04-12 00:06:42 +00:00
Raphael Junqueira 4b0297d894 Some needed cleanups for future dx9 and d3d common layer support:
- stateblocks to IDirect3DStateBlockImpl interface and moving into
    a new file (stateblock.c)
  - shaders to IDirect3D*ShaderImpl interfaces
  - splitting vshader and vshader declaration as in dx9 into 2
    interfaces (for future common layer use)
  - vshader declaration code to a new file (vsaderdeclaration.c)
  - device calls to new interfaces (redirect stubs)
Simple texture fix for a little regression after last Jason's patches.
Some caps code using the GL/glext.h defines (GL_VERSION_*).
2003-01-28 01:12:23 +00:00
Alexandre Julliard f8aa3b506c Added -Wpointer-arith gcc flag, and fixed the resulting warnings. 2003-01-23 21:32:35 +00:00
Raphael Junqueira 6b03dd5c85 - move input and output data in VertexShader struct
- better traces
- specific input data filling function for vertex shaders using vertex
  shader declaration (and not FVF ... maybe FVF will return for fast
  path with simples vertex shader declarations)
- huge vertex shader fixes:
  - add and fix many vs (1.0->2.0) used opcodes in complex shaders
  - improvements to programs parser: parse comments, version, ..
  - add a vertex shader input filler function (parsing vertex shader
    declaration): almost complete
- comments most of the traces (else flood ...)
- add more urls in comments
- indent, cleanups
2003-01-14 20:29:33 +00:00
Patrik Stridvall 46304a7361 Fixed some issues found by winapi_check. 2003-01-02 19:28:09 +00:00
Raphael Junqueira 559b10699f - integration with DrawPrimitive
- remove non-esthetic c++ comments into c comments block ;)
- more more debug
- indent, cleanups
- trying to use DIFFUSE and SPECULAR for vertex shader
- many fixes
- integration with Jason's texture patch
2003-01-02 17:59:01 +00:00
Raphael Junqueira 1df8f18e46 - some fixes in CreateDevice init
- vertex shader declaration parser (with output dump) and
   interpretation (generate the FVF descriptor for program input)
 - vertex shader program parser (with output dump)
 - software vertex shader program emulation
2002-12-18 05:05:41 +00:00
Raphael Junqueira e31ae92630 - some D3D8 fixes
- beginning of shaders support (Vertex and Pixel Shaders 1.1 on
  DirectX8)
- beginning of D3DX8 support the D3D8 utility API (very basic, only
  the core header)
2002-12-17 01:15:15 +00:00