Make GL_ARB_multisample mandatory

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Ian Romanick
2009-01-27 17:50:45 -08:00
committed by Ian Romanick
parent 33fa5e4bfa
commit 2b77b1d62e
17 changed files with 10 additions and 74 deletions

View File

@@ -63,7 +63,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "drirenderbuffer.h" #include "drirenderbuffer.h"
#include "utils.h" #include "utils.h"
#define need_GL_ARB_multisample
#define need_GL_ARB_vertex_buffer_object #define need_GL_ARB_vertex_buffer_object
#include "extension_helper.h" #include "extension_helper.h"
@@ -122,7 +121,6 @@ static void i810BufferSize(GLframebuffer *buffer, GLuint *width, GLuint *height)
*/ */
const struct dri_extension card_extensions[] = const struct dri_extension card_extensions[] =
{ {
{ "GL_ARB_multisample", GL_ARB_multisample_functions },
{ "GL_ARB_multitexture", NULL }, { "GL_ARB_multitexture", NULL },
{ "GL_ARB_texture_env_add", NULL }, { "GL_ARB_texture_env_add", NULL },
{ "GL_ARB_texture_env_combine", NULL }, { "GL_ARB_texture_env_combine", NULL },

View File

@@ -31,7 +31,6 @@
#define need_GL_ARB_framebuffer_object #define need_GL_ARB_framebuffer_object
#define need_GL_ARB_multisample
#define need_GL_ARB_occlusion_query #define need_GL_ARB_occlusion_query
#define need_GL_ARB_point_parameters #define need_GL_ARB_point_parameters
#define need_GL_ARB_shader_objects #define need_GL_ARB_shader_objects
@@ -67,7 +66,6 @@
* i965_dri. * i965_dri.
*/ */
static const struct dri_extension card_extensions[] = { static const struct dri_extension card_extensions[] = {
{ "GL_ARB_multisample", GL_ARB_multisample_functions },
{ "GL_ARB_multitexture", NULL }, { "GL_ARB_multitexture", NULL },
{ "GL_ARB_point_parameters", GL_ARB_point_parameters_functions }, { "GL_ARB_point_parameters", GL_ARB_point_parameters_functions },
{ "GL_ARB_texture_border_clamp", NULL }, { "GL_ARB_texture_border_clamp", NULL },

View File

@@ -57,7 +57,6 @@
#include "utils.h" #include "utils.h"
#include "vblank.h" #include "vblank.h"
#define need_GL_ARB_multisample
#define need_GL_ARB_vertex_buffer_object #define need_GL_ARB_vertex_buffer_object
#include "extension_helper.h" #include "extension_helper.h"
@@ -82,7 +81,6 @@ static const struct dri_debug_control debug_control[] =
const struct dri_extension card_extensions[] = const struct dri_extension card_extensions[] =
{ {
{ "GL_ARB_multisample", GL_ARB_multisample_functions },
{ "GL_ARB_multitexture", NULL }, { "GL_ARB_multitexture", NULL },
{ "GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions }, { "GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions },
{ "GL_EXT_texture_edge_clamp", NULL }, { "GL_EXT_texture_edge_clamp", NULL },

View File

@@ -69,7 +69,6 @@
#include "GL/internal/dri_interface.h" #include "GL/internal/dri_interface.h"
#define need_GL_ARB_multisample
#define need_GL_ARB_vertex_buffer_object #define need_GL_ARB_vertex_buffer_object
#define need_GL_ARB_vertex_program #define need_GL_ARB_vertex_program
#define need_GL_EXT_fog_coord #define need_GL_EXT_fog_coord
@@ -384,7 +383,6 @@ static const struct dri_extension g400_extensions[] =
static const struct dri_extension card_extensions[] = static const struct dri_extension card_extensions[] =
{ {
{ "GL_ARB_multisample", GL_ARB_multisample_functions },
{ "GL_ARB_texture_rectangle", NULL }, { "GL_ARB_texture_rectangle", NULL },
{ "GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions }, { "GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions },
{ "GL_EXT_blend_logic_op", NULL }, { "GL_EXT_blend_logic_op", NULL },

View File

@@ -65,7 +65,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
int R128_DEBUG = 0; int R128_DEBUG = 0;
#endif #endif
#define need_GL_ARB_multisample
#define need_GL_ARB_vertex_buffer_object #define need_GL_ARB_vertex_buffer_object
#define need_GL_EXT_blend_minmax #define need_GL_EXT_blend_minmax
#define need_GL_EXT_fog_coord #define need_GL_EXT_fog_coord
@@ -74,7 +73,6 @@ int R128_DEBUG = 0;
const struct dri_extension card_extensions[] = const struct dri_extension card_extensions[] =
{ {
{ "GL_ARB_multisample", GL_ARB_multisample_functions },
{ "GL_ARB_multitexture", NULL }, { "GL_ARB_multitexture", NULL },
{ "GL_ARB_texture_env_add", NULL }, { "GL_ARB_texture_env_add", NULL },
{ "GL_ARB_texture_mirrored_repeat", NULL }, { "GL_ARB_texture_mirrored_repeat", NULL },

View File

@@ -62,7 +62,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r200_maos.h" #include "r200_maos.h"
#include "r200_vertprog.h" #include "r200_vertprog.h"
#define need_GL_ARB_multisample
#define need_GL_ARB_vertex_buffer_object #define need_GL_ARB_vertex_buffer_object
#define need_GL_ARB_vertex_program #define need_GL_ARB_vertex_program
#define need_GL_ATI_fragment_shader #define need_GL_ATI_fragment_shader
@@ -119,7 +118,6 @@ static const GLubyte *r200GetString( GLcontext *ctx, GLenum name )
*/ */
const struct dri_extension card_extensions[] = const struct dri_extension card_extensions[] =
{ {
{ "GL_ARB_multisample", GL_ARB_multisample_functions },
{ "GL_ARB_multitexture", NULL }, { "GL_ARB_multitexture", NULL },
{ "GL_ARB_texture_border_clamp", NULL }, { "GL_ARB_texture_border_clamp", NULL },
{ "GL_ARB_texture_env_add", NULL }, { "GL_ARB_texture_env_add", NULL },

View File

@@ -78,7 +78,6 @@ int future_hw_tcl_on = 1;
int hw_tcl_on = 1; int hw_tcl_on = 1;
#define need_GL_VERSION_2_0 #define need_GL_VERSION_2_0
#define need_GL_ARB_multisample
#define need_GL_ARB_point_parameters #define need_GL_ARB_point_parameters
#define need_GL_ARB_vertex_buffer_object #define need_GL_ARB_vertex_buffer_object
#define need_GL_ARB_vertex_program #define need_GL_ARB_vertex_program
@@ -98,7 +97,6 @@ const struct dri_extension card_extensions[] = {
/* *INDENT-OFF* */ /* *INDENT-OFF* */
{"GL_ARB_depth_texture", NULL}, {"GL_ARB_depth_texture", NULL},
{"GL_ARB_fragment_program", NULL}, {"GL_ARB_fragment_program", NULL},
{"GL_ARB_multisample", GL_ARB_multisample_functions},
{"GL_ARB_multitexture", NULL}, {"GL_ARB_multitexture", NULL},
{"GL_ARB_point_parameters", GL_ARB_point_parameters_functions}, {"GL_ARB_point_parameters", GL_ARB_point_parameters_functions},
{"GL_ARB_shadow", NULL}, {"GL_ARB_shadow", NULL},

View File

@@ -62,7 +62,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "radeon_tcl.h" #include "radeon_tcl.h"
#include "radeon_maos.h" #include "radeon_maos.h"
#define need_GL_ARB_multisample
#define need_GL_ARB_vertex_buffer_object #define need_GL_ARB_vertex_buffer_object
#define need_GL_EXT_blend_minmax #define need_GL_EXT_blend_minmax
#define need_GL_EXT_fog_coord #define need_GL_EXT_fog_coord
@@ -113,7 +112,6 @@ static const GLubyte *radeonGetString( GLcontext *ctx, GLenum name )
*/ */
const struct dri_extension card_extensions[] = const struct dri_extension card_extensions[] =
{ {
{ "GL_ARB_multisample", GL_ARB_multisample_functions },
{ "GL_ARB_multitexture", NULL }, { "GL_ARB_multitexture", NULL },
{ "GL_ARB_texture_border_clamp", NULL }, { "GL_ARB_texture_border_clamp", NULL },
{ "GL_ARB_texture_env_add", NULL }, { "GL_ARB_texture_env_add", NULL },

View File

@@ -59,7 +59,6 @@
#include "drirenderbuffer.h" #include "drirenderbuffer.h"
#include "texmem.h" #include "texmem.h"
#define need_GL_ARB_multisample
#define need_GL_ARB_vertex_buffer_object #define need_GL_ARB_vertex_buffer_object
#define need_GL_EXT_secondary_color #define need_GL_EXT_secondary_color
#include "extension_helper.h" #include "extension_helper.h"
@@ -132,7 +131,6 @@ struct timeval tv_s1,tv_f1;
static const struct dri_extension card_extensions[] = static const struct dri_extension card_extensions[] =
{ {
{ "GL_ARB_multisample", GL_ARB_multisample_functions },
{ "GL_ARB_multitexture", NULL }, { "GL_ARB_multitexture", NULL },
{ "GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions }, { "GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions },
{ "GL_EXT_stencil_wrap", NULL }, { "GL_EXT_stencil_wrap", NULL },

View File

@@ -57,7 +57,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "tnl/tnl.h" #include "tnl/tnl.h"
#include "tnl/t_pipeline.h" #include "tnl/t_pipeline.h"
#define need_GL_ARB_multisample
#define need_GL_ARB_vertex_buffer_object #define need_GL_ARB_vertex_buffer_object
#define need_GL_EXT_fog_coord #define need_GL_EXT_fog_coord
#define need_GL_EXT_secondary_color #define need_GL_EXT_secondary_color
@@ -73,7 +72,6 @@ int GlobalCmdQueueLen = 0;
struct dri_extension card_extensions[] = struct dri_extension card_extensions[] =
{ {
{ "GL_ARB_multisample", GL_ARB_multisample_functions },
{ "GL_ARB_multitexture", NULL }, { "GL_ARB_multitexture", NULL },
{ "GL_ARB_texture_border_clamp", NULL }, { "GL_ARB_texture_border_clamp", NULL },
{ "GL_ARB_texture_mirrored_repeat", NULL }, { "GL_ARB_texture_mirrored_repeat", NULL },
@@ -89,7 +87,6 @@ struct dri_extension card_extensions[] =
struct dri_extension card_extensions_6326[] = struct dri_extension card_extensions_6326[] =
{ {
{ "GL_ARB_multisample", GL_ARB_multisample_functions },
/*{ "GL_ARB_texture_border_clamp", NULL },*/ /*{ "GL_ARB_texture_border_clamp", NULL },*/
/*{ "GL_ARB_texture_mirrored_repeat", NULL },*/ /*{ "GL_ARB_texture_mirrored_repeat", NULL },*/
/*{ "GL_MESA_ycbcr_texture", NULL },*/ /*{ "GL_MESA_ycbcr_texture", NULL },*/

View File

@@ -58,7 +58,6 @@
#include "utils.h" #include "utils.h"
#define need_GL_ARB_multisample
/* #define need_GL_ARB_point_parameters */ /* #define need_GL_ARB_point_parameters */
#define need_GL_ARB_occlusion_query #define need_GL_ARB_occlusion_query
#define need_GL_ARB_vertex_buffer_object #define need_GL_ARB_vertex_buffer_object
@@ -81,7 +80,6 @@
*/ */
const struct dri_extension card_extensions[] = const struct dri_extension card_extensions[] =
{ {
{ "GL_ARB_multisample", GL_ARB_multisample_functions },
{ "GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions }, { "GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions },
{ "GL_ARB_texture_mirrored_repeat", NULL }, { "GL_ARB_texture_mirrored_repeat", NULL },
{ "GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions }, { "GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions },

View File

@@ -62,7 +62,6 @@
#include "main/macros.h" #include "main/macros.h"
#include "drirenderbuffer.h" #include "drirenderbuffer.h"
#define need_GL_ARB_multisample
#define need_GL_ARB_point_parameters #define need_GL_ARB_point_parameters
#define need_GL_ARB_vertex_buffer_object #define need_GL_ARB_vertex_buffer_object
#define need_GL_EXT_fog_coord #define need_GL_EXT_fog_coord
@@ -366,7 +365,6 @@ void viaReAllocateBuffers(GLcontext *ctx, GLframebuffer *drawbuffer,
*/ */
const struct dri_extension card_extensions[] = const struct dri_extension card_extensions[] =
{ {
{ "GL_ARB_multisample", GL_ARB_multisample_functions },
{ "GL_ARB_multitexture", NULL }, { "GL_ARB_multitexture", NULL },
{ "GL_ARB_point_parameters", GL_ARB_point_parameters_functions }, { "GL_ARB_point_parameters", GL_ARB_point_parameters_functions },
{ "GL_ARB_texture_env_add", NULL }, { "GL_ARB_texture_env_add", NULL },

View File

@@ -772,35 +772,30 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state)
/* GL_ARB_multisample */ /* GL_ARB_multisample */
case GL_MULTISAMPLE_ARB: case GL_MULTISAMPLE_ARB:
CHECK_EXTENSION(ARB_multisample, cap);
if (ctx->Multisample.Enabled == state) if (ctx->Multisample.Enabled == state)
return; return;
FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE); FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE);
ctx->Multisample.Enabled = state; ctx->Multisample.Enabled = state;
break; break;
case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB: case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
CHECK_EXTENSION(ARB_multisample, cap);
if (ctx->Multisample.SampleAlphaToCoverage == state) if (ctx->Multisample.SampleAlphaToCoverage == state)
return; return;
FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE); FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE);
ctx->Multisample.SampleAlphaToCoverage = state; ctx->Multisample.SampleAlphaToCoverage = state;
break; break;
case GL_SAMPLE_ALPHA_TO_ONE_ARB: case GL_SAMPLE_ALPHA_TO_ONE_ARB:
CHECK_EXTENSION(ARB_multisample, cap);
if (ctx->Multisample.SampleAlphaToOne == state) if (ctx->Multisample.SampleAlphaToOne == state)
return; return;
FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE); FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE);
ctx->Multisample.SampleAlphaToOne = state; ctx->Multisample.SampleAlphaToOne = state;
break; break;
case GL_SAMPLE_COVERAGE_ARB: case GL_SAMPLE_COVERAGE_ARB:
CHECK_EXTENSION(ARB_multisample, cap);
if (ctx->Multisample.SampleCoverage == state) if (ctx->Multisample.SampleCoverage == state)
return; return;
FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE); FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE);
ctx->Multisample.SampleCoverage = state; ctx->Multisample.SampleCoverage = state;
break; break;
case GL_SAMPLE_COVERAGE_INVERT_ARB: case GL_SAMPLE_COVERAGE_INVERT_ARB:
CHECK_EXTENSION(ARB_multisample, cap);
if (ctx->Multisample.SampleCoverageInvert == state) if (ctx->Multisample.SampleCoverageInvert == state)
return; return;
FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE); FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE);
@@ -1284,19 +1279,14 @@ _mesa_IsEnabled( GLenum cap )
/* GL_ARB_multisample */ /* GL_ARB_multisample */
case GL_MULTISAMPLE_ARB: case GL_MULTISAMPLE_ARB:
CHECK_EXTENSION(ARB_multisample);
return ctx->Multisample.Enabled; return ctx->Multisample.Enabled;
case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB: case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
CHECK_EXTENSION(ARB_multisample);
return ctx->Multisample.SampleAlphaToCoverage; return ctx->Multisample.SampleAlphaToCoverage;
case GL_SAMPLE_ALPHA_TO_ONE_ARB: case GL_SAMPLE_ALPHA_TO_ONE_ARB:
CHECK_EXTENSION(ARB_multisample);
return ctx->Multisample.SampleAlphaToOne; return ctx->Multisample.SampleAlphaToOne;
case GL_SAMPLE_COVERAGE_ARB: case GL_SAMPLE_COVERAGE_ARB:
CHECK_EXTENSION(ARB_multisample);
return ctx->Multisample.SampleCoverage; return ctx->Multisample.SampleCoverage;
case GL_SAMPLE_COVERAGE_INVERT_ARB: case GL_SAMPLE_COVERAGE_INVERT_ARB:
CHECK_EXTENSION(ARB_multisample);
return ctx->Multisample.SampleCoverageInvert; return ctx->Multisample.SampleCoverageInvert;
/* GL_IBM_rasterpos_clip */ /* GL_IBM_rasterpos_clip */

View File

@@ -52,7 +52,7 @@ static const struct {
{ OFF, "GL_ARB_framebuffer_object", F(ARB_framebuffer_object) }, { OFF, "GL_ARB_framebuffer_object", F(ARB_framebuffer_object) },
{ OFF, "GL_ARB_half_float_pixel", F(ARB_half_float_pixel) }, { OFF, "GL_ARB_half_float_pixel", F(ARB_half_float_pixel) },
{ OFF, "GL_ARB_imaging", F(ARB_imaging) }, { OFF, "GL_ARB_imaging", F(ARB_imaging) },
{ OFF, "GL_ARB_multisample", F(ARB_multisample) }, { ON, "GL_ARB_multisample", F(ARB_multisample) },
{ OFF, "GL_ARB_multitexture", F(ARB_multitexture) }, { OFF, "GL_ARB_multitexture", F(ARB_multitexture) },
{ OFF, "GL_ARB_occlusion_query", F(ARB_occlusion_query) }, { OFF, "GL_ARB_occlusion_query", F(ARB_occlusion_query) },
{ OFF, "GL_ARB_pixel_buffer_object", F(EXT_pixel_buffer_object) }, { OFF, "GL_ARB_pixel_buffer_object", F(EXT_pixel_buffer_object) },
@@ -342,7 +342,7 @@ _mesa_enable_imaging_extensions(GLcontext *ctx)
void void
_mesa_enable_1_3_extensions(GLcontext *ctx) _mesa_enable_1_3_extensions(GLcontext *ctx)
{ {
ctx->Extensions.ARB_multisample = GL_TRUE; /*ctx->Extensions.ARB_multisample = GL_TRUE;*/
ctx->Extensions.ARB_multitexture = GL_TRUE; ctx->Extensions.ARB_multitexture = GL_TRUE;
ctx->Extensions.ARB_texture_border_clamp = GL_TRUE; ctx->Extensions.ARB_texture_border_clamp = GL_TRUE;
/*ctx->Extensions.ARB_texture_compression = GL_TRUE;*/ /*ctx->Extensions.ARB_texture_compression = GL_TRUE;*/

View File

@@ -1365,35 +1365,27 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureMaxAnisotropy); params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureMaxAnisotropy);
break; break;
case GL_MULTISAMPLE_ARB: case GL_MULTISAMPLE_ARB:
CHECK_EXT1(ARB_multisample, "GetBooleanv");
params[0] = ctx->Multisample.Enabled; params[0] = ctx->Multisample.Enabled;
break; break;
case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB: case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
CHECK_EXT1(ARB_multisample, "GetBooleanv");
params[0] = ctx->Multisample.SampleAlphaToCoverage; params[0] = ctx->Multisample.SampleAlphaToCoverage;
break; break;
case GL_SAMPLE_ALPHA_TO_ONE_ARB: case GL_SAMPLE_ALPHA_TO_ONE_ARB:
CHECK_EXT1(ARB_multisample, "GetBooleanv");
params[0] = ctx->Multisample.SampleAlphaToOne; params[0] = ctx->Multisample.SampleAlphaToOne;
break; break;
case GL_SAMPLE_COVERAGE_ARB: case GL_SAMPLE_COVERAGE_ARB:
CHECK_EXT1(ARB_multisample, "GetBooleanv");
params[0] = ctx->Multisample.SampleCoverage; params[0] = ctx->Multisample.SampleCoverage;
break; break;
case GL_SAMPLE_COVERAGE_VALUE_ARB: case GL_SAMPLE_COVERAGE_VALUE_ARB:
CHECK_EXT1(ARB_multisample, "GetBooleanv");
params[0] = FLOAT_TO_BOOLEAN(ctx->Multisample.SampleCoverageValue); params[0] = FLOAT_TO_BOOLEAN(ctx->Multisample.SampleCoverageValue);
break; break;
case GL_SAMPLE_COVERAGE_INVERT_ARB: case GL_SAMPLE_COVERAGE_INVERT_ARB:
CHECK_EXT1(ARB_multisample, "GetBooleanv");
params[0] = ctx->Multisample.SampleCoverageInvert; params[0] = ctx->Multisample.SampleCoverageInvert;
break; break;
case GL_SAMPLE_BUFFERS_ARB: case GL_SAMPLE_BUFFERS_ARB:
CHECK_EXT1(ARB_multisample, "GetBooleanv");
params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.sampleBuffers); params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.sampleBuffers);
break; break;
case GL_SAMPLES_ARB: case GL_SAMPLES_ARB:
CHECK_EXT1(ARB_multisample, "GetBooleanv");
params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.samples); params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.samples);
break; break;
case GL_RASTER_POSITION_UNCLIPPED_IBM: case GL_RASTER_POSITION_UNCLIPPED_IBM:
@@ -3214,35 +3206,27 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
params[0] = ctx->Const.MaxTextureMaxAnisotropy; params[0] = ctx->Const.MaxTextureMaxAnisotropy;
break; break;
case GL_MULTISAMPLE_ARB: case GL_MULTISAMPLE_ARB:
CHECK_EXT1(ARB_multisample, "GetFloatv");
params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.Enabled); params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.Enabled);
break; break;
case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB: case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
CHECK_EXT1(ARB_multisample, "GetFloatv");
params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToCoverage); params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToCoverage);
break; break;
case GL_SAMPLE_ALPHA_TO_ONE_ARB: case GL_SAMPLE_ALPHA_TO_ONE_ARB:
CHECK_EXT1(ARB_multisample, "GetFloatv");
params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToOne); params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToOne);
break; break;
case GL_SAMPLE_COVERAGE_ARB: case GL_SAMPLE_COVERAGE_ARB:
CHECK_EXT1(ARB_multisample, "GetFloatv");
params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverage); params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverage);
break; break;
case GL_SAMPLE_COVERAGE_VALUE_ARB: case GL_SAMPLE_COVERAGE_VALUE_ARB:
CHECK_EXT1(ARB_multisample, "GetFloatv");
params[0] = ctx->Multisample.SampleCoverageValue; params[0] = ctx->Multisample.SampleCoverageValue;
break; break;
case GL_SAMPLE_COVERAGE_INVERT_ARB: case GL_SAMPLE_COVERAGE_INVERT_ARB:
CHECK_EXT1(ARB_multisample, "GetFloatv");
params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverageInvert); params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverageInvert);
break; break;
case GL_SAMPLE_BUFFERS_ARB: case GL_SAMPLE_BUFFERS_ARB:
CHECK_EXT1(ARB_multisample, "GetFloatv");
params[0] = (GLfloat)(ctx->DrawBuffer->Visual.sampleBuffers); params[0] = (GLfloat)(ctx->DrawBuffer->Visual.sampleBuffers);
break; break;
case GL_SAMPLES_ARB: case GL_SAMPLES_ARB:
CHECK_EXT1(ARB_multisample, "GetFloatv");
params[0] = (GLfloat)(ctx->DrawBuffer->Visual.samples); params[0] = (GLfloat)(ctx->DrawBuffer->Visual.samples);
break; break;
case GL_RASTER_POSITION_UNCLIPPED_IBM: case GL_RASTER_POSITION_UNCLIPPED_IBM:
@@ -5063,35 +5047,27 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
params[0] = IROUND(ctx->Const.MaxTextureMaxAnisotropy); params[0] = IROUND(ctx->Const.MaxTextureMaxAnisotropy);
break; break;
case GL_MULTISAMPLE_ARB: case GL_MULTISAMPLE_ARB:
CHECK_EXT1(ARB_multisample, "GetIntegerv");
params[0] = BOOLEAN_TO_INT(ctx->Multisample.Enabled); params[0] = BOOLEAN_TO_INT(ctx->Multisample.Enabled);
break; break;
case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB: case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
CHECK_EXT1(ARB_multisample, "GetIntegerv");
params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToCoverage); params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToCoverage);
break; break;
case GL_SAMPLE_ALPHA_TO_ONE_ARB: case GL_SAMPLE_ALPHA_TO_ONE_ARB:
CHECK_EXT1(ARB_multisample, "GetIntegerv");
params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToOne); params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToOne);
break; break;
case GL_SAMPLE_COVERAGE_ARB: case GL_SAMPLE_COVERAGE_ARB:
CHECK_EXT1(ARB_multisample, "GetIntegerv");
params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverage); params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverage);
break; break;
case GL_SAMPLE_COVERAGE_VALUE_ARB: case GL_SAMPLE_COVERAGE_VALUE_ARB:
CHECK_EXT1(ARB_multisample, "GetIntegerv");
params[0] = IROUND(ctx->Multisample.SampleCoverageValue); params[0] = IROUND(ctx->Multisample.SampleCoverageValue);
break; break;
case GL_SAMPLE_COVERAGE_INVERT_ARB: case GL_SAMPLE_COVERAGE_INVERT_ARB:
CHECK_EXT1(ARB_multisample, "GetIntegerv");
params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverageInvert); params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverageInvert);
break; break;
case GL_SAMPLE_BUFFERS_ARB: case GL_SAMPLE_BUFFERS_ARB:
CHECK_EXT1(ARB_multisample, "GetIntegerv");
params[0] = ctx->DrawBuffer->Visual.sampleBuffers; params[0] = ctx->DrawBuffer->Visual.sampleBuffers;
break; break;
case GL_SAMPLES_ARB: case GL_SAMPLES_ARB:
CHECK_EXT1(ARB_multisample, "GetIntegerv");
params[0] = ctx->DrawBuffer->Visual.samples; params[0] = ctx->DrawBuffer->Visual.samples;
break; break;
case GL_RASTER_POSITION_UNCLIPPED_IBM: case GL_RASTER_POSITION_UNCLIPPED_IBM:

