summaryrefslogtreecommitdiff
path: root/indra/newview/llglsandbox.cpp
diff options
context:
space:
mode:
authorGraham Linden <none@none>2014-11-17 11:40:28 -0800
committerGraham Linden <none@none>2014-11-17 11:40:28 -0800
commit9eeb8344a6dd8721ebc85463e966b05a9b034381 (patch)
tree9f4d1bb68d4636fe0a3a426d71fd1837209ae0a0 /indra/newview/llglsandbox.cpp
parent2301cf800f40101baed7a5936683d0b1e4968be1 (diff)
Avoid using GL_ARB_timer_query functionality when not supported and protect against probably-not-NULL current bound shader pointer
Diffstat (limited to 'indra/newview/llglsandbox.cpp')
-rwxr-xr-xindra/newview/llglsandbox.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index 4b8ac2b3cf..7cf17c90e9 100755
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -954,7 +954,7 @@ F32 gpu_benchmark()
//make a dummy triangle to draw with
LLPointer<LLVertexBuffer> buff = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, GL_STATIC_DRAW_ARB);
- buff->allocateBuffer(3, 0, true);
+ buff->allocateBuffer(12, 0, true);
LLStrider<LLVector3> v;
LLStrider<LLVector2> tc;
@@ -964,6 +964,16 @@ F32 gpu_benchmark()
v[0].set(-1,1,0);
v[1].set(-1,-3,0);
v[2].set(3,1,0);
+ v[3].set(-1,1,0);
+ v[4].set(-1,-3,0);
+ v[5].set(3,1,0);
+ v[6].set(-1,1,0);
+ v[7].set(-1,-3,0);
+ v[8].set(3,1,0);
+ v[9].set(-1,1,0);
+ v[10].set(-1,-3,0);
+ v[11].set(3,1,0);
+
buff->flush();
gBenchmarkProgram.bind();
@@ -983,7 +993,7 @@ F32 gpu_benchmark()
{
dest[i].bindTarget();
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, source[i]);
- buff->drawArrays(LLRender::TRIANGLES, 0, 3);
+ buff->drawArrays(LLRender::TRIANGLES, 0, 12);
dest[i].flush();
}