Edit

kc3-lang/angle/src/tests/third_party/gpu_test_expectations/angle_config.h

Branch :

  • Show log

    Commit

  • Author : Corentin Wallez
    Date : 2017-08-25 14:55:20
    Hash : e98e16ea
    Message : Update gpu_test_expectations and use angle_gpu_info_util This is to have the new "OS" for MacOS Sierra. Several types were introduced in angle_config.h to minimize the angle-mods.patch to make it easier to update in the future. BUG=angleproject:2137 Change-Id: I7a98c5cb48d424f83eb39763eba0e51852a9b98f Reviewed-on: https://chromium-review.googlesource.com/636202 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>

  • src/tests/third_party/gpu_test_expectations/angle_config.h
  • //
    // Copyright 2015 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.
    //
    // angle_config.h:
    //   Helpers for importing the gpu test expectations package from Chrome.
    //
    
    #ifndef ANGLE_GPU_TEST_EXPECTATIONS_ANGLE_CONFIG_H_
    #define ANGLE_GPU_TEST_EXPECTATIONS_ANGLE_CONFIG_H_
    
    #include <stdint.h>
    
    #include <iostream>
    
    #include "common/debug.h"
    #include "common/string_utils.h"
    
    #define DCHECK_EQ(A,B) ASSERT((A) == (B))
    #define DCHECK_NE(A,B) ASSERT((A) != (B))
    #define DCHECK(X) ASSERT(X)
    #define DLOG(X) std::cerr
    #define LOG(X) std::cerr
    
    #define GPU_EXPORT
    
    // Shim Chromium's types by importing symbols in the correct namespaces
    namespace base
    {
        using angle::kWhitespaceASCII;
        using angle::TRIM_WHITESPACE;
        using angle::KEEP_WHITESPACE;
        using angle::SPLIT_WANT_ALL;
        using angle::SPLIT_WANT_NONEMPTY;
        using angle::SplitString;
        using angle::SplitStringAlongWhitespace;
        using angle::HexStringToUInt;
        using angle::ReadFileToString;
    
        using TimeDelta = int;
    }  // namespace base
    
    namespace gfx
    {
        class Size
        {
          public:
            int width() const { return 0; }
            int height() const { return 0; }
        };
    }  // namespace gfx
    
    struct DxDiagNode
    {
    };
    
    // TODO(jmadill): other platforms
    // clang-format off
    #if defined(_WIN32) || defined(_WIN64)
    #    define OS_WIN
    #elif defined(ANDROID)
    #    define OS_ANDROID
    #elif defined(__linux__)
    #    define OS_LINUX
    #elif defined(__APPLE__)
    #    define OS_MACOSX
    #else
    #    error "Unsupported platform"
    #endif
    // clang-format on
    
    #endif