diff options
author | Brian <[email protected]> | 2007-11-08 08:22:42 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-11-08 08:48:14 -0700 |
commit | 44254b92480115e5c8a2d5cf78f99195c03701eb (patch) | |
tree | 086564302fdb3ac15ef1bf25c5da44a11fc42e5b /src/mesa/pipe/softpipe | |
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/softpipe')
-rw-r--r-- | src/mesa/pipe/softpipe/sp_context.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c index 09c5a7152dc..be4da0ec64a 100644 --- a/src/mesa/pipe/softpipe/sp_context.c +++ b/src/mesa/pipe/softpipe/sp_context.c @@ -251,6 +251,30 @@ static int softpipe_get_param(struct pipe_context *pipe, int param) } } +static float softpipe_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 255.0; /* arbitrary */ + + case PIPE_CAP_MAX_POINT_WIDTH: + /* fall-through */ + case PIPE_CAP_MAX_POINT_WIDTH_AA: + return 255.0; /* arbitrary */ + + case PIPE_CAP_MAX_TEXTURE_ANISOTROPY: + return 0.0; + + case PIPE_CAP_MAX_TEXTURE_LOD_BIAS: + return 16.0; /* arbitrary */ + + default: + return 0; + } +} + struct pipe_context *softpipe_create( struct pipe_winsys *pipe_winsys, struct softpipe_winsys *softpipe_winsys ) { @@ -270,8 +294,8 @@ struct pipe_context *softpipe_create( struct pipe_winsys *pipe_winsys, /* queries */ softpipe->pipe.is_format_supported = softpipe_is_format_supported; - //softpipe->pipe.max_texture_size = softpipe_max_texture_size; softpipe->pipe.get_param = softpipe_get_param; + softpipe->pipe.get_paramf = softpipe_get_paramf; /* state setters */ softpipe->pipe.create_alpha_test_state = softpipe_create_alpha_test_state; |