[PATCH 2/5] wined3d: Always end transform feedback on SO buffer destruction.
Henri Verbeet
hverbeet at gmail.com
Mon Oct 18 10:08:36 CDT 2021
On Sun, 17 Oct 2021 at 22:25, Zebediah Figura <zfigura at codeweavers.com> wrote:
> The buffer might not be bound anymore at the d3d level but that
> doesn't mean it's not still bound in GL.
>
Given the amount of effort you put in figuring out why this was
needed, I would have expected a somewhat more elaborate commit
message, or a (preferably) a comment in the code itself. And in that
regard, it wouldn't seem inappropriate to merge patch 5/5 with this
one.
> - if (context_gl->c.transform_feedback_active && resource->bind_count
> - && resource->bind_flags & WINED3D_BIND_STREAM_OUTPUT)
> + if (context_gl->c.transform_feedback_active && resource->bind_flags & WINED3D_BIND_STREAM_OUTPUT)
> {
> /* We have to make sure that transform feedback is not active
> * when deleting a potentially bound transform feedback buffer.
It seems a little unfortunate to (potentially) end transform feedback
any time a WINED3D_BIND_STREAM_OUTPUT buffer is destroyed. Perhaps
it's fine in practice, but it also seems to be the case that we can
only get in this particular situation when STATE_STREAM_OUTPUT has
been invalidated, in which case we'd end transform feedback later
anyway. I.e., calling wined3d_context_gl_end_transform_feedback() here
would effectively be free when STATE_STREAM_OUTPUT has been
invalidated.
More information about the wine-devel
mailing list