freedreno: Add fd{2,3,4,5}_hw.h and fd_hw_common.h

Add some wrapper header files so that we always include everything
that's needed by the generated header. This is in preparation for
setting up a script which enforces using these instead of importing
the xml generated headers directly.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40853>
This commit is contained in:
Karmjit Mahil 2026-04-09 13:29:05 +01:00 committed by Marge Bot
parent 35f6efac76
commit 396201a9ab
22 changed files with 85 additions and 42 deletions

View file

@ -0,0 +1,12 @@
/*
* Copyright (c) 2026 Valve Corporation
* SPDX-License-Identifier: MIT
*/
#ifndef FD2_HW_H
#define FD2_HW_H
#include "fd_hw_common.h"
#include "a2xx.xml.h"
#endif /* FD2_HW_H */

View file

@ -0,0 +1,12 @@
/*
* Copyright (c) 2026 Valve Corporation
* SPDX-License-Identifier: MIT
*/
#ifndef FD3_HW_H
#define FD3_HW_H
#include "fd_hw_common.h"
#include "a3xx.xml.h"
#endif /* FD3_HW_H */

View file

@ -0,0 +1,12 @@
/*
* Copyright (c) 2026 Valve Corporation
* SPDX-License-Identifier: MIT
*/
#ifndef FD4_HW_H
#define FD4_HW_H
#include "fd_hw_common.h"
#include "a4xx.xml.h"
#endif /* FD4_HW_H */

View file

@ -0,0 +1,12 @@
/*
* Copyright (c) 2026 Valve Corporation
* SPDX-License-Identifier: MIT
*/
#ifndef FD5_HW_H
#define FD5_HW_H
#include "fd_hw_common.h"
#include "a5xx.xml.h"
#endif /* FD5_HW_H */

View file

@ -6,14 +6,7 @@
#ifndef FD6_HW_H
#define FD6_HW_H
#include <stdbool.h>
#include <stdint.h>
#include "util/half_float.h"
#include "util/u_math.h"
#include "adreno_pm4.xml.h"
#include "adreno_common.xml.h"
#include "fd_hw_common.h"
#include "a6xx_enums.xml.h"
#include "a7xx_enums.xml.h"

View file

@ -0,0 +1,18 @@
/*
* Copyright (c) 2026 Valve Corporation
* SPDX-License-Identifier: MIT
*/
#ifndef FD_HW_COMMON_H
#define FD_HW_COMMON_H
#include <stdbool.h>
#include <stdint.h>
#include "util/half_float.h"
#include "util/u_math.h"
#include "adreno_pm4.xml.h"
#include "adreno_common.xml.h"
#endif /* FD_HW_COMMON_H */

View file

@ -6,7 +6,7 @@
#ifndef __FREEDRENO_GPU_EVENT_H__
#define __FREEDRENO_GPU_EVENT_H__
#include "adreno_pm4.xml.h"
#include "fd_hw_common.h"
#include "freedreno_common.h"
/* On terminology:

View file

@ -6,7 +6,7 @@
#ifndef __FREEDRENO_LRZ_H__
#define __FREEDRENO_LRZ_H__
#include "adreno_common.xml.h"
#include "fd_hw_common.h"
#include "freedreno_common.h"
enum fd_lrz_gpu_dir : uint8_t {

View file

@ -25,12 +25,8 @@
#include "util/u_math.h"
#include "util/u_queue.h"
#include "util/half_float.h"
#include "adreno_pm4.xml.h"
#include "adreno_common.xml.h"
#include "a4xx.xml.h"
#include "common/fd4_hw.h"
#include "ir3_asm.h"
#include "main.h"

View file

@ -13,8 +13,7 @@
#include "drm/freedreno_drmif.h"
#include "drm/freedreno_ringbuffer.h"
#include "adreno_common.xml.h"
#include "adreno_pm4.xml.h"
#include "common/fd_hw_common.h"
#include "ir3/ir3_assembler.h"

View file

@ -13,8 +13,7 @@
#include "util/u_atomic.h"
#include "util/u_debug.h"
#include "adreno_common.xml.h"
#include "adreno_pm4.xml.h"
#include "common/fd_hw_common.h"
#include "freedreno_drmif.h"
#include "freedreno_pm4.h"

View file

@ -3,12 +3,9 @@
* SPDX-License-Identifier: MIT
*/
#include "common/fd5_hw.h"
#include "freedreno_layout.h"
#include "fd_layout_test.h"
#include "adreno_common.xml.h"
#include "util/half_float.h"
#include "util/u_math.h"
#include "a5xx.xml.h"
#include <stdio.h>

