From b32d56257662cc68469465f4e9774240afc33ac6 Mon Sep 17 00:00:00 2001 From: Dev Mannemela Date: Mon, 18 Sep 2023 18:22:01 -0700 Subject: [PATCH] IGL | OGL : remove unused function arg 'samples' Summary: After D49225157, 'samples' argument is no longer used. Reviewed By: corporateshark Differential Revision: D49380114 fbshipit-source-id: f440e02a03f2770ad7f0c093c2b65503fcf7a892 --- src/igl/opengl/SamplerState.cpp | 2 +- src/igl/opengl/Texture.cpp | 2 +- src/igl/opengl/Texture.h | 2 +- src/igl/opengl/TextureBuffer.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/igl/opengl/SamplerState.cpp b/src/igl/opengl/SamplerState.cpp index 14b59edd85..453f79104a 100644 --- a/src/igl/opengl/SamplerState.cpp +++ b/src/igl/opengl/SamplerState.cpp @@ -50,7 +50,7 @@ void SamplerState::bind(ITexture* t) { texture->setSamplerHash(hash_); auto type = texture->getType(); - auto target = texture->toGLTarget(type, texture->getSamples()); + auto target = texture->toGLTarget(type); if (target == 0) { return; } diff --git a/src/igl/opengl/Texture.cpp b/src/igl/opengl/Texture.cpp index 4dfc1d1e75..a082f3cbe1 100644 --- a/src/igl/opengl/Texture.cpp +++ b/src/igl/opengl/Texture.cpp @@ -126,7 +126,7 @@ bool Texture::isImplicitStorage() const { return false; } -GLenum Texture::toGLTarget(TextureType type, size_t samples) const { +GLenum Texture::toGLTarget(TextureType type) const { switch (type) { case TextureType::TwoD: return GL_TEXTURE_2D; diff --git a/src/igl/opengl/Texture.h b/src/igl/opengl/Texture.h index 5018992f04..64fab04f4b 100644 --- a/src/igl/opengl/Texture.h +++ b/src/igl/opengl/Texture.h @@ -57,7 +57,7 @@ class Texture : public WithContext, public ITexture { virtual bool isImplicitStorage() const; - [[nodiscard]] GLenum toGLTarget(TextureType type, size_t samples = 1) const; + [[nodiscard]] GLenum toGLTarget(TextureType type) const; static TextureFormat glInternalFormatToTextureFormat(GLuint glTexInternalFormat, GLuint glTexFormat, GLuint glTexType); diff --git a/src/igl/opengl/TextureBuffer.cpp b/src/igl/opengl/TextureBuffer.cpp index 30f3f5fdf2..27d5e92996 100644 --- a/src/igl/opengl/TextureBuffer.cpp +++ b/src/igl/opengl/TextureBuffer.cpp @@ -93,7 +93,7 @@ void TextureBuffer::bindImage(size_t unit) { // create a texture for shader read/write usages Result TextureBuffer::createTexture(const TextureDesc& desc) { - const auto target = toGLTarget(desc.type, desc.numSamples); + const auto target = toGLTarget(desc.type); if (target == 0) { return Result(Result::Code::Unsupported, "Unsupported texture target"); }