From 44254b92480115e5c8a2d5cf78f99195c03701eb Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Nov 2007 08:22:42 -0700 Subject: Added pipe->get_paramf() to query float limits. So far max point size, line width, texture anistopy and lod bias. --- src/mesa/pipe/i915simple/i915_context.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/mesa/pipe/i915simple') diff --git a/src/mesa/pipe/i915simple/i915_context.c b/src/mesa/pipe/i915simple/i915_context.c index 50503a843a3..11be13705f9 100644 --- a/src/mesa/pipe/i915simple/i915_context.c +++ b/src/mesa/pipe/i915simple/i915_context.c @@ -144,6 +144,32 @@ i915_get_param(struct pipe_context *pipe, int param) } +static float +i915_get_paramf(struct pipe_context *pipe, int param) +{ + switch (param) { + case PIPE_CAP_MAX_LINE_WIDTH: + /* fall-through */ + case PIPE_CAP_MAX_LINE_WIDTH_AA: + return 7.5; + + case PIPE_CAP_MAX_POINT_WIDTH: + /* fall-through */ + case PIPE_CAP_MAX_POINT_WIDTH_AA: + return 255.0; + + case PIPE_CAP_MAX_TEXTURE_ANISOTROPY: + return 0.0; + + case PIPE_CAP_MAX_TEXTURE_LOD_BIAS: + return 16.0; + + default: + return 0; + } +} + + static void i915_destroy( struct pipe_context *pipe ) { struct i915_context *i915 = i915_context( pipe ); @@ -301,6 +327,7 @@ struct pipe_context *i915_create( struct pipe_winsys *pipe_winsys, i915->pipe.destroy = i915_destroy; i915->pipe.is_format_supported = i915_is_format_supported; i915->pipe.get_param = i915_get_param; + i915->pipe.get_paramf = i915_get_paramf; i915->pipe.clear = i915_clear; -- cgit v1.2.3