mesa: detect inefficient buffer use and report through debug output
authorBrian Paul <brianp@vmware.com>
Tue, 8 Dec 2015 01:38:03 +0000 (18:38 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 9 Dec 2015 16:43:47 +0000 (09:43 -0700)
commitab0651ccfd8c8c4bca26a106225e188fe965d8d0
tree3e781c4c6be78f0aa9353c956e47649da7531d44
parent7d3df58125671bef354f97577c3b50f5b858a42d
mesa: detect inefficient buffer use and report through debug output

When a buffer is created with GL_STATIC_DRAW, its contents should not
be changed frequently.  But that's exactly what one application I'm
debugging does.  This patch adds code to try to detect inefficient
buffer use in a couple places.  The GL_ARB_debug_output mechanism is
used to report the issue.

NVIDIA's driver detects these sort of things too.

Other types of inefficient buffer use could also be detected in the
future.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/mesa/main/bufferobj.c
src/mesa/main/mtypes.h