Path: blob/21.2-virgl/src/gallium/winsys/svga/drm/vmw_query.h
4573 views
/**********************************************************1* Copyright 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**********************************************************/2425#ifndef VMW_DRM_QUERY_H26#define VMW_DRM_QUERY_H2728#include "svga3d_reg.h"29303132/** Guest-backed query */33struct svga_winsys_gb_query34{35struct svga_winsys_buffer *buf;36};373839struct svga_winsys_gb_query *40vmw_svga_winsys_query_create(struct svga_winsys_screen *sws,41uint32 queryResultLen);4243void44vmw_svga_winsys_query_destroy(struct svga_winsys_screen *sws,45struct svga_winsys_gb_query *query);4647int48vmw_svga_winsys_query_init(struct svga_winsys_screen *sws,49struct svga_winsys_gb_query *query,50unsigned offset,51SVGA3dQueryState queryState);5253void54vmw_svga_winsys_query_get_result(struct svga_winsys_screen *sws,55struct svga_winsys_gb_query *query,56unsigned offset,57SVGA3dQueryState *queryState,58void *result, uint32 resultLen);5960enum pipe_error61vmw_swc_query_bind(struct svga_winsys_context *swc,62struct svga_winsys_gb_query *query,63unsigned flags);6465#endif /* VMW_DRM_QUERY_H */66676869