Commit d68aff6c7482afa258d39d4b8c42602dca555a01

Qin Jiajia 2019-05-22T13:01:50

Fix the crash when the array size is not big enough. Previously, we used IMPLEMENTATION_MAX_DRAW_BUFFERS(8) as the array size of 'previouslyBound' which is used to record whether more than two different blocks are bound to a single buffer. However, when the underlying driver is d3d11_1, the max allowed shader storage blocks will be 64 which is larger than 8. An assert error will be met in push_back like below: Test case 'dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.45'.. ERR: push_back(250): ! Assert failed in push_back (../../src\common/FixedVector.h:250): mSize < N So we use 64 as the upper limit of max shader storage blocks. Bug: angleproject:3447 Change-Id: Ie76bfd15486c1ed02afca4283d6e70bdb4298cb6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1623794 Commit-Queue: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>