i965/fs: Move scratch block size calculation into the caller of emit_(un)spill.
authorFrancisco Jerez <currojerez@riseup.net>
Mon, 16 May 2016 05:59:04 +0000 (22:59 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Mon, 23 May 2016 21:05:20 +0000 (14:05 -0700)
commit07e67cc266bf016883ff91b3002925d0833836ed
treebbbd6cc300b758f5969f004e2251575dcaa3566d
parent284c8fbcef8d631a0a727f0b7a8b34f9e4ad215d
i965/fs: Move scratch block size calculation into the caller of emit_(un)spill.

This makes emit_(un)spill even more stupid by removing the logic that
decides what execution size each scratch read or write send message
should have and instead relying on the caller to specify an
appropriate execution size via the builder argument.  This makes sense
because the caller will need to act differently based on the scratch
message width (e.g. emit an additional unspill before the instruction
if the execution width and channel layout of the spill doesn't match
the instruction's).

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp