From f699ceecc724ff745722b6efa9873c18ed63d4e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Mon, 3 Feb 2025 09:18:40 +0100 Subject: [PATCH] nir: Add forward declarations of relevant structs to nir_defines.h Reviewed-by: Faith Ekstrand Reviewed-by: Alyssa Rosenzweig Acked-By: Mike Blumenkrantz Part-of: --- src/compiler/nir/nir.h | 6 ------ src/compiler/nir/nir_defines.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 1ed8fff9c5b..c0b47138e27 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -173,12 +173,6 @@ nir_component_mask_reinterpret(nir_component_mask_t mask, return exec_node_data(out_type, parent, field); \ } -struct nir_function; -struct nir_shader; -struct nir_instr; -struct nir_builder; -struct nir_xfb_info; - /** * Description of built-in state associated with a uniform * diff --git a/src/compiler/nir/nir_defines.h b/src/compiler/nir/nir_defines.h index e14e89e75bd..d6f2e2c7d01 100644 --- a/src/compiler/nir/nir_defines.h +++ b/src/compiler/nir/nir_defines.h @@ -15,6 +15,36 @@ extern "C" { #endif +typedef struct shader_info shader_info; + +typedef struct nir_shader nir_shader; +typedef struct nir_shader_compiler_options nir_shader_compiler_options; +typedef struct nir_builder nir_builder; +typedef struct nir_def nir_def; +typedef struct nir_variable nir_variable; + +typedef struct nir_cf_node nir_cf_node; +typedef struct nir_block nir_block; +typedef struct nir_if nir_if; +typedef struct nir_loop nir_loop; +typedef struct nir_function nir_function; +typedef struct nir_function_impl nir_function_impl; + +typedef struct nir_instr nir_instr; +typedef struct nir_alu_instr nir_alu_instr; +typedef struct nir_deref_instr nir_deref_instr; +typedef struct nir_call_instr nir_call_instr; +typedef struct nir_jump_instr nir_jump_instr; +typedef struct nir_tex_instr nir_tex_instr; +typedef struct nir_intrinsic_instr nir_intrinsic_instr; +typedef struct nir_load_const_instr nir_load_const_instr; +typedef struct nir_undef_instr nir_undef_instr; +typedef struct nir_phi_instr nir_phi_instr; +typedef struct nir_parallel_copy_instr nir_parallel_copy_instr; + +typedef struct nir_xfb_info nir_xfb_info; +typedef struct nir_tcs_info nir_tcs_info; + /** NIR sized and unsized types * * The values in this enum are carefully chosen so that the sized type is