summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe/sp_context.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-11-08 08:22:42 -0700
committerBrian <brian.paul@tungstengraphics.com>2007-11-08 08:48:14 -0700
commit44254b92480115e5c8a2d5cf78f99195c03701eb (patch)
tree086564302fdb3ac15ef1bf25c5da44a11fc42e5b /src/mesa/pipe/softpipe/sp_context.c
parent95128c1d4c88238a79ead6e36215a646f83bbdd3 (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/sp_context.c')
-rw-r--r--src/mesa/pipe/softpipe/sp_context.c26
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 09c5a7152d..be4da0ec64 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;