From 50743eb74818d25b6f32da012b389fea190914af Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 9 Nov 2018 02:20:31 -0800 Subject: [PATCH] iris: fix num clip plane consts --- src/gallium/drivers/iris/iris_state.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index f0f426cebab..3d78186638c 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -1058,6 +1058,11 @@ iris_create_rasterizer_state(struct pipe_context *ctx, cso->line_stipple_enable = state->line_stipple_enable; cso->poly_stipple_enable = state->poly_stipple_enable; + if (state->clip_plane_enable != 0) + cso->num_clip_plane_consts = util_logbase2(state->clip_plane_enable) + 1; + else + cso->num_clip_plane_consts = 0; + float line_width = get_line_width(state); iris_pack_command(GENX(3DSTATE_SF), cso->sf, sf) { @@ -1146,9 +1151,6 @@ iris_create_rasterizer_state(struct pipe_context *ctx, line.LineStippleRepeatCount = line_stipple_factor; } - if (state->clip_plane_enable != 0) - cso->num_clip_plane_consts = util_logbase2(state->clip_plane_enable) + 1; - return cso; } -- 2.30.2