glsl: join calculate_array_size() and calculate_array_stride()
authorJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Wed, 21 Oct 2015 09:09:21 +0000 (12:09 +0300)
committerJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Mon, 2 Nov 2015 08:03:32 +0000 (10:03 +0200)
commitc2c124f89194fe33af522f090aa8e71f2c3aa474
treede030222f2d5d77642602a70ed8a86ae62fe26ce
parentaf7c98a9c75b17fc8c8ed0989aa732766e5b06d1
glsl: join calculate_array_size() and calculate_array_stride()

These helpers are ran for same case the same loop. Here joined
their operation so the loop is ran just once. Also fixed
out-of-memory condition here.

v2: Make the loop simpler to read as per Tapani's suggestion

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Tested-by: Tapani Pälli <tapani.palli@intel.com>
src/glsl/linker.cpp