r300: enable ARB_occlusion_query

Supported only on HW with TCL block and with proper radeon drm.
Required minimum radeon drm version is 1.30 or KMS.
This commit is contained in:
Maciej Cencora 2009-06-11 16:11:47 +02:00
parent d2b1b9e8d5
commit 60587182d4
1 changed files with 8 additions and 0 deletions

View File

@ -64,6 +64,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r300_ioctl.h"
#include "r300_tex.h"
#include "r300_emit.h"
#include "r300_queryobj.h"
#include "r300_swtcl.h"
#include "radeon_bocs_wrapper.h"
#include "radeon_buffer_objects.h"
@ -95,6 +96,7 @@ const struct dri_extension card_extensions[] = {
/* *INDENT-OFF* */
{"GL_ARB_depth_texture", NULL},
{"GL_ARB_fragment_program", NULL},
{"GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions},
{"GL_ARB_multitexture", NULL},
{"GL_ARB_point_parameters", GL_ARB_point_parameters_functions},
{"GL_ARB_shadow", NULL},
@ -358,6 +360,11 @@ static void r300InitGLExtensions(GLcontext *ctx)
} else if (r300->options.s3tc_force_disabled) {
_mesa_disable_extension(ctx, "GL_EXT_texture_compression_s3tc");
}
if (!r300->radeon.radeonScreen->drmSupportsOcclusionQueries ||
!r300->options.hw_tcl_enabled) {
_mesa_disable_extension(ctx, "GL_ARB_occlusion_query");
}
}
/* Create the device specific rendering context.
@ -389,6 +396,7 @@ GLboolean r300CreateContext(const __GLcontextModes * glVisual,
r300InitStateFuncs(&functions);
r300InitTextureFuncs(&functions);
r300InitShaderFuncs(&functions);
r300InitQueryObjFunctions(&functions);
radeonInitBufferObjectFuncs(&functions);
if (!radeonInitContext(&r300->radeon, &functions,