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>
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
--- /dev/null
+# 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)
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
subdir('drm')
subdir('ir3')
subdir('registers')
+subdir('perfcntrs')
if with_tools.contains('drm-shim')
subdir('drm-shim')
#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
--- /dev/null
+# 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,
+)
+
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
freedreno_fence.h \
freedreno_gmem.c \
freedreno_gmem.h \
- freedreno_perfcntr.h \
freedreno_program.c \
freedreno_program.h \
freedreno_query.c \
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 \
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 \
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 \
#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"
#include "renderonly/renderonly.h"
#include "freedreno_batch_cache.h"
-#include "freedreno_perfcntr.h"
#include "freedreno_util.h"
struct fd_bo;
'freedreno_fence.h',
'freedreno_gmem.c',
'freedreno_gmem.h',
- 'freedreno_perfcntr.h',
'freedreno_program.c',
'freedreno_program.h',
'freedreno_query.c',
'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',
'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',
'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',
libfreedreno,
libfreedreno_drm,
libfreedreno_ir3,
+ libfreedreno_perfcntrs
],
dependencies : idep_nir,
)