diff options
author | Ilia Mirkin <[email protected]> | 2015-09-16 14:19:21 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2015-09-16 15:42:55 -0400 |
commit | 37d0becfd91c0bb8202dd6994b6bba7e5d761990 (patch) | |
tree | c8d29990dff837acafa7898c987dc3a153a425f2 /src/gallium/drivers/freedreno/a3xx | |
parent | 545a3cbb011e0e7722c2accb330c0994aea5cc38 (diff) |
freedreno/a3xx: use NUM_USER_CLIP_PLANES helper instead of magic number
Use the helper from the newly-updated generated header file.
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a3xx')
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_emit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c index 40301971d90..dbddb293a9c 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c @@ -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); } |