st/mesa: optimize st_update_array with ALWAYSINLINE
[mesa.git] / src / mesa / state_tracker / st_atom_array.c
index 7913e3512b943c963bda31fec897b3c6b96db09a..5c258ed99566ceeaebb135f2b300fcae3971b8be 100644 (file)
@@ -364,7 +364,10 @@ static void init_velement_lowered(const struct st_vertex_program *vp,
    }
 }
 
-void
+/* ALWAYS_INLINE helps the compiler realize that most of the parameters are
+ * on the stack.
+ */
+void ALWAYS_INLINE
 st_setup_arrays(struct st_context *st,
                 const struct st_vertex_program *vp,
                 const struct st_common_variant *vp_variant,
@@ -427,7 +430,10 @@ st_setup_arrays(struct st_context *st,
    *has_user_vertex_buffers = uses_user_vertex_buffers;
 }
 
-void
+/* ALWAYS_INLINE helps the compiler realize that most of the parameters are
+ * on the stack.
+ */
+void ALWAYS_INLINE
 st_setup_current(struct st_context *st,
                  const struct st_vertex_program *vp,
                  const struct st_common_variant *vp_variant,