From: Kenneth Graunke Date: Mon, 22 Oct 2018 21:06:04 +0000 (-0700) Subject: iris: fix SF_CLIP_VIEWPORT array indexing with multiple VPs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d1f89477924292dffc09fb95a6e5989ceef67419;p=mesa.git iris: fix SF_CLIP_VIEWPORT array indexing with multiple VPs fixes bunches of viewport stuffs --- diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index be270073b3d..519ae13a8e5 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -1900,7 +1900,8 @@ iris_set_viewport_states(struct pipe_context *ctx, { struct iris_context *ice = (struct iris_context *) ctx; struct iris_genx_state *genx = ice->state.genx; - uint32_t *vp_map = &genx->sf_cl_vp[start_slot]; + uint32_t *vp_map = + &genx->sf_cl_vp[start_slot * GENX(SF_CLIP_VIEWPORT_length)]; for (unsigned i = 0; i < count; i++) { const struct pipe_viewport_state *state = &states[i];