glthread: fix matrix stack depth tracking
authorTimothy Arceri <tarceri@itsqueeze.com>
Thu, 13 Oct 2022 03:17:37 +0000 (14:17 +1100)
committerMarge Bot <emma+marge@anholt.net>
Thu, 13 Oct 2022 22:47:49 +0000 (22:47 +0000)
commita5e9e64aae2e94209e64fbb75c7b03aab3b0d39b
treed3b00c7bc943681bedc749b6465db4eee018b684
parent6689d67603ae61e1e9e43370af816f10c5bc37c1
glthread: fix matrix stack depth tracking

Dont bump the depth if the application attempts to overflow or
underflow the stack.

Fixes: 6febe2b880e7 ("glthread: track all matrix stack depths")

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19059>
src/mesa/main/glthread_marshal.h