diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
commit | 6630937e63ae5797487b86743a7733c8ae5cc42c (patch) | |
tree | 3d53dacf6430f9099e1fb20835881205de674961 /src/3rdparty/angle/src/libANGLE/renderer/d3d/TextureStorage.h | |
parent | 37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff) | |
parent | c7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff) |
Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
Diffstat (limited to 'src/3rdparty/angle/src/libANGLE/renderer/d3d/TextureStorage.h')
-rw-r--r-- | src/3rdparty/angle/src/libANGLE/renderer/d3d/TextureStorage.h | 44 |
1 files changed, 34 insertions, 10 deletions
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/TextureStorage.h b/src/3rdparty/angle/src/libANGLE/renderer/d3d/TextureStorage.h index 417237495d..383fbc2141 100644 --- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/TextureStorage.h +++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/TextureStorage.h @@ -9,20 +9,19 @@ #ifndef LIBANGLE_RENDERER_D3D_TEXTURESTORAGE_H_ #define LIBANGLE_RENDERER_D3D_TEXTURESTORAGE_H_ -#include "libANGLE/Error.h" - #include "common/debug.h" -#include "libANGLE/Error.h" +#include "libANGLE/angletypes.h" #include <GLES2/gl2.h> #include <stdint.h> namespace gl { +class Context; struct ImageIndex; struct Box; struct PixelUnpackState; -} +} // namespace gl namespace rx { @@ -36,23 +35,48 @@ class TextureStorage : angle::NonCopyable TextureStorage() {} virtual ~TextureStorage() {} + virtual gl::Error onDestroy(const gl::Context *context); + virtual int getTopLevel() const = 0; virtual bool isRenderTarget() const = 0; virtual bool isManaged() const = 0; virtual bool supportsNativeMipmapFunction() const = 0; virtual int getLevelCount() const = 0; - virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT) = 0; - virtual gl::Error generateMipmap(const gl::ImageIndex &sourceIndex, const gl::ImageIndex &destIndex) = 0; + virtual gl::Error getRenderTarget(const gl::Context *context, + const gl::ImageIndex &index, + RenderTargetD3D **outRT) = 0; + virtual gl::Error generateMipmap(const gl::Context *context, + const gl::ImageIndex &sourceIndex, + const gl::ImageIndex &destIndex) = 0; - virtual gl::Error copyToStorage(TextureStorage *destStorage) = 0; - virtual gl::Error setData(const gl::ImageIndex &index, ImageD3D *image, const gl::Box *destBox, GLenum type, - const gl::PixelUnpackState &unpack, const uint8_t *pixelData) = 0; + virtual gl::Error copyToStorage(const gl::Context *context, TextureStorage *destStorage) = 0; + virtual gl::Error setData(const gl::Context *context, + const gl::ImageIndex &index, + ImageD3D *image, + const gl::Box *destBox, + GLenum type, + const gl::PixelUnpackState &unpack, + const uint8_t *pixelData) = 0; // This is a no-op for most implementations of TextureStorage. Some (e.g. TextureStorage11_2D) might override it. - virtual gl::Error useLevelZeroWorkaroundTexture(bool useLevelZeroTexture) { return gl::Error(GL_NO_ERROR); } + virtual gl::Error useLevelZeroWorkaroundTexture(const gl::Context *context, + bool useLevelZeroTexture); }; +inline gl::Error TextureStorage::onDestroy(const gl::Context *context) +{ + return gl::NoError(); } +inline gl::Error TextureStorage::useLevelZeroWorkaroundTexture(const gl::Context *context, + bool useLevelZeroTexture) +{ + return gl::NoError(); +} + +using TexStoragePointer = angle::UniqueObjectPointer<TextureStorage, gl::Context>; + +} // namespace rx + #endif // LIBANGLE_RENDERER_D3D_TEXTURESTORAGE_H_ |