summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/libANGLE/Fence.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/angle/src/libANGLE/Fence.cpp')
-rw-r--r--src/3rdparty/angle/src/libANGLE/Fence.cpp46
1 files changed, 28 insertions, 18 deletions
diff --git a/src/3rdparty/angle/src/libANGLE/Fence.cpp b/src/3rdparty/angle/src/libANGLE/Fence.cpp
index 8ab4cc9daa..ff32f4bbe9 100644
--- a/src/3rdparty/angle/src/libANGLE/Fence.cpp
+++ b/src/3rdparty/angle/src/libANGLE/Fence.cpp
@@ -32,16 +32,9 @@ FenceNV::~FenceNV()
SafeDelete(mFence);
}
-GLboolean FenceNV::isFence() const
+Error FenceNV::set(GLenum condition)
{
- // GL_NV_fence spec:
- // A name returned by GenFencesNV, but not yet set via SetFenceNV, is not the name of an existing fence.
- return (mIsSet ? GL_TRUE : GL_FALSE);
-}
-
-Error FenceNV::setFence(GLenum condition)
-{
- Error error = mFence->set();
+ Error error = mFence->set(condition);
if (error.isError())
{
return error;
@@ -54,10 +47,10 @@ Error FenceNV::setFence(GLenum condition)
return Error(GL_NO_ERROR);
}
-Error FenceNV::testFence(GLboolean *outResult)
+Error FenceNV::test(GLboolean *outResult)
{
// Flush the command buffer by default
- Error error = mFence->test(true, &mStatus);
+ Error error = mFence->test(&mStatus);
if (error.isError())
{
return error;
@@ -67,17 +60,23 @@ Error FenceNV::testFence(GLboolean *outResult)
return Error(GL_NO_ERROR);
}
-Error FenceNV::finishFence()
+Error FenceNV::finish()
{
ASSERT(mIsSet);
- return mFence->finishFence(&mStatus);
+ gl::Error error = mFence->finish();
+ if (error.isError())
+ {
+ return error;
+ }
+
+ mStatus = GL_TRUE;
+
+ return Error(GL_NO_ERROR);
}
FenceSync::FenceSync(rx::FenceSyncImpl *impl, GLuint id)
- : RefCountObject(id),
- mFence(impl),
- mCondition(GL_NONE)
+ : RefCountObject(id), mFence(impl), mLabel(), mCondition(GL_NONE), mFlags(0)
{
}
@@ -86,15 +85,26 @@ FenceSync::~FenceSync()
SafeDelete(mFence);
}
-Error FenceSync::set(GLenum condition)
+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();
+ Error error = mFence->set(condition, flags);
if (error.isError())
{
return error;
}
mCondition = condition;
+ mFlags = flags;
return Error(GL_NO_ERROR);
}