summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915simple/i915_context.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-02-27 10:15:37 -0700
committerBrian <[email protected]>2008-02-27 10:15:37 -0700
commit17188e4d5a3707c134fc97976863f0d8e2f1f5ab (patch)
tree062eee5954bf6b757e2f6904f60e08c426e4d025 /src/gallium/drivers/i915simple/i915_context.c
parentf04736c8be5d30c510e1799ac0c8fa5173516513 (diff)
gallium/i915: hook up screen->get_param()
Diffstat (limited to 'src/gallium/drivers/i915simple/i915_context.c')
-rw-r--r--src/gallium/drivers/i915simple/i915_context.c55
1 files changed, 5 insertions, 50 deletions
diff --git a/src/gallium/drivers/i915simple/i915_context.c b/src/gallium/drivers/i915simple/i915_context.c
index 8478cd76a54..e89db8a1303 100644
--- a/src/gallium/drivers/i915simple/i915_context.c
+++ b/src/gallium/drivers/i915simple/i915_context.c
@@ -36,6 +36,7 @@
#include "pipe/p_defines.h"
#include "pipe/p_winsys.h"
#include "pipe/p_util.h"
+#include "pipe/p_screen.h"
/**
@@ -90,65 +91,19 @@ i915_is_format_supported( struct pipe_context *pipe,
}
+/* XXX temporary */
static int
i915_get_param(struct pipe_context *pipe, int param)
{
- switch (param) {
- case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
- return 8;
- case PIPE_CAP_NPOT_TEXTURES:
- return 1;
- case PIPE_CAP_TWO_SIDED_STENCIL:
- return 1;
- case PIPE_CAP_GLSL:
- return 0;
- case PIPE_CAP_S3TC:
- return 0;
- case PIPE_CAP_ANISOTROPIC_FILTER:
- return 0;
- case PIPE_CAP_POINT_SPRITE:
- return 0;
- case PIPE_CAP_MAX_RENDER_TARGETS:
- return 1;
- case PIPE_CAP_OCCLUSION_QUERY:
- return 0;
- case PIPE_CAP_TEXTURE_SHADOW_MAP:
- return 1;
- case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
- return 11; /* max 1024x1024 */
- case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
- return 8; /* max 128x128x128 */
- case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
- return 11; /* max 1024x1024 */
- default:
- return 0;
- }
+ return pipe->screen->get_param(pipe->screen, param);
}
+/* XXX temporary */
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 4.0;
-
- case PIPE_CAP_MAX_TEXTURE_LOD_BIAS:
- return 16.0;
-
- default:
- return 0;
- }
+ return pipe->screen->get_paramf(pipe->screen, param);
}