[Mesa-dev] draw_stream_output seems to be broken by design

Luca Barbieri luca at luca-barbieri.com
Sun Sep 19 22:34:18 PDT 2010

> It's because I never had the time to actually test it properly. The interface
> is right though, the implementation is supposed to follow the D3D semantics
> and we should stick with that, instead of passing cso's and making behavior
> switch based on magic null arguments.

I think you need that to implement ARB_transform_feedback2.

How would you implement this (note the id parameter) without a
corresponding CSO parameter in Gallium?
    void DrawTransformFeedback(enum mode, uint id);

Of course you can do it with a SO_STATISTICS queries, but it's awkward
and requires the CPU to wait on the GPU (also, if the user is using
such a query himself, it might be an issue).

The NULL argument might be avoided, but that would cause D3D state
trackers to need to track and keep alive the last stream output CSO,
and might force the driver to unnecessarily write out the value to a
buffer instead of just keeping it in an hardware register.

More information about the mesa-dev mailing list