*/
void (*DeleteSemaphoreObject)(struct gl_context *ctx,
struct gl_semaphore_object *semObj);
+
+ /**
+ * Introduce an operation to wait for the semaphore object in the GL
+ * server's command stream
+ */
+ void (*ServerWaitSemaphoreObject)(struct gl_context *ctx,
+ struct gl_semaphore_object *semObj);
+
+ /**
+ * Introduce an operation to signal the semaphore object in the GL
+ * server's command stream
+ */
+ void (*ServerSignalSemaphoreObject)(struct gl_context *ctx,
+ struct gl_semaphore_object *semObj);
/*@}*/
/**
#include "macros.h"
#include "mtypes.h"
+#include "context.h"
#include "externalobjects.h"
#include "teximage.h"
#include "texobj.h"
const GLuint *textures,
const GLenum *srcLayouts)
{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_semaphore_object *semObj;
+
+
+ if (!ctx->Extensions.EXT_semaphore) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glWaitSemaphoreEXT(unsupported)");
+ return;
+ }
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ semObj = _mesa_lookup_semaphore_object(ctx, semaphore);
+ if (!semObj)
+ return;
+
+ FLUSH_VERTICES(ctx, 0);
+ FLUSH_CURRENT(ctx, 0);
+ /* TODO: memory barriers and layout transitions */
+ ctx->Driver.ServerWaitSemaphoreObject(ctx, semObj);
}
void GLAPIENTRY
const GLuint *textures,
const GLenum *dstLayouts)
{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_semaphore_object *semObj;
+
+ if (!ctx->Extensions.EXT_semaphore) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glSignalSemaphoreEXT(unsupported)");
+ return;
+ }
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ semObj = _mesa_lookup_semaphore_object(ctx, semaphore);
+ if (!semObj)
+ return;
+
+ FLUSH_VERTICES(ctx, 0);
+ FLUSH_CURRENT(ctx, 0);
+ /* TODO: memory barriers and layout transitions */
+ ctx->Driver.ServerSignalSemaphoreObject(ctx, semObj);
}
void GLAPIENTRY