freedreno/perfcntrs: move to shared location
This should eventually be useful for VK_KHR_performance_query as well. And in the more near term, for fdperf. Attempt to not break android build is best-effort and untested. Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
This commit is contained in:
parent
6727114cba
commit
b21f03ae7e
|
@ -28,4 +28,5 @@ include $(LOCAL_PATH)/Makefile.sources
|
|||
include $(MESA_TOP)/src/gallium/drivers/freedreno/Android.gen.mk
|
||||
include $(LOCAL_PATH)/Android.drm.mk
|
||||
include $(LOCAL_PATH)/Android.ir3.mk
|
||||
include $(LOCAL_PATH)/Android.perfcntrs.mk
|
||||
include $(LOCAL_PATH)/Android.registers.mk
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
# Mesa 3-D graphics library
|
||||
#
|
||||
# Copyright (C)
|
||||
#
|
||||
# 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.
|
||||
|
||||
# Android.mk for libfreedreno_perfcntrs.a
|
||||
|
||||
# ---------------------------------------
|
||||
# Build libfreedreno_perfcntrs
|
||||
# ---------------------------------------
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
$(perfcntrs_SOURCES)
|
||||
|
||||
LOCAL_C_INCLUDES :=
|
||||
|
||||
LOCAL_MODULE := libfreedreno_perfcntrs
|
||||
|
||||
LOCAL_GENERATED_SOURCES := \
|
||||
$(MESA_GEN_GLSL_H) \
|
||||
$(MESA_GEN_NIR_H)
|
||||
|
||||
include $(MESA_COMMON_MK)
|
||||
include $(BUILD_STATIC_LIBRARY)
|
|
@ -52,3 +52,9 @@ ir3_SOURCES := \
|
|||
ir3_GENERATED_FILES := \
|
||||
ir3/ir3_nir_trig.c \
|
||||
ir3/ir3_nir_imul.c
|
||||
|
||||
perfcntrs_SOURCES := \
|
||||
perfcntrs/fd2_perfcntr.c \
|
||||
perfcntrs/fd5_perfcntr.c \
|
||||
perfcntrs/fd6_perfcntr.c \
|
||||
perfcntrs/freedreno_perfcntr.h
|
||||
|
|
|
@ -23,6 +23,7 @@ inc_freedreno = include_directories(['.', './registers'])
|
|||
subdir('drm')
|
||||
subdir('ir3')
|
||||
subdir('registers')
|
||||
subdir('perfcntrs')
|
||||
|
||||
if with_tools.contains('drm-shim')
|
||||
subdir('drm-shim')
|
||||
|
|
|
@ -27,8 +27,6 @@
|
|||
#ifndef FREEDRENO_PERFCNTR_H_
|
||||
#define FREEDRENO_PERFCNTR_H_
|
||||
|
||||
#include "pipe/p_defines.h"
|
||||
|
||||
/*
|
||||
* Mapping very closely to the AMD_performance_monitor extension, adreno has
|
||||
* groups of performance counters where each group has N counters, which can
|
|
@ -0,0 +1,37 @@
|
|||
# Copyright © 2018 Rob Clark
|
||||
|
||||
# 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.
|
||||
|
||||
libfreedreno_perfcntrs_files = files(
|
||||
'fd2_perfcntr.c',
|
||||
'fd5_perfcntr.c',
|
||||
'fd6_perfcntr.c',
|
||||
'freedreno_perfcntr.h',
|
||||
)
|
||||
|
||||
libfreedreno_perfcntrs = static_library(
|
||||
'freedreno_perfcntrs',
|
||||
[libfreedreno_perfcntrs_files, freedreno_xml_header_files],
|
||||
include_directories : [inc_freedreno, inc_common],
|
||||
c_args : [c_vis_args, no_override_init_args],
|
||||
cpp_args : [cpp_vis_args],
|
||||
dependencies : idep_nir_headers,
|
||||
build_by_default : false,
|
||||
)
|
||||
|
|
@ -44,7 +44,7 @@ LOCAL_C_INCLUDES := \
|
|||
LOCAL_GENERATED_SOURCES := $(MESA_GEN_NIR_H)
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm
|
||||
LOCAL_STATIC_LIBRARIES := libmesa_glsl libmesa_nir libfreedreno_drm libfreedreno_ir3 libfreedreno_registers
|
||||
LOCAL_STATIC_LIBRARIES := libmesa_glsl libmesa_nir libfreedreno_drm libfreedreno_ir3 libfreedreno_perfcntrs libfreedreno_registers
|
||||
LOCAL_MODULE := libmesa_pipe_freedreno
|
||||
|
||||
include $(LOCAL_PATH)/Android.gen.mk
|
||||
|
|
|
@ -14,7 +14,6 @@ C_SOURCES := \
|
|||
freedreno_fence.h \
|
||||
freedreno_gmem.c \
|
||||
freedreno_gmem.h \
|
||||
freedreno_perfcntr.h \
|
||||
freedreno_program.c \
|
||||
freedreno_program.h \
|
||||
freedreno_query.c \
|
||||
|
@ -50,7 +49,6 @@ a2xx_SOURCES := \
|
|||
a2xx/fd2_emit.h \
|
||||
a2xx/fd2_gmem.c \
|
||||
a2xx/fd2_gmem.h \
|
||||
a2xx/fd2_perfcntr.c \
|
||||
a2xx/fd2_program.c \
|
||||
a2xx/fd2_program.h \
|
||||
a2xx/fd2_query.c \
|
||||
|
@ -149,7 +147,6 @@ a5xx_SOURCES := \
|
|||
a5xx/fd5_gmem.h \
|
||||
a5xx/fd5_image.c \
|
||||
a5xx/fd5_image.h \
|
||||
a5xx/fd5_perfcntr.c \
|
||||
a5xx/fd5_program.c \
|
||||
a5xx/fd5_program.h \
|
||||
a5xx/fd5_query.c \
|
||||
|
@ -184,7 +181,6 @@ a6xx_SOURCES := \
|
|||
a6xx/fd6_gmem.h \
|
||||
a6xx/fd6_image.c \
|
||||
a6xx/fd6_image.h \
|
||||
a6xx/fd6_perfcntr.c \
|
||||
a6xx/fd6_program.c \
|
||||
a6xx/fd6_program.h \
|
||||
a6xx/fd6_query.c \
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include "drm/freedreno_drmif.h"
|
||||
#include "drm/freedreno_ringbuffer.h"
|
||||
#include "perfcntrs/freedreno_perfcntr.h"
|
||||
|
||||
#include "pipe/p_screen.h"
|
||||
#include "util/u_memory.h"
|
||||
|
@ -37,7 +38,6 @@
|
|||
#include "renderonly/renderonly.h"
|
||||
|
||||
#include "freedreno_batch_cache.h"
|
||||
#include "freedreno_perfcntr.h"
|
||||
#include "freedreno_util.h"
|
||||
|
||||
struct fd_bo;
|
||||
|
|
|
@ -34,7 +34,6 @@ files_libfreedreno = files(
|
|||
'freedreno_fence.h',
|
||||
'freedreno_gmem.c',
|
||||
'freedreno_gmem.h',
|
||||
'freedreno_perfcntr.h',
|
||||
'freedreno_program.c',
|
||||
'freedreno_program.h',
|
||||
'freedreno_query.c',
|
||||
|
@ -68,7 +67,6 @@ files_libfreedreno = files(
|
|||
'a2xx/fd2_emit.h',
|
||||
'a2xx/fd2_gmem.c',
|
||||
'a2xx/fd2_gmem.h',
|
||||
'a2xx/fd2_perfcntr.c',
|
||||
'a2xx/fd2_program.c',
|
||||
'a2xx/fd2_program.h',
|
||||
'a2xx/fd2_query.c',
|
||||
|
@ -161,7 +159,6 @@ files_libfreedreno = files(
|
|||
'a5xx/fd5_gmem.h',
|
||||
'a5xx/fd5_image.c',
|
||||
'a5xx/fd5_image.h',
|
||||
'a5xx/fd5_perfcntr.c',
|
||||
'a5xx/fd5_program.c',
|
||||
'a5xx/fd5_program.h',
|
||||
'a5xx/fd5_query.c',
|
||||
|
@ -194,7 +191,6 @@ files_libfreedreno = files(
|
|||
'a6xx/fd6_gmem.h',
|
||||
'a6xx/fd6_image.c',
|
||||
'a6xx/fd6_image.h',
|
||||
'a6xx/fd6_perfcntr.c',
|
||||
'a6xx/fd6_program.c',
|
||||
'a6xx/fd6_program.h',
|
||||
'a6xx/fd6_query.c',
|
||||
|
@ -247,6 +243,7 @@ driver_freedreno = declare_dependency(
|
|||
libfreedreno,
|
||||
libfreedreno_drm,
|
||||
libfreedreno_ir3,
|
||||
libfreedreno_perfcntrs
|
||||
],
|
||||
dependencies : idep_nir,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue