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