[Mesa-dev] [PATCH 1/2] i965: Make assign_common_binding_table_offsets return void

Jason Ekstrand jason at jlekstrand.net
Tue Feb 7 23:03:15 UTC 2017


It doesn't really matter what order the binding table entries are in so
there's no real utility to returning the final offset from
assign_common_binding_table_offsets.  The only functional change in this
patch is that framebuffer fetch surfaces are now right after render
targets rather than at the end.
---
 src/mesa/drivers/dri/i965/brw_shader.h | 2 +-
 src/mesa/drivers/dri/i965/brw_wm.c     | 7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_shader.h b/src/mesa/drivers/dri/i965/brw_shader.h
index 60f498f..e59e531 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.h
+++ b/src/mesa/drivers/dri/i965/brw_shader.h
@@ -270,7 +270,7 @@ struct brw_gs_compile
    unsigned control_data_header_size_bits;
 };
 
-uint32_t
+void
 brw_assign_common_binding_table_offsets(const struct gen_device_info *devinfo,
                                         const struct gl_program *prog,
                                         struct brw_stage_prog_data *stage_prog_data,
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index a774720..f860fdf 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -55,15 +55,14 @@ assign_fs_binding_table_offsets(const struct gen_device_info *devinfo,
    prog_data->binding_table.render_target_start = next_binding_table_offset;
    next_binding_table_offset += MAX2(key->nr_color_regions, 1);
 
-   next_binding_table_offset =
-      brw_assign_common_binding_table_offsets(devinfo, prog, &prog_data->base,
-                                              next_binding_table_offset);
-
    if (prog->nir->info->outputs_read && !key->coherent_fb_fetch) {
       prog_data->binding_table.render_target_read_start =
          next_binding_table_offset;
       next_binding_table_offset += key->nr_color_regions;
    }
+
+   brw_assign_common_binding_table_offsets(devinfo, prog, &prog_data->base,
+                                           next_binding_table_offset);
 }
 
 static void
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list