xref: /aosp_15_r20/external/angle/src/libANGLE/renderer/null/TextureNULL.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1*8975f5c5SAndroid Build Coastguard Worker //
2*8975f5c5SAndroid Build Coastguard Worker // Copyright 2016 The ANGLE Project Authors. All rights reserved.
3*8975f5c5SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be
4*8975f5c5SAndroid Build Coastguard Worker // found in the LICENSE file.
5*8975f5c5SAndroid Build Coastguard Worker //
6*8975f5c5SAndroid Build Coastguard Worker // TextureNULL.h:
7*8975f5c5SAndroid Build Coastguard Worker //    Defines the class interface for TextureNULL, implementing TextureImpl.
8*8975f5c5SAndroid Build Coastguard Worker //
9*8975f5c5SAndroid Build Coastguard Worker 
10*8975f5c5SAndroid Build Coastguard Worker #ifndef LIBANGLE_RENDERER_NULL_TEXTURENULL_H_
11*8975f5c5SAndroid Build Coastguard Worker #define LIBANGLE_RENDERER_NULL_TEXTURENULL_H_
12*8975f5c5SAndroid Build Coastguard Worker 
13*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/TextureImpl.h"
14*8975f5c5SAndroid Build Coastguard Worker 
15*8975f5c5SAndroid Build Coastguard Worker namespace rx
16*8975f5c5SAndroid Build Coastguard Worker {
17*8975f5c5SAndroid Build Coastguard Worker 
18*8975f5c5SAndroid Build Coastguard Worker class TextureNULL : public TextureImpl
19*8975f5c5SAndroid Build Coastguard Worker {
20*8975f5c5SAndroid Build Coastguard Worker   public:
21*8975f5c5SAndroid Build Coastguard Worker     TextureNULL(const gl::TextureState &state);
22*8975f5c5SAndroid Build Coastguard Worker     ~TextureNULL() override;
23*8975f5c5SAndroid Build Coastguard Worker 
24*8975f5c5SAndroid Build Coastguard Worker     angle::Result setImage(const gl::Context *context,
25*8975f5c5SAndroid Build Coastguard Worker                            const gl::ImageIndex &index,
26*8975f5c5SAndroid Build Coastguard Worker                            GLenum internalFormat,
27*8975f5c5SAndroid Build Coastguard Worker                            const gl::Extents &size,
28*8975f5c5SAndroid Build Coastguard Worker                            GLenum format,
29*8975f5c5SAndroid Build Coastguard Worker                            GLenum type,
30*8975f5c5SAndroid Build Coastguard Worker                            const gl::PixelUnpackState &unpack,
31*8975f5c5SAndroid Build Coastguard Worker                            gl::Buffer *unpackBuffer,
32*8975f5c5SAndroid Build Coastguard Worker                            const uint8_t *pixels) override;
33*8975f5c5SAndroid Build Coastguard Worker     angle::Result setSubImage(const gl::Context *context,
34*8975f5c5SAndroid Build Coastguard Worker                               const gl::ImageIndex &index,
35*8975f5c5SAndroid Build Coastguard Worker                               const gl::Box &area,
36*8975f5c5SAndroid Build Coastguard Worker                               GLenum format,
37*8975f5c5SAndroid Build Coastguard Worker                               GLenum type,
38*8975f5c5SAndroid Build Coastguard Worker                               const gl::PixelUnpackState &unpack,
39*8975f5c5SAndroid Build Coastguard Worker                               gl::Buffer *unpackBuffer,
40*8975f5c5SAndroid Build Coastguard Worker                               const uint8_t *pixels) override;
41*8975f5c5SAndroid Build Coastguard Worker 
42*8975f5c5SAndroid Build Coastguard Worker     angle::Result setCompressedImage(const gl::Context *context,
43*8975f5c5SAndroid Build Coastguard Worker                                      const gl::ImageIndex &index,
44*8975f5c5SAndroid Build Coastguard Worker                                      GLenum internalFormat,
45*8975f5c5SAndroid Build Coastguard Worker                                      const gl::Extents &size,
46*8975f5c5SAndroid Build Coastguard Worker                                      const gl::PixelUnpackState &unpack,
47*8975f5c5SAndroid Build Coastguard Worker                                      size_t imageSize,
48*8975f5c5SAndroid Build Coastguard Worker                                      const uint8_t *pixels) override;
49*8975f5c5SAndroid Build Coastguard Worker     angle::Result setCompressedSubImage(const gl::Context *context,
50*8975f5c5SAndroid Build Coastguard Worker                                         const gl::ImageIndex &index,
51*8975f5c5SAndroid Build Coastguard Worker                                         const gl::Box &area,
52*8975f5c5SAndroid Build Coastguard Worker                                         GLenum format,
53*8975f5c5SAndroid Build Coastguard Worker                                         const gl::PixelUnpackState &unpack,
54*8975f5c5SAndroid Build Coastguard Worker                                         size_t imageSize,
55*8975f5c5SAndroid Build Coastguard Worker                                         const uint8_t *pixels) override;
56*8975f5c5SAndroid Build Coastguard Worker 
57*8975f5c5SAndroid Build Coastguard Worker     angle::Result copyImage(const gl::Context *context,
58*8975f5c5SAndroid Build Coastguard Worker                             const gl::ImageIndex &index,
59*8975f5c5SAndroid Build Coastguard Worker                             const gl::Rectangle &sourceArea,
60*8975f5c5SAndroid Build Coastguard Worker                             GLenum internalFormat,
61*8975f5c5SAndroid Build Coastguard Worker                             gl::Framebuffer *source) override;
62*8975f5c5SAndroid Build Coastguard Worker     angle::Result copySubImage(const gl::Context *context,
63*8975f5c5SAndroid Build Coastguard Worker                                const gl::ImageIndex &index,
64*8975f5c5SAndroid Build Coastguard Worker                                const gl::Offset &destOffset,
65*8975f5c5SAndroid Build Coastguard Worker                                const gl::Rectangle &sourceArea,
66*8975f5c5SAndroid Build Coastguard Worker                                gl::Framebuffer *source) override;
67*8975f5c5SAndroid Build Coastguard Worker 
68*8975f5c5SAndroid Build Coastguard Worker     angle::Result copyTexture(const gl::Context *context,
69*8975f5c5SAndroid Build Coastguard Worker                               const gl::ImageIndex &index,
70*8975f5c5SAndroid Build Coastguard Worker                               GLenum internalFormat,
71*8975f5c5SAndroid Build Coastguard Worker                               GLenum type,
72*8975f5c5SAndroid Build Coastguard Worker                               GLint sourceLevel,
73*8975f5c5SAndroid Build Coastguard Worker                               bool unpackFlipY,
74*8975f5c5SAndroid Build Coastguard Worker                               bool unpackPremultiplyAlpha,
75*8975f5c5SAndroid Build Coastguard Worker                               bool unpackUnmultiplyAlpha,
76*8975f5c5SAndroid Build Coastguard Worker                               const gl::Texture *source) override;
77*8975f5c5SAndroid Build Coastguard Worker     angle::Result copySubTexture(const gl::Context *context,
78*8975f5c5SAndroid Build Coastguard Worker                                  const gl::ImageIndex &index,
79*8975f5c5SAndroid Build Coastguard Worker                                  const gl::Offset &destOffset,
80*8975f5c5SAndroid Build Coastguard Worker                                  GLint sourceLevel,
81*8975f5c5SAndroid Build Coastguard Worker                                  const gl::Box &sourceBox,
82*8975f5c5SAndroid Build Coastguard Worker                                  bool unpackFlipY,
83*8975f5c5SAndroid Build Coastguard Worker                                  bool unpackPremultiplyAlpha,
84*8975f5c5SAndroid Build Coastguard Worker                                  bool unpackUnmultiplyAlpha,
85*8975f5c5SAndroid Build Coastguard Worker                                  const gl::Texture *source) override;
86*8975f5c5SAndroid Build Coastguard Worker 
87*8975f5c5SAndroid Build Coastguard Worker     angle::Result copyRenderbufferSubData(const gl::Context *context,
88*8975f5c5SAndroid Build Coastguard Worker                                           const gl::Renderbuffer *srcBuffer,
89*8975f5c5SAndroid Build Coastguard Worker                                           GLint srcLevel,
90*8975f5c5SAndroid Build Coastguard Worker                                           GLint srcX,
91*8975f5c5SAndroid Build Coastguard Worker                                           GLint srcY,
92*8975f5c5SAndroid Build Coastguard Worker                                           GLint srcZ,
93*8975f5c5SAndroid Build Coastguard Worker                                           GLint dstLevel,
94*8975f5c5SAndroid Build Coastguard Worker                                           GLint dstX,
95*8975f5c5SAndroid Build Coastguard Worker                                           GLint dstY,
96*8975f5c5SAndroid Build Coastguard Worker                                           GLint dstZ,
97*8975f5c5SAndroid Build Coastguard Worker                                           GLsizei srcWidth,
98*8975f5c5SAndroid Build Coastguard Worker                                           GLsizei srcHeight,
99*8975f5c5SAndroid Build Coastguard Worker                                           GLsizei srcDepth) override;
100*8975f5c5SAndroid Build Coastguard Worker 
101*8975f5c5SAndroid Build Coastguard Worker     angle::Result copyTextureSubData(const gl::Context *context,
102*8975f5c5SAndroid Build Coastguard Worker                                      const gl::Texture *srcTexture,
103*8975f5c5SAndroid Build Coastguard Worker                                      GLint srcLevel,
104*8975f5c5SAndroid Build Coastguard Worker                                      GLint srcX,
105*8975f5c5SAndroid Build Coastguard Worker                                      GLint srcY,
106*8975f5c5SAndroid Build Coastguard Worker                                      GLint srcZ,
107*8975f5c5SAndroid Build Coastguard Worker                                      GLint dstLevel,
108*8975f5c5SAndroid Build Coastguard Worker                                      GLint dstX,
109*8975f5c5SAndroid Build Coastguard Worker                                      GLint dstY,
110*8975f5c5SAndroid Build Coastguard Worker                                      GLint dstZ,
111*8975f5c5SAndroid Build Coastguard Worker                                      GLsizei srcWidth,
112*8975f5c5SAndroid Build Coastguard Worker                                      GLsizei srcHeight,
113*8975f5c5SAndroid Build Coastguard Worker                                      GLsizei srcDepth) override;
114*8975f5c5SAndroid Build Coastguard Worker 
115*8975f5c5SAndroid Build Coastguard Worker     angle::Result copyCompressedTexture(const gl::Context *context,
116*8975f5c5SAndroid Build Coastguard Worker                                         const gl::Texture *source) override;
117*8975f5c5SAndroid Build Coastguard Worker 
118*8975f5c5SAndroid Build Coastguard Worker     angle::Result setStorage(const gl::Context *context,
119*8975f5c5SAndroid Build Coastguard Worker                              gl::TextureType type,
120*8975f5c5SAndroid Build Coastguard Worker                              size_t levels,
121*8975f5c5SAndroid Build Coastguard Worker                              GLenum internalFormat,
122*8975f5c5SAndroid Build Coastguard Worker                              const gl::Extents &size) override;
123*8975f5c5SAndroid Build Coastguard Worker 
124*8975f5c5SAndroid Build Coastguard Worker     angle::Result setStorageExternalMemory(const gl::Context *context,
125*8975f5c5SAndroid Build Coastguard Worker                                            gl::TextureType type,
126*8975f5c5SAndroid Build Coastguard Worker                                            size_t levels,
127*8975f5c5SAndroid Build Coastguard Worker                                            GLenum internalFormat,
128*8975f5c5SAndroid Build Coastguard Worker                                            const gl::Extents &size,
129*8975f5c5SAndroid Build Coastguard Worker                                            gl::MemoryObject *memoryObject,
130*8975f5c5SAndroid Build Coastguard Worker                                            GLuint64 offset,
131*8975f5c5SAndroid Build Coastguard Worker                                            GLbitfield createFlags,
132*8975f5c5SAndroid Build Coastguard Worker                                            GLbitfield usageFlags,
133*8975f5c5SAndroid Build Coastguard Worker                                            const void *imageCreateInfoPNext) override;
134*8975f5c5SAndroid Build Coastguard Worker 
135*8975f5c5SAndroid Build Coastguard Worker     angle::Result setEGLImageTarget(const gl::Context *context,
136*8975f5c5SAndroid Build Coastguard Worker                                     gl::TextureType type,
137*8975f5c5SAndroid Build Coastguard Worker                                     egl::Image *image) override;
138*8975f5c5SAndroid Build Coastguard Worker 
139*8975f5c5SAndroid Build Coastguard Worker     angle::Result setImageExternal(const gl::Context *context,
140*8975f5c5SAndroid Build Coastguard Worker                                    gl::TextureType type,
141*8975f5c5SAndroid Build Coastguard Worker                                    egl::Stream *stream,
142*8975f5c5SAndroid Build Coastguard Worker                                    const egl::Stream::GLTextureDescription &desc) override;
143*8975f5c5SAndroid Build Coastguard Worker 
144*8975f5c5SAndroid Build Coastguard Worker     angle::Result generateMipmap(const gl::Context *context) override;
145*8975f5c5SAndroid Build Coastguard Worker 
146*8975f5c5SAndroid Build Coastguard Worker     angle::Result setBaseLevel(const gl::Context *context, GLuint baseLevel) override;
147*8975f5c5SAndroid Build Coastguard Worker 
148*8975f5c5SAndroid Build Coastguard Worker     angle::Result bindTexImage(const gl::Context *context, egl::Surface *surface) override;
149*8975f5c5SAndroid Build Coastguard Worker     angle::Result releaseTexImage(const gl::Context *context) override;
150*8975f5c5SAndroid Build Coastguard Worker 
151*8975f5c5SAndroid Build Coastguard Worker     angle::Result syncState(const gl::Context *context,
152*8975f5c5SAndroid Build Coastguard Worker                             const gl::Texture::DirtyBits &dirtyBits,
153*8975f5c5SAndroid Build Coastguard Worker                             gl::Command source) override;
154*8975f5c5SAndroid Build Coastguard Worker 
155*8975f5c5SAndroid Build Coastguard Worker     angle::Result setStorageMultisample(const gl::Context *context,
156*8975f5c5SAndroid Build Coastguard Worker                                         gl::TextureType type,
157*8975f5c5SAndroid Build Coastguard Worker                                         GLsizei samples,
158*8975f5c5SAndroid Build Coastguard Worker                                         GLint internalformat,
159*8975f5c5SAndroid Build Coastguard Worker                                         const gl::Extents &size,
160*8975f5c5SAndroid Build Coastguard Worker                                         bool fixedSampleLocations) override;
161*8975f5c5SAndroid Build Coastguard Worker 
162*8975f5c5SAndroid Build Coastguard Worker     angle::Result initializeContents(const gl::Context *context,
163*8975f5c5SAndroid Build Coastguard Worker                                      GLenum binding,
164*8975f5c5SAndroid Build Coastguard Worker                                      const gl::ImageIndex &imageIndex) override;
165*8975f5c5SAndroid Build Coastguard Worker };
166*8975f5c5SAndroid Build Coastguard Worker 
167*8975f5c5SAndroid Build Coastguard Worker }  // namespace rx
168*8975f5c5SAndroid Build Coastguard Worker 
169*8975f5c5SAndroid Build Coastguard Worker #endif  // LIBANGLE_RENDERER_NULL_TEXTURENULL_H_
170