From c6499a741c99394e81d1d86ffd066f3d9749875c Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 5 Nov 2007 18:04:30 -0700 Subject: Determine GL extensions/limits by making pipe queries. The state tracker calls pipe->get_param() to determine the GL limits and which OpenGL extensions are supported. This is an initial implementation that'll probably change... --- src/mesa/pipe/softpipe/sp_context.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/mesa/pipe/softpipe/sp_context.c') diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c index 46f591e4255..effecda87e5 100644 --- a/src/mesa/pipe/softpipe/sp_context.c +++ b/src/mesa/pipe/softpipe/sp_context.c @@ -277,6 +277,26 @@ static const char *softpipe_get_vendor( struct pipe_context *pipe ) static int softpipe_get_param(struct pipe_context *pipe, int param) { switch (param) { + case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS: + return 8; + case PIPE_CAP_NPOT_TEXTURES: + return 1; + case PIPE_CAP_TWO_SIDED_STENCIL: + return 1; + case PIPE_CAP_GLSL: + return 1; + case PIPE_CAP_S3TC: + return 0; + case PIPE_CAP_ANISOTROPIC_FILTER: + return 0; + case PIPE_CAP_POINT_SPRITE: + return 1; + case PIPE_CAP_MAX_RENDER_TARGETS: + return 1; + case PIPE_CAP_OCCLUSION_QUERY: + return 1; + case PIPE_CAP_TEXTURE_SHADOW_MAP: + return 1; default: return 0; } -- cgit v1.2.3