summaryrefslogtreecommitdiff
path: root/indra/newview/llglsandbox.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-09-07 17:46:04 +0800
committerErik Kundiman <erik@megapahit.org>2024-09-07 17:46:04 +0800
commita742349cabd97b42e61e1b445f79840407cb3479 (patch)
tree6d6f043f53cd3d7b9bf004e543932a86cb89ad7c /indra/newview/llglsandbox.cpp
parent895e2decd591ce8ab3cfcdce93c8b10447eedbee (diff)
parent1f754e50908ba325c132b8d83383f7f0dbbdf793 (diff)
Merge remote-tracking branch 'secondlife/release/2024.08-DeltaFPS' into 2024.08-DeltaFPS
Diffstat (limited to 'indra/newview/llglsandbox.cpp')
-rw-r--r--indra/newview/llglsandbox.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index 19cb4d04e2..930a8c28d9 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -1075,6 +1075,9 @@ F32 gpu_benchmark()
return -1.f;
}
LLImageGL::setManualImage(GL_TEXTURE_2D, 0, GL_RGBA, res,res,GL_RGBA, GL_UNSIGNED_BYTE, pixels);
+ // disable mipmaps and use point filtering to cause cache misses
+ gGL.getTexUnit(0)->setHasMipMaps(false);
+ gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
if (alloc_timer.getElapsedTimeF32() > time_limit)
{
@@ -1191,7 +1194,8 @@ F32 gpu_benchmark()
F32 seconds = ms/1000.f;
F64 samples_drawn = (F64)gBenchmarkProgram.mSamplesDrawn;
- F32 samples_sec = (F32)((samples_drawn/1000000000.0)/seconds);
+ F64 gpixels_drawn = samples_drawn / 1000000000.0;
+ F32 samples_sec = (F32)(gpixels_drawn/seconds);
gbps = samples_sec*4; // 4 bytes per sample
LL_INFOS("Benchmark") << "Memory bandwidth is " << llformat("%.3f", gbps) << " GB/sec according to ARB_timer_query, total time " << seconds << " seconds" << LL_ENDL;