diff options
Diffstat (limited to 'indra/newview/llglsandbox.cpp')
-rw-r--r-- | indra/newview/llglsandbox.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index a135ef0814..0b5064c77d 100644 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -1115,6 +1115,14 @@ F32 gpu_benchmark() // ensure matched pair of bind() and unbind() calls ShaderBinder binder(gBenchmarkProgram); + U32 glarray = 0; + + if (LLRender::sGLCoreProfile) + { + glGenVertexArrays(1, &glarray); + glBindVertexArray(glarray); + } + buff->setBuffer(LLVertexBuffer::MAP_VERTEX); glFinish(); @@ -1147,6 +1155,13 @@ F32 gpu_benchmark() } } + if (LLRender::sGLCoreProfile) + { + glBindVertexArray(0); + glDeleteVertexArrays(1, &glarray); + } + + std::sort(results.begin(), results.end()); F32 gbps = results[results.size()/2]; |