[Mesa-dev] [PATCH 1/2] ac: avoid infinite loop storing doubles to ssbo

Timothy Arceri tarceri at itsqueeze.com
Wed Jan 17 09:47:38 UTC 2018


Without this count will always be greater than 4 and we will always
set the writemask so the loop can never exit.

Fixes: 91074bb11bda "radv/ac: Implement Float64 SSBO stores."
---
 src/amd/common/ac_nir_to_llvm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index ddcd546b93..c24e563695 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -2453,6 +2453,7 @@ static void visit_store_ssbo(struct ac_nir_context *ctx,
 		if (count > 4) {
 			writemask |= ((1u << (count - 4)) - 1u) << (start + 4);
 			count = 4;
+			elem_size_mul = 1;
 		}
 
 		if (count == 4) {
-- 
2.14.3



More information about the mesa-dev mailing list