diff --git a/src/gallium/drivers/d3d12/d3d12_lower_point_sprite.c b/src/gallium/drivers/d3d12/d3d12_lower_point_sprite.c index e6e7c46cca2..8cdd350d998 100644 --- a/src/gallium/drivers/d3d12/d3d12_lower_point_sprite.c +++ b/src/gallium/drivers/d3d12/d3d12_lower_point_sprite.c @@ -24,6 +24,7 @@ #include "nir.h" #include "nir_builder.h" #include "d3d12_compiler.h" +#include "d3d12_nir_passes.h" #include "program/prog_statevars.h" struct lower_state { diff --git a/src/gallium/drivers/d3d12/d3d12_nir_lower_texcmp.c b/src/gallium/drivers/d3d12/d3d12_nir_lower_texcmp.c index 0002b4ca737..976a58a58ae 100644 --- a/src/gallium/drivers/d3d12/d3d12_nir_lower_texcmp.c +++ b/src/gallium/drivers/d3d12/d3d12_nir_lower_texcmp.c @@ -25,7 +25,7 @@ #include "nir_builder.h" #include "nir_builtin_builder.h" -bool +static bool lower_sample_tex_compare_filter(const nir_instr *instr, UNUSED const void *_options) { diff --git a/src/gallium/drivers/d3d12/d3d12_nir_passes.c b/src/gallium/drivers/d3d12/d3d12_nir_passes.c index a6ee662cbcf..83beea4c562 100644 --- a/src/gallium/drivers/d3d12/d3d12_nir_passes.c +++ b/src/gallium/drivers/d3d12/d3d12_nir_passes.c @@ -580,7 +580,7 @@ d3d12_create_bare_samplers(nir_shader *nir) } } -bool +static bool lower_bool_input_filter(const nir_instr *instr, UNUSED const void *_options) { @@ -779,7 +779,7 @@ d3d12_fix_io_uint_type(struct nir_shader *s, uint64_t in_mask, uint64_t out_mask return progress; } -bool +static bool lower_load_ubo_packed_filter(const nir_instr *instr, UNUSED const void *_options) { if (instr->type != nir_instr_type_intrinsic) diff --git a/src/microsoft/compiler/dxil_buffer.h b/src/microsoft/compiler/dxil_buffer.h index 4f0cc60b238..d4726679632 100644 --- a/src/microsoft/compiler/dxil_buffer.h +++ b/src/microsoft/compiler/dxil_buffer.h @@ -50,7 +50,7 @@ dxil_buffer_emit_vbr_bits(struct dxil_buffer *b, uint64_t data, bool dxil_buffer_align(struct dxil_buffer *b); -static bool +static inline bool dxil_buffer_emit_abbrev_id(struct dxil_buffer *b, uint32_t id) { return dxil_buffer_emit_bits(b, id, b->abbrev_width); diff --git a/src/microsoft/compiler/dxil_module.c b/src/microsoft/compiler/dxil_module.c index 3fd5b1e2b12..bb330b01391 100644 --- a/src/microsoft/compiler/dxil_module.c +++ b/src/microsoft/compiler/dxil_module.c @@ -64,7 +64,7 @@ dxil_module_release(struct dxil_module *m) dxil_buffer_finish(&m->buf); } -bool +static bool emit_bits64(struct dxil_buffer *b, uint64_t data, unsigned width) { if (data > UINT32_MAX) { @@ -1996,7 +1996,7 @@ emit_undef_value(struct dxil_module *m) return emit_record_no_abbrev(&m->buf, CST_CODE_UNDEF, NULL, 0); } -uint64_t +static uint64_t encode_signed(int64_t value) { return value >= 0 ? @@ -2104,7 +2104,7 @@ emit_consts(struct dxil_module *m) return true; } -bool +static bool emit_module_consts(struct dxil_module *m) { return enter_subblock(m, DXIL_CONST_BLOCK, 4) && @@ -2988,7 +2988,7 @@ emit_cast(struct dxil_module *m, struct dxil_instr *instr) data, ARRAY_SIZE(data)); } -bool +static bool emit_branch(struct dxil_module *m, struct dxil_instr *instr) { assert(instr->type == INSTR_BR); @@ -3014,7 +3014,7 @@ emit_branch(struct dxil_module *m, struct dxil_instr *instr) data, ARRAY_SIZE(data)); } -bool +static bool emit_phi(struct dxil_module *m, struct dxil_instr *instr) { assert(instr->type == INSTR_PHI); diff --git a/src/microsoft/compiler/dxil_nir.c b/src/microsoft/compiler/dxil_nir.c index 2e1b10d1f1c..0d573450e58 100644 --- a/src/microsoft/compiler/dxil_nir.c +++ b/src/microsoft/compiler/dxil_nir.c @@ -417,7 +417,7 @@ lower_store_ssbo(nir_builder *b, nir_intrinsic_instr *intr) return true; } -void +static void lower_load_vec32(nir_builder *b, nir_ssa_def *index, unsigned num_comps, nir_ssa_def **comps, nir_intrinsic_op op) { for (unsigned i = 0; i < num_comps; i++) { @@ -719,7 +719,7 @@ dxil_nir_lower_ubo_to_temp(nir_shader *nir) return progress; } -bool +static bool lower_load_ubo(nir_builder *b, nir_intrinsic_instr *intr) { assert(intr->dest.is_ssa); @@ -788,6 +788,7 @@ dxil_nir_lower_loads_stores_to_dxil(nir_shader *nir) return progress; } +static bool lower_shared_atomic(nir_builder *b, nir_intrinsic_instr *intr, nir_intrinsic_op dxil_op) { diff --git a/src/microsoft/compiler/dxil_nir_lower_int_samplers.c b/src/microsoft/compiler/dxil_nir_lower_int_samplers.c index bc420b3fd39..81d1ad2fa4c 100644 --- a/src/microsoft/compiler/dxil_nir_lower_int_samplers.c +++ b/src/microsoft/compiler/dxil_nir_lower_int_samplers.c @@ -25,7 +25,7 @@ #include "nir_builder.h" #include "nir_builtin_builder.h" -bool +static bool lower_sample_to_txf_for_integer_tex_filter(const nir_instr *instr, UNUSED const void *_options) { @@ -42,7 +42,7 @@ lower_sample_to_txf_for_integer_tex_filter(const nir_instr *instr, return (tex->dest_type & (nir_type_int | nir_type_uint)); } -nir_ssa_def * +static nir_ssa_def * dx_get_texture_lod(nir_builder *b, nir_tex_instr *tex) { nir_tex_instr *tql; @@ -249,7 +249,7 @@ load_bordercolor(nir_builder *b, nir_tex_instr *tex, dxil_wrap_sampler_state *ac return nir_build_imm(b, ndest_comp, 32, const_value); } -nir_tex_instr * +static nir_tex_instr * create_txf_from_tex(nir_builder *b, nir_tex_instr *tex) { nir_tex_instr *txf; diff --git a/src/microsoft/compiler/nir_to_dxil.c b/src/microsoft/compiler/nir_to_dxil.c index ad063b65990..ecebe12e7f1 100644 --- a/src/microsoft/compiler/nir_to_dxil.c +++ b/src/microsoft/compiler/nir_to_dxil.c @@ -1996,7 +1996,7 @@ emit_alu(struct ntd_context *ctx, nir_alu_instr *alu) } } -const struct dxil_value * +static const struct dxil_value * load_ubo(struct ntd_context *ctx, const struct dxil_value *handle, const struct dxil_value *offset, enum overload_type overload) { @@ -4031,7 +4031,7 @@ emit_module(struct ntd_context *ctx, nir_shader *s, const struct nir_to_dxil_opt dxil_emit_module(&ctx->mod); } -unsigned int +static unsigned int get_dxil_shader_kind(struct nir_shader *s) { switch (s->info.stage) {