mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 05:00:09 +01:00
nir: Don't include the full nir.h when not necessary.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
This commit is contained in:
parent
1ebe06f8f0
commit
94996d546c
24 changed files with 33 additions and 15 deletions
|
|
@ -12,6 +12,7 @@
|
|||
#include "util/u_atomic.h"
|
||||
#include "util/u_debug.h"
|
||||
#include "nir_serialize.h"
|
||||
#include "nir.h"
|
||||
#include "radv_debug.h"
|
||||
#include "radv_descriptor_set.h"
|
||||
#include "radv_pipeline.h"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@
|
|||
#ifndef NIR_CONSTANT_EXPRESSIONS_H
|
||||
#define NIR_CONSTANT_EXPRESSIONS_H
|
||||
|
||||
#include "nir.h"
|
||||
#include "nir_defines.h"
|
||||
#include "nir_opcodes.h"
|
||||
|
||||
void nir_eval_const_opcode(nir_op op, nir_const_value *dest,
|
||||
unsigned num_components, unsigned bit_size,
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ template = """\
|
|||
#include "util/format_r11g11b10f.h"
|
||||
#include "util/u_math.h"
|
||||
#include "nir_constant_expressions.h"
|
||||
#include "nir.h"
|
||||
|
||||
/**
|
||||
* \brief Checks if the provided value is a denorm and flushes it to zero.
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
#define NIR_DEREF_H
|
||||
|
||||
#include "nir.h"
|
||||
#include "nir_builder.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#include "nir_instr_set.h"
|
||||
#include "util/half_float.h"
|
||||
#include "nir_vla.h"
|
||||
#include "nir.h"
|
||||
|
||||
/* This function determines if uses of an instruction can safely be rewritten
|
||||
* to use another identical instruction instead. Note that this function must
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@
|
|||
#ifndef NIR_INSTR_SET_H
|
||||
#define NIR_INSTR_SET_H
|
||||
|
||||
#include "nir.h"
|
||||
#include "nir_defines.h"
|
||||
#include "util/set.h"
|
||||
|
||||
/**
|
||||
* This file defines functions for creating, destroying, and manipulating an
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#ifndef NIR_BLEND_H
|
||||
#define NIR_BLEND_H
|
||||
|
||||
#include "compiler/nir/nir.h"
|
||||
#include "compiler/nir/nir_defines.h"
|
||||
#include "util/blend.h"
|
||||
#include "util/format/u_formats.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
*/
|
||||
|
||||
#include "nir_instr_set.h"
|
||||
#include "nir.h"
|
||||
|
||||
/*
|
||||
* Implements common subexpression elimination
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@
|
|||
*/
|
||||
|
||||
#include "nir_phi_builder.h"
|
||||
#include "nir/nir_vla.h"
|
||||
#include "nir_vla.h"
|
||||
#include "nir.h"
|
||||
|
||||
struct nir_phi_builder {
|
||||
nir_shader *shader;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@
|
|||
#ifndef NIR_PHI_BUILDER_H
|
||||
#define NIR_PHI_BUILDER_H
|
||||
|
||||
#include "nir.h"
|
||||
#include "nir_defines.h"
|
||||
#include "util/bitset.h"
|
||||
|
||||
/** A helper for placing phi nodes in a NIR shader
|
||||
*
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@
|
|||
#ifndef _NIR_RANGE_ANALYSIS_H_
|
||||
#define _NIR_RANGE_ANALYSIS_H_
|
||||
|
||||
#include "nir.h"
|
||||
#include "nir_defines.h"
|
||||
#include "util/u_hash_table.h"
|
||||
|
||||
enum ENUM_PACKED ssa_ranges {
|
||||
unknown = 0,
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
*/
|
||||
|
||||
#include "nir_schedule.h"
|
||||
#include "nir.h"
|
||||
#include "util/dag.h"
|
||||
#include "util/u_dynarray.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#ifndef NIR_SCHEDULE_H
|
||||
#define NIR_SCHEDULE_H
|
||||
|
||||
#include "nir.h"
|
||||
#include "nir_defines.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@
|
|||
#define _NIR_SERIALIZE_H
|
||||
|
||||
#include "util/blob.h"
|
||||
#include "nir.h"
|
||||
#include "nir_defines.h"
|
||||
#include "nir_shader_compiler_options.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@
|
|||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "nir.h"
|
||||
#include "nir_deref.h"
|
||||
#include "nir_builder.h"
|
||||
|
||||
static nir_variable *
|
||||
find_var_member(struct nir_variable *var, unsigned member,
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
*/
|
||||
|
||||
#include "nir_worklist.h"
|
||||
#include "nir.h"
|
||||
|
||||
void
|
||||
nir_block_worklist_add_all(nir_block_worklist *w, nir_function_impl *impl)
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include "util/set.h"
|
||||
#include "util/u_vector.h"
|
||||
#include "util/u_worklist.h"
|
||||
#include "nir.h"
|
||||
#include "nir_defines.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
*/
|
||||
|
||||
#include "compiler/nir/nir.h"
|
||||
#include "compiler/nir/nir_builder.h"
|
||||
#include "compiler/nir/nir_deref.h"
|
||||
#include "compiler/nir/nir_legacy.h"
|
||||
#include "compiler/nir/nir_worklist.h"
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#include "tgsi/tgsi_parse.h"
|
||||
|
||||
#include "compiler/nir/nir_serialize.h"
|
||||
#include "compiler/nir/nir.h"
|
||||
|
||||
#include "util/blob.h"
|
||||
#include "util/hash_table.h"
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "nir_to_rc.h"
|
||||
#include "compiler/nir/nir.h"
|
||||
#include "compiler/nir/nir_builder.h"
|
||||
#include "compiler/nir/nir_deref.h"
|
||||
#include "compiler/nir/nir_legacy.h"
|
||||
#include "compiler/nir/nir_worklist.h"
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#include "ac_nir.h"
|
||||
#include "ac_shader_util.h"
|
||||
#include "compiler/nir/nir_serialize.h"
|
||||
#include "compiler/nir/nir.h"
|
||||
#include "nir/tgsi_to_nir.h"
|
||||
#include "si_build_pm4.h"
|
||||
#include "sid.h"
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
#include "util/u_memory.h"
|
||||
#include "util/u_prim.h"
|
||||
#include "nir_serialize.h"
|
||||
#include "nir.h"
|
||||
#include "nir/nir_draw_helpers.h"
|
||||
|
||||
/* for pipeline cache */
|
||||
|
|
@ -1303,7 +1304,7 @@ create_gfx_program_separable(struct zink_context *ctx, struct zink_shader **stag
|
|||
refs++;
|
||||
}
|
||||
}
|
||||
/* We can do this add after the _mesa_set_adds above because we know the prog->shaders[] are
|
||||
/* We can do this add after the _mesa_set_adds above because we know the prog->shaders[] are
|
||||
* referenced by the draw state and zink_gfx_shader_free() can't be called on them while we're in here.
|
||||
*/
|
||||
p_atomic_add(&prog->base.reference.count, refs - 1);
|
||||
|
|
@ -1366,7 +1367,7 @@ print_pipeline_stats(struct zink_screen *screen, VkPipeline pipeline, struct uti
|
|||
VkPipelineInfoKHR pinfo = {
|
||||
VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR,
|
||||
NULL,
|
||||
pipeline
|
||||
pipeline
|
||||
};
|
||||
unsigned exe_count = 0;
|
||||
VkPipelineExecutablePropertiesKHR props[10] = {0};
|
||||
|
|
@ -1403,7 +1404,7 @@ print_pipeline_stats(struct zink_screen *screen, VkPipeline pipeline, struct uti
|
|||
mesa_loge("ZINK: failed to allocate stats!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
for (unsigned i = 0; i < count; i++)
|
||||
stats[i].sType = VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR;
|
||||
VKSCR(GetPipelineExecutableStatisticsKHR)(screen->dev, &info, &count, stats);
|
||||
|
|
@ -2145,7 +2146,7 @@ zink_create_pipeline_lib(struct zink_screen *screen, struct zink_gfx_program *pr
|
|||
mesa_loge("ZINK: failed to allocate gkey!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
gkey->optimal_key = state->optimal_key;
|
||||
assert(gkey->optimal_key);
|
||||
for (unsigned i = 0; i < ZINK_GFX_SHADER_COUNT; i++)
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#include "util/disk_cache.h"
|
||||
#include "util/mesa-sha1.h"
|
||||
#include "nir/nir_serialize.h"
|
||||
#include "nir/nir.h"
|
||||
#include "anv_private.h"
|
||||
#include "nir/nir_xfb_info.h"
|
||||
#include "vk_util.h"
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
#include "vk_util.h"
|
||||
|
||||
#include "nir_serialize.h"
|
||||
#include "nir.h"
|
||||
|
||||
#include "util/mesa-sha1.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue