Reland "Vulkan: Take stride into account for max buf size" This is a reland of commit 91fe334eadd279746e06367142de6e8d9f8d00ed In the original change, mMaxBufferMemorySizeLimit was cast to a 32-bit value for cap initialization. However, if the reported value was larger than 4GB, it could result in incorrect cap values, leading to shader compilation errors (e.g., exceeding maximum uniform location size). * Updated LimitToIntAnd() to always take a 64-bit value for the cap. * The other arg (physicalDeviceValue) would be cast to the same type for std::min(). * Removed the 32-bit casting from mMaxBufferMemorySizeLimit during cap initialization. Original change's description: > Vulkan: Take stride into account for max buf size > > * Added LimitToIntAnd() to limit the input value to a certain > threshold in addition to the int limit. > > * Cached the max buffer size limit in the renderer. > * mMaxBufferMemorySizeLimit > > * In vk_caps_utils: Capped the following buffer size-related limits > to the maximum memory allocation size: > > * maxStorageBufferRange > * maxTexelBufferElements > * maxUniformBufferRange > > Bug: angleproject:391002353 > Test: KHR-GLES31.core.texture_buffer.texture_buffer_max_size > KHR-GLES32.core.texture_buffer.texture_buffer_max_size > Change-Id: Iee9b13f5440a4f5e6f952e7d2beaf9485f864c2d > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6283625 > Reviewed-by: mohan maiya <m.maiya@samsung.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Bug: angleproject:391002353 Change-Id: Ieb06a1dcf3096b4d6f3643f96d0e05b2be6b2093 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6303408 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>