From 0a7aebadfbb3534284546aa3ca8612314c08f136 Mon Sep 17 00:00:00 2001 From: Miguel Costa Date: Tue, 26 Jun 2018 16:56:45 +0200 Subject: Update ANGLE to chromium/3280 Change-Id: I0802c0d7486f772d361f87a544d6c5af937f4ca1 Reviewed-by: Friedemann Kleint --- src/3rdparty/angle/src/libANGLE/Fence.cpp | 48 ++++++++++++++++++------------- 1 file changed, 28 insertions(+), 20 deletions(-) (limited to 'src/3rdparty/angle/src/libANGLE/Fence.cpp') diff --git a/src/3rdparty/angle/src/libANGLE/Fence.cpp b/src/3rdparty/angle/src/libANGLE/Fence.cpp index ff32f4bbe9..9c4d381673 100644 --- a/src/3rdparty/angle/src/libANGLE/Fence.cpp +++ b/src/3rdparty/angle/src/libANGLE/Fence.cpp @@ -4,18 +4,17 @@ // found in the LICENSE file. // -// Fence.cpp: Implements the gl::FenceNV and gl::FenceSync classes, which support the GL_NV_fence +// Fence.cpp: Implements the gl::FenceNV and gl::Sync classes, which support the GL_NV_fence // extension and GLES3 sync objects. #include "libANGLE/Fence.h" -#include "libANGLE/renderer/FenceNVImpl.h" -#include "libANGLE/renderer/FenceSyncImpl.h" -#include "libANGLE/renderer/Renderer.h" -#include "common/utilities.h" - #include "angle_gl.h" +#include "common/utilities.h" +#include "libANGLE/renderer/FenceNVImpl.h" +#include "libANGLE/renderer/SyncImpl.h" + namespace gl { @@ -44,7 +43,7 @@ Error FenceNV::set(GLenum condition) mStatus = GL_FALSE; mIsSet = true; - return Error(GL_NO_ERROR); + return NoError(); } Error FenceNV::test(GLboolean *outResult) @@ -57,7 +56,7 @@ Error FenceNV::test(GLboolean *outResult) } *outResult = mStatus; - return Error(GL_NO_ERROR); + return NoError(); } Error FenceNV::finish() @@ -72,30 +71,39 @@ Error FenceNV::finish() mStatus = GL_TRUE; - return Error(GL_NO_ERROR); + return NoError(); } -FenceSync::FenceSync(rx::FenceSyncImpl *impl, GLuint id) - : RefCountObject(id), mFence(impl), mLabel(), mCondition(GL_NONE), mFlags(0) +Sync::Sync(rx::SyncImpl *impl, GLuint id) + : RefCountObject(id), + mFence(impl), + mLabel(), + mCondition(GL_SYNC_GPU_COMMANDS_COMPLETE), + mFlags(0) { } -FenceSync::~FenceSync() +Error Sync::onDestroy(const Context *context) +{ + return NoError(); +} + +Sync::~Sync() { SafeDelete(mFence); } -void FenceSync::setLabel(const std::string &label) +void Sync::setLabel(const std::string &label) { mLabel = label; } -const std::string &FenceSync::getLabel() const +const std::string &Sync::getLabel() const { return mLabel; } -Error FenceSync::set(GLenum condition, GLbitfield flags) +Error Sync::set(GLenum condition, GLbitfield flags) { Error error = mFence->set(condition, flags); if (error.isError()) @@ -105,23 +113,23 @@ Error FenceSync::set(GLenum condition, GLbitfield flags) mCondition = condition; mFlags = flags; - return Error(GL_NO_ERROR); + return NoError(); } -Error FenceSync::clientWait(GLbitfield flags, GLuint64 timeout, GLenum *outResult) +Error Sync::clientWait(GLbitfield flags, GLuint64 timeout, GLenum *outResult) { ASSERT(mCondition != GL_NONE); return mFence->clientWait(flags, timeout, outResult); } -Error FenceSync::serverWait(GLbitfield flags, GLuint64 timeout) +Error Sync::serverWait(GLbitfield flags, GLuint64 timeout) { return mFence->serverWait(flags, timeout); } -Error FenceSync::getStatus(GLint *outResult) const +Error Sync::getStatus(GLint *outResult) const { return mFence->getStatus(outResult); } -} +} // namespace gl -- cgit v1.2.3