freedreno/a3xx: use NUM_USER_CLIP_PLANES helper instead of magic number
authorIlia Mirkin <imirkin@alum.mit.edu>
Wed, 16 Sep 2015 18:19:21 +0000 (14:19 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Wed, 16 Sep 2015 19:42:55 +0000 (15:42 -0400)
Use the helper from the newly-updated generated header file.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/freedreno/a3xx/fd3_emit.c

index 40301971d90d1a6f2956ac48279c1f42f4bc884a..dbddb293a9c751c94ff14aab88fcc25f7995671f 100644 (file)
@@ -517,7 +517,8 @@ fd3_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring,
                val |= COND(fp->frag_coord, A3XX_GRAS_CL_CLIP_CNTL_ZCOORD |
                                A3XX_GRAS_CL_CLIP_CNTL_WCOORD);
                /* TODO only use if prog doesn't use clipvertex/clipdist */
-               val |= MIN2(util_bitcount(ctx->rasterizer->clip_plane_enable), 6) << 26;
+               val |= A3XX_GRAS_CL_CLIP_CNTL_NUM_USER_CLIP_PLANES(
+                               MIN2(util_bitcount(ctx->rasterizer->clip_plane_enable), 6));
                OUT_PKT0(ring, REG_A3XX_GRAS_CL_CLIP_CNTL, 1);
                OUT_RING(ring, val);
        }