[2/8] wined3d: Select the right shader backend when creating the device

H. Verbeet hverbeet at gmail.com
Mon Nov 27 16:53:44 CST 2006


On 27/11/06, Ivan Gyurdiev <ivg231 at gmail.com> wrote:
> H. Verbeet wrote:
> Imho there should be either ps_selected/vs_selected flags, or
> shader_backend flag, but definitely not both [ does not make sense ].
Well, yes, that's the idea. Unfortunately the ps_selected/vs_selected
flags are still used in other parts of the code.

> I'd opt for allowing different backends on pshader vs vshader. Maybe the
> current drawprim code is implemented to use ARB or GLSL for both, but
> that's not a good reason to disallow capability by writing future code
> as if the backend was unified. More importantly, you should be able to
> mix software shaders, with the other backends.
I did consider that, but in the end I don't think it really makes
sense. Couple of things to consider:
 - Software shaders currently simply don't work. If we do get software
shaders it'll likely be vertex only. Even if we did have software
pixel shaders, we wouldn't be able to mix them with hardware vertex
processing, since there's simply no interface to do that. I could see
someone using software vertex shaders if he's got no hardware support
for shaders, although it's questionable if such a card would be able
to effectively run an application that requires them anyway. Mesa is
possibly a better option there. Either way, you're not going to be
using software vertex shaders together with HW pixel shaders, that's
just silly.
- Mixing ARB and GLSL backends is pretty silly as well.
- DX10 introduces another shader type, the geometry shader. Going that
way would mean we'd possibly have three different backends to mix.
- There is of course the SHADER_NONE setting, but imo that should be
orthogonal to the backend being used.

So imo it just adds complexity to the code without giving much of a benefit.



More information about the wine-devel mailing list