OSDN Git Service

i965/fs: Fix extract_i8/u8 to a 64-bit destination
authorMatt Turner <mattst88@gmail.com>
Fri, 10 Nov 2017 22:00:24 +0000 (14:00 -0800)
committerMatt Turner <mattst88@gmail.com>
Tue, 14 Nov 2017 18:56:18 +0000 (10:56 -0800)
commit6ac2d16901927013393f873a34c717ece5014c1a
tree8b3e6b8d806f0f8d89e9148569aa3c07592d0ad2
parentcfcfa0b9cd1b1d563a988b1250950057c4612ac9
i965/fs: Fix extract_i8/u8 to a 64-bit destination

The MOV instruction can extract bytes to words/double words, and
words/double words to quadwords, but not byte to quadwords.

For unsigned byte to quadword, we can read them as words and AND off the
high byte and extract to quadword in one instruction. For signed bytes,
we need to first sign extend to word and the sign extend that word to a
quadword.

Fixes the following test on CHV, BXT, and GLK:
   KHR-GL46.shader_ballot_tests.ShaderBallotBitmasks
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103628
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/compiler/brw_fs_nir.cpp