Skip to content

Commit

Permalink
ShaderUniforms: Set isSubAllocated once
Browse files Browse the repository at this point in the history
Summary: Only set it once.

Reviewed By: EricGriffith

Differential Revision: D47780941

fbshipit-source-id: 4c2acfc88ee1e84f24ee021f6f6885bbdf2f8698
  • Loading branch information
Shayan Javed authored and facebook-github-bot committed Jul 26, 2023
1 parent b3729a0 commit 42d4861
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions IGLU/simple_renderer/ShaderUniforms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ ShaderUniforms::ShaderUniforms(igl::IDevice& device,
size_t uniformBufferLimit = 0;
device.getFeatureLimits(igl::DeviceFeatureLimits::MaxUniformBufferBytes, uniformBufferLimit);

const bool isSuballocated = _backend == igl::BackendType::Vulkan;
for (const igl::BufferArgDesc& iglDesc : reflection.allUniformBuffers()) {
bool isSuballocated = (_backend == igl::BackendType::Vulkan) ? true : false;

size_t length = iglDesc.bufferDataSize;
IGL_ASSERT_MSG(length > 0, "unexpected buffer with size 0");
IGL_ASSERT_MSG(length <= MAX_SUBALLOCATED_BUFFER_SIZE_BYTES &&
Expand Down

0 comments on commit 42d4861

Please sign in to comment.