i965: Drop mark_surface_used from gen8 generators.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 18 Apr 2014 02:25:16 +0000 (19:25 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 1 May 2014 07:23:57 +0000 (00:23 -0700)
Francisco made brw_mark_surface_used a freestanding function in
commit a32817f3c248125fb537c3a915566445e5600d45.  We should use it.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_vec4.h
src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp

index 24d995bb625ea1571c4858f438432c1e349439d6..03b2e6a7078e354bede0c1908513cfc02e3bdff2 100644 (file)
@@ -754,8 +754,6 @@ private:
 
    void patch_discard_jumps_to_fb_writes();
 
-   void mark_surface_used(unsigned surf_index);
-
    struct brw_wm_compile *c;
    const struct gl_fragment_program *fp;
 
index ebe707f147d94c24bdd8663f4fb8a62023105f47..9919a8915cadeca8047c9fcbc2a156f9bbbbe7a6 100644 (file)
@@ -784,8 +784,6 @@ private:
                                     struct brw_reg index,
                                     struct brw_reg offset);
 
-   void mark_surface_used(unsigned surf_index);
-
    struct brw_vec4_prog_data *prog_data;
 
    const bool debug_flag;
index ca8629487b67e9ae97be108a7e1575d3b6ffcd69..856a23e4827a6c035eae8552157d26d8ae6286f8 100644 (file)
@@ -49,15 +49,6 @@ gen8_fs_generator::~gen8_fs_generator()
 {
 }
 
-void
-gen8_fs_generator::mark_surface_used(unsigned surf_index)
-{
-   assert(surf_index < BRW_MAX_SURFACES);
-
-   c->prog_data.base.binding_table.size_bytes =
-      MAX2(c->prog_data.base.binding_table.size_bytes, (surf_index + 1) * 4);
-}
-
 void
 gen8_fs_generator::generate_fb_write(fs_inst *ir)
 {
@@ -140,7 +131,7 @@ gen8_fs_generator::generate_fb_write(fs_inst *ir)
                        ir->header_present,
                        ir->eot);
 
-   mark_surface_used(surf_index);
+   brw_mark_surface_used(&c->prog_data.base, surf_index);
 }
 
 void
@@ -301,7 +292,7 @@ gen8_fs_generator::generate_tex(fs_inst *ir,
                             ir->header_present,
                             simd_mode);
 
-   mark_surface_used(surf_index);
+   brw_mark_surface_used(&c->prog_data.base, surf_index);
 }
 
 
@@ -573,7 +564,7 @@ gen8_fs_generator::generate_uniform_pull_constant_load(fs_inst *inst,
                             false, /* no header */
                             BRW_SAMPLER_SIMD_MODE_SIMD4X2);
 
-   mark_surface_used(surf_index);
+   brw_mark_surface_used(&c->prog_data.base, surf_index);
 }
 
 void
@@ -615,7 +606,7 @@ gen8_fs_generator::generate_varying_pull_constant_load(fs_inst *ir,
                             false, /* no header */
                             simd_mode);
 
-   mark_surface_used(surf_index);
+   brw_mark_surface_used(&c->prog_data.base, surf_index);
 }
 
 /**
index b854db542d03f19f0e5cde50d46f3e199f082e82..dd3035c722115a7d2afa44f71b84cfc33da1af07 100644 (file)
@@ -48,15 +48,6 @@ gen8_vec4_generator::~gen8_vec4_generator()
 {
 }
 
-void
-gen8_vec4_generator::mark_surface_used(unsigned surf_index)
-{
-   assert(surf_index < BRW_MAX_SURFACES);
-
-   prog_data->base.binding_table.size_bytes =
-      MAX2(prog_data->base.binding_table.size_bytes, (surf_index + 1) * 4);
-}
-
 void
 gen8_vec4_generator::generate_tex(vec4_instruction *ir, struct brw_reg dst)
 {
@@ -157,7 +148,7 @@ gen8_vec4_generator::generate_tex(vec4_instruction *ir, struct brw_reg dst)
                             ir->header_present,
                             BRW_SAMPLER_SIMD_MODE_SIMD4X2);
 
-   mark_surface_used(surf_index);
+   brw_mark_surface_used(&prog_data->base, surf_index);
 }
 
 void
@@ -461,7 +452,7 @@ gen8_vec4_generator::generate_pull_constant_load(vec4_instruction *inst,
                        false,  /* no header */
                        false); /* EOT */
 
-   mark_surface_used(surf_index);
+   brw_mark_surface_used(&prog_data->base, surf_index);
 }
 
 void