Commit 9c074a39 by Jamie Madill

Add queries for level and layer to FBO attachments.

BUG=angle:660 Change-Id: I03e76dd7743267dc0b57cf53a4d27cd75a5d5adf Reviewed-on: https://chromium-review.googlesource.com/201837Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 218b6ede
...@@ -115,6 +115,16 @@ GLenum Texture2DAttachment::type() const ...@@ -115,6 +115,16 @@ GLenum Texture2DAttachment::type() const
return GL_TEXTURE_2D; return GL_TEXTURE_2D;
} }
GLint Texture2DAttachment::mipLevel() const
{
return mLevel;
}
GLint Texture2DAttachment::layer() const
{
return 0;
}
unsigned int Texture2DAttachment::getTextureSerial() const unsigned int Texture2DAttachment::getTextureSerial() const
{ {
return mTexture2D->getTextureSerial(); return mTexture2D->getTextureSerial();
...@@ -200,6 +210,16 @@ GLenum TextureCubeMapAttachment::type() const ...@@ -200,6 +210,16 @@ GLenum TextureCubeMapAttachment::type() const
return mFaceTarget; return mFaceTarget;
} }
GLint TextureCubeMapAttachment::mipLevel() const
{
return mLevel;
}
GLint TextureCubeMapAttachment::layer() const
{
return 0;
}
unsigned int TextureCubeMapAttachment::getTextureSerial() const unsigned int TextureCubeMapAttachment::getTextureSerial() const
{ {
return mTextureCubeMap->getTextureSerial(); return mTextureCubeMap->getTextureSerial();
...@@ -285,6 +305,16 @@ GLenum Texture3DAttachment::type() const ...@@ -285,6 +305,16 @@ GLenum Texture3DAttachment::type() const
return GL_TEXTURE_3D; return GL_TEXTURE_3D;
} }
GLint Texture3DAttachment::mipLevel() const
{
return mLevel;
}
GLint Texture3DAttachment::layer() const
{
return mLayer;
}
unsigned int Texture3DAttachment::getTextureSerial() const unsigned int Texture3DAttachment::getTextureSerial() const
{ {
return mTexture3D->getTextureSerial(); return mTexture3D->getTextureSerial();
...@@ -368,6 +398,16 @@ GLenum Texture2DArrayAttachment::type() const ...@@ -368,6 +398,16 @@ GLenum Texture2DArrayAttachment::type() const
return GL_TEXTURE_2D_ARRAY; return GL_TEXTURE_2D_ARRAY;
} }
GLint Texture2DArrayAttachment::mipLevel() const
{
return mLevel;
}
GLint Texture2DArrayAttachment::layer() const
{
return mLayer;
}
unsigned int Texture2DArrayAttachment::getTextureSerial() const unsigned int Texture2DArrayAttachment::getTextureSerial() const
{ {
return mTexture2DArray->getTextureSerial(); return mTexture2DArray->getTextureSerial();
...@@ -545,6 +585,16 @@ GLuint FramebufferAttachment::type() const ...@@ -545,6 +585,16 @@ GLuint FramebufferAttachment::type() const
return mImpl->type(); return mImpl->type();
} }
GLint FramebufferAttachment::mipLevel() const
{
return mImpl->mipLevel();
}
GLint FramebufferAttachment::layer() const
{
return mImpl->layer();
}
unsigned int FramebufferAttachment::getTextureSerial() const unsigned int FramebufferAttachment::getTextureSerial() const
{ {
return mImpl->getTextureSerial(); return mImpl->getTextureSerial();
...@@ -625,6 +675,16 @@ GLenum RenderbufferAttachment::type() const ...@@ -625,6 +675,16 @@ GLenum RenderbufferAttachment::type() const
return GL_RENDERBUFFER; return GL_RENDERBUFFER;
} }
GLint RenderbufferAttachment::mipLevel() const
{
return 0;
}
GLint RenderbufferAttachment::layer() const
{
return 0;
}
unsigned int RenderbufferAttachment::getTextureSerial() const unsigned int RenderbufferAttachment::getTextureSerial() const
{ {
UNREACHABLE(); UNREACHABLE();
......
...@@ -76,6 +76,8 @@ class FramebufferAttachment : public RefCountObject ...@@ -76,6 +76,8 @@ class FramebufferAttachment : public RefCountObject
GLuint id() const; GLuint id() const;
GLenum type() const; GLenum type() const;
GLint mipLevel() const;
GLint layer() const;
unsigned int getTextureSerial() const; unsigned int getTextureSerial() const;
void setImplementation(FramebufferAttachmentImpl *newImpl); void setImplementation(FramebufferAttachmentImpl *newImpl);
...@@ -110,6 +112,8 @@ class FramebufferAttachmentImpl ...@@ -110,6 +112,8 @@ class FramebufferAttachmentImpl
virtual GLuint id() const = 0; virtual GLuint id() const = 0;
virtual GLenum type() const = 0; virtual GLenum type() const = 0;
virtual GLint mipLevel() const = 0;
virtual GLint layer() const = 0;
virtual unsigned int getTextureSerial() const = 0; virtual unsigned int getTextureSerial() const = 0;
private: private:
...@@ -140,6 +144,8 @@ class Texture2DAttachment : public FramebufferAttachmentImpl ...@@ -140,6 +144,8 @@ class Texture2DAttachment : public FramebufferAttachmentImpl
virtual GLuint id() const; virtual GLuint id() const;
virtual GLenum type() const; virtual GLenum type() const;
virtual GLint mipLevel() const;
virtual GLint layer() const;
virtual unsigned int getTextureSerial() const; virtual unsigned int getTextureSerial() const;
private: private:
...@@ -173,6 +179,8 @@ class TextureCubeMapAttachment : public FramebufferAttachmentImpl ...@@ -173,6 +179,8 @@ class TextureCubeMapAttachment : public FramebufferAttachmentImpl
virtual GLuint id() const; virtual GLuint id() const;
virtual GLenum type() const; virtual GLenum type() const;
virtual GLint mipLevel() const;
virtual GLint layer() const;
virtual unsigned int getTextureSerial() const; virtual unsigned int getTextureSerial() const;
private: private:
...@@ -207,6 +215,8 @@ class Texture3DAttachment : public FramebufferAttachmentImpl ...@@ -207,6 +215,8 @@ class Texture3DAttachment : public FramebufferAttachmentImpl
virtual GLuint id() const; virtual GLuint id() const;
virtual GLenum type() const; virtual GLenum type() const;
virtual GLint mipLevel() const;
virtual GLint layer() const;
virtual unsigned int getTextureSerial() const; virtual unsigned int getTextureSerial() const;
private: private:
...@@ -241,6 +251,8 @@ class Texture2DArrayAttachment : public FramebufferAttachmentImpl ...@@ -241,6 +251,8 @@ class Texture2DArrayAttachment : public FramebufferAttachmentImpl
virtual GLuint id() const; virtual GLuint id() const;
virtual GLenum type() const; virtual GLenum type() const;
virtual GLint mipLevel() const;
virtual GLint layer() const;
virtual unsigned int getTextureSerial() const; virtual unsigned int getTextureSerial() const;
private: private:
...@@ -272,6 +284,8 @@ class RenderbufferAttachment : public FramebufferAttachmentImpl ...@@ -272,6 +284,8 @@ class RenderbufferAttachment : public FramebufferAttachmentImpl
virtual GLuint id() const; virtual GLuint id() const;
virtual GLenum type() const; virtual GLenum type() const;
virtual GLint mipLevel() const;
virtual GLint layer() const;
virtual unsigned int getTextureSerial() const; virtual unsigned int getTextureSerial() const;
private: private:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment