summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/i915simple
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-08-10 15:47:45 -0600
committerBrian <[email protected]>2007-08-10 15:48:54 -0600
commit8fbd81b4ed59e371aa616b87296e4263d8992bff (patch)
tree7344b1d23c68ae266ce3388f65204ab981b88ab1 /src/mesa/pipe/i915simple
parent47fc2c4349746997704a7f81dffadd22363e0ff1 (diff)
added pipe->max_texture_size() query, use it in st_drawpixels()
Diffstat (limited to 'src/mesa/pipe/i915simple')
-rw-r--r--src/mesa/pipe/i915simple/i915_context.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/mesa/pipe/i915simple/i915_context.c b/src/mesa/pipe/i915simple/i915_context.c
index ee6cfe2ed48..d9fbada1ff6 100644
--- a/src/mesa/pipe/i915simple/i915_context.c
+++ b/src/mesa/pipe/i915simple/i915_context.c
@@ -115,6 +115,35 @@ i915_supported_formats(struct pipe_context *pipe,
}
+/**
+ * We might want to return max texture levels instead...
+ */
+static void
+i915_max_texture_size(struct pipe_context *pipe, GLuint textureType,
+ GLuint *maxWidth, GLuint *maxHeight, GLuint *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 void i915_destroy( struct pipe_context *pipe )
{
@@ -193,6 +222,7 @@ struct pipe_context *i915_create( struct pipe_winsys *pipe_winsys,
i915->pipe.destroy = i915_destroy;
i915->pipe.supported_formats = i915_supported_formats;
+ i915->pipe.max_texture_size = i915_max_texture_size;
i915->pipe.draw_vb = i915_draw_vb;
i915->pipe.draw_vertices = i915_draw_vertices;
i915->pipe.clear = i915_clear;