From 77b440e42d8e7247c22959020bb087c63d298f2e Mon Sep 17 00:00:00 2001 From: Anuj Phogat Date: Fri, 30 Aug 2013 12:52:38 -0700 Subject: 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 Reviewed-by: Ken Graunke --- src/mesa/main/enable.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/mesa/main/enable.c') diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 5e2fd80d227..dd6a772f96c 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; } -- cgit v1.2.3