blob: 5c326783f3e9196b216553a3f32d96f90d8d3d46 [file] [log] [blame]
Geoff Langd08f3b32016-09-23 15:56:30 -04001//
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// ContextNULL.cpp:
7// Implements the class methods for ContextNULL.
8//
9
10#include "libANGLE/renderer/null/ContextNULL.h"
11
12#include "common/debug.h"
13
Jamie Madillabfbc0f2018-10-09 12:48:52 -040014#include "libANGLE/Context.h"
Geoff Lang76cdbd52016-09-23 16:51:04 -040015#include "libANGLE/renderer/null/BufferNULL.h"
16#include "libANGLE/renderer/null/CompilerNULL.h"
17#include "libANGLE/renderer/null/DisplayNULL.h"
18#include "libANGLE/renderer/null/FenceNVNULL.h"
Geoff Lang76cdbd52016-09-23 16:51:04 -040019#include "libANGLE/renderer/null/FramebufferNULL.h"
20#include "libANGLE/renderer/null/ImageNULL.h"
21#include "libANGLE/renderer/null/PathNULL.h"
22#include "libANGLE/renderer/null/ProgramNULL.h"
Yunchao Hea336b902017-08-02 16:05:21 +080023#include "libANGLE/renderer/null/ProgramPipelineNULL.h"
Geoff Lang76cdbd52016-09-23 16:51:04 -040024#include "libANGLE/renderer/null/QueryNULL.h"
25#include "libANGLE/renderer/null/RenderbufferNULL.h"
26#include "libANGLE/renderer/null/SamplerNULL.h"
27#include "libANGLE/renderer/null/ShaderNULL.h"
Jamie Madill70b5bb02017-08-28 13:32:37 -040028#include "libANGLE/renderer/null/SyncNULL.h"
Geoff Lang76cdbd52016-09-23 16:51:04 -040029#include "libANGLE/renderer/null/TextureNULL.h"
30#include "libANGLE/renderer/null/TransformFeedbackNULL.h"
31#include "libANGLE/renderer/null/VertexArrayNULL.h"
32
Geoff Langd08f3b32016-09-23 15:56:30 -040033namespace rx
34{
35
Geoff Lang1b60d8d2017-02-10 14:56:55 -050036AllocationTrackerNULL::AllocationTrackerNULL(size_t maxTotalAllocationSize)
37 : mAllocatedBytes(0), mMaxBytes(maxTotalAllocationSize)
Jamie Madillb980c562018-11-27 11:34:27 -050038{}
Geoff Lang1b60d8d2017-02-10 14:56:55 -050039
40AllocationTrackerNULL::~AllocationTrackerNULL()
41{
42 // ASSERT that all objects with the NULL renderer clean up after themselves
43 ASSERT(mAllocatedBytes == 0);
44}
45
46bool AllocationTrackerNULL::updateMemoryAllocation(size_t oldSize, size_t newSize)
47{
48 ASSERT(mAllocatedBytes >= oldSize);
49
50 size_t sizeAfterRelease = mAllocatedBytes - oldSize;
51 size_t sizeAfterReallocate = sizeAfterRelease + newSize;
52 if (sizeAfterReallocate < sizeAfterRelease || sizeAfterReallocate > mMaxBytes)
53 {
54 // Overflow or allocation would be too large
55 return false;
56 }
57
58 mAllocatedBytes = sizeAfterReallocate;
59 return true;
60}
61
62ContextNULL::ContextNULL(const gl::ContextState &state, AllocationTrackerNULL *allocationTracker)
63 : ContextImpl(state), mAllocationTracker(allocationTracker)
64{
65 ASSERT(mAllocationTracker != nullptr);
66
Jamie Madill493f9572018-05-24 19:52:15 -040067 mExtensions = gl::Extensions();
68 mExtensions.fence = true;
69 mExtensions.instancedArrays = true;
70 mExtensions.pixelBufferObject = true;
71 mExtensions.mapBuffer = true;
72 mExtensions.mapBufferRange = true;
73 mExtensions.copyTexture = true;
74 mExtensions.copyCompressedTexture = true;
75 mExtensions.textureRectangle = true;
Geoff Lang73dcc602017-11-08 16:41:52 -050076 mExtensions.textureUsage = true;
77 mExtensions.vertexArrayObject = true;
78 mExtensions.debugMarker = true;
79 mExtensions.translatedShaderSource = true;
Geoff Lang1e031b22017-02-10 15:01:28 -050080
Geoff Langd54d3042017-11-07 14:56:07 -050081 mExtensions.textureStorage = true;
Jamie Madill493f9572018-05-24 19:52:15 -040082 mExtensions.rgb8rgba8 = true;
Geoff Lang86f81162017-10-30 15:10:45 -040083 mExtensions.textureCompressionDXT1 = true;
84 mExtensions.textureCompressionDXT3 = true;
85 mExtensions.textureCompressionDXT5 = true;
86 mExtensions.textureCompressionS3TCsRGB = true;
87 mExtensions.textureCompressionASTCHDR = true;
88 mExtensions.textureCompressionASTCLDR = true;
89 mExtensions.compressedETC1RGB8Texture = true;
90 mExtensions.lossyETCDecode = true;
Jiawei Shao361df072017-11-22 09:33:59 +080091 mExtensions.geometryShader = true;
Geoff Langd84a00b2017-10-27 17:27:26 -040092
Geoff Lang025aafd2017-10-30 15:16:37 -040093 mExtensions.eglImage = true;
94 mExtensions.eglImageExternal = true;
95 mExtensions.eglImageExternalEssl3 = true;
96 mExtensions.eglStreamConsumerExternal = true;
97
Geoff Lang4751aab2017-10-30 15:14:52 -040098 const gl::Version maxClientVersion(3, 1);
99 mCaps = GenerateMinimumCaps(maxClientVersion, mExtensions);
100
Jamie Madill7b62cf92017-11-02 15:20:49 -0400101 InitMinimumTextureCapsMap(maxClientVersion, mExtensions, &mTextureCaps);
Geoff Langd08f3b32016-09-23 15:56:30 -0400102}
103
Jamie Madillb980c562018-11-27 11:34:27 -0500104ContextNULL::~ContextNULL() {}
Geoff Langd08f3b32016-09-23 15:56:30 -0400105
Jamie Madill32643ce2018-10-19 11:38:03 -0400106angle::Result ContextNULL::initialize()
Geoff Langd08f3b32016-09-23 15:56:30 -0400107{
Jamie Madill32643ce2018-10-19 11:38:03 -0400108 return angle::Result::Continue();
Geoff Langd08f3b32016-09-23 15:56:30 -0400109}
110
Jamie Madill32643ce2018-10-19 11:38:03 -0400111angle::Result ContextNULL::flush(const gl::Context *context)
Geoff Langd08f3b32016-09-23 15:56:30 -0400112{
Jamie Madill32643ce2018-10-19 11:38:03 -0400113 return angle::Result::Continue();
Geoff Langd08f3b32016-09-23 15:56:30 -0400114}
115
Jamie Madill32643ce2018-10-19 11:38:03 -0400116angle::Result ContextNULL::finish(const gl::Context *context)
Geoff Langd08f3b32016-09-23 15:56:30 -0400117{
Jamie Madill32643ce2018-10-19 11:38:03 -0400118 return angle::Result::Continue();
Geoff Langd08f3b32016-09-23 15:56:30 -0400119}
120
Jamie Madill6f755b22018-10-09 12:48:54 -0400121angle::Result ContextNULL::drawArrays(const gl::Context *context,
122 gl::PrimitiveMode mode,
123 GLint first,
124 GLsizei count)
Geoff Langd08f3b32016-09-23 15:56:30 -0400125{
Jamie Madill6f755b22018-10-09 12:48:54 -0400126 return angle::Result::Continue();
Geoff Langd08f3b32016-09-23 15:56:30 -0400127}
128
Jamie Madill32643ce2018-10-19 11:38:03 -0400129angle::Result ContextNULL::drawArraysInstanced(const gl::Context *context,
130 gl::PrimitiveMode mode,
131 GLint first,
132 GLsizei count,
133 GLsizei instanceCount)
Geoff Langd08f3b32016-09-23 15:56:30 -0400134{
Jamie Madill32643ce2018-10-19 11:38:03 -0400135 return angle::Result::Continue();
Geoff Langd08f3b32016-09-23 15:56:30 -0400136}
137
Jamie Madill32643ce2018-10-19 11:38:03 -0400138angle::Result ContextNULL::drawElements(const gl::Context *context,
139 gl::PrimitiveMode mode,
140 GLsizei count,
Jamie Madill8dc27f92018-11-29 11:45:44 -0500141 gl::DrawElementsType type,
Jamie Madill32643ce2018-10-19 11:38:03 -0400142 const void *indices)
Geoff Langd08f3b32016-09-23 15:56:30 -0400143{
Jamie Madill32643ce2018-10-19 11:38:03 -0400144 return angle::Result::Continue();
Geoff Langd08f3b32016-09-23 15:56:30 -0400145}
146
Jamie Madill32643ce2018-10-19 11:38:03 -0400147angle::Result ContextNULL::drawElementsInstanced(const gl::Context *context,
148 gl::PrimitiveMode mode,
149 GLsizei count,
Jamie Madill8dc27f92018-11-29 11:45:44 -0500150 gl::DrawElementsType type,
Jamie Madill32643ce2018-10-19 11:38:03 -0400151 const void *indices,
152 GLsizei instances)
153{
154 return angle::Result::Continue();
155}
156
157angle::Result ContextNULL::drawRangeElements(const gl::Context *context,
Jamie Madill493f9572018-05-24 19:52:15 -0400158 gl::PrimitiveMode mode,
Jamie Madill32643ce2018-10-19 11:38:03 -0400159 GLuint start,
160 GLuint end,
Geoff Langd08f3b32016-09-23 15:56:30 -0400161 GLsizei count,
Jamie Madill8dc27f92018-11-29 11:45:44 -0500162 gl::DrawElementsType type,
Jamie Madill32643ce2018-10-19 11:38:03 -0400163 const void *indices)
Geoff Langd08f3b32016-09-23 15:56:30 -0400164{
Jamie Madill32643ce2018-10-19 11:38:03 -0400165 return angle::Result::Continue();
Geoff Langd08f3b32016-09-23 15:56:30 -0400166}
167
Jamie Madill32643ce2018-10-19 11:38:03 -0400168angle::Result ContextNULL::drawArraysIndirect(const gl::Context *context,
169 gl::PrimitiveMode mode,
170 const void *indirect)
Geoff Langd08f3b32016-09-23 15:56:30 -0400171{
Jamie Madill32643ce2018-10-19 11:38:03 -0400172 return angle::Result::Continue();
Geoff Lang76cdbd52016-09-23 16:51:04 -0400173}
174
Jamie Madill32643ce2018-10-19 11:38:03 -0400175angle::Result ContextNULL::drawElementsIndirect(const gl::Context *context,
176 gl::PrimitiveMode mode,
Jamie Madill8dc27f92018-11-29 11:45:44 -0500177 gl::DrawElementsType type,
Jamie Madill32643ce2018-10-19 11:38:03 -0400178 const void *indirect)
Jiajia Qind9671222016-11-29 16:30:31 +0800179{
Jamie Madill32643ce2018-10-19 11:38:03 -0400180 return angle::Result::Continue();
Jiajia Qind9671222016-11-29 16:30:31 +0800181}
182
Jamie Madillb980c562018-11-27 11:34:27 -0500183void ContextNULL::stencilFillPath(const gl::Path *path, GLenum fillMode, GLuint mask) {}
Geoff Lang76cdbd52016-09-23 16:51:04 -0400184
Jamie Madillb980c562018-11-27 11:34:27 -0500185void ContextNULL::stencilStrokePath(const gl::Path *path, GLint reference, GLuint mask) {}
Geoff Lang76cdbd52016-09-23 16:51:04 -0400186
Jamie Madillb980c562018-11-27 11:34:27 -0500187void ContextNULL::coverFillPath(const gl::Path *path, GLenum coverMode) {}
Geoff Lang76cdbd52016-09-23 16:51:04 -0400188
Jamie Madillb980c562018-11-27 11:34:27 -0500189void ContextNULL::coverStrokePath(const gl::Path *path, GLenum coverMode) {}
Geoff Lang76cdbd52016-09-23 16:51:04 -0400190
191void ContextNULL::stencilThenCoverFillPath(const gl::Path *path,
192 GLenum fillMode,
193 GLuint mask,
194 GLenum coverMode)
Jamie Madillb980c562018-11-27 11:34:27 -0500195{}
Geoff Lang76cdbd52016-09-23 16:51:04 -0400196
197void ContextNULL::stencilThenCoverStrokePath(const gl::Path *path,
198 GLint reference,
199 GLuint mask,
200 GLenum coverMode)
Jamie Madillb980c562018-11-27 11:34:27 -0500201{}
Geoff Lang76cdbd52016-09-23 16:51:04 -0400202
203void ContextNULL::coverFillPathInstanced(const std::vector<gl::Path *> &paths,
204 GLenum coverMode,
205 GLenum transformType,
206 const GLfloat *transformValues)
Jamie Madillb980c562018-11-27 11:34:27 -0500207{}
Geoff Lang76cdbd52016-09-23 16:51:04 -0400208
209void ContextNULL::coverStrokePathInstanced(const std::vector<gl::Path *> &paths,
210 GLenum coverMode,
211 GLenum transformType,
212 const GLfloat *transformValues)
Jamie Madillb980c562018-11-27 11:34:27 -0500213{}
Geoff Lang76cdbd52016-09-23 16:51:04 -0400214
215void ContextNULL::stencilFillPathInstanced(const std::vector<gl::Path *> &paths,
216 GLenum fillMode,
217 GLuint mask,
218 GLenum transformType,
219 const GLfloat *transformValues)
Jamie Madillb980c562018-11-27 11:34:27 -0500220{}
Geoff Lang76cdbd52016-09-23 16:51:04 -0400221
222void ContextNULL::stencilStrokePathInstanced(const std::vector<gl::Path *> &paths,
223 GLint reference,
224 GLuint mask,
225 GLenum transformType,
226 const GLfloat *transformValues)
Jamie Madillb980c562018-11-27 11:34:27 -0500227{}
Geoff Lang76cdbd52016-09-23 16:51:04 -0400228
229void ContextNULL::stencilThenCoverFillPathInstanced(const std::vector<gl::Path *> &paths,
230 GLenum coverMode,
231 GLenum fillMode,
232 GLuint mask,
233 GLenum transformType,
234 const GLfloat *transformValues)
Jamie Madillb980c562018-11-27 11:34:27 -0500235{}
Geoff Lang76cdbd52016-09-23 16:51:04 -0400236
237void ContextNULL::stencilThenCoverStrokePathInstanced(const std::vector<gl::Path *> &paths,
238 GLenum coverMode,
239 GLint reference,
240 GLuint mask,
241 GLenum transformType,
242 const GLfloat *transformValues)
Jamie Madillb980c562018-11-27 11:34:27 -0500243{}
Geoff Lang76cdbd52016-09-23 16:51:04 -0400244
245GLenum ContextNULL::getResetStatus()
246{
247 return GL_NO_ERROR;
248}
249
250std::string ContextNULL::getVendorString() const
251{
252 return "NULL";
253}
254
255std::string ContextNULL::getRendererDescription() const
256{
257 return "NULL";
258}
259
Jamie Madillb980c562018-11-27 11:34:27 -0500260void ContextNULL::insertEventMarker(GLsizei length, const char *marker) {}
Geoff Lang76cdbd52016-09-23 16:51:04 -0400261
Jamie Madillb980c562018-11-27 11:34:27 -0500262void ContextNULL::pushGroupMarker(GLsizei length, const char *marker) {}
Geoff Lang76cdbd52016-09-23 16:51:04 -0400263
Jamie Madillb980c562018-11-27 11:34:27 -0500264void ContextNULL::popGroupMarker() {}
Geoff Lang76cdbd52016-09-23 16:51:04 -0400265
Jamie Madillb980c562018-11-27 11:34:27 -0500266void ContextNULL::pushDebugGroup(GLenum source, GLuint id, GLsizei length, const char *message) {}
Geoff Lang5d5253a2017-11-22 14:51:12 -0500267
Jamie Madillb980c562018-11-27 11:34:27 -0500268void ContextNULL::popDebugGroup() {}
Geoff Lang5d5253a2017-11-22 14:51:12 -0500269
Jamie Madill6f755b22018-10-09 12:48:54 -0400270angle::Result ContextNULL::syncState(const gl::Context *context,
Jamie Madill9d0bb3d2018-10-09 20:29:13 -0400271 const gl::State::DirtyBits &dirtyBits,
272 const gl::State::DirtyBits &bitMask)
Geoff Lang76cdbd52016-09-23 16:51:04 -0400273{
Jamie Madill6f755b22018-10-09 12:48:54 -0400274 return angle::Result::Continue();
Geoff Lang76cdbd52016-09-23 16:51:04 -0400275}
276
277GLint ContextNULL::getGPUDisjoint()
278{
279 return 0;
280}
281
282GLint64 ContextNULL::getTimestamp()
283{
284 return 0;
285}
286
Jamie Madill32643ce2018-10-19 11:38:03 -0400287angle::Result ContextNULL::onMakeCurrent(const gl::Context *context)
Geoff Lang76cdbd52016-09-23 16:51:04 -0400288{
Jamie Madill32643ce2018-10-19 11:38:03 -0400289 return angle::Result::Continue();
Geoff Lang76cdbd52016-09-23 16:51:04 -0400290}
291
Jiawei Shaod0a7d102018-05-07 12:40:20 +0800292gl::Caps ContextNULL::getNativeCaps() const
Geoff Lang76cdbd52016-09-23 16:51:04 -0400293{
294 return mCaps;
295}
296
297const gl::TextureCapsMap &ContextNULL::getNativeTextureCaps() const
298{
299 return mTextureCaps;
300}
301
302const gl::Extensions &ContextNULL::getNativeExtensions() const
303{
304 return mExtensions;
305}
306
307const gl::Limitations &ContextNULL::getNativeLimitations() const
308{
309 return mLimitations;
Geoff Langd08f3b32016-09-23 15:56:30 -0400310}
311
312CompilerImpl *ContextNULL::createCompiler()
313{
Geoff Lang76cdbd52016-09-23 16:51:04 -0400314 return new CompilerNULL();
Geoff Langd08f3b32016-09-23 15:56:30 -0400315}
316
317ShaderImpl *ContextNULL::createShader(const gl::ShaderState &data)
318{
Geoff Lang76cdbd52016-09-23 16:51:04 -0400319 return new ShaderNULL(data);
Geoff Langd08f3b32016-09-23 15:56:30 -0400320}
321
322ProgramImpl *ContextNULL::createProgram(const gl::ProgramState &data)
323{
Geoff Lang76cdbd52016-09-23 16:51:04 -0400324 return new ProgramNULL(data);
Geoff Langd08f3b32016-09-23 15:56:30 -0400325}
326
327FramebufferImpl *ContextNULL::createFramebuffer(const gl::FramebufferState &data)
328{
Geoff Lang76cdbd52016-09-23 16:51:04 -0400329 return new FramebufferNULL(data);
Geoff Langd08f3b32016-09-23 15:56:30 -0400330}
331
332TextureImpl *ContextNULL::createTexture(const gl::TextureState &state)
333{
Geoff Lang76cdbd52016-09-23 16:51:04 -0400334 return new TextureNULL(state);
Geoff Langd08f3b32016-09-23 15:56:30 -0400335}
336
Jamie Madille703c602018-02-20 10:21:48 -0500337RenderbufferImpl *ContextNULL::createRenderbuffer(const gl::RenderbufferState &state)
Geoff Langd08f3b32016-09-23 15:56:30 -0400338{
Jamie Madille703c602018-02-20 10:21:48 -0500339 return new RenderbufferNULL(state);
Geoff Langd08f3b32016-09-23 15:56:30 -0400340}
341
Jamie Madill8f775602016-11-03 16:45:34 -0400342BufferImpl *ContextNULL::createBuffer(const gl::BufferState &state)
Geoff Langd08f3b32016-09-23 15:56:30 -0400343{
Geoff Lang1b60d8d2017-02-10 14:56:55 -0500344 return new BufferNULL(state, mAllocationTracker);
Geoff Langd08f3b32016-09-23 15:56:30 -0400345}
346
347VertexArrayImpl *ContextNULL::createVertexArray(const gl::VertexArrayState &data)
348{
Geoff Lang76cdbd52016-09-23 16:51:04 -0400349 return new VertexArrayNULL(data);
Geoff Langd08f3b32016-09-23 15:56:30 -0400350}
351
Corentin Wallezad3ae902018-03-09 13:40:42 -0500352QueryImpl *ContextNULL::createQuery(gl::QueryType type)
Geoff Langd08f3b32016-09-23 15:56:30 -0400353{
Geoff Lang76cdbd52016-09-23 16:51:04 -0400354 return new QueryNULL(type);
Geoff Langd08f3b32016-09-23 15:56:30 -0400355}
356
357FenceNVImpl *ContextNULL::createFenceNV()
358{
Geoff Lang76cdbd52016-09-23 16:51:04 -0400359 return new FenceNVNULL();
Geoff Langd08f3b32016-09-23 15:56:30 -0400360}
361
Jamie Madill70b5bb02017-08-28 13:32:37 -0400362SyncImpl *ContextNULL::createSync()
Geoff Langd08f3b32016-09-23 15:56:30 -0400363{
Jamie Madill70b5bb02017-08-28 13:32:37 -0400364 return new SyncNULL();
Geoff Langd08f3b32016-09-23 15:56:30 -0400365}
366
367TransformFeedbackImpl *ContextNULL::createTransformFeedback(const gl::TransformFeedbackState &state)
368{
Geoff Lang76cdbd52016-09-23 16:51:04 -0400369 return new TransformFeedbackNULL(state);
Geoff Langd08f3b32016-09-23 15:56:30 -0400370}
371
Jamie Madill06ef36b2017-09-09 23:32:46 -0400372SamplerImpl *ContextNULL::createSampler(const gl::SamplerState &state)
Geoff Langd08f3b32016-09-23 15:56:30 -0400373{
Jamie Madill06ef36b2017-09-09 23:32:46 -0400374 return new SamplerNULL(state);
Geoff Langd08f3b32016-09-23 15:56:30 -0400375}
376
Yunchao Hea336b902017-08-02 16:05:21 +0800377ProgramPipelineImpl *ContextNULL::createProgramPipeline(const gl::ProgramPipelineState &state)
378{
379 return new ProgramPipelineNULL(state);
380}
381
Geoff Langd08f3b32016-09-23 15:56:30 -0400382std::vector<PathImpl *> ContextNULL::createPaths(GLsizei range)
383{
Geoff Lang76cdbd52016-09-23 16:51:04 -0400384 std::vector<PathImpl *> result(range);
385 for (GLsizei idx = 0; idx < range; idx++)
386 {
387 result[idx] = new PathNULL();
388 }
389 return result;
Geoff Langd08f3b32016-09-23 15:56:30 -0400390}
391
Jamie Madill32643ce2018-10-19 11:38:03 -0400392angle::Result ContextNULL::dispatchCompute(const gl::Context *context,
393 GLuint numGroupsX,
394 GLuint numGroupsY,
395 GLuint numGroupsZ)
Xinghua Cao2b396592017-03-29 15:36:04 +0800396{
Jamie Madill32643ce2018-10-19 11:38:03 -0400397 return angle::Result::Continue();
Xinghua Cao2b396592017-03-29 15:36:04 +0800398}
399
Jamie Madill32643ce2018-10-19 11:38:03 -0400400angle::Result ContextNULL::dispatchComputeIndirect(const gl::Context *context, GLintptr indirect)
Qin Jiajia62fcf622017-11-30 16:16:12 +0800401{
Jamie Madill32643ce2018-10-19 11:38:03 -0400402 return angle::Result::Continue();
Qin Jiajia62fcf622017-11-30 16:16:12 +0800403}
404
Jamie Madill32643ce2018-10-19 11:38:03 -0400405angle::Result ContextNULL::memoryBarrier(const gl::Context *context, GLbitfield barriers)
Xinghua Cao89c422a2017-11-29 18:24:20 +0800406{
Jamie Madill32643ce2018-10-19 11:38:03 -0400407 return angle::Result::Continue();
Xinghua Cao89c422a2017-11-29 18:24:20 +0800408}
409
Jamie Madill32643ce2018-10-19 11:38:03 -0400410angle::Result ContextNULL::memoryBarrierByRegion(const gl::Context *context, GLbitfield barriers)
Xinghua Cao89c422a2017-11-29 18:24:20 +0800411{
Jamie Madill32643ce2018-10-19 11:38:03 -0400412 return angle::Result::Continue();
Xinghua Cao89c422a2017-11-29 18:24:20 +0800413}
414
Jamie Madillabfbc0f2018-10-09 12:48:52 -0400415void ContextNULL::handleError(GLenum errorCode,
416 const char *message,
417 const char *file,
418 const char *function,
419 unsigned int line)
420{
421 std::stringstream errorStream;
Jamie Madill4f6592f2018-11-27 16:37:45 -0500422 errorStream << "Internal NULL back-end error: " << message << ".";
423 mErrors->handleError(errorCode, errorStream.str().c_str(), file, function, line);
Jamie Madillabfbc0f2018-10-09 12:48:52 -0400424}
Geoff Langd08f3b32016-09-23 15:56:30 -0400425} // namespace rx