Mesa (master): vc4: Fix use of a bool as an enum.

Eric Anholt anholt at kemper.freedesktop.org
Tue Mar 24 17:39:48 UTC 2015


Module: Mesa
Branch: master
Commit: 8975a09494cb6ee7b010fddb0ca5a7a74d46b0c7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8975a09494cb6ee7b010fddb0ca5a7a74d46b0c7

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Mar 16 14:14:22 2015 -0700

vc4: Fix use of a bool as an enum.

The enum compared to was 0, so it worked out, but it sure looked wrong.

---

 src/gallium/drivers/vc4/vc4_resource.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/vc4/vc4_resource.c b/src/gallium/drivers/vc4/vc4_resource.c
index c640cf6..b8628ec 100644
--- a/src/gallium/drivers/vc4/vc4_resource.c
+++ b/src/gallium/drivers/vc4/vc4_resource.c
@@ -256,7 +256,7 @@ vc4_setup_slices(struct vc4_resource *rsc)
                         level_height = u_minify(pot_height, i);
                 }
 
-                if (rsc->tiled == VC4_TILING_FORMAT_LINEAR) {
+                if (!rsc->tiled) {
                         slice->tiling = VC4_TILING_FORMAT_LINEAR;
                         level_width = align(level_width, 16);
                 } else {




More information about the mesa-commit mailing list