View File

@@ -681,21 +681,21 @@ StateVars = [
# GL_ARB_multisample # GL_ARB_multisample
( "GL_MULTISAMPLE_ARB", GLboolean, ( "GL_MULTISAMPLE_ARB", GLboolean,
["ctx->Multisample.Enabled"], "", ["ARB_multisample"] ), ["ctx->Multisample.Enabled"], "", None ),
( "GL_SAMPLE_ALPHA_TO_COVERAGE_ARB", GLboolean, ( "GL_SAMPLE_ALPHA_TO_COVERAGE_ARB", GLboolean,
["ctx->Multisample.SampleAlphaToCoverage"], "", ["ARB_multisample"] ), ["ctx->Multisample.SampleAlphaToCoverage"], "", None ),
( "GL_SAMPLE_ALPHA_TO_ONE_ARB", GLboolean, ( "GL_SAMPLE_ALPHA_TO_ONE_ARB", GLboolean,
["ctx->Multisample.SampleAlphaToOne"], "", ["ARB_multisample"] ), ["ctx->Multisample.SampleAlphaToOne"], "", None ),
( "GL_SAMPLE_COVERAGE_ARB", GLboolean, ( "GL_SAMPLE_COVERAGE_ARB", GLboolean,
["ctx->Multisample.SampleCoverage"], "", ["ARB_multisample"] ), ["ctx->Multisample.SampleCoverage"], "", None ),
( "GL_SAMPLE_COVERAGE_VALUE_ARB", GLfloat, ( "GL_SAMPLE_COVERAGE_VALUE_ARB", GLfloat,
["ctx->Multisample.SampleCoverageValue"], "", ["ARB_multisample"] ), ["ctx->Multisample.SampleCoverageValue"], "", None ),
( "GL_SAMPLE_COVERAGE_INVERT_ARB", GLboolean, ( "GL_SAMPLE_COVERAGE_INVERT_ARB", GLboolean,
["ctx->Multisample.SampleCoverageInvert"], "", ["ARB_multisample"] ), ["ctx->Multisample.SampleCoverageInvert"], "", None ),
( "GL_SAMPLE_BUFFERS_ARB", GLint, ( "GL_SAMPLE_BUFFERS_ARB", GLint,
["ctx->DrawBuffer->Visual.sampleBuffers"], "", ["ARB_multisample"] ), ["ctx->DrawBuffer->Visual.sampleBuffers"], "", None ),
( "GL_SAMPLES_ARB", GLint, ( "GL_SAMPLES_ARB", GLint,
["ctx->DrawBuffer->Visual.samples"], "", ["ARB_multisample"] ), ["ctx->DrawBuffer->Visual.samples"], "", None ),
# GL_IBM_rasterpos_clip # GL_IBM_rasterpos_clip
( "GL_RASTER_POSITION_UNCLIPPED_IBM", GLboolean, ( "GL_RASTER_POSITION_UNCLIPPED_IBM", GLboolean,

View File

@@ -37,11 +37,6 @@ _mesa_SampleCoverageARB(GLclampf value, GLboolean invert)
{ {
GET_CURRENT_CONTEXT(ctx); GET_CURRENT_CONTEXT(ctx);
if (!ctx->Extensions.ARB_multisample) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glSampleCoverageARB");
return;
}
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx ); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx );
ctx->Multisample.SampleCoverageValue = (GLfloat) CLAMP(value, 0.0, 1.0); ctx->Multisample.SampleCoverageValue = (GLfloat) CLAMP(value, 0.0, 1.0);