[4/22] WineD3D: A shader backend descriptor for the ati fragment shader backend

Stefan Dösinger stefan at codeweavers.com
Mon Mar 17 09:59:36 CDT 2008

Am Montag, 17. März 2008 15:41:07 schrieb H. Verbeet:
> I think a useful ffp replacement should at least replace the vertex
> processing part. Extension s like ATI_fragment_shader and
> NV_register_combiners, etc. can already support pretty much all of
> fixed function fragment processing without having to integrate it in
> the shader backends.
From the atifs API putting the code into its own shader backend really helps 
abstraction and efficiency in wined3d(e.g. different state linking). nvrc has 
a vastly different API(individual stages instead of one "atomic" program that 
can't be split up).

If we ever implement pixel shaders using nvrc+nvts we'll have to move the code 
into a separate backend as well.

> In terms of replacing vertex processing, anything that still has
> dedicated hardware for fixed function processing isn't really powerful
> enough to run such an ffp replacement, either because of instruction
> count / number of constant limitations or simply execution speed. For
> nvidia hardware that basically means you'll need at least something
> like a GF5 or GF6.
I don't know how the r200 card works internally, but it might have dedicated 
ffp vertex hardware as well. At least from the development history of the 
r200 driver it seems like that, because the card didn't have ARBvp until the 
reverse engineered r300 code was backported.

Anyway, I do not intend to break the ability to use opengl fixed function + 
d3d shaders like we do now. Its just a matter of the shader backend 
configuring their state tables accordingly. Essentially glsl shader backend + 
its own state handlers = replacement pipeline, glsl shader backend + 
unmodified state table = opengl fixed function pipeline.

For the start I think we should prefer our current fixed function code with 
nvrc/ati by default and make a glsl or arb replacement opt-in for now. 
Especially glsl with its long shader linking time.

More information about the wine-devel mailing list