r300g: fix conversion from int to boolean
authorMarek Olšák <maraeo@gmail.com>
Sun, 15 May 2011 00:10:44 +0000 (02:10 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sun, 15 May 2011 01:26:29 +0000 (03:26 +0200)
src/gallium/drivers/r300/r300_blit.c

index 95a43fe675245c6ac8b02525e8eb1fb30ac2b05e..8ec6479bb9e52c83a7f616141240f8afb8eb7cff 100644 (file)
@@ -113,7 +113,7 @@ static boolean r300_fast_zclear_allowed(struct r300_context *r300)
     struct pipe_framebuffer_state *fb =
         (struct pipe_framebuffer_state*)r300->fb_state.state;
 
-    return r300_resource(fb->zsbuf->texture)->tex.zmask_dwords[fb->zsbuf->u.tex.level];
+    return r300_resource(fb->zsbuf->texture)->tex.zmask_dwords[fb->zsbuf->u.tex.level] != 0;
 }
 
 static boolean r300_hiz_clear_allowed(struct r300_context *r300)
@@ -121,7 +121,7 @@ static boolean r300_hiz_clear_allowed(struct r300_context *r300)
     struct pipe_framebuffer_state *fb =
         (struct pipe_framebuffer_state*)r300->fb_state.state;
 
-    return r300_resource(fb->zsbuf->texture)->tex.hiz_dwords[fb->zsbuf->u.tex.level];
+    return r300_resource(fb->zsbuf->texture)->tex.hiz_dwords[fb->zsbuf->u.tex.level] != 0;
 }
 
 static uint32_t r300_depth_clear_value(enum pipe_format format,