From fddcebeb7368ed595b7e26cea47718e7960a3b32 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005287564 Date: Tue, 17 Dec 2024 10:55:31 -0800 Subject: [PATCH] fbsource//xplat/graphics/igl/public/src/igl/opengl [A] [A] [B] Reviewed By: nlutsenko Differential Revision: D67304877 fbshipit-source-id: 4573d02dba312dc7b2e55e14e1d6a8939d94d2d5 --- src/igl/opengl/Device.h | 3 +-- src/igl/opengl/DeviceFeatureSet.cpp | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/igl/opengl/Device.h b/src/igl/opengl/Device.h index 6cbcaa4800..42fce736dc 100644 --- a/src/igl/opengl/Device.h +++ b/src/igl/opengl/Device.h @@ -18,14 +18,13 @@ namespace igl::opengl { class CommandQueue; -class Texture; class Device : public IDevice { friend class HWDevice; friend class PlatformDevice; public: - Device(std::unique_ptr context); + explicit Device(std::unique_ptr context); ~Device() override; [[nodiscard]] Holder createBindGroup( diff --git a/src/igl/opengl/DeviceFeatureSet.cpp b/src/igl/opengl/DeviceFeatureSet.cpp index ebff437825..e4927913eb 100644 --- a/src/igl/opengl/DeviceFeatureSet.cpp +++ b/src/igl/opengl/DeviceFeatureSet.cpp @@ -10,7 +10,6 @@ #include #include #include -#include namespace igl::opengl { namespace { @@ -1570,7 +1569,7 @@ ICapabilities::TextureFormatCapabilities DeviceFeatureSet::getTextureFormatCapab } uint32_t DeviceFeatureSet::getMaxVertexUniforms() const { - GLint tsize; + GLint tsize = 0; // MaxVertexUniformVectors is the maximum number of 4-element vectors that can be passed as // uniform to a vertex shader. All uniforms are 4-element aligned, a single uniform counts at // least as one 4-element vector. @@ -1587,7 +1586,7 @@ uint32_t DeviceFeatureSet::getMaxVertexUniforms() const { } uint32_t DeviceFeatureSet::getMaxFragmentUniforms() const { - GLint tsize; + GLint tsize = 0; // PLease see comments above in getMaxVertexUniforms if (hasDesktopOrESVersion(*this, GLVersion::v2_0, GLVersion::v3_0_ES)) { glContext_.getIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, &tsize); @@ -1600,7 +1599,7 @@ uint32_t DeviceFeatureSet::getMaxFragmentUniforms() const { uint32_t DeviceFeatureSet::getMaxComputeUniforms() const { if (hasFeature(DeviceFeatures::Compute)) { - GLint tsize; + GLint tsize = 0; glContext_.getIntegerv(GL_MAX_COMPUTE_UNIFORM_COMPONENTS, &tsize); return static_cast(tsize); }