Unless you have data, the compiler knows better than you whether a function should be inlined. --- src/intel/vulkan/anv_batch_chain.c | 4 ++-- src/intel/vulkan/anv_blorp.c | 2 +- src/intel/vulkan/gen7_cmd_buffer.c | 2 +- src/intel/vulkan/gen8_cmd_buffer.c | 4 ++-- src/intel/vulkan/genX_gpu_memcpy.c | 2 +- src/intel/vulkan/genX_pipeline.c | 18 +++++++++--------- src/intel/vulkan/genX_query.c | 2 +- src/intel/vulkan/genX_state.c | 4 ++-- 8 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c index ad76dc1fc0..3726ad5dfd 100644 --- a/src/intel/vulkan/anv_batch_chain.c +++ b/src/intel/vulkan/anv_batch_chain.c @@ -441,7 +441,7 @@ anv_batch_bo_list_clone(const struct list_head *list, * Functions related to anv_batch_bo *-----------------------------------------------------------------------*/ -static inline struct anv_batch_bo * +static struct anv_batch_bo * anv_cmd_buffer_current_batch_bo(struct anv_cmd_buffer *cmd_buffer) { return LIST_ENTRY(struct anv_batch_bo, cmd_buffer->batch_bos.prev, link); @@ -846,7 +846,7 @@ anv_cmd_buffer_end_batch_buffer(struct anv_cmd_buffer *cmd_buffer) } } -static inline VkResult +static VkResult anv_cmd_buffer_add_seen_bbos(struct anv_cmd_buffer *cmd_buffer, struct list_head *list) { diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c index 860e50ac48..09d360e987 100644 --- a/src/intel/vulkan/anv_blorp.c +++ b/src/intel/vulkan/anv_blorp.c @@ -594,7 +594,7 @@ do_buffer_copy(struct blorp_batch *batch, /** * Returns the greatest common divisor of a and b that is a power of two. */ -static inline uint64_t +static uint64_t gcd_pow2_u64(uint64_t a, uint64_t b) { assert(a > 0 || b > 0); diff --git a/src/intel/vulkan/gen7_cmd_buffer.c b/src/intel/vulkan/gen7_cmd_buffer.c index 5f7b5a07e4..b05a0fd913 100644 --- a/src/intel/vulkan/gen7_cmd_buffer.c +++ b/src/intel/vulkan/gen7_cmd_buffer.c @@ -34,7 +34,7 @@ #include "genxml/genX_pack.h" #if GEN_GEN == 7 && !GEN_IS_HASWELL -static inline int64_t +static int64_t clamp_int64(int64_t x, int64_t min, int64_t max) { if (x < min) diff --git a/src/intel/vulkan/gen8_cmd_buffer.c b/src/intel/vulkan/gen8_cmd_buffer.c index a209d70161..f253b23ee2 100644 --- a/src/intel/vulkan/gen8_cmd_buffer.c +++ b/src/intel/vulkan/gen8_cmd_buffer.c @@ -167,7 +167,7 @@ genX(cmd_buffer_enable_pma_fix)(struct anv_cmd_buffer *cmd_buffer, bool enable) } } -static inline bool +static bool want_depth_pma_fix(struct anv_cmd_buffer *cmd_buffer) { assert(GEN_GEN == 8); @@ -256,7 +256,7 @@ want_depth_pma_fix(struct anv_cmd_buffer *cmd_buffer) wm_prog_data->computed_depth_mode != PSCDEPTH_OFF; } -static inline bool +static bool want_stencil_pma_fix(struct anv_cmd_buffer *cmd_buffer) { assert(GEN_GEN == 9); diff --git a/src/intel/vulkan/genX_gpu_memcpy.c b/src/intel/vulkan/genX_gpu_memcpy.c index db723d4a52..6ed9ac7366 100644 --- a/src/intel/vulkan/genX_gpu_memcpy.c +++ b/src/intel/vulkan/genX_gpu_memcpy.c @@ -36,7 +36,7 @@ /** * Returns the greatest common divisor of a and b that is a power of two. */ -static inline uint64_t +static uint64_t gcd_pow2_u64(uint64_t a, uint64_t b) { assert(a > 0 || b > 0); diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index 55db5339d6..6390bd4f6a 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -281,7 +281,7 @@ genX(emit_urb_setup)(struct anv_device *device, struct anv_batch *batch, } } -static inline void +static void emit_urb_setup(struct anv_pipeline *pipeline) { unsigned entry_size[4]; @@ -1077,19 +1077,19 @@ emit_3dstate_streamout(struct anv_pipeline *pipeline, } } -static inline uint32_t +static uint32_t get_sampler_count(const struct anv_shader_bin *bin) { return DIV_ROUND_UP(bin->bind_map.sampler_count, 4); } -static inline uint32_t +static uint32_t get_binding_table_entry_count(const struct anv_shader_bin *bin) { return DIV_ROUND_UP(bin->bind_map.surface_count, 32); } -static inline struct anv_address +static struct anv_address get_scratch_address(struct anv_pipeline *pipeline, gl_shader_stage stage, const struct anv_shader_bin *bin) @@ -1102,20 +1102,20 @@ get_scratch_address(struct anv_pipeline *pipeline, }; } -static inline uint32_t +static uint32_t get_scratch_space(const struct anv_shader_bin *bin) { return ffs(bin->prog_data->total_scratch / 2048); } -static inline uint32_t +static uint32_t get_urb_output_offset() { /* Skip the VUE header and position slots */ return 1; } -static inline uint32_t +static uint32_t get_urb_output_length(const struct anv_shader_bin *bin) { const struct brw_vue_prog_data *prog_data = @@ -1333,7 +1333,7 @@ emit_3dstate_gs(struct anv_pipeline *pipeline) } } -static inline bool +static bool has_color_buffer_write_enabled(const struct anv_pipeline *pipeline) { const struct anv_shader_bin *shader_bin = @@ -1418,7 +1418,7 @@ emit_3dstate_wm(struct anv_pipeline *pipeline, struct anv_subpass *subpass, } } -static inline bool +static bool is_dual_src_blend_factor(VkBlendFactor factor) { return factor == VK_BLEND_FACTOR_SRC1_COLOR || diff --git a/src/intel/vulkan/genX_query.c b/src/intel/vulkan/genX_query.c index 5102412e8f..5745fae8df 100644 --- a/src/intel/vulkan/genX_query.c +++ b/src/intel/vulkan/genX_query.c @@ -507,7 +507,7 @@ void genX(CmdWriteTimestamp)( #if GEN_GEN > 7 || GEN_IS_HASWELL -static inline uint32_t +static uint32_t mi_alu(uint32_t opcode, uint32_t operand1, uint32_t operand2) { struct GENX(MI_MATH_ALU_INSTRUCTION) instr = { diff --git a/src/intel/vulkan/genX_state.c b/src/intel/vulkan/genX_state.c index 3e6583289b..d016aff4a5 100644 --- a/src/intel/vulkan/genX_state.c +++ b/src/intel/vulkan/genX_state.c @@ -101,7 +101,7 @@ genX(init_device_state)(struct anv_device *device) return anv_device_submit_simple_batch(device, &batch); } -static inline uint32_t +static uint32_t vk_to_gen_tex_filter(VkFilter filter, bool anisotropyEnable) { switch (filter) { @@ -114,7 +114,7 @@ vk_to_gen_tex_filter(VkFilter filter, bool anisotropyEnable) } } -static inline uint32_t +static uint32_t vk_to_gen_max_anisotropy(float ratio) { return (anv_clamp_f(ratio, 2, 16) - 2) / 2; -- 2.13.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev