From: Kenneth Graunke Date: Mon, 29 Jul 2019 22:33:02 +0000 (-0700) Subject: iris: Fix SO offset to be 32-bit in DrawTransformFeedback handling X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=44e713eddb44a1cbd0861c216ba5921da8ee3570;p=mesa.git 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.") --- 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));