--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- Note: no GLX protocol info yet. -->
+
+<OpenGLAPI>
+
+<category name="GL_ARB_sample_shading" number="70">
+
+ <enum name="SAMPLE_SHADING_ARB" value="0x8C36"/>
+ <enum name="MIN_SAMPLE_SHADING_VALUE_ARB" value="0x8C37"/>
+
+ <function name="MinSampleShadingARB" alias="MinSampleShading">
+ <param name="value" type="GLfloat"/>
+ </function>
+
+</category>
+
+</OpenGLAPI>
--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- Note: no GLX protocol info yet. -->
+
+<OpenGLAPI>
+
+<category name="4.0">
+ <enum name="SAMPLE_SHADING" value="0x8C36"/>
+ <enum name="MIN_SAMPLE_SHADING_VALUE" value="0x8C37"/>
+
+ <function name="MinSampleShading" offset="assign">
+ <param name="value" type="GLfloat"/>
+ </function>
+</category>
+
+<category name="4.3">
+
+</category>
+
+</OpenGLAPI>
ARB_invalidate_subdata.xml \
ARB_map_buffer_range.xml \
ARB_robustness.xml \
+ ARB_sample_shading.xml \
ARB_sampler_objects.xml \
ARB_seamless_cube_map.xml \
ARB_shader_atomic_counters.xml \
NV_texture_barrier.xml \
NV_vdpau_interop.xml \
OES_EGL_image.xml \
- GL3x.xml
+ GL3x.xml \
+ GL4x.xml
+
COMMON = $(API_XML) \
<xi:include href="ARB_draw_buffers_blend.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="AMD_draw_buffers_blend.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
-<!-- 70. GL_ARB_sample_shading -->
+<xi:include href="ARB_sample_shading.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="ARB_texture_cube_map_array.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="ARB_texture_gather.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<!-- 73. GL_ARB_texture_query_lod -->
<xi:include href="NV_vdpau_interop.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+<xi:include href="GL4x.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
</OpenGLAPI>
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)
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;
}
EXTRA_VERSION_30,
EXTRA_VERSION_31,
EXTRA_VERSION_32,
+ EXTRA_VERSION_40,
EXTRA_API_GL,
EXTRA_API_GL_CORE,
EXTRA_API_ES2,
static const int extra_version_30[] = { EXTRA_VERSION_30, EXTRA_END };
static const int extra_version_31[] = { EXTRA_VERSION_31, EXTRA_END };
static const int extra_version_32[] = { EXTRA_VERSION_32, EXTRA_END };
+static const int extra_version_40[] = { EXTRA_VERSION_40, EXTRA_END };
static const int extra_gl30_es3[] = {
EXTRA_VERSION_30,
EXTRA_END
};
+static const int extra_gl40_ARB_sample_shading[] = {
+ EXTRA_VERSION_40,
+ EXT(ARB_sample_shading),
+ EXTRA_END
+};
+
static const int
extra_ARB_vertex_program_api_es2[] = {
EXT(ARB_vertex_program),
[ "SAMPLE_BUFFERS_ARB", "BUFFER_INT(Visual.sampleBuffers), extra_new_buffers" ],
[ "SAMPLES_ARB", "BUFFER_INT(Visual.samples), extra_new_buffers" ],
+# GL_ARB_sample_shading
+ [ "MIN_SAMPLE_SHADING_VALUE_ARB", "CONTEXT_FLOAT(Multisample.MinSampleShadingValue), extra_gl40_ARB_sample_shading" ],
+
# GL_SGIS_generate_mipmap
[ "GENERATE_MIPMAP_HINT_SGIS", "CONTEXT_ENUM(Hint.GenerateMipmap), NO_EXTRA" ],
GLboolean SampleCoverage;
GLfloat SampleCoverageValue;
GLboolean SampleCoverageInvert;
+ GLboolean SampleShading;
+ GLfloat MinSampleShadingValue;
/* ARB_texture_multisample / GL3.2 additions */
GLboolean SampleMask;
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
extern void GLAPIENTRY
_mesa_SampleMaski(GLuint index, GLbitfield mask);
+extern void GLAPIENTRY
+_mesa_MinSampleShading(GLclampf value);
extern GLenum
_mesa_check_sample_count(struct gl_context *ctx, GLenum target,
{ "glVertexAttribDivisor", 33, -1 },
/* GL 4.0 */
-// { "glMinSampleShading", 40, -1 }, // XXX: Add to xml
+ { "glMinSampleShading", 40, -1 }, // XXX: Add to xml
// { "glBlendEquationi", 40, -1 }, // XXX: Add to xml
// { "glBlendEquationSeparatei", 40, -1 }, // XXX: Add to xml
// { "glBlendFunci", 40, -1 }, // XXX: Add to xml
{ "glBlendEquationSeparateiARB", 43, -1 },
{ "glBlendFunciARB", 43, -1 },
{ "glBlendFuncSeparateiARB", 43, -1 },
-// { "glMinSampleShadingARB", 43, -1 }, // XXX: Add to xml
+ { "glMinSampleShadingARB", 43, -1 }, // XXX: Add to xml
// { "glNamedStringARB", 43, -1 }, // XXX: Add to xml
// { "glDeleteNamedStringARB", 43, -1 }, // XXX: Add to xml
// { "glCompileShaderIncludeARB", 43, -1 }, // XXX: Add to xml