mirror of
https://github.com/utmapp/angle.git
synced 2026-12-01 22:13:25 -10:00
The missing flags were causing the configs to be reused and improperly tested. Noticed when working with the Vulkan command graph feature. Bug: angleproject:4029 Change-Id: I2fea73fc0637d1adbf73577eb5dfcfa4a759c066 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2019503 Reviewed-by: Jamie Madill <[email protected]> Reviewed-by: Michael Spang <[email protected]> Commit-Queue: Jamie Madill <[email protected]>
83 lines
2.6 KiB
C++
83 lines
2.6 KiB
C++
//
|
|
// Copyright 2018 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.
|
|
//
|
|
// EGLPlatformParameters: Basic description of an EGL device.
|
|
|
|
#ifndef UTIL_EGLPLATFORMPARAMETERS_H_
|
|
#define UTIL_EGLPLATFORMPARAMETERS_H_
|
|
|
|
#include "util/util_gl.h"
|
|
|
|
#include <tuple>
|
|
|
|
namespace angle
|
|
{
|
|
struct PlatformMethods;
|
|
} // namespace angle
|
|
|
|
struct EGLPlatformParameters
|
|
{
|
|
EGLPlatformParameters() = default;
|
|
|
|
explicit EGLPlatformParameters(EGLint renderer) : renderer(renderer) {}
|
|
|
|
EGLPlatformParameters(EGLint renderer,
|
|
EGLint majorVersion,
|
|
EGLint minorVersion,
|
|
EGLint deviceType)
|
|
: renderer(renderer),
|
|
majorVersion(majorVersion),
|
|
minorVersion(minorVersion),
|
|
deviceType(deviceType)
|
|
{}
|
|
|
|
EGLPlatformParameters(EGLint renderer,
|
|
EGLint majorVersion,
|
|
EGLint minorVersion,
|
|
EGLint deviceType,
|
|
EGLint presentPath)
|
|
: renderer(renderer),
|
|
majorVersion(majorVersion),
|
|
minorVersion(minorVersion),
|
|
deviceType(deviceType),
|
|
presentPath(presentPath)
|
|
{}
|
|
|
|
auto tie() const
|
|
{
|
|
return std::tie(renderer, majorVersion, minorVersion, deviceType, presentPath,
|
|
debugLayersEnabled, contextVirtualization, commandGraphFeature,
|
|
transformFeedbackFeature, platformMethods);
|
|
}
|
|
|
|
EGLint renderer = EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE;
|
|
EGLint majorVersion = EGL_DONT_CARE;
|
|
EGLint minorVersion = EGL_DONT_CARE;
|
|
EGLint deviceType = EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE;
|
|
EGLint presentPath = EGL_DONT_CARE;
|
|
EGLint debugLayersEnabled = EGL_DONT_CARE;
|
|
EGLint contextVirtualization = EGL_DONT_CARE;
|
|
EGLint commandGraphFeature = EGL_DONT_CARE;
|
|
EGLint transformFeedbackFeature = EGL_DONT_CARE;
|
|
angle::PlatformMethods *platformMethods = nullptr;
|
|
};
|
|
|
|
inline bool operator<(const EGLPlatformParameters &a, const EGLPlatformParameters &b)
|
|
{
|
|
return a.tie() < b.tie();
|
|
}
|
|
|
|
inline bool operator==(const EGLPlatformParameters &a, const EGLPlatformParameters &b)
|
|
{
|
|
return a.tie() == b.tie();
|
|
}
|
|
|
|
inline bool operator!=(const EGLPlatformParameters &a, const EGLPlatformParameters &b)
|
|
{
|
|
return a.tie() != b.tie();
|
|
}
|
|
|
|
#endif // UTIL_EGLPLATFORMPARAMETERS_H_
|