i965: Make brw_imm_vf4() take 8-bit restricted floats.
authorMatt Turner <mattst88@gmail.com>
Mon, 2 Nov 2015 18:29:45 +0000 (10:29 -0800)
committerMatt Turner <mattst88@gmail.com>
Thu, 19 Nov 2015 19:12:24 +0000 (11:12 -0800)
commitc15a407eb49d3b26bdbf039816636adb184c276a
treeb6a2593c167e1f2c68993426b359936286f05001
parente8c5ef3ecaafae0ad6c300019c489401a9af714c
i965: Make brw_imm_vf4() take 8-bit restricted floats.

This partially reverts commit bbf8239f92ecd79431dfa41402e1c85318e7267f.

I didn't like that commit to begin with -- computing things at compile
time is fine -- but for purposes of verifying that the resulting values
are correct, looking up 0x00 and 0x30 in a table is a lot better than
evaluating a recursive function.

Anyway, by making brw_imm_vf4() take the actual 8-bit restricted floats
directly (instead of only integral values that would be converted to
restricted float), we can use this function as a replacement for the
vector float src_reg/fs_reg constructors.

brw_float_to_vf() is not currently an inline function, so it will not be
evaluated at compile time. I'll address that in a follow-up patch.

Reviewed-by: Emil Velikov <emil.velikov@collabora.co.uk>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_clip_util.c
src/mesa/drivers/dri/i965/brw_reg.h