Pipeline separation preview

Stefan Dösinger stefan at codeweavers.com
Sat Jul 5 09:24:25 CDT 2008

Here is an updated patchset. I have CC'ed Henri and Ivan, since they were
the main critics of the old design. Ivan, this should get rid of the
inheritance thunks the old way of munging everything into the shader backend
had. I've discussed things with Henri on IRC. Henri, can you take a quick
look and see if your vertex pipeline stuff can be integrated into this

A few remarks:
-> The whole pipeline is split up into a vertex, fragment and misc part.
-> It is no problem if multiple parts of the pipeline read the same D3D
state. See for example sampler()
-> However, the representative states in all pipeline parts have to be the
same, otherwise bad things will happen. This imposes some problems around
stream sources, vdecl and vertex shaders. However it is no problem if
different implemetations of the same pipeline part have different state
-> It is possible that not all states are grouped correctly yet, or some
more states may need splitup. This will surface once we have a vertex
pipeline replacement.
-> Private data for the fragment pipeline is stored in a separate pointer in
the device. This can of course be the same as the shader private storage,
but doesn't have to.

For the next days I'll be bugfixing for another CrossOver Games release, so
I'll probably send this stuff in a week or two. Further plans are:
-> reorder the patches slightly since in the current form atifs is
temporarily broken, making regression tests harder
-> Find a r250 card to test the atifs stuff. I am currently not at home, and
it turns out that fglrx has a broken atifs implementation.
-> Generally more testing. Right now I've only tested our regression tests
-> Add extension information to the state templates. That way the pipeline
compiler can select different functions from the same template depending on
the available extensions. That way we can move a few more if(GL_SUPPORTED())
checks out of the rendering loop, saving a few CPU cycles and making the
code cleaner.

In the long d3d10 run, those things could be considered:
-> Using different templates for d3d10, thus getting rid of a few
if(!shader) checks. It's a minimal optimization though, everything in the
fixed function code except the if(!shader) tests will never be touched in
d3d10 anyway since the states are never dirty
-> Create an additional geometry pipeline template

> -----Original Message-----
> From: wine-devel-bounces at winehq.org [mailto:wine-devel-
> bounces at winehq.org] On Behalf Of Stefan Dösinger
> Sent: Wednesday, July 02, 2008 10:48 AM
> To: wine-devel at winehq.org
> Subject: Pipeline separation preview
> Hi,
> I'm sending a preview of my vertex-fragment-misc pipeline separation
> patches as discussed a few weeks ago. The patch comments have more
> descriptions. The relevant patches start at patch 5, the other patches
> are other junk in my tree.
> Any comments?
> Stefan

More information about the wine-devel mailing list