mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 10:20:09 +01:00
mesa: Add assert to _mesa_primitive_restart_index.
Make sure the inde_size parameter is meant to be in bytes. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
This commit is contained in:
parent
d66faa54b2
commit
ebc15ecde5
1 changed files with 3 additions and 0 deletions
|
|
@ -316,6 +316,9 @@ static inline unsigned
|
|||
_mesa_primitive_restart_index(const struct gl_context *ctx,
|
||||
unsigned index_size)
|
||||
{
|
||||
/* The index_size parameter is menat to be in bytes. */
|
||||
assert(index_size == 1 || index_size == 2 || index_size == 4);
|
||||
|
||||
/* From the OpenGL 4.3 core specification, page 302:
|
||||
* "If both PRIMITIVE_RESTART and PRIMITIVE_RESTART_FIXED_INDEX are
|
||||
* enabled, the index value determined by PRIMITIVE_RESTART_FIXED_INDEX
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue