diff options
Diffstat (limited to 'src/mesa/main/multisample.c')
-rw-r--r-- | src/mesa/main/multisample.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/mesa/main/multisample.c b/src/mesa/main/multisample.c index 2d3a35ef389..2484946158f 100644 --- a/src/mesa/main/multisample.c +++ b/src/mesa/main/multisample.c @@ -60,6 +60,10 @@ _mesa_init_multisample(struct gl_context *ctx) ctx->Multisample.SampleCoverage = GL_FALSE; ctx->Multisample.SampleCoverageValue = 1.0; ctx->Multisample.SampleCoverageInvert = GL_FALSE; + + /* ARB_texture_multisample / GL3.2 additions */ + ctx->Multisample.SampleMask = GL_FALSE; + ctx->Multisample.SampleMaskValue = ~(GLbitfield)0; } @@ -93,6 +97,18 @@ _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; + } + + if (index != 0) { + _mesa_error(ctx, GL_INVALID_VALUE, "glSampleMaski(index)"); + return; + } + + FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE); + ctx->Multisample.SampleMaskValue = mask; } |