diff options
author | Brian <[email protected]> | 2007-11-06 09:41:45 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-11-06 09:41:45 -0700 |
commit | e2feb80a90f3e9300c70a4a4eb3e966131f5c313 (patch) | |
tree | d407028c34268b686e0c5802c07e09bac0d57ece /src/mesa/pipe/i915simple/i915_context.c | |
parent | 24ac9c30ebfd2edabdd21bfc9cf4e9db21cd10df (diff) |
Remove pipe->max_texture_size(), use get_param() instead.
Also, in st_init_limits(), clamp driver's values against Mesa's internal limits.
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_context.c')
-rw-r--r-- | src/mesa/pipe/i915simple/i915_context.c | 37 |
1 files changed, 6 insertions, 31 deletions
diff --git a/src/mesa/pipe/i915simple/i915_context.c b/src/mesa/pipe/i915simple/i915_context.c index 6de1e68f73b..50503a843a3 100644 --- a/src/mesa/pipe/i915simple/i915_context.c +++ b/src/mesa/pipe/i915simple/i915_context.c @@ -108,36 +108,6 @@ i915_is_format_supported( struct pipe_context *pipe, } -/** - * We might want to return max texture levels instead... - */ -static void -i915_max_texture_size(struct pipe_context *pipe, unsigned textureType, - unsigned *maxWidth, unsigned *maxHeight, unsigned *maxDepth) -{ - switch (textureType) { - case PIPE_TEXTURE_1D: - *maxWidth = 2048; - break; - case PIPE_TEXTURE_2D: - *maxWidth = - *maxHeight = 2048; - break; - case PIPE_TEXTURE_3D: - *maxWidth = - *maxHeight = - *maxDepth = 256; - break; - case PIPE_TEXTURE_CUBE: - *maxWidth = - *maxHeight = 2048; - break; - default: - assert(0); - } -} - - static int i915_get_param(struct pipe_context *pipe, int param) { @@ -162,6 +132,12 @@ i915_get_param(struct pipe_context *pipe, int param) return 0; case PIPE_CAP_TEXTURE_SHADOW_MAP: return 0; + 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; } @@ -324,7 +300,6 @@ 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.max_texture_size = i915_max_texture_size; i915->pipe.get_param = i915_get_param; i915->pipe.clear = i915_clear; |