summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-08-10 15:47:45 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-08-10 15:48:54 -0600
commit8fbd81b4ed59e371aa616b87296e4263d8992bff (patch)
tree7344b1d23c68ae266ce3388f65204ab981b88ab1 /src/mesa/state_tracker
parent47fc2c4349746997704a7f81dffadd22363e0ff1 (diff)
added pipe->max_texture_size() query, use it in st_drawpixels()
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index a5ba614429..ce417b9b7e 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -250,6 +250,15 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
struct pipe_context *pipe = ctx->st->pipe;
struct pipe_mipmap_tree *mt;
GLfloat x0, y0, x1, y1;
+ GLuint maxWidth, maxHeight;
+
+ /* limit checks */
+ /* XXX if DrawPixels image is larger than max texture size, break
+ * it up into chunks.
+ */
+ pipe->max_texture_size(pipe, PIPE_TEXTURE_2D, &maxWidth, &maxHeight, NULL);
+ assert(width <= maxWidth);
+ assert(height <= maxHeight);
/* setup state: just scissor */
{