Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 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 | // 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 | |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 14 | #include "libANGLE/renderer/null/BufferNULL.h" |
| 15 | #include "libANGLE/renderer/null/CompilerNULL.h" |
| 16 | #include "libANGLE/renderer/null/DisplayNULL.h" |
| 17 | #include "libANGLE/renderer/null/FenceNVNULL.h" |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 18 | #include "libANGLE/renderer/null/FramebufferNULL.h" |
| 19 | #include "libANGLE/renderer/null/ImageNULL.h" |
| 20 | #include "libANGLE/renderer/null/PathNULL.h" |
| 21 | #include "libANGLE/renderer/null/ProgramNULL.h" |
Yunchao He | a336b90 | 2017-08-02 16:05:21 +0800 | [diff] [blame] | 22 | #include "libANGLE/renderer/null/ProgramPipelineNULL.h" |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 23 | #include "libANGLE/renderer/null/QueryNULL.h" |
| 24 | #include "libANGLE/renderer/null/RenderbufferNULL.h" |
| 25 | #include "libANGLE/renderer/null/SamplerNULL.h" |
| 26 | #include "libANGLE/renderer/null/ShaderNULL.h" |
Jamie Madill | 70b5bb0 | 2017-08-28 13:32:37 -0400 | [diff] [blame] | 27 | #include "libANGLE/renderer/null/SyncNULL.h" |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 28 | #include "libANGLE/renderer/null/TextureNULL.h" |
| 29 | #include "libANGLE/renderer/null/TransformFeedbackNULL.h" |
| 30 | #include "libANGLE/renderer/null/VertexArrayNULL.h" |
| 31 | |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 32 | namespace rx |
| 33 | { |
| 34 | |
Geoff Lang | 1b60d8d | 2017-02-10 14:56:55 -0500 | [diff] [blame] | 35 | AllocationTrackerNULL::AllocationTrackerNULL(size_t maxTotalAllocationSize) |
| 36 | : mAllocatedBytes(0), mMaxBytes(maxTotalAllocationSize) |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 37 | { |
Geoff Lang | 1b60d8d | 2017-02-10 14:56:55 -0500 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | AllocationTrackerNULL::~AllocationTrackerNULL() |
| 41 | { |
| 42 | // ASSERT that all objects with the NULL renderer clean up after themselves |
| 43 | ASSERT(mAllocatedBytes == 0); |
| 44 | } |
| 45 | |
| 46 | bool 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 | |
| 62 | ContextNULL::ContextNULL(const gl::ContextState &state, AllocationTrackerNULL *allocationTracker) |
| 63 | : ContextImpl(state), mAllocationTracker(allocationTracker) |
| 64 | { |
| 65 | ASSERT(mAllocationTracker != nullptr); |
| 66 | |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 67 | const gl::Version maxClientVersion(3, 1); |
Jamie Madill | 231c7f5 | 2017-04-26 13:45:37 -0400 | [diff] [blame] | 68 | mCaps = GenerateMinimumCaps(maxClientVersion); |
Geoff Lang | 1e031b2 | 2017-02-10 15:01:28 -0500 | [diff] [blame] | 69 | |
Jamie Madill | 231c7f5 | 2017-04-26 13:45:37 -0400 | [diff] [blame] | 70 | mExtensions = gl::Extensions(); |
Geoff Lang | 04d0646 | 2017-10-02 16:01:13 -0400 | [diff] [blame] | 71 | mExtensions.fence = true; |
Geoff Lang | 111a99e | 2017-10-17 10:58:41 -0400 | [diff] [blame^] | 72 | mExtensions.instancedArrays = true; |
Geoff Lang | adaabc3 | 2017-10-02 16:23:00 -0400 | [diff] [blame] | 73 | mExtensions.pixelBufferObject = true; |
| 74 | mExtensions.mapBuffer = true; |
| 75 | mExtensions.mapBufferRange = true; |
Geoff Lang | 1e031b2 | 2017-02-10 15:01:28 -0500 | [diff] [blame] | 76 | mExtensions.copyTexture = true; |
| 77 | mExtensions.copyCompressedTexture = true; |
| 78 | |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 79 | mTextureCaps = GenerateMinimumTextureCapsMap(maxClientVersion, mExtensions); |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 80 | } |
| 81 | |
| 82 | ContextNULL::~ContextNULL() |
| 83 | { |
| 84 | } |
| 85 | |
| 86 | gl::Error ContextNULL::initialize() |
| 87 | { |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 88 | return gl::NoError(); |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 89 | } |
| 90 | |
| 91 | gl::Error ContextNULL::flush() |
| 92 | { |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 93 | return gl::NoError(); |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 94 | } |
| 95 | |
| 96 | gl::Error ContextNULL::finish() |
| 97 | { |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 98 | return gl::NoError(); |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 99 | } |
| 100 | |
Jamie Madill | c564c07 | 2017-06-01 12:45:42 -0400 | [diff] [blame] | 101 | gl::Error ContextNULL::drawArrays(const gl::Context *context, |
| 102 | GLenum mode, |
| 103 | GLint first, |
| 104 | GLsizei count) |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 105 | { |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 106 | return gl::NoError(); |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 107 | } |
| 108 | |
Jamie Madill | c564c07 | 2017-06-01 12:45:42 -0400 | [diff] [blame] | 109 | gl::Error ContextNULL::drawArraysInstanced(const gl::Context *context, |
| 110 | GLenum mode, |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 111 | GLint first, |
| 112 | GLsizei count, |
| 113 | GLsizei instanceCount) |
| 114 | { |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 115 | return gl::NoError(); |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 116 | } |
| 117 | |
Jamie Madill | c564c07 | 2017-06-01 12:45:42 -0400 | [diff] [blame] | 118 | gl::Error ContextNULL::drawElements(const gl::Context *context, |
| 119 | GLenum mode, |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 120 | GLsizei count, |
| 121 | GLenum type, |
Qin Jiajia | 1da0065 | 2017-06-20 17:16:25 +0800 | [diff] [blame] | 122 | const void *indices) |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 123 | { |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 124 | return gl::NoError(); |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 125 | } |
| 126 | |
Jamie Madill | c564c07 | 2017-06-01 12:45:42 -0400 | [diff] [blame] | 127 | gl::Error ContextNULL::drawElementsInstanced(const gl::Context *context, |
| 128 | GLenum mode, |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 129 | GLsizei count, |
| 130 | GLenum type, |
Jamie Madill | 876429b | 2017-04-20 15:46:24 -0400 | [diff] [blame] | 131 | const void *indices, |
Qin Jiajia | 1da0065 | 2017-06-20 17:16:25 +0800 | [diff] [blame] | 132 | GLsizei instances) |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 133 | { |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 134 | return gl::NoError(); |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 135 | } |
| 136 | |
Jamie Madill | c564c07 | 2017-06-01 12:45:42 -0400 | [diff] [blame] | 137 | gl::Error ContextNULL::drawRangeElements(const gl::Context *context, |
| 138 | GLenum mode, |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 139 | GLuint start, |
| 140 | GLuint end, |
| 141 | GLsizei count, |
| 142 | GLenum type, |
Qin Jiajia | 1da0065 | 2017-06-20 17:16:25 +0800 | [diff] [blame] | 143 | const void *indices) |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 144 | { |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 145 | return gl::NoError(); |
| 146 | } |
| 147 | |
Jamie Madill | c564c07 | 2017-06-01 12:45:42 -0400 | [diff] [blame] | 148 | gl::Error ContextNULL::drawArraysIndirect(const gl::Context *context, |
| 149 | GLenum mode, |
| 150 | const void *indirect) |
Jiajia Qin | d967122 | 2016-11-29 16:30:31 +0800 | [diff] [blame] | 151 | { |
| 152 | return gl::NoError(); |
| 153 | } |
| 154 | |
Jamie Madill | c564c07 | 2017-06-01 12:45:42 -0400 | [diff] [blame] | 155 | gl::Error ContextNULL::drawElementsIndirect(const gl::Context *context, |
| 156 | GLenum mode, |
| 157 | GLenum type, |
| 158 | const void *indirect) |
Jiajia Qin | d967122 | 2016-11-29 16:30:31 +0800 | [diff] [blame] | 159 | { |
| 160 | return gl::NoError(); |
| 161 | } |
| 162 | |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 163 | void ContextNULL::stencilFillPath(const gl::Path *path, GLenum fillMode, GLuint mask) |
| 164 | { |
| 165 | } |
| 166 | |
| 167 | void ContextNULL::stencilStrokePath(const gl::Path *path, GLint reference, GLuint mask) |
| 168 | { |
| 169 | } |
| 170 | |
| 171 | void ContextNULL::coverFillPath(const gl::Path *path, GLenum coverMode) |
| 172 | { |
| 173 | } |
| 174 | |
| 175 | void ContextNULL::coverStrokePath(const gl::Path *path, GLenum coverMode) |
| 176 | { |
| 177 | } |
| 178 | |
| 179 | void ContextNULL::stencilThenCoverFillPath(const gl::Path *path, |
| 180 | GLenum fillMode, |
| 181 | GLuint mask, |
| 182 | GLenum coverMode) |
| 183 | { |
| 184 | } |
| 185 | |
| 186 | void ContextNULL::stencilThenCoverStrokePath(const gl::Path *path, |
| 187 | GLint reference, |
| 188 | GLuint mask, |
| 189 | GLenum coverMode) |
| 190 | { |
| 191 | } |
| 192 | |
| 193 | void ContextNULL::coverFillPathInstanced(const std::vector<gl::Path *> &paths, |
| 194 | GLenum coverMode, |
| 195 | GLenum transformType, |
| 196 | const GLfloat *transformValues) |
| 197 | { |
| 198 | } |
| 199 | |
| 200 | void ContextNULL::coverStrokePathInstanced(const std::vector<gl::Path *> &paths, |
| 201 | GLenum coverMode, |
| 202 | GLenum transformType, |
| 203 | const GLfloat *transformValues) |
| 204 | { |
| 205 | } |
| 206 | |
| 207 | void ContextNULL::stencilFillPathInstanced(const std::vector<gl::Path *> &paths, |
| 208 | GLenum fillMode, |
| 209 | GLuint mask, |
| 210 | GLenum transformType, |
| 211 | const GLfloat *transformValues) |
| 212 | { |
| 213 | } |
| 214 | |
| 215 | void ContextNULL::stencilStrokePathInstanced(const std::vector<gl::Path *> &paths, |
| 216 | GLint reference, |
| 217 | GLuint mask, |
| 218 | GLenum transformType, |
| 219 | const GLfloat *transformValues) |
| 220 | { |
| 221 | } |
| 222 | |
| 223 | void ContextNULL::stencilThenCoverFillPathInstanced(const std::vector<gl::Path *> &paths, |
| 224 | GLenum coverMode, |
| 225 | GLenum fillMode, |
| 226 | GLuint mask, |
| 227 | GLenum transformType, |
| 228 | const GLfloat *transformValues) |
| 229 | { |
| 230 | } |
| 231 | |
| 232 | void ContextNULL::stencilThenCoverStrokePathInstanced(const std::vector<gl::Path *> &paths, |
| 233 | GLenum coverMode, |
| 234 | GLint reference, |
| 235 | GLuint mask, |
| 236 | GLenum transformType, |
| 237 | const GLfloat *transformValues) |
| 238 | { |
| 239 | } |
| 240 | |
| 241 | GLenum ContextNULL::getResetStatus() |
| 242 | { |
| 243 | return GL_NO_ERROR; |
| 244 | } |
| 245 | |
| 246 | std::string ContextNULL::getVendorString() const |
| 247 | { |
| 248 | return "NULL"; |
| 249 | } |
| 250 | |
| 251 | std::string ContextNULL::getRendererDescription() const |
| 252 | { |
| 253 | return "NULL"; |
| 254 | } |
| 255 | |
| 256 | void ContextNULL::insertEventMarker(GLsizei length, const char *marker) |
| 257 | { |
| 258 | } |
| 259 | |
| 260 | void ContextNULL::pushGroupMarker(GLsizei length, const char *marker) |
| 261 | { |
| 262 | } |
| 263 | |
| 264 | void ContextNULL::popGroupMarker() |
| 265 | { |
| 266 | } |
| 267 | |
Jamie Madill | fe54834 | 2017-06-19 11:13:24 -0400 | [diff] [blame] | 268 | void ContextNULL::syncState(const gl::Context *context, const gl::State::DirtyBits &dirtyBits) |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 269 | { |
| 270 | } |
| 271 | |
| 272 | GLint ContextNULL::getGPUDisjoint() |
| 273 | { |
| 274 | return 0; |
| 275 | } |
| 276 | |
| 277 | GLint64 ContextNULL::getTimestamp() |
| 278 | { |
| 279 | return 0; |
| 280 | } |
| 281 | |
Jamie Madill | 4928b7c | 2017-06-20 12:57:39 -0400 | [diff] [blame] | 282 | void ContextNULL::onMakeCurrent(const gl::Context *context) |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 283 | { |
| 284 | } |
| 285 | |
| 286 | const gl::Caps &ContextNULL::getNativeCaps() const |
| 287 | { |
| 288 | return mCaps; |
| 289 | } |
| 290 | |
| 291 | const gl::TextureCapsMap &ContextNULL::getNativeTextureCaps() const |
| 292 | { |
| 293 | return mTextureCaps; |
| 294 | } |
| 295 | |
| 296 | const gl::Extensions &ContextNULL::getNativeExtensions() const |
| 297 | { |
| 298 | return mExtensions; |
| 299 | } |
| 300 | |
| 301 | const gl::Limitations &ContextNULL::getNativeLimitations() const |
| 302 | { |
| 303 | return mLimitations; |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 304 | } |
| 305 | |
| 306 | CompilerImpl *ContextNULL::createCompiler() |
| 307 | { |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 308 | return new CompilerNULL(); |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 309 | } |
| 310 | |
| 311 | ShaderImpl *ContextNULL::createShader(const gl::ShaderState &data) |
| 312 | { |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 313 | return new ShaderNULL(data); |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 314 | } |
| 315 | |
| 316 | ProgramImpl *ContextNULL::createProgram(const gl::ProgramState &data) |
| 317 | { |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 318 | return new ProgramNULL(data); |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 319 | } |
| 320 | |
| 321 | FramebufferImpl *ContextNULL::createFramebuffer(const gl::FramebufferState &data) |
| 322 | { |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 323 | return new FramebufferNULL(data); |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 324 | } |
| 325 | |
| 326 | TextureImpl *ContextNULL::createTexture(const gl::TextureState &state) |
| 327 | { |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 328 | return new TextureNULL(state); |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 329 | } |
| 330 | |
| 331 | RenderbufferImpl *ContextNULL::createRenderbuffer() |
| 332 | { |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 333 | return new RenderbufferNULL(); |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 334 | } |
| 335 | |
Jamie Madill | 8f77560 | 2016-11-03 16:45:34 -0400 | [diff] [blame] | 336 | BufferImpl *ContextNULL::createBuffer(const gl::BufferState &state) |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 337 | { |
Geoff Lang | 1b60d8d | 2017-02-10 14:56:55 -0500 | [diff] [blame] | 338 | return new BufferNULL(state, mAllocationTracker); |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 339 | } |
| 340 | |
| 341 | VertexArrayImpl *ContextNULL::createVertexArray(const gl::VertexArrayState &data) |
| 342 | { |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 343 | return new VertexArrayNULL(data); |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 344 | } |
| 345 | |
| 346 | QueryImpl *ContextNULL::createQuery(GLenum type) |
| 347 | { |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 348 | return new QueryNULL(type); |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 349 | } |
| 350 | |
| 351 | FenceNVImpl *ContextNULL::createFenceNV() |
| 352 | { |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 353 | return new FenceNVNULL(); |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 354 | } |
| 355 | |
Jamie Madill | 70b5bb0 | 2017-08-28 13:32:37 -0400 | [diff] [blame] | 356 | SyncImpl *ContextNULL::createSync() |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 357 | { |
Jamie Madill | 70b5bb0 | 2017-08-28 13:32:37 -0400 | [diff] [blame] | 358 | return new SyncNULL(); |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 359 | } |
| 360 | |
| 361 | TransformFeedbackImpl *ContextNULL::createTransformFeedback(const gl::TransformFeedbackState &state) |
| 362 | { |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 363 | return new TransformFeedbackNULL(state); |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 364 | } |
| 365 | |
Jamie Madill | 06ef36b | 2017-09-09 23:32:46 -0400 | [diff] [blame] | 366 | SamplerImpl *ContextNULL::createSampler(const gl::SamplerState &state) |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 367 | { |
Jamie Madill | 06ef36b | 2017-09-09 23:32:46 -0400 | [diff] [blame] | 368 | return new SamplerNULL(state); |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 369 | } |
| 370 | |
Yunchao He | a336b90 | 2017-08-02 16:05:21 +0800 | [diff] [blame] | 371 | ProgramPipelineImpl *ContextNULL::createProgramPipeline(const gl::ProgramPipelineState &state) |
| 372 | { |
| 373 | return new ProgramPipelineNULL(state); |
| 374 | } |
| 375 | |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 376 | std::vector<PathImpl *> ContextNULL::createPaths(GLsizei range) |
| 377 | { |
Geoff Lang | 76cdbd5 | 2016-09-23 16:51:04 -0400 | [diff] [blame] | 378 | std::vector<PathImpl *> result(range); |
| 379 | for (GLsizei idx = 0; idx < range; idx++) |
| 380 | { |
| 381 | result[idx] = new PathNULL(); |
| 382 | } |
| 383 | return result; |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 384 | } |
| 385 | |
Jamie Madill | fe54834 | 2017-06-19 11:13:24 -0400 | [diff] [blame] | 386 | gl::Error ContextNULL::dispatchCompute(const gl::Context *context, |
| 387 | GLuint numGroupsX, |
| 388 | GLuint numGroupsY, |
| 389 | GLuint numGroupsZ) |
Xinghua Cao | 2b39659 | 2017-03-29 15:36:04 +0800 | [diff] [blame] | 390 | { |
| 391 | return gl::NoError(); |
| 392 | } |
| 393 | |
Geoff Lang | d08f3b3 | 2016-09-23 15:56:30 -0400 | [diff] [blame] | 394 | } // namespace rx |