WineD3D: WineD3D: Use the shader backend to enable / disable atifs and nvts

Chris Robinson chris.kcat at
Fri Apr 11 10:22:20 CDT 2008

On Friday 11 April 2008 07:18:49 am Stefan Dösinger wrote:
> Alexandre didn't commit the patch, I think we should come to an agreement
> on this issue, otherwise it is going to come up again and again.

For my own 2 cents on the issue, I think the fixed-function replacements 
should work through the selected shader backend. For example, if someone has 
GLSL enabled, the fixed-function replacement should be done through GLSL, and 
if ARB is used, it should done through ARB shaders. In this way, the atifs 
fixed-function replacement should never be used when the ARB or GLSL shader 
backend is used (one shader mode shouldn't supercede another while the 
program is running).

This would ensure compatibility on the OpenGL side when D3D's fixed-function 
pipeline is mixed with D3D shaders, still leave room for a proper atifs/nvts 
shader backend, and not introduce problems related to how one shader backend 
might interact with another. It honestly doesn't make sense to me why wined3d 
should just jump in and start using atifs/nvts shaders for fixed-function 
replacements, when the selected shader mode is ARB or GLSL. And really, 
atifs/nvts should be last-ditch resorts because they are only available on 
selected vendors, while ARB and GLSL are more widespread (eg. on Intel, 

Ideally, in my mind, wined3d should autoselect one shader mode (unless a 
registry option is present to force one). It would be selected based on 

* if nv vertex/fragment programs are available, they should be used as a 
suppliment to the ARB shader backend (giving up to SM3.0 (4.0, actually), 
with functionality that most closely follows D3D)
* else if GLSL is available, that should be used (giving SM2.0/3.0)
* else if ARB shaders are available, then they should be used (giving PS1.1 
and VS1.4)
* else if atifs/nvts are available, use them (giving SM1.x)
* else disable D3D shaders

In all cases, it should pick one and stick with it through the life of the 
process, for both D3D shaders and D3D fixed-function. Don't use atifs if ARB 
is available, don't use GLSL if nv-supplimented ARB is available, etc.

Though, perhaps I'm misunderstanding the whole issue, and I'm spouting 

More information about the wine-devel mailing list