From 680d8069509c7043416d2eb95f098a89dceabf49 Mon Sep 17 00:00:00 2001 From: Jonathan Marek Date: Mon, 9 Dec 2019 10:31:47 -0500 Subject: [PATCH] etnaviv: fix incorrectly failing vertex size assert Changes the assert to match the comment above. This assert was failing in some cases while running darkplaces. Signed-off-by: Jonathan Marek Reviewed-by: Christian Gmeiner --- src/gallium/drivers/etnaviv/etnaviv_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_state.c b/src/gallium/drivers/etnaviv/etnaviv_state.c index cf44a7ea124..67f9512f74e 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_state.c +++ b/src/gallium/drivers/etnaviv/etnaviv_state.c @@ -574,7 +574,7 @@ etna_vertex_elements_state_create(struct pipe_context *pctx, start_offset = elements[idx].src_offset; /* maximum vertex size is 256 bytes */ - assert(element_size != 0 && end_offset <= 256); + assert(element_size != 0 && (end_offset - start_offset) < 256); /* check whether next element is consecutive to this one */ nonconsecutive = (idx == (num_elements - 1)) || -- 2.30.2