[Mesa-dev] [PATCH V3 08/19] mesa: implement sample mask

Eric Anholt eric at anholt.net
Mon Feb 11 18:30:06 PST 2013


Chris Forbes <chrisf at ijw.co.nz> writes:

> V2: - fix multiline comment style
>     - stop using ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH since that
>       doesn't exist anymore.
>
> V3: - check for the extension being enabled
>     - tidier flagging of _NEW_MULTISAMPLE
>     - fix weird indentation in get.c

> @@ -92,7 +96,20 @@ _mesa_GetMultisamplefv(GLenum pname, GLuint index, GLfloat * val)
>  void GLAPIENTRY
>  _mesa_SampleMaski(GLuint index, GLbitfield mask)
>  {
> -   assert(!"Not implemented");
> -   // TODO: make this work
> +   GET_CURRENT_CONTEXT(ctx);
> +
> +   if (!ctx->Extensions.ARB_texture_multisample) {
> +      _mesa_error(ctx, GL_INVALID_OPERATION, "glSampleMaski");
> +      return;
> +   }
> +
> +   FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE);

Odd to have this between the two error checks.  Perhaps do it just
before setting the samplemaskvalue?

Other than that, patches 5-8 are

Reviewed-by: Eric Anholt <eric at anholt.net>

> +
> +   if (index != 0) {
> +      _mesa_error(ctx, GL_INVALID_VALUE, "glSampleMaski(index)");
> +      return;
> +   }
> +
> +   ctx->Multisample.SampleMaskValue = mask;
>  }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130211/31f9149a/attachment.pgp>


More information about the mesa-dev mailing list