From 5d7e4ab405d73b41d441a044cf2d89136eec54b3 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Mon, 7 Jul 2025 18:58:21 -0400 Subject: [PATCH] tu/cs: Assert that the CS is not writeable when resetting Leaving writeable on probably means that we forgot to disable writeable somewhere, which is a bad idea. The existing code couldn't handle this and would subtly crash somewhere else due to start not being saved, but just assert instead to make the problem more clear. Part-of: --- src/freedreno/vulkan/tu_cs.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedreno/vulkan/tu_cs.cc b/src/freedreno/vulkan/tu_cs.cc index 88b9e01a316..5d87d437162 100644 --- a/src/freedreno/vulkan/tu_cs.cc +++ b/src/freedreno/vulkan/tu_cs.cc @@ -510,7 +510,7 @@ tu_cs_reset(struct tu_cs *cs) tu_bo_finish(cs->device, cs->read_write.bos[i]); } - cs->writeable = false; + assert(!cs->writeable); if (cs->read_only.bo_count) { cs->read_only.bos[0] = cs->read_only.bos[cs->read_only.bo_count - 1];