Lines Matching refs:target

113 #define OVERRIDEWITH(name, target)  do { \  in GL2Encoder()  argument
114 m_##target##_enc = this-> target; \ in GL2Encoder()
115 this-> target = &s_##name; \ in GL2Encoder()
444 ScopedQueryUpdate(GL2Encoder* ctx, uint32_t bytes, T* target) : in ScopedQueryUpdate() argument
447 mTarget(target), in ScopedQueryUpdate()
547 void GL2Encoder::s_glBindBuffer(void *self, GLenum target, GLuint id) in s_glBindBuffer() argument
551 SET_ERROR_IF(!GLESv2Validation::bufferTarget(ctx, target), GL_INVALID_ENUM); in s_glBindBuffer()
553 bool nop = ctx->m_state->isNonIndexedBindNoOp(target, id); in s_glBindBuffer()
557 ctx->m_state->bindBuffer(target, id); in s_glBindBuffer()
559 ctx->m_glBindBuffer_enc(ctx, target, id); in s_glBindBuffer()
560 ctx->m_state->setLastEncodedBufferBind(target, id); in s_glBindBuffer()
563 void GL2Encoder::doBindBufferEncodeCached(GLenum target, GLuint id) { in doBindBufferEncodeCached() argument
564 bool encode = id != m_state->getLastEncodedBufferBind(target); in doBindBufferEncodeCached()
567 m_glBindBuffer_enc(this, target, id); in doBindBufferEncodeCached()
570 m_state->setLastEncodedBufferBind(target, id); in doBindBufferEncodeCached()
573 void GL2Encoder::s_glBufferData(void * self, GLenum target, GLsizeiptr size, const GLvoid * data, G… in s_glBufferData() argument
576 SET_ERROR_IF(!GLESv2Validation::bufferTarget(ctx, target), GL_INVALID_ENUM); in s_glBufferData()
577 GLuint bufferId = ctx->m_state->getBuffer(target); in s_glBufferData()
583 ctx->m_glBufferData_enc(self, target, size, data, usage); in s_glBufferData()
586 void GL2Encoder::s_glBufferSubData(void * self, GLenum target, GLintptr offset, GLsizeiptr size, co… in s_glBufferSubData() argument
589 SET_ERROR_IF(!GLESv2Validation::bufferTarget(ctx, target), GL_INVALID_ENUM); in s_glBufferSubData()
590 GLuint bufferId = ctx->m_state->getBuffer(target); in s_glBufferSubData()
592 SET_ERROR_IF(ctx->isBufferTargetMapped(target), GL_INVALID_OPERATION); in s_glBufferSubData()
597 ctx->m_glBufferSubData_enc(self, target, offset, size, data); in s_glBufferSubData()
2060 GLenum target; in s_glUniform1i() local
2061 if (shared->setSamplerUniform(state->currentShaderProgram(), location, x, &target)) { in s_glUniform1i()
2063 if (ctx->updateHostTexture2DBinding(GL_TEXTURE0 + x, target)) { in s_glUniform1i()
2193 void GL2Encoder::s_glBindTexture(void* self, GLenum target, GLuint texture) in s_glBindTexture() argument
2200 SET_ERROR_IF(!GLESv2Validation::textureTarget(ctx, target), GL_INVALID_ENUM); in s_glBindTexture()
2201 SET_ERROR_IF((err = state->bindTexture(target, texture, &firstUse)) != GL_NO_ERROR, err); in s_glBindTexture()
2203 if (target != GL_TEXTURE_2D && target != GL_TEXTURE_EXTERNAL_OES) { in s_glBindTexture()
2204 ctx->m_glBindTexture_enc(ctx, target, texture); in s_glBindTexture()
2210 if (target == GL_TEXTURE_EXTERNAL_OES && firstUse) { in s_glBindTexture()
2219 if (target != priorityTarget) { in s_glBindTexture()
2225 if (target == priorityTarget) { in s_glBindTexture()
2240 GLenum target, GLenum pname, GLfloat* params) in s_glGetTexParameterfv() argument
2244 if (target == GL_TEXTURE_2D || target == GL_TEXTURE_EXTERNAL_OES) { in s_glGetTexParameterfv()
2245 ctx->override2DTextureTarget(target); in s_glGetTexParameterfv()
2247 ctx->restore2DTextureTarget(target); in s_glGetTexParameterfv()
2249 ctx->m_glGetTexParameterfv_enc(ctx, target, pname, params); in s_glGetTexParameterfv()
2254 GLenum target, GLenum pname, GLint* params) in s_glGetTexParameteriv() argument
2264 if (target == GL_TEXTURE_2D || target == GL_TEXTURE_EXTERNAL_OES) { in s_glGetTexParameteriv()
2265 ctx->override2DTextureTarget(target); in s_glGetTexParameteriv()
2267 ctx->restore2DTextureTarget(target); in s_glGetTexParameteriv()
2269 ctx->m_glGetTexParameteriv_enc(ctx, target, pname, params); in s_glGetTexParameteriv()
2292 GLenum target, GLenum pname, GLfloat param) in s_glTexParameterf() argument
2296 SET_ERROR_IF((target == GL_TEXTURE_EXTERNAL_OES && in s_glTexParameterf()
2300 if (target == GL_TEXTURE_2D || target == GL_TEXTURE_EXTERNAL_OES) { in s_glTexParameterf()
2301 ctx->override2DTextureTarget(target); in s_glTexParameterf()
2303 ctx->restore2DTextureTarget(target); in s_glTexParameterf()
2305 ctx->m_glTexParameterf_enc(ctx, target, pname, param); in s_glTexParameterf()
2310 GLenum target, GLenum pname, const GLfloat* params) in s_glTexParameterfv() argument
2314 SET_ERROR_IF((target == GL_TEXTURE_EXTERNAL_OES && in s_glTexParameterfv()
2318 if (target == GL_TEXTURE_2D || target == GL_TEXTURE_EXTERNAL_OES) { in s_glTexParameterfv()
2319 ctx->override2DTextureTarget(target); in s_glTexParameterfv()
2321 ctx->restore2DTextureTarget(target); in s_glTexParameterfv()
2323 ctx->m_glTexParameterfv_enc(ctx, target, pname, params); in s_glTexParameterfv()
2328 GLenum target, GLenum pname, GLint param) in s_glTexParameteri() argument
2332 SET_ERROR_IF((target == GL_TEXTURE_EXTERNAL_OES && in s_glTexParameteri()
2336 if (target == GL_TEXTURE_2D || target == GL_TEXTURE_EXTERNAL_OES) { in s_glTexParameteri()
2337 ctx->override2DTextureTarget(target); in s_glTexParameteri()
2339 ctx->restore2DTextureTarget(target); in s_glTexParameteri()
2341 ctx->m_glTexParameteri_enc(ctx, target, pname, param); in s_glTexParameteri()
2352 void GL2Encoder::s_glTexImage2D(void* self, GLenum target, GLint level, in s_glTexImage2D() argument
2359 SET_ERROR_IF(!GLESv2Validation::textureTarget(ctx, target), GL_INVALID_ENUM); in s_glTexImage2D()
2371 SET_ERROR_IF((target == GL_TEXTURE_CUBE_MAP) && in s_glTexImage2D()
2376 …SET_ERROR_IF(GLESv2Validation::isCubeMapTarget(target) && width > max_cube_map_texture_size, GL_IN… in s_glTexImage2D()
2377 …SET_ERROR_IF(GLESv2Validation::isCubeMapTarget(target) && height > max_cube_map_texture_size, GL_I… in s_glTexImage2D()
2394 SET_ERROR_IF(state->isBoundTextureImmutableFormat(target), GL_INVALID_OPERATION); in s_glTexImage2D()
2396 GLenum stateTarget = target; in s_glTexImage2D()
2397 if (target == GL_TEXTURE_CUBE_MAP_POSITIVE_X || in s_glTexImage2D()
2398 target == GL_TEXTURE_CUBE_MAP_POSITIVE_Y || in s_glTexImage2D()
2399 target == GL_TEXTURE_CUBE_MAP_POSITIVE_Z || in s_glTexImage2D()
2400 target == GL_TEXTURE_CUBE_MAP_NEGATIVE_X || in s_glTexImage2D()
2401 target == GL_TEXTURE_CUBE_MAP_NEGATIVE_Y || in s_glTexImage2D()
2402 target == GL_TEXTURE_CUBE_MAP_NEGATIVE_Z) in s_glTexImage2D()
2410 if (target == GL_TEXTURE_2D || target == GL_TEXTURE_EXTERNAL_OES) { in s_glTexImage2D()
2411 ctx->override2DTextureTarget(target); in s_glTexImage2D()
2416 ctx, target, level, internalformat, in s_glTexImage2D()
2421 ctx, target, level, internalformat, in s_glTexImage2D()
2426 if (target == GL_TEXTURE_2D || target == GL_TEXTURE_EXTERNAL_OES) { in s_glTexImage2D()
2427 ctx->restore2DTextureTarget(target); in s_glTexImage2D()
2431 void GL2Encoder::s_glTexSubImage2D(void* self, GLenum target, GLint level, in s_glTexSubImage2D() argument
2438 SET_ERROR_IF(!GLESv2Validation::textureTarget(ctx, target), GL_INVALID_ENUM); in s_glTexSubImage2D()
2450 SET_ERROR_IF(GLESv2Validation::isCubeMapTarget(target) && in s_glTexSubImage2D()
2455 GLuint tex = state->getBoundTexture(target); in s_glTexSubImage2D()
2481 if (target == GL_TEXTURE_2D || target == GL_TEXTURE_EXTERNAL_OES) { in s_glTexSubImage2D()
2482 ctx->override2DTextureTarget(target); in s_glTexSubImage2D()
2487 ctx, target, level, in s_glTexSubImage2D()
2491 ctx->m_glTexSubImage2D_enc(ctx, target, level, xoffset, yoffset, width, in s_glTexSubImage2D()
2495 if (target == GL_TEXTURE_2D || target == GL_TEXTURE_EXTERNAL_OES) { in s_glTexSubImage2D()
2496 ctx->restore2DTextureTarget(target); in s_glTexSubImage2D()
2500 void GL2Encoder::s_glCopyTexImage2D(void* self, GLenum target, GLint level, in s_glCopyTexImage2D() argument
2515 (target, level, internalformat); in s_glCopyTexImage2D()
2522 ctx->m_glCopyTexImage2D_enc(ctx, target, level, internalformat, in s_glCopyTexImage2D()
2525 state->setBoundTextureInternalFormat(target, internalformat); in s_glCopyTexImage2D()
2526 state->setBoundTextureDims(target, level, width, height, 1); in s_glCopyTexImage2D()
2530 GLenum target, GLenum pname, const GLint* params) in s_glTexParameteriv() argument
2534 SET_ERROR_IF((target == GL_TEXTURE_EXTERNAL_OES && in s_glTexParameteriv()
2538 if (target == GL_TEXTURE_2D || target == GL_TEXTURE_EXTERNAL_OES) { in s_glTexParameteriv()
2539 ctx->override2DTextureTarget(target); in s_glTexParameteriv()
2541 ctx->restore2DTextureTarget(target); in s_glTexParameteriv()
2543 ctx->m_glTexParameteriv_enc(ctx, target, pname, params); in s_glTexParameteriv()
2547 bool GL2Encoder::texture2DNeedsOverride(GLenum target) const { in texture2DNeedsOverride()
2548 return (target == GL_TEXTURE_2D || target == GL_TEXTURE_EXTERNAL_OES) && in texture2DNeedsOverride()
2549 target != m_state->getPriorityEnabledTarget(GL_TEXTURE_2D); in texture2DNeedsOverride()
2552 void GL2Encoder::override2DTextureTarget(GLenum target) in override2DTextureTarget() argument
2554 if (texture2DNeedsOverride(target)) { in override2DTextureTarget()
2556 m_state->getBoundTexture(target)); in override2DTextureTarget()
2560 void GL2Encoder::restore2DTextureTarget(GLenum target) in restore2DTextureTarget() argument
2562 if (texture2DNeedsOverride(target)) { in restore2DTextureTarget()
2576 void GL2Encoder::associateEGLImage(GLenum target, GLeglImageOES eglImage) { in associateEGLImage() argument
2577 m_state->setBoundEGLImage(target, eglImage); in associateEGLImage()
2581 GLuint GL2Encoder::boundBuffer(GLenum target) const { in boundBuffer()
2582 return m_state->getBuffer(target); in boundBuffer()
2585 BufferData* GL2Encoder::getBufferData(GLenum target) const { in getBufferData()
2586 GLuint bufferId = m_state->getBuffer(target); in getBufferData()
2600 bool GL2Encoder::isBufferTargetMapped(GLenum target) const { in isBufferTargetMapped()
2601 BufferData* buf = getBufferData(target); in isBufferTargetMapped()
2641 GLenum target, GLuint renderbuffer) { in s_glBindRenderbuffer() argument
2645 SET_ERROR_IF((target != GL_RENDERBUFFER), in s_glBindRenderbuffer()
2648 ctx->m_glBindRenderbuffer_enc(self, target, renderbuffer); in s_glBindRenderbuffer()
2649 state->bindRenderbuffer(target, renderbuffer); in s_glBindRenderbuffer()
2653 GLenum target, GLenum internalformat, in s_glRenderbufferStorage() argument
2658 SET_ERROR_IF(target != GL_RENDERBUFFER, GL_INVALID_ENUM); in s_glRenderbufferStorage()
2666 ctx->m_glRenderbufferStorage_enc(self, target, internalformat, in s_glRenderbufferStorage()
2671 GLenum target, GLenum attachment, in s_glFramebufferRenderbuffer() argument
2676 SET_ERROR_IF(!GLESv2Validation::framebufferTarget(ctx, target), GL_INVALID_ENUM); in s_glFramebufferRenderbuffer()
2678 state->attachRbo(target, attachment, renderbuffer); in s_glFramebufferRenderbuffer()
2680 … ctx->m_glFramebufferRenderbuffer_enc(self, target, attachment, renderbuffertarget, renderbuffer); in s_glFramebufferRenderbuffer()
2706 GLenum target, GLuint framebuffer) { in s_glBindFramebuffer() argument
2710 SET_ERROR_IF(!GLESv2Validation::framebufferTarget(ctx, target), GL_INVALID_ENUM); in s_glBindFramebuffer()
2712 state->bindFramebuffer(target, framebuffer); in s_glBindFramebuffer()
2714 ctx->m_glBindFramebuffer_enc(self, target, framebuffer); in s_glBindFramebuffer()
2718 GLenum target, GLenum attachment, in s_glFramebufferTexture2D() argument
2723 SET_ERROR_IF(!GLESv2Validation::framebufferTarget(ctx, target), GL_INVALID_ENUM); in s_glFramebufferTexture2D()
2725 state->attachTextureObject(target, attachment, texture); in s_glFramebufferTexture2D()
2727 ctx->m_glFramebufferTexture2D_enc(self, target, attachment, textarget, texture, level); in s_glFramebufferTexture2D()
2731 GLenum target, GLenum attachment, in s_glFramebufferTexture3DOES() argument
2736 state->attachTextureObject(target, attachment, texture); in s_glFramebufferTexture3DOES()
2738 …ctx->m_glFramebufferTexture3DOES_enc(self, target, attachment, textarget, texture, level, zoffset); in s_glFramebufferTexture3DOES()
2742 GLenum target, GLenum attachment, GLenum pname, GLint* params) { in s_glGetFramebufferAttachmentParameteriv() argument
2745 SET_ERROR_IF(!GLESv2Validation::framebufferTarget(ctx, target), GL_INVALID_ENUM); in s_glGetFramebufferAttachmentParameteriv()
2748 !state->attachmentHasObject(target, attachment), in s_glGetFramebufferAttachmentParameteriv()
2753 (!state->attachmentHasObject(target, attachment) || in s_glGetFramebufferAttachmentParameteriv()
2754 state->getBoundFramebufferAttachmentType(target, attachment) != in s_glGetFramebufferAttachmentParameteriv()
2756 !state->attachmentHasObject(target, attachment) ? in s_glGetFramebufferAttachmentParameteriv()
2760 (state->objectOfAttachment(target, GL_DEPTH_ATTACHMENT) != in s_glGetFramebufferAttachmentParameteriv()
2761 state->objectOfAttachment(target, GL_STENCIL_ATTACHMENT)), in s_glGetFramebufferAttachmentParameteriv()
2763 SET_ERROR_IF(state->boundFramebuffer(target) && in s_glGetFramebufferAttachmentParameteriv()
2767 ctx->m_glGetFramebufferAttachmentParameteriv_enc(self, target, attachment, pname, params); in s_glGetFramebufferAttachmentParameteriv()
2770 bool GL2Encoder::isCompleteFbo(GLenum target, const GLClientState* state, in isCompleteFbo() argument
2773 state->getBoundFramebufferFormat(target, attachment, &fbo_format_info); in isCompleteFbo()
2858 bool GL2Encoder::checkFramebufferCompleteness(GLenum target, const GLClientState* state) const { in checkFramebufferCompleteness() argument
2862 res = res && isCompleteFbo(target, state, glUtilsColorAttachmentName(i)); in checkFramebufferCompleteness()
2865 res = res && isCompleteFbo(target, state, GL_DEPTH_ATTACHMENT); in checkFramebufferCompleteness()
2866 res = res && isCompleteFbo(target, state, GL_STENCIL_ATTACHMENT); in checkFramebufferCompleteness()
2871 GLenum GL2Encoder::s_glCheckFramebufferStatus(void* self, GLenum target) { in s_glCheckFramebufferStatus() argument
2876 ctx->checkFramebufferCompleteness(target, state); in s_glCheckFramebufferStatus()
2879 state->setCheckFramebufferStatus(target, GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT); in s_glCheckFramebufferStatus()
2883 GLenum host_checkstatus = ctx->m_glCheckFramebufferStatus_enc(self, target); in s_glCheckFramebufferStatus()
2884 state->setCheckFramebufferStatus(target, host_checkstatus); in s_glCheckFramebufferStatus()
2923 void* GL2Encoder::s_glMapBufferOES(void* self, GLenum target, GLenum access) { in s_glMapBufferOES() argument
2926 RET_AND_SET_ERROR_IF(!GLESv2Validation::bufferTarget(ctx, target), GL_INVALID_ENUM, NULL); in s_glMapBufferOES()
2928 GLuint boundBuffer = ctx->m_state->getBuffer(target); in s_glMapBufferOES()
2935 return ctx->glMapBufferRange(ctx, target, 0, buf->m_size, access); in s_glMapBufferOES()
2938 GLboolean GL2Encoder::s_glUnmapBufferOES(void* self, GLenum target) { in s_glUnmapBufferOES() argument
2941 return ctx->glUnmapBuffer(ctx, target); in s_glUnmapBufferOES()
2944 void* GL2Encoder::s_glMapBufferRangeAEMUImpl(GL2Encoder* ctx, GLenum target, in s_glMapBufferRangeAEMUImpl() argument
2954 ctx, target, in s_glMapBufferRangeAEMUImpl()
2963 void* GL2Encoder::s_glMapBufferRange(void* self, GLenum target, GLintptr offset, GLsizeiptr length,… in s_glMapBufferRange() argument
2968 RET_AND_SET_ERROR_IF(!GLESv2Validation::bufferTarget(ctx, target), GL_INVALID_ENUM, NULL); in s_glMapBufferRange()
2970 GLuint boundBuffer = ctx->m_state->getBuffer(target); in s_glMapBufferRange()
3009 return s_glMapBufferRangeAEMUImpl(ctx, target, offset, length, access, buf); in s_glMapBufferRange()
3014 return s_glMapBufferRangeAEMUImpl(ctx, target, offset, length, access, buf); in s_glMapBufferRange()
3022 ctx, target, in s_glMapBufferRange()
3029 return s_glMapBufferRangeAEMUImpl(ctx, target, offset, length, access, buf); in s_glMapBufferRange()
3033 GLboolean GL2Encoder::s_glUnmapBuffer(void* self, GLenum target) { in s_glUnmapBuffer() argument
3036 RET_AND_SET_ERROR_IF(!GLESv2Validation::bufferTarget(ctx, target), GL_INVALID_ENUM, GL_FALSE); in s_glUnmapBuffer()
3038 GLuint boundBuffer = ctx->m_state->getBuffer(target); in s_glUnmapBuffer()
3063 ctx, target, in s_glUnmapBuffer()
3072 ctx, target, in s_glUnmapBuffer()
3081 ctx, target, in s_glUnmapBuffer()
3099 void GL2Encoder::s_glFlushMappedBufferRange(void* self, GLenum target, GLintptr offset, GLsizeiptr … in s_glFlushMappedBufferRange() argument
3102 SET_ERROR_IF(!GLESv2Validation::bufferTarget(ctx, target), GL_INVALID_ENUM); in s_glFlushMappedBufferRange()
3104 GLuint boundBuffer = ctx->m_state->getBuffer(target); in s_glFlushMappedBufferRange()
3122 ctx, target, in s_glFlushMappedBufferRange()
3129 ctx, target, in s_glFlushMappedBufferRange()
3137 void GL2Encoder::s_glCompressedTexImage2D(void* self, GLenum target, GLint level, GLenum internalfo… in s_glCompressedTexImage2D() argument
3141 SET_ERROR_IF(!GLESv2Validation::textureTarget(ctx, target), GL_INVALID_ENUM); in s_glCompressedTexImage2D()
3167 GLenum stateTarget = target; in s_glCompressedTexImage2D()
3168 if (target == GL_TEXTURE_CUBE_MAP_POSITIVE_X || in s_glCompressedTexImage2D()
3169 target == GL_TEXTURE_CUBE_MAP_POSITIVE_Y || in s_glCompressedTexImage2D()
3170 target == GL_TEXTURE_CUBE_MAP_POSITIVE_Z || in s_glCompressedTexImage2D()
3171 target == GL_TEXTURE_CUBE_MAP_NEGATIVE_X || in s_glCompressedTexImage2D()
3172 target == GL_TEXTURE_CUBE_MAP_NEGATIVE_Y || in s_glCompressedTexImage2D()
3173 target == GL_TEXTURE_CUBE_MAP_NEGATIVE_Z) in s_glCompressedTexImage2D()
3178 if (target == GL_TEXTURE_2D || target == GL_TEXTURE_EXTERNAL_OES) { in s_glCompressedTexImage2D()
3179 ctx->override2DTextureTarget(target); in s_glCompressedTexImage2D()
3184 ctx, target, level, internalformat, in s_glCompressedTexImage2D()
3189 ctx, target, level, internalformat, in s_glCompressedTexImage2D()
3194 if (target == GL_TEXTURE_2D || target == GL_TEXTURE_EXTERNAL_OES) { in s_glCompressedTexImage2D()
3195 ctx->restore2DTextureTarget(target); in s_glCompressedTexImage2D()
3199 void GL2Encoder::s_glCompressedTexSubImage2D(void* self, GLenum target, GLint level, GLint xoffset,… in s_glCompressedTexSubImage2D() argument
3202 SET_ERROR_IF(!GLESv2Validation::textureTarget(ctx, target), GL_INVALID_ENUM); in s_glCompressedTexSubImage2D()
3220 if (target == GL_TEXTURE_2D || target == GL_TEXTURE_EXTERNAL_OES) { in s_glCompressedTexSubImage2D()
3221 ctx->override2DTextureTarget(target); in s_glCompressedTexSubImage2D()
3226 ctx, target, level, in s_glCompressedTexSubImage2D()
3232 ctx, target, level, in s_glCompressedTexSubImage2D()
3238 if (target == GL_TEXTURE_2D || target == GL_TEXTURE_EXTERNAL_OES) { in s_glCompressedTexSubImage2D()
3239 ctx->restore2DTextureTarget(target); in s_glCompressedTexSubImage2D()
3243 void GL2Encoder::s_glBindBufferRange(void* self, GLenum target, GLuint index, GLuint buffer, GLintp… in s_glBindBufferRange() argument
3247 SET_ERROR_IF(!GLESv2Validation::bufferTarget(ctx, target), GL_INVALID_ENUM); in s_glBindBufferRange()
3251 !(target == GL_ATOMIC_COUNTER_BUFFER || in s_glBindBufferRange()
3252 target == GL_SHADER_STORAGE_BUFFER || in s_glBindBufferRange()
3253 target == GL_TRANSFORM_FEEDBACK_BUFFER || in s_glBindBufferRange()
3254 target == GL_UNIFORM_BUFFER), in s_glBindBufferRange()
3259 index >= state->getMaxIndexedBufferBindings(target), in s_glBindBufferRange()
3262 SET_ERROR_IF((target == GL_ATOMIC_COUNTER_BUFFER || in s_glBindBufferRange()
3263 target == GL_TRANSFORM_FEEDBACK_BUFFER) && in s_glBindBufferRange()
3270 SET_ERROR_IF(target == GL_SHADER_STORAGE_BUFFER && in s_glBindBufferRange()
3273 SET_ERROR_IF(target == GL_UNIFORM_BUFFER && in s_glBindBufferRange()
3277 if (ctx->m_state->isIndexedBindNoOp(target, index, buffer, offset, size, 0, 0)) return; in s_glBindBufferRange()
3279 state->bindBuffer(target, buffer); in s_glBindBufferRange()
3281 state->bindIndexedBuffer(target, index, buffer, offset, size, 0, 0); in s_glBindBufferRange()
3283 ctx->m_glBindBufferRange_enc(ctx, target, index, buffer, offset, size); in s_glBindBufferRange()
3284 ctx->m_state->setLastEncodedBufferBind(target, buffer); in s_glBindBufferRange()
3287 void GL2Encoder::s_glBindBufferBase(void* self, GLenum target, GLuint index, GLuint buffer) { in s_glBindBufferBase() argument
3291 SET_ERROR_IF(!GLESv2Validation::bufferTarget(ctx, target), GL_INVALID_ENUM); in s_glBindBufferBase()
3295 !(target == GL_ATOMIC_COUNTER_BUFFER || in s_glBindBufferBase()
3296 target == GL_SHADER_STORAGE_BUFFER || in s_glBindBufferBase()
3297 target == GL_TRANSFORM_FEEDBACK_BUFFER || in s_glBindBufferBase()
3298 target == GL_UNIFORM_BUFFER), in s_glBindBufferBase()
3302 index >= state->getMaxIndexedBufferBindings(target), in s_glBindBufferBase()
3308 if (ctx->m_state->isIndexedBindNoOp(target, index, buffer, 0, size, 0, 0)) return; in s_glBindBufferBase()
3310 state->bindBuffer(target, buffer); in s_glBindBufferBase()
3313 state->bindIndexedBuffer(target, index, buffer, 0, size, 0, 0); in s_glBindBufferBase()
3315 ctx->m_glBindBufferBase_enc(ctx, target, index, buffer); in s_glBindBufferBase()
3316 ctx->m_state->setLastEncodedBufferBind(target, buffer); in s_glBindBufferBase()
3319 void GL2Encoder::doIndexedBufferBindEncodeCached(IndexedBufferBindOp op, GLenum target, GLuint inde… in doIndexedBufferBindEncodeCached() argument
3321 …if (m_state->isIndexedBindNoOp(target, index, buffer, offset, size, stride, effectiveStride)) retu… in doIndexedBufferBindEncodeCached()
3327 m_glBindBufferRange_enc(this, target, index, buffer, offset, size); in doIndexedBufferBindEncodeCached()
3332 m_state->setLastEncodedBufferBind(target, buffer); in doIndexedBufferBindEncodeCached()
3371 void GL2Encoder::s_glGetBufferParameteriv(void* self, GLenum target, GLenum pname, GLint* params) { in s_glGetBufferParameteriv() argument
3374 SET_ERROR_IF(!GLESv2Validation::bufferTarget(ctx, target), GL_INVALID_ENUM); in s_glGetBufferParameteriv()
3376 target != GL_ARRAY_BUFFER && in s_glGetBufferParameteriv()
3377 target != GL_ELEMENT_ARRAY_BUFFER && in s_glGetBufferParameteriv()
3378 target != GL_COPY_READ_BUFFER && in s_glGetBufferParameteriv()
3379 target != GL_COPY_WRITE_BUFFER && in s_glGetBufferParameteriv()
3380 target != GL_PIXEL_PACK_BUFFER && in s_glGetBufferParameteriv()
3381 target != GL_PIXEL_UNPACK_BUFFER && in s_glGetBufferParameteriv()
3382 target != GL_TRANSFORM_FEEDBACK_BUFFER && in s_glGetBufferParameteriv()
3383 target != GL_UNIFORM_BUFFER, in s_glGetBufferParameteriv()
3386 SET_ERROR_IF(!ctx->boundBuffer(target), GL_INVALID_OPERATION); in s_glGetBufferParameteriv()
3397 BufferData* buf = ctx->getBufferData(target); in s_glGetBufferParameteriv()
3423 void GL2Encoder::s_glGetBufferParameteri64v(void* self, GLenum target, GLenum pname, GLint64* param… in s_glGetBufferParameteri64v() argument
3426 SET_ERROR_IF(!GLESv2Validation::bufferTarget(ctx, target), GL_INVALID_ENUM); in s_glGetBufferParameteri64v()
3428 target != GL_ARRAY_BUFFER && in s_glGetBufferParameteri64v()
3429 target != GL_ELEMENT_ARRAY_BUFFER && in s_glGetBufferParameteri64v()
3430 target != GL_COPY_READ_BUFFER && in s_glGetBufferParameteri64v()
3431 target != GL_COPY_WRITE_BUFFER && in s_glGetBufferParameteri64v()
3432 target != GL_PIXEL_PACK_BUFFER && in s_glGetBufferParameteri64v()
3433 target != GL_PIXEL_UNPACK_BUFFER && in s_glGetBufferParameteri64v()
3434 target != GL_TRANSFORM_FEEDBACK_BUFFER && in s_glGetBufferParameteri64v()
3435 target != GL_UNIFORM_BUFFER, in s_glGetBufferParameteri64v()
3438 SET_ERROR_IF(!ctx->boundBuffer(target), GL_INVALID_OPERATION); in s_glGetBufferParameteri64v()
3449 BufferData* buf = ctx->getBufferData(target); in s_glGetBufferParameteri64v()
3475 void GL2Encoder::s_glGetBufferPointerv(void* self, GLenum target, GLenum pname, GLvoid** params) { in s_glGetBufferPointerv() argument
3477 SET_ERROR_IF(!GLESv2Validation::bufferTarget(ctx, target), GL_INVALID_ENUM); in s_glGetBufferPointerv()
3479 target == GL_ATOMIC_COUNTER_BUFFER || in s_glGetBufferPointerv()
3480 target == GL_DISPATCH_INDIRECT_BUFFER || in s_glGetBufferPointerv()
3481 target == GL_DRAW_INDIRECT_BUFFER || in s_glGetBufferPointerv()
3482 target == GL_SHADER_STORAGE_BUFFER, in s_glGetBufferPointerv()
3485 SET_ERROR_IF(!ctx->boundBuffer(target), GL_INVALID_OPERATION); in s_glGetBufferPointerv()
3488 BufferData* buf = ctx->getBufferData(target); in s_glGetBufferPointerv()
3552 GLenum target; in s_glUniform1ui() local
3553 if (shared->setSamplerUniform(state->currentShaderProgram(), location, v0, &target)) { in s_glUniform1ui()
3555 if (ctx->updateHostTexture2DBinding(GL_TEXTURE0 + v0, target)) { in s_glUniform1ui()
3736 GLenum target, GLsizei samples, GLenum internalformat, in s_glRenderbufferStorageMultisample() argument
3741 SET_ERROR_IF(target != GL_RENDERBUFFER, GL_INVALID_ENUM); in s_glRenderbufferStorageMultisample()
3745 ctx->s_glGetInternalformativ(ctx, target, internalformat, GL_SAMPLES, 1, &max_samples); in s_glRenderbufferStorageMultisample()
3751 self, target, samples, internalformat, width, height); in s_glRenderbufferStorageMultisample()
3815 void GL2Encoder::s_glFramebufferTextureLayer(void* self, GLenum target, GLenum attachment, GLuint t… in s_glFramebufferTextureLayer() argument
3819 SET_ERROR_IF(!GLESv2Validation::framebufferTarget(ctx, target), GL_INVALID_ENUM); in s_glFramebufferTextureLayer()
3825 state->attachTextureObject(target, attachment, texture); in s_glFramebufferTextureLayer()
3833 ctx->m_glFramebufferTextureLayer_enc(self, target, attachment, texture, level, layer); in s_glFramebufferTextureLayer()
3836 void GL2Encoder::s_glTexStorage2D(void* self, GLenum target, GLsizei levels, GLenum internalformat,… in s_glTexStorage2D() argument
3841 target != GL_TEXTURE_2D && in s_glTexStorage2D()
3842 target != GL_TEXTURE_CUBE_MAP, in s_glTexStorage2D()
3845 SET_ERROR_IF(!state->getBoundTexture(target), GL_INVALID_OPERATION); in s_glTexStorage2D()
3849 SET_ERROR_IF(state->isBoundTextureImmutableFormat(target), GL_INVALID_OPERATION); in s_glTexStorage2D()
3851 state->setBoundTextureInternalFormat(target, internalformat); in s_glTexStorage2D()
3852 state->setBoundTextureDims(target, -1, width, height, 1); in s_glTexStorage2D()
3853 state->setBoundTextureImmutableFormat(target); in s_glTexStorage2D()
3855 if (target == GL_TEXTURE_2D) { in s_glTexStorage2D()
3856 ctx->override2DTextureTarget(target); in s_glTexStorage2D()
3859 ctx->m_glTexStorage2D_enc(ctx, target, levels, internalformat, width, height); in s_glTexStorage2D()
3861 if (target == GL_TEXTURE_2D) { in s_glTexStorage2D()
3862 ctx->restore2DTextureTarget(target); in s_glTexStorage2D()
3920 void GL2Encoder::s_glTexImage3D(void* self, GLenum target, GLint level, GLint internalFormat, in s_glTexImage3D() argument
3926 SET_ERROR_IF(target != GL_TEXTURE_3D && in s_glTexImage3D()
3927 target != GL_TEXTURE_2D_ARRAY, in s_glTexImage3D()
3962 SET_ERROR_IF(state->isBoundTextureImmutableFormat(target), GL_INVALID_OPERATION); in s_glTexImage3D()
3964 state->setBoundTextureInternalFormat(target, internalFormat); in s_glTexImage3D()
3965 state->setBoundTextureFormat(target, format); in s_glTexImage3D()
3966 state->setBoundTextureType(target, type); in s_glTexImage3D()
3967 state->setBoundTextureDims(target, level, width, height, depth); in s_glTexImage3D()
3971 ctx, target, level, internalFormat, in s_glTexImage3D()
3976 target, level, internalFormat, in s_glTexImage3D()
3982 void GL2Encoder::s_glTexSubImage3D(void* self, GLenum target, GLint level, GLint xoffset, GLint yof… in s_glTexSubImage3D() argument
3986 SET_ERROR_IF(target != GL_TEXTURE_3D && in s_glTexSubImage3D()
3987 target != GL_TEXTURE_2D_ARRAY, in s_glTexSubImage3D()
4002 GLuint tex = state->getBoundTexture(target); in s_glTexSubImage3D()
4028 target, level, in s_glTexSubImage3D()
4034 target, level, in s_glTexSubImage3D()
4041 void GL2Encoder::s_glCompressedTexImage3D(void* self, GLenum target, GLint level, GLenum internalfo… in s_glCompressedTexImage3D() argument
4059 state->setBoundTextureInternalFormat(target, (GLint)internalformat); in s_glCompressedTexImage3D()
4060 state->setBoundTextureDims(target, level, width, height, depth); in s_glCompressedTexImage3D()
4064 ctx, target, level, internalformat, in s_glCompressedTexImage3D()
4069 ctx, target, level, internalformat, in s_glCompressedTexImage3D()
4075 void GL2Encoder::s_glCompressedTexSubImage3D(void* self, GLenum target, GLint level, GLint xoffset,… in s_glCompressedTexSubImage3D() argument
4078 SET_ERROR_IF(!GLESv2Validation::textureTarget(ctx, target), GL_INVALID_ENUM); in s_glCompressedTexSubImage3D()
4091 ctx, target, level, in s_glCompressedTexSubImage3D()
4097 ctx, target, level, in s_glCompressedTexSubImage3D()
4105 void GL2Encoder::s_glTexStorage3D(void* self, GLenum target, GLsizei levels, GLenum internalformat,… in s_glTexStorage3D() argument
4108 SET_ERROR_IF(target != GL_TEXTURE_3D && in s_glTexStorage3D()
4109 target != GL_TEXTURE_2D_ARRAY, in s_glTexStorage3D()
4112 SET_ERROR_IF(!state->getBoundTexture(target), GL_INVALID_OPERATION); in s_glTexStorage3D()
4114 …SET_ERROR_IF(target == GL_TEXTURE_3D && (levels > ilog2((uint32_t)std::max(width, std::max(height,… in s_glTexStorage3D()
4116 …SET_ERROR_IF(target == GL_TEXTURE_2D_ARRAY && (levels > ilog2((uint32_t)std::max(width, height)) +… in s_glTexStorage3D()
4118 SET_ERROR_IF(state->isBoundTextureImmutableFormat(target), GL_INVALID_OPERATION); in s_glTexStorage3D()
4120 state->setBoundTextureInternalFormat(target, internalformat); in s_glTexStorage3D()
4121 state->setBoundTextureDims(target, -1, width, height, depth); in s_glTexStorage3D()
4122 state->setBoundTextureImmutableFormat(target); in s_glTexStorage3D()
4123 ctx->m_glTexStorage3D_enc(ctx, target, levels, internalformat, width, height, depth); in s_glTexStorage3D()
4124 state->setBoundTextureImmutableFormat(target); in s_glTexStorage3D()
4583 void GL2Encoder::s_glGetInternalformativ(void* self, GLenum target, GLenum internalformat, GLenum p… in s_glGetInternalformativ() argument
4589 SET_ERROR_IF(!GLESv2Validation::internalFormatTarget(ctx, target), GL_INVALID_ENUM); in s_glGetInternalformativ()
4615 void GL2Encoder::s_glGenerateMipmap(void* self, GLenum target) { in s_glGenerateMipmap() argument
4619 SET_ERROR_IF(target != GL_TEXTURE_2D && in s_glGenerateMipmap()
4620 target != GL_TEXTURE_3D && in s_glGenerateMipmap()
4621 target != GL_TEXTURE_CUBE_MAP && in s_glGenerateMipmap()
4622 target != GL_TEXTURE_2D_ARRAY, in s_glGenerateMipmap()
4625 GLuint tex = state->getBoundTexture(target); in s_glGenerateMipmap()
4636 if (target == GL_TEXTURE_2D) { in s_glGenerateMipmap()
4637 ctx->override2DTextureTarget(target); in s_glGenerateMipmap()
4640 ctx->m_glGenerateMipmap_enc(ctx, target); in s_glGenerateMipmap()
4642 if (target == GL_TEXTURE_2D) { in s_glGenerateMipmap()
4643 ctx->restore2DTextureTarget(target); in s_glGenerateMipmap()
4705 #define LIMIT_CASE(target, lim) \ argument
4706 case target: \
4711 void GL2Encoder::s_glGetIntegeri_v(void* self, GLenum target, GLuint index, GLint* params) { in s_glGetIntegeri_v() argument
4717 switch (target) { in s_glGetIntegeri_v()
4729 switch (target) { in s_glGetIntegeri_v()
4740 switch (target) { in s_glGetIntegeri_v()
4757 ctx->safe_glGetIntegeri_v(target, index, params); in s_glGetIntegeri_v()
4760 void GL2Encoder::s_glGetInteger64i_v(void* self, GLenum target, GLuint index, GLint64* params) { in s_glGetInteger64i_v() argument
4766 switch (target) { in s_glGetInteger64i_v()
4778 switch (target) { in s_glGetInteger64i_v()
4789 switch (target) { in s_glGetInteger64i_v()
4806 ctx->safe_glGetInteger64i_v(target, index, params); in s_glGetInteger64i_v()
4927 GLenum target; in s_glProgramUniform1i() local
4929 if (shared->setSamplerUniform(program, location, v0, &target)) { in s_glProgramUniform1i()
4931 if (ctx->updateHostTexture2DBinding(GL_TEXTURE0 + v0, target)) { in s_glProgramUniform1i()
4953 GLenum target; in s_glProgramUniform1ui() local
4955 if (shared->setSamplerUniform(program, location, v0, &target)) { in s_glProgramUniform1ui()
4957 if (ctx->updateHostTexture2DBinding(GL_TEXTURE0 + v0, target)) { in s_glProgramUniform1ui()
5397 void GL2Encoder::s_glTexStorage2DMultisample(void* self, GLenum target, GLsizei samples, GLenum int… in s_glTexStorage2DMultisample() argument
5401 SET_ERROR_IF(target != GL_TEXTURE_2D_MULTISAMPLE, GL_INVALID_ENUM); in s_glTexStorage2DMultisample()
5403 SET_ERROR_IF(!state->getBoundTexture(target), GL_INVALID_OPERATION); in s_glTexStorage2DMultisample()
5405 SET_ERROR_IF(state->isBoundTextureImmutableFormat(target), GL_INVALID_OPERATION); in s_glTexStorage2DMultisample()
5407 ctx->s_glGetInternalformativ(ctx, target, internalformat, GL_SAMPLES, 1, &max_samples); in s_glTexStorage2DMultisample()
5410 state->setBoundTextureInternalFormat(target, internalformat); in s_glTexStorage2DMultisample()
5411 state->setBoundTextureDims(target, 0, width, height, 1); in s_glTexStorage2DMultisample()
5412 state->setBoundTextureImmutableFormat(target); in s_glTexStorage2DMultisample()
5413 state->setBoundTextureSamples(target, samples); in s_glTexStorage2DMultisample()
5415 …ctx->m_glTexStorage2DMultisample_enc(ctx, target, samples, internalformat, width, height, fixedsam… in s_glTexStorage2DMultisample()
5448 void GL2Encoder::s_glInvalidateFramebuffer(void* self, GLenum target, GLsizei numAttachments, const… in s_glInvalidateFramebuffer() argument
5451 ctx->m_glInvalidateFramebuffer_enc(ctx, target, numAttachments, attachments); in s_glInvalidateFramebuffer()
5454 void GL2Encoder::s_glInvalidateSubFramebuffer(void* self, GLenum target, GLsizei numAttachments, co… in s_glInvalidateSubFramebuffer() argument
5459 …ctx->m_glInvalidateSubFramebuffer_enc(ctx, target, numAttachments, attachments, x, y, width, heigh… in s_glInvalidateSubFramebuffer()