iris: fix SF_CLIP_VIEWPORT array indexing with multiple VPs
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 22 Oct 2018 21:06:04 +0000 (14:06 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:09 +0000 (10:26 -0800)
fixes bunches of viewport stuffs

src/gallium/drivers/iris/iris_state.c

index be270073b3d7a5c0aca6e48099671cf915dcc339..519ae13a8e555f84d496eb94cfe8ba474eca36a5 100644 (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];