Chris Forbes <chr...@ijw.co.nz> writes:
> diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
> index 056bacb..3a618fc 100644
> --- a/src/mesa/main/get.c
> +++ b/src/mesa/main/get.c
> @@ -1635,6 +1635,15 @@ find_value_indexed(const char *func, GLenum pname, 
> GLuint index, union value *v)
>        goto invalid_enum;
>        v->value_int = ctx->UniformBufferBindings[index].Size;
>        return TYPE_INT;
> +
> +   /* ARB_texture_multisample / GL3.2 */
> +   case GL_SAMPLE_MASK_VALUE:
> +      if (index != 0)
> +    goto invalid_value;
> +      if (!ctx->Extensions.ARB_texture_multisample)
> +    goto invalid_enum;
> +      v->value_int = ctx->Multisample.SampleMaskValue;
> +      return TYPE_INT;
>     }

Something went horribly wrong with indentation here.

> @@ -92,7 +96,15 @@ _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);
> +   FLUSH_VERTICES(ctx, 0);
> +
> +   if (index != 0) {
> +      _mesa_error(ctx, GL_INVALID_VALUE, "glSampleMaski(index)");
> +      return;
> +   }
> +
> +   ctx->Multisample.SampleMaskValue = mask;
> +   ctx->NewState |= _NEW_MULTISAMPLE;

You can optionally fold the _NEW_MULTISAMPLE NewState into the second
arg of FLUSH_VERTICES since you aren't doing any special NewState
flagging reduction.

Attachment: pgpZOKVOpO11T.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to