DirectX Tasks

Be sure to read the DirectX page for more background information. The IntegrationProjects page also has some ideas for further work on DirectX in Wine.

General To-Dos

Code Cleanup:

  • Shader translator still needs some cleaning up
  • Prefer GL_EXT_framebuffer_object over pbuffers.

  • Avoid as many GlReadPixel and GlWritePixel calls as possible

Improvements and Optimizations:

  • Speed up color depth conversions (8bpp) with a shader.
  • Completely GL independent 2D operation (lazy linking).
  • Improve the heap code and cache data instead of doing HeapAlloc (Resource Caching) for better performance.

  • Window sizes / fullscreen support still needs more improvements and testing.
  • Support more query types, implement the timestamp queries using GL_nv_fence (see Nvidia's QuerySample user guide, MSDN's article on queries).

  • Proper support for floating point texture formats (for proper deferred shading and HDR support).
  • Fixups using vertex shaders instead of software ie, fixed function pipeline replacement.
  • Caps code to fully support 3.0 pixel and vertex-shaders (see Microsoft's pixel-shader reference).

Needed Features:

  • Software s3tc handling
  • Record per-version surface refcounts (see http://bugs.winehq.org/show_bug.cgi?id=23621)

  • YUV overlays
  • Multisample support, ie FSAA etc. will require changes to (OpenGL child windows)
  • Finish shaders 3.0 support and make shaders 2.0/3.0 the default using GLSL if the card supports it. see DirectX-Shaders

  • Lock/Unlock: Only restore or copy when needed (example no save renders when WRITE_ONLY flags was used)
  • Visible Z Buffer
  • Priority Levels (should be reasonably easy as opengl has this functionality)
  • Level-of-Detail support (see the following white paper).

  • Device interface
  • Implement EvictManagedResources and ResrceMgrDiscard

  • Implement Check* functions, TestCoop, ValidateDevice, and GetInfo (the last two require better caps support).

  • VB script execution support (actually only source is loaded). Maybe using a generic Wine VB script kernel (as the vbscript.dll seems to provide on windows) using ole32/com (most of the needs are already here)
  • Find way to access OpenGL's hardware clip-list to properly support windowing.

Testing:

  • Get 3dmark software to the point of producing valuable output
  • Add more testcases, including visual ones
  • Test different Cards/Drivers: Nvidia, fglrx, mesa
  • Write some tests related to configuration

To-Dos by Component

DirectDraw (a.k.a. D3D versions 1 through 7)

  • OpenGL (partially there already) and Xrender accelerated DDraw.

  • Allow explicit creation and access of front and back buffers for DDraw] interfaces earlier than version 7. The current implementation uses version 7's style and prohibits this, which breaks some games.

D3D8

  • D3D 8.1 graphics rendering pipeline (schematic thanks to Richard Thomson.

  • Filter wined3d caps in d3d8 :
    • We could detect all the card capabilities in wined3d (for a part this is done, for a part the d3d version is detected)
    • And in d3d8 we could show only the caps corresponding to that d3d version.

D3D9

  • D3D 9.0 graphics rendering pipeline (schematic thanks to Richard Thomson.

  • Correctly manage NULLS as input and output.
  • Generate 'c' style log files that can be compiled and executed with wine and winegcc for implementing test cases.

D3D10

  • D3D 10.0 graphics rendering pipeline (here is a schematic).

  • Create the d3d10 lib and start the .idl file for header generation.
  • Write stubs for the functions to allow the app to create all the interfaces.
  • Write test cases for reference counting (ddraw and d3d9 show that Microsoft does not stick to its own COM rules).
  • Make methods that have already 1:1 equivalents in wined3d call wined3d.
  • Add other methods as required to wined3d.
  • Possibly port D3D10 to Windows XP

D3DRM

  • Implement the core function Direct3DRMCreate, DllCanUnloadNow, and DllGetClassObject.

DirectX-D3DX9

  • Finish the various D3DX9_xx.dll files.
  • A big chunk of the effects framework is still missing
    • Handle legacy versions of the effects interfaces (DirectX broke compatibility at some point and Wine only implements the latest version so far, causing problems with games that use the older interface).
  • Most of the shader compiler is missing too.
  • Implement a bunch of cube and volume surface / texture functions.
  • Finish pieces of other shader-related functions and ID3DXConstantTable.

  • Some mesh-related functions still need work.

DirectInput

  • Absolute positioning reporting needs verification.
  • DXGrab support in OpenGL is still missing.
    • An extension to X11 allowing for "non-exclusive" mouse grabs, i.e. restricting mouse movement to one window while still reporting events as if no grab occurred. (See this thread on the XOrg mailing list).

  • Mouse doesn't wrap all the time and "escapes" game window.
  • Improve DX8 support (especially joystick)
  • Keyboard: Fix remaining layout, dead keys, hotkeys and focus issues.

DirectMusic (dmime, dmband, dmsynth, dmloader, dmcompos, dmstyle)

  • cleanup ParseDescriptor and Loading to share code

  • use loaded datas (implementing Getters APIs and begin to play some sounds)
  • load wave tracks (dswave)
  • More tracks loading
  • use play APIs in RT play thead (ProcessMsgThread in dmime/performance)

  • finish processing/dispatch thread (IDirectMusicPerformance)

  • better support of unstreams
  • implement dmusic32 APIs

DirectShow

  • Amstream
    • implement missing interfaces
    • write a filter that enables retrieval of sample data
  • DevEnum

    • Support creating special filters (Midi, !DSound, WaveOut, WaveIn)

    • Allow binding to these filters.
  • Quartz
    • finish graph control implementation (Run/Pause/Stop)
    • extend graph building process by taken into account filters added manually to the filtergraph
    • implement IReferenceClock in DSound renderer

    • handle time in general
    • add windowed mode support in video renderer
    • generic splitter using ffmpeg libavformat (at first glance, this doesn't seem possible)
    • generic video decoders using ffmpeg libavcodec (a prototype is ready and will be submitted soon)
    • generic audio decoders using ffmpeg libavcodec
    • understand how plugin distributors work
    • play by mixing builtin & native components

  • Qcap
    • implement CaptureGraphBuilder

    • add encoders, muxes, etc.
  • Other Ideas
    • move code common to Quartz, Qcap and Amstream into a static library (similar but far simplier to strmbase.lib; call it winestrmbase.lib?)
    • add more parsers (mpeg1, mpeg2, mp3, ogg vorbis, etc.)
    • somehow rebase different format parsers on a single generic one?

DirectSound

  • Hardware accelerated direct sound capture driver support using the Windows CE3 HAL API
  • 3D buffer support in software is present but incomplete.
  • 3D buffer hardware support
  • Sound effects on buffers
  • Capture effects
  • ASIO driver (see bug 2161)

  • Fix stutter problems in 'Emulation' mode.
  • Improve support for driver/soundcards that will only let us mmap the card's buffer at a fixed frequency.
  • Automatically switch to 'Emulation' mode if the driver/soundcard does not support mmap-ing the card's buffer.
  • DX9 support for new PCM formats (24/32 bit and float samples) and for more than 2 channels is not present.

DirectPlay

  • Figure out the DirectPlayProtocol

  • Implement the lobby code as a proof of concept.
  • Pick one game as an implementation target (see DirectPlayGames)

  • Implement more functionality as needed (for now dpnet APIs are mainly stubs).

DXDiagn

  • Fill description containers for:
    • DirectSound

    • DirectMusic

    • DirectInput

    • DirectPlay

    • Logical disks
    • System devices

OpenGL

  • Rewrite wglShareLists() using glXCopyContext and context recreation instead of delaying context creation bug 11436

  • WGL_render_depth_texture extension which layers on WGL_render_texture.

WineD3D

  • Tidy up the WineD3D codebase and add comments and TRACEs

See Also

At one point, the following values were listed in the article as useful for testing GeForce8 video cards:

  • RegistryDwords: 8F773984=7

  • NvE: mulate=50

Some handy guides by ATI for working with OpenGL:

A reference for the IDxDiagContainer interface.


CategoryToDo CategoryDLLs CategoryGraphics

DirectX-ToDo (last edited 2013-07-14 00:23:45 by KyleAuble)