View file

@ -476,7 +476,7 @@ uint32_t fdl6_get_bank_shift(const struct fdl_ubwc_config *config);
ENDC;
#ifdef __cplusplus
#include "adreno_common.xml.h"
#include "common/fd_hw_common.h"
template <chip CHIP>
void
fdl6_view_init(struct fdl6_view *view, const struct fdl_layout **layouts,

View file

@ -8,10 +8,7 @@
#define PACKED __attribute__((__packed__))
#include "util/u_math.h"
#include "adreno_common.xml.h"
#include "adreno_pm4.xml.h"
#include "a2xx.xml.h"
#include "fd2_hw.h"
/*
* ALU instructions:

View file

@ -7,11 +7,9 @@
* Rob Clark <robclark@freedesktop.org>
*/
#include "util/half_float.h"
#include "util/u_math.h"
#include "adreno_common.xml.h"
#include "adreno_pm4.xml.h"
#include "a2xx.xml.h"
#include "common/fd2_hw.h"
#define REG(_x) REG_A2XX_ ## _x
#include "freedreno_perfcntr.h"

View file

@ -9,10 +9,9 @@
#ifndef FD5_PERFCNTR_H_
#define FD5_PERFCNTR_H_
#include "util/half_float.h"
#include "util/u_math.h"
#include "adreno_common.xml.h"
#include "a5xx.xml.h"
#include "common/fd5_hw.h"
#define REG(_x) REG_A5XX_ ## _x
#include "freedreno_perfcntr.h"

View file

@ -11,7 +11,7 @@
#include "freedreno_util.h"
#include "a2xx.xml.h"
#include "fd2_hw.h"
struct surface_format {
/* If enum is a signed type, 0x7f is out of range. Cast it to avoid warnings. */

View file

@ -10,7 +10,7 @@
#include "util/format/u_format.h"
#include "freedreno_util.h"
#include "a3xx.xml.h"
#include "fd3_hw.h"
enum a3xx_vtx_fmt fd3_pipe2vtx(enum pipe_format format);
enum a3xx_tex_fmt fd3_pipe2tex(enum pipe_format format);

View file

@ -11,7 +11,7 @@
#include "freedreno_util.h"
#include "a4xx.xml.h"
#include "fd4_hw.h"
enum a4xx_vtx_fmt fd4_pipe2vtx(enum pipe_format format);
enum a4xx_tex_fmt fd4_pipe2tex(enum pipe_format format);

View file

@ -11,7 +11,7 @@
#include "freedreno_util.h"
#include "a5xx.xml.h"
#include "fd5_hw.h"
enum a5xx_vtx_fmt fd5_pipe2vtx(enum pipe_format format);
enum a5xx_tex_fmt fd5_pipe2tex(enum pipe_format format);

View file

@ -13,7 +13,7 @@
#include "freedreno_util.h"
#include "a5xx.xml.h"
#include "fd5_hw.h"
void fd5_screen_init(struct pipe_screen *pscreen);

View file

@ -27,8 +27,7 @@
#include "util/u_math.h"
#include "util/u_pack_color.h"
#include "adreno_common.xml.h"
#include "adreno_pm4.xml.h"
#include "fd_hw_common.h"
#include "disasm.h"
#ifdef __cplusplus