Commit e1a057e8 by Geoff Lang Committed by Commit Bot

Fully format some files.

Change-Id: Id6ea245849696d4c6d7eabc6860c0ac424dd8013 Reviewed-on: https://chromium-review.googlesource.com/1091309Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent 74be296b
......@@ -715,13 +715,13 @@ void Extensions::setTextureExtensionSupport(const TextureCapsMap &textureCaps)
compressedEACR11SignedTexture = DetermineEACR11SignedTextureSupport(textureCaps);
compressedEACRG11UnsignedTexture = DetermineEACRG11UnsignedTextureSupport(textureCaps);
compressedEACRG11SignedTexture = DetermineEACRG11SignedTextureSupport(textureCaps);
sRGB = DetermineSRGBTextureSupport(textureCaps);
depthTextures = DetermineDepthTextureSupport(textureCaps);
depth32 = DetermineDepth32Support(textureCaps);
colorBufferFloatRGB = DetermineColorBufferFloatRGBSupport(textureCaps);
colorBufferFloatRGBA = DetermineColorBufferFloatRGBASupport(textureCaps);
colorBufferFloat = DetermineColorBufferFloatSupport(textureCaps);
textureNorm16 = DetermineTextureNorm16Support(textureCaps);
sRGB = DetermineSRGBTextureSupport(textureCaps);
depthTextures = DetermineDepthTextureSupport(textureCaps);
depth32 = DetermineDepth32Support(textureCaps);
colorBufferFloatRGB = DetermineColorBufferFloatRGBSupport(textureCaps);
colorBufferFloatRGBA = DetermineColorBufferFloatRGBASupport(textureCaps);
colorBufferFloat = DetermineColorBufferFloatSupport(textureCaps);
textureNorm16 = DetermineTextureNorm16Support(textureCaps);
}
const ExtensionInfoMap &GetExtensionInfoMap()
......@@ -1054,13 +1054,13 @@ Caps GenerateMinimumCaps(const Version &clientVersion, const Extensions &extensi
caps.fragmentLowpInt.setSimulatedInt(8);
// Table 6.20
caps.maxVertexAttributes = 8;
caps.maxVertexUniformVectors = 128;
caps.maxVaryingVectors = 8;
caps.maxCombinedTextureImageUnits = 8;
caps.maxVertexAttributes = 8;
caps.maxVertexUniformVectors = 128;
caps.maxVaryingVectors = 8;
caps.maxCombinedTextureImageUnits = 8;
caps.maxShaderTextureImageUnits[ShaderType::Fragment] = 8;
caps.maxFragmentUniformVectors = 16;
caps.maxRenderbufferSize = 1;
caps.maxFragmentUniformVectors = 16;
caps.maxRenderbufferSize = 1;
}
if (clientVersion >= Version(3, 0))
......@@ -1100,21 +1100,21 @@ Caps GenerateMinimumCaps(const Version &clientVersion, const Extensions &extensi
caps.maxServerWaitTimeout = 0;
// Table 6.31
caps.maxVertexAttributes = 16;
caps.maxVertexAttributes = 16;
caps.maxShaderUniformComponents[ShaderType::Vertex] = 1024;
caps.maxVertexUniformVectors = 256;
caps.maxVertexUniformVectors = 256;
caps.maxShaderUniformBlocks[ShaderType::Vertex] = 12;
caps.maxVertexOutputComponents = 64;
caps.maxVertexOutputComponents = 64;
caps.maxShaderTextureImageUnits[ShaderType::Vertex] = 16;
// Table 6.32
caps.maxShaderUniformComponents[ShaderType::Fragment] = 896;
caps.maxFragmentUniformVectors = 224;
caps.maxFragmentUniformVectors = 224;
caps.maxShaderUniformBlocks[ShaderType::Fragment] = 12;
caps.maxFragmentInputComponents = 60;
caps.maxFragmentInputComponents = 60;
caps.maxShaderTextureImageUnits[ShaderType::Fragment] = 16;
caps.minProgramTexelOffset = -8;
caps.maxProgramTexelOffset = 7;
caps.minProgramTexelOffset = -8;
caps.maxProgramTexelOffset = 7;
// Table 6.33
caps.maxUniformBufferBindings = 24;
......@@ -1154,33 +1154,33 @@ Caps GenerateMinimumCaps(const Version &clientVersion, const Extensions &extensi
caps.maxShaderAtomicCounterBuffers[ShaderType::Vertex] = 0;
caps.maxShaderAtomicCounters[ShaderType::Vertex] = 0;
caps.maxShaderImageUniforms[ShaderType::Vertex] = 0;
caps.maxShaderStorageBlocks[ShaderType::Vertex] = 0;
caps.maxShaderStorageBlocks[ShaderType::Vertex] = 0;
// Table 20.44
caps.maxShaderUniformComponents[ShaderType::Fragment] = 1024;
caps.maxFragmentUniformVectors = 256;
caps.maxFragmentUniformVectors = 256;
caps.maxShaderAtomicCounterBuffers[ShaderType::Fragment] = 0;
caps.maxShaderAtomicCounters[ShaderType::Fragment] = 0;
caps.maxShaderImageUniforms[ShaderType::Fragment] = 0;
caps.maxShaderStorageBlocks[ShaderType::Fragment] = 0;
caps.minProgramTextureGatherOffset = 0;
caps.maxProgramTextureGatherOffset = 0;
caps.maxShaderStorageBlocks[ShaderType::Fragment] = 0;
caps.minProgramTextureGatherOffset = 0;
caps.maxProgramTextureGatherOffset = 0;
// Table 20.45
caps.maxComputeWorkGroupCount = {{65535, 65535, 65535}};
caps.maxComputeWorkGroupSize = {{128, 128, 64}};
caps.maxComputeWorkGroupInvocations = 12;
caps.maxShaderUniformBlocks[ShaderType::Compute] = 12;
caps.maxShaderTextureImageUnits[ShaderType::Compute] = 16;
caps.maxComputeSharedMemorySize = 16384;
caps.maxComputeWorkGroupCount = {{65535, 65535, 65535}};
caps.maxComputeWorkGroupSize = {{128, 128, 64}};
caps.maxComputeWorkGroupInvocations = 12;
caps.maxShaderUniformBlocks[ShaderType::Compute] = 12;
caps.maxShaderTextureImageUnits[ShaderType::Compute] = 16;
caps.maxComputeSharedMemorySize = 16384;
caps.maxShaderUniformComponents[ShaderType::Compute] = 1024;
caps.maxShaderAtomicCounterBuffers[ShaderType::Compute] = 1;
caps.maxShaderAtomicCounters[ShaderType::Compute] = 8;
caps.maxShaderImageUniforms[ShaderType::Compute] = 4;
caps.maxShaderStorageBlocks[ShaderType::Compute] = 4;
caps.maxShaderStorageBlocks[ShaderType::Compute] = 4;
// Table 20.46
caps.maxUniformBufferBindings = 36;
caps.maxUniformBufferBindings = 36;
caps.maxCombinedTextureImageUnits = 48;
caps.maxCombinedShaderOutputResources = 4;
......@@ -1211,16 +1211,16 @@ Caps GenerateMinimumCaps(const Version &clientVersion, const Extensions &extensi
// Table 20.43gs (GL_EXT_geometry_shader)
caps.maxShaderUniformComponents[ShaderType::Geometry] = 1024;
caps.maxShaderUniformBlocks[ShaderType::Geometry] = 12;
caps.maxGeometryInputComponents = 64;
caps.maxGeometryOutputComponents = 64;
caps.maxGeometryOutputVertices = 256;
caps.maxGeometryTotalOutputComponents = 1024;
caps.maxShaderTextureImageUnits[ShaderType::Geometry] = 16;
caps.maxShaderUniformBlocks[ShaderType::Geometry] = 12;
caps.maxGeometryInputComponents = 64;
caps.maxGeometryOutputComponents = 64;
caps.maxGeometryOutputVertices = 256;
caps.maxGeometryTotalOutputComponents = 1024;
caps.maxShaderTextureImageUnits[ShaderType::Geometry] = 16;
caps.maxShaderAtomicCounterBuffers[ShaderType::Geometry] = 0;
caps.maxShaderAtomicCounters[ShaderType::Geometry] = 0;
caps.maxShaderStorageBlocks[ShaderType::Geometry] = 0;
caps.maxGeometryShaderInvocations = 32;
caps.maxShaderStorageBlocks[ShaderType::Geometry] = 0;
caps.maxGeometryShaderInvocations = 32;
// Table 20.46 (GL_EXT_geometry_shader)
caps.maxShaderImageUniforms[ShaderType::Geometry] = 0;
......
......@@ -312,14 +312,14 @@ void Debug::pushDefaultGroup()
c0.source = GL_DONT_CARE;
c0.type = GL_DONT_CARE;
c0.severity = GL_DONT_CARE;
c0.enabled = true;
c0.enabled = true;
g.controls.push_back(std::move(c0));
Control c1;
c1.source = GL_DONT_CARE;
c1.type = GL_DONT_CARE;
c1.severity = GL_DEBUG_SEVERITY_LOW;
c1.enabled = false;
c1.enabled = false;
g.controls.push_back(std::move(c1));
mGroups.push_back(std::move(g));
......
......@@ -24,7 +24,7 @@ class LabeledObject
public:
virtual ~LabeledObject() {}
virtual void setLabel(const std::string &label) = 0;
virtual const std::string &getLabel() const = 0;
virtual const std::string &getLabel() const = 0;
};
class Debug : angle::NonCopyable
......
......@@ -11,8 +11,8 @@
#include <iterator>
#include <platform/Platform.h>
#include <EGL/eglext.h>
#include <platform/Platform.h>
#include "common/debug.h"
#include "common/platform.h"
......@@ -31,7 +31,8 @@ static std::string GenerateExtensionsString(const T &extensions)
std::vector<std::string> extensionsVector = extensions.getStrings();
std::ostringstream stream;
std::copy(extensionsVector.begin(), extensionsVector.end(), std::ostream_iterator<std::string>(stream, " "));
std::copy(extensionsVector.begin(), extensionsVector.end(),
std::ostream_iterator<std::string>(stream, " "));
return stream.str();
}
......@@ -92,8 +93,8 @@ Device::~Device()
Error Device::getDevice(EGLAttrib *value)
{
void *nativeDevice = nullptr;
egl::Error error = getImplementation()->getDevice(&nativeDevice);
*value = reinterpret_cast<EGLAttrib>(nativeDevice);
egl::Error error = getImplementation()->getDevice(&nativeDevice);
*value = reinterpret_cast<EGLAttrib>(nativeDevice);
return error;
}
......@@ -117,5 +118,4 @@ const std::string &Device::getExtensionString() const
{
return mDeviceExtensionString;
}
}
......@@ -11,8 +11,8 @@
#define LIBANGLE_DEVICE_H_
#include "common/angleutils.h"
#include "libANGLE/Error.h"
#include "libANGLE/Display.h"
#include "libANGLE/Error.h"
#include <memory>
......@@ -50,7 +50,6 @@ class Device final : angle::NonCopyable
DeviceExtensions mDeviceExtensions;
std::string mDeviceExtensionString;
};
}
#endif // LIBANGLE_DEVICE_H_
#endif // LIBANGLE_DEVICE_H_
......@@ -16,8 +16,8 @@
#include <sstream>
#include <vector>
#include <platform/Platform.h>
#include <EGL/eglext.h>
#include <platform/Platform.h>
#include "common/debug.h"
#include "common/mathutil.h"
......@@ -36,23 +36,23 @@
#include "third_party/trace_event/trace_event.h"
#if defined(ANGLE_ENABLE_D3D9) || defined(ANGLE_ENABLE_D3D11)
# include "libANGLE/renderer/d3d/DisplayD3D.h"
#include "libANGLE/renderer/d3d/DisplayD3D.h"
#endif
#if defined(ANGLE_ENABLE_OPENGL)
# if defined(ANGLE_PLATFORM_WINDOWS)
# include "libANGLE/renderer/gl/wgl/DisplayWGL.h"
# elif defined(ANGLE_USE_X11)
# include "libANGLE/renderer/gl/glx/DisplayGLX.h"
# elif defined(ANGLE_PLATFORM_APPLE)
# include "libANGLE/renderer/gl/cgl/DisplayCGL.h"
# elif defined(ANGLE_USE_OZONE)
# include "libANGLE/renderer/gl/egl/ozone/DisplayOzone.h"
# elif defined(ANGLE_PLATFORM_ANDROID)
# include "libANGLE/renderer/gl/egl/android/DisplayAndroid.h"
# else
# error Unsupported OpenGL platform.
# endif
#if defined(ANGLE_PLATFORM_WINDOWS)
#include "libANGLE/renderer/gl/wgl/DisplayWGL.h"
#elif defined(ANGLE_USE_X11)
#include "libANGLE/renderer/gl/glx/DisplayGLX.h"
#elif defined(ANGLE_PLATFORM_APPLE)
#include "libANGLE/renderer/gl/cgl/DisplayCGL.h"
#elif defined(ANGLE_USE_OZONE)
#include "libANGLE/renderer/gl/egl/ozone/DisplayOzone.h"
#elif defined(ANGLE_PLATFORM_ANDROID)
#include "libANGLE/renderer/gl/egl/android/DisplayAndroid.h"
#else
#error Unsupported OpenGL platform.
#endif
#endif
#if defined(ANGLE_ENABLE_NULL)
......@@ -77,7 +77,7 @@ namespace egl
namespace
{
typedef std::map<EGLNativeWindowType, Surface*> WindowSurfaceMap;
typedef std::map<EGLNativeWindowType, Surface *> WindowSurfaceMap;
// Get a map of all EGL window surfaces to validate that no window has more than one EGL surface
// associated with it.
static WindowSurfaceMap *GetWindowSurfaces()
......@@ -592,7 +592,7 @@ Error Display::terminate()
return NoError();
}
std::vector<const Config*> Display::getConfigs(const egl::AttributeMap &attribs) const
std::vector<const Config *> Display::getConfigs(const egl::AttributeMap &attribs) const
{
return mConfigSet.filter(attribs);
}
......@@ -825,7 +825,8 @@ Error Display::restoreLostDevice()
{
if ((*ctx)->isResetNotificationEnabled())
{
// If reset notifications have been requested, application must delete all contexts first
// If reset notifications have been requested, application must delete all contexts
// first
return EglContextLost();
}
}
......@@ -841,7 +842,8 @@ Error Display::destroySurface(Surface *surface)
ASSERT(windowSurfaces);
bool surfaceRemoved = false;
for (WindowSurfaceMap::iterator iter = windowSurfaces->begin(); iter != windowSurfaces->end(); iter++)
for (WindowSurfaceMap::iterator iter = windowSurfaces->begin();
iter != windowSurfaces->end(); iter++)
{
if (iter->second == surface)
{
......@@ -919,7 +921,8 @@ void Display::notifyDeviceLost()
return;
}
for (ContextSet::iterator context = mContextSet.begin(); context != mContextSet.end(); context++)
for (ContextSet::iterator context = mContextSet.begin(); context != mContextSet.end();
context++)
{
(*context)->markContextLost();
}
......@@ -985,8 +988,8 @@ static ClientExtensions GenerateClientExtensions()
ClientExtensions extensions;
extensions.clientExtensions = true;
extensions.platformBase = true;
extensions.platformANGLE = true;
extensions.platformBase = true;
extensions.platformANGLE = true;
#if defined(ANGLE_ENABLE_D3D9) || defined(ANGLE_ENABLE_D3D11)
extensions.platformANGLED3D = true;
......@@ -1002,8 +1005,8 @@ static ClientExtensions GenerateClientExtensions()
#endif
#if defined(ANGLE_ENABLE_D3D11)
extensions.deviceCreation = true;
extensions.deviceCreationD3D11 = true;
extensions.deviceCreation = true;
extensions.deviceCreationD3D11 = true;
extensions.experimentalPresentPath = true;
#endif
......@@ -1027,7 +1030,8 @@ static std::string GenerateExtensionsString(const T &extensions)
std::vector<std::string> extensionsVector = extensions.getStrings();
std::ostringstream stream;
std::copy(extensionsVector.begin(), extensionsVector.end(), std::ostream_iterator<std::string>(stream, " "));
std::copy(extensionsVector.begin(), extensionsVector.end(),
std::ostream_iterator<std::string>(stream, " "));
return stream.str();
}
......@@ -1051,9 +1055,9 @@ void Display::initDisplayExtensions()
mDisplayExtensions = mImplementation->getExtensions();
// Some extensions are always available because they are implemented in the EGL layer.
mDisplayExtensions.createContext = true;
mDisplayExtensions.createContextNoError = true;
mDisplayExtensions.createContextWebGLCompatibility = true;
mDisplayExtensions.createContext = true;
mDisplayExtensions.createContextNoError = true;
mDisplayExtensions.createContextWebGLCompatibility = true;
mDisplayExtensions.createContextBindGeneratesResource = true;
mDisplayExtensions.createContextClientArrays = true;
mDisplayExtensions.pixelFormatFloat = true;
......@@ -1115,8 +1119,7 @@ bool Display::isValidNativeDisplay(EGLNativeDisplayType display)
}
#if defined(ANGLE_PLATFORM_WINDOWS) && !defined(ANGLE_ENABLE_WINDOWS_STORE)
if (display == EGL_SOFTWARE_DISPLAY_ANGLE ||
display == EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE ||
if (display == EGL_SOFTWARE_DISPLAY_ANGLE || display == EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE ||
display == EGL_D3D11_ONLY_DISPLAY_ANGLE)
{
return true;
......
......@@ -181,7 +181,7 @@ class Display final : angle::NonCopyable
ConfigSet mConfigSet;
typedef std::set<gl::Context*> ContextSet;
typedef std::set<gl::Context *> ContextSet;
ContextSet mContextSet;
typedef std::set<Image *> ImageSet;
......@@ -215,4 +215,4 @@ class Display final : angle::NonCopyable
} // namespace egl
#endif // LIBANGLE_DISPLAY_H_
#endif // LIBANGLE_DISPLAY_H_
......@@ -10,10 +10,10 @@
#include "common/debug.h"
#include "common/utilities.h"
#include "libANGLE/Renderbuffer.h"
#include "libANGLE/Texture.h"
#include "libANGLE/angletypes.h"
#include "libANGLE/formatutils.h"
#include "libANGLE/Texture.h"
#include "libANGLE/Renderbuffer.h"
#include "libANGLE/renderer/EGLImplFactory.h"
#include "libANGLE/renderer/ImageImpl.h"
......@@ -30,8 +30,8 @@ gl::ImageIndex GetImageIndex(EGLenum eglTarget, const egl::AttributeMap &attribs
}
gl::TextureTarget target = egl_gl::EGLImageTargetToTextureTarget(eglTarget);
GLint mip = static_cast<GLint>(attribs.get(EGL_GL_TEXTURE_LEVEL_KHR, 0));
GLint layer = static_cast<GLint>(attribs.get(EGL_GL_TEXTURE_ZOFFSET_KHR, 0));
GLint mip = static_cast<GLint>(attribs.get(EGL_GL_TEXTURE_LEVEL_KHR, 0));
GLint layer = static_cast<GLint>(attribs.get(EGL_GL_TEXTURE_ZOFFSET_KHR, 0));
if (target == gl::TextureTarget::_3D)
{
......
......@@ -9,8 +9,8 @@
#include "libANGLE/Stream.h"
#include <platform/Platform.h>
#include <EGL/eglext.h>
#include <platform/Platform.h>
#include "common/debug.h"
#include "common/mathutil.h"
......@@ -118,7 +118,7 @@ Error Stream::createConsumerGLTextureExternal(const AttributeMap &attributes, gl
ASSERT(context != nullptr);
const auto &glState = context->getGLState();
EGLenum bufferType = attributes.getAsInt(EGL_COLOR_BUFFER_TYPE, EGL_RGB_BUFFER);
EGLenum bufferType = attributes.getAsInt(EGL_COLOR_BUFFER_TYPE, EGL_RGB_BUFFER);
if (bufferType == EGL_RGB_BUFFER)
{
mPlanes[0].texture = glState.getTargetTexture(gl::TextureType::External);
......
......@@ -65,7 +65,8 @@ Surface::Surface(EGLint surfaceType,
mDSFormat(config->depthStencilFormat),
mInitState(gl::InitState::Initialized)
{
mPostSubBufferRequested = (attributes.get(EGL_POST_SUB_BUFFER_SUPPORTED_NV, EGL_FALSE) == EGL_TRUE);
mPostSubBufferRequested =
(attributes.get(EGL_POST_SUB_BUFFER_SUPPORTED_NV, EGL_FALSE) == EGL_TRUE);
mFlexibleSurfaceCompatibilityRequested =
(attributes.get(EGL_FLEXIBLE_SURFACE_COMPATIBILITY_SUPPORTED_ANGLE, EGL_FALSE) == EGL_TRUE);
......
......@@ -39,15 +39,24 @@ Error ValidateContext(const Display *display, const gl::Context *context);
Error ValidateImage(const Display *display, const Image *image);
// Entry point validation
Error ValidateCreateContext(Display *display, Config *configuration, gl::Context *shareContext,
const AttributeMap& attributes);
Error ValidateCreateWindowSurface(Display *display, Config *config, EGLNativeWindowType window,
const AttributeMap& attributes);
Error ValidateCreatePbufferSurface(Display *display, Config *config, const AttributeMap& attributes);
Error ValidateCreatePbufferFromClientBuffer(Display *display, EGLenum buftype, EGLClientBuffer buffer,
Config *config, const AttributeMap& attributes);
Error ValidateCreateContext(Display *display,
Config *configuration,
gl::Context *shareContext,
const AttributeMap &attributes);
Error ValidateCreateWindowSurface(Display *display,
Config *config,
EGLNativeWindowType window,
const AttributeMap &attributes);
Error ValidateCreatePbufferSurface(Display *display,
Config *config,
const AttributeMap &attributes);
Error ValidateCreatePbufferFromClientBuffer(Display *display,
EGLenum buftype,
EGLClientBuffer buffer,
Config *config,
const AttributeMap &attributes);
Error ValidateMakeCurrent(Display *display, Surface *draw, Surface *read, gl::Context *context);
......@@ -191,4 +200,4 @@ Error ValidateQueryContext(const Display *display,
} \
}
#endif // LIBANGLE_VALIDATIONEGL_H_
#endif // LIBANGLE_VALIDATIONEGL_H_
......@@ -17,13 +17,23 @@ namespace egl
{
// EGL_ANGLE_query_surface_pointer
ANGLE_EXPORT EGLBoolean EGLAPIENTRY QuerySurfacePointerANGLE(EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY QuerySurfacePointerANGLE(EGLDisplay dpy,
EGLSurface surface,
EGLint attribute,
void **value);
// EGL_NV_post_sub_buffer
ANGLE_EXPORT EGLBoolean EGLAPIENTRY PostSubBufferNV(EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY PostSubBufferNV(EGLDisplay dpy,
EGLSurface surface,
EGLint x,
EGLint y,
EGLint width,
EGLint height);
// EGL_EXT_platform_base
ANGLE_EXPORT EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform, void *native_display, const EGLint *attrib_list);
ANGLE_EXPORT EGLDisplay EGLAPIENTRY GetPlatformDisplayEXT(EGLenum platform,
void *native_display,
const EGLint *attrib_list);
ANGLE_EXPORT EGLSurface EGLAPIENTRY CreatePlatformWindowSurfaceEXT(EGLDisplay dpy,
EGLConfig config,
void *native_window,
......@@ -34,9 +44,13 @@ ANGLE_EXPORT EGLSurface EGLAPIENTRY CreatePlatformPixmapSurfaceEXT(EGLDisplay dp
const EGLint *attrib_list);
// EGL_EXT_device_query
ANGLE_EXPORT EGLBoolean EGLAPIENTRY QueryDisplayAttribEXT(EGLDisplay dpy, EGLint attribute, EGLAttrib *value);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY QueryDeviceAttribEXT(EGLDeviceEXT device, EGLint attribute, EGLAttrib *value);
ANGLE_EXPORT const char * EGLAPIENTRY QueryDeviceStringEXT(EGLDeviceEXT device, EGLint name);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY QueryDisplayAttribEXT(EGLDisplay dpy,
EGLint attribute,
EGLAttrib *value);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY QueryDeviceAttribEXT(EGLDeviceEXT device,
EGLint attribute,
EGLAttrib *value);
ANGLE_EXPORT const char *EGLAPIENTRY QueryDeviceStringEXT(EGLDeviceEXT device, EGLint name);
// EGL_KHR_image_base/EGL_KHR_image
ANGLE_EXPORT EGLImageKHR EGLAPIENTRY CreateImageKHR(EGLDisplay dpy,
......@@ -123,4 +137,4 @@ ANGLE_EXPORT EGLint EGLAPIENTRY ProgramCacheResizeANGLE(EGLDisplay dpy, EGLint l
} // namespace egl
#endif // LIBGLESV2_ENTRYPOINTSEGLEXT_H_
#endif // LIBGLESV2_ENTRYPOINTSEGLEXT_H_
......@@ -26,4 +26,4 @@ Thread *GetCurrentThread();
} // namespace egl
#endif // LIBGLESV2_GLOBALSTATE_H_
#endif // LIBGLESV2_GLOBALSTATE_H_
......@@ -45,8 +45,10 @@
#define ASSERT_EGL_ERROR(err) ASSERT_EQ((err), eglGetError())
#define ASSERT_EGL_SUCCESS() ASSERT_EGL_ERROR(EGL_SUCCESS)
#define ASSERT_GLENUM_EQ(expected, actual) ASSERT_EQ(static_cast<GLenum>(expected), static_cast<GLenum>(actual))
#define EXPECT_GLENUM_EQ(expected, actual) EXPECT_EQ(static_cast<GLenum>(expected), static_cast<GLenum>(actual))
#define ASSERT_GLENUM_EQ(expected, actual) \
ASSERT_EQ(static_cast<GLenum>(expected), static_cast<GLenum>(actual))
#define EXPECT_GLENUM_EQ(expected, actual) \
EXPECT_EQ(static_cast<GLenum>(expected), static_cast<GLenum>(actual))
#define ASSERT_GLENUM_NE(expected, actual) \
ASSERT_NE(static_cast<GLenum>(expected), static_cast<GLenum>(actual))
#define EXPECT_GLENUM_NE(expected, actual) \
......@@ -167,25 +169,24 @@ GLColor32F ReadColor32F(GLint x, GLint y);
#define EXPECT_PIXEL_COLOR32F_EQ(x, y, angleColor) EXPECT_EQ(angleColor, angle::ReadColor32F(x, y))
#define EXPECT_PIXEL_RECT_EQ(x, y, width, height, color) \
\
{ \
\
{ \
std::vector<GLColor> actualColors(width *height); \
glReadPixels((x), (y), (width), (height), GL_RGBA, GL_UNSIGNED_BYTE, actualColors.data()); \
std::vector<GLColor> expectedColors(width *height, color); \
EXPECT_EQ(expectedColors, actualColors); \
\
}
}
#define EXPECT_PIXEL_NEAR(x, y, r, g, b, a, abs_error) \
{ \
GLubyte pixel[4]; \
glReadPixels((x), (y), 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel); \
EXPECT_GL_NO_ERROR(); \
EXPECT_NEAR((r), pixel[0], abs_error); \
EXPECT_NEAR((g), pixel[1], abs_error); \
EXPECT_NEAR((b), pixel[2], abs_error); \
EXPECT_NEAR((a), pixel[3], abs_error); \
}
#define EXPECT_PIXEL_NEAR(x, y, r, g, b, a, abs_error) \
{ \
GLubyte pixel[4]; \
glReadPixels((x), (y), 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel); \
EXPECT_GL_NO_ERROR(); \
EXPECT_NEAR((r), pixel[0], abs_error); \
EXPECT_NEAR((g), pixel[1], abs_error); \
EXPECT_NEAR((b), pixel[2], abs_error); \
EXPECT_NEAR((a), pixel[3], abs_error); \
}
#define EXPECT_PIXEL32F_NEAR(x, y, r, g, b, a, abs_error) \
\
......@@ -207,14 +208,13 @@ GLColor32F ReadColor32F(GLint x, GLint y);
EXPECT_PIXEL32F_NEAR(x, y, angleColor.R, angleColor.G, angleColor.B, angleColor.A, abs_error)
#define EXPECT_COLOR_NEAR(expected, actual, abs_error) \
\
{ \
\
{ \
EXPECT_NEAR(expected.R, actual.R, abs_error); \
EXPECT_NEAR(expected.G, actual.G, abs_error); \
EXPECT_NEAR(expected.B, actual.B, abs_error); \
EXPECT_NEAR(expected.A, actual.A, abs_error); \
\
}
}
#define EXPECT_PIXEL32F_NEAR(x, y, r, g, b, a, abs_error) \
\
{ \
......@@ -236,7 +236,7 @@ class ANGLETestBase;
struct TestPlatformContext final : private angle::NonCopyable
{
bool ignoreMessages = false;
bool ignoreMessages = false;
ANGLETestBase *currentTest = nullptr;
};
......@@ -452,13 +452,13 @@ bool IsRelease();
// Note: git cl format messes up this formatting.
#define ANGLE_SKIP_TEST_IF(COND) \
\
if(COND) \
\
{ \
\
if (COND) \
\
{ \
std::cout << "Test skipped: " #COND "." << std::endl; \
return; \
\
} ANGLE_EMPTY_STATEMENT
} \
ANGLE_EMPTY_STATEMENT
#endif // ANGLE_TESTS_ANGLE_TEST_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment