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
getMemorySize() const137 GLint TextureImpl::getMemorySize() const
138 {
139 return 0;
140 }
141
getLevelMemorySize(gl::TextureTarget target,GLint level)142 GLint TextureImpl::getLevelMemorySize(gl::TextureTarget target, GLint level)
143 {
144 return 0;
145 }
146
getNativeID() const147 GLint TextureImpl::getNativeID() const
148 {
149 UNREACHABLE();
150 return 0;
151 }
152
getColorReadFormat(const gl::Context * context)153 GLenum TextureImpl::getColorReadFormat(const gl::Context *context)
154 {
155 UNREACHABLE();
156 return GL_NONE;
157 }
158
getColorReadType(const gl::Context * context)159 GLenum TextureImpl::getColorReadType(const gl::Context *context)
160 {
161 UNREACHABLE();
162 return GL_NONE;
163 }
164
getTexImage(const gl::Context * context,const gl::PixelPackState & packState,gl::Buffer * packBuffer,gl::TextureTarget target,GLint level,GLenum format,GLenum type,void * pixels)165 angle::Result TextureImpl::getTexImage(const gl::Context *context,
166 const gl::PixelPackState &packState,
167 gl::Buffer *packBuffer,
168 gl::TextureTarget target,
169 GLint level,
170 GLenum format,
171 GLenum type,
172 void *pixels)
173 {
174 UNREACHABLE();
175 return angle::Result::Stop;
176 }
177
getCompressedTexImage(const gl::Context * context,const gl::PixelPackState & packState,gl::Buffer * packBuffer,gl::TextureTarget target,GLint level,void * pixels)178 angle::Result TextureImpl::getCompressedTexImage(const gl::Context *context,
179 const gl::PixelPackState &packState,
180 gl::Buffer *packBuffer,
181 gl::TextureTarget target,
182 GLint level,
183 void *pixels)
184 {
185 UNREACHABLE();
186 return angle::Result::Stop;
187 }
188
getRequiredExternalTextureImageUnits(const gl::Context * context)189 GLint TextureImpl::getRequiredExternalTextureImageUnits(const gl::Context *context)
190 {
191 UNREACHABLE();
192 return 0;
193 }
194
onLabelUpdate(const gl::Context * context)195 angle::Result TextureImpl::onLabelUpdate(const gl::Context *context)
196 {
197 return angle::Result::Continue;
198 }
199
200 } // namespace rx
201