i965: Duplicate less code in GetSamplePositions driver hook.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 10 Feb 2014 00:29:41 +0000 (16:29 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 10 Feb 2014 16:18:28 +0000 (08:18 -0800)
commit16f7510ad30070b7bd4eff494f7937f6ee257547
treee49f110f05a430afc3e764dc8931d9aaa78d45f9
parent40dd777b3307301e6580c5757c322a2ec99b5b37
i965: Duplicate less code in GetSamplePositions driver hook.

The 4x and 8x cases contained identical code for extracting the X and
Y sample offset values and converting them from U0.4 back to float.

Without this refactoring, we'd have to duplicate it a third time in
order to support 2x MSAA.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
src/mesa/drivers/dri/i965/gen6_multisample_state.c