spirv: Add helper to find args of Image Operands
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 23 Oct 2019 06:37:18 +0000 (23:37 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Thu, 24 Oct 2019 18:39:56 +0000 (11:39 -0700)
commitd31f415ba0fd4842a5def2512d07b370c3139006
treedf3cbbadfc59d69ea7102e5006b8727056141f5f
parentc7d8fe2f0d23a82ed92a58594645c227155c35f0
spirv: Add helper to find args of Image Operands

Avoid keeping track of the idx and all possible image operands for
each operation.  Note for convenience we split up the handling of
ImageOperandsOffsetMask and ImageOperandsConstOffsetMask.

Suggested by Jason Ekstrand.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/compiler/spirv/spirv_to_nir.c