Hash :
5f82dde6
Author :
Date :
2019-01-14T11:38:33
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 <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>