Commit Graph

242 Commits

Author SHA1 Message Date
Christian Costa 810231c592 Some more texture ops fixes. 2004-06-21 23:53:59 +00:00
Raphael Junqueira ac6f401056 - fix version string
- some fixes to ATI specific paths of set_tex_op (Christian needs to
  complete it)
- fix use of GL_SUPPORT(NV_TEXGEN_REFLECTION). I have used the wrong
  define, I'll get a brown paper bag :(
2004-06-14 16:57:41 +00:00
Raphael Junqueira f86e64e1ae Compile fix. 2004-06-02 00:35:41 +00:00
Christian Costa 5b75c15b8b Implemented some texture operations using ATI_texture_env_combine3.
Fixed D3DTOP_LERP.
Fixed some checkGLcall error messages.
2004-05-28 03:39:42 +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 483803ff42 Added retrieval of ATI info. 2004-05-21 20:53:19 +00:00
Marcus Meissner e3a37c8a26 Revert broken strict aliasing fix. 2004-05-21 20:52:57 +00:00
Raphael Junqueira 40dd9692d9 - first draft of D3DCLIPSTATUS8 handling (not really used for now)
- add a new DEBUG_SINGLE_MODE #define (for debug caps needs)
- better traces for surface dumping
- much better Texture support on Utilities functions and on
  CheckDeviceType
- D3DRS_ZVISIBLE as unsupported (as seen in msdn)
2004-05-19 04:33:42 +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 36819ae09f Handle XYZRHW vertex mode correctly in slow path. 2004-05-17 19:49:01 +00:00
Ivan Leo Murray-Smith 10778aa761 Updated the version info of all DirectX dlls to the version numbers of
DirectX 9.0b for Windows 2000/XP.
2004-05-14 21:37:32 +00:00
Christian Costa a967e7755e Fixed W buffer handling. 2004-05-10 21:24:21 +00:00
Christian Costa 0f7b0a089b Implemented pixel shaders using ARB_fragment_program extension. 2004-05-10 19:57:51 +00:00
Francois Gouget 9f1aea2fb8 Assorted spelling fixes. 2004-05-05 01:09:24 +00:00
Alexandre Julliard ac7b9451f7 Authors: Christian Costa <titan.costa@wanadoo.fr>, Jason Edmeades <us@the-edmeades.demon.co.uk>
Fixes for rendering targets.
2004-05-02 04:22:31 +00:00
Raphael Junqueira d52c5080cf - Fix compilation again using olders GL headers
(glCompressedTexImage2DARB problem).
- Fix typo on constant.
- Detection of NVidia texture_shader and register_combiners
  extensions.
- Begin to implement BUMPMAPPING using NVidia Texture shader extension
  (not really working for now).
