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/state_tracker/st_cb_drawpixels.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/state_tracker/st_cb_drawpixels.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_drawpixels.c | 8 |
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 */ { |