Path: blob/21.2-virgl/src/gallium/winsys/svga/drm/vmw_fence.h
4573 views
/**********************************************************1* Copyright 2009-2015 VMware, Inc. All rights reserved.2*3* Permission is hereby granted, free of charge, to any person4* obtaining a copy of this software and associated documentation5* files (the "Software"), to deal in the Software without6* restriction, including without limitation the rights to use, copy,7* modify, merge, publish, distribute, sublicense, and/or sell copies8* of the Software, and to permit persons to whom the Software is9* furnished to do so, subject to the following conditions:10*11* The above copyright notice and this permission notice shall be12* included in all copies or substantial portions of the Software.13*14* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,15* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF16* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND17* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS18* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN19* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN20* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE21* SOFTWARE.22*23**********************************************************/242526#ifndef VMW_FENCE_H_27#define VMW_FENCE_H_282930#include "pipe/p_compiler.h"31#include "pipebuffer/pb_buffer_fenced.h"3233struct pipe_fence_handle;34struct pb_fence_ops;35struct vmw_winsys_screen;363738struct pipe_fence_handle *39vmw_fence_create(struct pb_fence_ops *fence_ops,40uint32_t handle, uint32_t seqno, uint32_t mask, int32_t fd);4142int43vmw_fence_finish(struct vmw_winsys_screen *vws,44struct pipe_fence_handle *fence,45uint64_t timeout,46unsigned flag);4748int49vmw_fence_get_fd(struct pipe_fence_handle *fence);5051int52vmw_fence_signalled(struct vmw_winsys_screen *vws,53struct pipe_fence_handle *fence,54unsigned flag);55void56vmw_fence_reference(struct vmw_winsys_screen *vws,57struct pipe_fence_handle **ptr,58struct pipe_fence_handle *fence);5960struct pb_fence_ops *61vmw_fence_ops_create(struct vmw_winsys_screen *vws);62636465#endif /* VMW_FENCE_H_ */666768