mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-26 12:10:22 +01:00
Add the gfx-pps backbone in `src/pps`. v2: Simplify supported drivers creation. v3: No default getter is provided for counters. v4: Open DRM device in read/write mode. v5: Wait for datasource to be started. v6: Set FIFO scheduler while sampling counters. Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com> Acked-by: Emma Anholt <emma@anholt.net> Reviewed-by: Rob Clark <robdclark@chromium.org> Reviewed-by: John Bates <jbates@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9652>
16 lines
488 B
C++
16 lines
488 B
C++
/*
|
|
* Copyright © 2020 Collabora, Ltd.
|
|
* Author: Antonio Caggiano <antonio.caggiano@collabora.com>
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <algorithm>
|
|
|
|
#define FIND_IF(c, lambda) (std::find_if(std::begin(c), std::end(c), lambda))
|
|
#define FIND(c, e) (std::find(std::begin(c), std::end(c), e))
|
|
#define CONTAINS(c, e) (FIND(c, e) != std::end(c))
|
|
#define CONTAINS_IT(c, it) (it != std::end(c))
|
|
#define APPEND(a, b) (a.insert(std::end(a), std::begin(b), std::end(b)))
|