*/
#include "glheader.h"
-#include "hash.h"
#include "imports.h"
#include "context.h"
#include "macros.h"
(void) flags;
(void) timeout;
-
/* No-op for software rendering. Hardware drivers will need to wait until
* the state of the sync object changes or the timeout expires.
*/
struct gl_sync_object *const syncObj = (struct gl_sync_object *) sync;
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
-
return _mesa_validate_sync(syncObj) ? GL_TRUE : GL_FALSE;
}
struct gl_sync_object *const syncObj = (struct gl_sync_object *) sync;
ASSERT_OUTSIDE_BEGIN_END(ctx);
-
/* From the GL_ARB_sync spec:
*
* DeleteSync will silently ignore a <sync> value of zero. An
return;
}
-
/* If there are no client-waits or server-waits pending on this sync, delete
* the underlying object.
*/
}
-
GLsync
_mesa_FenceSync(GLenum condition, GLbitfield flags)
{
struct gl_sync_object *syncObj;
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0);
-
if (condition != GL_SYNC_GPU_COMMANDS_COMPLETE) {
_mesa_error(ctx, GL_INVALID_ENUM, "glFenceSync(condition=0x%x)",
condition);
GLenum ret;
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_WAIT_FAILED);
-
if (!_mesa_validate_sync(syncObj)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glClientWaitSync");
return GL_WAIT_FAILED;
return GL_WAIT_FAILED;
}
-
_mesa_ref_sync_object(ctx, syncObj);
/* From the GL_ARB_sync spec:
struct gl_sync_object *const syncObj = (struct gl_sync_object *) sync;
ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (!_mesa_validate_sync(syncObj)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glWaitSync");
return;
GLint v[1];
ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (!_mesa_validate_sync(syncObj)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glGetSynciv");
return;
}
-
switch (pname) {
case GL_OBJECT_TYPE:
v[0] = syncObj->Type;
return;
}
-
if (size > 0) {
const GLsizei copy_count = MIN2(size, bufSize);
_mesa_memcpy(values, v, sizeof(GLint) * copy_count);
}
-
if (length != NULL) {
*length = size;
}