Skip to content

Commit

Permalink
igl | opengl | UniformAdapter : remove redundant code
Browse files Browse the repository at this point in the history
Reviewed By: EricGriffith, corporateshark

Differential Revision: D66785394

fbshipit-source-id: fb78f7c40a6100e265d430888a9bb4b860b20fc2
  • Loading branch information
Dev Mannemela authored and facebook-github-bot committed Dec 9, 2024
1 parent fca4dbf commit 539ac42
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/igl/opengl/UniformAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@
namespace igl::opengl {

UniformAdapter::UniformAdapter(const IContext& context, PipelineType type) : pipelineType_(type) {
const auto& deviceFeatures = context.deviceFeatures();
maxUniforms_ = deviceFeatures.getMaxComputeUniforms();

// NOTE: 32 "feels" right and yielded good results in MobileLab. Goal here is to minimize
// number of resize's in the vector but not be unreasonably large.
constexpr size_t kLikelyMaximumNumUniforms = 32;
uniforms_.reserve(kLikelyMaximumNumUniforms);

const auto& deviceFeatures = context.deviceFeatures();
if (pipelineType_ == Render) {
maxUniforms_ = deviceFeatures.getMaxVertexUniforms() + deviceFeatures.getMaxFragmentUniforms();
} else {
Expand Down

0 comments on commit 539ac42

Please sign in to comment.