iris: fix SF_CLIP_VIEWPORT array indexing with multiple VPs

fixes bunches of viewport stuffs
This commit is contained in:
Kenneth Graunke 2018-10-22 14:06:04 -07:00
parent 5bd49a47b6
commit d1f8947792
1 changed files with 2 additions and 1 deletions

View File

@ -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];