Path: blob/21.2-virgl/src/gallium/drivers/iris/iris_measure.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* on the rights to use, copy, modify, merge, publish, distribute, sub7* license, and/or sell copies of the Software, and to permit persons to whom8* the Software is furnished to do so, subject to the following conditions:9*10* The above copyright notice and this permission notice (including the next11* paragraph) shall be included in all copies or substantial portions of the12* Software.13*14* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR15* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,16* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL17* THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,18* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR19* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE20* USE OR OTHER DEALINGS IN THE SOFTWARE.21*/2223#ifndef IRIS_MEASURE_H24#define IRIS_MEASURE_H2526#include "common/intel_measure.h"27#include "pipe/p_state.h"28struct iris_screen;2930struct iris_measure_batch {31struct iris_bo *bo;32struct intel_measure_batch base;33};3435void iris_init_screen_measure(struct iris_screen *screen);36void iris_init_batch_measure(struct iris_context *ice,37struct iris_batch *batch);38void iris_destroy_batch_measure(struct iris_measure_batch *batch);39void iris_destroy_ctx_measure(struct iris_context *ice);40void iris_destroy_screen_measure(struct iris_screen *screen);41void iris_measure_frame_end(struct iris_context *ice);42void iris_measure_batch_end(struct iris_context *ice, struct iris_batch *batch);43void _iris_measure_snapshot(struct iris_context *ice,44struct iris_batch *batch,45enum intel_measure_snapshot_type type,46const struct pipe_draw_info *draw,47const struct pipe_draw_indirect_info *indirect,48const struct pipe_draw_start_count_bias *sc);4950#define iris_measure_snapshot(ice, batch, type, draw, indirect, start_count) \51if (unlikely(((struct iris_screen *) ice->ctx.screen)->measure.config)) \52_iris_measure_snapshot(ice, batch, type, draw, indirect, start_count)5354#endif /* IRIS_MEASURE_H */555657