i965: Use util_next_power_of_two() for brw_get_scratch_size()
authorKristian Høgsberg Kristensen <krh@bitplanet.net>
Mon, 5 Oct 2015 21:02:56 +0000 (14:02 -0700)
committerKristian Høgsberg Kristensen <krh@bitplanet.net>
Thu, 8 Oct 2015 19:15:03 +0000 (12:15 -0700)
commit365e5d78924ffe7d4ce47e3fbadc35c7105e5d34
tree092cc7eaeb913bef595b91de4b693164beed0579
parentcc4683992bf34fb09871e976abb8eebe7d68c3fe
i965: Use util_next_power_of_two() for brw_get_scratch_size()

This function computes the next power of two, but at least 1024. We can
do that by bitwise or'ing in 1023 and calling util_next_power_of_two().

We use brw_get_scratch_size() from the compiler so we need it out of
brw_program.c. We could move it to brw_shader.cpp, but let's make it a
small inline function instead.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Signed-off-by: Kristian Høgsberg Kristensen <krh@bitplanet.net>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_program.c