aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_drawpixels.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-11-06 09:41:45 -0700
committerBrian <[email protected]>2007-11-06 09:41:45 -0700
commite2feb80a90f3e9300c70a4a4eb3e966131f5c313 (patch)
treed407028c34268b686e0c5802c07e09bac0d57ece /src/mesa/state_tracker/st_cb_drawpixels.c
parent24ac9c30ebfd2edabdd21bfc9cf4e9db21cd10df (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/state_tracker/st_cb_drawpixels.c')
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index fc58035d00b..df41d5ce5b2 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -703,15 +703,15 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
const GLuint unit = 0;
struct pipe_context *pipe = ctx->st->pipe;
GLfloat x0, y0, x1, y1;
- GLuint maxWidth, maxHeight;
+ GLuint maxSize;
/* 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);
+ maxSize = 1 << (pipe->get_param(pipe, PIPE_CAP_MAX_TEXTURE_2D_LEVELS) - 1);
+ assert(width <= maxSize);
+ assert(height <= maxSize);
/* setup state: just scissor */
{