mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-16 20:38:06 +02:00
pan: Move util/* to compiler/
src/panfrost/util is all compiler stuff, we just put it in util/ so it could be used by both midgard and bifrost. We also rename all the files to have a pan_nir prefix. We'll rename the functions later. Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Acked-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38753>
This commit is contained in:
parent
fa6c9b6805
commit
b02bc53261
38 changed files with 42 additions and 54 deletions
|
|
@ -9,7 +9,7 @@
|
||||||
#include "compiler/nir/nir.h"
|
#include "compiler/nir/nir.h"
|
||||||
#include "compiler/nir/nir_builder.h"
|
#include "compiler/nir/nir_builder.h"
|
||||||
#include "pan_shader.h"
|
#include "pan_shader.h"
|
||||||
#include "panfrost/util/pan_lower_framebuffer.h"
|
#include "panfrost/compiler/pan_nir_lower_framebuffer.h"
|
||||||
#include "pan_context.h"
|
#include "pan_context.h"
|
||||||
|
|
||||||
#ifndef PAN_ARCH
|
#ifndef PAN_ARCH
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,6 @@
|
||||||
|
|
||||||
#include "clc/pan_compile.h"
|
#include "clc/pan_compile.h"
|
||||||
#include "compiler/nir/nir_serialize.h"
|
#include "compiler/nir/nir_serialize.h"
|
||||||
#include "util/pan_lower_framebuffer.h"
|
|
||||||
#include "decode.h"
|
#include "decode.h"
|
||||||
#include "pan_device.h"
|
#include "pan_device.h"
|
||||||
#include "pan_fence.h"
|
#include "pan_fence.h"
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
#include "util/timespec.h"
|
#include "util/timespec.h"
|
||||||
#include "util/u_dynarray.h"
|
#include "util/u_dynarray.h"
|
||||||
|
|
||||||
#include "panfrost/util/pan_ir.h"
|
#include "panfrost/compiler/pan_ir.h"
|
||||||
#include "pan_blend_cso.h"
|
#include "pan_blend_cso.h"
|
||||||
#include "pan_fb_preload.h"
|
#include "pan_fb_preload.h"
|
||||||
#include "pan_pool.h"
|
#include "pan_pool.h"
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include "util/hash_table.h"
|
#include "util/hash_table.h"
|
||||||
|
|
||||||
#include "panfrost/util/pan_ir.h"
|
#include "panfrost/compiler/pan_ir.h"
|
||||||
|
|
||||||
#include "drm-uapi/drm_fourcc.h"
|
#include "drm-uapi/drm_fourcc.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include "panfrost/util/pan_ir.h"
|
#include "panfrost/compiler/pan_ir.h"
|
||||||
#include "util/macros.h"
|
#include "util/macros.h"
|
||||||
#include "util/u_dynarray.h"
|
#include "util/u_dynarray.h"
|
||||||
#include "util/u_printf.h"
|
#include "util/u_printf.h"
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
#include "compiler/glsl_types.h"
|
#include "compiler/glsl_types.h"
|
||||||
#include "compiler/nir/nir_builder.h"
|
#include "compiler/nir/nir_builder.h"
|
||||||
#include "compiler/nir/nir_deref.h"
|
#include "compiler/nir/nir_deref.h"
|
||||||
#include "panfrost/util/pan_ir.h"
|
#include "panfrost/compiler/pan_ir.h"
|
||||||
#include "util/perf/cpu_trace.h"
|
#include "util/perf/cpu_trace.h"
|
||||||
#include "util/u_debug.h"
|
#include "util/u_debug.h"
|
||||||
#include "util/u_qsort.h"
|
#include "util/u_qsort.h"
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "compiler/nir/nir.h"
|
#include "compiler/nir/nir.h"
|
||||||
#include "panfrost/util/pan_ir.h"
|
#include "panfrost/compiler/pan_ir.h"
|
||||||
#include "util/u_dynarray.h"
|
#include "util/u_dynarray.h"
|
||||||
|
|
||||||
struct bifrost_precompiled_kernel_sysvals {
|
struct bifrost_precompiled_kernel_sysvals {
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
#define __BIFROST_COMPILER_H
|
#define __BIFROST_COMPILER_H
|
||||||
|
|
||||||
#include "compiler/nir/nir.h"
|
#include "compiler/nir/nir.h"
|
||||||
#include "panfrost/util/pan_ir.h"
|
#include "panfrost/compiler/pan_ir.h"
|
||||||
#include "util/half_float.h"
|
#include "util/half_float.h"
|
||||||
#include "util/shader_stats.h"
|
#include "util/shader_stats.h"
|
||||||
#include "util/u_math.h"
|
#include "util/u_math.h"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,32 @@
|
||||||
# Copyright © 2025 Collabora, Ltd.
|
# Copyright © 2025 Collabora, Ltd.
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
libpanfrost_util_files = files(
|
||||||
|
'pan_ir.c',
|
||||||
|
'pan_ir.h',
|
||||||
|
'pan_nir_collect_varyings.c',
|
||||||
|
'pan_nir_lower_frag_coord_zw.c',
|
||||||
|
'pan_nir_lower_framebuffer.c',
|
||||||
|
'pan_nir_lower_helper_invocation.c',
|
||||||
|
'pan_nir_lower_image_index.c',
|
||||||
|
'pan_nir_lower_image_ms.c',
|
||||||
|
'pan_nir_lower_noperspective.c',
|
||||||
|
'pan_nir_lower_sample_position.c',
|
||||||
|
'pan_nir_lower_store_component.c',
|
||||||
|
'pan_nir_lower_vertex_id.c',
|
||||||
|
'pan_nir_lower_writeout.c',
|
||||||
|
'pan_nir_lower_xfb.c',
|
||||||
|
)
|
||||||
|
|
||||||
|
libpanfrost_util = static_library(
|
||||||
|
'panfrost_util',
|
||||||
|
[libpanfrost_util_files],
|
||||||
|
include_directories : [inc_include, inc_src],
|
||||||
|
dependencies: [idep_nir, idep_mesautil],
|
||||||
|
c_args : [no_override_init_args],
|
||||||
|
gnu_symbol_visibility : 'hidden',
|
||||||
|
build_by_default : false,
|
||||||
|
)
|
||||||
|
|
||||||
subdir('bifrost')
|
subdir('bifrost')
|
||||||
subdir('midgard')
|
subdir('midgard')
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
#include "compiler/glsl_types.h"
|
#include "compiler/glsl_types.h"
|
||||||
#include "compiler/nir/nir.h"
|
#include "compiler/nir/nir.h"
|
||||||
#include "panfrost/util/pan_ir.h"
|
#include "panfrost/compiler/pan_ir.h"
|
||||||
|
|
||||||
/* Forward declare */
|
/* Forward declare */
|
||||||
struct midgard_block;
|
struct midgard_block;
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
#define __MIDGARD_H_
|
#define __MIDGARD_H_
|
||||||
|
|
||||||
#include "compiler/nir/nir.h"
|
#include "compiler/nir/nir.h"
|
||||||
#include "panfrost/util/pan_ir.h"
|
#include "panfrost/compiler/pan_ir.h"
|
||||||
#include "util/u_dynarray.h"
|
#include "util/u_dynarray.h"
|
||||||
|
|
||||||
void midgard_preprocess_nir(nir_shader *nir, unsigned gpu_id);
|
void midgard_preprocess_nir(nir_shader *nir, unsigned gpu_id);
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "panfrost/util/pan_ir.h"
|
|
||||||
#include "compiler.h"
|
#include "compiler.h"
|
||||||
|
|
||||||
/* Routines for liveness analysis. Liveness is tracked per byte per node. Per
|
/* Routines for liveness analysis. Liveness is tracked per byte per node. Per
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,6 @@
|
||||||
|
|
||||||
#include "compiler/nir/nir.h"
|
#include "compiler/nir/nir.h"
|
||||||
#include "compiler/nir/nir_builder.h"
|
#include "compiler/nir/nir_builder.h"
|
||||||
#include "panfrost/util/pan_ir.h"
|
|
||||||
|
|
||||||
bool nir_fuse_io_16(nir_shader *shader);
|
bool nir_fuse_io_16(nir_shader *shader);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
* smallest precision necessary to store the pixel losslessly.
|
* smallest precision necessary to store the pixel losslessly.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pan_lower_framebuffer.h"
|
#include "pan_nir_lower_framebuffer.h"
|
||||||
#include "compiler/nir/nir.h"
|
#include "compiler/nir/nir.h"
|
||||||
#include "compiler/nir/nir_builder.h"
|
#include "compiler/nir/nir_builder.h"
|
||||||
#include "compiler/nir/nir_format_convert.h"
|
#include "compiler/nir/nir_format_convert.h"
|
||||||
|
|
@ -31,8 +31,6 @@
|
||||||
#include "util/blend.h"
|
#include "util/blend.h"
|
||||||
#include "util/format/u_format.h"
|
#include "util/format/u_format.h"
|
||||||
|
|
||||||
#include "panfrost/util/pan_ir.h"
|
|
||||||
|
|
||||||
struct MALI_BLEND_EQUATION;
|
struct MALI_BLEND_EQUATION;
|
||||||
|
|
||||||
struct pan_blend_equation {
|
struct pan_blend_equation {
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
#include "genxml/gen_macros.h"
|
#include "genxml/gen_macros.h"
|
||||||
|
|
||||||
#include "pan_earlyzs.h"
|
#include "pan_earlyzs.h"
|
||||||
#include "panfrost/util/pan_ir.h"
|
#include "panfrost/compiler/pan_ir.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
#include "util/macros.h"
|
#include "util/macros.h"
|
||||||
|
|
||||||
#include "kmod/pan_kmod.h"
|
#include "kmod/pan_kmod.h"
|
||||||
#include "panfrost/util/pan_ir.h"
|
|
||||||
#include "pan_props.h"
|
#include "pan_props.h"
|
||||||
|
|
||||||
#include <genxml/gen_macros.h>
|
#include <genxml/gen_macros.h>
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,8 @@
|
||||||
#include "panfrost/compiler/bifrost/valhall/disassemble.h"
|
#include "panfrost/compiler/bifrost/valhall/disassemble.h"
|
||||||
#include "panfrost/compiler/midgard/disassemble.h"
|
#include "panfrost/compiler/midgard/disassemble.h"
|
||||||
#include "panfrost/lib/pan_props.h"
|
#include "panfrost/lib/pan_props.h"
|
||||||
#include "panfrost/util/pan_ir.h"
|
#include "panfrost/compiler/pan_ir.h"
|
||||||
#include "panfrost/util/pan_lower_framebuffer.h"
|
#include "panfrost/compiler/pan_nir_lower_framebuffer.h"
|
||||||
|
|
||||||
void bifrost_preprocess_nir(nir_shader *nir, unsigned gpu_id);
|
void bifrost_preprocess_nir(nir_shader *nir, unsigned gpu_id);
|
||||||
void bifrost_optimize_nir(nir_shader *nir, unsigned gpu_id);
|
void bifrost_optimize_nir(nir_shader *nir, unsigned gpu_id);
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "util/pan_ir.h"
|
#include "compiler/pan_ir.h"
|
||||||
#include "pan_earlyzs.h"
|
#include "pan_earlyzs.h"
|
||||||
#include "genxml/gen_macros.h"
|
#include "genxml/gen_macros.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ compile_args_panfrost = [
|
||||||
]
|
]
|
||||||
|
|
||||||
subdir('shared')
|
subdir('shared')
|
||||||
subdir('util')
|
|
||||||
subdir('model')
|
subdir('model')
|
||||||
subdir('compiler')
|
subdir('compiler')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
# Copyright © 2018 Rob Clark
|
|
||||||
# Copyright © 2019 Collabora
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
libpanfrost_util_files = files(
|
|
||||||
'pan_collect_varyings.c',
|
|
||||||
'pan_ir.c',
|
|
||||||
'pan_ir.h',
|
|
||||||
'pan_lower_frag_coord_zw.c',
|
|
||||||
'pan_lower_framebuffer.c',
|
|
||||||
'pan_lower_helper_invocation.c',
|
|
||||||
'pan_lower_image_index.c',
|
|
||||||
'pan_lower_image_ms.c',
|
|
||||||
'pan_lower_noperspective.c',
|
|
||||||
'pan_lower_sample_position.c',
|
|
||||||
'pan_lower_store_component.c',
|
|
||||||
'pan_lower_vertex_id.c',
|
|
||||||
'pan_lower_writeout.c',
|
|
||||||
'pan_lower_xfb.c',
|
|
||||||
)
|
|
||||||
|
|
||||||
libpanfrost_util = static_library(
|
|
||||||
'panfrost_util',
|
|
||||||
[libpanfrost_util_files],
|
|
||||||
include_directories : [inc_include, inc_src],
|
|
||||||
dependencies: [idep_nir, idep_mesautil],
|
|
||||||
c_args : [no_override_init_args],
|
|
||||||
gnu_symbol_visibility : 'hidden',
|
|
||||||
build_by_default : false,
|
|
||||||
)
|
|
||||||
|
|
@ -20,7 +20,6 @@
|
||||||
#include "panvk_utrace_perfetto.h"
|
#include "panvk_utrace_perfetto.h"
|
||||||
|
|
||||||
#include "kmod/pan_kmod.h"
|
#include "kmod/pan_kmod.h"
|
||||||
#include "util/pan_ir.h"
|
|
||||||
#include "util/perf/u_trace.h"
|
#include "util/perf/u_trace.h"
|
||||||
|
|
||||||
#include "util/simple_mtx.h"
|
#include "util/simple_mtx.h"
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
#error "PAN_ARCH must be defined"
|
#error "PAN_ARCH must be defined"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "util/pan_ir.h"
|
#include "compiler/pan_ir.h"
|
||||||
|
|
||||||
#include "pan_desc.h"
|
#include "pan_desc.h"
|
||||||
#include "pan_earlyzs.h"
|
#include "pan_earlyzs.h"
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
#include "pan_format.h"
|
#include "pan_format.h"
|
||||||
#include "pan_props.h"
|
#include "pan_props.h"
|
||||||
#include "util/pan_ir.h"
|
|
||||||
|
|
||||||
/* We reserve one ubo for push constant, one for sysvals and one per-set for the
|
/* We reserve one ubo for push constant, one for sysvals and one per-set for the
|
||||||
* descriptor metadata */
|
* descriptor metadata */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue