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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35993>
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user