spirv: Pull offset/stride from the pointer for OpArrayLength
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 12 Jan 2019 16:32:13 +0000 (10:32 -0600)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 5 Mar 2019 16:06:50 +0000 (10:06 -0600)
commitf1dbc7e97d3dcb2104b9438d32cace9529575208
treec98f853629c7ad87c5d72c2c00d4b42ef9df835b
parentc520f4dec9cbedd4132143f52411df18f97869e6
spirv: Pull offset/stride from the pointer for OpArrayLength

We can't pull it from the variable type because it might be an array of
blocks and not just the one block.  While we're here, throw in some
error checking.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable@lists.freedesktop.org
src/compiler/spirv/vtn_variables.c