From bb71f9249a66b9a4921a878766c0a2d87624c369 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sat, 19 Nov 2011 22:38:22 +0100 Subject: gallium: separate out floating-point CAPs into its own enum The motivation behind this is to add some self-documentation in the code about how each CAP can be used. The idea is: - enum pipe_cap is only valid in get_param - enum pipe_capf is only valid in get_paramf Which CAPs are floating-point have been determined based on how everybody except svga implemented the functions. svga have been modified to match all the other drivers. Besides that, the floating-point CAPs are now prefixed with PIPE_CAPF_. --- src/gallium/drivers/softpipe/sp_screen.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/gallium/drivers/softpipe') diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index 4b71a35f170..7a09be7cfa0 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -155,20 +155,20 @@ softpipe_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe } static float -softpipe_get_paramf(struct pipe_screen *screen, enum pipe_cap param) +softpipe_get_paramf(struct pipe_screen *screen, enum pipe_capf param) { switch (param) { - case PIPE_CAP_MAX_LINE_WIDTH: + case PIPE_CAPF_MAX_LINE_WIDTH: /* fall-through */ - case PIPE_CAP_MAX_LINE_WIDTH_AA: + case PIPE_CAPF_MAX_LINE_WIDTH_AA: return 255.0; /* arbitrary */ - case PIPE_CAP_MAX_POINT_WIDTH: + case PIPE_CAPF_MAX_POINT_WIDTH: /* fall-through */ - case PIPE_CAP_MAX_POINT_WIDTH_AA: + case PIPE_CAPF_MAX_POINT_WIDTH_AA: return 255.0; /* arbitrary */ - case PIPE_CAP_MAX_TEXTURE_ANISOTROPY: + case PIPE_CAPF_MAX_TEXTURE_ANISOTROPY: return 16.0; - case PIPE_CAP_MAX_TEXTURE_LOD_BIAS: + case PIPE_CAPF_MAX_TEXTURE_LOD_BIAS: return 16.0; /* arbitrary */ default: return 0; -- cgit v1.2.3