From 0a7aebadfbb3534284546aa3ca8612314c08f136 Mon Sep 17 00:00:00 2001 From: Miguel Costa Date: Tue, 26 Jun 2018 16:56:45 +0200 Subject: Update ANGLE to chromium/3280 Change-Id: I0802c0d7486f772d361f87a544d6c5af937f4ca1 Reviewed-by: Friedemann Kleint --- .../angle/src/libANGLE/renderer/TextureImpl.h | 136 +++++++++++++++++---- 1 file changed, 110 insertions(+), 26 deletions(-) (limited to 'src/3rdparty/angle/src/libANGLE/renderer/TextureImpl.h') diff --git a/src/3rdparty/angle/src/libANGLE/renderer/TextureImpl.h b/src/3rdparty/angle/src/libANGLE/renderer/TextureImpl.h index ad4ec8d830..3b4f28f5f7 100644 --- a/src/3rdparty/angle/src/libANGLE/renderer/TextureImpl.h +++ b/src/3rdparty/angle/src/libANGLE/renderer/TextureImpl.h @@ -14,8 +14,10 @@ #include "angle_gl.h" #include "common/angleutils.h" #include "libANGLE/Error.h" -#include "libANGLE/FramebufferAttachment.h" #include "libANGLE/ImageIndex.h" +#include "libANGLE/Stream.h" +#include "libANGLE/Texture.h" +#include "libANGLE/renderer/FramebufferAttachmentObjectImpl.h" namespace egl { @@ -36,38 +38,120 @@ struct TextureState; namespace rx { +class ContextImpl; class TextureImpl : public FramebufferAttachmentObjectImpl { public: - TextureImpl() {} - virtual ~TextureImpl() {} - - virtual void setUsage(GLenum usage) = 0; - - virtual gl::Error setImage(GLenum target, size_t level, GLenum internalFormat, const gl::Extents &size, GLenum format, GLenum type, - const gl::PixelUnpackState &unpack, const uint8_t *pixels) = 0; - virtual gl::Error setSubImage(GLenum target, size_t level, const gl::Box &area, GLenum format, GLenum type, - const gl::PixelUnpackState &unpack, const uint8_t *pixels) = 0; - - virtual gl::Error setCompressedImage(GLenum target, size_t level, GLenum internalFormat, const gl::Extents &size, - const gl::PixelUnpackState &unpack, size_t imageSize, const uint8_t *pixels) = 0; - virtual gl::Error setCompressedSubImage(GLenum target, size_t level, const gl::Box &area, GLenum format, - const gl::PixelUnpackState &unpack, size_t imageSize, const uint8_t *pixels) = 0; - - virtual gl::Error copyImage(GLenum target, size_t level, const gl::Rectangle &sourceArea, GLenum internalFormat, + TextureImpl(const gl::TextureState &state); + ~TextureImpl() override; + + virtual gl::Error onDestroy(const gl::Context *context); + + virtual gl::Error setImage(const gl::Context *context, + GLenum target, + size_t level, + GLenum internalFormat, + const gl::Extents &size, + GLenum format, + GLenum type, + const gl::PixelUnpackState &unpack, + const uint8_t *pixels) = 0; + virtual gl::Error setSubImage(const gl::Context *context, + GLenum target, + size_t level, + const gl::Box &area, + GLenum format, + GLenum type, + const gl::PixelUnpackState &unpack, + const uint8_t *pixels) = 0; + + virtual gl::Error setCompressedImage(const gl::Context *context, + GLenum target, + size_t level, + GLenum internalFormat, + const gl::Extents &size, + const gl::PixelUnpackState &unpack, + size_t imageSize, + const uint8_t *pixels) = 0; + virtual gl::Error setCompressedSubImage(const gl::Context *context, + GLenum target, + size_t level, + const gl::Box &area, + GLenum format, + const gl::PixelUnpackState &unpack, + size_t imageSize, + const uint8_t *pixels) = 0; + + virtual gl::Error copyImage(const gl::Context *context, + GLenum target, + size_t level, + const gl::Rectangle &sourceArea, + GLenum internalFormat, const gl::Framebuffer *source) = 0; - virtual gl::Error copySubImage(GLenum target, size_t level, const gl::Offset &destOffset, const gl::Rectangle &sourceArea, + virtual gl::Error copySubImage(const gl::Context *context, + GLenum target, + size_t level, + const gl::Offset &destOffset, + const gl::Rectangle &sourceArea, const gl::Framebuffer *source) = 0; - virtual gl::Error setStorage(GLenum target, size_t levels, GLenum internalFormat, const gl::Extents &size) = 0; - - virtual gl::Error setEGLImageTarget(GLenum target, egl::Image *image) = 0; - - virtual gl::Error generateMipmaps(const gl::TextureState &textureState) = 0; - - virtual void bindTexImage(egl::Surface *surface) = 0; - virtual void releaseTexImage() = 0; + virtual gl::Error copyTexture(const gl::Context *context, + GLenum target, + size_t level, + GLenum internalFormat, + GLenum type, + size_t sourceLevel, + bool unpackFlipY, + bool unpackPremultiplyAlpha, + bool unpackUnmultiplyAlpha, + const gl::Texture *source); + virtual gl::Error copySubTexture(const gl::Context *context, + GLenum target, + size_t level, + const gl::Offset &destOffset, + size_t sourceLevel, + const gl::Rectangle &sourceArea, + bool unpackFlipY, + bool unpackPremultiplyAlpha, + bool unpackUnmultiplyAlpha, + const gl::Texture *source); + + virtual gl::Error copyCompressedTexture(const gl::Context *context, const gl::Texture *source); + + virtual gl::Error setStorage(const gl::Context *context, + GLenum target, + size_t levels, + GLenum internalFormat, + const gl::Extents &size) = 0; + + virtual gl::Error setStorageMultisample(const gl::Context *context, + GLenum target, + GLsizei samples, + GLint internalformat, + const gl::Extents &size, + bool fixedSampleLocations) = 0; + + virtual gl::Error setEGLImageTarget(const gl::Context *context, + GLenum target, + egl::Image *image) = 0; + + virtual gl::Error setImageExternal(const gl::Context *context, + GLenum target, + egl::Stream *stream, + const egl::Stream::GLTextureDescription &desc) = 0; + + virtual gl::Error generateMipmap(const gl::Context *context) = 0; + + virtual gl::Error setBaseLevel(const gl::Context *context, GLuint baseLevel) = 0; + + virtual gl::Error bindTexImage(const gl::Context *context, egl::Surface *surface) = 0; + virtual gl::Error releaseTexImage(const gl::Context *context) = 0; + + virtual void syncState(const gl::Texture::DirtyBits &dirtyBits) = 0; + + protected: + const gl::TextureState &mState; }; } -- cgit v1.2.3