i965: Move brw_mark_surface_used() to brw_shader.cpp
authorKristian Høgsberg Kristensen <krh@bitplanet.net>
Tue, 6 Oct 2015 23:11:08 +0000 (16:11 -0700)
committerKristian Høgsberg Kristensen <krh@bitplanet.net>
Thu, 8 Oct 2015 19:15:03 +0000 (12:15 -0700)
brw_program.c won't be part of the compiler library, but we need
brw_mark_surface_used() in the compiler. Move to brw_shader.cpp.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Signed-off-by: Kristian Høgsberg Kristensen <krh@bitplanet.net>
src/mesa/drivers/dri/i965/brw_program.c
src/mesa/drivers/dri/i965/brw_shader.cpp

index a034dacd87bd03af079d6a5f7208291abe17e28e..108eb3421a0f4c94de0e867ad84aa6f3c19df62e 100644 (file)
@@ -530,16 +530,6 @@ brw_destroy_shader_time(struct brw_context *brw)
    brw->shader_time.bo = NULL;
 }
 
-void
-brw_mark_surface_used(struct brw_stage_prog_data *prog_data,
-                      unsigned surf_index)
-{
-   assert(surf_index < BRW_MAX_SURFACES);
-
-   prog_data->binding_table.size_bytes =
-      MAX2(prog_data->binding_table.size_bytes, (surf_index + 1) * 4);
-}
-
 void
 brw_stage_prog_data_free(const void *p)
 {
index 9ad7f3c3e9ad4dd17cfc3c23509dd14b6e5b407c..15f73936583dd9a1583ddd2205270fb25e51136f 100644 (file)
@@ -164,6 +164,16 @@ brw_new_shader(struct gl_context *ctx, GLuint name, GLuint type)
    return &shader->base;
 }
 
+void
+brw_mark_surface_used(struct brw_stage_prog_data *prog_data,
+                      unsigned surf_index)
+{
+   assert(surf_index < BRW_MAX_SURFACES);
+
+   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)
 {