From d1f89477924292dffc09fb95a6e5989ceef67419 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 22 Oct 2018 14:06:04 -0700 Subject: [PATCH] iris: fix SF_CLIP_VIEWPORT array indexing with multiple VPs fixes bunches of viewport stuffs --- src/gallium/drivers/iris/iris_state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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]; -- 2.30.2