2018-12-29 18:29:33 +03:00
|
|
|
//
|
|
|
|
// 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_
|
|
|
|
|
2019-05-01 22:11:46 +03:00
|
|
|
#include "util/util_gl.h"
|
2018-12-29 18:29:33 +03:00
|
|
|
|
2019-05-01 22:11:46 +03:00
|
|
|
#include <tuple>
|
2018-12-29 18:29:33 +03:00
|
|
|
|
2019-05-01 22:11:46 +03:00
|
|
|
namespace angle
|
2018-12-29 18:29:33 +03:00
|
|
|
{
|
2019-05-01 22:11:46 +03:00
|
|
|
struct PlatformMethods;
|
|
|
|
} // namespace angle
|
|
|
|
|
|
|
|
struct EGLPlatformParameters
|
|
|
|
{
|
|
|
|
EGLPlatformParameters() = default;
|
|
|
|
|
|
|
|
explicit EGLPlatformParameters(EGLint renderer) : renderer(renderer) {}
|
|
|
|
|
2018-12-29 18:29:33 +03:00
|
|
|
EGLPlatformParameters(EGLint renderer,
|
|
|
|
EGLint majorVersion,
|
|
|
|
EGLint minorVersion,
|
2019-05-01 22:11:46 +03:00
|
|
|
EGLint deviceType)
|
|
|
|
: renderer(renderer),
|
|
|
|
majorVersion(majorVersion),
|
|
|
|
minorVersion(minorVersion),
|
|
|
|
deviceType(deviceType)
|
|
|
|
{}
|
|
|
|
|
2018-12-29 18:29:33 +03:00
|
|
|
EGLPlatformParameters(EGLint renderer,
|
|
|
|
EGLint majorVersion,
|
|
|
|
EGLint minorVersion,
|
|
|
|
EGLint deviceType,
|
2019-05-01 22:11:46 +03:00
|
|
|
EGLint presentPath)
|
|
|
|
: renderer(renderer),
|
|
|
|
majorVersion(majorVersion),
|
|
|
|
minorVersion(minorVersion),
|
|
|
|
deviceType(deviceType),
|
|
|
|
presentPath(presentPath)
|
|
|
|
{}
|
|
|
|
|
|
|
|
auto tie() const
|
|
|
|
{
|
|
|
|
return std::tie(renderer, majorVersion, minorVersion, deviceType, presentPath,
|
2020-02-13 01:29:27 +03:00
|
|
|
debugLayersEnabled, contextVirtualization, transformFeedbackFeature,
|
2020-03-10 23:20:36 +03:00
|
|
|
allocateNonZeroMemoryFeature, platformMethods, robustness);
|
2019-05-01 22:11:46 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
2020-03-10 23:20:36 +03:00
|
|
|
EGLint robustness = EGL_DONT_CARE;
|
Vulkan: Fix setupDraw when VK_EXT_transform_feedback is not enabled
There's no dirty bit handler if VK_EXT_transform_feedback disabled, but
we're setting that dirty bit in syncState. This results in calling a null
method pointer. Skip the invalidate if the extension is not enabled.
gl::LogMessage::~LogMessage() at ./../../third_party/angle/src/common/debug.cpp:0
rx::ContextVk::setupDraw(gl::Context const*, gl::PrimitiveMode, int, int, int, gl::DrawElementsType, void const*, angle::BitSetT<11ul, unsigned long, unsigned long>, rx::vk::priv::SecondaryCommandBuffer**) at ./../../third_party/angle/src/libANGLE/renderer/vulkan/ContextVk.cpp:844
rx::ContextVk::drawArrays(gl::Context const*, gl::PrimitiveMode, int, int) at ./../../third_party/angle/src/libANGLE/renderer/vulkan/ContextVk.cpp:1698
gl::Context::drawArrays(gl::PrimitiveMode, int, int) at ./../../third_party/angle/src/libANGLE/Context.inl.h:112
gl::DrawArrays(unsigned int, int, int) at ./../../third_party/angle/src/libGLESv2/entry_points_gles_2_0_autogen.cpp:926
(anonymous namespace)::AttributeLayoutNonIndexed::Draw(int, unsigned int, unsigned short const*) at ./../../third_party/angle/src/tests/gl_tests/AttributeLayoutTest.cpp:431
(anonymous namespace)::AttributeLayoutTest::Run(bool) at ./../../third_party/angle/src/tests/gl_tests/AttributeLayoutTest.cpp:305
[This stack is from the added assert; calling a null function pointer
crashes without producing a useful stack trace.]
Bug: angleproject:4326
Change-Id: I036ae322bddc4865229fa3fe7ea72a4344b99f83
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2011408
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-01-21 04:33:23 +03:00
|
|
|
EGLint transformFeedbackFeature = EGL_DONT_CARE;
|
2020-02-19 17:39:44 +03:00
|
|
|
EGLint allocateNonZeroMemoryFeature = EGL_DONT_CARE;
|
2019-05-01 22:11:46 +03:00
|
|
|
angle::PlatformMethods *platformMethods = nullptr;
|
2018-12-29 18:29:33 +03:00
|
|
|
};
|
|
|
|
|
2019-05-01 22:11:46 +03:00
|
|
|
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();
|
|
|
|
}
|
2018-12-29 18:29:33 +03:00
|
|
|
|
|
|
|
#endif // UTIL_EGLPLATFORMPARAMETERS_H_
|