[Mesa-dev] [PATCH] radeonsi: do not assert when reserving bindless slot 0

Samuel Pitoiset samuel.pitoiset at gmail.com
Wed Aug 23 07:42:58 UTC 2017


When assertions were disabled, the compiler removed
the call to util_idalloc_alloc() and the first allocated
bindless slot was 0 which is invalid per the spec.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/gallium/drivers/radeonsi/si_descriptors.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index f66ecc3e68..c53253ac8d 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -2192,7 +2192,7 @@ static void si_init_bindless_descriptors(struct si_context *sctx,
 	util_idalloc_resize(&sctx->bindless_used_slots, num_elements);
 
 	/* Reserve slot 0 because it's an invalid handle for bindless. */
-	assert(!util_idalloc_alloc(&sctx->bindless_used_slots));
+	util_idalloc_alloc(&sctx->bindless_used_slots);
 }
 
 static void si_release_bindless_descriptors(struct si_context *sctx)
-- 
2.14.1



More information about the mesa-dev mailing list