2004-04-29 00:20:18 +00:00
Francois Gouget 0345908a27 Assorted spelling fixes. 2004-04-28 00:24:44 +00:00
Christian Costa 15ccb11ea5 Implemented fast rendering to a texture using glCopyTexImage2D
Fixed SetViewport.
Fixed SetRenderTarget (based on Jason Edmeades' work).
Improved trace.
2004-04-26 23:34:17 +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 b4a37991ef - implement SetRenderState D3DRS_FOGENABLE/D3DRS_RANGEFOGENABLE
- implement SetRenderState D3DRS_RANGEFOGENABLE
- fix SetRenderState D3DRS_FOGVERTEXMODE Caps/Detection traces
- fix IDirect3D8::GetAdapterIdentifier to use FillGLCaps and provide
  more exact infos (driver versions, vendor, ...)
- split Fake GL Context creation from GetDeviceCaps for external use
- add a new channel (d3d_caps) for all IDirect3D8 Caps/detection traces
- rename fps channel to d3d_fps
- high use of runtime detected OpenGL Caps instead of defines
- update supported Caps using runtime detection
2004-04-26 20:12:28 +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
Raphael Junqueira b42da1c51c Fix some random crashes found on some games in the new code (live
GLX/GL drivers).
2004-04-23 21:27:30 +00:00
Raphael Junqueira 58080d4f6a - more FIXME -> TRACE
- begin vendor/card detection (versions/names)
2004-04-22 23:46:05 +00:00
Christian Costa 1811e198f7 Converted some FIXMEs into TRACEs. 2004-04-21 22:24:22 +00:00
Francois Gouget 552dae7bf9 Fixed typos. 2004-04-20 20:16:16 +00:00
Raphael Junqueira 8e2da3e50d Fix the d3dcore_gl part of HW vertex shader support for brokens GL
headers.
2004-04-20 20:15:29 +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
Raphael Junqueira 5b17606a50 Fix the GL_MAX_VERTEX_UNITS_ARB undeclared compilation error. 2004-04-02 23:26:52 +00:00
Francois Gouget 359c709d59 Assorted spelling and case fixes. 2004-03-31 20:06:10 +00:00
Raphael Junqueira 114c9077d6 - more Extensions work (begin to detect ATI extensions)
- try to fix D3DTADDRESS_BORDER, D3DTADDRESS_MIRROR,
  D3DTADDRESS_MIRRORONCE using OpenGL extensions
- better set_tex_op: now use Runtime Extension support (and not
  compile support)
2004-03-30 05:14:57 +00:00
Raphael Junqueira 9fb52e7716 - support of D3DTSS_MAXMIPLEVEL
- support of D3DTSS_MIPMAPLODBIAS (using EXT_TEXTURE_LOD_BIAS extension)
- correct support of D3DTSS_MAXANISOTROPY for D3DTSS_MAGFILTER and
  D3DTSS_MINFILTER
- fixes for D3DTSS_MAGFILTER and D3DTSS_MAGFILTER
2004-03-27 20:42:14 +00:00
Alexandre Julliard 9e4ed6460c .spec.c files are no longer used for 32-bit dlls. 2004-03-24 03:36:44 +00:00
Francois Gouget b948778660 Assorted spelling fixes. 2004-03-23 23:20:16 +00:00
Ofir Petruska fe334f7e20 Keep the checkGLcall glActiveTexture/glActiveTextureARB separation in
all the file.
2004-03-23 23:13:56 +00:00
Ofir Petruska 4a8f7b23ad Define EXTRA_TRACES instead of #if 0. 2004-03-23 23:02:10 +00:00
Christian Costa 2616b57533 AddRef texture only if there is one for the requested stage. 2004-03-20 02:33:00 +00:00
Alexandre Julliard e8a339c1d2 Portability fixes for LSB compatibility. 2004-03-01 21:32:02 +00:00
Francois Gouget ad5ff7ceeb Assorted spelling and case fixes. 2004-02-09 22:07:42 +00:00
Alexandre Julliard 20b4585e3c Only link against libdxguid where necessary. 2004-01-27 00:11:16 +00:00
Ge van Geldorp 399901e054 Rename LARGE_INTEGER and ULARGE_INTEGER members "s" to "u" to conform
with PSDK.
2004-01-23 01:51:33 +00:00
Alexandre Julliard 4e4460eaef There's no need for DUMMYUNIONNAME in private headers. 2004-01-08 05:27:23 +00:00
Francois Gouget 640cc3f3e1 Assorted spelling fixes. 2004-01-06 22:08:33 +00:00
Jason Edmeades e086402f9a Fix the draw*primitiveUP calls so they work directly after a draw
which uses vertex shaders.
2004-01-06 00:36:45 +00:00
Jason Edmeades 912c09b8ef Disable the use of the 'w' parm in rhw mode. 2003-11-17 20:04:44 +00:00
Jason Edmeades 61608b71fc If swap mode is discard, clear the backbuffer before moving onto the
next frame.
2003-11-17 20:04:30 +00:00
Jason Edmeades 96be4449f3 Use the current window visual only. 2003-11-17 20:04:08 +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 dfccba7153 Pass through floats correctly to the render states at
initialization. Fixes point problems.
2003-11-04 04:17:52 +00:00
Carlos Lozano d970c097f4 Check that we don't write out of the defined range of palettes. 2003-11-04 04:17:28 +00:00
Jason Edmeades 2b832f11a5 Make support for CopyRects to a small area of the back buffer, and
correct the general method of updating the back buffer.
2003-10-31 04:15:07 +00:00
Jason Edmeades ef8a634cb4 Clear should not be affected by write masks. 2003-10-31 03:35:43 +00:00
Jason Edmeades ef65d2a6a6 ColorWriteEnable should not impact clearing the screen. 2003-10-31 00:09:07 +00:00
Jason Edmeades 0b37bf74b9 CopyRects (per rect) copied one too many lines, trashing the heap.
Also tidies up scissor test from previous patch.
2003-10-30 23:24:44 +00:00
Jason Edmeades c922278bfa Culling to different viewports failed as clearing the whole viewport
cleared the screen.
2003-10-30 23:05:09 +00:00
Jason Edmeades 14231aa83b Correct writing to back buffer in non-ortho mode, and ensure the line
stipple is passed correctly to enable proper wireframe support.
2003-10-30 22:46:29 +00:00
Dimitrie O. Paun fbdfd910c1 Remove SYMBOLFILE and LDDLLFLAGS from Makefiles. 2003-10-11 01:09:15 +00:00
Jason Edmeades e0faa866e0 DXTn stride is to the next block, which is the equivalent to 4 rows
worth of bytes.
2003-10-07 03:31:46 +00:00
Jason Edmeades 78a7c5f28e Check for advertized vertex blend support before querying device
capabilities, which silences issues about vertex blending.
2003-10-03 04:35:07 +00:00
Jason Edmeades 06fd1e25f7 Minor fixes - Remove light debug statements, handle disabled specular
material properly, release surfaces when debugging and clean up trace
a little.
2003-10-03 03:35:53 +00:00
Jason Edmeades 8b2c10bcd4 MaxActiveLights means number of concurrent lights, but any number can
be  set up. Change support for lights into a linked list and only set
up an equivalent gl light when the light is enabled.
2003-09-30 00:21:07 +00:00
Jason Edmeades ba69d05022 Make unlock of the backbuffer correctly restore the contents. 2003-09-30 00:20:08 +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
Jason Edmeades de3b0dfffb The 'w' component is used more than just for the vertex, so we cannot
do the projection mapping ourselves. Also tidy up a tracepoint, and
preinitialize the shaders output as windows seems to.
2003-09-25 20:22:21 +00:00
Jason Edmeades ce85a90538 DXTn format has odd mipmap levels in that the space allocated for
small levels needs a lot of padding.
2003-09-19 04:02:35 +00:00
Jason Edmeades 7ac9d258c3 GL doesn't like incorrect lengths passed into DXTN processing. 2003-09-19 00:20:19 +00:00
Jason Edmeades 40b09a23e5 Vertex shader output is lit and transformed, so stop GL doing it all
again.
2003-09-19 00:07:34 +00:00
Jason Edmeades 74c3281bef Simple fix to handle the more common case of actually having a GL
context!
2003-09-19 00:07:16 +00:00
Alex Pasadyn ad22804e28 Enable resolution changes for D3D8 applications. 2003-09-16 20:24:49 +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 d9b8dfd7da Use a dummy GL context if one is not available when GetDeviceCaps is
called.
Remove the compiler warnings introduced in the last DXTn patch.
2003-09-02 00:53:21 +00:00
Jason Edmeades beb4ac8fe1 DXT1/3/5 support was broken, but unnoticeable since we also indicated
it wasn't supported.
2003-08-15 03:50:08 +00:00
Patrik Stridvall ba78aac406 Fixed some issues found by winapi_check. 2003-08-08 21:07:23 +00:00
Jason Edmeades d8b2109e61 Only reapply the texture states necessary when a different texture
gets bound to the same texture unit.
2003-08-05 19:18:58 +00:00
Jason Edmeades 2ec3bbccc1 glColorMaterial enable/disable setup is only done when really necessary.
If glColorMaterial is set to track current color and none is supplied,
it gets disabled.
glMaterial is reset when I think it is necessary.
Slow mode now has defaults for when fvf parms are not supplied (as per
fast mode).
Slow mode now sets up the specular color (forgot that bit previously,
I think!).
Trace now lists the front, back and stencil buffers for ease of
debugging.
2003-08-05 18:29:20 +00:00
Jason Edmeades 862a1073a5 Disable client texture states when not in use (fast mode) otherwise
traps occur.
Correct number of texture coords supplied in both fast and slow mode.
Dont supply a default colour of white when diffuse mode is disabled.
Reenable fast mode.
2003-07-21 20:01:23 +00:00
Jason Edmeades 564f5828b0 Add fps debug channel, so we can see how the d3d code is performing and
their impact of performance changes.
SetTransform almost rewritten in a much neater way, and in
coordination with drawprim it significantly reduces the number of
times that we reload the matrixes.
2003-07-19 03:02:42 +00:00
Alexandre Julliard d09b2b988a Warning fix. 2003-07-15 20:52:21 +00:00
Raphael Junqueira d5ca917a36 - some cosmetic fixes
- fix a bug on IDirect3DVolume8Impl_AddDirtyBox
2003-07-08 21:01:48 +00:00
Jason Edmeades 021604c600 Implement UpdateTexture for 2D textures only.
Handle alphaop disabled but color op not-disable in a more appropriate
way (Docs say this is an illegal state and then proceed to use it).
Trace out textures as they are created.
Update the comments around the debug code and complete the debugging
set so textures which are used in the game can also be viewed.
2003-07-03 18:10:22 +00:00
Jason Edmeades 9a9fcd1ad4 Ensure MIPMAP levels is reset when rebinding an existing texture to a
texture unit.
2003-07-02 00:38:01 +00:00
Jason Edmeades 39538a5a9c Add GetLevelCount to the basetexture class. 2003-07-02 00:37:40 +00:00
Jason Edmeades 86cb1cec75 Ensure pixel coordinates point to the bottom left of the pixel not the
middle.
2003-07-02 00:36:59 +00:00
Dmitry Timoshkov 4e1ef0c114 For all DLLs with defined DllMain and which do not require
DLL_THREAD_ATTACH/DLL_THREAD_DETACH notifications, call
DisableThreadLibraryCalls() in order to slightly improve performance
on thread creation/exiting.
2003-06-30 20:53:48 +00:00
Raphael Junqueira dcddfbc140 - currently always use sloaw path as fast path have some problems
- fix APIENTRY mismatched value used by gl func pointers (in
  d3dcore_gl.h)
2003-06-27 22:20:44 +00:00
Raphael Junqueira 44edc0c0ec - dsound and d3d works better when x11drv locks/unlocks are correct
- more traces
2003-06-18 03:17:42 +00:00
Raphael Junqueira bf2121a312 Fix AddDirtyRect uncorrect behavior (crash in some cases). Based on a
patch from Roderick Colenbrander.
2003-06-16 20:20:25 +00:00
Jason Edmeades 21a092816a Fix the texture operations to resolve glitches shown in UT2003 when
get quad damage.
checkGLcall must not supply a \n as that is supplied by its
expansion.
Performance fixes to save applying the same states 6 times and to
reduce function calls when accessing front/back buffers.
Make traces more readable by more constants -> english descriptions.
2003-06-13 19:14:34 +00:00
Jason Edmeades 5593a08334 When emulating fullscreen it helps to not allocate space for menu bars
and borders. Make this window a popup window.
2003-06-13 18:53:06 +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 85aa298ad2 Fixed compilation problems. 2003-06-06 18:12:59 +00:00
Raphael Junqueira e4882b1548 - cleaning of volume.c/volumetexture.c as done previously for
surface.c/*texture.c (with add of lockable, locked and Dirty flags)
- add of dirtyRect/dirtyBox for better dirtification management (not
  used yet, but huge optimisation can be possible now)
- fix some debug traces (well it's better to use debug_d3dpool)
- fix some stupid regression on point parameters (forgot to check
  extension on fillcaps)
2003-06-04 23:05:46 +00:00
Raphael Junqueira 713013a978 - add a new private header d3dcore_gl.h that declares needed opengl
defines and the caps defines
- cleanup of device.c using the caps defines (avoid the #ifdef
  nigthmare)
- add {Set,Get}GammaRamp support
2003-06-04 23:01:49 +00:00
Raphael Junqueira 24be30657d - some cleanup and warning fixes
- split of CreateDevice gl/gxl detection code into FillGLCaps
- implementation of resolution change (using ChangeDisplaySettings)
  but desactived as ChangeDisplaySettings don't seem to work well
- begin of swap chain support (now need to split/clean
  gxlpbuffer/glxpixmap code for swap chain use)
2003-06-04 22:55:19 +00:00
Jason Edmeades bca452eea6 Fix the glRead call when pRect != NULL, resolve the file format of the
saved snapshot correctly.
2003-06-04 22:51:14 +00:00
Raphael Junqueira 8bde56dad0 - fix another time the stupid locking bug (i had already fixed it in
ActiveRender)
- fix stupid rescaling of colors values on SaveSnapshot
2003-06-04 22:47:53 +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
Jason Edmeades 3d51c865d4 Add support for a lot of the remaining texture ops, move code into the
utils module, and clean up the main code path.
2003-06-04 22:20:47 +00:00
Raphael Junqueira 0b5e9d9feb - some cleanups
- more cubetextures fixes (now d3d8 sdk cubemap sample work almost
  perfectly)
- add a new debug function "debug_d3dpool" and use it
- add a new param (the device) for the conversions functions (because
  we need to check caps to see how to convert)
- some crashes fixed in render to surface code with no stencil-depth
  surface
- a very simple cliplane fix
- a stupid palettes fix (stupid language)
- begin of anisotropic filter support
- begin of compressed textures support
- a very useful debug functions: IDirect3DSurface8Impl_SaveSnapshot to
  dump surfaces as png ;)
- many useful surfaces debug code (using SaveSnapshot)
2003-06-04 22:12:34 +00:00