r300: assert that every writer has a reader
authorPavel Ondračka <pavel.ondracka@gmail.com>
Fri, 23 Jun 2023 08:39:16 +0000 (10:39 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 5 Jul 2023 18:34:37 +0000 (18:34 +0000)
commitb392d3ac27be026feab32da0d803a229b52c812d
tree9b6cc1c49d539843defce3ef8153ab1d6b271651
parent5716700bbf9f88839a32eee1fd6f669e6d89b015
r300: assert that every writer has a reader

Dead writes can lead to problems with regalloc, so add a safety assert
to catch such cases in the vertex shaders at least in the meantime.

Additionally we could think there are no readers due to some shortcoming
of out dataflow analysis or some other bug which we would also like to
know about.

Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23927>
src/gallium/drivers/r300/compiler/radeon_variable.c