Commit f312c0a6 authored by Rye Mutt's avatar Rye Mutt 🍞
Browse files

Fix annoying warning

parent 7cc67e98
......@@ -1134,16 +1134,17 @@ F32 gpu_benchmark()
for (U32 i = 0; i < count; ++i)
{
//allocate render targets and textures
if (!dest[i].allocate(res, res, GL_RGBA, false, false, LLTexUnit::TT_TEXTURE, true))
auto& render_target = dest[i];
if (!render_target.allocate(res, res, GL_RGBA, false, false, LLTexUnit::TT_TEXTURE, true))
{
LL_WARNS("Benchmark") << "Failed to allocate render target." << LL_ENDL;
// abandon the benchmark test
delete[] pixels;
return -1.f;
}
dest[i].bindTarget();
dest[i].clear();
dest[i].flush();
render_target.bindTarget();
render_target.clear();
render_target.flush();
if (!texHolder.bind(i))
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment