summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
authorAnuj Phogat <anuj.phogat@gmail.com>2013-08-30 12:52:38 -0700
committerAnuj Phogat <anuj.phogat@gmail.com>2013-11-01 16:01:47 -0700
commit77b440e42d8e7247c22959020bb087c63d298f2e (patch)
treec4d5463c563ab87e6f31ba829f5a73b3ae5aaeef /src/mesa/main/enable.c
parente919e5ee4e0dd1bab511e402c1265208f139fcc1 (diff)
downloadexternal_mesa3d-77b440e42d8e7247c22959020bb087c63d298f2e.zip
external_mesa3d-77b440e42d8e7247c22959020bb087c63d298f2e.tar.gz
external_mesa3d-77b440e42d8e7247c22959020bb087c63d298f2e.tar.bz2
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 <anuj.phogat@gmail.com> Reviewed-by: Ken Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r--src/mesa/main/enable.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 5e2fd80..dd6a772 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -802,6 +802,17 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
ctx->Multisample.SampleCoverageInvert = state;
break;
+ /* GL_ARB_sample_shading */
+ case GL_SAMPLE_SHADING:
+ if (!_mesa_is_desktop_gl(ctx))
+ goto invalid_enum_error;
+ CHECK_EXTENSION(ARB_sample_shading, cap);
+ if (ctx->Multisample.SampleShading == state)
+ return;
+ FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE);
+ ctx->Multisample.SampleShading = state;
+ break;
+
/* GL_IBM_rasterpos_clip */
case GL_RASTER_POSITION_UNCLIPPED_IBM:
if (ctx->API != API_OPENGL_COMPAT)
@@ -1594,6 +1605,13 @@ _mesa_IsEnabled( GLenum cap )
CHECK_EXTENSION(ARB_texture_multisample);
return ctx->Multisample.SampleMask;
+ /* ARB_sample_shading */
+ case GL_SAMPLE_SHADING:
+ if (!_mesa_is_desktop_gl(ctx))
+ goto invalid_enum_error;
+ CHECK_EXTENSION(ARB_sample_shading);
+ return ctx->Multisample.SampleShading;
+
default:
goto invalid_enum_error;
}