diff options
author | Rob Clark <[email protected]> | 2019-11-19 11:05:59 -0800 |
---|---|---|
committer | Rob Clark <[email protected]> | 2019-11-21 20:01:03 +0000 |
commit | b21f03ae7eae95ff99b111ba5907f09bfcfebbc8 (patch) | |
tree | 1e0aef11f4965add2f14c50074b733680718b9e2 | |
parent | 6727114cba92c6ecaecacc6432e9fe869727beb1 (diff) |
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 <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>
-rw-r--r-- | src/freedreno/Android.mk | 1 | ||||
-rw-r--r-- | src/freedreno/Android.perfcntrs.mk | 43 | ||||
-rw-r--r-- | src/freedreno/Makefile.sources | 6 | ||||
-rw-r--r-- | src/freedreno/meson.build | 1 | ||||
-rw-r--r-- | src/freedreno/perfcntrs/fd2_perfcntr.c (renamed from src/gallium/drivers/freedreno/a2xx/fd2_perfcntr.c) | 0 | ||||
-rw-r--r-- | src/freedreno/perfcntrs/fd5_perfcntr.c (renamed from src/gallium/drivers/freedreno/a5xx/fd5_perfcntr.c) | 0 | ||||
-rw-r--r-- | src/freedreno/perfcntrs/fd6_perfcntr.c (renamed from src/gallium/drivers/freedreno/a6xx/fd6_perfcntr.c) | 0 | ||||
-rw-r--r-- | src/freedreno/perfcntrs/freedreno_perfcntr.h (renamed from src/gallium/drivers/freedreno/freedreno_perfcntr.h) | 2 | ||||
-rw-r--r-- | src/freedreno/perfcntrs/meson.build | 37 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/Android.mk | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/Makefile.sources | 4 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_screen.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/meson.build | 5 |
13 files changed, 91 insertions, 12 deletions
diff --git a/src/freedreno/Android.mk b/src/freedreno/Android.mk index 84d0c82c2cb..e5889cc5b99 100644 --- a/src/freedreno/Android.mk +++ b/src/freedreno/Android.mk @@ -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 diff --git a/src/freedreno/Android.perfcntrs.mk b/src/freedreno/Android.perfcntrs.mk new file mode 100644 index 00000000000..80634198a70 --- /dev/null +++ b/src/freedreno/Android.perfcntrs.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) diff --git a/src/freedreno/Makefile.sources b/src/freedreno/Makefile.sources index ccd6708c9bb..ac8c4607fbd 100644 --- a/src/freedreno/Makefile.sources +++ b/src/freedreno/Makefile.sources @@ -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 diff --git a/src/freedreno/meson.build b/src/freedreno/meson.build index fda973cc684..5764d4c38ea 100644 --- a/src/freedreno/meson.build +++ b/src/freedreno/meson.build @@ -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') diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_perfcntr.c b/src/freedreno/perfcntrs/fd2_perfcntr.c index 06246f398eb..06246f398eb 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_perfcntr.c +++ b/src/freedreno/perfcntrs/fd2_perfcntr.c diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_perfcntr.c b/src/freedreno/perfcntrs/fd5_perfcntr.c index 2d0579ca363..2d0579ca363 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_perfcntr.c +++ b/src/freedreno/perfcntrs/fd5_perfcntr.c diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_perfcntr.c b/src/freedreno/perfcntrs/fd6_perfcntr.c index a3c62d1286f..a3c62d1286f 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_perfcntr.c +++ b/src/freedreno/perfcntrs/fd6_perfcntr.c diff --git a/src/gallium/drivers/freedreno/freedreno_perfcntr.h b/src/freedreno/perfcntrs/freedreno_perfcntr.h index 041d84bda54..6d61f673327 100644 --- a/src/gallium/drivers/freedreno/freedreno_perfcntr.h +++ b/src/freedreno/perfcntrs/freedreno_perfcntr.h @@ -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 diff --git a/src/freedreno/perfcntrs/meson.build b/src/freedreno/perfcntrs/meson.build new file mode 100644 index 00000000000..8e110633c3e --- /dev/null +++ b/src/freedreno/perfcntrs/meson.build @@ -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, +) + diff --git a/src/gallium/drivers/freedreno/Android.mk b/src/gallium/drivers/freedreno/Android.mk index f0b29b1167a..8ce64b56214 100644 --- a/src/gallium/drivers/freedreno/Android.mk +++ b/src/gallium/drivers/freedreno/Android.mk @@ -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 diff --git a/src/gallium/drivers/freedreno/Makefile.sources b/src/gallium/drivers/freedreno/Makefile.sources index 94b26a368ad..88e9e047c61 100644 --- a/src/gallium/drivers/freedreno/Makefile.sources +++ b/src/gallium/drivers/freedreno/Makefile.sources @@ -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 \ diff --git a/src/gallium/drivers/freedreno/freedreno_screen.h b/src/gallium/drivers/freedreno/freedreno_screen.h index e0c05f2b6a7..b60f96831a6 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.h +++ b/src/gallium/drivers/freedreno/freedreno_screen.h @@ -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; diff --git a/src/gallium/drivers/freedreno/meson.build b/src/gallium/drivers/freedreno/meson.build index d96f2aceb2d..09cf125c61d 100644 --- a/src/gallium/drivers/freedreno/meson.build +++ b/src/gallium/drivers/freedreno/meson.build @@ -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, ) |