Path: blob/21.2-virgl/src/gallium/drivers/iris/iris_monitor.h
4565 views
/*1* Copyright © 2019 Intel Corporation2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and associated documentation files (the "Software"),5* to deal in the Software without restriction, including without limitation6* the rights to use, copy, modify, merge, publish, distribute, sublicense,7* and/or sell copies of the Software, and to permit persons to whom the8* Software is furnished to do so, subject to the following conditions:9*10* The above copyright notice and this permission notice shall be included11* in all copies or substantial portions of the Software.12*13* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS14* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,15* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL16* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER17* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING18* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER19* DEALINGS IN THE SOFTWARE.20*/2122#ifndef IRIS_MONITOR_H23#define IRIS_MONITOR_H2425#include "pipe/p_screen.h"2627int iris_get_monitor_info(struct pipe_screen *pscreen, unsigned index,28struct pipe_driver_query_info *info);29int iris_get_monitor_group_info(struct pipe_screen *pscreen,30unsigned index,31struct pipe_driver_query_group_info *info);3233struct iris_context;34struct iris_screen;3536struct iris_monitor_object *37iris_create_monitor_object(struct iris_context *ice,38unsigned num_queries,39unsigned *query_types);4041struct pipe_query;42void iris_destroy_monitor_object(struct pipe_context *ctx,43struct iris_monitor_object *monitor);4445bool46iris_begin_monitor(struct pipe_context *ctx,47struct iris_monitor_object *monitor);48bool49iris_end_monitor(struct pipe_context *ctx,50struct iris_monitor_object *monitor);5152bool53iris_get_monitor_result(struct pipe_context *ctx,54struct iris_monitor_object *monitor,55bool wait,56union pipe_numeric_type_union *result);5758#endif596061