Commit 66988745 by Geoff Lang

Revert "Implement GL_KHR_debug."

This reverts commit 6c521b7a. Change-Id: I6ff981198e31f34d3e405edea6277ee75516d6ee Reviewed-on: https://chromium-review.googlesource.com/319820Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 6c521b7a
......@@ -17,7 +17,6 @@ namespace gl
Buffer::Buffer(rx::BufferImpl *impl, GLuint id)
: RefCountObject(id),
mLabel(),
mBuffer(impl),
mUsage(GL_STATIC_DRAW),
mSize(0),
......@@ -35,16 +34,6 @@ Buffer::~Buffer()
SafeDelete(mBuffer);
}
void Buffer::setLabel(const std::string &label)
{
mLabel = label;
}
const std::string &Buffer::getLabel() const
{
return mLabel;
}
Error Buffer::bufferData(const void *data, GLsizeiptr size, GLenum usage)
{
gl::Error error = mBuffer->setData(data, size, usage);
......
......@@ -12,7 +12,6 @@
#define LIBANGLE_BUFFER_H_
#include "common/angleutils.h"
#include "libANGLE/Debug.h"
#include "libANGLE/Error.h"
#include "libANGLE/IndexRangeCache.h"
#include "libANGLE/RefCountObject.h"
......@@ -25,14 +24,12 @@ class BufferImpl;
namespace gl
{
class Buffer final : public RefCountObject, public LabeledObject
class Buffer : public RefCountObject
{
public:
Buffer(rx::BufferImpl *impl, GLuint id);
virtual ~Buffer();
void setLabel(const std::string &label) override;
const std::string &getLabel() const override;
virtual ~Buffer();
Error bufferData(const void *data, GLsizeiptr size, GLenum usage);
Error bufferSubData(const void *data, GLsizeiptr size, GLintptr offset);
......@@ -64,8 +61,6 @@ class Buffer final : public RefCountObject, public LabeledObject
private:
rx::BufferImpl *mBuffer;
std::string mLabel;
GLenum mUsage;
GLint64 mSize;
GLbitfield mAccessFlags;
......
......@@ -148,10 +148,6 @@ Extensions::Extensions()
packSubimage(false),
vertexArrayObject(false),
debug(false),
maxDebugMessageLength(0),
maxDebugLoggedMessages(0),
maxDebugGroupStackDepth(0),
maxLabelLength(0),
colorBufferFloat(false)
{
}
......
......@@ -262,10 +262,6 @@ struct Extensions
// GL_KHR_debug
bool debug;
GLuint maxDebugMessageLength;
GLuint maxDebugLoggedMessages;
GLuint maxDebugGroupStackDepth;
GLuint maxLabelLength;
// ES3 Extension support
......
......@@ -62,8 +62,7 @@ Context::Context(const egl::Config *config,
const Context *shareContext,
rx::Renderer *renderer,
bool notifyResets,
bool robustAccess,
bool debug)
bool robustAccess)
: ValidationContext(clientVersion,
mState,
mCaps,
......@@ -78,7 +77,7 @@ Context::Context(const egl::Config *config,
ASSERT(robustAccess == false); // Unimplemented
initCaps(clientVersion);
mState.initialize(mCaps, mExtensions, clientVersion, debug);
mState.initialize(mCaps, clientVersion);
mClientVersion = clientVersion;
......@@ -504,7 +503,7 @@ void Context::deleteQuery(GLuint query)
}
}
Buffer *Context::getBuffer(GLuint handle) const
Buffer *Context::getBuffer(GLuint handle)
{
return mResourceManager->getBuffer(handle);
}
......@@ -524,7 +523,7 @@ Texture *Context::getTexture(GLuint handle) const
return mResourceManager->getTexture(handle);
}
Renderbuffer *Context::getRenderbuffer(GLuint handle) const
Renderbuffer *Context::getRenderbuffer(GLuint handle)
{
return mResourceManager->getRenderbuffer(handle);
}
......@@ -551,41 +550,6 @@ TransformFeedback *Context::getTransformFeedback(GLuint handle) const
return (iter != mTransformFeedbackMap.end()) ? iter->second : nullptr;
}
LabeledObject *Context::getLabeledObject(GLenum identifier, GLuint name) const
{
switch (identifier)
{
case GL_BUFFER:
return getBuffer(name);
case GL_SHADER:
return getShader(name);
case GL_PROGRAM:
return getProgram(name);
case GL_VERTEX_ARRAY:
return getVertexArray(name);
case GL_QUERY:
return getQuery(name);
case GL_TRANSFORM_FEEDBACK:
return getTransformFeedback(name);
case GL_SAMPLER:
return getSampler(name);
case GL_TEXTURE:
return getTexture(name);
case GL_RENDERBUFFER:
return getRenderbuffer(name);
case GL_FRAMEBUFFER:
return getFramebuffer(name);
default:
UNREACHABLE();
return nullptr;
}
}
LabeledObject *Context::getLabeledObjectFromPtr(const void *ptr) const
{
return getFenceSync(reinterpret_cast<GLsync>(const_cast<void *>(ptr)));
}
bool Context::isSampler(GLuint samplerName) const
{
return mResourceManager->isSampler(samplerName);
......@@ -812,12 +776,6 @@ Query *Context::getQuery(unsigned int handle, bool create, GLenum type)
}
}
Query *Context::getQuery(GLuint handle) const
{
auto iter = mQueryMap.find(handle);
return (iter != mQueryMap.end()) ? iter->second : nullptr;
}
Texture *Context::getTargetTexture(GLenum target) const
{
ASSERT(ValidTextureTarget(this, target));
......@@ -947,21 +905,6 @@ void Context::getIntegerv(GLenum pname, GLint *params)
case GL_NUM_EXTENSIONS:
*params = static_cast<GLint>(mExtensionStrings.size());
break;
// GL_KHR_debug
case GL_MAX_DEBUG_MESSAGE_LENGTH:
*params = mExtensions.maxDebugMessageLength;
break;
case GL_MAX_DEBUG_LOGGED_MESSAGES:
*params = mExtensions.maxDebugLoggedMessages;
break;
case GL_MAX_DEBUG_GROUP_STACK_DEPTH:
*params = mExtensions.maxDebugGroupStackDepth;
break;
case GL_MAX_LABEL_LENGTH:
*params = mExtensions.maxLabelLength;
break;
default:
mState.getIntegerv(getData(), pname, params);
break;
......@@ -995,11 +938,6 @@ void Context::getInteger64v(GLenum pname, GLint64 *params)
}
}
void Context::getPointerv(GLenum pname, void **params) const
{
mState.getPointerv(pname, params);
}
bool Context::getIndexedIntegerv(GLenum target, GLuint index, GLint *data)
{
// Queries about context capabilities and maximums are answered by Context.
......@@ -1211,29 +1149,6 @@ bool Context::getQueryParameterInfo(GLenum pname, GLenum *type, unsigned int *nu
return true;
}
if (mExtensions.debug)
{
switch (pname)
{
case GL_DEBUG_LOGGED_MESSAGES:
case GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH:
case GL_DEBUG_GROUP_STACK_DEPTH:
case GL_MAX_DEBUG_MESSAGE_LENGTH:
case GL_MAX_DEBUG_LOGGED_MESSAGES:
case GL_MAX_DEBUG_GROUP_STACK_DEPTH:
case GL_MAX_LABEL_LENGTH:
*type = GL_INT;
*numParams = 1;
return true;
case GL_DEBUG_OUTPUT_SYNCHRONOUS:
case GL_DEBUG_OUTPUT:
*type = GL_BOOL;
*numParams = 1;
return true;
}
}
// Check for ES3.0+ parameter names which are also exposed as ES2 extensions
switch (pname)
{
......@@ -1478,13 +1393,6 @@ void Context::recordError(const Error &error)
if (error.isError())
{
mErrors.insert(error.getCode());
if (!error.getMessage().empty())
{
auto &debug = mState.getDebug();
debug.insertMessage(GL_DEBUG_SOURCE_API, GL_DEBUG_TYPE_ERROR, error.getID(),
GL_DEBUG_SEVERITY_HIGH, error.getMessage());
}
}
}
......@@ -1832,13 +1740,6 @@ void Context::initCaps(GLuint clientVersion)
//mExtensions.sRGB = false;
}
// Explicitly enable GL_KHR_debug
mExtensions.debug = true;
mExtensions.maxDebugMessageLength = 1024;
mExtensions.maxDebugLoggedMessages = 1024;
mExtensions.maxDebugGroupStackDepth = 1024;
mExtensions.maxLabelLength = 1024;
// Apply implementation limits
mCaps.maxVertexAttributes = std::min<GLuint>(mCaps.maxVertexAttributes, MAX_VERTEX_ATTRIBS);
mCaps.maxVertexUniformBlocks = std::min<GLuint>(mCaps.maxVertexUniformBlocks, IMPLEMENTATION_MAX_VERTEX_SHADER_UNIFORM_BUFFERS);
......
......@@ -58,13 +58,7 @@ class TransformFeedback;
class Context final : public ValidationContext
{
public:
Context(const egl::Config *config,
int clientVersion,
const Context *shareContext,
rx::Renderer *renderer,
bool notifyResets,
bool robustAccess,
bool debug);
Context(const egl::Config *config, int clientVersion, const Context *shareContext, rx::Renderer *renderer, bool notifyResets, bool robustAccess);
virtual ~Context();
......@@ -139,21 +133,18 @@ class Context final : public ValidationContext
GLint getSamplerParameteri(GLuint sampler, GLenum pname);
GLfloat getSamplerParameterf(GLuint sampler, GLenum pname);
Buffer *getBuffer(GLuint handle) const;
Buffer *getBuffer(GLuint handle);
FenceNV *getFenceNV(GLuint handle);
FenceSync *getFenceSync(GLsync handle) const;
Shader *getShader(GLuint handle) const;
Program *getProgram(GLuint handle) const;
Texture *getTexture(GLuint handle) const;
Framebuffer *getFramebuffer(GLuint handle) const;
Renderbuffer *getRenderbuffer(GLuint handle) const;
Renderbuffer *getRenderbuffer(GLuint handle);
VertexArray *getVertexArray(GLuint handle) const;
Sampler *getSampler(GLuint handle) const;
Query *getQuery(GLuint handle, bool create, GLenum type);
Query *getQuery(GLuint handle) const;
TransformFeedback *getTransformFeedback(GLuint handle) const;
LabeledObject *getLabeledObject(GLenum identifier, GLuint name) const;
LabeledObject *getLabeledObjectFromPtr(const void *ptr) const;
Texture *getTargetTexture(GLenum target) const;
Texture *getSamplerTexture(unsigned int sampler, GLenum type) const;
......@@ -169,7 +160,6 @@ class Context final : public ValidationContext
void getFloatv(GLenum pname, GLfloat *params);
void getIntegerv(GLenum pname, GLint *params);
void getInteger64v(GLenum pname, GLint64 *params);
void getPointerv(GLenum pname, void **params) const;
bool getIndexedIntegerv(GLenum target, GLuint index, GLint *data);
bool getIndexedInteger64v(GLenum target, GLuint index, GLint64 *data);
......
//
// Copyright (c) 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.
//
// Debug.cpp: Defines debug state used for GL_KHR_debug
#include "libANGLE/Debug.h"
#include "common/debug.h"
#include <algorithm>
#include <tuple>
namespace gl
{
Debug::Debug()
: mOutputEnabled(false),
mCallbackFunction(nullptr),
mCallbackUserParam(nullptr),
mMessages(),
mMaxLoggedMessages(0),
mOutputSynchronous(false),
mGroups()
{
pushDefaultGroup();
}
void Debug::setMaxLoggedMessages(GLuint maxLoggedMessages)
{
mMaxLoggedMessages = maxLoggedMessages;
}
void Debug::setOutputEnabled(bool enabled)
{
mOutputEnabled = enabled;
}
bool Debug::isOutputEnabled() const
{
return mOutputEnabled;
}
void Debug::setOutputSynchronous(bool synchronous)
{
mOutputSynchronous = synchronous;
}
bool Debug::isOutputSynchronous() const
{
return mOutputSynchronous;
}
void Debug::setCallback(GLDEBUGPROCKHR callback, const void *userParam)
{
mCallbackFunction = callback;
mCallbackUserParam = userParam;
}
GLDEBUGPROCKHR Debug::getCallback() const
{
return mCallbackFunction;
}
const void *Debug::getUserParam() const
{
return mCallbackUserParam;
}
void Debug::insertMessage(GLenum source,
GLenum type,
GLuint id,
GLenum severity,
const std::string &message)
{
std::string messageCopy(message);
insertMessage(source, type, id, severity, std::move(messageCopy));
}
void Debug::insertMessage(GLenum source,
GLenum type,
GLuint id,
GLenum severity,
std::string &&message)
{
if (!isMessageEnabled(source, type, id, severity))
{
return;
}
if (mCallbackFunction != nullptr)
{
// TODO(geofflang) Check the synchronous flag and potentially flush messages from another
// thread.
mCallbackFunction(source, type, id, severity, static_cast<GLsizei>(message.length()),
message.c_str(), mCallbackUserParam);
}
else
{
if (mMessages.size() >= mMaxLoggedMessages)
{
// Drop messages over the limit
return;
}
Message m;
m.source = source;
m.type = type;
m.id = id;
m.severity = severity;
m.message = std::move(message);
mMessages.push_back(std::move(m));
}
}
size_t Debug::getMessages(GLuint count,
GLsizei bufSize,
GLenum *sources,
GLenum *types,
GLuint *ids,
GLenum *severities,
GLsizei *lengths,
GLchar *messageLog)
{
size_t messageCount = 0;
size_t messageStringIndex = 0;
while (messageCount <= count && !mMessages.empty())
{
const Message &m = mMessages.front();
if (messageLog != nullptr)
{
// Check that this message can fit in the message buffer
if (messageStringIndex + m.message.length() + 1 > static_cast<size_t>(bufSize))
{
break;
}
std::copy(m.message.begin(), m.message.end(), messageLog + messageStringIndex);
messageStringIndex += m.message.length();
messageLog[messageStringIndex] = '\0';
messageStringIndex += 1;
}
if (sources != nullptr)
{
sources[messageCount] = m.source;
}
if (types != nullptr)
{
types[messageCount] = m.type;
}
if (ids != nullptr)
{
ids[messageCount] = m.id;
}
if (severities != nullptr)
{
severities[messageCount] = m.severity;
}
if (lengths != nullptr)
{
lengths[messageCount] = static_cast<GLsizei>(m.message.length());
}
mMessages.pop_front();
messageCount++;
}
return messageCount;
}
size_t Debug::getNextMessageLength() const
{
return mMessages.empty() ? 0 : mMessages.front().message.length();
}
size_t Debug::getMessageCount() const
{
return mMessages.size();
}
void Debug::setMessageControl(GLenum source,
GLenum type,
GLenum severity,
std::vector<GLuint> &&ids,
bool enabled)
{
Control c;
c.source = source;
c.type = type;
c.severity = severity;
c.ids = std::move(ids);
c.enabled = enabled;
auto &controls = mGroups.back().controls;
controls.push_back(std::move(c));
}
void Debug::pushGroup(GLenum source, GLuint id, std::string &&message)
{
insertMessage(source, GL_DEBUG_TYPE_PUSH_GROUP, id, GL_DEBUG_SEVERITY_NOTIFICATION,
std::string(message));
Group g;
g.source = source;
g.id = id;
g.message = std::move(message);
mGroups.push_back(std::move(g));
}
void Debug::popGroup()
{
// Make sure the default group is not about to be popped
ASSERT(mGroups.size() > 1);
Group g = mGroups.back();
mGroups.pop_back();
insertMessage(g.source, GL_DEBUG_TYPE_POP_GROUP, g.id, GL_DEBUG_SEVERITY_NOTIFICATION,
g.message);
}
size_t Debug::getGroupStackDepth() const
{
return mGroups.size();
}
bool Debug::isMessageEnabled(GLenum source, GLenum type, GLuint id, GLenum severity) const
{
if (!mOutputEnabled)
{
return false;
}
for (auto groupIter = mGroups.rbegin(); groupIter != mGroups.rend(); groupIter++)
{
const auto &controls = groupIter->controls;
for (auto controlIter = controls.rbegin(); controlIter != controls.rend(); controlIter++)
{
const auto &control = *controlIter;
if (control.source != GL_DONT_CARE && control.source != source)
{
continue;
}
if (control.type != GL_DONT_CARE && control.type != type)
{
continue;
}
if (control.severity != GL_DONT_CARE && control.severity != severity)
{
continue;
}
if (!control.ids.empty() &&
std::find(control.ids.begin(), control.ids.end(), id) == control.ids.end())
{
continue;
}
return control.enabled;
}
}
return true;
}
void Debug::pushDefaultGroup()
{
Group g;
g.source = GL_NONE;
g.id = 0;
g.message = "";
Control c0;
c0.source = GL_DONT_CARE;
c0.type = GL_DONT_CARE;
c0.severity = GL_DONT_CARE;
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;
g.controls.push_back(std::move(c1));
mGroups.push_back(std::move(g));
}
} // namespace gl
//
// Copyright (c) 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.
//
// Debug.h: Defines debug state used for GL_KHR_debug
#ifndef LIBANGLE_DEBUG_H_
#define LIBANGLE_DEBUG_H_
#include "angle_gl.h"
#include "common/angleutils.h"
#include <deque>
#include <string>
#include <vector>
namespace gl
{
class LabeledObject
{
public:
virtual void setLabel(const std::string &label) = 0;
virtual const std::string &getLabel() const = 0;
};
class Debug : angle::NonCopyable
{
public:
Debug();
void setMaxLoggedMessages(GLuint maxLoggedMessages);
void setOutputEnabled(bool enabled);
bool isOutputEnabled() const;
void setOutputSynchronous(bool synchronous);
bool isOutputSynchronous() const;
void setCallback(GLDEBUGPROCKHR callback, const void *userParam);
GLDEBUGPROCKHR getCallback() const;
const void *getUserParam() const;
void insertMessage(GLenum source,
GLenum type,
GLuint id,
GLenum severity,
const std::string &message);
void insertMessage(GLenum source,
GLenum type,
GLuint id,
GLenum severity,
std::string &&message);
void setMessageControl(GLenum source,
GLenum type,
GLenum severity,
std::vector<GLuint> &&ids,
bool enabled);
size_t getMessages(GLuint count,
GLsizei bufSize,
GLenum *sources,
GLenum *types,
GLuint *ids,
GLenum *severities,
GLsizei *lengths,
GLchar *messageLog);
size_t getNextMessageLength() const;
size_t getMessageCount() const;
void pushGroup(GLenum source, GLuint id, std::string &&message);
void popGroup();
size_t getGroupStackDepth() const;
private:
bool isMessageEnabled(GLenum source, GLenum type, GLuint id, GLenum severity) const;
void pushDefaultGroup();
struct Message
{
GLenum source;
GLenum type;
GLuint id;
GLenum severity;
std::string message;
};
struct Control
{
GLenum source;
GLenum type;
GLenum severity;
std::vector<GLuint> ids;
bool enabled;
};
struct Group
{
GLenum source;
GLuint id;
std::string message;
std::vector<Control> controls;
};
bool mOutputEnabled;
GLDEBUGPROCKHR mCallbackFunction;
const void *mCallbackUserParam;
std::deque<Message> mMessages;
GLuint mMaxLoggedMessages;
bool mOutputSynchronous;
std::vector<Group> mGroups;
};
} // namespace gl
#endif // LIBANGLE_DEBUG_H_
......@@ -17,17 +17,8 @@ namespace gl
{
Error::Error(GLenum errorCode, const char *msg, ...)
: mCode(errorCode), mID(errorCode), mMessage(nullptr)
{
va_list vararg;
va_start(vararg, msg);
createMessageString();
*mMessage = FormatString(msg, vararg);
va_end(vararg);
}
Error::Error(GLenum errorCode, GLuint id, const char *msg, ...)
: mCode(errorCode), mID(id), mMessage(nullptr)
: mCode(errorCode),
mMessage(nullptr)
{
va_list vararg;
va_start(vararg, msg);
......
......@@ -22,7 +22,6 @@ class Error final
public:
explicit inline Error(GLenum errorCode);
Error(GLenum errorCode, const char *msg, ...);
Error(GLenum errorCode, GLuint id, const char *msg, ...);
inline Error(const Error &other);
inline Error(Error &&other);
......@@ -32,7 +31,6 @@ class Error final
inline Error &operator=(Error &&other);
inline GLenum getCode() const;
inline GLuint getID() const;
inline bool isError() const;
const std::string &getMessage() const;
......@@ -45,7 +43,6 @@ class Error final
void createMessageString() const;
GLenum mCode;
GLuint mID;
mutable std::string *mMessage;
};
......
......@@ -15,14 +15,12 @@ namespace gl
Error::Error(GLenum errorCode)
: mCode(errorCode),
mID(errorCode),
mMessage(nullptr)
{
}
Error::Error(const Error &other)
: mCode(other.mCode),
mID(other.mID),
mMessage(nullptr)
{
if (other.mMessage != nullptr)
......@@ -34,7 +32,6 @@ Error::Error(const Error &other)
Error::Error(Error &&other)
: mCode(other.mCode),
mID(other.mID),
mMessage(other.mMessage)
{
other.mMessage = nullptr;
......@@ -48,7 +45,6 @@ Error::~Error()
Error &Error::operator=(const Error &other)
{
mCode = other.mCode;
mID = other.mID;
if (other.mMessage != nullptr)
{
......@@ -66,7 +62,6 @@ Error &Error::operator=(const Error &other)
Error &Error::operator=(Error &&other)
{
mCode = other.mCode;
mID = other.mID;
mMessage = other.mMessage;
other.mMessage = nullptr;
......@@ -79,11 +74,6 @@ GLenum Error::getCode() const
return mCode;
}
GLuint Error::getID() const
{
return mID;
}
bool Error::isError() const
{
return (mCode != GL_NO_ERROR);
......
......@@ -76,7 +76,10 @@ Error FenceNV::finish()
}
FenceSync::FenceSync(rx::FenceSyncImpl *impl, GLuint id)
: RefCountObject(id), mFence(impl), mLabel(), mCondition(GL_NONE), mFlags(0)
: RefCountObject(id),
mFence(impl),
mCondition(GL_NONE),
mFlags(0)
{
}
......@@ -85,16 +88,6 @@ FenceSync::~FenceSync()
SafeDelete(mFence);
}
void FenceSync::setLabel(const std::string &label)
{
mLabel = label;
}
const std::string &FenceSync::getLabel() const
{
return mLabel;
}
Error FenceSync::set(GLenum condition, GLbitfield flags)
{
Error error = mFence->set(condition, flags);
......
......@@ -10,7 +10,6 @@
#ifndef LIBANGLE_FENCE_H_
#define LIBANGLE_FENCE_H_
#include "libANGLE/Debug.h"
#include "libANGLE/Error.h"
#include "libANGLE/RefCountObject.h"
......@@ -48,15 +47,12 @@ class FenceNV final : angle::NonCopyable
GLenum mCondition;
};
class FenceSync final : public RefCountObject, public LabeledObject
class FenceSync final : public RefCountObject
{
public:
FenceSync(rx::FenceSyncImpl *impl, GLuint id);
explicit FenceSync(rx::FenceSyncImpl *impl, GLuint id);
virtual ~FenceSync();
void setLabel(const std::string &label) override;
const std::string &getLabel() const override;
Error set(GLenum condition, GLbitfield flags);
Error clientWait(GLbitfield flags, GLuint64 timeout, GLenum *outResult);
Error serverWait(GLbitfield flags, GLuint64 timeout);
......@@ -68,8 +64,6 @@ class FenceSync final : public RefCountObject, public LabeledObject
private:
rx::FenceSyncImpl *mFence;
std::string mLabel;
GLenum mCondition;
GLbitfield mFlags;
};
......
......@@ -40,8 +40,7 @@ void DetachMatchingAttachment(FramebufferAttachment *attachment, GLenum matchTyp
}
Framebuffer::Data::Data()
: mLabel(),
mColorAttachments(1),
: mColorAttachments(1),
mDrawBufferStates(1, GL_NONE),
mReadBufferState(GL_COLOR_ATTACHMENT0_EXT)
{
......@@ -49,8 +48,7 @@ Framebuffer::Data::Data()
}
Framebuffer::Data::Data(const Caps &caps)
: mLabel(),
mColorAttachments(caps.maxColorAttachments),
: mColorAttachments(caps.maxColorAttachments),
mDrawBufferStates(caps.maxDrawBuffers, GL_NONE),
mReadBufferState(GL_COLOR_ATTACHMENT0_EXT)
{
......@@ -61,11 +59,6 @@ Framebuffer::Data::~Data()
{
}
const std::string &Framebuffer::Data::getLabel()
{
return mLabel;
}
const FramebufferAttachment *Framebuffer::Data::getReadAttachment() const
{
ASSERT(mReadBufferState == GL_BACK || (mReadBufferState >= GL_COLOR_ATTACHMENT0 && mReadBufferState <= GL_COLOR_ATTACHMENT15));
......@@ -186,16 +179,6 @@ Framebuffer::~Framebuffer()
SafeDelete(mImpl);
}
void Framebuffer::setLabel(const std::string &label)
{
mData.mLabel = label;
}
const std::string &Framebuffer::getLabel() const
{
return mData.mLabel;
}
void Framebuffer::detachTexture(GLuint textureId)
{
detachResourceById(GL_TEXTURE, textureId);
......
......@@ -14,7 +14,6 @@
#include "common/angleutils.h"
#include "libANGLE/Constants.h"
#include "libANGLE/Debug.h"
#include "libANGLE/Error.h"
#include "libANGLE/FramebufferAttachment.h"
#include "libANGLE/RefCountObject.h"
......@@ -45,7 +44,7 @@ struct Extensions;
struct ImageIndex;
struct Rectangle;
class Framebuffer final : public LabeledObject
class Framebuffer
{
public:
......@@ -56,8 +55,6 @@ class Framebuffer final : public LabeledObject
explicit Data(const Caps &caps);
~Data();
const std::string &getLabel();
const FramebufferAttachment *getReadAttachment() const;
const FramebufferAttachment *getFirstColorAttachment() const;
const FramebufferAttachment *getDepthOrStencilAttachment() const;
......@@ -74,8 +71,6 @@ class Framebuffer final : public LabeledObject
private:
friend class Framebuffer;
std::string mLabel;
std::vector<FramebufferAttachment> mColorAttachments;
FramebufferAttachment mDepthAttachment;
FramebufferAttachment mStencilAttachment;
......@@ -88,9 +83,6 @@ class Framebuffer final : public LabeledObject
Framebuffer(rx::SurfaceImpl *surface);
virtual ~Framebuffer();
void setLabel(const std::string &label) override;
const std::string &getLabel() const override;
const rx::FramebufferImpl *getImplementation() const { return mImpl; }
rx::FramebufferImpl *getImplementation() { return mImpl; }
......
......@@ -223,8 +223,7 @@ VariableLocation::VariableLocation(const std::string &name, unsigned int element
}
Program::Data::Data()
: mLabel(),
mAttachedFragmentShader(nullptr),
: mAttachedFragmentShader(nullptr),
mAttachedVertexShader(nullptr),
mTransformFeedbackBufferMode(GL_INTERLEAVED_ATTRIBS),
mBinaryRetrieveableHint(false)
......@@ -244,11 +243,6 @@ Program::Data::~Data()
}
}
const std::string &Program::Data::getLabel()
{
return mLabel;
}
const LinkedUniform *Program::Data::getUniformByName(const std::string &name) const
{
for (const LinkedUniform &linkedUniform : mUniforms)
......@@ -334,16 +328,6 @@ Program::~Program()
SafeDelete(mProgram);
}
void Program::setLabel(const std::string &label)
{
mData.mLabel = label;
}
const std::string &Program::getLabel() const
{
return mData.mLabel;
}
bool Program::attachShader(Shader *shader)
{
if (shader->getType() == GL_VERTEX_SHADER)
......
......@@ -24,7 +24,6 @@
#include "libANGLE/angletypes.h"
#include "libANGLE/Constants.h"
#include "libANGLE/Debug.h"
#include "libANGLE/Error.h"
#include "libANGLE/RefCountObject.h"
......@@ -144,7 +143,7 @@ struct VariableLocation
unsigned int index;
};
class Program final : angle::NonCopyable, public LabeledObject
class Program : angle::NonCopyable
{
public:
class Data final : angle::NonCopyable
......@@ -153,8 +152,6 @@ class Program final : angle::NonCopyable, public LabeledObject
Data();
~Data();
const std::string &getLabel();
const Shader *getAttachedVertexShader() const { return mAttachedVertexShader; }
const Shader *getAttachedFragmentShader() const { return mAttachedFragmentShader; }
const std::vector<std::string> &getTransformFeedbackVaryingNames() const
......@@ -194,8 +191,6 @@ class Program final : angle::NonCopyable, public LabeledObject
private:
friend class Program;
std::string mLabel;
Shader *mAttachedFragmentShader;
Shader *mAttachedVertexShader;
......@@ -229,9 +224,6 @@ class Program final : angle::NonCopyable, public LabeledObject
GLuint id() const { return mHandle; }
void setLabel(const std::string &label) override;
const std::string &getLabel() const override;
rx::ProgramImpl *getImplementation() { return mProgram; }
const rx::ProgramImpl *getImplementation() const { return mProgram; }
......
......@@ -11,7 +11,9 @@
namespace gl
{
Query::Query(rx::QueryImpl *impl, GLuint id) : RefCountObject(id), mQuery(impl), mLabel()
Query::Query(rx::QueryImpl *impl, GLuint id)
: RefCountObject(id),
mQuery(impl)
{
}
......@@ -20,16 +22,6 @@ Query::~Query()
SafeDelete(mQuery);
}
void Query::setLabel(const std::string &label)
{
mLabel = label;
}
const std::string &Query::getLabel() const
{
return mLabel;
}
Error Query::begin()
{
return mQuery->begin();
......
......@@ -9,7 +9,6 @@
#ifndef LIBANGLE_QUERY_H_
#define LIBANGLE_QUERY_H_
#include "libANGLE/Debug.h"
#include "libANGLE/Error.h"
#include "libANGLE/RefCountObject.h"
......@@ -25,15 +24,12 @@ class QueryImpl;
namespace gl
{
class Query final : public RefCountObject, public LabeledObject
class Query : public RefCountObject
{
public:
Query(rx::QueryImpl *impl, GLuint id);
virtual ~Query();
void setLabel(const std::string &label) override;
const std::string &getLabel() const override;
Error begin();
Error end();
......@@ -47,8 +43,6 @@ class Query final : public RefCountObject, public LabeledObject
private:
rx::QueryImpl *mQuery;
std::string mLabel;
};
}
......
......@@ -22,7 +22,6 @@ namespace gl
Renderbuffer::Renderbuffer(rx::RenderbufferImpl *impl, GLuint id)
: egl::ImageSibling(id),
mRenderbuffer(impl),
mLabel(),
mWidth(0),
mHeight(0),
mInternalFormat(GL_RGBA4),
......@@ -35,16 +34,6 @@ Renderbuffer::~Renderbuffer()
SafeDelete(mRenderbuffer);
}
void Renderbuffer::setLabel(const std::string &label)
{
mLabel = label;
}
const std::string &Renderbuffer::getLabel() const
{
return mLabel;
}
Error Renderbuffer::setStorage(GLenum internalformat, size_t width, size_t height)
{
orphanImages();
......
......@@ -13,7 +13,6 @@
#include "angle_gl.h"
#include "common/angleutils.h"
#include "libANGLE/Debug.h"
#include "libANGLE/Error.h"
#include "libANGLE/FramebufferAttachment.h"
#include "libANGLE/Image.h"
......@@ -26,17 +25,12 @@ namespace gl
// FramebufferAttachment and Framebuffer for how they are applied to an FBO via an
// attachment point.
class Renderbuffer final : public egl::ImageSibling,
public gl::FramebufferAttachmentObject,
public LabeledObject
class Renderbuffer : public egl::ImageSibling, public gl::FramebufferAttachmentObject
{
public:
Renderbuffer(rx::RenderbufferImpl *impl, GLuint id);
virtual ~Renderbuffer();
void setLabel(const std::string &label) override;
const std::string &getLabel() const override;
Error setStorage(GLenum internalformat, size_t width, size_t height);
Error setStorageMultisample(size_t samples, GLenum internalformat, size_t width, size_t height);
Error setStorageEGLImageTarget(egl::Image *imageTarget);
......@@ -69,8 +63,6 @@ class Renderbuffer final : public egl::ImageSibling,
rx::RenderbufferImpl *mRenderbuffer;
std::string mLabel;
GLsizei mWidth;
GLsizei mHeight;
GLenum mInternalFormat;
......
......@@ -16,7 +16,7 @@ namespace gl
{
Sampler::Sampler(rx::ImplFactory *factory, GLuint id)
: RefCountObject(id), mImpl(factory->createSampler()), mLabel(), mSamplerState()
: RefCountObject(id), mImpl(factory->createSampler()), mSamplerState()
{
}
......@@ -25,16 +25,6 @@ Sampler::~Sampler()
SafeDelete(mImpl);
}
void Sampler::setLabel(const std::string &label)
{
mLabel = label;
}
const std::string &Sampler::getLabel() const
{
return mLabel;
}
void Sampler::setMinFilter(GLenum minFilter)
{
mSamplerState.minFilter = minFilter;
......
......@@ -11,7 +11,6 @@
#define LIBANGLE_SAMPLER_H_
#include "libANGLE/angletypes.h"
#include "libANGLE/Debug.h"
#include "libANGLE/RefCountObject.h"
namespace rx
......@@ -23,15 +22,12 @@ class SamplerImpl;
namespace gl
{
class Sampler final : public RefCountObject, public LabeledObject
class Sampler final : public RefCountObject
{
public:
Sampler(rx::ImplFactory *factory, GLuint id);
~Sampler() override;
void setLabel(const std::string &label) override;
const std::string &getLabel() const override;
void setMinFilter(GLenum minFilter);
GLenum getMinFilter() const;
......@@ -70,8 +66,6 @@ class Sampler final : public RefCountObject, public LabeledObject
private:
rx::SamplerImpl *mImpl;
std::string mLabel;
SamplerState mSamplerState;
};
......
......@@ -72,7 +72,7 @@ bool CompareShaderVar(const sh::ShaderVariable &x, const sh::ShaderVariable &y)
return gl::VariableSortOrder(x.type) < gl::VariableSortOrder(y.type);
}
Shader::Data::Data(GLenum shaderType) : mLabel(), mShaderType(shaderType), mShaderVersion(100)
Shader::Data::Data(GLenum shaderType) : mShaderType(shaderType), mShaderVersion(100)
{
}
......@@ -103,16 +103,6 @@ Shader::~Shader()
SafeDelete(mImplementation);
}
void Shader::setLabel(const std::string &label)
{
mData.mLabel = label;
}
const std::string &Shader::getLabel() const
{
return mData.mLabel;
}
GLuint Shader::getHandle() const
{
return mHandle;
......
......@@ -21,7 +21,6 @@
#include "common/angleutils.h"
#include "libANGLE/angletypes.h"
#include "libANGLE/Debug.h"
namespace rx
{
......@@ -37,7 +36,7 @@ struct Limitations;
class ResourceManager;
struct Data;
class Shader final : angle::NonCopyable, public LabeledObject
class Shader : angle::NonCopyable
{
public:
class Data final : angle::NonCopyable
......@@ -46,8 +45,6 @@ class Shader final : angle::NonCopyable, public LabeledObject
Data(GLenum shaderType);
~Data();
const std::string &getLabel() const { return mLabel; }
const std::string &getSource() const { return mSource; }
const std::string &getTranslatedSource() const { return mTranslatedSource; }
......@@ -69,8 +66,6 @@ class Shader final : angle::NonCopyable, public LabeledObject
private:
friend class Shader;
std::string mLabel;
GLenum mShaderType;
int mShaderVersion;
std::string mTranslatedSource;
......@@ -91,9 +86,6 @@ class Shader final : angle::NonCopyable, public LabeledObject
virtual ~Shader();
void setLabel(const std::string &label) override;
const std::string &getLabel() const override;
GLenum getType() const { return mType; }
GLuint getHandle() const;
......
......@@ -10,7 +10,6 @@
#include "libANGLE/Context.h"
#include "libANGLE/Caps.h"
#include "libANGLE/Debug.h"
#include "libANGLE/Framebuffer.h"
#include "libANGLE/FramebufferAttachment.h"
#include "libANGLE/Query.h"
......@@ -79,10 +78,7 @@ State::~State()
reset();
}
void State::initialize(const Caps &caps,
const Extensions &extensions,
GLuint clientVersion,
bool debug)
void State::initialize(const Caps &caps, GLuint clientVersion)
{
mMaxDrawBuffers = caps.maxDrawBuffers;
mMaxCombinedTextureImageUnits = caps.maxCombinedTextureImageUnits;
......@@ -189,9 +185,6 @@ void State::initialize(const Caps &caps,
mDrawFramebuffer = NULL;
mPrimitiveRestart = false;
mDebug.setOutputEnabled(debug);
mDebug.setMaxLoggedMessages(extensions.maxDebugLoggedMessages);
}
void State::reset()
......@@ -588,12 +581,6 @@ void State::setEnableFeature(GLenum feature, bool enabled)
case GL_DITHER: setDither(enabled); break;
case GL_PRIMITIVE_RESTART_FIXED_INDEX: setPrimitiveRestart(enabled); break;
case GL_RASTERIZER_DISCARD: setRasterizerDiscard(enabled); break;
case GL_DEBUG_OUTPUT_SYNCHRONOUS:
mDebug.setOutputSynchronous(enabled);
break;
case GL_DEBUG_OUTPUT:
mDebug.setOutputEnabled(enabled);
break;
default: UNREACHABLE();
}
}
......@@ -613,10 +600,6 @@ bool State::getEnableFeature(GLenum feature)
case GL_DITHER: return isDitherEnabled();
case GL_PRIMITIVE_RESTART_FIXED_INDEX: return isPrimitiveRestartEnabled();
case GL_RASTERIZER_DISCARD: return isRasterizerDiscardEnabled();
case GL_DEBUG_OUTPUT_SYNCHRONOUS:
return mDebug.isOutputSynchronous();
case GL_DEBUG_OUTPUT:
return mDebug.isOutputEnabled();
default: UNREACHABLE(); return false;
}
}
......@@ -1288,16 +1271,6 @@ PixelUnpackState &State::getUnpackState()
return mUnpack;
}
const Debug &State::getDebug() const
{
return mDebug;
}
Debug &State::getDebug()
{
return mDebug;
}
void State::getBooleanv(GLenum pname, GLboolean *params)
{
switch (pname)
......@@ -1327,12 +1300,6 @@ void State::getBooleanv(GLenum pname, GLboolean *params)
case GL_RASTERIZER_DISCARD:
*params = isRasterizerDiscardEnabled() ? GL_TRUE : GL_FALSE;
break;
case GL_DEBUG_OUTPUT_SYNCHRONOUS:
*params = mDebug.isOutputSynchronous() ? GL_TRUE : GL_FALSE;
break;
case GL_DEBUG_OUTPUT:
*params = mDebug.isOutputEnabled() ? GL_TRUE : GL_FALSE;
break;
default:
UNREACHABLE();
break;
......@@ -1590,31 +1557,6 @@ void State::getIntegerv(const gl::Data &data, GLenum pname, GLint *params)
case GL_PIXEL_UNPACK_BUFFER_BINDING:
*params = mUnpack.pixelBuffer.id();
break;
case GL_DEBUG_LOGGED_MESSAGES:
*params = static_cast<GLint>(mDebug.getMessageCount());
break;
case GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH:
*params = static_cast<GLint>(mDebug.getNextMessageLength());
break;
case GL_DEBUG_GROUP_STACK_DEPTH:
*params = static_cast<GLint>(mDebug.getGroupStackDepth());
break;
default:
UNREACHABLE();
break;
}
}
void State::getPointerv(GLenum pname, void **params) const
{
switch (pname)
{
case GL_DEBUG_CALLBACK_FUNCTION:
*params = reinterpret_cast<void *>(mDebug.getCallback());
break;
case GL_DEBUG_CALLBACK_USER_PARAM:
*params = const_cast<void *>(mDebug.getUserParam());
break;
default:
UNREACHABLE();
break;
......
......@@ -10,10 +10,8 @@
#define LIBANGLE_STATE_H_
#include <bitset>
#include <memory>
#include "common/angleutils.h"
#include "libANGLE/Debug.h"
#include "libANGLE/Program.h"
#include "libANGLE/RefCountObject.h"
#include "libANGLE/Renderbuffer.h"
......@@ -39,10 +37,7 @@ class State : angle::NonCopyable
State();
~State();
void initialize(const Caps &caps,
const Extensions &extensions,
GLuint clientVersion,
bool debug);
void initialize(const Caps& caps, GLuint clientVersion);
void reset();
// State chunk getters
......@@ -263,15 +258,10 @@ class State : angle::NonCopyable
const PixelUnpackState &getUnpackState() const;
PixelUnpackState &getUnpackState();
// Debug state
const Debug &getDebug() const;
Debug &getDebug();
// State query functions
void getBooleanv(GLenum pname, GLboolean *params);
void getFloatv(GLenum pname, GLfloat *params);
void getIntegerv(const gl::Data &data, GLenum pname, GLint *params);
void getPointerv(GLenum pname, void **params) const;
bool getIndexedIntegerv(GLenum target, GLuint index, GLint *data);
bool getIndexedInteger64v(GLenum target, GLuint index, GLint64 *data);
......@@ -422,8 +412,6 @@ class State : angle::NonCopyable
bool mPrimitiveRestart;
Debug mDebug;
DirtyBits mDirtyBits;
DirtyBits mUnpackStateBitMask;
DirtyBits mPackStateBitMask;
......
......@@ -50,7 +50,6 @@ static size_t GetImageDescIndex(GLenum target, size_t level)
Texture::Texture(rx::TextureImpl *impl, GLuint id, GLenum target)
: egl::ImageSibling(id),
mTexture(impl),
mLabel(),
mTextureState(),
mTarget(target),
mImageDescs(IMPLEMENTATION_MAX_TEXTURE_LEVELS * (target == GL_TEXTURE_CUBE_MAP ? 6 : 1)),
......@@ -69,16 +68,6 @@ Texture::~Texture()
SafeDelete(mTexture);
}
void Texture::setLabel(const std::string &label)
{
mLabel = label;
}
const std::string &Texture::getLabel() const
{
return mLabel;
}
GLenum Texture::getTarget() const
{
return mTarget;
......
......@@ -15,7 +15,6 @@
#include "angle_gl.h"
#include "common/debug.h"
#include "libANGLE/Caps.h"
#include "libANGLE/Debug.h"
#include "libANGLE/Constants.h"
#include "libANGLE/Error.h"
#include "libANGLE/FramebufferAttachment.h"
......@@ -34,19 +33,14 @@ class Context;
class Framebuffer;
struct Data;
bool IsMipmapFiltered(const SamplerState &samplerState);
bool IsMipmapFiltered(const gl::SamplerState &samplerState);
class Texture final : public egl::ImageSibling,
public FramebufferAttachmentObject,
public LabeledObject
class Texture final : public egl::ImageSibling, public gl::FramebufferAttachmentObject
{
public:
Texture(rx::TextureImpl *impl, GLuint id, GLenum target);
~Texture() override;
void setLabel(const std::string &label) override;
const std::string &getLabel() const override;
GLenum getTarget() const;
void setSwizzleRed(GLenum swizzleRed);
......@@ -190,8 +184,6 @@ class Texture final : public egl::ImageSibling,
rx::TextureImpl *mTexture;
std::string mLabel;
TextureState mTextureState;
GLenum mTarget;
......
......@@ -13,10 +13,9 @@
namespace gl
{
TransformFeedback::TransformFeedback(rx::TransformFeedbackImpl *impl, GLuint id, const Caps &caps)
TransformFeedback::TransformFeedback(rx::TransformFeedbackImpl* impl, GLuint id, const Caps &caps)
: RefCountObject(id),
mImplementation(impl),
mLabel(),
mActive(false),
mPrimitiveMode(GL_NONE),
mPaused(false),
......@@ -37,16 +36,6 @@ TransformFeedback::~TransformFeedback()
SafeDelete(mImplementation);
}
void TransformFeedback::setLabel(const std::string &label)
{
mLabel = label;
}
const std::string &TransformFeedback::getLabel() const
{
return mLabel;
}
void TransformFeedback::begin(GLenum primitiveMode)
{
mActive = true;
......
......@@ -10,7 +10,6 @@
#include "libANGLE/RefCountObject.h"
#include "common/angleutils.h"
#include "libANGLE/Debug.h"
#include "angle_gl.h"
......@@ -24,15 +23,12 @@ namespace gl
class Buffer;
struct Caps;
class TransformFeedback final : public RefCountObject, public LabeledObject
class TransformFeedback : public RefCountObject
{
public:
TransformFeedback(rx::TransformFeedbackImpl* impl, GLuint id, const Caps &caps);
virtual ~TransformFeedback();
void setLabel(const std::string &label) override;
const std::string &getLabel() const override;
void begin(GLenum primitiveMode);
void end();
void pause();
......@@ -57,8 +53,6 @@ class TransformFeedback final : public RefCountObject, public LabeledObject
private:
rx::TransformFeedbackImpl* mImplementation;
std::string mLabel;
bool mActive;
GLenum mPrimitiveMode;
bool mPaused;
......
......@@ -15,7 +15,8 @@ namespace gl
{
VertexArray::Data::Data(size_t maxAttribs)
: mLabel(), mVertexAttributes(maxAttribs), mMaxEnabledAttribute(0)
: mVertexAttributes(maxAttribs),
mMaxEnabledAttribute(0)
{
}
......@@ -45,16 +46,6 @@ GLuint VertexArray::id() const
return mId;
}
void VertexArray::setLabel(const std::string &label)
{
mData.mLabel = label;
}
const std::string &VertexArray::getLabel() const
{
return mData.mLabel;
}
void VertexArray::detachBuffer(GLuint bufferName)
{
for (size_t attribute = 0; attribute < getMaxAttribs(); attribute++)
......
......@@ -15,7 +15,6 @@
#include "libANGLE/RefCountObject.h"
#include "libANGLE/Constants.h"
#include "libANGLE/Debug.h"
#include "libANGLE/State.h"
#include "libANGLE/VertexAttribute.h"
......@@ -31,7 +30,7 @@ namespace gl
{
class Buffer;
class VertexArray final : public LabeledObject
class VertexArray
{
public:
VertexArray(rx::ImplFactory *factory, GLuint id, size_t maxAttribs);
......@@ -39,9 +38,6 @@ class VertexArray final : public LabeledObject
GLuint id() const;
void setLabel(const std::string &label) override;
const std::string &getLabel() const override;
const VertexAttribute &getVertexAttribute(size_t attributeIndex) const;
void detachBuffer(GLuint bufferName);
......@@ -67,8 +63,6 @@ class VertexArray final : public LabeledObject
explicit Data(size_t maxAttribs);
~Data();
const std::string &getLabel() const { return mLabel; }
const BindingPointer<Buffer> &getElementArrayBuffer() const { return mElementArrayBuffer; }
size_t getMaxAttribs() const { return mVertexAttributes.size(); }
size_t getMaxEnabledAttribute() const { return mMaxEnabledAttribute; }
......@@ -80,7 +74,6 @@ class VertexArray final : public LabeledObject
private:
friend class VertexArray;
std::string mLabel;
std::vector<VertexAttribute> mVertexAttributes;
BindingPointer<Buffer> mElementArrayBuffer;
size_t mMaxEnabledAttribute;
......
......@@ -235,10 +235,8 @@ egl::Error DisplayD3D::createContext(const egl::Config *config, const gl::Contex
EGLint clientVersion = attribs.get(EGL_CONTEXT_CLIENT_VERSION, 1);
bool notifyResets = (attribs.get(EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT, EGL_NO_RESET_NOTIFICATION_EXT) == EGL_LOSE_CONTEXT_ON_RESET_EXT);
bool robustAccess = (attribs.get(EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT, EGL_FALSE) == EGL_TRUE);
bool debug = (attribs.get(EGL_CONTEXT_OPENGL_DEBUG, EGL_FALSE) == EGL_TRUE);
*outContext = new gl::Context(config, clientVersion, shareContext, mRenderer, notifyResets,
robustAccess, debug);
*outContext = new gl::Context(config, clientVersion, shareContext, mRenderer, notifyResets, robustAccess);
return egl::Error(EGL_SUCCESS);
}
......
......@@ -62,10 +62,8 @@ egl::Error DisplayGL::createContext(const egl::Config *config, const gl::Context
EGLint clientVersion = attribs.get(EGL_CONTEXT_CLIENT_VERSION, 1);
bool notifyResets = (attribs.get(EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT, EGL_NO_RESET_NOTIFICATION_EXT) == EGL_LOSE_CONTEXT_ON_RESET_EXT);
bool robustAccess = (attribs.get(EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT, EGL_FALSE) == EGL_TRUE);
bool debug = (attribs.get(EGL_CONTEXT_OPENGL_DEBUG, EGL_FALSE) == EGL_TRUE);
*outContext = new gl::Context(config, clientVersion, shareContext, mRenderer, notifyResets,
robustAccess, debug);
*outContext = new gl::Context(config, clientVersion, shareContext, mRenderer, notifyResets, robustAccess);
return egl::Error(EGL_SUCCESS);
}
......
......@@ -210,9 +210,6 @@ Error ValidateCreateContext(Display *display, Config *configuration, gl::Context
contextFlags = value;
break;
case EGL_CONTEXT_OPENGL_DEBUG:
break;
case EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR:
// Only valid for OpenGL (non-ES) contexts
return Error(EGL_BAD_ATTRIBUTE);
......
......@@ -109,15 +109,9 @@ bool ValidCap(const Context *context, GLenum cap)
case GL_BLEND:
case GL_DITHER:
return true;
case GL_PRIMITIVE_RESTART_FIXED_INDEX:
case GL_RASTERIZER_DISCARD:
return (context->getClientVersion() >= 3);
case GL_DEBUG_OUTPUT_SYNCHRONOUS:
case GL_DEBUG_OUTPUT:
return context->getExtensions().debug;
default:
return false;
}
......
......@@ -96,7 +96,7 @@ TEST(ValidationESTest, DrawElementsWithMaxIndexGivesError)
caps.maxElementIndex = 100;
caps.maxDrawBuffers = 1;
caps.maxColorAttachments = 1;
state.initialize(caps, extensions, 3, false);
state.initialize(caps, 3);
MockTextureImpl *textureImpl = new MockTextureImpl();
EXPECT_CALL(*textureImpl, setStorage(_, _, _, _)).WillOnce(Return(Error(GL_NO_ERROR)));
......
......@@ -68,8 +68,6 @@
'libANGLE/Context.h',
'libANGLE/Data.cpp',
'libANGLE/Data.h',
'libANGLE/Debug.cpp',
'libANGLE/Debug.h',
'libANGLE/Device.cpp',
'libANGLE/Device.h',
'libANGLE/Display.cpp',
......
......@@ -1298,9 +1298,7 @@ void GL_APIENTRY DebugMessageControlKHR(GLenum source,
return;
}
std::vector<GLuint> idVector(ids, ids + count);
context->getState().getDebug().setMessageControl(
source, type, severity, std::move(idVector), (enabled != GL_FALSE));
UNIMPLEMENTED();
}
}
......@@ -1324,8 +1322,7 @@ void GL_APIENTRY DebugMessageInsertKHR(GLenum source,
return;
}
std::string msg(buf, (length > 0) ? static_cast<size_t>(length) : strlen(buf));
context->getState().getDebug().insertMessage(source, type, id, severity, std::move(msg));
UNIMPLEMENTED();
}
}
......@@ -1342,7 +1339,7 @@ void GL_APIENTRY DebugMessageCallbackKHR(GLDEBUGPROCKHR callback, const void *us
return;
}
context->getState().getDebug().setCallback(callback, userParam);
UNIMPLEMENTED();
}
}
......@@ -1370,8 +1367,7 @@ GLuint GL_APIENTRY GetDebugMessageLogKHR(GLuint count,
return 0;
}
return static_cast<GLuint>(context->getState().getDebug().getMessages(
count, bufSize, sources, types, ids, severities, lengths, messageLog));
UNIMPLEMENTED();
}
return 0;
......@@ -1392,8 +1388,7 @@ void GL_APIENTRY PushDebugGroupKHR(GLenum source, GLuint id, GLsizei length, con
return;
}
std::string msg(message, (length > 0) ? static_cast<size_t>(length) : strlen(message));
context->getState().getDebug().pushGroup(source, id, std::move(msg));
UNIMPLEMENTED();
}
}
......@@ -1409,7 +1404,7 @@ void GL_APIENTRY PopDebugGroupKHR(void)
return;
}
context->getState().getDebug().popGroup();
UNIMPLEMENTED();
}
}
......@@ -1428,11 +1423,7 @@ void GL_APIENTRY ObjectLabelKHR(GLenum identifier, GLuint name, GLsizei length,
return;
}
LabeledObject *object = context->getLabeledObject(identifier, name);
ASSERT(object != nullptr);
std::string lbl(label, (length > 0) ? static_cast<size_t>(length) : strlen(label));
object->setLabel(lbl);
UNIMPLEMENTED();
}
}
......@@ -1452,14 +1443,7 @@ GetObjectLabelKHR(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *leng
return;
}
LabeledObject *object = context->getLabeledObject(identifier, name);
ASSERT(object != nullptr);
const std::string &objectLabel = object->getLabel();
size_t writeLength = std::min(static_cast<size_t>(bufSize) - 1, objectLabel.length());
std::copy(objectLabel.begin(), objectLabel.begin() + writeLength, label);
label[writeLength] = '\0';
*length = static_cast<GLsizei>(writeLength);
UNIMPLEMENTED();
}
}
......@@ -1476,11 +1460,7 @@ void GL_APIENTRY ObjectPtrLabelKHR(const void *ptr, GLsizei length, const GLchar
return;
}
LabeledObject *object = context->getLabeledObjectFromPtr(ptr);
ASSERT(object != nullptr);
std::string lbl(label, (length > 0) ? static_cast<size_t>(length) : strlen(label));
object->setLabel(lbl);
UNIMPLEMENTED();
}
}
......@@ -1502,14 +1482,7 @@ void GL_APIENTRY GetObjectPtrLabelKHR(const void *ptr,
return;
}
LabeledObject *object = context->getLabeledObjectFromPtr(ptr);
ASSERT(object != nullptr);
const std::string &objectLabel = object->getLabel();
size_t writeLength = std::min(static_cast<size_t>(bufSize) - 1, objectLabel.length());
std::copy(objectLabel.begin(), objectLabel.begin() + writeLength, label);
label[writeLength] = '\0';
*length = static_cast<GLsizei>(writeLength);
UNIMPLEMENTED();
}
}
......@@ -1525,7 +1498,7 @@ void GL_APIENTRY GetPointervKHR(GLenum pname, void **params)
return;
}
context->getPointerv(pname, params);
UNIMPLEMENTED();
}
}
}
......@@ -23,7 +23,6 @@
'<(angle_path)/src/tests/gl_tests/CopyTexImageTest.cpp',
'<(angle_path)/src/tests/gl_tests/CubeMapTextureTest.cpp',
'<(angle_path)/src/tests/gl_tests/DebugMarkerTest.cpp',
'<(angle_path)/src/tests/gl_tests/DebugTest.cpp',
'<(angle_path)/src/tests/gl_tests/DepthStencilFormatsTest.cpp',
'<(angle_path)/src/tests/gl_tests/DiscardFramebufferEXTTest.cpp',
'<(angle_path)/src/tests/gl_tests/DrawBuffersTest.cpp',
......
......@@ -223,11 +223,6 @@ void ANGLETest::setMultisampleEnabled(bool enabled)
mEGLWindow->setMultisample(enabled);
}
void ANGLETest::setDebugEnabled(bool enabled)
{
mEGLWindow->setDebugEnabled(enabled);
}
int ANGLETest::getClientVersion() const
{
return mEGLWindow->getClientMajorVersion();
......
......@@ -96,7 +96,6 @@ class ANGLETest : public ::testing::TestWithParam<angle::PlatformParameters>
void setConfigDepthBits(int bits);
void setConfigStencilBits(int bits);
void setMultisampleEnabled(bool enabled);
void setDebugEnabled(bool enabled);
int getClientVersion() const;
......
......@@ -85,7 +85,6 @@ EGLWindow::EGLWindow(EGLint glesMajorVersion,
mDepthBits(-1),
mStencilBits(-1),
mMultisample(false),
mDebug(false),
mSwapInterval(-1)
{
}
......@@ -225,9 +224,6 @@ bool EGLWindow::initializeGL(OSWindow *osWindow)
contextAttributes.push_back(EGL_CONTEXT_MINOR_VERSION_KHR);
contextAttributes.push_back(mClientMinorVersion);
contextAttributes.push_back(EGL_CONTEXT_OPENGL_DEBUG);
contextAttributes.push_back(mDebug ? EGL_TRUE : EGL_FALSE);
}
contextAttributes.push_back(EGL_NONE);
......
......@@ -59,7 +59,6 @@ class EGLWindow : angle::NonCopyable
void setConfigDepthBits(int bits) { mDepthBits = bits; }
void setConfigStencilBits(int bits) { mStencilBits = bits; }
void setMultisample(bool multisample) { mMultisample = multisample; }
void setDebugEnabled(bool debug) { mDebug = debug; }
void setSwapInterval(EGLint swapInterval) { mSwapInterval = swapInterval; }
static EGLBoolean FindEGLConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *config);
......@@ -80,7 +79,6 @@ class EGLWindow : angle::NonCopyable
int getConfigDepthBits() const { return mDepthBits; }
int getConfigStencilBits() const { return mStencilBits; }
bool isMultisample() const { return mMultisample; }
bool isDebugEnabled() const { return mDebug; }
EGLint getSwapInterval() const { return mSwapInterval; }
bool initializeGL(OSWindow *osWindow);
......@@ -103,7 +101,6 @@ class EGLWindow : angle::NonCopyable
int mDepthBits;
int mStencilBits;
bool mMultisample;
bool mDebug;
EGLint mSwapInterval;
};
......
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