From 44e713eddb44a1cbd0861c216ba5921da8ee3570 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 29 Jul 2019 15:33:02 -0700 Subject: [PATCH] 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.") --- src/gallium/drivers/iris/iris_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- 2.30.2