summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Packard <[email protected]>2007-01-06 17:13:29 -0800
committerKeith Packard <[email protected]>2007-01-06 17:13:29 -0800
commit9311c29558156859c6b26389c1b20a25d361d39d (patch)
tree203f203c1ea16e27f36c0c2d0ac3be19bb0aabab
parent8c1cc5fd8084e7a927b15c88709a615fa16b06a3 (diff)
Initialize GL_ARB_occlusion_query only if DRM support is present.
DRM versions before 1.8 do not include the necessary ioctls to support GL_ARB_occlusion_query, don't enable it on these versions.
-rw-r--r--src/mesa/drivers/dri/i965/intel_context.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c
index 9acafe5310e..459ed109ed5 100644
--- a/src/mesa/drivers/dri/i965/intel_context.c
+++ b/src/mesa/drivers/dri/i965/intel_context.c
@@ -33,6 +33,7 @@
#include "extensions.h"
#include "framebuffer.h"
#include "imports.h"
+#include "points.h"
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
@@ -158,7 +159,6 @@ const struct dri_extension card_extensions[] =
{ "GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions },
{ "GL_ARB_vertex_program", GL_ARB_vertex_program_functions },
{ "GL_ARB_window_pos", GL_ARB_window_pos_functions },
- { "GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions},
{ "GL_EXT_blend_color", GL_EXT_blend_color_functions },
{ "GL_EXT_blend_equation_separate", GL_EXT_blend_equation_separate_functions },
{ "GL_EXT_blend_func_separate", GL_EXT_blend_func_separate_functions },
@@ -184,7 +184,8 @@ const struct dri_extension card_extensions[] =
{ NULL, NULL }
};
-
+static const struct dri_extension arb_oc_extension =
+ { "GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions};
static const struct dri_debug_control debug_control[] =
{
@@ -412,6 +413,9 @@ GLboolean intelInitContext( struct intel_context *intel,
driInitExtensions( ctx, card_extensions,
GL_TRUE );
+ if (intel->intelScreen->drmMinor >= 8)
+ driInitSingleExtension (ctx, &arb_oc_extension);
+
INTEL_DEBUG = driParseDebugString( getenv( "INTEL_DEBUG" ),
debug_control );