Hash :
d50cd35e
        
        Author :
  
        
        Date :
2025-02-20T08:29:07
        
      
Tests: Add expectations file for angle_trace_tests Skipping trace tests was handled in the TracePerfTest source and is now specified in angle_trace_tests_expectations.txt. Bug: b/398048048 Change-Id: Idbf5e95e74699374eb46330dc3880a0c2dfc9bc1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6302912 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
//
// Copyright 2025 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.
//
// Header file for both TracePerfTest and TracePerfTestCL
//
#pragma once
#include <gtest/gtest.h>
#include "tests/perf_tests/ANGLEPerfTest.h"
#include "tests/perf_tests/ANGLEPerfTestArgs.h"
#include "tests/test_expectations/GPUTestExpectationsParser.h"
#include "util/capture/frame_capture_test_utils.h"
#include "util/test_utils.h"
namespace angle
{
constexpr char kTraceTestFolder[] = "src/tests/restricted_traces";
constexpr size_t kMaxPath         = 1024;
struct TracePerfParams final : public RenderTestParams
{
    // Common default options
    TracePerfParams(const TraceInfo &traceInfoIn,
                    GLESDriverType driverType,
                    EGLenum platformType,
                    EGLenum deviceType)
        : traceInfo(traceInfoIn)
    {
        majorVersion = traceInfo.contextClientMajorVersion;
        minorVersion = traceInfo.contextClientMinorVersion;
        windowWidth  = traceInfo.drawSurfaceWidth;
        windowHeight = traceInfo.drawSurfaceHeight;
        colorSpace   = traceInfo.drawSurfaceColorSpace;
        isCL         = traceInfo.isCL;
        // Display the frame after every drawBenchmark invocation
        iterationsPerStep = 1;
        driver                   = driverType;
        eglParameters.renderer   = platformType;
        eglParameters.deviceType = deviceType;
        ASSERT(!gOffscreen || !gVsync);
        if (gOffscreen)
        {
            surfaceType = SurfaceType::Offscreen;
        }
        if (gVsync)
        {
            surfaceType = SurfaceType::WindowWithVSync;
        }
        // Force on features if we're validating serialization.
        if (gTraceTestValidation)
        {
            // Enable limits when validating traces because we usually turn off capture.
            eglParameters.enable(Feature::EnableCaptureLimits);
            // This feature should also be enabled in capture to mirror the replay.
            eglParameters.enable(Feature::ForceInitShaderVariables);
        }
    }
    std::string story() const override
    {
        std::stringstream strstr;
        strstr << RenderTestParams::story() << "_" << traceInfo.name;
        return strstr.str();
    }
    TraceInfo traceInfo = {};
};
ANGLEPerfTest *CreateTracePerfTestCL(std::unique_ptr<const TracePerfParams> params);
}  // namespace angle