Edit

kc3-lang/angle/src/tests/perf_tests/DrawCallPerfParams.cpp

Branch :

  • Show log

    Commit

  • Author : Jamie Madill
    Date : 2020-07-15 15:50:06
    Hash : 4e577a2a
    Message : Perf Tests: Make "offscreen" a common test param. This will let us use it in the trace perf tests. Bug: angleproject:4845 Change-Id: I6188a0765c6f482bb38842faa4c58209c70b0153 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2300206 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>

  • src/tests/perf_tests/DrawCallPerfParams.cpp
  • //
    // Copyright 2017 The ANGLE Project Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style license that can be
    // found in the LICENSE file.
    //
    // DrawCallPerfParams.cpp:
    //   Parametrization for performance tests for ANGLE draw call overhead.
    //
    
    #include "DrawCallPerfParams.h"
    
    #include <sstream>
    
    DrawCallPerfParams::DrawCallPerfParams()
    {
        majorVersion = 2;
        minorVersion = 0;
        windowWidth  = 64;
        windowHeight = 64;
    
    // Lower the iteration count in debug.
    #if !defined(NDEBUG)
        iterationsPerStep = 100;
    #else
        iterationsPerStep = 20000;
    #endif
        runTimeSeconds = 10.0;
        numTris        = 1;
    }
    
    DrawCallPerfParams::~DrawCallPerfParams() = default;
    
    std::string DrawCallPerfParams::story() const
    {
        std::stringstream strstr;
    
        strstr << RenderTestParams::story();
    
        return strstr.str();
    }