i965: Store absolute thread count in max_wm_threads on Broadwell.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 5 Feb 2014 06:18:03 +0000 (22:18 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 20 Feb 2014 23:50:08 +0000 (15:50 -0800)
commita5e54c91a3b73551609efea1f6f31eaae26281ea
treee03ae4b51ce1b03e7fa57f4d0bd6d65ad76ed581
parentdca84b4b5b23b68b3ea9da53d1775fa22cd1aff4
i965: Store absolute thread count in max_wm_threads on Broadwell.

In the past, 3DSTATE_PS took an absolute number of threads.  Conversely,
on Broadwell you always program 64, and it implicitly scales based on
the GT-level with no special programming.  So, I stored 64 in
brw_device_info::max_wm_threads.

However, I didn't realize that we also use max_wm_threads to compute the
size of the scratch space buffer.  In that case, we really need the
absolute number of threads.

This patch hardcodes 3DSTATE_PS to use the value it expects, and changes
max_wm_threads back to a (completely fake) absolute thread count (once
again copied from Haswell).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_device_info.c
src/mesa/drivers/dri/i965/gen8_ps_state.c