get cliprect bounds after softpipe_update_derived()
authorBrian <brian@i915.localnet.net>
Wed, 1 Aug 2007 21:38:59 +0000 (15:38 -0600)
committerBrian <brian@i915.localnet.net>
Wed, 1 Aug 2007 21:38:59 +0000 (15:38 -0600)
src/mesa/pipe/softpipe/sp_clear.c

index b3bbc96f307f87576db9bcc2a3d57af2834ed176..a133b488918cd38a36cf5a692aff8b6679d40804 100644 (file)
@@ -34,6 +34,7 @@
 #include "sp_clear.h"
 #include "sp_context.h"
 #include "sp_surface.h"
+#include "sp_state.h"
 #include "colormac.h"
 
 
@@ -98,10 +99,14 @@ softpipe_clear(struct pipe_context *pipe, GLboolean color, GLboolean depth,
                GLboolean stencil, GLboolean accum)
 {
    const struct softpipe_context *softpipe = softpipe_context(pipe);
-   const GLint x = softpipe->cliprect.minx;
-   const GLint y = softpipe->cliprect.miny;
-   const GLint w = softpipe->cliprect.maxx - x;
-   const GLint h = softpipe->cliprect.maxy - y;
+   GLint x, y, w, h;
+
+   softpipe_update_derived(softpipe);
+
+   x = softpipe->cliprect.minx;
+   y = softpipe->cliprect.miny;
+   w = softpipe->cliprect.maxx - x;
+   h = softpipe->cliprect.maxy - y;
 
    if (color) {
       GLuint i;