diff options
author | Anuj Phogat <[email protected]> | 2013-08-30 12:52:38 -0700 |
---|---|---|
committer | Anuj Phogat <[email protected]> | 2013-11-01 16:01:47 -0700 |
commit | 77b440e42d8e7247c22959020bb087c63d298f2e (patch) | |
tree | c4d5463c563ab87e6f31ba829f5a73b3ae5aaeef /src/mesa/main/multisample.c | |
parent | e919e5ee4e0dd1bab511e402c1265208f139fcc1 (diff) |
mesa: Add new functions and enums required by GL_ARB_sample_shading
New functions added by GL_ARB_sample_shading:
glMinSampleShadingARB()
New enums:
GL_SAMPLE_SHADING_ARB
GL_MIN_SAMPLE_SHADING_VALUE_ARB
V2: Update comments.
Create new GL4x.xml.
Remove redundant code in get.c.
Update the API_XML list in Makefile.am.
Add extra_gl40_ARB_sample_shading predicate to get.c.
V3:
Fix make check failure.
Add checks for desktop GL.
Use GLfloat in place of GLclampf in glMinSampleShading().
Signed-off-by: Anuj Phogat <[email protected]>
Reviewed-by: Ken Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/multisample.c')
-rw-r--r-- | src/mesa/main/multisample.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/main/multisample.c b/src/mesa/main/multisample.c index bd97c50960e..599cdee7407 100644 --- a/src/mesa/main/multisample.c +++ b/src/mesa/main/multisample.c @@ -119,6 +119,24 @@ _mesa_SampleMaski(GLuint index, GLbitfield mask) ctx->Multisample.SampleMaskValue = mask; } +/** + * Called via glMinSampleShadingARB + */ +void GLAPIENTRY +_mesa_MinSampleShading(GLclampf value) +{ + GET_CURRENT_CONTEXT(ctx); + + if (!ctx->Extensions.ARB_sample_shading || !_mesa_is_desktop_gl(ctx)) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glMinSampleShading"); + return; + } + + FLUSH_VERTICES(ctx, 0); + + ctx->Multisample.MinSampleShadingValue = CLAMP(value, 0.0, 1.0); + ctx->NewState |= _NEW_MULTISAMPLE; +} /** * Helper for checking a requested sample count against the limit |