summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/libGLESv2/Fence.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/angle/src/libGLESv2/Fence.h')
-rw-r--r--src/3rdparty/angle/src/libGLESv2/Fence.h41
1 files changed, 35 insertions, 6 deletions
diff --git a/src/3rdparty/angle/src/libGLESv2/Fence.h b/src/3rdparty/angle/src/libGLESv2/Fence.h
index 1cedebb112..291edb3de1 100644
--- a/src/3rdparty/angle/src/libGLESv2/Fence.h
+++ b/src/3rdparty/angle/src/libGLESv2/Fence.h
@@ -10,6 +10,7 @@
#define LIBGLESV2_FENCE_H_
#include "common/angleutils.h"
+#include "common/RefCountObject.h"
namespace rx
{
@@ -20,22 +21,50 @@ class FenceImpl;
namespace gl
{
-class Fence
+class FenceNV
{
public:
- explicit Fence(rx::Renderer *renderer);
- virtual ~Fence();
+ explicit FenceNV(rx::Renderer *renderer);
+ virtual ~FenceNV();
- GLboolean isFence();
+ GLboolean isFence() const;
void setFence(GLenum condition);
GLboolean testFence();
void finishFence();
- void getFenceiv(GLenum pname, GLint *params);
+ GLint getFencei(GLenum pname);
+
+ GLboolean getStatus() const { return mStatus; }
+ GLuint getCondition() const { return mCondition; }
private:
- DISALLOW_COPY_AND_ASSIGN(Fence);
+ DISALLOW_COPY_AND_ASSIGN(FenceNV);
rx::FenceImpl *mFence;
+
+ GLboolean mStatus;
+ GLenum mCondition;
+};
+
+class FenceSync : public RefCountObject
+{
+ public:
+ explicit FenceSync(rx::Renderer *renderer, GLuint id);
+ virtual ~FenceSync();
+
+ void set(GLenum condition);
+ GLenum clientWait(GLbitfield flags, GLuint64 timeout);
+ void serverWait();
+ GLenum getStatus() const;
+
+ GLuint getCondition() const { return mCondition; }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(FenceSync);
+
+ rx::FenceImpl *mFence;
+ LONGLONG mCounterFrequency;
+
+ GLenum mCondition;
};
}