intel/fs: Add SLM size to brw_cs_prog_data
authorJason Ekstrand <jason@jlekstrand.net>
Thu, 25 Jul 2019 17:00:23 +0000 (12:00 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Mon, 12 Aug 2019 22:56:07 +0000 (22:56 +0000)
We don't need it for state setup but it's a useful statistic we want to
pass on to developers.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/compiler/brw_compiler.h
src/intel/compiler/brw_fs.cpp

index b1d7fefa7d37430599d3a0d5cb4db08d45268fc3..5eb9fc9940647184928b47d0244b768d48789729 100644 (file)
@@ -879,6 +879,7 @@ struct brw_cs_prog_data {
    unsigned local_size[3];
    unsigned simd_size;
    unsigned threads;
+   unsigned slm_size;
    bool uses_barrier;
    bool uses_num_work_groups;
 
index 80748833abc68370b61a135ce2529a7edfab79a0..ebac22d690cb236ded71d2858fd24d9c466d2027 100644 (file)
@@ -8328,6 +8328,7 @@ brw_compile_cs(const struct brw_compiler *compiler, void *log_data,
    prog_data->local_size[0] = src_shader->info.cs.local_size[0];
    prog_data->local_size[1] = src_shader->info.cs.local_size[1];
    prog_data->local_size[2] = src_shader->info.cs.local_size[2];
+   prog_data->slm_size = src_shader->num_shared;
    unsigned local_workgroup_size =
       src_shader->info.cs.local_size[0] * src_shader->info.cs.local_size[1] *
       src_shader->info.cs.local_size[2];