i965: Make mark_surface_used a static inline in brw_compiler.h
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 1 Mar 2017 02:52:29 +0000 (18:52 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 2 Mar 2017 00:14:02 +0000 (16:14 -0800)
One of these days, I'd like to see this function go away all together
but for now, let's at least put it near the struct it updates.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_compiler.h
src/mesa/drivers/dri/i965/brw_shader.cpp

index c48c3ad2daecbf3e38cf6bf3d8f2f395d959b862..85257d494af5fa18e3b7cf3456cbae06affd6829 100644 (file)
@@ -443,6 +443,19 @@ struct brw_stage_prog_data {
    struct brw_image_param *image_param;
 };
 
+static inline void
+brw_mark_surface_used(struct brw_stage_prog_data *prog_data,
+                      unsigned surf_index)
+{
+   /* A binding table index is 8 bits and the top 3 values are reserved for
+    * special things (stateless and SLM).
+    */
+   assert(surf_index <= 252);
+
+   prog_data->binding_table.size_bytes =
+      MAX2(prog_data->binding_table.size_bytes, (surf_index + 1) * 4);
+}
+
 /* Data about a particular attempt to compile a program.  Note that
  * there can be many of these, each in a different GL state
  * corresponding to a different brw_wm_prog_key struct, with different
index 8b852d52721379bb8a110175d0185e2ca9f084d8..47ea9c10a6de6eb928a67f64bff68acd9a2dbd37 100644 (file)
 #include "brw_vec4_tes.h"
 #include "main/uniforms.h"
 
-extern "C" void
-brw_mark_surface_used(struct brw_stage_prog_data *prog_data,
-                      unsigned surf_index)
-{
-   /* A binding table index is 8 bits and the top 3 values are reserved for
-    * special things (stateless and SLM).
-    */
-   assert(surf_index <= 252);
-
-   prog_data->binding_table.size_bytes =
-      MAX2(prog_data->binding_table.size_bytes, (surf_index + 1) * 4);
-}
-
 enum brw_reg_type
 brw_type_for_base_type(const struct glsl_type *type)
 {