1848b8605Smrg/* 2848b8605Smrg * Copyright © 2009 Intel Corporation 3848b8605Smrg * 4848b8605Smrg * Permission is hereby granted, free of charge, to any person obtaining a 5848b8605Smrg * copy of this software and associated documentation files (the "Software"), 6848b8605Smrg * to deal in the Software without restriction, including without limitation 7848b8605Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8848b8605Smrg * and/or sell copies of the Software, and to permit persons to whom the 9848b8605Smrg * Software is furnished to do so, subject to the following conditions: 10848b8605Smrg * 11848b8605Smrg * The above copyright notice and this permission notice (including the next 12848b8605Smrg * paragraph) shall be included in all copies or substantial portions of the 13848b8605Smrg * Software. 14848b8605Smrg * 15848b8605Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16848b8605Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17848b8605Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18848b8605Smrg * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19848b8605Smrg * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20848b8605Smrg * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21848b8605Smrg * DEALINGS IN THE SOFTWARE. 22848b8605Smrg */ 23848b8605Smrg 24848b8605Smrg/** 25848b8605Smrg * \file syncobj.h 26848b8605Smrg * Sync object management. 27848b8605Smrg * 28848b8605Smrg * \author Ian Romanick <ian.d.romanick@intel.com> 29848b8605Smrg */ 30848b8605Smrg 31848b8605Smrg#ifndef SYNCOBJ_H 32848b8605Smrg#define SYNCOBJ_H 33848b8605Smrg 34848b8605Smrg#include "glheader.h" 35848b8605Smrg 36848b8605Smrgstruct _glapi_table; 37848b8605Smrgstruct dd_function_table; 38848b8605Smrgstruct gl_context; 39848b8605Smrgstruct gl_sync_object; 40848b8605Smrg 41848b8605Smrgextern void 42848b8605Smrg_mesa_init_sync_object_functions(struct dd_function_table *driver); 43848b8605Smrg 44848b8605Smrgextern void 45848b8605Smrg_mesa_init_sync(struct gl_context *); 46848b8605Smrg 47848b8605Smrgextern void 48848b8605Smrg_mesa_free_sync_data(struct gl_context *); 49848b8605Smrg 50b8e80941Smrgstruct gl_sync_object * 51b8e80941Smrg_mesa_get_and_ref_sync(struct gl_context *ctx, GLsync sync, bool incRefCount); 52848b8605Smrg 53848b8605Smrgextern void 54b8e80941Smrg_mesa_unref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj, 55b8e80941Smrg int amount); 56848b8605Smrg 57848b8605Smrgextern GLboolean GLAPIENTRY 58848b8605Smrg_mesa_IsSync(GLsync sync); 59848b8605Smrg 60b8e80941Smrgvoid GLAPIENTRY 61b8e80941Smrg_mesa_DeleteSync_no_error(GLsync sync); 62b8e80941Smrg 63848b8605Smrgextern void GLAPIENTRY 64848b8605Smrg_mesa_DeleteSync(GLsync sync); 65848b8605Smrg 66b8e80941SmrgGLsync GLAPIENTRY 67b8e80941Smrg_mesa_FenceSync_no_error(GLenum condition, GLbitfield flags); 68b8e80941Smrg 69848b8605Smrgextern GLsync GLAPIENTRY 70848b8605Smrg_mesa_FenceSync(GLenum condition, GLbitfield flags); 71848b8605Smrg 72b8e80941SmrgGLenum GLAPIENTRY 73b8e80941Smrg_mesa_ClientWaitSync_no_error(GLsync sync, GLbitfield flags, GLuint64 timeout); 74b8e80941Smrg 75848b8605Smrgextern GLenum GLAPIENTRY 76848b8605Smrg_mesa_ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout); 77848b8605Smrg 78b8e80941Smrgvoid GLAPIENTRY 79b8e80941Smrg_mesa_WaitSync_no_error(GLsync sync, GLbitfield flags, GLuint64 timeout); 80b8e80941Smrg 81848b8605Smrgextern void GLAPIENTRY 82848b8605Smrg_mesa_WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout); 83848b8605Smrg 84848b8605Smrgextern void GLAPIENTRY 85848b8605Smrg_mesa_GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, 86848b8605Smrg GLint *values); 87848b8605Smrg 88848b8605Smrg#endif /* SYNCOBJ_H */ 89