From: Jonathan Marek Date: Mon, 9 Dec 2019 15:31:47 +0000 (-0500) Subject: etnaviv: fix incorrectly failing vertex size assert X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=680d8069509c7043416d2eb95f098a89dceabf49;p=mesa.git 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 --- 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)) ||