mesa/st: move perf query test to st_context, drop files.
authorDave Airlie <airlied@redhat.com>
Tue, 21 Dec 2021 04:28:31 +0000 (14:28 +1000)
committerMarge Bot <emma+marge@anholt.net>
Fri, 21 Jan 2022 01:18:20 +0000 (01:18 +0000)
This removes the unused cb perf query files

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>

src/mesa/main/performance_query.c
src/mesa/meson.build
src/mesa/state_tracker/st_cb_perfquery.c [deleted file]
src/mesa/state_tracker/st_cb_perfquery.h [deleted file]
src/mesa/state_tracker/st_context.c

index eff92ee..95dac06 100644 (file)
@@ -39,7 +39,6 @@
 
 #include "pipe/p_context.h"
 
-#include "state_tracker/st_cb_perfquery.h"
 #include "state_tracker/st_cb_flush.h"
 
 void
index d8ea146..3b7fb98 100644 (file)
@@ -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 (file)
index 76f8720..0000000
+++ /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 (file)
index d6951ce..0000000
+++ /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
index 877852d..a2549fd 100644 (file)
@@ -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)