From 539ac426ae5afe95302c61be27752f799047d737 Mon Sep 17 00:00:00 2001 From: Dev Mannemela Date: Mon, 9 Dec 2024 14:28:31 -0800 Subject: [PATCH] igl | opengl | UniformAdapter : remove redundant code Reviewed By: EricGriffith, corporateshark Differential Revision: D66785394 fbshipit-source-id: fb78f7c40a6100e265d430888a9bb4b860b20fc2 --- src/igl/opengl/UniformAdapter.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/igl/opengl/UniformAdapter.cpp b/src/igl/opengl/UniformAdapter.cpp index efca78ecd6..c2eaad4e0d 100644 --- a/src/igl/opengl/UniformAdapter.cpp +++ b/src/igl/opengl/UniformAdapter.cpp @@ -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 {