зеркало из https://github.com/AvaloniaUI/angle.git
Return angle::Result from more label functions.
This is necessary for the new Vulkan implementation. Bug: angleproject:4029 Change-Id: I07ef54145252ff102c74179361436587bb330fc7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2055553 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Родитель
3a3e7d4dd2
Коммит
9f4ab98d12
|
@ -2444,7 +2444,7 @@ void Context::finish()
|
|||
void Context::insertEventMarker(GLsizei length, const char *marker)
|
||||
{
|
||||
ASSERT(mImplementation);
|
||||
mImplementation->insertEventMarker(length, marker);
|
||||
ANGLE_CONTEXT_TRY(mImplementation->insertEventMarker(length, marker));
|
||||
}
|
||||
|
||||
void Context::pushGroupMarker(GLsizei length, const char *marker)
|
||||
|
@ -2455,18 +2455,18 @@ void Context::pushGroupMarker(GLsizei length, const char *marker)
|
|||
{
|
||||
// From the EXT_debug_marker spec,
|
||||
// "If <marker> is null then an empty string is pushed on the stack."
|
||||
mImplementation->pushGroupMarker(length, "");
|
||||
ANGLE_CONTEXT_TRY(mImplementation->pushGroupMarker(length, ""));
|
||||
}
|
||||
else
|
||||
{
|
||||
mImplementation->pushGroupMarker(length, marker);
|
||||
ANGLE_CONTEXT_TRY(mImplementation->pushGroupMarker(length, marker));
|
||||
}
|
||||
}
|
||||
|
||||
void Context::popGroupMarker()
|
||||
{
|
||||
ASSERT(mImplementation);
|
||||
mImplementation->popGroupMarker();
|
||||
ANGLE_CONTEXT_TRY(mImplementation->popGroupMarker());
|
||||
}
|
||||
|
||||
void Context::bindUniformLocation(ShaderProgramID program, GLint location, const GLchar *name)
|
||||
|
|
|
@ -169,9 +169,9 @@ class ContextImpl : public GLImplFactory
|
|||
virtual std::string getRendererDescription() const = 0;
|
||||
|
||||
// EXT_debug_marker
|
||||
virtual void insertEventMarker(GLsizei length, const char *marker) = 0;
|
||||
virtual void pushGroupMarker(GLsizei length, const char *marker) = 0;
|
||||
virtual void popGroupMarker() = 0;
|
||||
virtual angle::Result insertEventMarker(GLsizei length, const char *marker) = 0;
|
||||
virtual angle::Result pushGroupMarker(GLsizei length, const char *marker) = 0;
|
||||
virtual angle::Result popGroupMarker() = 0;
|
||||
|
||||
// KHR_debug
|
||||
virtual angle::Result pushDebugGroup(const gl::Context *context,
|
||||
|
|
|
@ -490,18 +490,20 @@ std::string Context11::getRendererDescription() const
|
|||
return mRenderer->getRendererDescription();
|
||||
}
|
||||
|
||||
void Context11::insertEventMarker(GLsizei length, const char *marker)
|
||||
angle::Result Context11::insertEventMarker(GLsizei length, const char *marker)
|
||||
{
|
||||
mRenderer->getAnnotator()->setMarker(marker);
|
||||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
void Context11::pushGroupMarker(GLsizei length, const char *marker)
|
||||
angle::Result Context11::pushGroupMarker(GLsizei length, const char *marker)
|
||||
{
|
||||
mRenderer->getAnnotator()->beginEvent(marker, marker);
|
||||
mMarkerStack.push(std::string(marker));
|
||||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
void Context11::popGroupMarker()
|
||||
angle::Result Context11::popGroupMarker()
|
||||
{
|
||||
const char *marker = nullptr;
|
||||
if (!mMarkerStack.empty())
|
||||
|
@ -510,6 +512,7 @@ void Context11::popGroupMarker()
|
|||
mMarkerStack.pop();
|
||||
mRenderer->getAnnotator()->endEvent(marker);
|
||||
}
|
||||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
angle::Result Context11::pushDebugGroup(const gl::Context *context,
|
||||
|
@ -518,15 +521,13 @@ angle::Result Context11::pushDebugGroup(const gl::Context *context,
|
|||
const std::string &message)
|
||||
{
|
||||
// Fall through to the EXT_debug_marker functions
|
||||
pushGroupMarker(static_cast<GLsizei>(message.size()), message.c_str());
|
||||
return angle::Result::Continue;
|
||||
return pushGroupMarker(static_cast<GLsizei>(message.size()), message.c_str());
|
||||
}
|
||||
|
||||
angle::Result Context11::popDebugGroup(const gl::Context *context)
|
||||
{
|
||||
// Fall through to the EXT_debug_marker functions
|
||||
popGroupMarker();
|
||||
return angle::Result::Continue;
|
||||
return popGroupMarker();
|
||||
}
|
||||
|
||||
angle::Result Context11::syncState(const gl::Context *context,
|
||||
|
|
|
@ -158,9 +158,9 @@ class Context11 : public ContextD3D, public MultisampleTextureInitializer
|
|||
std::string getRendererDescription() const override;
|
||||
|
||||
// EXT_debug_marker
|
||||
void insertEventMarker(GLsizei length, const char *marker) override;
|
||||
void pushGroupMarker(GLsizei length, const char *marker) override;
|
||||
void popGroupMarker() override;
|
||||
angle::Result insertEventMarker(GLsizei length, const char *marker) override;
|
||||
angle::Result pushGroupMarker(GLsizei length, const char *marker) override;
|
||||
angle::Result popGroupMarker() override;
|
||||
|
||||
// KHR_debug
|
||||
angle::Result pushDebugGroup(const gl::Context *context,
|
||||
|
|
|
@ -303,18 +303,20 @@ std::string Context9::getRendererDescription() const
|
|||
return mRenderer->getRendererDescription();
|
||||
}
|
||||
|
||||
void Context9::insertEventMarker(GLsizei length, const char *marker)
|
||||
angle::Result Context9::insertEventMarker(GLsizei length, const char *marker)
|
||||
{
|
||||
mRenderer->getAnnotator()->setMarker(marker);
|
||||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
void Context9::pushGroupMarker(GLsizei length, const char *marker)
|
||||
angle::Result Context9::pushGroupMarker(GLsizei length, const char *marker)
|
||||
{
|
||||
mRenderer->getAnnotator()->beginEvent(marker, marker);
|
||||
mMarkerStack.push(std::string(marker));
|
||||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
void Context9::popGroupMarker()
|
||||
angle::Result Context9::popGroupMarker()
|
||||
{
|
||||
const char *marker = nullptr;
|
||||
if (!mMarkerStack.empty())
|
||||
|
@ -323,6 +325,7 @@ void Context9::popGroupMarker()
|
|||
mMarkerStack.pop();
|
||||
mRenderer->getAnnotator()->endEvent(marker);
|
||||
}
|
||||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
angle::Result Context9::pushDebugGroup(const gl::Context *context,
|
||||
|
@ -331,15 +334,13 @@ angle::Result Context9::pushDebugGroup(const gl::Context *context,
|
|||
const std::string &message)
|
||||
{
|
||||
// Fall through to the EXT_debug_marker functions
|
||||
pushGroupMarker(static_cast<GLsizei>(message.size()), message.c_str());
|
||||
return angle::Result::Continue;
|
||||
return pushGroupMarker(static_cast<GLsizei>(message.size()), message.c_str());
|
||||
}
|
||||
|
||||
angle::Result Context9::popDebugGroup(const gl::Context *context)
|
||||
{
|
||||
// Fall through to the EXT_debug_marker functions
|
||||
popGroupMarker();
|
||||
return angle::Result::Continue;
|
||||
return popGroupMarker();
|
||||
}
|
||||
|
||||
angle::Result Context9::syncState(const gl::Context *context,
|
||||
|
|
|
@ -157,9 +157,9 @@ class Context9 : public ContextD3D
|
|||
std::string getRendererDescription() const override;
|
||||
|
||||
// EXT_debug_marker
|
||||
void insertEventMarker(GLsizei length, const char *marker) override;
|
||||
void pushGroupMarker(GLsizei length, const char *marker) override;
|
||||
void popGroupMarker() override;
|
||||
angle::Result insertEventMarker(GLsizei length, const char *marker) override;
|
||||
angle::Result pushGroupMarker(GLsizei length, const char *marker) override;
|
||||
angle::Result popGroupMarker() override;
|
||||
|
||||
// KHR_debug
|
||||
angle::Result pushDebugGroup(const gl::Context *context,
|
||||
|
|
|
@ -774,19 +774,22 @@ std::string ContextGL::getRendererDescription() const
|
|||
return mRenderer->getRendererDescription();
|
||||
}
|
||||
|
||||
void ContextGL::insertEventMarker(GLsizei length, const char *marker)
|
||||
angle::Result ContextGL::insertEventMarker(GLsizei length, const char *marker)
|
||||
{
|
||||
mRenderer->insertEventMarker(length, marker);
|
||||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
void ContextGL::pushGroupMarker(GLsizei length, const char *marker)
|
||||
angle::Result ContextGL::pushGroupMarker(GLsizei length, const char *marker)
|
||||
{
|
||||
mRenderer->pushGroupMarker(length, marker);
|
||||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
void ContextGL::popGroupMarker()
|
||||
angle::Result ContextGL::popGroupMarker()
|
||||
{
|
||||
mRenderer->popGroupMarker();
|
||||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
angle::Result ContextGL::pushDebugGroup(const gl::Context *context,
|
||||
|
|
|
@ -216,9 +216,9 @@ class ContextGL : public ContextImpl
|
|||
std::string getRendererDescription() const override;
|
||||
|
||||
// EXT_debug_marker
|
||||
void insertEventMarker(GLsizei length, const char *marker) override;
|
||||
void pushGroupMarker(GLsizei length, const char *marker) override;
|
||||
void popGroupMarker() override;
|
||||
angle::Result insertEventMarker(GLsizei length, const char *marker) override;
|
||||
angle::Result pushGroupMarker(GLsizei length, const char *marker) override;
|
||||
angle::Result popGroupMarker() override;
|
||||
|
||||
// KHR_debug
|
||||
angle::Result pushDebugGroup(const gl::Context *context,
|
||||
|
|
|
@ -122,9 +122,9 @@ class ContextMtl : public ContextImpl, public mtl::Context
|
|||
std::string getRendererDescription() const override;
|
||||
|
||||
// EXT_debug_marker
|
||||
void insertEventMarker(GLsizei length, const char *marker) override;
|
||||
void pushGroupMarker(GLsizei length, const char *marker) override;
|
||||
void popGroupMarker() override;
|
||||
angle::Result insertEventMarker(GLsizei length, const char *marker) override;
|
||||
angle::Result pushGroupMarker(GLsizei length, const char *marker) override;
|
||||
angle::Result popGroupMarker() override;
|
||||
|
||||
// KHR_debug
|
||||
angle::Result pushDebugGroup(const gl::Context *context,
|
||||
|
|
|
@ -483,11 +483,19 @@ std::string ContextMtl::getRendererDescription() const
|
|||
}
|
||||
|
||||
// EXT_debug_marker
|
||||
void ContextMtl::insertEventMarker(GLsizei length, const char *marker) {}
|
||||
void ContextMtl::pushGroupMarker(GLsizei length, const char *marker) {}
|
||||
void ContextMtl::popGroupMarker()
|
||||
angle::Result ContextMtl::insertEventMarker(GLsizei length, const char *marker)
|
||||
{
|
||||
// TODO(hqle
|
||||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
angle::Result ContextMtl::pushGroupMarker(GLsizei length, const char *marker)
|
||||
{
|
||||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
angle::Result ContextMtl::popGroupMarker()
|
||||
{
|
||||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
// KHR_debug
|
||||
|
|
|
@ -318,11 +318,20 @@ std::string ContextNULL::getRendererDescription() const
|
|||
return "NULL";
|
||||
}
|
||||
|
||||
void ContextNULL::insertEventMarker(GLsizei length, const char *marker) {}
|
||||
angle::Result ContextNULL::insertEventMarker(GLsizei length, const char *marker)
|
||||
{
|
||||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
void ContextNULL::pushGroupMarker(GLsizei length, const char *marker) {}
|
||||
angle::Result ContextNULL::pushGroupMarker(GLsizei length, const char *marker)
|
||||
{
|
||||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
void ContextNULL::popGroupMarker() {}
|
||||
angle::Result ContextNULL::popGroupMarker()
|
||||
{
|
||||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
angle::Result ContextNULL::pushDebugGroup(const gl::Context *context,
|
||||
GLenum source,
|
||||
|
|
|
@ -170,9 +170,9 @@ class ContextNULL : public ContextImpl
|
|||
std::string getRendererDescription() const override;
|
||||
|
||||
// EXT_debug_marker
|
||||
void insertEventMarker(GLsizei length, const char *marker) override;
|
||||
void pushGroupMarker(GLsizei length, const char *marker) override;
|
||||
void popGroupMarker() override;
|
||||
angle::Result insertEventMarker(GLsizei length, const char *marker) override;
|
||||
angle::Result pushGroupMarker(GLsizei length, const char *marker) override;
|
||||
angle::Result popGroupMarker() override;
|
||||
|
||||
// KHR_debug
|
||||
angle::Result pushDebugGroup(const gl::Context *context,
|
||||
|
|
|
@ -2303,7 +2303,7 @@ std::string ContextVk::getRendererDescription() const
|
|||
return mRenderer->getRendererDescription();
|
||||
}
|
||||
|
||||
void ContextVk::insertEventMarker(GLsizei length, const char *marker)
|
||||
angle::Result ContextVk::insertEventMarker(GLsizei length, const char *marker)
|
||||
{
|
||||
if (commandGraphEnabled())
|
||||
{
|
||||
|
@ -2315,9 +2315,11 @@ void ContextVk::insertEventMarker(GLsizei length, const char *marker)
|
|||
// TODO(jmadill): http://anglebug.com/4029
|
||||
UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
void ContextVk::pushGroupMarker(GLsizei length, const char *marker)
|
||||
angle::Result ContextVk::pushGroupMarker(GLsizei length, const char *marker)
|
||||
{
|
||||
if (commandGraphEnabled())
|
||||
{
|
||||
|
@ -2329,9 +2331,11 @@ void ContextVk::pushGroupMarker(GLsizei length, const char *marker)
|
|||
// TODO(jmadill): http://anglebug.com/4029
|
||||
UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
void ContextVk::popGroupMarker()
|
||||
angle::Result ContextVk::popGroupMarker()
|
||||
{
|
||||
if (commandGraphEnabled())
|
||||
{
|
||||
|
@ -2342,6 +2346,8 @@ void ContextVk::popGroupMarker()
|
|||
// TODO(jmadill): http://anglebug.com/4029
|
||||
UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
angle::Result ContextVk::pushDebugGroup(const gl::Context *context,
|
||||
|
|
|
@ -329,9 +329,9 @@ class ContextVk : public ContextImpl, public vk::Context, public vk::RenderPassO
|
|||
std::string getRendererDescription() const override;
|
||||
|
||||
// EXT_debug_marker
|
||||
void insertEventMarker(GLsizei length, const char *marker) override;
|
||||
void pushGroupMarker(GLsizei length, const char *marker) override;
|
||||
void popGroupMarker() override;
|
||||
angle::Result insertEventMarker(GLsizei length, const char *marker) override;
|
||||
angle::Result pushGroupMarker(GLsizei length, const char *marker) override;
|
||||
angle::Result popGroupMarker() override;
|
||||
|
||||
// KHR_debug
|
||||
angle::Result pushDebugGroup(const gl::Context *context,
|
||||
|
|
Загрузка…
Ссылка в новой задаче