diff options
author | Kenneth Graunke <[email protected]> | 2018-12-28 17:54:57 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-01-13 09:35:32 -0800 |
commit | 04c2f12ab28d61d30f9cb008edb9039c610dfb5f (patch) | |
tree | 10f196589ea74704a1ff57d445138a1896e34f28 /src/intel/compiler/brw_compiler.h | |
parent | bdf6a5c1d2e01aed88a338c403f28a4b9898068e (diff) |
i965: Drop mark_surface_used mechanism.
The original idea was that the backend compiler could eliminate
surfaces, so we would have it mark which ones are actually used,
then shrink the binding table accordingly. Unfortunately, it's a
pretty blunt mechanism - it can only prune things from the end,
not the middle - since we decide the layout before we even start
the backend compiler, and only limit the size. It also basically
gives up if it sees indirect array access.
Besides, we do the vast majority of our surface elimination in NIR
anyway, not the backend - and I don't see that trend changing any
time soon. Vulkan abandoned this plan a long time ago, and I don't
use it in Iris, but it's still been kicking around in i965.
I hacked shader-db to print the binding table size in bytes, and
observed no changes with this patch. So, this code appears to do
nothing useful.
Acked-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_compiler.h')
-rw-r--r-- | src/intel/compiler/brw_compiler.h | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/intel/compiler/brw_compiler.h b/src/intel/compiler/brw_compiler.h index e4f4d83c8e8..61a4528d372 100644 --- a/src/intel/compiler/brw_compiler.h +++ b/src/intel/compiler/brw_compiler.h @@ -643,19 +643,6 @@ brw_stage_prog_data_add_params(struct brw_stage_prog_data *prog_data, return prog_data->param + old_nr_params; } -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); -} - enum brw_barycentric_mode { BRW_BARYCENTRIC_PERSPECTIVE_PIXEL = 0, BRW_BARYCENTRIC_PERSPECTIVE_CENTROID = 1, |