14a49301eSmrg/**************************************************************************
24a49301eSmrg *
3af69d88dSmrg * Copyright 2007 VMware, Inc.
43464ebd5Sriastradh * Copyright 2010 VMware, Inc.
54a49301eSmrg * All Rights Reserved.
64a49301eSmrg *
74a49301eSmrg * Permission is hereby granted, free of charge, to any person obtaining a
84a49301eSmrg * copy of this software and associated documentation files (the
94a49301eSmrg * "Software"), to deal in the Software without restriction, including
104a49301eSmrg * without limitation the rights to use, copy, modify, merge, publish,
114a49301eSmrg * distribute, sub license, and/or sell copies of the Software, and to
124a49301eSmrg * permit persons to whom the Software is furnished to do so, subject to
134a49301eSmrg * the following conditions:
144a49301eSmrg *
154a49301eSmrg * The above copyright notice and this permission notice (including the
164a49301eSmrg * next paragraph) shall be included in all copies or substantial portions
174a49301eSmrg * of the Software.
184a49301eSmrg *
194a49301eSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
204a49301eSmrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
214a49301eSmrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
22af69d88dSmrg * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
234a49301eSmrg * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
244a49301eSmrg * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
254a49301eSmrg * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
264a49301eSmrg *
274a49301eSmrg **************************************************************************/
284a49301eSmrg
293464ebd5Sriastradh/* Authors:
303464ebd5Sriastradh *    Keith Whitwell, Qicheng Christopher Li, Brian Paul
314a49301eSmrg */
324a49301eSmrg
334a49301eSmrg#ifndef LP_QUERY_H
344a49301eSmrg#define LP_QUERY_H
354a49301eSmrg
363464ebd5Sriastradh#include <limits.h>
373464ebd5Sriastradh#include "os/os_thread.h"
383464ebd5Sriastradh#include "lp_limits.h"
393464ebd5Sriastradh
403464ebd5Sriastradh
414a49301eSmrgstruct llvmpipe_context;
423464ebd5Sriastradh
433464ebd5Sriastradh
443464ebd5Sriastradhstruct llvmpipe_query {
45af69d88dSmrg   uint64_t start[LP_MAX_THREADS];  /* start count value for each thread */
46af69d88dSmrg   uint64_t end[LP_MAX_THREADS];    /* end count value for each thread */
47af69d88dSmrg   struct lp_fence *fence;          /* fence from last scene this was binned in */
48af69d88dSmrg   unsigned type;                   /* PIPE_QUERY_* */
497ec681f3Smrg   unsigned index;
507ec681f3Smrg   unsigned num_primitives_generated[PIPE_MAX_VERTEX_STREAMS];
517ec681f3Smrg   unsigned num_primitives_written[PIPE_MAX_VERTEX_STREAMS];
52af69d88dSmrg
53af69d88dSmrg   struct pipe_query_data_pipeline_statistics stats;
543464ebd5Sriastradh};
553464ebd5Sriastradh
563464ebd5Sriastradh
574a49301eSmrgextern void llvmpipe_init_query_funcs(struct llvmpipe_context * );
584a49301eSmrg
59af69d88dSmrgextern boolean llvmpipe_check_render_cond(struct llvmpipe_context *);
604a49301eSmrg
614a49301eSmrg#endif /* LP_QUERY_H */
62