diff --git a/src/mesa/main/performance_query.c b/src/mesa/main/performance_query.c index eff92ee08c6..95dac06b404 100644 --- a/src/mesa/main/performance_query.c +++ b/src/mesa/main/performance_query.c @@ -39,7 +39,6 @@ #include "pipe/p_context.h" -#include "state_tracker/st_cb_perfquery.h" #include "state_tracker/st_cb_flush.h" void diff --git a/src/mesa/meson.build b/src/mesa/meson.build index d8ea1463ed5..3b7fb989d20 100644 --- a/src/mesa/meson.build +++ b/src/mesa/meson.build @@ -342,8 +342,6 @@ files_libmesa = files( 'state_tracker/st_cb_feedback.h', 'state_tracker/st_cb_flush.c', 'state_tracker/st_cb_flush.h', - 'state_tracker/st_cb_perfquery.c', - 'state_tracker/st_cb_perfquery.h', 'state_tracker/st_cb_program.c', 'state_tracker/st_cb_program.h', 'state_tracker/st_cb_rasterpos.c', diff --git a/src/mesa/state_tracker/st_cb_perfquery.c b/src/mesa/state_tracker/st_cb_perfquery.c deleted file mode 100644 index 76f87204227..00000000000 --- a/src/mesa/state_tracker/st_cb_perfquery.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright © 2019 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * Intel Performance query interface to gallium. - */ - -#include "st_debug.h" -#include "st_context.h" -#include "st_cb_bitmap.h" -#include "st_cb_perfquery.h" -#include "st_util.h" - -#include "util/bitset.h" - -#include "pipe/p_context.h" -#include "pipe/p_screen.h" -#include "util/u_memory.h" - -bool -st_have_perfquery(struct st_context *st) -{ - struct pipe_context *pipe = st->pipe; - - return pipe->init_intel_perf_query_info && pipe->get_intel_perf_query_info && - pipe->get_intel_perf_query_counter_info && - pipe->new_intel_perf_query_obj && pipe->begin_intel_perf_query && - pipe->end_intel_perf_query && pipe->delete_intel_perf_query && - pipe->wait_intel_perf_query && pipe->is_intel_perf_query_ready && - pipe->get_intel_perf_query_data; -} diff --git a/src/mesa/state_tracker/st_cb_perfquery.h b/src/mesa/state_tracker/st_cb_perfquery.h deleted file mode 100644 index d6951cec256..00000000000 --- a/src/mesa/state_tracker/st_cb_perfquery.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright © 2019 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#ifndef ST_CB_PERFQUERY_H -#define ST_CB_PERFQUERY_H - -bool -st_have_perfquery(struct st_context *st); - -#endif diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 877852d2f87..a2549fd122b 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -46,7 +46,6 @@ #include "st_cb_drawtex.h" #include "st_cb_eglimage.h" #include "st_cb_feedback.h" -#include "st_cb_perfquery.h" #include "st_cb_program.h" #include "st_cb_flush.h" #include "st_atom.h" @@ -461,6 +460,19 @@ st_have_perfmon(struct st_context *st) return screen->get_driver_query_group_info(screen, 0, NULL) != 0; } +static bool +st_have_perfquery(struct st_context *ctx) +{ + struct pipe_context *pipe = ctx->pipe; + + return pipe->init_intel_perf_query_info && pipe->get_intel_perf_query_info && + pipe->get_intel_perf_query_counter_info && + pipe->new_intel_perf_query_obj && pipe->begin_intel_perf_query && + pipe->end_intel_perf_query && pipe->delete_intel_perf_query && + pipe->wait_intel_perf_query && pipe->is_intel_perf_query_ready && + pipe->get_intel_perf_query_data; +} + static struct st_context * st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe, const struct st_config_options *options, bool no_error)