Skip to content

Commit

Permalink
igl | metal | RenderCommandEncoder : fix vertex index check
Browse files Browse the repository at this point in the history
Reviewed By: EricGriffith, corporateshark, rameshviswanathan

Differential Revision: D66561671

fbshipit-source-id: 65cab26f533136a142f2d437d837a586c49365f5
  • Loading branch information
Dev Mannemela authored and facebook-github-bot committed Dec 9, 2024
1 parent 79d860a commit ea29724
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/igl/metal/RenderCommandEncoder.mm
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@
(void)bufferSize;

IGL_DEBUG_ASSERT(encoder_);
IGL_DEBUG_ASSERT(index < IGL_VERTEX_BUFFER_MAX);
IGL_DEBUG_ASSERT(index < IGL_BUFFER_BINDINGS_MAX);

if (buffer) {
auto& metalBuffer = static_cast<Buffer&>(*buffer);
Expand All @@ -275,7 +275,7 @@

void RenderCommandEncoder::bindVertexBuffer(uint32_t index, IBuffer& buffer, size_t bufferOffset) {
IGL_DEBUG_ASSERT(encoder_);
IGL_DEBUG_ASSERT(index < IGL_VERTEX_BUFFER_MAX);
IGL_DEBUG_ASSERT(index < IGL_BUFFER_BINDINGS_MAX);

auto& metalBuffer = static_cast<Buffer&>(buffer);
[encoder_ setVertexBuffer:metalBuffer.get() offset:bufferOffset atIndex:index];
Expand Down

0 comments on commit ea29724

Please sign in to comment.