summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-07-29 15:33:02 -0700
committerKenneth Graunke <[email protected]>2019-07-29 16:38:19 -0700
commit44e713eddb44a1cbd0861c216ba5921da8ee3570 (patch)
tree96f8a4a4a6d8b18b71520ce3fc7752c3ab9951bb /src/gallium/drivers
parent4bb6e6817ec5d627d58e499ca09f1f40641a1acd (diff)
iris: Fix SO offset to be 32-bit in DrawTransformFeedback handling
We accidentally started copying a full 64-bit value rather than copying a 32-bit offset and zeroing the top 32-bits. This caused us to compute bogus vertex counts which could lead to GPU hangs in some cases. Thanks to Clayton Craft for catching the regressions! Fixes: 0e24d10ff5c ("iris: Use gen_mi_builder to handle CS ALU operations.")
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/iris/iris_state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index ed0714df2a8..d32dc4995f8 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -5319,7 +5319,7 @@ iris_upload_render_state(struct iris_context *ice,
struct iris_address addr =
ro_bo(iris_resource_bo(so->offset.res), so->offset.offset);
struct gen_mi_value offset =
- gen_mi_iadd_imm(&b, gen_mi_mem64(addr), -so->base.buffer_offset);
+ gen_mi_iadd_imm(&b, gen_mi_mem32(addr), -so->base.buffer_offset);
gen_mi_store(&b, gen_mi_reg32(_3DPRIM_VERTEX_COUNT),
gen_mi_udiv32_imm(&b, offset, so->stride));