diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-11-08 08:22:42 -0700 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-11-08 08:48:14 -0700 |
commit | 44254b92480115e5c8a2d5cf78f99195c03701eb (patch) | |
tree | 086564302fdb3ac15ef1bf25c5da44a11fc42e5b /src/mesa/pipe/i915simple | |
parent | 95128c1d4c88238a79ead6e36215a646f83bbdd3 (diff) |
Added pipe->get_paramf() to query float limits.
So far max point size, line width, texture anistopy and lod bias.
Diffstat (limited to 'src/mesa/pipe/i915simple')
-rw-r--r-- | src/mesa/pipe/i915simple/i915_context.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/mesa/pipe/i915simple/i915_context.c b/src/mesa/pipe/i915simple/i915_context.c index 50503a843a..11be13705f 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; |