Skip to content

Commit

Permalink
igl | vulkan | Bounds checking
Browse files Browse the repository at this point in the history
Summary: Add extra bounds checking.

Reviewed By: pixelperfect3

Differential Revision: D49328718

fbshipit-source-id: c74b1ce3a1db49ab6b59e823b6668c139eaee531
  • Loading branch information
corporateshark authored and facebook-github-bot committed Sep 16, 2023
1 parent 509c29a commit 9cdbcc8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/igl/vulkan/RenderCommandEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,12 @@ void RenderCommandEncoder::ensureVertexBuffers() {

const VertexInputStateDesc& desc = vi->desc_;

for (size_t i = 0; i != desc.numInputBindings; i++) {
IGL_ASSERT(desc.numInputBindings <= IGL_ARRAY_NUM_ELEMENTS(isVertexBufferBound_));

const size_t numBindings =
std::min(desc.numInputBindings, IGL_ARRAY_NUM_ELEMENTS(isVertexBufferBound_));

for (size_t i = 0; i != numBindings; i++) {
if (!isVertexBufferBound_[i]) {
// TODO: fix client apps and uncomment
// IGL_ASSERT_MSG(false,
Expand Down

0 comments on commit 9cdbcc8

Please sign in to comment.