i965/fs: Track the binding table size in brw_wm_prog_data.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 15 Aug 2013 02:49:33 +0000 (19:49 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 19 Aug 2013 20:17:00 +0000 (13:17 -0700)
commit6d89bc803d83d27d8946afdd2f749334a41a9d1f
tree93dad29b8c80b67b6207195fee4d74ce4424108f
parent7c717690b5594c768a18cc2a00364e5ec7bc20ab
i965/fs: Track the binding table size in brw_wm_prog_data.

By tracking the maximum surface index used by the shader, we know just
how small we can make the binding table.

Since it depends entirely on the shader program, we can just compute
it once at compile time, rather than at binding table emit time (which
happens during drawing).

v2: Store binding_table_size, rather than max_surface_index, for
    consistency with the VS (which needs to be able to represent 0
    surfaces).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_emit.cpp