diff options
author | Miguel Costa <miguel.costa@qt.io> | 2018-06-26 16:56:45 +0200 |
---|---|---|
committer | Andre de la Rocha <andre.rocha@qt.io> | 2018-10-13 21:36:35 +0000 |
commit | 0a7aebadfbb3534284546aa3ca8612314c08f136 (patch) | |
tree | e94ee33ae3bb9b96fc3047c6455d47ac4920bfbf /src/3rdparty/angle/src/libANGLE/Fence.cpp | |
parent | 656e89f875ad2008ca16cc673b687a22daa294c9 (diff) |
Update ANGLE to chromium/3280
Change-Id: I0802c0d7486f772d361f87a544d6c5af937f4ca1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/3rdparty/angle/src/libANGLE/Fence.cpp')
-rw-r--r-- | src/3rdparty/angle/src/libANGLE/Fence.cpp | 48 |
1 files changed, 28 insertions, 20 deletions
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 |