1 //
2 // Copyright 2016 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6
7 // TextureImpl.cpp: Defines the abstract rx::TextureImpl classes.
8
9 #include "libANGLE/renderer/TextureImpl.h"
10
11 namespace rx
12 {
TextureImpl(const gl::TextureState & state)13 TextureImpl::TextureImpl(const gl::TextureState &state) : mState(state) {}
14
~TextureImpl()15 TextureImpl::~TextureImpl() {}
16
onDestroy(const gl::Context * context)17 void TextureImpl::onDestroy(const gl::Context *context) {}
18
copyTexture(const gl::Context * context,const gl::ImageIndex & index,GLenum internalFormat,GLenum type,GLint sourceLevel,bool unpackFlipY,bool unpackPremultiplyAlpha,bool unpackUnmultiplyAlpha,const gl::Texture * source)19 angle::Result TextureImpl::copyTexture(const gl::Context *context,
20 const gl::ImageIndex &index,
21 GLenum internalFormat,
22 GLenum type,
23 GLint sourceLevel,
24 bool unpackFlipY,
25 bool unpackPremultiplyAlpha,
26 bool unpackUnmultiplyAlpha,
27 const gl::Texture *source)
28 {
29 UNREACHABLE();
30 return angle::Result::Stop;
31 }
32
copySubTexture(const gl::Context * context,const gl::ImageIndex & index,const gl::Offset & destOffset,GLint sourceLevel,const gl::Box & sourceBox,bool unpackFlipY,bool unpackPremultiplyAlpha,bool unpackUnmultiplyAlpha,const gl::Texture * source)33 angle::Result TextureImpl::copySubTexture(const gl::Context *context,
34 const gl::ImageIndex &index,
35 const gl::Offset &destOffset,
36 GLint sourceLevel,
37 const gl::Box &sourceBox,
38 bool unpackFlipY,
39 bool unpackPremultiplyAlpha,
40 bool unpackUnmultiplyAlpha,
41 const gl::Texture *source)
42 {
43 UNREACHABLE();
44 return angle::Result::Stop;
45 }
46
copyRenderbufferSubData(const gl::Context * context,const gl::Renderbuffer * srcBuffer,GLint srcLevel,GLint srcX,GLint srcY,GLint srcZ,GLint dstLevel,GLint dstX,GLint dstY,GLint dstZ,GLsizei srcWidth,GLsizei srcHeight,GLsizei srcDepth)47 angle::Result TextureImpl::copyRenderbufferSubData(const gl::Context *context,
48 const gl::Renderbuffer *srcBuffer,
49 GLint srcLevel,
50 GLint srcX,
51 GLint srcY,
52 GLint srcZ,
53 GLint dstLevel,
54 GLint dstX,
55 GLint dstY,
56 GLint dstZ,
57 GLsizei srcWidth,
58 GLsizei srcHeight,
59 GLsizei srcDepth)
60 {
61 UNREACHABLE();
62 return angle::Result::Stop;
63 }
64
copyTextureSubData(const gl::Context * context,const gl::Texture * srcTexture,GLint srcLevel,GLint srcX,GLint srcY,GLint srcZ,GLint dstLevel,GLint dstX,GLint dstY,GLint dstZ,GLsizei srcWidth,GLsizei srcHeight,GLsizei srcDepth)65 angle::Result TextureImpl::copyTextureSubData(const gl::Context *context,
66 const gl::Texture *srcTexture,
67 GLint srcLevel,
68 GLint srcX,
69 GLint srcY,
70 GLint srcZ,
71 GLint dstLevel,
72 GLint dstX,
73 GLint dstY,
74 GLint dstZ,
75 GLsizei srcWidth,
76 GLsizei srcHeight,
77 GLsizei srcDepth)
78 {
79 UNREACHABLE();
80 return angle::Result::Stop;
81 }
82
copyCompressedTexture(const gl::Context * context,const gl::Texture * source)83 angle::Result TextureImpl::copyCompressedTexture(const gl::Context *context,
84 const gl::Texture *source)
85 {
86 UNREACHABLE();
87 return angle::Result::Stop;
88 }
89
copy3DTexture(const gl::Context * context,gl::TextureTarget target,GLenum internalFormat,GLenum type,GLint sourceLevel,GLint destLevel,bool unpackFlipY,bool unpackPremultiplyAlpha,bool unpackUnmultiplyAlpha,const gl::Texture * source)90 angle::Result TextureImpl::copy3DTexture(const gl::Context *context,
91 gl::TextureTarget target,
92 GLenum internalFormat,
93 GLenum type,
94 GLint sourceLevel,
95 GLint destLevel,
96 bool unpackFlipY,
97 bool unpackPremultiplyAlpha,
98 bool unpackUnmultiplyAlpha,
99 const gl::Texture *source)
100 {
101 UNREACHABLE();
102 return angle::Result::Stop;
103 }
104
copy3DSubTexture(const gl::Context * context,const gl::TextureTarget target,const gl::Offset & destOffset,GLint sourceLevel,GLint destLevel,const gl::Box & srcBox,bool unpackFlipY,bool unpackPremultiplyAlpha,bool unpackUnmultiplyAlpha,const gl::Texture * source)105 angle::Result TextureImpl::copy3DSubTexture(const gl::Context *context,
106 const gl::TextureTarget target,
107 const gl::Offset &destOffset,
108 GLint sourceLevel,
109 GLint destLevel,
110 const gl::Box &srcBox,
111 bool unpackFlipY,
112 bool unpackPremultiplyAlpha,
113 bool unpackUnmultiplyAlpha,
114 const gl::Texture *source)
115 {
116 UNREACHABLE();
117 return angle::Result::Stop;
118 }
119
setImageExternal(const gl::Context * context,const gl::ImageIndex & index,GLenum internalFormat,const gl::Extents & size,GLenum format,GLenum type)120 angle::Result TextureImpl::setImageExternal(const gl::Context *context,
121 const gl::ImageIndex &index,
122 GLenum internalFormat,
123 const gl::Extents &size,
124 GLenum format,
125 GLenum type)
126 {
127 UNREACHABLE();
128 return angle::Result::Stop;
129 }
130
setBuffer(const gl::Context * context,GLenum internalFormat)131 angle::Result TextureImpl::setBuffer(const gl::Context *context, GLenum internalFormat)
132 {
133 UNREACHABLE();
134 return angle::Result::Stop;
135 }
136
clearImage(const gl::Context * context,GLint level,GLenum format,GLenum type,const uint8_t * data)137 angle::Result TextureImpl::clearImage(const gl::Context *context,
138 GLint level,
139 GLenum format,
140 GLenum type,
141 const uint8_t *data)
142 {
143 UNREACHABLE();
144 return angle::Result::Stop;
145 }
146
clearSubImage(const gl::Context * context,GLint level,const gl::Box & area,GLenum format,GLenum type,const uint8_t * data)147 angle::Result TextureImpl::clearSubImage(const gl::Context *context,
148 GLint level,
149 const gl::Box &area,
150 GLenum format,
151 GLenum type,
152 const uint8_t *data)
153 {
154 UNREACHABLE();
155 return angle::Result::Stop;
156 }
157
getMemorySize() const158 GLint TextureImpl::getMemorySize() const
159 {
160 return 0;
161 }
162
getLevelMemorySize(gl::TextureTarget target,GLint level)163 GLint TextureImpl::getLevelMemorySize(gl::TextureTarget target, GLint level)
164 {
165 return 0;
166 }
167
setStorageAttribs(const gl::Context * context,gl::TextureType type,size_t levels,GLint internalformat,const gl::Extents & size,const GLint * attribList)168 angle::Result TextureImpl::setStorageAttribs(const gl::Context *context,
169 gl::TextureType type,
170 size_t levels,
171 GLint internalformat,
172 const gl::Extents &size,
173 const GLint *attribList)
174 {
175 UNREACHABLE();
176 return angle::Result::Stop;
177 }
178
getImageCompressionRate(const gl::Context * context)179 GLint TextureImpl::getImageCompressionRate(const gl::Context *context)
180 {
181 UNREACHABLE();
182 return 0;
183 }
184
getFormatSupportedCompressionRates(const gl::Context * context,GLenum internalformat,GLsizei bufSize,GLint * rates)185 GLint TextureImpl::getFormatSupportedCompressionRates(const gl::Context *context,
186 GLenum internalformat,
187 GLsizei bufSize,
188 GLint *rates)
189 {
190 UNREACHABLE();
191 return 0;
192 }
193
getNativeID() const194 GLint TextureImpl::getNativeID() const
195 {
196 UNREACHABLE();
197 return 0;
198 }
199
getColorReadFormat(const gl::Context * context)200 GLenum TextureImpl::getColorReadFormat(const gl::Context *context)
201 {
202 UNREACHABLE();
203 return GL_NONE;
204 }
205
getColorReadType(const gl::Context * context)206 GLenum TextureImpl::getColorReadType(const gl::Context *context)
207 {
208 UNREACHABLE();
209 return GL_NONE;
210 }
211
getTexImage(const gl::Context * context,const gl::PixelPackState & packState,gl::Buffer * packBuffer,gl::TextureTarget target,GLint level,GLenum format,GLenum type,void * pixels)212 angle::Result TextureImpl::getTexImage(const gl::Context *context,
213 const gl::PixelPackState &packState,
214 gl::Buffer *packBuffer,
215 gl::TextureTarget target,
216 GLint level,
217 GLenum format,
218 GLenum type,
219 void *pixels)
220 {
221 UNREACHABLE();
222 return angle::Result::Stop;
223 }
224
getCompressedTexImage(const gl::Context * context,const gl::PixelPackState & packState,gl::Buffer * packBuffer,gl::TextureTarget target,GLint level,void * pixels)225 angle::Result TextureImpl::getCompressedTexImage(const gl::Context *context,
226 const gl::PixelPackState &packState,
227 gl::Buffer *packBuffer,
228 gl::TextureTarget target,
229 GLint level,
230 void *pixels)
231 {
232 UNREACHABLE();
233 return angle::Result::Stop;
234 }
235
getRequiredExternalTextureImageUnits(const gl::Context * context)236 GLint TextureImpl::getRequiredExternalTextureImageUnits(const gl::Context *context)
237 {
238 UNREACHABLE();
239 return 0;
240 }
241
onLabelUpdate(const gl::Context * context)242 angle::Result TextureImpl::onLabelUpdate(const gl::Context *context)
243 {
244 return angle::Result::Continue;
245 }
246
247 } // namespace rx
248