[Mesa-dev] [PATCH] mesa: Reference count shaders that are used by transform feedback objects
Emil Velikov
emil.l.velikov at gmail.com
Mon Nov 12 15:35:21 UTC 2018
On Mon, 12 Nov 2018 at 11:34, Gert Wollny <gw.fossdev at gmail.com> wrote:
>
> From: Gert Wollny <gert.wollny at collabora.com>
>
> Transform feedback objects may hold a pointer to a shader program, and
> at least in Gallium, this must be a valid pointer until
> ctx->Driver.EndTransformFeedback in glEndTransformFeedback has been called
> - which is conform with the spec that any program that is part of a
> current rendering state should only be flagged for deletion by glDeleteProgram.
> This was not handled properly for the transform feedback objects so that
> a call sequence
>
> glUseProgram(x)
> glBeginTransformFreedback(...)
> glPauseTransformFeedback(...)
> glDeleteProgram(x)
> glEndTransformFeedback(...)
>
Was going to ask will the refcount be OK with two+ transform feedbacks.
Bind the second one and Begin ... although Begin will error out, since
the first xfb is paused, yet active.
> end_transform_feedback(struct gl_context *ctx,
> struct gl_transform_feedback_object *obj)
> {
> +
Please drop this whitespace change.
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
Thanks
Emil
More information about the mesa-dev
mailing list