• Home
  • Raw
  • Download

Lines Matching full:context

11 #include "libANGLE/Context.h"
68 bool ValidateProgramResourceProperty(const Context *context, GLenum prop) in ValidateProgramResourceProperty() argument
70 ASSERT(context); in ValidateProgramResourceProperty()
105 return context->getExtensions().geometryShaderAny() || in ValidateProgramResourceProperty()
106 context->getClientVersion() >= ES_3_2; in ValidateProgramResourceProperty()
111 return context->getExtensions().tessellationShaderEXT || in ValidateProgramResourceProperty()
112 context->getClientVersion() >= ES_3_2; in ValidateProgramResourceProperty()
115 return context->getExtensions().blendFuncExtended; in ValidateProgramResourceProperty()
319 bool ValidateProgramUniformBase(const Context *context, in ValidateProgramUniformBase() argument
326 Program *programObject = GetValidProgram(context, program); in ValidateProgramUniformBase()
327 return ValidateUniformCommonBase(context, programObject, location, count, &uniform) && in ValidateProgramUniformBase()
328 ValidateUniformValue(context, valueType, uniform->type); in ValidateProgramUniformBase()
331 bool ValidateProgramUniformMatrixBase(const Context *context, in ValidateProgramUniformMatrixBase() argument
339 Program *programObject = GetValidProgram(context, program); in ValidateProgramUniformMatrixBase()
340 return ValidateUniformCommonBase(context, programObject, location, count, &uniform) && in ValidateProgramUniformMatrixBase()
341 ValidateUniformMatrixValue(context, valueType, uniform->type); in ValidateProgramUniformMatrixBase()
344 bool ValidateVertexAttribFormatCommon(const Context *context, GLuint relativeOffset) in ValidateVertexAttribFormatCommon() argument
346 if (context->getClientVersion() < ES_3_1) in ValidateVertexAttribFormatCommon()
348 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateVertexAttribFormatCommon()
352 const Caps &caps = context->getCaps(); in ValidateVertexAttribFormatCommon()
355 context->validationError(GL_INVALID_VALUE, kRelativeOffsetTooLarge); in ValidateVertexAttribFormatCommon()
361 if (context->getState().getVertexArrayId().value == 0) in ValidateVertexAttribFormatCommon()
363 context->validationError(GL_INVALID_OPERATION, kDefaultVertexArray); in ValidateVertexAttribFormatCommon()
372 bool ValidateGetBooleani_v(const Context *context, in ValidateGetBooleani_v() argument
377 if (context->getClientVersion() < ES_3_1 && !context->getExtensions().drawBuffersIndexedAny()) in ValidateGetBooleani_v()
379 context->validationError(GL_INVALID_OPERATION, in ValidateGetBooleani_v()
384 if (!ValidateIndexedStateQuery(context, target, index, nullptr)) in ValidateGetBooleani_v()
392 bool ValidateGetBooleani_vRobustANGLE(const Context *context, in ValidateGetBooleani_vRobustANGLE() argument
399 if (context->getClientVersion() < ES_3_1 && !context->getExtensions().drawBuffersIndexedAny()) in ValidateGetBooleani_vRobustANGLE()
401 context->validationError(GL_INVALID_OPERATION, in ValidateGetBooleani_vRobustANGLE()
406 if (!ValidateRobustEntryPoint(context, bufSize)) in ValidateGetBooleani_vRobustANGLE()
413 if (!ValidateIndexedStateQuery(context, target, index, &numParams)) in ValidateGetBooleani_vRobustANGLE()
418 if (!ValidateRobustBufferSize(context, bufSize, numParams)) in ValidateGetBooleani_vRobustANGLE()
427 bool ValidateDrawIndirectBase(const Context *context, PrimitiveMode mode, const void *indirect) in ValidateDrawIndirectBase() argument
429 if (context->getClientVersion() < ES_3_1) in ValidateDrawIndirectBase()
431 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateDrawIndirectBase()
436 if (!ValidateDrawBase(context, mode)) in ValidateDrawIndirectBase()
441 const State &state = context->getState(); in ValidateDrawIndirectBase()
447 context->validationError(GL_INVALID_OPERATION, kDefaultVertexArray); in ValidateDrawIndirectBase()
451 if (context->getStateCache().hasAnyActiveClientAttrib()) in ValidateDrawIndirectBase()
453 context->validationError(GL_INVALID_OPERATION, kClientDataInVertexArray); in ValidateDrawIndirectBase()
460 context->validationError(GL_INVALID_OPERATION, kDrawIndirectBufferNotBound); in ValidateDrawIndirectBase()
469 context->validationError(GL_INVALID_VALUE, kInvalidIndirectOffset); in ValidateDrawIndirectBase()
476 bool ValidateDrawArraysIndirect(const Context *context, PrimitiveMode mode, const void *indirect) in ValidateDrawArraysIndirect() argument
478 const State &state = context->getState(); in ValidateDrawArraysIndirect()
485 if (context->getExtensions().geometryShaderAny() || context->getClientVersion() >= ES_3_2) in ValidateDrawArraysIndirect()
488 context, curTransformFeedback->getPrimitiveMode(), mode)) in ValidateDrawArraysIndirect()
490 context->validationError(GL_INVALID_OPERATION, kInvalidDrawModeTransformFeedback); in ValidateDrawArraysIndirect()
498 context->validationError(GL_INVALID_OPERATION, in ValidateDrawArraysIndirect()
504 if (!ValidateDrawIndirectBase(context, mode, indirect)) in ValidateDrawArraysIndirect()
515 context->validationError(GL_INVALID_OPERATION, kParamOverflow); in ValidateDrawArraysIndirect()
522 bool ValidateDrawElementsIndirect(const Context *context, in ValidateDrawElementsIndirect() argument
527 if (!ValidateDrawElementsBase(context, mode, type)) in ValidateDrawElementsIndirect()
532 const State &state = context->getState(); in ValidateDrawElementsIndirect()
537 context->validationError(GL_INVALID_OPERATION, kMustHaveElementArrayBinding); in ValidateDrawElementsIndirect()
541 if (!ValidateDrawIndirectBase(context, mode, indirect)) in ValidateDrawElementsIndirect()
552 context->validationError(GL_INVALID_OPERATION, kParamOverflow); in ValidateDrawElementsIndirect()
559 bool ValidateProgramUniform1iBase(const Context *context, in ValidateProgramUniform1iBase() argument
564 return ValidateProgramUniform1ivBase(context, program, location, 1, &v0); in ValidateProgramUniform1iBase()
567 bool ValidateProgramUniform2iBase(const Context *context, in ValidateProgramUniform2iBase() argument
574 return ValidateProgramUniform2ivBase(context, program, location, 1, xy); in ValidateProgramUniform2iBase()
577 bool ValidateProgramUniform3iBase(const Context *context, in ValidateProgramUniform3iBase() argument
585 return ValidateProgramUniform3ivBase(context, program, location, 1, xyz); in ValidateProgramUniform3iBase()
588 bool ValidateProgramUniform4iBase(const Context *context, in ValidateProgramUniform4iBase() argument
597 return ValidateProgramUniform4ivBase(context, program, location, 1, xyzw); in ValidateProgramUniform4iBase()
600 bool ValidateProgramUniform1uiBase(const Context *context, in ValidateProgramUniform1uiBase() argument
605 return ValidateProgramUniform1uivBase(context, program, location, 1, &v0); in ValidateProgramUniform1uiBase()
608 bool ValidateProgramUniform2uiBase(const Context *context, in ValidateProgramUniform2uiBase() argument
615 return ValidateProgramUniform2uivBase(context, program, location, 1, xy); in ValidateProgramUniform2uiBase()
618 bool ValidateProgramUniform3uiBase(const Context *context, in ValidateProgramUniform3uiBase() argument
626 return ValidateProgramUniform3uivBase(context, program, location, 1, xyz); in ValidateProgramUniform3uiBase()
629 bool ValidateProgramUniform4uiBase(const Context *context, in ValidateProgramUniform4uiBase() argument
638 return ValidateProgramUniform4uivBase(context, program, location, 1, xyzw); in ValidateProgramUniform4uiBase()
641 bool ValidateProgramUniform1fBase(const Context *context, in ValidateProgramUniform1fBase() argument
646 return ValidateProgramUniform1fvBase(context, program, location, 1, &v0); in ValidateProgramUniform1fBase()
649 bool ValidateProgramUniform2fBase(const Context *context, in ValidateProgramUniform2fBase() argument
656 return ValidateProgramUniform2fvBase(context, program, location, 1, xy); in ValidateProgramUniform2fBase()
659 bool ValidateProgramUniform3fBase(const Context *context, in ValidateProgramUniform3fBase() argument
667 return ValidateProgramUniform3fvBase(context, program, location, 1, xyz); in ValidateProgramUniform3fBase()
670 bool ValidateProgramUniform4fBase(const Context *context, in ValidateProgramUniform4fBase() argument
679 return ValidateProgramUniform4fvBase(context, program, location, 1, xyzw); in ValidateProgramUniform4fBase()
682 bool ValidateProgramUniform1ivBase(const Context *context, in ValidateProgramUniform1ivBase() argument
689 Program *programObject = GetValidProgram(context, program); in ValidateProgramUniform1ivBase()
690 return ValidateUniformCommonBase(context, programObject, location, count, &uniform) && in ValidateProgramUniform1ivBase()
691 ValidateUniform1ivValue(context, uniform->type, count, value); in ValidateProgramUniform1ivBase()
694 bool ValidateProgramUniform2ivBase(const Context *context, in ValidateProgramUniform2ivBase() argument
700 return ValidateProgramUniformBase(context, GL_INT_VEC2, program, location, count); in ValidateProgramUniform2ivBase()
703 bool ValidateProgramUniform3ivBase(const Context *context, in ValidateProgramUniform3ivBase() argument
709 return ValidateProgramUniformBase(context, GL_INT_VEC3, program, location, count); in ValidateProgramUniform3ivBase()
712 bool ValidateProgramUniform4ivBase(const Context *context, in ValidateProgramUniform4ivBase() argument
718 return ValidateProgramUniformBase(context, GL_INT_VEC4, program, location, count); in ValidateProgramUniform4ivBase()
721 bool ValidateProgramUniform1uivBase(const Context *context, in ValidateProgramUniform1uivBase() argument
727 return ValidateProgramUniformBase(context, GL_UNSIGNED_INT, program, location, count); in ValidateProgramUniform1uivBase()
730 bool ValidateProgramUniform2uivBase(const Context *context, in ValidateProgramUniform2uivBase() argument
736 return ValidateProgramUniformBase(context, GL_UNSIGNED_INT_VEC2, program, location, count); in ValidateProgramUniform2uivBase()
739 bool ValidateProgramUniform3uivBase(const Context *context, in ValidateProgramUniform3uivBase() argument
745 return ValidateProgramUniformBase(context, GL_UNSIGNED_INT_VEC3, program, location, count); in ValidateProgramUniform3uivBase()
748 bool ValidateProgramUniform4uivBase(const Context *context, in ValidateProgramUniform4uivBase() argument
754 return ValidateProgramUniformBase(context, GL_UNSIGNED_INT_VEC4, program, location, count); in ValidateProgramUniform4uivBase()
757 bool ValidateProgramUniform1fvBase(const Context *context, in ValidateProgramUniform1fvBase() argument
763 return ValidateProgramUniformBase(context, GL_FLOAT, program, location, count); in ValidateProgramUniform1fvBase()
766 bool ValidateProgramUniform2fvBase(const Context *context, in ValidateProgramUniform2fvBase() argument
772 return ValidateProgramUniformBase(context, GL_FLOAT_VEC2, program, location, count); in ValidateProgramUniform2fvBase()
775 bool ValidateProgramUniform3fvBase(const Context *context, in ValidateProgramUniform3fvBase() argument
781 return ValidateProgramUniformBase(context, GL_FLOAT_VEC3, program, location, count); in ValidateProgramUniform3fvBase()
784 bool ValidateProgramUniform4fvBase(const Context *context, in ValidateProgramUniform4fvBase() argument
790 return ValidateProgramUniformBase(context, GL_FLOAT_VEC4, program, location, count); in ValidateProgramUniform4fvBase()
793 bool ValidateProgramUniformMatrix2fvBase(const Context *context, in ValidateProgramUniformMatrix2fvBase() argument
800 return ValidateProgramUniformMatrixBase(context, GL_FLOAT_MAT2, program, location, count, in ValidateProgramUniformMatrix2fvBase()
804 bool ValidateProgramUniformMatrix3fvBase(const Context *context, in ValidateProgramUniformMatrix3fvBase() argument
811 return ValidateProgramUniformMatrixBase(context, GL_FLOAT_MAT3, program, location, count, in ValidateProgramUniformMatrix3fvBase()
815 bool ValidateProgramUniformMatrix4fvBase(const Context *context, in ValidateProgramUniformMatrix4fvBase() argument
822 return ValidateProgramUniformMatrixBase(context, GL_FLOAT_MAT4, program, location, count, in ValidateProgramUniformMatrix4fvBase()
826 bool ValidateProgramUniformMatrix2x3fvBase(const Context *context, in ValidateProgramUniformMatrix2x3fvBase() argument
833 return ValidateProgramUniformMatrixBase(context, GL_FLOAT_MAT2x3, program, location, count, in ValidateProgramUniformMatrix2x3fvBase()
837 bool ValidateProgramUniformMatrix3x2fvBase(const Context *context, in ValidateProgramUniformMatrix3x2fvBase() argument
844 return ValidateProgramUniformMatrixBase(context, GL_FLOAT_MAT3x2, program, location, count, in ValidateProgramUniformMatrix3x2fvBase()
848 bool ValidateProgramUniformMatrix2x4fvBase(const Context *context, in ValidateProgramUniformMatrix2x4fvBase() argument
855 return ValidateProgramUniformMatrixBase(context, GL_FLOAT_MAT2x4, program, location, count, in ValidateProgramUniformMatrix2x4fvBase()
859 bool ValidateProgramUniformMatrix4x2fvBase(const Context *context, in ValidateProgramUniformMatrix4x2fvBase() argument
866 return ValidateProgramUniformMatrixBase(context, GL_FLOAT_MAT4x2, program, location, count, in ValidateProgramUniformMatrix4x2fvBase()
870 bool ValidateProgramUniformMatrix3x4fvBase(const Context *context, in ValidateProgramUniformMatrix3x4fvBase() argument
877 return ValidateProgramUniformMatrixBase(context, GL_FLOAT_MAT3x4, program, location, count, in ValidateProgramUniformMatrix3x4fvBase()
881 bool ValidateProgramUniformMatrix4x3fvBase(const Context *context, in ValidateProgramUniformMatrix4x3fvBase() argument
888 return ValidateProgramUniformMatrixBase(context, GL_FLOAT_MAT4x3, program, location, count, in ValidateProgramUniformMatrix4x3fvBase()
892 bool ValidateGetTexLevelParameterfv(const Context *context, in ValidateGetTexLevelParameterfv() argument
898 if (context->getClientVersion() < ES_3_1) in ValidateGetTexLevelParameterfv()
900 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateGetTexLevelParameterfv()
904 return ValidateGetTexLevelParameterBase(context, target, level, pname, nullptr); in ValidateGetTexLevelParameterfv()
907 bool ValidateGetTexLevelParameterfvRobustANGLE(const Context *context, in ValidateGetTexLevelParameterfvRobustANGLE() argument
919 bool ValidateGetTexLevelParameteriv(const Context *context, in ValidateGetTexLevelParameteriv() argument
925 if (context->getClientVersion() < ES_3_1) in ValidateGetTexLevelParameteriv()
927 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateGetTexLevelParameteriv()
931 return ValidateGetTexLevelParameterBase(context, target, level, pname, nullptr); in ValidateGetTexLevelParameteriv()
934 bool ValidateGetTexLevelParameterivRobustANGLE(const Context *context, in ValidateGetTexLevelParameterivRobustANGLE() argument
946 bool ValidateTexStorage2DMultisample(const Context *context, in ValidateTexStorage2DMultisample() argument
954 if (context->getClientVersion() < ES_3_1) in ValidateTexStorage2DMultisample()
956 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateTexStorage2DMultisample()
960 return ValidateTexStorage2DMultisampleBase(context, target, samples, internalFormat, width, in ValidateTexStorage2DMultisample()
964 bool ValidateTexStorageMem2DMultisampleEXT(const Context *context, in ValidateTexStorageMem2DMultisampleEXT() argument
974 if (!context->getExtensions().memoryObject) in ValidateTexStorageMem2DMultisampleEXT()
976 context->validationError(GL_INVALID_OPERATION, kExtensionNotEnabled); in ValidateTexStorageMem2DMultisampleEXT()
984 bool ValidateGetMultisamplefv(const Context *context, in ValidateGetMultisamplefv() argument
989 if (context->getClientVersion() < ES_3_1) in ValidateGetMultisamplefv()
991 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateGetMultisamplefv()
995 return ValidateGetMultisamplefvBase(context, pname, index, val); in ValidateGetMultisamplefv()
998 bool ValidateGetMultisamplefvRobustANGLE(const Context *context, in ValidateGetMultisamplefvRobustANGLE() argument
1009 bool ValidateFramebufferParameteri(const Context *context, GLenum target, GLenum pname, GLint param) in ValidateFramebufferParameteri() argument
1011 if (context->getClientVersion() < ES_3_1) in ValidateFramebufferParameteri()
1013 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateFramebufferParameteri()
1017 if (!ValidFramebufferTarget(context, target)) in ValidateFramebufferParameteri()
1019 context->validationError(GL_INVALID_ENUM, kInvalidFramebufferTarget); in ValidateFramebufferParameteri()
1027 GLint maxWidth = context->getCaps().maxFramebufferWidth; in ValidateFramebufferParameteri()
1030 context->validationError(GL_INVALID_VALUE, kExceedsFramebufferWidth); in ValidateFramebufferParameteri()
1037 GLint maxHeight = context->getCaps().maxFramebufferHeight; in ValidateFramebufferParameteri()
1040 context->validationError(GL_INVALID_VALUE, kExceedsFramebufferHeight); in ValidateFramebufferParameteri()
1047 GLint maxSamples = context->getCaps().maxFramebufferSamples; in ValidateFramebufferParameteri()
1050 context->validationError(GL_INVALID_VALUE, kExceedsFramebufferSamples); in ValidateFramebufferParameteri()
1061 if (!context->getExtensions().geometryShaderAny() && in ValidateFramebufferParameteri()
1062 context->getClientVersion() < ES_3_2) in ValidateFramebufferParameteri()
1064 context->validationError(GL_INVALID_ENUM, kGeometryShaderExtensionNotEnabled); in ValidateFramebufferParameteri()
1067 GLint maxLayers = context->getCaps().maxFramebufferLayers; in ValidateFramebufferParameteri()
1070 context->validationError(GL_INVALID_VALUE, kInvalidFramebufferLayer); in ValidateFramebufferParameteri()
1077 context->validationError(GL_INVALID_ENUM, kInvalidPname); in ValidateFramebufferParameteri()
1082 const Framebuffer *framebuffer = context->getState().getTargetFramebuffer(target); in ValidateFramebufferParameteri()
1086 context->validationError(GL_INVALID_OPERATION, kDefaultFramebuffer); in ValidateFramebufferParameteri()
1092 bool ValidateGetFramebufferParameteriv(const Context *context, in ValidateGetFramebufferParameteriv() argument
1097 if (context->getClientVersion() < ES_3_1) in ValidateGetFramebufferParameteriv()
1099 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateGetFramebufferParameteriv()
1103 if (!ValidFramebufferTarget(context, target)) in ValidateGetFramebufferParameteriv()
1105 context->validationError(GL_INVALID_ENUM, kInvalidFramebufferTarget); in ValidateGetFramebufferParameteriv()
1117 if (!context->getExtensions().geometryShaderAny() && in ValidateGetFramebufferParameteriv()
1118 context->getClientVersion() < ES_3_2) in ValidateGetFramebufferParameteriv()
1120 context->validationError(GL_INVALID_ENUM, kGeometryShaderExtensionNotEnabled); in ValidateGetFramebufferParameteriv()
1125 context->validationError(GL_INVALID_ENUM, kInvalidPname); in ValidateGetFramebufferParameteriv()
1129 const Framebuffer *framebuffer = context->getState().getTargetFramebuffer(target); in ValidateGetFramebufferParameteriv()
1134 context->validationError(GL_INVALID_OPERATION, kDefaultFramebuffer); in ValidateGetFramebufferParameteriv()
1140 bool ValidateGetFramebufferParameterivRobustANGLE(const Context *context, in ValidateGetFramebufferParameterivRobustANGLE() argument
1151 bool ValidateGetProgramResourceIndex(const Context *context, in ValidateGetProgramResourceIndex() argument
1156 if (context->getClientVersion() < ES_3_1) in ValidateGetProgramResourceIndex()
1158 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateGetProgramResourceIndex()
1162 Program *programObject = GetValidProgram(context, program); in ValidateGetProgramResourceIndex()
1170 context->validationError(GL_INVALID_ENUM, kInvalidProgramInterface); in ValidateGetProgramResourceIndex()
1177 bool ValidateBindVertexBuffer(const Context *context, in ValidateBindVertexBuffer() argument
1183 if (context->getClientVersion() < ES_3_1) in ValidateBindVertexBuffer()
1185 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateBindVertexBuffer()
1189 if (!context->isBufferGenerated(buffer)) in ValidateBindVertexBuffer()
1191 context->validationError(GL_INVALID_OPERATION, kObjectNotGenerated); in ValidateBindVertexBuffer()
1195 const Caps &caps = context->getCaps(); in ValidateBindVertexBuffer()
1198 context->validationError(GL_INVALID_VALUE, kExceedsMaxVertexAttribBindings); in ValidateBindVertexBuffer()
1204 context->validationError(GL_INVALID_VALUE, kNegativeOffset); in ValidateBindVertexBuffer()
1210 context->validationError(GL_INVALID_VALUE, kExceedsMaxVertexAttribStride); in ValidateBindVertexBuffer()
1216 if (context->getState().getVertexArrayId().value == 0) in ValidateBindVertexBuffer()
1218 context->validationError(GL_INVALID_OPERATION, kDefaultVertexArray); in ValidateBindVertexBuffer()
1225 bool ValidateVertexBindingDivisor(const Context *context, GLuint bindingIndex, GLuint divisor) in ValidateVertexBindingDivisor() argument
1227 if (context->getClientVersion() < ES_3_1) in ValidateVertexBindingDivisor()
1229 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateVertexBindingDivisor()
1233 const Caps &caps = context->getCaps(); in ValidateVertexBindingDivisor()
1236 context->validationError(GL_INVALID_VALUE, kExceedsMaxVertexAttribBindings); in ValidateVertexBindingDivisor()
1242 if (context->getState().getVertexArrayId().value == 0) in ValidateVertexBindingDivisor()
1244 context->validationError(GL_INVALID_OPERATION, kDefaultVertexArray); in ValidateVertexBindingDivisor()
1251 bool ValidateVertexAttribFormat(const Context *context, in ValidateVertexAttribFormat() argument
1258 if (!ValidateVertexAttribFormatCommon(context, relativeoffset)) in ValidateVertexAttribFormat()
1263 return ValidateFloatVertexFormat(context, attribindex, size, type); in ValidateVertexAttribFormat()
1266 bool ValidateVertexAttribIFormat(const Context *context, in ValidateVertexAttribIFormat() argument
1272 if (!ValidateVertexAttribFormatCommon(context, relativeoffset)) in ValidateVertexAttribIFormat()
1277 return ValidateIntegerVertexFormat(context, attribindex, size, type); in ValidateVertexAttribIFormat()
1280 bool ValidateVertexAttribBinding(const Context *context, GLuint attribIndex, GLuint bindingIndex) in ValidateVertexAttribBinding() argument
1282 if (context->getClientVersion() < ES_3_1) in ValidateVertexAttribBinding()
1284 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateVertexAttribBinding()
1290 if (context->getState().getVertexArrayId().value == 0) in ValidateVertexAttribBinding()
1292 context->validationError(GL_INVALID_OPERATION, kDefaultVertexArray); in ValidateVertexAttribBinding()
1296 const Caps &caps = context->getCaps(); in ValidateVertexAttribBinding()
1299 context->validationError(GL_INVALID_VALUE, kIndexExceedsMaxVertexAttribute); in ValidateVertexAttribBinding()
1305 context->validationError(GL_INVALID_VALUE, kExceedsMaxVertexAttribBindings); in ValidateVertexAttribBinding()
1312 bool ValidateGetProgramResourceName(const Context *context, in ValidateGetProgramResourceName() argument
1320 if (context->getClientVersion() < ES_3_1) in ValidateGetProgramResourceName()
1322 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateGetProgramResourceName()
1326 Program *programObject = GetValidProgram(context, program); in ValidateGetProgramResourceName()
1334 context->validationError(GL_INVALID_ENUM, kInvalidProgramInterface); in ValidateGetProgramResourceName()
1340 context->validationError(GL_INVALID_VALUE, kInvalidProgramResourceIndex); in ValidateGetProgramResourceName()
1346 context->validationError(GL_INVALID_VALUE, kNegativeBufferSize); in ValidateGetProgramResourceName()
1353 bool ValidateDispatchCompute(const Context *context, in ValidateDispatchCompute() argument
1358 if (context->getClientVersion() < ES_3_1) in ValidateDispatchCompute()
1360 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateDispatchCompute()
1364 const State &state = context->getState(); in ValidateDispatchCompute()
1369 context->validationError(GL_INVALID_OPERATION, kNoActiveProgramWithComputeShader); in ValidateDispatchCompute()
1373 const Caps &caps = context->getCaps(); in ValidateDispatchCompute()
1376 context->validationError(GL_INVALID_VALUE, kExceedsComputeWorkGroupCountX); in ValidateDispatchCompute()
1381 context->validationError(GL_INVALID_VALUE, kExceedsComputeWorkGroupCountY); in ValidateDispatchCompute()
1386 context->validationError(GL_INVALID_VALUE, kExceedsComputeWorkGroupCountZ); in ValidateDispatchCompute()
1393 bool ValidateDispatchComputeIndirect(const Context *context, GLintptr indirect) in ValidateDispatchComputeIndirect() argument
1395 if (context->getClientVersion() < ES_3_1) in ValidateDispatchComputeIndirect()
1397 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateDispatchComputeIndirect()
1401 const State &state = context->getState(); in ValidateDispatchComputeIndirect()
1406 context->validationError(GL_INVALID_OPERATION, kNoActiveProgramWithComputeShader); in ValidateDispatchComputeIndirect()
1412 context->validationError(GL_INVALID_VALUE, kNegativeOffset); in ValidateDispatchComputeIndirect()
1418 context->validationError(GL_INVALID_VALUE, kOffsetMustBeMultipleOfUint); in ValidateDispatchComputeIndirect()
1425 context->validationError(GL_INVALID_OPERATION, kDispatchIndirectBufferNotBound); in ValidateDispatchComputeIndirect()
1434 context->validationError(GL_INVALID_OPERATION, kInsufficientBufferSize); in ValidateDispatchComputeIndirect()
1441 bool ValidateBindImageTexture(const Context *context, in ValidateBindImageTexture() argument
1450 if (context->getClientVersion() < ES_3_1) in ValidateBindImageTexture()
1452 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateBindImageTexture()
1456 GLuint maxImageUnits = static_cast<GLuint>(context->getCaps().maxImageUnits); in ValidateBindImageTexture()
1459 context->validationError(GL_INVALID_VALUE, kExceedsMaxImageUnits); in ValidateBindImageTexture()
1465 context->validationError(GL_INVALID_VALUE, kNegativeLevel); in ValidateBindImageTexture()
1471 context->validationError(GL_INVALID_VALUE, kNegativeLayer); in ValidateBindImageTexture()
1477 context->validationError(GL_INVALID_ENUM, kInvalidImageAccess); in ValidateBindImageTexture()
1498 context->validationError(GL_INVALID_VALUE, kInvalidImageFormat); in ValidateBindImageTexture()
1504 Texture *tex = context->getTexture(texture); in ValidateBindImageTexture()
1508 context->validationError(GL_INVALID_VALUE, kMissingTextureName); in ValidateBindImageTexture()
1514 context->validationError(GL_INVALID_OPERATION, kTextureIsNotImmutable); in ValidateBindImageTexture()
1522 bool ValidateGetProgramResourceLocation(const Context *context, in ValidateGetProgramResourceLocation() argument
1527 if (context->getClientVersion() < ES_3_1) in ValidateGetProgramResourceLocation()
1529 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateGetProgramResourceLocation()
1533 Program *programObject = GetValidProgram(context, program); in ValidateGetProgramResourceLocation()
1541 context->validationError(GL_INVALID_OPERATION, kProgramNotLinked); in ValidateGetProgramResourceLocation()
1547 context->validationError(GL_INVALID_ENUM, kInvalidProgramInterface); in ValidateGetProgramResourceLocation()
1553 bool ValidateGetProgramResourceiv(const Context *context, in ValidateGetProgramResourceiv() argument
1563 if (context->getClientVersion() < ES_3_1) in ValidateGetProgramResourceiv()
1565 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateGetProgramResourceiv()
1569 Program *programObject = GetValidProgram(context, program); in ValidateGetProgramResourceiv()
1576 context->validationError(GL_INVALID_ENUM, kInvalidProgramInterface); in ValidateGetProgramResourceiv()
1581 context->validationError(GL_INVALID_VALUE, kInvalidPropCount); in ValidateGetProgramResourceiv()
1586 context->validationError(GL_INVALID_VALUE, kNegativeBufSize); in ValidateGetProgramResourceiv()
1591 context->validationError(GL_INVALID_VALUE, kInvalidProgramResourceIndex); in ValidateGetProgramResourceiv()
1596 if (!ValidateProgramResourceProperty(context, props[i])) in ValidateGetProgramResourceiv()
1598 context->validationError(GL_INVALID_ENUM, kInvalidProgramResourceProperty); in ValidateGetProgramResourceiv()
1603 context->validationError(GL_INVALID_OPERATION, kInvalidPropertyForProgramInterface); in ValidateGetProgramResourceiv()
1610 bool ValidateGetProgramInterfaceiv(const Context *context, in ValidateGetProgramInterfaceiv() argument
1616 if (context->getClientVersion() < ES_3_1) in ValidateGetProgramInterfaceiv()
1618 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateGetProgramInterfaceiv()
1622 Program *programObject = GetValidProgram(context, program); in ValidateGetProgramInterfaceiv()
1630 context->validationError(GL_INVALID_ENUM, kInvalidProgramInterface); in ValidateGetProgramInterfaceiv()
1642 context->validationError(GL_INVALID_ENUM, kInvalidPname); in ValidateGetProgramInterfaceiv()
1648 context->validationError(GL_INVALID_OPERATION, kAtomicCounterResourceName); in ValidateGetProgramInterfaceiv()
1662 context->validationError(GL_INVALID_OPERATION, kMaxActiveVariablesInterface); in ValidateGetProgramInterfaceiv()
1670 bool ValidateGetProgramInterfaceivRobustANGLE(const Context *context, in ValidateGetProgramInterfaceivRobustANGLE() argument
1682 bool ValidateGenProgramPipelinesBase(const Context *context, in ValidateGenProgramPipelinesBase() argument
1686 return ValidateGenOrDelete(context, n); in ValidateGenProgramPipelinesBase()
1689 bool ValidateDeleteProgramPipelinesBase(const Context *context, in ValidateDeleteProgramPipelinesBase() argument
1693 return ValidateGenOrDelete(context, n); in ValidateDeleteProgramPipelinesBase()
1696 bool ValidateBindProgramPipelineBase(const Context *context, ProgramPipelineID pipeline) in ValidateBindProgramPipelineBase() argument
1698 if (!context->isProgramPipelineGenerated({pipeline})) in ValidateBindProgramPipelineBase()
1700 context->validationError(GL_INVALID_OPERATION, kObjectNotGenerated); in ValidateBindProgramPipelineBase()
1707 bool ValidateIsProgramPipelineBase(const Context *context, ProgramPipelineID pipeline) in ValidateIsProgramPipelineBase() argument
1712 bool ValidateUseProgramStagesBase(const Context *context, in ValidateUseProgramStagesBase() argument
1722 if (context->getClientVersion() >= ES_3_2 || context->getExtensions().geometryShaderAny()) in ValidateUseProgramStagesBase()
1727 if (context->getClientVersion() >= ES_3_2 || context->getExtensions().tessellationShaderEXT) in ValidateUseProgramStagesBase()
1735 context->validationError(GL_INVALID_VALUE, kUnrecognizedShaderStageBit); in ValidateUseProgramStagesBase()
1742 if (!context->isProgramPipelineGenerated({pipeline})) in ValidateUseProgramStagesBase()
1744 context->validationError(GL_INVALID_OPERATION, kObjectNotGenerated); in ValidateUseProgramStagesBase()
1756 Program *program = context->getProgramNoResolveLink(programId); in ValidateUseProgramStagesBase()
1759 context->validationError(GL_INVALID_VALUE, kProgramDoesNotExist); in ValidateUseProgramStagesBase()
1767 program->resolveLink(context); in ValidateUseProgramStagesBase()
1770 context->validationError(GL_INVALID_OPERATION, kProgramNotSeparable); in ValidateUseProgramStagesBase()
1778 context->validationError(GL_INVALID_OPERATION, kProgramNotLinked); in ValidateUseProgramStagesBase()
1785 bool ValidateActiveShaderProgramBase(const Context *context, in ValidateActiveShaderProgramBase() argument
1792 if (!context->isProgramPipelineGenerated({pipeline})) in ValidateActiveShaderProgramBase()
1794 context->validationError(GL_INVALID_OPERATION, kObjectNotGenerated); in ValidateActiveShaderProgramBase()
1800 if ((programId.value != 0) && !context->isProgram(programId) && !context->isShader(programId)) in ValidateActiveShaderProgramBase()
1802 context->validationError(GL_INVALID_VALUE, kProgramDoesNotExist); in ValidateActiveShaderProgramBase()
1807 if (context->isShader(programId)) in ValidateActiveShaderProgramBase()
1809 context->validationError(GL_INVALID_OPERATION, kExpectedProgramName); in ValidateActiveShaderProgramBase()
1815 Program *program = context->getProgramNoResolveLink(programId); in ValidateActiveShaderProgramBase()
1818 context->validationError(GL_INVALID_OPERATION, kProgramNotLinked); in ValidateActiveShaderProgramBase()
1825 bool ValidateCreateShaderProgramvBase(const Context *context, in ValidateCreateShaderProgramvBase() argument
1833 context->validationError(GL_INVALID_ENUM, kInvalidShaderType); in ValidateCreateShaderProgramvBase()
1840 if (!context->getExtensions().geometryShaderAny() && in ValidateCreateShaderProgramvBase()
1841 context->getClientVersion() < ES_3_2) in ValidateCreateShaderProgramvBase()
1843 context->validationError(GL_INVALID_ENUM, kInvalidShaderType); in ValidateCreateShaderProgramvBase()
1849 if (!context->getExtensions().tessellationShaderEXT && in ValidateCreateShaderProgramvBase()
1850 context->getClientVersion() < ES_3_2) in ValidateCreateShaderProgramvBase()
1852 context->validationError(GL_INVALID_ENUM, kInvalidShaderType); in ValidateCreateShaderProgramvBase()
1863 context->validationError(GL_INVALID_VALUE, kNegativeCount); in ValidateCreateShaderProgramvBase()
1870 bool ValidateCreateShaderProgramvBase(const Context *context, in ValidateCreateShaderProgramvBase() argument
1876 return ValidateCreateShaderProgramvBase(context, type, count, tmpStrings); in ValidateCreateShaderProgramvBase()
1879 bool ValidateGetProgramPipelineivBase(const Context *context, in ValidateGetProgramPipelineivBase() argument
1887 if ((pipeline.value == 0) || (!context->isProgramPipelineGenerated(pipeline))) in ValidateGetProgramPipelineivBase()
1889 context->validationError(GL_INVALID_OPERATION, kProgramPipelineDoesNotExist); in ValidateGetProgramPipelineivBase()
1906 return context->getExtensions().geometryShaderAny() || in ValidateGetProgramPipelineivBase()
1907 context->getClientVersion() >= ES_3_2; in ValidateGetProgramPipelineivBase()
1910 return context->getExtensions().tessellationShaderEXT || in ValidateGetProgramPipelineivBase()
1911 context->getClientVersion() >= ES_3_2; in ValidateGetProgramPipelineivBase()
1914 context->validationError(GL_INVALID_ENUM, kInvalidPname); in ValidateGetProgramPipelineivBase()
1921 bool ValidateValidateProgramPipelineBase(const Context *context, ProgramPipelineID pipeline) in ValidateValidateProgramPipelineBase() argument
1928 if (!context->isProgramPipelineGenerated(pipeline)) in ValidateValidateProgramPipelineBase()
1930 context->validationError(GL_INVALID_OPERATION, kProgramPipelineDoesNotExist); in ValidateValidateProgramPipelineBase()
1937 bool ValidateGetProgramPipelineInfoLogBase(const Context *context, in ValidateGetProgramPipelineInfoLogBase() argument
1945 context->validationError(GL_INVALID_VALUE, kNegativeBufferSize); in ValidateGetProgramPipelineInfoLogBase()
1949 if (!context->isProgramPipelineGenerated(pipeline)) in ValidateGetProgramPipelineInfoLogBase()
1951 context->validationError(GL_INVALID_VALUE, kProgramPipelineDoesNotExist); in ValidateGetProgramPipelineInfoLogBase()
1958 bool ValidateActiveShaderProgram(const Context *context, in ValidateActiveShaderProgram() argument
1962 if (context->getClientVersion() < ES_3_1) in ValidateActiveShaderProgram()
1964 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateActiveShaderProgram()
1968 return ValidateActiveShaderProgramBase(context, pipelinePacked, programPacked); in ValidateActiveShaderProgram()
1971 bool ValidateBindProgramPipeline(const Context *context, ProgramPipelineID pipelinePacked) in ValidateBindProgramPipeline() argument
1973 if (context->getClientVersion() < ES_3_1) in ValidateBindProgramPipeline()
1975 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateBindProgramPipeline()
1979 return ValidateBindProgramPipelineBase(context, pipelinePacked); in ValidateBindProgramPipeline()
1982 bool ValidateCreateShaderProgramv(const Context *context, in ValidateCreateShaderProgramv() argument
1987 if (context->getClientVersion() < ES_3_1) in ValidateCreateShaderProgramv()
1989 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateCreateShaderProgramv()
1993 return ValidateCreateShaderProgramvBase(context, typePacked, count, strings); in ValidateCreateShaderProgramv()
1996 bool ValidateDeleteProgramPipelines(const Context *context, in ValidateDeleteProgramPipelines() argument
2000 if (context->getClientVersion() < ES_3_1) in ValidateDeleteProgramPipelines()
2002 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateDeleteProgramPipelines()
2006 return ValidateDeleteProgramPipelinesBase(context, n, pipelinesPacked); in ValidateDeleteProgramPipelines()
2009 bool ValidateGenProgramPipelines(const Context *context, in ValidateGenProgramPipelines() argument
2013 if (context->getClientVersion() < ES_3_1) in ValidateGenProgramPipelines()
2015 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateGenProgramPipelines()
2019 return ValidateGenProgramPipelinesBase(context, n, pipelinesPacked); in ValidateGenProgramPipelines()
2022 bool ValidateGetProgramPipelineInfoLog(const Context *context, in ValidateGetProgramPipelineInfoLog() argument
2028 if (context->getClientVersion() < ES_3_1) in ValidateGetProgramPipelineInfoLog()
2030 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateGetProgramPipelineInfoLog()
2034 return ValidateGetProgramPipelineInfoLogBase(context, pipelinePacked, bufSize, length, infoLog); in ValidateGetProgramPipelineInfoLog()
2037 bool ValidateGetProgramPipelineiv(const Context *context, in ValidateGetProgramPipelineiv() argument
2042 if (context->getClientVersion() < ES_3_1) in ValidateGetProgramPipelineiv()
2044 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateGetProgramPipelineiv()
2048 return ValidateGetProgramPipelineivBase(context, pipelinePacked, pname, params); in ValidateGetProgramPipelineiv()
2051 bool ValidateIsProgramPipeline(const Context *context, ProgramPipelineID pipelinePacked) in ValidateIsProgramPipeline() argument
2053 if (context->getClientVersion() < ES_3_1) in ValidateIsProgramPipeline()
2055 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateIsProgramPipeline()
2059 return ValidateIsProgramPipelineBase(context, pipelinePacked); in ValidateIsProgramPipeline()
2062 bool ValidateProgramUniform1f(const Context *context, in ValidateProgramUniform1f() argument
2067 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform1f()
2069 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform1f()
2073 return ValidateProgramUniform1fBase(context, programPacked, locationPacked, v0); in ValidateProgramUniform1f()
2076 bool ValidateProgramUniform1fv(const Context *context, in ValidateProgramUniform1fv() argument
2082 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform1fv()
2084 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform1fv()
2088 return ValidateProgramUniform1fvBase(context, programPacked, locationPacked, count, value); in ValidateProgramUniform1fv()
2091 bool ValidateProgramUniform1i(const Context *context, in ValidateProgramUniform1i() argument
2096 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform1i()
2098 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform1i()
2102 return ValidateProgramUniform1iBase(context, programPacked, locationPacked, v0); in ValidateProgramUniform1i()
2105 bool ValidateProgramUniform1iv(const Context *context, in ValidateProgramUniform1iv() argument
2111 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform1iv()
2113 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform1iv()
2117 return ValidateProgramUniform1ivBase(context, programPacked, locationPacked, count, value); in ValidateProgramUniform1iv()
2120 bool ValidateProgramUniform1ui(const Context *context, in ValidateProgramUniform1ui() argument
2125 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform1ui()
2127 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform1ui()
2131 return ValidateProgramUniform1uiBase(context, programPacked, locationPacked, v0); in ValidateProgramUniform1ui()
2134 bool ValidateProgramUniform1uiv(const Context *context, in ValidateProgramUniform1uiv() argument
2140 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform1uiv()
2142 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform1uiv()
2146 return ValidateProgramUniform1uivBase(context, programPacked, locationPacked, count, value); in ValidateProgramUniform1uiv()
2149 bool ValidateProgramUniform2f(const Context *context, in ValidateProgramUniform2f() argument
2155 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform2f()
2157 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform2f()
2161 return ValidateProgramUniform2fBase(context, programPacked, locationPacked, v0, v1); in ValidateProgramUniform2f()
2164 bool ValidateProgramUniform2fv(const Context *context, in ValidateProgramUniform2fv() argument
2170 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform2fv()
2172 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform2fv()
2176 return ValidateProgramUniform2fvBase(context, programPacked, locationPacked, count, value); in ValidateProgramUniform2fv()
2179 bool ValidateProgramUniform2i(const Context *context, in ValidateProgramUniform2i() argument
2185 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform2i()
2187 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform2i()
2191 return ValidateProgramUniform2iBase(context, programPacked, locationPacked, v0, v1); in ValidateProgramUniform2i()
2194 bool ValidateProgramUniform2iv(const Context *context, in ValidateProgramUniform2iv() argument
2200 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform2iv()
2202 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform2iv()
2206 return ValidateProgramUniform2ivBase(context, programPacked, locationPacked, count, value); in ValidateProgramUniform2iv()
2209 bool ValidateProgramUniform2ui(const Context *context, in ValidateProgramUniform2ui() argument
2215 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform2ui()
2217 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform2ui()
2221 return ValidateProgramUniform2uiBase(context, programPacked, locationPacked, v0, v1); in ValidateProgramUniform2ui()
2224 bool ValidateProgramUniform2uiv(const Context *context, in ValidateProgramUniform2uiv() argument
2230 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform2uiv()
2232 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform2uiv()
2236 return ValidateProgramUniform2uivBase(context, programPacked, locationPacked, count, value); in ValidateProgramUniform2uiv()
2239 bool ValidateProgramUniform3f(const Context *context, in ValidateProgramUniform3f() argument
2246 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform3f()
2248 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform3f()
2252 return ValidateProgramUniform3fBase(context, programPacked, locationPacked, v0, v1, v2); in ValidateProgramUniform3f()
2255 bool ValidateProgramUniform3fv(const Context *context, in ValidateProgramUniform3fv() argument
2261 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform3fv()
2263 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform3fv()
2267 return ValidateProgramUniform3fvBase(context, programPacked, locationPacked, count, value); in ValidateProgramUniform3fv()
2270 bool ValidateProgramUniform3i(const Context *context, in ValidateProgramUniform3i() argument
2277 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform3i()
2279 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform3i()
2283 return ValidateProgramUniform3iBase(context, programPacked, locationPacked, v0, v1, v2); in ValidateProgramUniform3i()
2286 bool ValidateProgramUniform3iv(const Context *context, in ValidateProgramUniform3iv() argument
2292 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform3iv()
2294 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform3iv()
2298 return ValidateProgramUniform3ivBase(context, programPacked, locationPacked, count, value); in ValidateProgramUniform3iv()
2301 bool ValidateProgramUniform3ui(const Context *context, in ValidateProgramUniform3ui() argument
2308 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform3ui()
2310 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform3ui()
2314 return ValidateProgramUniform3uiBase(context, programPacked, locationPacked, v0, v1, v2); in ValidateProgramUniform3ui()
2317 bool ValidateProgramUniform3uiv(const Context *context, in ValidateProgramUniform3uiv() argument
2323 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform3uiv()
2325 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform3uiv()
2329 return ValidateProgramUniform3uivBase(context, programPacked, locationPacked, count, value); in ValidateProgramUniform3uiv()
2332 bool ValidateProgramUniform4f(const Context *context, in ValidateProgramUniform4f() argument
2340 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform4f()
2342 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform4f()
2346 return ValidateProgramUniform4fBase(context, programPacked, locationPacked, v0, v1, v2, v3); in ValidateProgramUniform4f()
2349 bool ValidateProgramUniform4fv(const Context *context, in ValidateProgramUniform4fv() argument
2355 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform4fv()
2357 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform4fv()
2361 return ValidateProgramUniform4fvBase(context, programPacked, locationPacked, count, value); in ValidateProgramUniform4fv()
2364 bool ValidateProgramUniform4i(const Context *context, in ValidateProgramUniform4i() argument
2372 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform4i()
2374 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform4i()
2378 return ValidateProgramUniform4iBase(context, programPacked, locationPacked, v0, v1, v2, v3); in ValidateProgramUniform4i()
2381 bool ValidateProgramUniform4iv(const Context *context, in ValidateProgramUniform4iv() argument
2387 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform4iv()
2389 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform4iv()
2393 return ValidateProgramUniform4ivBase(context, programPacked, locationPacked, count, value); in ValidateProgramUniform4iv()
2396 bool ValidateProgramUniform4ui(const Context *context, in ValidateProgramUniform4ui() argument
2404 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform4ui()
2406 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform4ui()
2410 return ValidateProgramUniform4uiBase(context, programPacked, locationPacked, v0, v1, v2, v3); in ValidateProgramUniform4ui()
2413 bool ValidateProgramUniform4uiv(const Context *context, in ValidateProgramUniform4uiv() argument
2419 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniform4uiv()
2421 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniform4uiv()
2425 return ValidateProgramUniform4uivBase(context, programPacked, locationPacked, count, value); in ValidateProgramUniform4uiv()
2428 bool ValidateProgramUniformMatrix2fv(const Context *context, in ValidateProgramUniformMatrix2fv() argument
2435 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniformMatrix2fv()
2437 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniformMatrix2fv()
2441 return ValidateProgramUniformMatrix2fvBase(context, programPacked, locationPacked, count, in ValidateProgramUniformMatrix2fv()
2445 bool ValidateProgramUniformMatrix2x3fv(const Context *context, in ValidateProgramUniformMatrix2x3fv() argument
2452 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniformMatrix2x3fv()
2454 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniformMatrix2x3fv()
2458 return ValidateProgramUniformMatrix2x3fvBase(context, programPacked, locationPacked, count, in ValidateProgramUniformMatrix2x3fv()
2462 bool ValidateProgramUniformMatrix2x4fv(const Context *context, in ValidateProgramUniformMatrix2x4fv() argument
2469 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniformMatrix2x4fv()
2471 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniformMatrix2x4fv()
2475 return ValidateProgramUniformMatrix2x4fvBase(context, programPacked, locationPacked, count, in ValidateProgramUniformMatrix2x4fv()
2479 bool ValidateProgramUniformMatrix3fv(const Context *context, in ValidateProgramUniformMatrix3fv() argument
2486 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniformMatrix3fv()
2488 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniformMatrix3fv()
2492 return ValidateProgramUniformMatrix3fvBase(context, programPacked, locationPacked, count, in ValidateProgramUniformMatrix3fv()
2496 bool ValidateProgramUniformMatrix3x2fv(const Context *context, in ValidateProgramUniformMatrix3x2fv() argument
2503 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniformMatrix3x2fv()
2505 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniformMatrix3x2fv()
2509 return ValidateProgramUniformMatrix3x2fvBase(context, programPacked, locationPacked, count, in ValidateProgramUniformMatrix3x2fv()
2513 bool ValidateProgramUniformMatrix3x4fv(const Context *context, in ValidateProgramUniformMatrix3x4fv() argument
2520 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniformMatrix3x4fv()
2522 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniformMatrix3x4fv()
2526 return ValidateProgramUniformMatrix3x4fvBase(context, programPacked, locationPacked, count, in ValidateProgramUniformMatrix3x4fv()
2530 bool ValidateProgramUniformMatrix4fv(const Context *context, in ValidateProgramUniformMatrix4fv() argument
2537 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniformMatrix4fv()
2539 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniformMatrix4fv()
2543 return ValidateProgramUniformMatrix4fvBase(context, programPacked, locationPacked, count, in ValidateProgramUniformMatrix4fv()
2547 bool ValidateProgramUniformMatrix4x2fv(const Context *context, in ValidateProgramUniformMatrix4x2fv() argument
2554 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniformMatrix4x2fv()
2556 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniformMatrix4x2fv()
2560 return ValidateProgramUniformMatrix4x2fvBase(context, programPacked, locationPacked, count, in ValidateProgramUniformMatrix4x2fv()
2564 bool ValidateProgramUniformMatrix4x3fv(const Context *context, in ValidateProgramUniformMatrix4x3fv() argument
2571 if (context->getClientVersion() < ES_3_1) in ValidateProgramUniformMatrix4x3fv()
2573 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateProgramUniformMatrix4x3fv()
2577 return ValidateProgramUniformMatrix4x3fvBase(context, programPacked, locationPacked, count, in ValidateProgramUniformMatrix4x3fv()
2581 bool ValidateUseProgramStages(const Context *context, in ValidateUseProgramStages() argument
2586 if (context->getClientVersion() < ES_3_1) in ValidateUseProgramStages()
2588 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateUseProgramStages()
2592 return ValidateUseProgramStagesBase(context, pipelinePacked, stages, programPacked); in ValidateUseProgramStages()
2595 bool ValidateValidateProgramPipeline(const Context *context, ProgramPipelineID pipelinePacked) in ValidateValidateProgramPipeline() argument
2597 if (context->getClientVersion() < ES_3_1) in ValidateValidateProgramPipeline()
2599 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateValidateProgramPipeline()
2603 return ValidateValidateProgramPipelineBase(context, pipelinePacked); in ValidateValidateProgramPipeline()
2606 bool ValidateMemoryBarrier(const Context *context, GLbitfield barriers) in ValidateMemoryBarrier() argument
2608 if (context->getClientVersion() < ES_3_1) in ValidateMemoryBarrier()
2610 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateMemoryBarrier()
2626 if (context->getExtensions().bufferStorageEXT) in ValidateMemoryBarrier()
2633 context->validationError(GL_INVALID_VALUE, kInvalidMemoryBarrierBit); in ValidateMemoryBarrier()
2640 bool ValidateMemoryBarrierByRegion(const Context *context, GLbitfield barriers) in ValidateMemoryBarrierByRegion() argument
2642 if (context->getClientVersion() < ES_3_1) in ValidateMemoryBarrierByRegion()
2644 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateMemoryBarrierByRegion()
2659 context->validationError(GL_INVALID_VALUE, kInvalidMemoryBarrierBit); in ValidateMemoryBarrierByRegion()
2666 bool ValidateSampleMaski(const Context *context, GLuint maskNumber, GLbitfield mask) in ValidateSampleMaski() argument
2668 if (context->getClientVersion() < ES_3_1) in ValidateSampleMaski()
2670 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateSampleMaski()
2674 return ValidateSampleMaskiBase(context, maskNumber, mask); in ValidateSampleMaski()
2677 bool ValidateMinSampleShadingOES(const Context *context, GLfloat value) in ValidateMinSampleShadingOES() argument
2679 if (!context->getExtensions().sampleShadingOES) in ValidateMinSampleShadingOES()
2681 context->validationError(GL_INVALID_OPERATION, kExtensionNotEnabled); in ValidateMinSampleShadingOES()
2688 bool ValidateFramebufferTextureCommon(const Context *context, in ValidateFramebufferTextureCommon() argument
2696 Texture *tex = context->getTexture(texture); in ValidateFramebufferTextureCommon()
2710 context->validationError(GL_INVALID_VALUE, kInvalidTextureName); in ValidateFramebufferTextureCommon()
2714 if (!ValidMipLevel(context, tex->getType(), level)) in ValidateFramebufferTextureCommon()
2716 context->validationError(GL_INVALID_VALUE, kInvalidMipLevel); in ValidateFramebufferTextureCommon()
2721 if (!ValidateFramebufferTextureBase(context, target, attachment, texture, level)) in ValidateFramebufferTextureCommon()
2729 bool ValidateFramebufferTextureEXT(const Context *context, in ValidateFramebufferTextureEXT() argument
2735 if (!context->getExtensions().geometryShaderEXT) in ValidateFramebufferTextureEXT()
2737 context->validationError(GL_INVALID_OPERATION, kGeometryShaderExtensionNotEnabled); in ValidateFramebufferTextureEXT()
2741 return ValidateFramebufferTextureCommon(context, target, attachment, texture, level); in ValidateFramebufferTextureEXT()
2744 bool ValidateFramebufferTextureOES(const Context *context, in ValidateFramebufferTextureOES() argument
2750 if (!context->getExtensions().geometryShaderOES) in ValidateFramebufferTextureOES()
2752 context->validationError(GL_INVALID_OPERATION, kGeometryShaderExtensionNotEnabled); in ValidateFramebufferTextureOES()
2756 return ValidateFramebufferTextureCommon(context, target, attachment, texture, level); in ValidateFramebufferTextureOES()
2760 bool ValidateTexStorage3DMultisampleOES(const Context *context, in ValidateTexStorage3DMultisampleOES() argument
2769 if (!context->getExtensions().textureStorageMultisample2DArrayOES) in ValidateTexStorage3DMultisampleOES()
2771 context->validationError(GL_INVALID_ENUM, kMultisampleArrayExtensionRequired); in ValidateTexStorage3DMultisampleOES()
2777 context->validationError(GL_INVALID_ENUM, kTargetMustBeTexture2DMultisampleArrayOES); in ValidateTexStorage3DMultisampleOES()
2783 context->validationError(GL_INVALID_VALUE, kNegativeSize); in ValidateTexStorage3DMultisampleOES()
2787 if (depth > context->getCaps().maxArrayTextureLayers) in ValidateTexStorage3DMultisampleOES()
2789 context->validationError(GL_INVALID_VALUE, kTextureDepthOutOfRange); in ValidateTexStorage3DMultisampleOES()
2793 return ValidateTexStorageMultisample(context, target, samples, sizedinternalformat, width, in ValidateTexStorage3DMultisampleOES()
2797 bool ValidateTexStorageMem3DMultisampleEXT(const Context *context, in ValidateTexStorageMem3DMultisampleEXT() argument
2808 if (!context->getExtensions().memoryObject) in ValidateTexStorageMem3DMultisampleEXT()
2810 context->validationError(GL_INVALID_OPERATION, kExtensionNotEnabled); in ValidateTexStorageMem3DMultisampleEXT()
2818 bool ValidateGetProgramResourceLocationIndexEXT(const Context *context, in ValidateGetProgramResourceLocationIndexEXT() argument
2823 if (!context->getExtensions().blendFuncExtended) in ValidateGetProgramResourceLocationIndexEXT()
2825 context->validationError(GL_INVALID_OPERATION, kExtensionNotEnabled); in ValidateGetProgramResourceLocationIndexEXT()
2828 if (context->getClientVersion() < ES_3_1) in ValidateGetProgramResourceLocationIndexEXT()
2830 context->validationError(GL_INVALID_OPERATION, kES31Required); in ValidateGetProgramResourceLocationIndexEXT()
2835 context->validationError(GL_INVALID_ENUM, kProgramInterfaceMustBeProgramOutput); in ValidateGetProgramResourceLocationIndexEXT()
2838 Program *programObject = GetValidProgram(context, program); in ValidateGetProgramResourceLocationIndexEXT()
2845 context->validationError(GL_INVALID_OPERATION, kProgramNotLinked); in ValidateGetProgramResourceLocationIndexEXT()
2852 bool ValidateTexBufferOES(const Context *context, in ValidateTexBufferOES() argument
2857 if (!context->getExtensions().textureBufferOES) in ValidateTexBufferOES()
2859 context->validationError(GL_INVALID_OPERATION, kTextureBufferExtensionNotAvailable); in ValidateTexBufferOES()
2863 return ValidateTexBufferBase(context, target, internalformat, bufferPacked); in ValidateTexBufferOES()
2866 bool ValidateTexBufferRangeOES(const Context *context, in ValidateTexBufferRangeOES() argument
2873 if (!context->getExtensions().textureBufferOES) in ValidateTexBufferRangeOES()
2875 context->validationError(GL_INVALID_OPERATION, kTextureBufferExtensionNotAvailable); in ValidateTexBufferRangeOES()
2879 return ValidateTexBufferRangeBase(context, target, internalformat, bufferPacked, offset, size); in ValidateTexBufferRangeOES()
2883 bool ValidateTexBufferEXT(const Context *context, in ValidateTexBufferEXT() argument
2888 if (!context->getExtensions().textureBufferEXT) in ValidateTexBufferEXT()
2890 context->validationError(GL_INVALID_OPERATION, kTextureBufferExtensionNotAvailable); in ValidateTexBufferEXT()
2894 return ValidateTexBufferBase(context, target, internalformat, bufferPacked); in ValidateTexBufferEXT()
2897 bool ValidateTexBufferRangeEXT(const Context *context, in ValidateTexBufferRangeEXT() argument
2904 if (!context->getExtensions().textureBufferEXT) in ValidateTexBufferRangeEXT()
2906 context->validationError(GL_INVALID_OPERATION, kTextureBufferExtensionNotAvailable); in ValidateTexBufferRangeEXT()
2910 return ValidateTexBufferRangeBase(context, target, internalformat, bufferPacked, offset, size); in ValidateTexBufferRangeEXT()
2913 bool ValidateTexBufferBase(const Context *context, in ValidateTexBufferBase() argument
2920 context->validationError(GL_INVALID_ENUM, kTextureBufferTarget); in ValidateTexBufferBase()
2959 context->validationError(GL_INVALID_ENUM, kTextureBufferInternalFormat); in ValidateTexBufferBase()
2965 if (!context->isBufferGenerated(bufferPacked)) in ValidateTexBufferBase()
2967 context->validationError(GL_INVALID_OPERATION, kTextureBufferInvalidBuffer); in ValidateTexBufferBase()
2975 bool ValidateTexBufferRangeBase(const Context *context, in ValidateTexBufferRangeBase() argument
2982 const Caps &caps = context->getCaps(); in ValidateTexBufferRangeBase()
2986 context->validationError(GL_INVALID_VALUE, kTextureBufferOffsetAlignment); in ValidateTexBufferRangeBase()
2991 context->validationError(GL_INVALID_VALUE, kTextureBufferSize); in ValidateTexBufferRangeBase()
2994 const Buffer *buffer = context->getBuffer(bufferPacked); in ValidateTexBufferRangeBase()
2998 context->validationError(GL_INVALID_OPERATION, kBufferNotBound); in ValidateTexBufferRangeBase()
3004 context->validationError(GL_INVALID_VALUE, kTextureBufferSizeOffset); in ValidateTexBufferRangeBase()
3008 return ValidateTexBufferBase(context, target, internalformat, bufferPacked); in ValidateTexBufferRangeBase()