Commit 494a0ec21de2abfccb2f925dc00f666a04a0a748

Charlie Lao 2021-12-08T16:07:50

Vulkan: Append the actual buffer size when binding's size is 0 When app calls glBindBufferBase, the size of binding is set to 0. The spec says the actual size should be size of buffer when buffer is been referenced. But when we generate ShaderBuffersDescriptorDesc, we are directly using binding's size. But the actual descriptor set has the buffer's actual size. This causing the ShaderBuffersDescriptorDesc have a false cache hit (because size is always 0) when the actual descriptor set should be different. This CL checks bindging.getSize() and if it is 0, we use the actual buffer size. Bug: angleproject:6792 Change-Id: I3e044dc5ff113b4fae1b5c7d5e78645c6e98edf8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3325024 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Charlie Lao <cclao@google.com>