xref: /aosp_15_r20/external/angle/src/libANGLE/renderer/null/ContextNULL.cpp (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 // ContextNULL.cpp:
7*8975f5c5SAndroid Build Coastguard Worker //    Implements the class methods for ContextNULL.
8*8975f5c5SAndroid Build Coastguard Worker //
9*8975f5c5SAndroid Build Coastguard Worker 
10*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/null/ContextNULL.h"
11*8975f5c5SAndroid Build Coastguard Worker 
12*8975f5c5SAndroid Build Coastguard Worker #include "common/debug.h"
13*8975f5c5SAndroid Build Coastguard Worker 
14*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/Context.h"
15*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/OverlayImpl.h"
16*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/null/BufferNULL.h"
17*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/null/CompilerNULL.h"
18*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/null/DisplayNULL.h"
19*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/null/FenceNVNULL.h"
20*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/null/FramebufferNULL.h"
21*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/null/ImageNULL.h"
22*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/null/ProgramExecutableNULL.h"
23*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/null/ProgramNULL.h"
24*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/null/ProgramPipelineNULL.h"
25*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/null/QueryNULL.h"
26*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/null/RenderbufferNULL.h"
27*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/null/SamplerNULL.h"
28*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/null/ShaderNULL.h"
29*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/null/SyncNULL.h"
30*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/null/TextureNULL.h"
31*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/null/TransformFeedbackNULL.h"
32*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/null/VertexArrayNULL.h"
33*8975f5c5SAndroid Build Coastguard Worker 
34*8975f5c5SAndroid Build Coastguard Worker namespace rx
35*8975f5c5SAndroid Build Coastguard Worker {
36*8975f5c5SAndroid Build Coastguard Worker 
AllocationTrackerNULL(size_t maxTotalAllocationSize)37*8975f5c5SAndroid Build Coastguard Worker AllocationTrackerNULL::AllocationTrackerNULL(size_t maxTotalAllocationSize)
38*8975f5c5SAndroid Build Coastguard Worker     : mAllocatedBytes(0), mMaxBytes(maxTotalAllocationSize)
39*8975f5c5SAndroid Build Coastguard Worker {}
40*8975f5c5SAndroid Build Coastguard Worker 
~AllocationTrackerNULL()41*8975f5c5SAndroid Build Coastguard Worker AllocationTrackerNULL::~AllocationTrackerNULL()
42*8975f5c5SAndroid Build Coastguard Worker {
43*8975f5c5SAndroid Build Coastguard Worker     // ASSERT that all objects with the NULL renderer clean up after themselves
44*8975f5c5SAndroid Build Coastguard Worker     ASSERT(mAllocatedBytes == 0);
45*8975f5c5SAndroid Build Coastguard Worker }
46*8975f5c5SAndroid Build Coastguard Worker 
updateMemoryAllocation(size_t oldSize,size_t newSize)47*8975f5c5SAndroid Build Coastguard Worker bool AllocationTrackerNULL::updateMemoryAllocation(size_t oldSize, size_t newSize)
48*8975f5c5SAndroid Build Coastguard Worker {
49*8975f5c5SAndroid Build Coastguard Worker     ASSERT(mAllocatedBytes >= oldSize);
50*8975f5c5SAndroid Build Coastguard Worker 
51*8975f5c5SAndroid Build Coastguard Worker     size_t sizeAfterRelease    = mAllocatedBytes - oldSize;
52*8975f5c5SAndroid Build Coastguard Worker     size_t sizeAfterReallocate = sizeAfterRelease + newSize;
53*8975f5c5SAndroid Build Coastguard Worker     if (sizeAfterReallocate < sizeAfterRelease || sizeAfterReallocate > mMaxBytes)
54*8975f5c5SAndroid Build Coastguard Worker     {
55*8975f5c5SAndroid Build Coastguard Worker         // Overflow or allocation would be too large
56*8975f5c5SAndroid Build Coastguard Worker         return false;
57*8975f5c5SAndroid Build Coastguard Worker     }
58*8975f5c5SAndroid Build Coastguard Worker 
59*8975f5c5SAndroid Build Coastguard Worker     mAllocatedBytes = sizeAfterReallocate;
60*8975f5c5SAndroid Build Coastguard Worker     return true;
61*8975f5c5SAndroid Build Coastguard Worker }
62*8975f5c5SAndroid Build Coastguard Worker 
ContextNULL(const gl::State & state,gl::ErrorSet * errorSet,AllocationTrackerNULL * allocationTracker)63*8975f5c5SAndroid Build Coastguard Worker ContextNULL::ContextNULL(const gl::State &state,
64*8975f5c5SAndroid Build Coastguard Worker                          gl::ErrorSet *errorSet,
65*8975f5c5SAndroid Build Coastguard Worker                          AllocationTrackerNULL *allocationTracker)
66*8975f5c5SAndroid Build Coastguard Worker     : ContextImpl(state, errorSet), mAllocationTracker(allocationTracker)
67*8975f5c5SAndroid Build Coastguard Worker {
68*8975f5c5SAndroid Build Coastguard Worker     ASSERT(mAllocationTracker != nullptr);
69*8975f5c5SAndroid Build Coastguard Worker 
70*8975f5c5SAndroid Build Coastguard Worker     mExtensions                               = gl::Extensions();
71*8975f5c5SAndroid Build Coastguard Worker     mExtensions.blendEquationAdvancedKHR      = true;
72*8975f5c5SAndroid Build Coastguard Worker     mExtensions.blendFuncExtendedEXT          = true;
73*8975f5c5SAndroid Build Coastguard Worker     mExtensions.copyCompressedTextureCHROMIUM = true;
74*8975f5c5SAndroid Build Coastguard Worker     mExtensions.copyTextureCHROMIUM           = true;
75*8975f5c5SAndroid Build Coastguard Worker     mExtensions.debugMarkerEXT                = true;
76*8975f5c5SAndroid Build Coastguard Worker     mExtensions.drawBuffersIndexedOES         = true;
77*8975f5c5SAndroid Build Coastguard Worker     mExtensions.fenceNV                       = true;
78*8975f5c5SAndroid Build Coastguard Worker     mExtensions.framebufferBlitANGLE          = true;
79*8975f5c5SAndroid Build Coastguard Worker     mExtensions.framebufferBlitNV             = true;
80*8975f5c5SAndroid Build Coastguard Worker     mExtensions.instancedArraysANGLE          = true;
81*8975f5c5SAndroid Build Coastguard Worker     mExtensions.instancedArraysEXT            = true;
82*8975f5c5SAndroid Build Coastguard Worker     mExtensions.mapBufferRangeEXT             = true;
83*8975f5c5SAndroid Build Coastguard Worker     mExtensions.mapbufferOES                  = true;
84*8975f5c5SAndroid Build Coastguard Worker     mExtensions.pixelBufferObjectNV           = true;
85*8975f5c5SAndroid Build Coastguard Worker     mExtensions.shaderPixelLocalStorageANGLE  = state.getClientVersion() >= gl::Version(3, 0);
86*8975f5c5SAndroid Build Coastguard Worker     mExtensions.shaderPixelLocalStorageCoherentANGLE = mExtensions.shaderPixelLocalStorageANGLE;
87*8975f5c5SAndroid Build Coastguard Worker     mExtensions.textureRectangleANGLE                = true;
88*8975f5c5SAndroid Build Coastguard Worker     mExtensions.textureUsageANGLE                    = true;
89*8975f5c5SAndroid Build Coastguard Worker     mExtensions.translatedShaderSourceANGLE          = true;
90*8975f5c5SAndroid Build Coastguard Worker     mExtensions.vertexArrayObjectOES                 = true;
91*8975f5c5SAndroid Build Coastguard Worker 
92*8975f5c5SAndroid Build Coastguard Worker     mExtensions.textureStorageEXT               = true;
93*8975f5c5SAndroid Build Coastguard Worker     mExtensions.rgb8Rgba8OES                    = true;
94*8975f5c5SAndroid Build Coastguard Worker     mExtensions.textureCompressionDxt1EXT       = true;
95*8975f5c5SAndroid Build Coastguard Worker     mExtensions.textureCompressionDxt3ANGLE     = true;
96*8975f5c5SAndroid Build Coastguard Worker     mExtensions.textureCompressionDxt5ANGLE     = true;
97*8975f5c5SAndroid Build Coastguard Worker     mExtensions.textureCompressionS3tcSrgbEXT   = true;
98*8975f5c5SAndroid Build Coastguard Worker     mExtensions.textureCompressionAstcHdrKHR    = true;
99*8975f5c5SAndroid Build Coastguard Worker     mExtensions.textureCompressionAstcLdrKHR    = true;
100*8975f5c5SAndroid Build Coastguard Worker     mExtensions.textureCompressionAstcOES       = true;
101*8975f5c5SAndroid Build Coastguard Worker     mExtensions.compressedETC1RGB8TextureOES    = true;
102*8975f5c5SAndroid Build Coastguard Worker     mExtensions.compressedETC1RGB8SubTextureEXT = true;
103*8975f5c5SAndroid Build Coastguard Worker     mExtensions.lossyEtcDecodeANGLE             = true;
104*8975f5c5SAndroid Build Coastguard Worker     mExtensions.geometryShaderEXT               = true;
105*8975f5c5SAndroid Build Coastguard Worker     mExtensions.geometryShaderOES               = true;
106*8975f5c5SAndroid Build Coastguard Worker     mExtensions.multiDrawIndirectEXT            = true;
107*8975f5c5SAndroid Build Coastguard Worker 
108*8975f5c5SAndroid Build Coastguard Worker     mExtensions.EGLImageOES                 = true;
109*8975f5c5SAndroid Build Coastguard Worker     mExtensions.EGLImageExternalOES         = true;
110*8975f5c5SAndroid Build Coastguard Worker     mExtensions.EGLImageExternalEssl3OES    = true;
111*8975f5c5SAndroid Build Coastguard Worker     mExtensions.EGLImageArrayEXT            = true;
112*8975f5c5SAndroid Build Coastguard Worker     mExtensions.EGLStreamConsumerExternalNV = true;
113*8975f5c5SAndroid Build Coastguard Worker 
114*8975f5c5SAndroid Build Coastguard Worker     const gl::Version maxClientVersion(3, 1);
115*8975f5c5SAndroid Build Coastguard Worker     mCaps = GenerateMinimumCaps(maxClientVersion, mExtensions);
116*8975f5c5SAndroid Build Coastguard Worker 
117*8975f5c5SAndroid Build Coastguard Worker     InitMinimumTextureCapsMap(maxClientVersion, mExtensions, &mTextureCaps);
118*8975f5c5SAndroid Build Coastguard Worker 
119*8975f5c5SAndroid Build Coastguard Worker     if (mExtensions.shaderPixelLocalStorageANGLE)
120*8975f5c5SAndroid Build Coastguard Worker     {
121*8975f5c5SAndroid Build Coastguard Worker         mPLSOptions.type             = ShPixelLocalStorageType::FramebufferFetch;
122*8975f5c5SAndroid Build Coastguard Worker         mPLSOptions.fragmentSyncType = ShFragmentSynchronizationType::Automatic;
123*8975f5c5SAndroid Build Coastguard Worker     }
124*8975f5c5SAndroid Build Coastguard Worker }
125*8975f5c5SAndroid Build Coastguard Worker 
~ContextNULL()126*8975f5c5SAndroid Build Coastguard Worker ContextNULL::~ContextNULL() {}
127*8975f5c5SAndroid Build Coastguard Worker 
initialize(const angle::ImageLoadContext & imageLoadContext)128*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::initialize(const angle::ImageLoadContext &imageLoadContext)
129*8975f5c5SAndroid Build Coastguard Worker {
130*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
131*8975f5c5SAndroid Build Coastguard Worker }
132*8975f5c5SAndroid Build Coastguard Worker 
flush(const gl::Context * context)133*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::flush(const gl::Context *context)
134*8975f5c5SAndroid Build Coastguard Worker {
135*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
136*8975f5c5SAndroid Build Coastguard Worker }
137*8975f5c5SAndroid Build Coastguard Worker 
finish(const gl::Context * context)138*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::finish(const gl::Context *context)
139*8975f5c5SAndroid Build Coastguard Worker {
140*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
141*8975f5c5SAndroid Build Coastguard Worker }
142*8975f5c5SAndroid Build Coastguard Worker 
drawArrays(const gl::Context * context,gl::PrimitiveMode mode,GLint first,GLsizei count)143*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::drawArrays(const gl::Context *context,
144*8975f5c5SAndroid Build Coastguard Worker                                       gl::PrimitiveMode mode,
145*8975f5c5SAndroid Build Coastguard Worker                                       GLint first,
146*8975f5c5SAndroid Build Coastguard Worker                                       GLsizei count)
147*8975f5c5SAndroid Build Coastguard Worker {
148*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
149*8975f5c5SAndroid Build Coastguard Worker }
150*8975f5c5SAndroid Build Coastguard Worker 
drawArraysInstanced(const gl::Context * context,gl::PrimitiveMode mode,GLint first,GLsizei count,GLsizei instanceCount)151*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::drawArraysInstanced(const gl::Context *context,
152*8975f5c5SAndroid Build Coastguard Worker                                                gl::PrimitiveMode mode,
153*8975f5c5SAndroid Build Coastguard Worker                                                GLint first,
154*8975f5c5SAndroid Build Coastguard Worker                                                GLsizei count,
155*8975f5c5SAndroid Build Coastguard Worker                                                GLsizei instanceCount)
156*8975f5c5SAndroid Build Coastguard Worker {
157*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
158*8975f5c5SAndroid Build Coastguard Worker }
159*8975f5c5SAndroid Build Coastguard Worker 
drawArraysInstancedBaseInstance(const gl::Context * context,gl::PrimitiveMode mode,GLint first,GLsizei count,GLsizei instanceCount,GLuint baseInstance)160*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::drawArraysInstancedBaseInstance(const gl::Context *context,
161*8975f5c5SAndroid Build Coastguard Worker                                                            gl::PrimitiveMode mode,
162*8975f5c5SAndroid Build Coastguard Worker                                                            GLint first,
163*8975f5c5SAndroid Build Coastguard Worker                                                            GLsizei count,
164*8975f5c5SAndroid Build Coastguard Worker                                                            GLsizei instanceCount,
165*8975f5c5SAndroid Build Coastguard Worker                                                            GLuint baseInstance)
166*8975f5c5SAndroid Build Coastguard Worker {
167*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
168*8975f5c5SAndroid Build Coastguard Worker }
169*8975f5c5SAndroid Build Coastguard Worker 
drawElements(const gl::Context * context,gl::PrimitiveMode mode,GLsizei count,gl::DrawElementsType type,const void * indices)170*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::drawElements(const gl::Context *context,
171*8975f5c5SAndroid Build Coastguard Worker                                         gl::PrimitiveMode mode,
172*8975f5c5SAndroid Build Coastguard Worker                                         GLsizei count,
173*8975f5c5SAndroid Build Coastguard Worker                                         gl::DrawElementsType type,
174*8975f5c5SAndroid Build Coastguard Worker                                         const void *indices)
175*8975f5c5SAndroid Build Coastguard Worker {
176*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
177*8975f5c5SAndroid Build Coastguard Worker }
178*8975f5c5SAndroid Build Coastguard Worker 
drawElementsBaseVertex(const gl::Context * context,gl::PrimitiveMode mode,GLsizei count,gl::DrawElementsType type,const void * indices,GLint baseVertex)179*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::drawElementsBaseVertex(const gl::Context *context,
180*8975f5c5SAndroid Build Coastguard Worker                                                   gl::PrimitiveMode mode,
181*8975f5c5SAndroid Build Coastguard Worker                                                   GLsizei count,
182*8975f5c5SAndroid Build Coastguard Worker                                                   gl::DrawElementsType type,
183*8975f5c5SAndroid Build Coastguard Worker                                                   const void *indices,
184*8975f5c5SAndroid Build Coastguard Worker                                                   GLint baseVertex)
185*8975f5c5SAndroid Build Coastguard Worker {
186*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
187*8975f5c5SAndroid Build Coastguard Worker }
188*8975f5c5SAndroid Build Coastguard Worker 
drawElementsInstanced(const gl::Context * context,gl::PrimitiveMode mode,GLsizei count,gl::DrawElementsType type,const void * indices,GLsizei instances)189*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::drawElementsInstanced(const gl::Context *context,
190*8975f5c5SAndroid Build Coastguard Worker                                                  gl::PrimitiveMode mode,
191*8975f5c5SAndroid Build Coastguard Worker                                                  GLsizei count,
192*8975f5c5SAndroid Build Coastguard Worker                                                  gl::DrawElementsType type,
193*8975f5c5SAndroid Build Coastguard Worker                                                  const void *indices,
194*8975f5c5SAndroid Build Coastguard Worker                                                  GLsizei instances)
195*8975f5c5SAndroid Build Coastguard Worker {
196*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
197*8975f5c5SAndroid Build Coastguard Worker }
198*8975f5c5SAndroid Build Coastguard Worker 
drawElementsInstancedBaseVertex(const gl::Context * context,gl::PrimitiveMode mode,GLsizei count,gl::DrawElementsType type,const void * indices,GLsizei instances,GLint baseVertex)199*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::drawElementsInstancedBaseVertex(const gl::Context *context,
200*8975f5c5SAndroid Build Coastguard Worker                                                            gl::PrimitiveMode mode,
201*8975f5c5SAndroid Build Coastguard Worker                                                            GLsizei count,
202*8975f5c5SAndroid Build Coastguard Worker                                                            gl::DrawElementsType type,
203*8975f5c5SAndroid Build Coastguard Worker                                                            const void *indices,
204*8975f5c5SAndroid Build Coastguard Worker                                                            GLsizei instances,
205*8975f5c5SAndroid Build Coastguard Worker                                                            GLint baseVertex)
206*8975f5c5SAndroid Build Coastguard Worker {
207*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
208*8975f5c5SAndroid Build Coastguard Worker }
209*8975f5c5SAndroid Build Coastguard Worker 
drawElementsInstancedBaseVertexBaseInstance(const gl::Context * context,gl::PrimitiveMode mode,GLsizei count,gl::DrawElementsType type,const void * indices,GLsizei instances,GLint baseVertex,GLuint baseInstance)210*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::drawElementsInstancedBaseVertexBaseInstance(const gl::Context *context,
211*8975f5c5SAndroid Build Coastguard Worker                                                                        gl::PrimitiveMode mode,
212*8975f5c5SAndroid Build Coastguard Worker                                                                        GLsizei count,
213*8975f5c5SAndroid Build Coastguard Worker                                                                        gl::DrawElementsType type,
214*8975f5c5SAndroid Build Coastguard Worker                                                                        const void *indices,
215*8975f5c5SAndroid Build Coastguard Worker                                                                        GLsizei instances,
216*8975f5c5SAndroid Build Coastguard Worker                                                                        GLint baseVertex,
217*8975f5c5SAndroid Build Coastguard Worker                                                                        GLuint baseInstance)
218*8975f5c5SAndroid Build Coastguard Worker {
219*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
220*8975f5c5SAndroid Build Coastguard Worker }
221*8975f5c5SAndroid Build Coastguard Worker 
drawRangeElements(const gl::Context * context,gl::PrimitiveMode mode,GLuint start,GLuint end,GLsizei count,gl::DrawElementsType type,const void * indices)222*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::drawRangeElements(const gl::Context *context,
223*8975f5c5SAndroid Build Coastguard Worker                                              gl::PrimitiveMode mode,
224*8975f5c5SAndroid Build Coastguard Worker                                              GLuint start,
225*8975f5c5SAndroid Build Coastguard Worker                                              GLuint end,
226*8975f5c5SAndroid Build Coastguard Worker                                              GLsizei count,
227*8975f5c5SAndroid Build Coastguard Worker                                              gl::DrawElementsType type,
228*8975f5c5SAndroid Build Coastguard Worker                                              const void *indices)
229*8975f5c5SAndroid Build Coastguard Worker {
230*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
231*8975f5c5SAndroid Build Coastguard Worker }
232*8975f5c5SAndroid Build Coastguard Worker 
drawRangeElementsBaseVertex(const gl::Context * context,gl::PrimitiveMode mode,GLuint start,GLuint end,GLsizei count,gl::DrawElementsType type,const void * indices,GLint baseVertex)233*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::drawRangeElementsBaseVertex(const gl::Context *context,
234*8975f5c5SAndroid Build Coastguard Worker                                                        gl::PrimitiveMode mode,
235*8975f5c5SAndroid Build Coastguard Worker                                                        GLuint start,
236*8975f5c5SAndroid Build Coastguard Worker                                                        GLuint end,
237*8975f5c5SAndroid Build Coastguard Worker                                                        GLsizei count,
238*8975f5c5SAndroid Build Coastguard Worker                                                        gl::DrawElementsType type,
239*8975f5c5SAndroid Build Coastguard Worker                                                        const void *indices,
240*8975f5c5SAndroid Build Coastguard Worker                                                        GLint baseVertex)
241*8975f5c5SAndroid Build Coastguard Worker {
242*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
243*8975f5c5SAndroid Build Coastguard Worker }
244*8975f5c5SAndroid Build Coastguard Worker 
drawArraysIndirect(const gl::Context * context,gl::PrimitiveMode mode,const void * indirect)245*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::drawArraysIndirect(const gl::Context *context,
246*8975f5c5SAndroid Build Coastguard Worker                                               gl::PrimitiveMode mode,
247*8975f5c5SAndroid Build Coastguard Worker                                               const void *indirect)
248*8975f5c5SAndroid Build Coastguard Worker {
249*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
250*8975f5c5SAndroid Build Coastguard Worker }
251*8975f5c5SAndroid Build Coastguard Worker 
drawElementsIndirect(const gl::Context * context,gl::PrimitiveMode mode,gl::DrawElementsType type,const void * indirect)252*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::drawElementsIndirect(const gl::Context *context,
253*8975f5c5SAndroid Build Coastguard Worker                                                 gl::PrimitiveMode mode,
254*8975f5c5SAndroid Build Coastguard Worker                                                 gl::DrawElementsType type,
255*8975f5c5SAndroid Build Coastguard Worker                                                 const void *indirect)
256*8975f5c5SAndroid Build Coastguard Worker {
257*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
258*8975f5c5SAndroid Build Coastguard Worker }
259*8975f5c5SAndroid Build Coastguard Worker 
multiDrawArrays(const gl::Context * context,gl::PrimitiveMode mode,const GLint * firsts,const GLsizei * counts,GLsizei drawcount)260*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::multiDrawArrays(const gl::Context *context,
261*8975f5c5SAndroid Build Coastguard Worker                                            gl::PrimitiveMode mode,
262*8975f5c5SAndroid Build Coastguard Worker                                            const GLint *firsts,
263*8975f5c5SAndroid Build Coastguard Worker                                            const GLsizei *counts,
264*8975f5c5SAndroid Build Coastguard Worker                                            GLsizei drawcount)
265*8975f5c5SAndroid Build Coastguard Worker {
266*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
267*8975f5c5SAndroid Build Coastguard Worker }
268*8975f5c5SAndroid Build Coastguard Worker 
multiDrawArraysInstanced(const gl::Context * context,gl::PrimitiveMode mode,const GLint * firsts,const GLsizei * counts,const GLsizei * instanceCounts,GLsizei drawcount)269*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::multiDrawArraysInstanced(const gl::Context *context,
270*8975f5c5SAndroid Build Coastguard Worker                                                     gl::PrimitiveMode mode,
271*8975f5c5SAndroid Build Coastguard Worker                                                     const GLint *firsts,
272*8975f5c5SAndroid Build Coastguard Worker                                                     const GLsizei *counts,
273*8975f5c5SAndroid Build Coastguard Worker                                                     const GLsizei *instanceCounts,
274*8975f5c5SAndroid Build Coastguard Worker                                                     GLsizei drawcount)
275*8975f5c5SAndroid Build Coastguard Worker {
276*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
277*8975f5c5SAndroid Build Coastguard Worker }
278*8975f5c5SAndroid Build Coastguard Worker 
multiDrawArraysIndirect(const gl::Context * context,gl::PrimitiveMode mode,const void * indirect,GLsizei drawcount,GLsizei stride)279*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::multiDrawArraysIndirect(const gl::Context *context,
280*8975f5c5SAndroid Build Coastguard Worker                                                    gl::PrimitiveMode mode,
281*8975f5c5SAndroid Build Coastguard Worker                                                    const void *indirect,
282*8975f5c5SAndroid Build Coastguard Worker                                                    GLsizei drawcount,
283*8975f5c5SAndroid Build Coastguard Worker                                                    GLsizei stride)
284*8975f5c5SAndroid Build Coastguard Worker {
285*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
286*8975f5c5SAndroid Build Coastguard Worker }
287*8975f5c5SAndroid Build Coastguard Worker 
multiDrawElements(const gl::Context * context,gl::PrimitiveMode mode,const GLsizei * counts,gl::DrawElementsType type,const GLvoid * const * indices,GLsizei drawcount)288*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::multiDrawElements(const gl::Context *context,
289*8975f5c5SAndroid Build Coastguard Worker                                              gl::PrimitiveMode mode,
290*8975f5c5SAndroid Build Coastguard Worker                                              const GLsizei *counts,
291*8975f5c5SAndroid Build Coastguard Worker                                              gl::DrawElementsType type,
292*8975f5c5SAndroid Build Coastguard Worker                                              const GLvoid *const *indices,
293*8975f5c5SAndroid Build Coastguard Worker                                              GLsizei drawcount)
294*8975f5c5SAndroid Build Coastguard Worker {
295*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
296*8975f5c5SAndroid Build Coastguard Worker }
297*8975f5c5SAndroid Build Coastguard Worker 
multiDrawElementsInstanced(const gl::Context * context,gl::PrimitiveMode mode,const GLsizei * counts,gl::DrawElementsType type,const GLvoid * const * indices,const GLsizei * instanceCounts,GLsizei drawcount)298*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::multiDrawElementsInstanced(const gl::Context *context,
299*8975f5c5SAndroid Build Coastguard Worker                                                       gl::PrimitiveMode mode,
300*8975f5c5SAndroid Build Coastguard Worker                                                       const GLsizei *counts,
301*8975f5c5SAndroid Build Coastguard Worker                                                       gl::DrawElementsType type,
302*8975f5c5SAndroid Build Coastguard Worker                                                       const GLvoid *const *indices,
303*8975f5c5SAndroid Build Coastguard Worker                                                       const GLsizei *instanceCounts,
304*8975f5c5SAndroid Build Coastguard Worker                                                       GLsizei drawcount)
305*8975f5c5SAndroid Build Coastguard Worker {
306*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
307*8975f5c5SAndroid Build Coastguard Worker }
308*8975f5c5SAndroid Build Coastguard Worker 
multiDrawElementsIndirect(const gl::Context * context,gl::PrimitiveMode mode,gl::DrawElementsType type,const void * indirect,GLsizei drawcount,GLsizei stride)309*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::multiDrawElementsIndirect(const gl::Context *context,
310*8975f5c5SAndroid Build Coastguard Worker                                                      gl::PrimitiveMode mode,
311*8975f5c5SAndroid Build Coastguard Worker                                                      gl::DrawElementsType type,
312*8975f5c5SAndroid Build Coastguard Worker                                                      const void *indirect,
313*8975f5c5SAndroid Build Coastguard Worker                                                      GLsizei drawcount,
314*8975f5c5SAndroid Build Coastguard Worker                                                      GLsizei stride)
315*8975f5c5SAndroid Build Coastguard Worker {
316*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
317*8975f5c5SAndroid Build Coastguard Worker }
318*8975f5c5SAndroid Build Coastguard Worker 
multiDrawArraysInstancedBaseInstance(const gl::Context * context,gl::PrimitiveMode mode,const GLint * firsts,const GLsizei * counts,const GLsizei * instanceCounts,const GLuint * baseInstances,GLsizei drawcount)319*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::multiDrawArraysInstancedBaseInstance(const gl::Context *context,
320*8975f5c5SAndroid Build Coastguard Worker                                                                 gl::PrimitiveMode mode,
321*8975f5c5SAndroid Build Coastguard Worker                                                                 const GLint *firsts,
322*8975f5c5SAndroid Build Coastguard Worker                                                                 const GLsizei *counts,
323*8975f5c5SAndroid Build Coastguard Worker                                                                 const GLsizei *instanceCounts,
324*8975f5c5SAndroid Build Coastguard Worker                                                                 const GLuint *baseInstances,
325*8975f5c5SAndroid Build Coastguard Worker                                                                 GLsizei drawcount)
326*8975f5c5SAndroid Build Coastguard Worker {
327*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
328*8975f5c5SAndroid Build Coastguard Worker }
329*8975f5c5SAndroid Build Coastguard Worker 
multiDrawElementsInstancedBaseVertexBaseInstance(const gl::Context * context,gl::PrimitiveMode mode,const GLsizei * counts,gl::DrawElementsType type,const GLvoid * const * indices,const GLsizei * instanceCounts,const GLint * baseVertices,const GLuint * baseInstances,GLsizei drawcount)330*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::multiDrawElementsInstancedBaseVertexBaseInstance(
331*8975f5c5SAndroid Build Coastguard Worker     const gl::Context *context,
332*8975f5c5SAndroid Build Coastguard Worker     gl::PrimitiveMode mode,
333*8975f5c5SAndroid Build Coastguard Worker     const GLsizei *counts,
334*8975f5c5SAndroid Build Coastguard Worker     gl::DrawElementsType type,
335*8975f5c5SAndroid Build Coastguard Worker     const GLvoid *const *indices,
336*8975f5c5SAndroid Build Coastguard Worker     const GLsizei *instanceCounts,
337*8975f5c5SAndroid Build Coastguard Worker     const GLint *baseVertices,
338*8975f5c5SAndroid Build Coastguard Worker     const GLuint *baseInstances,
339*8975f5c5SAndroid Build Coastguard Worker     GLsizei drawcount)
340*8975f5c5SAndroid Build Coastguard Worker {
341*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
342*8975f5c5SAndroid Build Coastguard Worker }
343*8975f5c5SAndroid Build Coastguard Worker 
getResetStatus()344*8975f5c5SAndroid Build Coastguard Worker gl::GraphicsResetStatus ContextNULL::getResetStatus()
345*8975f5c5SAndroid Build Coastguard Worker {
346*8975f5c5SAndroid Build Coastguard Worker     return gl::GraphicsResetStatus::NoError;
347*8975f5c5SAndroid Build Coastguard Worker }
348*8975f5c5SAndroid Build Coastguard Worker 
insertEventMarker(GLsizei length,const char * marker)349*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::insertEventMarker(GLsizei length, const char *marker)
350*8975f5c5SAndroid Build Coastguard Worker {
351*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
352*8975f5c5SAndroid Build Coastguard Worker }
353*8975f5c5SAndroid Build Coastguard Worker 
pushGroupMarker(GLsizei length,const char * marker)354*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::pushGroupMarker(GLsizei length, const char *marker)
355*8975f5c5SAndroid Build Coastguard Worker {
356*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
357*8975f5c5SAndroid Build Coastguard Worker }
358*8975f5c5SAndroid Build Coastguard Worker 
popGroupMarker()359*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::popGroupMarker()
360*8975f5c5SAndroid Build Coastguard Worker {
361*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
362*8975f5c5SAndroid Build Coastguard Worker }
363*8975f5c5SAndroid Build Coastguard Worker 
pushDebugGroup(const gl::Context * context,GLenum source,GLuint id,const std::string & message)364*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::pushDebugGroup(const gl::Context *context,
365*8975f5c5SAndroid Build Coastguard Worker                                           GLenum source,
366*8975f5c5SAndroid Build Coastguard Worker                                           GLuint id,
367*8975f5c5SAndroid Build Coastguard Worker                                           const std::string &message)
368*8975f5c5SAndroid Build Coastguard Worker {
369*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
370*8975f5c5SAndroid Build Coastguard Worker }
371*8975f5c5SAndroid Build Coastguard Worker 
popDebugGroup(const gl::Context * context)372*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::popDebugGroup(const gl::Context *context)
373*8975f5c5SAndroid Build Coastguard Worker {
374*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
375*8975f5c5SAndroid Build Coastguard Worker }
376*8975f5c5SAndroid Build Coastguard Worker 
syncState(const gl::Context * context,const gl::state::DirtyBits dirtyBits,const gl::state::DirtyBits bitMask,const gl::state::ExtendedDirtyBits extendedDirtyBits,const gl::state::ExtendedDirtyBits extendedBitMask,gl::Command command)377*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::syncState(const gl::Context *context,
378*8975f5c5SAndroid Build Coastguard Worker                                      const gl::state::DirtyBits dirtyBits,
379*8975f5c5SAndroid Build Coastguard Worker                                      const gl::state::DirtyBits bitMask,
380*8975f5c5SAndroid Build Coastguard Worker                                      const gl::state::ExtendedDirtyBits extendedDirtyBits,
381*8975f5c5SAndroid Build Coastguard Worker                                      const gl::state::ExtendedDirtyBits extendedBitMask,
382*8975f5c5SAndroid Build Coastguard Worker                                      gl::Command command)
383*8975f5c5SAndroid Build Coastguard Worker {
384*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
385*8975f5c5SAndroid Build Coastguard Worker }
386*8975f5c5SAndroid Build Coastguard Worker 
getGPUDisjoint()387*8975f5c5SAndroid Build Coastguard Worker GLint ContextNULL::getGPUDisjoint()
388*8975f5c5SAndroid Build Coastguard Worker {
389*8975f5c5SAndroid Build Coastguard Worker     return 0;
390*8975f5c5SAndroid Build Coastguard Worker }
391*8975f5c5SAndroid Build Coastguard Worker 
getTimestamp()392*8975f5c5SAndroid Build Coastguard Worker GLint64 ContextNULL::getTimestamp()
393*8975f5c5SAndroid Build Coastguard Worker {
394*8975f5c5SAndroid Build Coastguard Worker     return 0;
395*8975f5c5SAndroid Build Coastguard Worker }
396*8975f5c5SAndroid Build Coastguard Worker 
onMakeCurrent(const gl::Context * context)397*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::onMakeCurrent(const gl::Context *context)
398*8975f5c5SAndroid Build Coastguard Worker {
399*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
400*8975f5c5SAndroid Build Coastguard Worker }
401*8975f5c5SAndroid Build Coastguard Worker 
getNativeCaps() const402*8975f5c5SAndroid Build Coastguard Worker gl::Caps ContextNULL::getNativeCaps() const
403*8975f5c5SAndroid Build Coastguard Worker {
404*8975f5c5SAndroid Build Coastguard Worker     return mCaps;
405*8975f5c5SAndroid Build Coastguard Worker }
406*8975f5c5SAndroid Build Coastguard Worker 
getNativeTextureCaps() const407*8975f5c5SAndroid Build Coastguard Worker const gl::TextureCapsMap &ContextNULL::getNativeTextureCaps() const
408*8975f5c5SAndroid Build Coastguard Worker {
409*8975f5c5SAndroid Build Coastguard Worker     return mTextureCaps;
410*8975f5c5SAndroid Build Coastguard Worker }
411*8975f5c5SAndroid Build Coastguard Worker 
getNativeExtensions() const412*8975f5c5SAndroid Build Coastguard Worker const gl::Extensions &ContextNULL::getNativeExtensions() const
413*8975f5c5SAndroid Build Coastguard Worker {
414*8975f5c5SAndroid Build Coastguard Worker     return mExtensions;
415*8975f5c5SAndroid Build Coastguard Worker }
416*8975f5c5SAndroid Build Coastguard Worker 
getNativeLimitations() const417*8975f5c5SAndroid Build Coastguard Worker const gl::Limitations &ContextNULL::getNativeLimitations() const
418*8975f5c5SAndroid Build Coastguard Worker {
419*8975f5c5SAndroid Build Coastguard Worker     return mLimitations;
420*8975f5c5SAndroid Build Coastguard Worker }
421*8975f5c5SAndroid Build Coastguard Worker 
getNativePixelLocalStorageOptions() const422*8975f5c5SAndroid Build Coastguard Worker const ShPixelLocalStorageOptions &ContextNULL::getNativePixelLocalStorageOptions() const
423*8975f5c5SAndroid Build Coastguard Worker {
424*8975f5c5SAndroid Build Coastguard Worker     return mPLSOptions;
425*8975f5c5SAndroid Build Coastguard Worker }
426*8975f5c5SAndroid Build Coastguard Worker 
createCompiler()427*8975f5c5SAndroid Build Coastguard Worker CompilerImpl *ContextNULL::createCompiler()
428*8975f5c5SAndroid Build Coastguard Worker {
429*8975f5c5SAndroid Build Coastguard Worker     return new CompilerNULL();
430*8975f5c5SAndroid Build Coastguard Worker }
431*8975f5c5SAndroid Build Coastguard Worker 
createShader(const gl::ShaderState & data)432*8975f5c5SAndroid Build Coastguard Worker ShaderImpl *ContextNULL::createShader(const gl::ShaderState &data)
433*8975f5c5SAndroid Build Coastguard Worker {
434*8975f5c5SAndroid Build Coastguard Worker     return new ShaderNULL(data);
435*8975f5c5SAndroid Build Coastguard Worker }
436*8975f5c5SAndroid Build Coastguard Worker 
createProgram(const gl::ProgramState & data)437*8975f5c5SAndroid Build Coastguard Worker ProgramImpl *ContextNULL::createProgram(const gl::ProgramState &data)
438*8975f5c5SAndroid Build Coastguard Worker {
439*8975f5c5SAndroid Build Coastguard Worker     return new ProgramNULL(data);
440*8975f5c5SAndroid Build Coastguard Worker }
441*8975f5c5SAndroid Build Coastguard Worker 
createProgramExecutable(const gl::ProgramExecutable * executable)442*8975f5c5SAndroid Build Coastguard Worker ProgramExecutableImpl *ContextNULL::createProgramExecutable(const gl::ProgramExecutable *executable)
443*8975f5c5SAndroid Build Coastguard Worker {
444*8975f5c5SAndroid Build Coastguard Worker     return new ProgramExecutableNULL(executable);
445*8975f5c5SAndroid Build Coastguard Worker }
446*8975f5c5SAndroid Build Coastguard Worker 
createFramebuffer(const gl::FramebufferState & data)447*8975f5c5SAndroid Build Coastguard Worker FramebufferImpl *ContextNULL::createFramebuffer(const gl::FramebufferState &data)
448*8975f5c5SAndroid Build Coastguard Worker {
449*8975f5c5SAndroid Build Coastguard Worker     return new FramebufferNULL(data);
450*8975f5c5SAndroid Build Coastguard Worker }
451*8975f5c5SAndroid Build Coastguard Worker 
createTexture(const gl::TextureState & state)452*8975f5c5SAndroid Build Coastguard Worker TextureImpl *ContextNULL::createTexture(const gl::TextureState &state)
453*8975f5c5SAndroid Build Coastguard Worker {
454*8975f5c5SAndroid Build Coastguard Worker     return new TextureNULL(state);
455*8975f5c5SAndroid Build Coastguard Worker }
456*8975f5c5SAndroid Build Coastguard Worker 
createRenderbuffer(const gl::RenderbufferState & state)457*8975f5c5SAndroid Build Coastguard Worker RenderbufferImpl *ContextNULL::createRenderbuffer(const gl::RenderbufferState &state)
458*8975f5c5SAndroid Build Coastguard Worker {
459*8975f5c5SAndroid Build Coastguard Worker     return new RenderbufferNULL(state);
460*8975f5c5SAndroid Build Coastguard Worker }
461*8975f5c5SAndroid Build Coastguard Worker 
createBuffer(const gl::BufferState & state)462*8975f5c5SAndroid Build Coastguard Worker BufferImpl *ContextNULL::createBuffer(const gl::BufferState &state)
463*8975f5c5SAndroid Build Coastguard Worker {
464*8975f5c5SAndroid Build Coastguard Worker     return new BufferNULL(state, mAllocationTracker);
465*8975f5c5SAndroid Build Coastguard Worker }
466*8975f5c5SAndroid Build Coastguard Worker 
createVertexArray(const gl::VertexArrayState & data)467*8975f5c5SAndroid Build Coastguard Worker VertexArrayImpl *ContextNULL::createVertexArray(const gl::VertexArrayState &data)
468*8975f5c5SAndroid Build Coastguard Worker {
469*8975f5c5SAndroid Build Coastguard Worker     return new VertexArrayNULL(data);
470*8975f5c5SAndroid Build Coastguard Worker }
471*8975f5c5SAndroid Build Coastguard Worker 
createQuery(gl::QueryType type)472*8975f5c5SAndroid Build Coastguard Worker QueryImpl *ContextNULL::createQuery(gl::QueryType type)
473*8975f5c5SAndroid Build Coastguard Worker {
474*8975f5c5SAndroid Build Coastguard Worker     return new QueryNULL(type);
475*8975f5c5SAndroid Build Coastguard Worker }
476*8975f5c5SAndroid Build Coastguard Worker 
createFenceNV()477*8975f5c5SAndroid Build Coastguard Worker FenceNVImpl *ContextNULL::createFenceNV()
478*8975f5c5SAndroid Build Coastguard Worker {
479*8975f5c5SAndroid Build Coastguard Worker     return new FenceNVNULL();
480*8975f5c5SAndroid Build Coastguard Worker }
481*8975f5c5SAndroid Build Coastguard Worker 
createSync()482*8975f5c5SAndroid Build Coastguard Worker SyncImpl *ContextNULL::createSync()
483*8975f5c5SAndroid Build Coastguard Worker {
484*8975f5c5SAndroid Build Coastguard Worker     return new SyncNULL();
485*8975f5c5SAndroid Build Coastguard Worker }
486*8975f5c5SAndroid Build Coastguard Worker 
createTransformFeedback(const gl::TransformFeedbackState & state)487*8975f5c5SAndroid Build Coastguard Worker TransformFeedbackImpl *ContextNULL::createTransformFeedback(const gl::TransformFeedbackState &state)
488*8975f5c5SAndroid Build Coastguard Worker {
489*8975f5c5SAndroid Build Coastguard Worker     return new TransformFeedbackNULL(state);
490*8975f5c5SAndroid Build Coastguard Worker }
491*8975f5c5SAndroid Build Coastguard Worker 
createSampler(const gl::SamplerState & state)492*8975f5c5SAndroid Build Coastguard Worker SamplerImpl *ContextNULL::createSampler(const gl::SamplerState &state)
493*8975f5c5SAndroid Build Coastguard Worker {
494*8975f5c5SAndroid Build Coastguard Worker     return new SamplerNULL(state);
495*8975f5c5SAndroid Build Coastguard Worker }
496*8975f5c5SAndroid Build Coastguard Worker 
createProgramPipeline(const gl::ProgramPipelineState & state)497*8975f5c5SAndroid Build Coastguard Worker ProgramPipelineImpl *ContextNULL::createProgramPipeline(const gl::ProgramPipelineState &state)
498*8975f5c5SAndroid Build Coastguard Worker {
499*8975f5c5SAndroid Build Coastguard Worker     return new ProgramPipelineNULL(state);
500*8975f5c5SAndroid Build Coastguard Worker }
501*8975f5c5SAndroid Build Coastguard Worker 
createMemoryObject()502*8975f5c5SAndroid Build Coastguard Worker MemoryObjectImpl *ContextNULL::createMemoryObject()
503*8975f5c5SAndroid Build Coastguard Worker {
504*8975f5c5SAndroid Build Coastguard Worker     UNREACHABLE();
505*8975f5c5SAndroid Build Coastguard Worker     return nullptr;
506*8975f5c5SAndroid Build Coastguard Worker }
507*8975f5c5SAndroid Build Coastguard Worker 
createSemaphore()508*8975f5c5SAndroid Build Coastguard Worker SemaphoreImpl *ContextNULL::createSemaphore()
509*8975f5c5SAndroid Build Coastguard Worker {
510*8975f5c5SAndroid Build Coastguard Worker     UNREACHABLE();
511*8975f5c5SAndroid Build Coastguard Worker     return nullptr;
512*8975f5c5SAndroid Build Coastguard Worker }
513*8975f5c5SAndroid Build Coastguard Worker 
createOverlay(const gl::OverlayState & state)514*8975f5c5SAndroid Build Coastguard Worker OverlayImpl *ContextNULL::createOverlay(const gl::OverlayState &state)
515*8975f5c5SAndroid Build Coastguard Worker {
516*8975f5c5SAndroid Build Coastguard Worker     return new OverlayImpl(state);
517*8975f5c5SAndroid Build Coastguard Worker }
518*8975f5c5SAndroid Build Coastguard Worker 
dispatchCompute(const gl::Context * context,GLuint numGroupsX,GLuint numGroupsY,GLuint numGroupsZ)519*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::dispatchCompute(const gl::Context *context,
520*8975f5c5SAndroid Build Coastguard Worker                                            GLuint numGroupsX,
521*8975f5c5SAndroid Build Coastguard Worker                                            GLuint numGroupsY,
522*8975f5c5SAndroid Build Coastguard Worker                                            GLuint numGroupsZ)
523*8975f5c5SAndroid Build Coastguard Worker {
524*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
525*8975f5c5SAndroid Build Coastguard Worker }
526*8975f5c5SAndroid Build Coastguard Worker 
dispatchComputeIndirect(const gl::Context * context,GLintptr indirect)527*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::dispatchComputeIndirect(const gl::Context *context, GLintptr indirect)
528*8975f5c5SAndroid Build Coastguard Worker {
529*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
530*8975f5c5SAndroid Build Coastguard Worker }
531*8975f5c5SAndroid Build Coastguard Worker 
memoryBarrier(const gl::Context * context,GLbitfield barriers)532*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::memoryBarrier(const gl::Context *context, GLbitfield barriers)
533*8975f5c5SAndroid Build Coastguard Worker {
534*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
535*8975f5c5SAndroid Build Coastguard Worker }
536*8975f5c5SAndroid Build Coastguard Worker 
memoryBarrierByRegion(const gl::Context * context,GLbitfield barriers)537*8975f5c5SAndroid Build Coastguard Worker angle::Result ContextNULL::memoryBarrierByRegion(const gl::Context *context, GLbitfield barriers)
538*8975f5c5SAndroid Build Coastguard Worker {
539*8975f5c5SAndroid Build Coastguard Worker     return angle::Result::Continue;
540*8975f5c5SAndroid Build Coastguard Worker }
541*8975f5c5SAndroid Build Coastguard Worker 
handleError(GLenum errorCode,const char * message,const char * file,const char * function,unsigned int line)542*8975f5c5SAndroid Build Coastguard Worker void ContextNULL::handleError(GLenum errorCode,
543*8975f5c5SAndroid Build Coastguard Worker                               const char *message,
544*8975f5c5SAndroid Build Coastguard Worker                               const char *file,
545*8975f5c5SAndroid Build Coastguard Worker                               const char *function,
546*8975f5c5SAndroid Build Coastguard Worker                               unsigned int line)
547*8975f5c5SAndroid Build Coastguard Worker {
548*8975f5c5SAndroid Build Coastguard Worker     std::stringstream errorStream;
549*8975f5c5SAndroid Build Coastguard Worker     errorStream << "Internal NULL back-end error: " << message << ".";
550*8975f5c5SAndroid Build Coastguard Worker     mErrors->handleError(errorCode, errorStream.str().c_str(), file, function, line);
551*8975f5c5SAndroid Build Coastguard Worker }
552*8975f5c5SAndroid Build Coastguard Worker }  // namespace rx
553