mesa/st: cleanup last bits of st perfmon code.
Just some small cleanups left to finish perfmon code movement. Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
This commit is contained in:
parent
bc9b176aef
commit
ea3e700e35
|
@ -1156,6 +1156,7 @@ _mesa_free_context_data(struct gl_context *ctx, bool destroy_debug_output)
|
|||
_mesa_free_transform_feedback(ctx);
|
||||
_mesa_free_performance_monitors(ctx);
|
||||
_mesa_free_performance_queries(ctx);
|
||||
_mesa_free_perfomance_monitor_groups(ctx);
|
||||
_mesa_free_resident_handles(ctx);
|
||||
|
||||
_mesa_reference_buffer_object(ctx, &ctx->Pack.BufferObj, NULL);
|
||||
|
|
|
@ -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_perfmon.c',
|
||||
'state_tracker/st_cb_perfmon.h',
|
||||
'state_tracker/st_cb_perfquery.c',
|
||||
'state_tracker/st_cb_perfquery.h',
|
||||
'state_tracker/st_cb_program.c',
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2013 Christoph Bumiller
|
||||
* Copyright (C) 2015 Samuel Pitoiset
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Performance monitoring counters interface to gallium.
|
||||
*/
|
||||
|
||||
#include "st_debug.h"
|
||||
#include "st_context.h"
|
||||
#include "st_cb_bitmap.h"
|
||||
#include "st_cb_perfmon.h"
|
||||
#include "st_util.h"
|
||||
|
||||
#include "util/bitset.h"
|
||||
|
||||
#include "pipe/p_context.h"
|
||||
#include "pipe/p_screen.h"
|
||||
#include "util/u_memory.h"
|
||||
|
||||
#include "main/performance_monitor.h"
|
||||
|
||||
bool
|
||||
st_have_perfmon(struct st_context *st)
|
||||
{
|
||||
struct pipe_screen *screen = st->screen;
|
||||
|
||||
if (!screen->get_driver_query_info || !screen->get_driver_query_group_info)
|
||||
return false;
|
||||
|
||||
return screen->get_driver_query_group_info(screen, 0, NULL) != 0;
|
||||
}
|
||||
|
||||
void
|
||||
st_destroy_perfmon(struct st_context *st)
|
||||
{
|
||||
_mesa_free_perfomance_monitor_groups(st->ctx);
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2013 Christoph Bumiller
|
||||
* Copyright (C) 2015 Samuel Pitoiset
|
||||
*
|
||||
* 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_PERFMON_H
|
||||
#define ST_CB_PERFMON_H
|
||||
|
||||
#include "util/list.h"
|
||||
|
||||
bool
|
||||
st_have_perfmon(struct st_context *st);
|
||||
|
||||
void
|
||||
st_destroy_perfmon(struct st_context *st);
|
||||
|
||||
#endif
|
|
@ -46,7 +46,6 @@
|
|||
#include "st_cb_drawtex.h"
|
||||
#include "st_cb_eglimage.h"
|
||||
#include "st_cb_feedback.h"
|
||||
#include "st_cb_perfmon.h"
|
||||
#include "st_cb_perfquery.h"
|
||||
#include "st_cb_program.h"
|
||||
#include "st_cb_flush.h"
|
||||
|
@ -422,7 +421,6 @@ st_destroy_context_priv(struct st_context *st, bool destroy_pipe)
|
|||
st_destroy_bitmap(st);
|
||||
st_destroy_drawpix(st);
|
||||
st_destroy_drawtex(st);
|
||||
st_destroy_perfmon(st);
|
||||
st_destroy_pbo_helpers(st);
|
||||
st_destroy_bound_texture_handles(st);
|
||||
st_destroy_bound_image_handles(st);
|
||||
|
@ -493,6 +491,16 @@ st_init_driver_flags(struct st_context *st)
|
|||
ST_NEW_FS_STATE | ST_NEW_CS_STATE;
|
||||
}
|
||||
|
||||
static bool
|
||||
st_have_perfmon(struct st_context *st)
|
||||
{
|
||||
struct pipe_screen *screen = st->screen;
|
||||
|
||||
if (!screen->get_driver_query_info || !screen->get_driver_query_group_info)
|
||||
return false;
|
||||
|
||||
return screen->get_driver_query_group_info(screen, 0, NULL) != 0;
|
||||
}
|
||||
|
||||
static struct st_context *
|
||||
st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe,
|
||||
|
|
Loading…
Reference in New Issue