summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-10-22 14:06:04 -0700
committerKenneth Graunke <[email protected]>2019-02-21 10:26:09 -0800
commitd1f89477924292dffc09fb95a6e5989ceef67419 (patch)
tree392fceec8d2535d25fc250f2ec2c5d9da3e4627f
parent5bd49a47b6b5febfa54ec03bd1fa5e140b8a6e61 (diff)
iris: fix SF_CLIP_VIEWPORT array indexing with multiple VPs
fixes bunches of viewport stuffs
-rw-r--r--src/gallium/drivers/iris/iris_state.c3
1 files changed, 2 insertions, 1 deletions
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];