Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26

Thread: Wine Begins Work On Direct3D Shader Compiler

  1. #11
    Join Date
    Feb 2011
    Posts
    67

    Default Optimize

    Quote Originally Posted by Qaridarium View Post
    ah nice it just makes the need of "Microsoft d3dx9_*.dll implementation " obsolete yes very nice
    Yeah, well, I'd still trust their compiler to produce the better optimized output for the next 10 years. And unfortunately I can't rely on mesa's glsl compiler to compensate (yet ...).

  2. #12
    Join Date
    Oct 2006
    Location
    Israel
    Posts
    585

    Default

    Quote Originally Posted by oliver View Post
    Again, no pulse audio support (I know it's being worked on). Hopefully we can see this support soon!
    If you don't mind building wine by yourself, wine-pulse [1] works just fine on both Fedora 16 and Fedora 17.

    - Gilboa
    [1] http://repo.or.cz/w/wine/multimedia.git
    DEV: Intel S2600C0, 2xE52658V2, 32GB, 4x2TB, GTX780, F20/x86_64, Dell U2711.
    SRV: Intel S5520SC, 2xX5680, 36GB, 4x2TB, GTX550, F20/x86_64, Dell U2412..
    BACK: Tyan Tempest i5400XT, 2xE5335, 8GB, 3x1.5TB, 9800GTX, F20/x86-64.
    LAP: ASUS N56VJ, i7-3630QM, 16GB, 1TB, 635M, F20/x86_64.

  3. #13

    Default

    Quote Originally Posted by GreatEmerald View Post
    Interesting... Couldn't Wine convert HLSL to OpenGL shaders directly, without needing to use D3D9 bytecode?
    There are small differences between HLSL and OpenGL shaders which require some 'fixups' when the shaders are being used. I don't remember the exact details, may be some cheating is useful. Note a lot of games ship with precompiled HLSL shaders in order not to have a runtime shader compile penalty. Some games may compile shaders only at first run or something.

    For a long time to come the Microsoft compiler will likely generate faster code. Though the OpenGL shader compiler may be able to perform less optimizations on the precompiled HLSL code from the Microsoft compiler. This may actually be a disadvantage. The Wine HLSL compiler may generate less efficient code, but the code may be better suited for translation to GLSL. A good GLSL compiler may be able to compensate for inefficiencies. What will be better performance wise? Time will tell.

    The Wine HLSL compiler will have some advantages though. Especially on older hardware SM2.0/SM3.0 hardware, scheduling of shader constants within a shader was not ideal. Games tried using constants which Wine wanted to use itself for emulating slight D3D/OpenGL differences. When Wine has its own compiler, it can try not to allocate shader constants in the range Wine wants for itself.

  4. #14
    Join Date
    Sep 2008
    Location
    Vilnius, Lithuania
    Posts
    2,542

    Default

    Quote Originally Posted by Thunderbird View Post
    There are small differences between HLSL and OpenGL shaders which require some 'fixups' when the shaders are being used. I don't remember the exact details, may be some cheating is useful. Note a lot of games ship with precompiled HLSL shaders in order not to have a runtime shader compile penalty. Some games may compile shaders only at first run or something.

    For a long time to come the Microsoft compiler will likely generate faster code. Though the OpenGL shader compiler may be able to perform less optimizations on the precompiled HLSL code from the Microsoft compiler. This may actually be a disadvantage. The Wine HLSL compiler may generate less efficient code, but the code may be better suited for translation to GLSL. A good GLSL compiler may be able to compensate for inefficiencies. What will be better performance wise? Time will tell.

    The Wine HLSL compiler will have some advantages though. Especially on older hardware SM2.0/SM3.0 hardware, scheduling of shader constants within a shader was not ideal. Games tried using constants which Wine wanted to use itself for emulating slight D3D/OpenGL differences. When Wine has its own compiler, it can try not to allocate shader constants in the range Wine wants for itself.
    I see. And yeap, some games do indeed precompile their shaders on the first run, like Mass Effect (creates a "shader cache" file). What fun when for some reason the precompilation doesn't work correctly or those precompiled shaders become corrupt... Black textures all over the place.

  5. #15
    Join Date
    Nov 2007
    Posts
    1,024

    Default

    Quote Originally Posted by GreatEmerald View Post
    Interesting... Couldn't Wine convert HLSL to OpenGL shaders directly, without needing to use D3D9 bytecode?
    The API layering says no. Apps need to be able to pass in HLSL source, get back "something," and pass that in to the APIs that expect that something to be precompiled HLSL shaders and not GLSL source.

    Even if Wine made the D3D API implementations auto-detect and accept GLSL source in place of the usual binary files, other third-party APIs cannot be magically converted, and there are such things as third-party tools that decompose and analyze the precompiled HLSL binaries.

  6. #16
    Join Date
    Jul 2011
    Location
    florida usa
    Posts
    80

    Default

    ok, so this doesnt solve the problem of software shaders. would be nice if they focused on that some, it seems some of the earlier d3d games really did some weird stuff that would make this a requirment.

    did they change their plans on basing the audio structure on openAL? i think at one time they were planning on rewriting the audio stack to use linux's openal to output everything and let openal handle all the system audioo hooks.

  7. #17

    Default

    Quote Originally Posted by benjamin545 View Post
    did they change their plans on basing the audio structure on openAL? i think at one time they were planning on rewriting the audio stack to use linux's openal to output everything and let openal handle all the system audioo hooks.
    The Wine audio stack has been rewritten in Wine 1.4. Internally it works similar to the Vista/Win7 audio service which is a bit like Pulseaudio. Wine has small drivers for relevant audio systems like Alsa, OSS and coreaudio. OpenAL wasn't a good fit for Wine and it wouldn't have been great for latency.

  8. #18
    Join Date
    Jul 2011
    Location
    florida usa
    Posts
    80

    Default

    is there a plan for a simple pulseaudio backend then, ( i know about the pulse driver from pre wine 1.4, it was determined that it wouldnt be incorperated into wine since they were planning on rewriting the audio stack. dont know much more about it after that.)

  9. #19

    Default

    Quote Originally Posted by benjamin545 View Post
    is there a plan for a simple pulseaudio backend then, ( i know about the pulse driver from pre wine 1.4, it was determined that it wouldnt be incorperated into wine since they were planning on rewriting the audio stack. dont know much more about it after that.)
    Someone wrote a pulseaudio backend for the new audio subsystem, but it hasn't been added yet. There are some concerns including maintenance. Anyway the new audio subsystem should handle pulseaudio much better than the previous one, so there may not be a big need.

  10. #20
    Join Date
    Sep 2008
    Location
    Vilnius, Lithuania
    Posts
    2,542

    Default

    Quote Originally Posted by Thunderbird View Post
    Someone wrote a pulseaudio backend for the new audio subsystem, but it hasn't been added yet. There are some concerns including maintenance. Anyway the new audio subsystem should handle pulseaudio much better than the previous one, so there may not be a big need.
    Not really. For some odd reason, when I set PulseAudio to use the traditional scheduling with interrupts instead of timers, Wine sound gets completely corrupt and distorted. But then my audio files are played correctly outside of Wine. And if I set it to use timers, Wine works fine but my audio is popping all the time - unless I set PulseAudio to use the trivial resampling method, in which case audio everywhere seems like it's running on a 16K bitrate... So in essence it's a "pick your poison" situation, until Wine incorporates a PA backend.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •