spirv: fix SpvOpSpecConstantOp with SpvOpVectorShuffle working with double-based...
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Mon, 21 Nov 2016 15:13:46 +0000 (16:13 +0100)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Mon, 9 Jan 2017 08:10:13 +0000 (09:10 +0100)
commita9663878835b14051fbd79f644bae3f23daf1787
tree72f99b8739bc02e3db8d397ebc5f9cb425f2f619
parentec686ff62c840e8a5766f1c9dc80f09cba8af73a
spirv: fix SpvOpSpecConstantOp with SpvOpVectorShuffle working with double-based vecs

We need to pick two 32-bit values per component to perform the right shuffle operation.

v2 (Jason):
- Add assert to check matching bit sizes (Jason)
- Simplify the code to pick components (Jason)

v3:
- Switch on bit_size once (Jason)
- Add comment to explain the constant value for unused components (Erik)

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/spirv/spirv_to_nir.c