Fix block size calculation w.r.t variable-size arrays
Fix block size calculation w.r.t variable-size arrays

In SSBOs, there can be a last array whose size is not specified (i.e.
can take any size).  This is especially prevalent in Compute shaders
that process a buffer.

In the shader translator, the size of this array is given as 0. HLSL
register offset calculation was tripped up by this as it used
(arraySize - 1). The optimization in [1] effectively removed a test
that would perform this calculation only when the size is positive.
This change adds back this guard.

[1] https://chromium-review.googlesource.com/c/angle/angle/+/684742

Bug: angleproject:2516
Change-Id: If45ac934f542c5ffcad67f962eebe45a3aeba70b
Reviewed-on: https://chromium-review.googlesource.com/c/1409403
Commit-Queue: Shahbaz Youssefi <582eeec4f08a2ccd61e3ef52115e6e7c571582de@chromium.org>
Reviewed-by: Geoff Lang <b6fc25fe0362055230985c05cbfa8adb741ccc0f@chromium.org>

ppy/angle,ppy/angle,ppy/angle,ppy/angle