Skip to content

Commit

Permalink
fbsource//xplat/graphics/igl/public/src/igl/opengl [A] [A] [B]
Browse files Browse the repository at this point in the history
Reviewed By: nlutsenko

Differential Revision: D67304877

fbshipit-source-id: 4573d02dba312dc7b2e55e14e1d6a8939d94d2d5
  • Loading branch information
generatedunixname89002005287564 authored and facebook-github-bot committed Dec 17, 2024
1 parent 2a5c7f5 commit fddcebe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/igl/opengl/Device.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<IContext> context);
explicit Device(std::unique_ptr<IContext> context);
~Device() override;

[[nodiscard]] Holder<igl::BindGroupTextureHandle> createBindGroup(
Expand Down
7 changes: 3 additions & 4 deletions src/igl/opengl/DeviceFeatureSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <igl/Common.h>
#include <igl/opengl/GLIncludes.h>
#include <igl/opengl/IContext.h>
#include <igl/opengl/Texture.h>

namespace igl::opengl {
namespace {
Expand Down Expand Up @@ -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.
Expand All @@ -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);
Expand All @@ -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<uint32_t>(tsize);
}
Expand Down

0 comments on commit fddcebe

Please sign in to comment.