From Fedora Project Wiki
(See bz - moving to incomplete category)
 
(21 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Direct3D =
= Wine to use mesa Direct3D =


== Summary ==
== Summary ==
What is difference between classic wine and wine enhanced with Nine support? The answer is simple - performance. When we play most DirectX 9 games, we want the highest performance possible. Sadly, wine loses a lot of Direct3D9's speed through the inefficent translation of HLSL and D3D9 calls to OpenGL.
Enhancing mesa and wine with Direct3D9 support will increase performance and reduce resource usage in applications which using D3D9 framework.
 
[https://wiki.ixit.cz/d3d9 https://wiki.ixit.cz/d3d9]


== Owner ==
== Owner ==
* Name: [[User:ignatenkobrain|Igor Gnatenko]] and [https://plus.google.com/110830723758089847922 Axel Davy]
* Name: [[User:ignatenkobrain|Igor Gnatenko]]
* Email: ignatenkobrain@fedoraproject.org and davyaxel@free.fr
* Email: ignatenkobrain@fedoraproject.org
* Release notes owner: <!--- To be assigned by docs team [[User:FASAccountName| Release notes owner name]] <email address> -->
* Release notes owner: <!--- To be assigned by docs team [[User:FASAccountName| Release notes owner name]] <email address> -->


Line 22: Line 20:
CLOSED as NEXTRELEASE -> change is completed and verified and will be delivered in next release under development
CLOSED as NEXTRELEASE -> change is completed and verified and will be delivered in next release under development
-->
-->
* Tracker bug: <will be assigned by the Wrangler>
* Tracker bug: [https://bugzilla.redhat.com/show_bug.cgi?id=1184894 #1184894]


== Detailed Description ==
== Detailed Description ==
Actual situation is, that wine has to translate DirectX => OpenGL => Gallium, which add complications and brings inefficiency. What we can do about it? It's easy, skip OpenGL!
Developers: [https://plus.google.com/110830723758089847922 Axel Davy] (davyaxel@free.fr)
Most opensource drivers were migrated to Gallium framework. Thanks to Gallium framework is possible simply extend all drivers, by state trackers (ST) with different functionality.
 
For these which will work, you'll get reduced cpu usage and better performance.
When playing d3d9 games on Wine, their d3d9 calls are translated to OpenGL. This is complicated process, because you have to deal with different drivers having different extensions available, and the fact that OpenGL and d3d9 don't map perfectly together. Gallium Nine implements the d3d9 API with Gallium internal API, which maps better to d3d9 than OpenGL. You remove some layers of translation in the process which enables better performance. Gallium Nine is not as mature as Wine OpenGL translation, and it is likely to have more bugs, but when the games work, you can expect 5-10% improvement for gpu limited games, or much more (sometimes 100%) for cpu limited games.
 
'''what is Gallium''':
Gallium is an internal graphic driver abstraction of Mesa to enable support of non-opengl languages more easily (it is used for vdpau and vaapi on r600/radeonsi for example). It is used by nouveau and r300 up to radeonsi for AMD. Intel OpenGL support doesn't use gallium, but a gallium driver named ilo exists, but isn't sponsored by Intel.


In my case BioShock runs with gallium-nine about 35-45 fps, which is nice. Without I get from my on-cpu AMD 6550D graphic card only 23-35 fps (tested from saved point). So – difference between playable and “poor performance”.
In practice, games have also smoother frame rate on Gallium Nine. Gallium Nine has good DRI_PRIME support, and if you have a system with an iGPU+dGPU, you can play without issues with the parameters DRI_PRIME=1 thread_submit=true
[ game: resolution 1920×1080, all graphic settings off; hw: gpu clock 720 Mhz, memory 1866 Mhz ]
 
[https://wiki.ixit.cz/d3d9 https://wiki.ixit.cz/d3d9]


{| class="wikitable"
{| class="wikitable"
Line 47: Line 49:
|Axel Davy and Igor Gnatenko
|Axel Davy and Igor Gnatenko
|{{result|inprogress}}  <ref>https://github.com/iXit/wine</ref>
|{{result|inprogress}}  <ref>https://github.com/iXit/wine</ref>
|<references/>
|-
|}
{| class="wikitable"
Hardware compatibility List
!Hardware
!Status
!References
|-
|AMD (r300-r500)
|{{result|warn}} <ref>some game will work, not all of them</ref>
|<references/>
|-
|AMD (r600-radeonsi)
|{{result|pass}}
|<references/>
|-
|Nvidia (nv50-nvc0)
|{{result|pass}} <ref>minor issues on some games that won't trigger on amd</ref>
|<references/>
|-
|Intel (ilo)
|{{result|fail}} <ref>Driver not advanced enough for now</ref>
|<references/>
|-
|Intel (i915)
|{{result|inprogress}} <ref>untested. Probably won't work</ref>
|<references/>
|<references/>
|-
|-
Line 52: Line 82:


== Benefit to Fedora ==
== Benefit to Fedora ==
All games wich using Direct3D9 (most of games which wine can run) will have very very good speedup. Real numbers?
Users wanting to play d3d9 games on Wine will get better experience when using Gallium Nine when it works
* On a simple demo with a weak CPU (Athlon TK-55 X2) CPU usage dropped from 20% to 10%!
* Need a benchmark? [http://www.linuxsystems.it/2014/09/wine-vanilla-vs-csmt-d3dstream-vs-gallium-nine-vs-catalyst/ 2014-09-14, with older DRI2]
* For real games, we're getting mostly double the framerate (depends on the game, the driver and the card)


== Scope ==
== Scope ==
* Proposal owners: [[User:ignatenkobrain|Igor Gnatenko]]
* Proposal owners: work on the Mesa Direct3D support


* Other developers: [https://plus.google.com/110830723758089847922/posts Axel Davy]
* Other developers: N/A (not a System Wide Change)  <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->


* Release engineering: N/A (not a System Wide Change)  <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Release engineering: N/A (not a System Wide Change)  <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
Line 94: Line 121:
* Contingency deadline: beta freeze
* Contingency deadline: beta freeze
* Blocks release? No
* Blocks release? No
* Blocks product? Workstation
* Blocks product? N/A (not a System Wide Change)


== Documentation ==
== Documentation ==

Latest revision as of 07:55, 31 March 2015

Wine to use mesa Direct3D

Summary

Enhancing mesa and wine with Direct3D9 support will increase performance and reduce resource usage in applications which using D3D9 framework.

Owner

  • Name: Igor Gnatenko
  • Email: ignatenkobrain@fedoraproject.org
  • Release notes owner:

Current status

Detailed Description

Developers: Axel Davy (davyaxel@free.fr)

When playing d3d9 games on Wine, their d3d9 calls are translated to OpenGL. This is complicated process, because you have to deal with different drivers having different extensions available, and the fact that OpenGL and d3d9 don't map perfectly together. Gallium Nine implements the d3d9 API with Gallium internal API, which maps better to d3d9 than OpenGL. You remove some layers of translation in the process which enables better performance. Gallium Nine is not as mature as Wine OpenGL translation, and it is likely to have more bugs, but when the games work, you can expect 5-10% improvement for gpu limited games, or much more (sometimes 100%) for cpu limited games.

what is Gallium: Gallium is an internal graphic driver abstraction of Mesa to enable support of non-opengl languages more easily (it is used for vdpau and vaapi on r600/radeonsi for example). It is used by nouveau and r300 up to radeonsi for AMD. Intel OpenGL support doesn't use gallium, but a gallium driver named ilo exists, but isn't sponsored by Intel.

In practice, games have also smoother frame rate on Gallium Nine. Gallium Nine has good DRI_PRIME support, and if you have a system with an iGPU+dGPU, you can play without issues with the parameters DRI_PRIME=1 thread_submit=true

https://wiki.ixit.cz/d3d9

TODO List
Description Assignee Status References
Enable Direct3D9 state tracker in mesa Igor Gnatenko
Pass pass
[1][2]
Land d3d support in wine Axel Davy and Igor Gnatenko
Inprogress inprogress
[1]
Hardware compatibility List
Hardware Status References
AMD (r300-r500)
Warning warn
[1]
  1. some game will work, not all of them
AMD (r600-radeonsi)
Pass pass
Nvidia (nv50-nvc0)
Pass pass
[1]
  1. minor issues on some games that won't trigger on amd
Intel (ilo)
Fail fail
[1]
  1. Driver not advanced enough for now
Intel (i915)
Inprogress inprogress
[1]
  1. untested. Probably won't work

Benefit to Fedora

Users wanting to play d3d9 games on Wine will get better experience when using Gallium Nine when it works

Scope

  • Proposal owners: work on the Mesa Direct3D support
  • Other developers: N/A (not a System Wide Change)
  • Release engineering: N/A (not a System Wide Change)
  • Policies and guidelines: N/A (not a System Wide Change)

Upgrade/compatibility impact

N/A (not a System Wide Change)

How To Test

  1. # dnf install wine
  2. Check if mesa-d3d installed automatically
  3. Run some benchmarks/games in wine

Expected results: no problems and more better performance

User Experience

N/A (not a System Wide Change)

Dependencies

N/A (not a System Wide Change)

Contingency Plan

  • Contingency mechanism: Revert and try to do in next release
  • Contingency deadline: beta freeze
  • Blocks release? No
  • Blocks product? N/A (not a System Wide Change)

Documentation

N/A (not a System Wide Change)

Release Notes