[Mesa-dev] [PATCH 1/2] mesa: Set the correct ctx->NewState bitfield for rasterizer discard.

Marek Olšák maraeo at gmail.com
Wed Dec 14 13:42:35 PST 2011


I think RASTERIZER_DISCARD has nothing to do with transform feedback.
I think it's part of the same spec because it's not useful without it.
As I understand it, _NEW_TRANSFORM_FEEDBACK is dirty when transform
feedback buffer bindings are changed or just enabled/disabled. On the
other hand, RASTERIZER_DISCARD enables or disables the rasterizer, so
it should fall into the same category as face culling for example. (I
even implemented it using face culling on r600)

Also there would be no way to know whether _NEW_TRANSFORM_FEEDBACK
changes just TFB buffer bindings, or just RASTERIZER_DISCARD, or both.

Marek

On Wed, Dec 14, 2011 at 8:59 PM, Paul Berry <stereotype441 at gmail.com> wrote:
> Previously, we were setting the _NEW_TRANSFORM bit when enabling or
> disabling RASTERIZER_DISCARD.  This is incorrect, since _NEW_TRANSFORM
> flags changes to ctx->Transform, but the rasterizer discard flag is in
> ctx->TransformFeedback.  This patch sets the correct bit,
> _NEW_TRANSFORM_FEEDBACK.
> ---
>  src/mesa/main/enable.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
> index 6461ac1..15a2305 100644
> --- a/src/mesa/main/enable.c
> +++ b/src/mesa/main/enable.c
> @@ -890,7 +890,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
>       case GL_RASTERIZER_DISCARD:
>         CHECK_EXTENSION(EXT_transform_feedback, cap);
>          if (ctx->TransformFeedback.RasterDiscard != state) {
> -            FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
> +            FLUSH_VERTICES(ctx, _NEW_TRANSFORM_FEEDBACK);
>             ctx->TransformFeedback.RasterDiscard = state;
>          }
>          break;
> --
> 1.7.6.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list