From: Kenneth Graunke Date: Wed, 20 Jun 2018 23:07:05 +0000 (-0700) Subject: iris: scissor count fixes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=81f899c148d181b2594222167388d0f8b6e4849c;p=mesa.git iris: scissor count fixes --- diff --git a/src/gallium/drivers/iris/iris_context.h b/src/gallium/drivers/iris/iris_context.h index 7059036a18a..14620b3be2a 100644 --- a/src/gallium/drivers/iris/iris_context.h +++ b/src/gallium/drivers/iris/iris_context.h @@ -246,8 +246,7 @@ struct iris_context { struct { uint64_t dirty; - unsigned num_viewports; // XXX: can viewports + scissors be different? - unsigned num_scissors; + unsigned num_viewports; unsigned sample_mask; struct iris_blend_state *cso_blend; struct iris_rasterizer_state *cso_rast; diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index e3f8cf4508b..8fd0ad83b94 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -1113,8 +1113,6 @@ iris_set_scissor_states(struct pipe_context *ctx, { struct iris_context *ice = (struct iris_context *) ctx; - ice->state.num_scissors = num_scissors; - for (unsigned i = 0; i < num_scissors; i++) { ice->state.scissors[start_slot + i] = states[i]; } @@ -2722,13 +2720,12 @@ iris_upload_render_state(struct iris_context *ice, } if (dirty & IRIS_DIRTY_SCISSOR_RECT) { - // XXX: allocate at set_scissor time? - uint32_t scissor_offset = ice->state.num_scissors == 0 ? 0 : + uint32_t scissor_offset = emit_state(batch, ice->state.dynamic_uploader, &ice->state.last_res.scissor, ice->state.scissors, sizeof(struct pipe_scissor_state) * - ice->state.num_scissors, 32); + ice->state.num_viewports, 32); iris_emit_cmd(batch, GENX(3DSTATE_SCISSOR_STATE_POINTERS), ptr) { ptr.ScissorRectPointer = scissor_offset;