blob: 280fda629dea3e6f5d5ce666aba18d6faaa7b3b2 [file] [log] [blame]
/*
* Copyright 2015, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* THIS FILE WAS GENERATED BY apic. DO NOT EDIT.
*/
#include "abort_exception.h"
#include "gles_imports.h"
#include "gles_types.h"
#include "gles_spy.h"
#include <gapic/log.h>
#include <gapic/coder/memory.h>
#include <gapic/coder/atom.h>
#include <gapic/coder/gles.h>
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include <stdint.h>
#include <memory>
#include <string>
namespace gapii {
std::shared_ptr<Buffer> GlesSpy::subGetBoundBufferOrError(CallObserver* observer, const std::function<void()>& call, uint32_t target) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
BufferId l_id = /* switch(target) */
/* case GLenum::GL_ARRAY_BUFFER: */(((target) == (GLenum::GL_ARRAY_BUFFER))) ? (checkNotNull(l_ctx).mBoundBuffers.mArrayBuffer) :
/* case GLenum::GL_ELEMENT_ARRAY_BUFFER: */(((target) == (GLenum::GL_ELEMENT_ARRAY_BUFFER))) ? (checkNotNull(findOrZero(checkNotNull(l_ctx).mInstances.mVertexArrays, checkNotNull(l_ctx).mBoundVertexArray)).mElementArrayBuffer) :
/* case GLenum::GL_COPY_READ_BUFFER: */(((target) == (GLenum::GL_COPY_READ_BUFFER))) ? (checkNotNull(l_ctx).mBoundBuffers.mCopyReadBuffer) :
/* case GLenum::GL_COPY_WRITE_BUFFER: */(((target) == (GLenum::GL_COPY_WRITE_BUFFER))) ? (checkNotNull(l_ctx).mBoundBuffers.mCopyWriteBuffer) :
/* case GLenum::GL_PIXEL_PACK_BUFFER: */(((target) == (GLenum::GL_PIXEL_PACK_BUFFER))) ? (checkNotNull(l_ctx).mBoundBuffers.mPixelPackBuffer) :
/* case GLenum::GL_PIXEL_UNPACK_BUFFER: */(((target) == (GLenum::GL_PIXEL_UNPACK_BUFFER))) ? (checkNotNull(l_ctx).mBoundBuffers.mPixelUnpackBuffer) :
/* case GLenum::GL_TRANSFORM_FEEDBACK_BUFFER: */(((target) == (GLenum::GL_TRANSFORM_FEEDBACK_BUFFER))) ? (checkNotNull(l_ctx).mBoundBuffers.mTransformFeedbackBuffer) :
/* case GLenum::GL_UNIFORM_BUFFER: */(((target) == (GLenum::GL_UNIFORM_BUFFER))) ? (checkNotNull(l_ctx).mBoundBuffers.mUniformBuffer) :
/* case GLenum::GL_ATOMIC_COUNTER_BUFFER: */(((target) == (GLenum::GL_ATOMIC_COUNTER_BUFFER))) ? (checkNotNull(l_ctx).mBoundBuffers.mAtomicCounterBuffer) :
/* case GLenum::GL_DISPATCH_INDIRECT_BUFFER: */(((target) == (GLenum::GL_DISPATCH_INDIRECT_BUFFER))) ? (checkNotNull(l_ctx).mBoundBuffers.mDispatchIndirectBuffer) :
/* case GLenum::GL_DRAW_INDIRECT_BUFFER: */(((target) == (GLenum::GL_DRAW_INDIRECT_BUFFER))) ? (checkNotNull(l_ctx).mBoundBuffers.mDrawIndirectBuffer) :
/* case GLenum::GL_SHADER_STORAGE_BUFFER: */(((target) == (GLenum::GL_SHADER_STORAGE_BUFFER))) ? (checkNotNull(l_ctx).mBoundBuffers.mShaderStorageBuffer) :
/* case GLenum::GL_TEXTURE_BUFFER: */(((target) == (GLenum::GL_TEXTURE_BUFFER))) ? (checkNotNull(l_ctx).mBoundBuffers.mTextureBuffer) :
/* default: */ (BufferId)(0UL);
if ((l_id) == ((BufferId)(0UL))) {
subGlErrorInvalidOperation(observer, call);
}
return findOrZero(checkNotNull(l_ctx).mInstances.mBuffers, l_id);
}
void GlesSpy::subCopyBufferSubData(CallObserver* observer, const std::function<void()>& call, uint32_t readTarget, uint32_t writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) {
std::shared_ptr<Buffer> l__res_0 = subGetBoundBufferOrError(observer, call, readTarget);
(void)l__res_0;
std::shared_ptr<Buffer> l__res_1 = subGetBoundBufferOrError(observer, call, writeTarget);
(void)l__res_1;
(void)readOffset;
(void)writeOffset;
(void)size;
return;
}
void GlesSpy::subGetBufferPointerv(CallObserver* observer, const std::function<void()>& call, uint32_t target, uint32_t pname, void** params) {
switch (target) {
case GLenum::GL_ARRAY_BUFFER: // fall-through...
case GLenum::GL_COPY_READ_BUFFER: // fall-through...
case GLenum::GL_COPY_WRITE_BUFFER: // fall-through...
case GLenum::GL_ELEMENT_ARRAY_BUFFER: // fall-through...
case GLenum::GL_PIXEL_PACK_BUFFER: // fall-through...
case GLenum::GL_PIXEL_UNPACK_BUFFER: // fall-through...
case GLenum::GL_TRANSFORM_FEEDBACK_BUFFER: // fall-through...
case GLenum::GL_UNIFORM_BUFFER: {
break;
}
case GLenum::GL_ATOMIC_COUNTER_BUFFER: // fall-through...
case GLenum::GL_DISPATCH_INDIRECT_BUFFER: // fall-through...
case GLenum::GL_DRAW_INDIRECT_BUFFER: // fall-through...
case GLenum::GL_SHADER_STORAGE_BUFFER: // fall-through...
case GLenum::GL_TEXTURE_BUFFER: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
break;
}
default: {
subGlErrorInvalidEnum(observer, call, target);
}
}
switch (pname) {
case GLenum::GL_BUFFER_MAP_POINTER: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, pname);
}
}
observer->write(slice(params, 0ULL, 1ULL));
return;
}
void GlesSpy::subMapBufferRange(CallObserver* observer, const std::function<void()>& call, uint32_t target, GLintptr offset, GLsizeiptr length, uint32_t access, uint8_t* ptr) {
std::shared_ptr<Buffer> l_b = subGetBoundBufferOrError(observer, call, target);
if (((offset) < ((GLintptr)(0L))) || (((length) < ((GLsizeiptr)(0L))) || ((((GLsizeiptr)(offset)) + (length)) > (checkNotNull(l_b).mSize)))) {
subGlErrorInvalidValue(observer, call);
}
subSupportsBits(observer, call, access, (GLbitfield::GL_MAP_FLUSH_EXPLICIT_BIT) | ((GLbitfield::GL_MAP_INVALIDATE_BUFFER_BIT) | ((GLbitfield::GL_MAP_INVALIDATE_RANGE_BIT) | ((GLbitfield::GL_MAP_READ_BIT) | ((GLbitfield::GL_MAP_UNSYNCHRONIZED_BIT) | (GLbitfield::GL_MAP_WRITE_BIT))))));
if ((checkNotNull(l_b).mMapped) == (GLbooleanLabels::GL_TRUE)) {
subGlErrorInvalidOperation(observer, call);
}
checkNotNull(l_b).mMapped = GLbooleanLabels::GL_TRUE;
checkNotNull(l_b).mAccessFlags = access;
checkNotNull(l_b).mMapPointer = ptr;
checkNotNull(l_b).mMapOffset = offset;
checkNotNull(l_b).mMapLength = length;
mapMemory(observer, slice(ptr, (uint64_t)((GLsizeiptr)(0L)), (uint64_t)(length)));
if ((access & GLbitfield::GL_MAP_READ_BIT) != 0) {
observer->copy(slice(ptr, (uint64_t)((GLsizeiptr)(0L)), (uint64_t)(length)), slice(checkNotNull(l_b).mData, (uint64_t)(offset), (uint64_t)((offset) + ((GLintptr)(length)))));
}
return;
}
void GlesSpy::subUnmapBuffer(CallObserver* observer, const std::function<void()>& call, uint32_t target) {
std::shared_ptr<Buffer> l_b = subGetBoundBufferOrError(observer, call, target);
if ((checkNotNull(l_b).mMapped) == (GLbooleanLabels::GL_FALSE)) {
subGlErrorInvalidOperation(observer, call);
}
if (((checkNotNull(l_b).mAccessFlags & GLbitfield::GL_MAP_WRITE_BIT) != 0) && (!((checkNotNull(l_b).mAccessFlags & GLbitfield::GL_MAP_FLUSH_EXPLICIT_BIT) != 0))) {
GLintptr l_copyLength = (GLintptr)(checkNotNull(l_b).mMapLength);
observer->copy(slice(checkNotNull(l_b).mData, (uint64_t)(checkNotNull(l_b).mMapOffset), (uint64_t)((checkNotNull(l_b).mMapOffset) + (l_copyLength))), slice(checkNotNull(l_b).mMapPointer, (uint64_t)((GLintptr)(0L)), (uint64_t)(l_copyLength)));
}
unmapMemory(observer, slice(checkNotNull(l_b).mMapPointer, (uint64_t)((GLsizeiptr)(0L)), (uint64_t)(checkNotNull(l_b).mMapLength)));
checkNotNull(l_b).mMapped = GLbooleanLabels::GL_FALSE;
checkNotNull(l_b).mAccessFlags = (uint32_t)(0L);
checkNotNull(l_b).mMapPointer = nullptr;
checkNotNull(l_b).mMapOffset = (GLintptr)(0L);
checkNotNull(l_b).mMapLength = (GLsizeiptr)(0L);
return;
}
void GlesSpy::subDebugMessageCallback(CallObserver* observer, const std::function<void()>& call, GLDEBUGPROC callback, void* userParam) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
checkNotNull(l_ctx).mDebug.mCallbackFunction = callback;
checkNotNull(l_ctx).mDebug.mCallbackUserParam = userParam;
return;
}
void GlesSpy::subDebugMessageControl(CallObserver* observer, const std::function<void()>& call, uint32_t source, uint32_t type, uint32_t severity, GLsizei count, GLuint* ids, GLboolean enabled) {
switch (source) {
case GLenum::GL_DEBUG_SOURCE_API: // fall-through...
case GLenum::GL_DEBUG_SOURCE_APPLICATION: // fall-through...
case GLenum::GL_DEBUG_SOURCE_OTHER: // fall-through...
case GLenum::GL_DEBUG_SOURCE_SHADER_COMPILER: // fall-through...
case GLenum::GL_DEBUG_SOURCE_THIRD_PARTY: // fall-through...
case GLenum::GL_DEBUG_SOURCE_WINDOW_SYSTEM: // fall-through...
case GLenum::GL_DONT_CARE: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, source);
}
}
switch (type) {
case GLenum::GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR: // fall-through...
case GLenum::GL_DEBUG_TYPE_ERROR: // fall-through...
case GLenum::GL_DEBUG_TYPE_MARKER: // fall-through...
case GLenum::GL_DEBUG_TYPE_OTHER: // fall-through...
case GLenum::GL_DEBUG_TYPE_PERFORMANCE: // fall-through...
case GLenum::GL_DEBUG_TYPE_POP_GROUP: // fall-through...
case GLenum::GL_DEBUG_TYPE_PORTABILITY: // fall-through...
case GLenum::GL_DEBUG_TYPE_PUSH_GROUP: // fall-through...
case GLenum::GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR: // fall-through...
case GLenum::GL_DONT_CARE: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, type);
}
}
switch (severity) {
case GLenum::GL_DEBUG_SEVERITY_HIGH: // fall-through...
case GLenum::GL_DEBUG_SEVERITY_LOW: // fall-through...
case GLenum::GL_DEBUG_SEVERITY_MEDIUM: // fall-through...
case GLenum::GL_DEBUG_SEVERITY_NOTIFICATION: // fall-through...
case GLenum::GL_DONT_CARE: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, severity);
}
}
(void)enabled;
observer->read(slice(ids, (uint64_t)((GLsizei)(0L)), (uint64_t)(count)));
return;
}
void GlesSpy::subDebugMessageInsert(CallObserver* observer, const std::function<void()>& call, uint32_t source, uint32_t type, GLuint id, uint32_t severity, GLsizei length, GLchar* message) {
switch (source) {
case GLenum::GL_DEBUG_SOURCE_APPLICATION: // fall-through...
case GLenum::GL_DEBUG_SOURCE_THIRD_PARTY: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, source);
}
}
switch (type) {
case GLenum::GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR: // fall-through...
case GLenum::GL_DEBUG_TYPE_ERROR: // fall-through...
case GLenum::GL_DEBUG_TYPE_MARKER: // fall-through...
case GLenum::GL_DEBUG_TYPE_OTHER: // fall-through...
case GLenum::GL_DEBUG_TYPE_PERFORMANCE: // fall-through...
case GLenum::GL_DEBUG_TYPE_POP_GROUP: // fall-through...
case GLenum::GL_DEBUG_TYPE_PORTABILITY: // fall-through...
case GLenum::GL_DEBUG_TYPE_PUSH_GROUP: // fall-through...
case GLenum::GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, type);
}
}
switch (severity) {
case GLenum::GL_DEBUG_SEVERITY_HIGH: // fall-through...
case GLenum::GL_DEBUG_SEVERITY_LOW: // fall-through...
case GLenum::GL_DEBUG_SEVERITY_MEDIUM: // fall-through...
case GLenum::GL_DEBUG_SEVERITY_NOTIFICATION: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, severity);
}
}
(void)id;
subReadString(observer, call, length, message);
return;
}
void GlesSpy::subGetObjectLabel(CallObserver* observer, const std::function<void()>& call, uint32_t identifier, GLuint name, GLsizei bufSize, GLsizei* length, GLchar* label) {
switch (identifier) {
case GLenum::GL_BUFFER: // fall-through...
case GLenum::GL_FRAMEBUFFER: // fall-through...
case GLenum::GL_PROGRAM: // fall-through...
case GLenum::GL_PROGRAM_PIPELINE: // fall-through...
case GLenum::GL_QUERY: // fall-through...
case GLenum::GL_RENDERBUFFER: // fall-through...
case GLenum::GL_SAMPLER: // fall-through...
case GLenum::GL_SHADER: // fall-through...
case GLenum::GL_TEXTURE: // fall-through...
case GLenum::GL_TRANSFORM_FEEDBACK: // fall-through...
case GLenum::GL_VERTEX_ARRAY: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, identifier);
}
}
(void)name;
subWriteString(observer, call, bufSize, length, label);
return;
}
void GlesSpy::subGetObjectPtrLabel(CallObserver* observer, const std::function<void()>& call, void* ptr, GLsizei bufSize, GLsizei* length, GLchar* label) {
(void)ptr;
subWriteString(observer, call, bufSize, length, label);
return;
}
void GlesSpy::subGetPointerv(CallObserver* observer, const std::function<void()>& call, uint32_t pname, void** params) {
switch (pname) {
case GLenum::GL_DEBUG_CALLBACK_FUNCTION: // fall-through...
case GLenum::GL_DEBUG_CALLBACK_USER_PARAM: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, pname);
}
}
observer->write(slice(params, 0ULL, 1ULL));
return;
}
void GlesSpy::subObjectLabel(CallObserver* observer, const std::function<void()>& call, uint32_t identifier, GLuint name, GLsizei length, GLchar* label) {
std::string l_str = /* switch((label) != (nullptr)) */
/* case true: */((((label) != (nullptr)) == (true))) ? (/* switch((length) < ((GLsizei)(0L))) */
/* case true: */((((length) < ((GLsizei)(0L))) == (true))) ? (observer->string((char*)(label))) :
/* case false: */((((length) < ((GLsizei)(0L))) == (false))) ? (observer->string(slice(label, (uint64_t)((GLsizei)(0L)), (uint64_t)(length)).as<char>())) :
/* default: */ "") :
/* case false: */((((label) != (nullptr)) == (false))) ? ("") :
/* default: */ "";
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
switch (identifier) {
case GLenum::GL_TEXTURE: {
if (!(checkNotNull(l_ctx).mInstances.mTextures.count((TextureId)(name)) > 0)) {
subGlErrorInvalidOperation(observer, call);
}
checkNotNull(findOrZero(checkNotNull(l_ctx).mInstances.mTextures, (TextureId)(name))).mLabel = l_str;
break;
}
case GLenum::GL_FRAMEBUFFER: {
if (!(checkNotNull(l_ctx).mInstances.mFramebuffers.count((FramebufferId)(name)) > 0)) {
subGlErrorInvalidOperation(observer, call);
}
checkNotNull(findOrZero(checkNotNull(l_ctx).mInstances.mFramebuffers, (FramebufferId)(name))).mLabel = l_str;
break;
}
case GLenum::GL_RENDERBUFFER: {
if (!(checkNotNull(l_ctx).mInstances.mRenderbuffers.count((RenderbufferId)(name)) > 0)) {
subGlErrorInvalidOperation(observer, call);
}
checkNotNull(findOrZero(checkNotNull(l_ctx).mInstances.mRenderbuffers, (RenderbufferId)(name))).mLabel = l_str;
break;
}
case GLenum::GL_BUFFER: {
if (!(checkNotNull(l_ctx).mInstances.mBuffers.count((BufferId)(name)) > 0)) {
subGlErrorInvalidOperation(observer, call);
}
checkNotNull(findOrZero(checkNotNull(l_ctx).mInstances.mBuffers, (BufferId)(name))).mLabel = l_str;
break;
}
case GLenum::GL_SHADER: {
if (!(checkNotNull(l_ctx).mInstances.mShaders.count((ShaderId)(name)) > 0)) {
subGlErrorInvalidOperation(observer, call);
}
checkNotNull(findOrZero(checkNotNull(l_ctx).mInstances.mShaders, (ShaderId)(name))).mLabel = l_str;
break;
}
case GLenum::GL_PROGRAM: {
if (!(checkNotNull(l_ctx).mInstances.mPrograms.count((ProgramId)(name)) > 0)) {
subGlErrorInvalidOperation(observer, call);
}
checkNotNull(findOrZero(checkNotNull(l_ctx).mInstances.mPrograms, (ProgramId)(name))).mLabel = l_str;
break;
}
case GLenum::GL_VERTEX_ARRAY: {
if (!(checkNotNull(l_ctx).mInstances.mVertexArrays.count((VertexArrayId)(name)) > 0)) {
subGlErrorInvalidOperation(observer, call);
}
checkNotNull(findOrZero(checkNotNull(l_ctx).mInstances.mVertexArrays, (VertexArrayId)(name))).mLabel = l_str;
break;
}
case GLenum::GL_QUERY: {
if (!(checkNotNull(l_ctx).mInstances.mQueries.count((QueryId)(name)) > 0)) {
subGlErrorInvalidOperation(observer, call);
}
checkNotNull(findOrZero(checkNotNull(l_ctx).mInstances.mQueries, (QueryId)(name))).mLabel = l_str;
break;
}
case GLenum::GL_SAMPLER: {
if (!(checkNotNull(l_ctx).mInstances.mSamplers.count((SamplerId)(name)) > 0)) {
subGlErrorInvalidOperation(observer, call);
}
checkNotNull(findOrZero(checkNotNull(l_ctx).mInstances.mSamplers, (SamplerId)(name))).mLabel = l_str;
break;
}
case GLenum::GL_TRANSFORM_FEEDBACK: {
if (!(checkNotNull(l_ctx).mInstances.mTransformFeedbacks.count((TransformFeedbackId)(name)) > 0)) {
subGlErrorInvalidOperation(observer, call);
}
checkNotNull(findOrZero(checkNotNull(l_ctx).mInstances.mTransformFeedbacks, (TransformFeedbackId)(name))).mLabel = l_str;
break;
}
case GLenum::GL_PROGRAM_PIPELINE: {
if (!(checkNotNull(l_ctx).mInstances.mPipelines.count((PipelineId)(name)) > 0)) {
subGlErrorInvalidOperation(observer, call);
}
checkNotNull(findOrZero(checkNotNull(l_ctx).mInstances.mPipelines, (PipelineId)(name))).mLabel = l_str;
break;
}
default: {
subGlErrorInvalidEnum(observer, call, identifier);
}
}
return;
}
void GlesSpy::subObjectPtrLabel(CallObserver* observer, const std::function<void()>& call, void* ptr, GLsizei length, GLchar* label) {
(void)ptr;
subReadString(observer, call, length, label);
return;
}
void GlesSpy::subPopDebugGroup(CallObserver* observer, const std::function<void()>& call) {
return;
}
void GlesSpy::subCheckPrimitiveType(CallObserver* observer, const std::function<void()>& call, uint32_t draw_mode) {
switch (draw_mode) {
case GLenum::GL_LINES: // fall-through...
case GLenum::GL_LINE_LOOP: // fall-through...
case GLenum::GL_LINE_STRIP: // fall-through...
case GLenum::GL_POINTS: // fall-through...
case GLenum::GL_TRIANGLES: // fall-through...
case GLenum::GL_TRIANGLE_FAN: // fall-through...
case GLenum::GL_TRIANGLE_STRIP: {
break;
}
case GLenum::GL_LINES_ADJACENCY: // fall-through...
case GLenum::GL_LINE_STRIP_ADJACENCY: // fall-through...
case GLenum::GL_PATCHES: // fall-through...
case GLenum::GL_TRIANGLES_ADJACENCY: // fall-through...
case GLenum::GL_TRIANGLE_STRIP_ADJACENCY: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
break;
}
default: {
subGlErrorInvalidEnum(observer, call, draw_mode);
}
}
return;
}
void GlesSpy::subCheckIndicesType(CallObserver* observer, const std::function<void()>& call, uint32_t indices_type) {
switch (indices_type) {
case GLenum::GL_UNSIGNED_BYTE: // fall-through...
case GLenum::GL_UNSIGNED_SHORT: {
break;
}
case GLenum::GL_UNSIGNED_INT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
break;
}
default: {
subGlErrorInvalidEnum(observer, call, indices_type);
}
}
return;
}
void GlesSpy::subDrawArraysInstanced(CallObserver* observer, const std::function<void()>& call, uint32_t draw_mode, GLint first_index, GLsizei indices_count, GLsizei instance_count) {
subCheckPrimitiveType(observer, call, draw_mode);
if ((first_index) < ((GLint)(0L))) {
subGlErrorInvalidValue(observer, call);
}
if ((indices_count) < ((GLsizei)(0L))) {
subGlErrorInvalidValue(observer, call);
}
if ((instance_count) < ((GLsizei)(0L))) {
subGlErrorInvalidValue(observer, call);
}
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
subReadVertexArrays(observer, call, l_ctx, (uint32_t)(first_index), (uint32_t)(indices_count), (uint32_t)(instance_count));
return;
}
void GlesSpy::subDrawElements(CallObserver* observer, const std::function<void()>& call, std::shared_ptr<Context> ctx, uint32_t draw_mode, GLsizei indices_count, uint32_t indices_type, IndicesPointer indices, GLsizei instance_count, GLint base_vertex) {
subCheckPrimitiveType(observer, call, draw_mode);
if ((indices_count) < ((GLsizei)(0L))) {
subGlErrorInvalidValue(observer, call);
}
subCheckIndicesType(observer, call, indices_type);
if ((instance_count) < ((GLsizei)(0L))) {
subGlErrorInvalidValue(observer, call);
}
if ((indices_count) > ((GLsizei)(0L))) {
uint32_t l_count = (uint32_t)(indices_count);
BufferId l_id = checkNotNull(findOrZero(checkNotNull(ctx).mInstances.mVertexArrays, checkNotNull(ctx).mBoundVertexArray)).mElementArrayBuffer;
if ((l_id) != ((BufferId)(0UL))) {
Slice<uint8_t> l_index_data = checkNotNull(findOrZero(checkNotNull(ctx).mInstances.mBuffers, l_id)).mData;
uint32_t l_offset = (uint32_t)((uint64_t)(indices));
u32Limits l_limits = IndexLimits(observer, l_index_data.begin(), indices_type, l_offset, l_count);
subReadVertexArrays(observer, call, ctx, (l_limits.mfirst) + ((uint32_t)(base_vertex)), ((l_limits.mlast) - (l_limits.mfirst)) + (1UL), (uint32_t)(instance_count));
} else {
uint8_t* l_index_data = (uint8_t*)(indices);
u32Limits l_limits = IndexLimits(observer, l_index_data, indices_type, 0UL, l_count);
subReadVertexArrays(observer, call, ctx, (l_limits.mfirst) + ((uint32_t)(base_vertex)), ((l_limits.mlast) - (l_limits.mfirst)) + (1UL), (uint32_t)(instance_count));
uint32_t l__res_0 = subIndexSize(observer, call, indices_type);
observer->read(slice(l_index_data, (uint64_t)(0UL), (uint64_t)((l_count) * (l__res_0))));
}
}
return;
}
void GlesSpy::subDrawElementsInstancedBaseVertex(CallObserver* observer, const std::function<void()>& call, uint32_t draw_mode, GLsizei indices_count, uint32_t indices_type, IndicesPointer indices, GLsizei instance_count, GLint base_vertex) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
subDrawElements(observer, call, l_ctx, draw_mode, indices_count, indices_type, indices, instance_count, base_vertex);
return;
}
void GlesSpy::subDrawRangeElementsBaseVertex(CallObserver* observer, const std::function<void()>& call, uint32_t draw_mode, GLuint start, GLuint end, GLsizei indices_count, uint32_t indices_type, IndicesPointer indices, GLint base_vertex) {
if ((end) < (start)) {
subGlErrorInvalidValue(observer, call);
}
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
subDrawElements(observer, call, l_ctx, draw_mode, indices_count, indices_type, indices, (GLsizei)(1L), base_vertex);
return;
}
void GlesSpy::subBlendEquationSeparatei(CallObserver* observer, const std::function<void()>& call, DrawBufferIndex buf, uint32_t modeRGB, uint32_t modeAlpha) {
subSetBlendEquation(observer, call, buf, 1L, modeRGB, modeAlpha);
return;
}
void GlesSpy::subCheckBlendEquation(CallObserver* observer, const std::function<void()>& call, uint32_t equation) {
switch (equation) {
case GLenum::GL_FUNC_ADD: // fall-through...
case GLenum::GL_FUNC_REVERSE_SUBTRACT: // fall-through...
case GLenum::GL_FUNC_SUBTRACT: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
break;
}
case GLenum::GL_MAX: // fall-through...
case GLenum::GL_MIN: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
break;
}
default: {
subGlErrorInvalidEnum(observer, call, equation);
}
}
return;
}
void GlesSpy::subSetBlendEquation(CallObserver* observer, const std::function<void()>& call, DrawBufferIndex first_buffer, int32_t buffer_count, uint32_t rgb, uint32_t alpha) {
subCheckBlendEquation(observer, call, rgb);
subCheckBlendEquation(observer, call, alpha);
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
for (DrawBufferIndex l_i = first_buffer; l_i < (first_buffer) + ((DrawBufferIndex)(buffer_count)); ++l_i) {
BlendState l_blend = findOrZero(checkNotNull(l_ctx).mFragmentOperations.mBlend, l_i);
l_blend.mEquationRgb = rgb;
l_blend.mEquationAlpha = alpha;
checkNotNull(l_ctx).mFragmentOperations.mBlend[l_i] = l_blend;
}
return;
}
void GlesSpy::subBlendFuncSeparatei(CallObserver* observer, const std::function<void()>& call, DrawBufferIndex buf, uint32_t srcRGB, uint32_t dstRGB, uint32_t srcAlpha, uint32_t dstAlpha) {
subSetBlendFunc(observer, call, buf, 1L, srcRGB, dstRGB, srcAlpha, dstAlpha);
return;
}
void GlesSpy::subCheckBlendFunc(CallObserver* observer, const std::function<void()>& call, uint32_t factor) {
switch (factor) {
case GLenum::GL_CONSTANT_ALPHA: // fall-through...
case GLenum::GL_CONSTANT_COLOR: // fall-through...
case GLenum::GL_DST_ALPHA: // fall-through...
case GLenum::GL_DST_COLOR: // fall-through...
case GLenum::GL_ONE: // fall-through...
case GLenum::GL_ONE_MINUS_CONSTANT_ALPHA: // fall-through...
case GLenum::GL_ONE_MINUS_CONSTANT_COLOR: // fall-through...
case GLenum::GL_ONE_MINUS_DST_ALPHA: // fall-through...
case GLenum::GL_ONE_MINUS_DST_COLOR: // fall-through...
case GLenum::GL_ONE_MINUS_SRC_ALPHA: // fall-through...
case GLenum::GL_ONE_MINUS_SRC_COLOR: // fall-through...
case GLenum::GL_SRC_ALPHA: // fall-through...
case GLenum::GL_SRC_ALPHA_SATURATE: // fall-through...
case GLenum::GL_SRC_COLOR: // fall-through...
case GLenum::GL_ZERO: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
break;
}
default: {
subGlErrorInvalidEnum(observer, call, factor);
}
}
return;
}
void GlesSpy::subSetBlendFunc(CallObserver* observer, const std::function<void()>& call, DrawBufferIndex first_buffer, int32_t buffer_count, uint32_t srcRgb, uint32_t dstRgb, uint32_t srcAlpha, uint32_t dstAlpha) {
subCheckBlendFunc(observer, call, srcRgb);
subCheckBlendFunc(observer, call, dstRgb);
subCheckBlendFunc(observer, call, srcAlpha);
subCheckBlendFunc(observer, call, dstAlpha);
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
for (DrawBufferIndex l_i = first_buffer; l_i < (first_buffer) + ((DrawBufferIndex)(buffer_count)); ++l_i) {
BlendState l_blend = findOrZero(checkNotNull(l_ctx).mFragmentOperations.mBlend, l_i);
l_blend.mSrcRgb = srcRgb;
l_blend.mDstRgb = dstRgb;
l_blend.mSrcAlpha = srcAlpha;
l_blend.mDstAlpha = dstAlpha;
checkNotNull(l_ctx).mFragmentOperations.mBlend[l_i] = l_blend;
}
return;
}
void GlesSpy::subStencilFuncSeparate(CallObserver* observer, const std::function<void()>& call, uint32_t face, uint32_t function, GLint reference_value, GLuint mask) {
switch (face) {
case GLenum::GL_BACK: // fall-through...
case GLenum::GL_FRONT: // fall-through...
case GLenum::GL_FRONT_AND_BACK: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, face);
}
}
switch (function) {
case GLenum::GL_ALWAYS: // fall-through...
case GLenum::GL_EQUAL: // fall-through...
case GLenum::GL_GEQUAL: // fall-through...
case GLenum::GL_GREATER: // fall-through...
case GLenum::GL_LEQUAL: // fall-through...
case GLenum::GL_LESS: // fall-through...
case GLenum::GL_NEVER: // fall-through...
case GLenum::GL_NOTEQUAL: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, function);
}
}
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
if (((face) == (GLenum::GL_FRONT)) || ((face) == (GLenum::GL_FRONT_AND_BACK))) {
checkNotNull(l_ctx).mFragmentOperations.mStencil.mFunc = function;
checkNotNull(l_ctx).mFragmentOperations.mStencil.mRef = reference_value;
checkNotNull(l_ctx).mFragmentOperations.mStencil.mValueMask = mask;
}
if (((face) == (GLenum::GL_BACK)) || ((face) == (GLenum::GL_FRONT_AND_BACK))) {
checkNotNull(l_ctx).mFragmentOperations.mStencil.mBackFunc = function;
checkNotNull(l_ctx).mFragmentOperations.mStencil.mBackRef = reference_value;
checkNotNull(l_ctx).mFragmentOperations.mStencil.mBackValueMask = mask;
}
return;
}
void GlesSpy::subCheckStencilOp(CallObserver* observer, const std::function<void()>& call, uint32_t op) {
switch (op) {
case GLenum::GL_DECR: // fall-through...
case GLenum::GL_DECR_WRAP: // fall-through...
case GLenum::GL_INCR: // fall-through...
case GLenum::GL_INCR_WRAP: // fall-through...
case GLenum::GL_INVERT: // fall-through...
case GLenum::GL_KEEP: // fall-through...
case GLenum::GL_REPLACE: // fall-through...
case GLenum::GL_ZERO: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, op);
}
}
return;
}
void GlesSpy::subDrawBuffers(CallObserver* observer, const std::function<void()>& call, GLsizei n, uint32_t* buffers) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
Slice<uint32_t> l_b = slice(buffers, (uint64_t)((GLsizei)(0L)), (uint64_t)(n));
std::shared_ptr<Framebuffer> l_framebuffer = subGetBoundFramebufferOrErrorInvalidEnum(observer, call, GLenum::GL_DRAW_FRAMEBUFFER);
for (GLint l_i = (GLint)(0L); l_i < (GLint)(n); ++l_i) {
checkNotNull(l_framebuffer).mDrawBuffer[l_i] = observer->read(l_b, (uint64_t)(l_i));
}
for (GLint l_i = (GLint)(n); l_i < checkNotNull(l_ctx).mConstants.mMaxDrawBuffers; ++l_i) {
checkNotNull(l_framebuffer).mDrawBuffer[l_i] = GLenum::GL_NONE;
}
return;
}
void GlesSpy::subCheckReadPixels(CallObserver* observer, const std::function<void()>& call, GLsizei width, GLsizei height, uint32_t format, uint32_t type) {
switch (format) {
case GLenum::GL_ALPHA: // fall-through...
case GLenum::GL_RGB: // fall-through...
case GLenum::GL_RGBA: {
break;
}
case GLenum::GL_RED: // fall-through...
case GLenum::GL_RED_INTEGER: // fall-through...
case GLenum::GL_RG: // fall-through...
case GLenum::GL_RG_INTEGER: // fall-through...
case GLenum::GL_RGB_INTEGER: // fall-through...
case GLenum::GL_LUMINANCE_ALPHA: // fall-through...
case GLenum::GL_LUMINANCE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
break;
}
default: {
subGlErrorInvalidEnum(observer, call, format);
}
}
switch (type) {
case GLenum::GL_UNSIGNED_SHORT_5_6_5: {
if ((format) != (GLenum::GL_RGB)) {
subGlErrorInvalidOperation(observer, call);
}
break;
}
case GLenum::GL_UNSIGNED_SHORT_4_4_4_4: // fall-through...
case GLenum::GL_UNSIGNED_SHORT_5_5_5_1: {
if ((format) != (GLenum::GL_RGBA)) {
subGlErrorInvalidOperation(observer, call);
}
break;
}
case GLenum::GL_UNSIGNED_BYTE: {
break;
}
case GLenum::GL_FLOAT: // fall-through...
case GLenum::GL_INT: // fall-through...
case GLenum::GL_UNSIGNED_INT: // fall-through...
case GLenum::GL_UNSIGNED_INT_2_10_10_10_REV: // fall-through...
case GLenum::GL_UNSIGNED_INT_10F_11F_11F_REV: // fall-through...
case GLenum::GL_UNSIGNED_INT_5_9_9_9_REV: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
break;
}
default: {
subGlErrorInvalidEnum(observer, call, type);
}
}
if (((width) < ((GLsizei)(0L))) || ((height) < ((GLsizei)(0L)))) {
subGlErrorInvalidValue(observer, call);
}
return;
}
void GlesSpy::subReadnPixels(CallObserver* observer, const std::function<void()>& call, GLint x, GLint y, GLsizei width, GLsizei height, uint32_t format, uint32_t type, GLsizei bufSize, void* data) {
subCheckReadPixels(observer, call, width, height, format, type);
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
if (((checkNotNull(l_ctx).mBoundBuffers.mPixelPackBuffer) == ((BufferId)(0UL))) && ((data) != (nullptr))) {
uint32_t l_requiredSize = subImageSize(observer, call, (uint32_t)(width), (uint32_t)(height), format, type);
if (((GLsizei)(l_requiredSize)) > (bufSize)) {
subGlErrorInvalidOperation(observer, call);
}
observer->write(slice(data, (uint64_t)(0UL), (uint64_t)(l_requiredSize)));
}
(void)x;
(void)y;
(void)width;
(void)height;
return;
}
uint32_t GlesSpy::subUncompressedPixelSize(CallObserver* observer, const std::function<void()>& call, uint32_t format, uint32_t ty) {
uint32_t l_num_components = subComponentCount(observer, call, format);
return /* switch(ty) */
/* case GLenum::GL_UNSIGNED_BYTE: */(((ty) == (GLenum::GL_UNSIGNED_BYTE))) ? ((l_num_components) * (1UL)) :
/* case GLenum::GL_BYTE: */(((ty) == (GLenum::GL_BYTE))) ? ((l_num_components) * (1UL)) :
/* case GLenum::GL_UNSIGNED_SHORT: */(((ty) == (GLenum::GL_UNSIGNED_SHORT))) ? ((l_num_components) * (2UL)) :
/* case GLenum::GL_SHORT: */(((ty) == (GLenum::GL_SHORT))) ? ((l_num_components) * (2UL)) :
/* case GLenum::GL_UNSIGNED_INT: */(((ty) == (GLenum::GL_UNSIGNED_INT))) ? ((l_num_components) * (4UL)) :
/* case GLenum::GL_INT: */(((ty) == (GLenum::GL_INT))) ? ((l_num_components) * (4UL)) :
/* case GLenum::GL_HALF_FLOAT: */(((ty) == (GLenum::GL_HALF_FLOAT))) ? ((l_num_components) * (2UL)) :
/* case GLenum::GL_HALF_FLOAT_OES: */(((ty) == (GLenum::GL_HALF_FLOAT_OES))) ? ((l_num_components) * (2UL)) :
/* case GLenum::GL_FLOAT: */(((ty) == (GLenum::GL_FLOAT))) ? ((l_num_components) * (4UL)) :
/* case GLenum::GL_UNSIGNED_SHORT_5_6_5: */(((ty) == (GLenum::GL_UNSIGNED_SHORT_5_6_5))) ? (2UL) :
/* case GLenum::GL_UNSIGNED_SHORT_4_4_4_4: */(((ty) == (GLenum::GL_UNSIGNED_SHORT_4_4_4_4))) ? (2UL) :
/* case GLenum::GL_UNSIGNED_SHORT_5_5_5_1: */(((ty) == (GLenum::GL_UNSIGNED_SHORT_5_5_5_1))) ? (2UL) :
/* case GLenum::GL_UNSIGNED_INT_2_10_10_10_REV: */(((ty) == (GLenum::GL_UNSIGNED_INT_2_10_10_10_REV))) ? (4UL) :
/* case GLenum::GL_UNSIGNED_INT_10F_11F_11F_REV: */(((ty) == (GLenum::GL_UNSIGNED_INT_10F_11F_11F_REV))) ? (4UL) :
/* case GLenum::GL_UNSIGNED_INT_5_9_9_9_REV: */(((ty) == (GLenum::GL_UNSIGNED_INT_5_9_9_9_REV))) ? (4UL) :
/* case GLenum::GL_UNSIGNED_INT_24_8: */(((ty) == (GLenum::GL_UNSIGNED_INT_24_8))) ? (4UL) :
/* case GLenum::GL_FLOAT_32_UNSIGNED_INT_24_8_REV: */(((ty) == (GLenum::GL_FLOAT_32_UNSIGNED_INT_24_8_REV))) ? (8UL) :
/* default: */ 0UL;
}
uint32_t GlesSpy::subImageType(CallObserver* observer, const std::function<void()>& call, uint32_t internalFormat) {
return /* switch(internalFormat) */
/* case GLenum::GL_ALPHA8_EXT: */(((internalFormat) == (GLenum::GL_ALPHA8_EXT))) ? (GLenum::GL_UNSIGNED_BYTE) :
/* case GLenum::GL_R8, GLenum::GL_R8UI, GLenum::GL_RG8, GLenum::GL_RG8UI, GLenum::GL_RGB8, GLenum::GL_SRGB8, GLenum::GL_RGB8UI, GLenum::GL_RGBA8, GLenum::GL_SRGB8_ALPHA8, GLenum::GL_RGBA8UI, GLenum::GL_STENCIL_INDEX8, GLenum::GL_BGRA_EXT: */(((internalFormat) == (GLenum::GL_R8))|| ((internalFormat) == (GLenum::GL_R8UI))|| ((internalFormat) == (GLenum::GL_RG8))|| ((internalFormat) == (GLenum::GL_RG8UI))|| ((internalFormat) == (GLenum::GL_RGB8))|| ((internalFormat) == (GLenum::GL_SRGB8))|| ((internalFormat) == (GLenum::GL_RGB8UI))|| ((internalFormat) == (GLenum::GL_RGBA8))|| ((internalFormat) == (GLenum::GL_SRGB8_ALPHA8))|| ((internalFormat) == (GLenum::GL_RGBA8UI))|| ((internalFormat) == (GLenum::GL_STENCIL_INDEX8))|| ((internalFormat) == (GLenum::GL_BGRA_EXT))) ? (GLenum::GL_UNSIGNED_BYTE) :
/* case GLenum::GL_R8_SNORM, GLenum::GL_R8I, GLenum::GL_RG8_SNORM, GLenum::GL_RG8I, GLenum::GL_RGB8_SNORM, GLenum::GL_RGB8I, GLenum::GL_RGBA8_SNORM, GLenum::GL_RGBA8I: */(((internalFormat) == (GLenum::GL_R8_SNORM))|| ((internalFormat) == (GLenum::GL_R8I))|| ((internalFormat) == (GLenum::GL_RG8_SNORM))|| ((internalFormat) == (GLenum::GL_RG8I))|| ((internalFormat) == (GLenum::GL_RGB8_SNORM))|| ((internalFormat) == (GLenum::GL_RGB8I))|| ((internalFormat) == (GLenum::GL_RGBA8_SNORM))|| ((internalFormat) == (GLenum::GL_RGBA8I))) ? (GLenum::GL_BYTE) :
/* case GLenum::GL_R16, GLenum::GL_R16UI, GLenum::GL_RG16, GLenum::GL_RG16UI, GLenum::GL_RGB16, GLenum::GL_RGB16UI, GLenum::GL_RGBA16, GLenum::GL_RGBA16UI, GLenum::GL_DEPTH_COMPONENT16: */(((internalFormat) == (GLenum::GL_R16))|| ((internalFormat) == (GLenum::GL_R16UI))|| ((internalFormat) == (GLenum::GL_RG16))|| ((internalFormat) == (GLenum::GL_RG16UI))|| ((internalFormat) == (GLenum::GL_RGB16))|| ((internalFormat) == (GLenum::GL_RGB16UI))|| ((internalFormat) == (GLenum::GL_RGBA16))|| ((internalFormat) == (GLenum::GL_RGBA16UI))|| ((internalFormat) == (GLenum::GL_DEPTH_COMPONENT16))) ? (GLenum::GL_UNSIGNED_SHORT) :
/* case GLenum::GL_R16_SNORM, GLenum::GL_R16I, GLenum::GL_RG16_SNORM, GLenum::GL_RG16I, GLenum::GL_RGB16_SNORM, GLenum::GL_RGB16I, GLenum::GL_RGBA16_SNORM, GLenum::GL_RGBA16I: */(((internalFormat) == (GLenum::GL_R16_SNORM))|| ((internalFormat) == (GLenum::GL_R16I))|| ((internalFormat) == (GLenum::GL_RG16_SNORM))|| ((internalFormat) == (GLenum::GL_RG16I))|| ((internalFormat) == (GLenum::GL_RGB16_SNORM))|| ((internalFormat) == (GLenum::GL_RGB16I))|| ((internalFormat) == (GLenum::GL_RGBA16_SNORM))|| ((internalFormat) == (GLenum::GL_RGBA16I))) ? (GLenum::GL_SHORT) :
/* case GLenum::GL_RGB565: */(((internalFormat) == (GLenum::GL_RGB565))) ? (GLenum::GL_UNSIGNED_SHORT_5_6_5) :
/* case GLenum::GL_RGB5_A1: */(((internalFormat) == (GLenum::GL_RGB5_A1))) ? (GLenum::GL_UNSIGNED_SHORT_5_5_5_1) :
/* case GLenum::GL_RGBA4: */(((internalFormat) == (GLenum::GL_RGBA4))) ? (GLenum::GL_UNSIGNED_SHORT_4_4_4_4) :
/* case GLenum::GL_R32UI, GLenum::GL_RG32UI, GLenum::GL_RGB32UI, GLenum::GL_RGBA32UI, GLenum::GL_DEPTH_COMPONENT24: */(((internalFormat) == (GLenum::GL_R32UI))|| ((internalFormat) == (GLenum::GL_RG32UI))|| ((internalFormat) == (GLenum::GL_RGB32UI))|| ((internalFormat) == (GLenum::GL_RGBA32UI))|| ((internalFormat) == (GLenum::GL_DEPTH_COMPONENT24))) ? (GLenum::GL_UNSIGNED_INT) :
/* case GLenum::GL_R32I, GLenum::GL_RG32I, GLenum::GL_RGB32I, GLenum::GL_RGBA32I: */(((internalFormat) == (GLenum::GL_R32I))|| ((internalFormat) == (GLenum::GL_RG32I))|| ((internalFormat) == (GLenum::GL_RGB32I))|| ((internalFormat) == (GLenum::GL_RGBA32I))) ? (GLenum::GL_INT) :
/* case GLenum::GL_R11F_G11F_B10F: */(((internalFormat) == (GLenum::GL_R11F_G11F_B10F))) ? (GLenum::GL_UNSIGNED_INT_10F_11F_11F_REV) :
/* case GLenum::GL_RGB9_E5: */(((internalFormat) == (GLenum::GL_RGB9_E5))) ? (GLenum::GL_UNSIGNED_INT_5_9_9_9_REV) :
/* case GLenum::GL_RGB10_A2: */(((internalFormat) == (GLenum::GL_RGB10_A2))) ? (GLenum::GL_UNSIGNED_INT_2_10_10_10_REV) :
/* case GLenum::GL_RGB10_A2UI: */(((internalFormat) == (GLenum::GL_RGB10_A2UI))) ? (GLenum::GL_UNSIGNED_INT_2_10_10_10_REV) :
/* case GLenum::GL_DEPTH24_STENCIL8: */(((internalFormat) == (GLenum::GL_DEPTH24_STENCIL8))) ? (GLenum::GL_UNSIGNED_INT_24_8) :
/* case GLenum::GL_R16F, GLenum::GL_RG16F, GLenum::GL_RGB16F, GLenum::GL_RGBA16F: */(((internalFormat) == (GLenum::GL_R16F))|| ((internalFormat) == (GLenum::GL_RG16F))|| ((internalFormat) == (GLenum::GL_RGB16F))|| ((internalFormat) == (GLenum::GL_RGBA16F))) ? (GLenum::GL_HALF_FLOAT) :
/* case GLenum::GL_R32F, GLenum::GL_RG32F, GLenum::GL_RGB32F, GLenum::GL_RGBA32F, GLenum::GL_DEPTH_COMPONENT32F: */(((internalFormat) == (GLenum::GL_R32F))|| ((internalFormat) == (GLenum::GL_RG32F))|| ((internalFormat) == (GLenum::GL_RGB32F))|| ((internalFormat) == (GLenum::GL_RGBA32F))|| ((internalFormat) == (GLenum::GL_DEPTH_COMPONENT32F))) ? (GLenum::GL_FLOAT) :
/* case GLenum::GL_DEPTH32F_STENCIL8: */(((internalFormat) == (GLenum::GL_DEPTH32F_STENCIL8))) ? (GLenum::GL_FLOAT_32_UNSIGNED_INT_24_8_REV) :
/* default: */ internalFormat;
}
void GlesSpy::subDisablei(CallObserver* observer, const std::function<void()>& call, uint32_t capability, GLuint index) {
subSetCapability(observer, call, capability, true, index, GLbooleanLabels::GL_FALSE);
return;
}
void GlesSpy::subReadString(CallObserver* observer, const std::function<void()>& call, GLsizei length, GLchar* buffer) {
if ((buffer) != (nullptr)) {
if ((length) < ((GLsizei)(0L))) {
(void)observer->string((char*)(buffer));
} else {
observer->read(slice(buffer, (uint64_t)((GLsizei)(0L)), (uint64_t)(length)));
}
}
return;
}
void GlesSpy::subCheckShader(CallObserver* observer, const std::function<void()>& call, std::shared_ptr<Context> ctx, ShaderId shader) {
if (!(checkNotNull(ctx).mInstances.mShaders.count(shader) > 0)) {
if (!(checkNotNull(ctx).mInstances.mPrograms.count((ProgramId)(shader)) > 0)) {
subGlErrorInvalidValue(observer, call);
} else {
subGlErrorInvalidOperation(observer, call);
}
}
return;
}
void GlesSpy::subReapShader(CallObserver* observer, const std::function<void()>& call, std::shared_ptr<Context> ctx, ShaderId shaderId, std::shared_ptr<Shader> shader) {
if ((checkNotNull(shader).mDeleteStatus) && ((checkNotNull(shader).mRefCount) == ((GLuint)(0UL)))) {
checkNotNull(ctx).mInstances.mShaders.erase(shaderId);
}
return;
}
void GlesSpy::subGetProgramBinary(CallObserver* observer, const std::function<void()>& call, ProgramId program, GLsizei bufSize, GLsizei* length, uint32_t* binaryFormat, void* binary) {
(void)program;
if ((length) != (nullptr)) {
GLsizei l_l = (GLsizei)(slice(length, 0ULL, 1ULL)[0ULL]);
observer->write<GLsizei>(slice(length, 0ULL, 1ULL), 0ULL, l_l);
observer->write(slice(binary, (uint64_t)((GLsizei)(0L)), (uint64_t)(l_l)));
} else {
observer->write(slice(binary, (uint64_t)((GLsizei)(0L)), (uint64_t)(bufSize)));
}
observer->write<uint32_t>(slice(binaryFormat, 0ULL, 1ULL), 0ULL, slice(binaryFormat, 0ULL, 1ULL)[0ULL]);
return;
}
void GlesSpy::subGetnUniformiv(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLsizei bufSize, GLint* values) {
subGetnUniformfv_GLint__P(observer, call, program, location, bufSize, values);
return;
}
void GlesSpy::subProgramBinary(CallObserver* observer, const std::function<void()>& call, ProgramId program, uint32_t binaryFormat, void* binary, GLsizei length) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
subCheckProgram(observer, call, l_ctx, program);
std::shared_ptr<Program> l_p = findOrZero(checkNotNull(l_ctx).mInstances.mPrograms, program);
switch (binaryFormat) {
case GLenum::GL_Z400_BINARY_AMD: {
checkNotNull(l_p).mBinary = observer->clone(slice(binary, (uint64_t)((GLsizei)(0L)), (uint64_t)(length)).as<uint8_t>());
checkNotNull(l_p).mPrecompiled = true;
subApplyProgramInfoExtra(observer, call, program, GetProgramInfoExtra(observer, program));
break;
}
default: {
subGlErrorInvalidEnum(observer, call, binaryFormat);
}
}
return;
}
void GlesSpy::subProgramUniform1f(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLfloat value0) {
Slice<GLfloat> l_v = make<GLfloat>(1ULL);
observer->write<GLfloat>(l_v, 0ULL, value0);
subProgramUniformv_GLfloat__S(observer, call, program, location, l_v, GLenum::GL_FLOAT);
return;
}
void GlesSpy::subProgramUniform1fv(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLsizei count, GLfloat* values) {
Slice<GLfloat> l_v = slice(values, (uint64_t)((GLsizei)(0L)), (uint64_t)(count));
subProgramUniformv_GLfloat__S(observer, call, program, location, l_v, GLenum::GL_FLOAT);
return;
}
void GlesSpy::subProgramUniform1ui(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLuint value0) {
Slice<GLuint> l_v = make<GLuint>(1ULL);
observer->write<GLuint>(l_v, 0ULL, value0);
subProgramUniformv_GLuint__S(observer, call, program, location, l_v, GLenum::GL_UNSIGNED_INT);
return;
}
void GlesSpy::subProgramUniform1uiv(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLsizei count, GLuint* values) {
Slice<GLuint> l_v = slice(values, (uint64_t)((GLsizei)(0L)), (uint64_t)(count));
subProgramUniformv_GLuint__S(observer, call, program, location, l_v, GLenum::GL_UNSIGNED_INT);
return;
}
void GlesSpy::subProgramUniform2i(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLint value0, GLint value1) {
Slice<Vec2i> l_v = make<Vec2i>(1ULL);
observer->write<Vec2i>(l_v, 0ULL, {value0, value1});
subProgramUniformv_Vec2i__S(observer, call, program, location, l_v, GLenum::GL_INT_VEC2);
return;
}
void GlesSpy::subProgramUniform2iv(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLsizei count, GLint* values) {
Slice<Vec2i> l_v = slice((Vec2i*)(values), (uint64_t)((GLsizei)(0L)), (uint64_t)(count));
subProgramUniformv_Vec2i__S(observer, call, program, location, l_v, GLenum::GL_INT_VEC2);
return;
}
void GlesSpy::subProgramUniform3f(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLfloat value0, GLfloat value1, GLfloat value2) {
Slice<Vec3f> l_v = make<Vec3f>(1ULL);
observer->write<Vec3f>(l_v, 0ULL, {value0, value1, value2});
subProgramUniformv_Vec3f__S(observer, call, program, location, l_v, GLenum::GL_FLOAT_VEC3);
return;
}
void GlesSpy::subProgramUniform3fv(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLsizei count, GLfloat* values) {
Slice<Vec3f> l_v = slice((Vec3f*)(values), (uint64_t)((GLsizei)(0L)), (uint64_t)(count));
subProgramUniformv_Vec3f__S(observer, call, program, location, l_v, GLenum::GL_FLOAT_VEC3);
return;
}
void GlesSpy::subProgramUniform3ui(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLuint value0, GLuint value1, GLuint value2) {
Slice<Vec3u> l_v = make<Vec3u>(1ULL);
observer->write<Vec3u>(l_v, 0ULL, {value0, value1, value2});
subProgramUniformv_Vec3u__S(observer, call, program, location, l_v, GLenum::GL_UNSIGNED_INT_VEC3);
return;
}
void GlesSpy::subProgramUniform3uiv(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLsizei count, GLuint* values) {
Slice<Vec3u> l_v = slice((Vec3u*)(values), (uint64_t)((GLsizei)(0L)), (uint64_t)(count));
subProgramUniformv_Vec3u__S(observer, call, program, location, l_v, GLenum::GL_UNSIGNED_INT_VEC3);
return;
}
void GlesSpy::subProgramUniform4i(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLint value0, GLint value1, GLint value2, GLint value3) {
Slice<Vec4i> l_v = make<Vec4i>(1ULL);
observer->write<Vec4i>(l_v, 0ULL, {value0, value1, value2, value3});
subProgramUniformv_Vec4i__S(observer, call, program, location, l_v, GLenum::GL_INT_VEC4);
return;
}
void GlesSpy::subProgramUniform4iv(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLsizei count, GLint* values) {
Slice<Vec4i> l_v = slice((Vec4i*)(values), (uint64_t)((GLsizei)(0L)), (uint64_t)(count));
subProgramUniformv_Vec4i__S(observer, call, program, location, l_v, GLenum::GL_INT_VEC4);
return;
}
void GlesSpy::subProgramUniformMatrix2fv(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLsizei count, GLboolean transpose, GLfloat* values) {
Slice<Mat2f> l_v = slice((Mat2f*)(values), (uint64_t)((GLsizei)(0L)), (uint64_t)(count));
subProgramUniformMatrixv_Mat2f__S(observer, call, program, location, transpose, l_v, GLenum::GL_FLOAT_MAT2);
return;
}
void GlesSpy::subProgramUniformMatrix2x4fv(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLsizei count, GLboolean transpose, GLfloat* values) {
Slice<Mat2x4f> l_v = slice((Mat2x4f*)(values), (uint64_t)((GLsizei)(0L)), (uint64_t)(count));
subProgramUniformMatrixv_Mat2x4f__S(observer, call, program, location, transpose, l_v, GLenum::GL_FLOAT_MAT2x4);
return;
}
void GlesSpy::subProgramUniformMatrix4fv(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLsizei count, GLboolean transpose, GLfloat* values) {
Slice<Mat4f> l_v = slice((Mat4f*)(values), (uint64_t)((GLsizei)(0L)), (uint64_t)(count));
subProgramUniformMatrixv_Mat4f__S(observer, call, program, location, transpose, l_v, GLenum::GL_FLOAT_MAT4);
return;
}
void GlesSpy::subProgramUniformMatrix4x2fv(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLsizei count, GLboolean transpose, GLfloat* values) {
Slice<Mat4x2f> l_v = slice((Mat4x2f*)(values), (uint64_t)((GLsizei)(0L)), (uint64_t)(count));
subProgramUniformMatrixv_Mat4x2f__S(observer, call, program, location, transpose, l_v, GLenum::GL_FLOAT_MAT4x2);
return;
}
void GlesSpy::subUniformMatrix2x4fv(CallObserver* observer, const std::function<void()>& call, UniformLocation location, GLsizei count, GLboolean transpose, GLfloat* values) {
Slice<Mat2x4f> l_v = slice((Mat2x4f*)(values), (uint64_t)((GLsizei)(0L)), (uint64_t)(count));
subUniformMatrixv_Mat2x4f__S(observer, call, location, transpose, l_v, GLenum::GL_FLOAT_MAT2x4);
return;
}
void GlesSpy::subUniformMatrix4x2fv(CallObserver* observer, const std::function<void()>& call, UniformLocation location, GLsizei count, GLboolean transpose, GLfloat* values) {
Slice<Mat4x2f> l_v = slice((Mat4x2f*)(values), (uint64_t)((GLsizei)(0L)), (uint64_t)(count));
subUniformMatrixv_Mat4x2f__S(observer, call, location, transpose, l_v, GLenum::GL_FLOAT_MAT4x2);
return;
}
bool GlesSpy::subVersionGreaterOrEqual(CallObserver* observer, const std::function<void()>& call, std::shared_ptr<Context> ctx, GLint major, GLint minor) {
return ((checkNotNull(ctx).mConstants.mMajorVersion) > (major)) || (((checkNotNull(ctx).mConstants.mMajorVersion) == (major)) && ((checkNotNull(ctx).mConstants.mMinorVersion) >= (minor)));
}
void GlesSpy::subClientWaitSync(CallObserver* observer, const std::function<void()>& call, GLsync sync, uint32_t syncFlags, GLuint64 timeout) {
subSupportsBits(observer, call, syncFlags, GLbitfield::GL_SYNC_FLUSH_COMMANDS_BIT);
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
if (!(checkNotNull(l_ctx).mInstances.mSyncObjects.count(sync) > 0)) {
subGlErrorInvalidValue(observer, call);
}
if ((syncFlags & GLbitfield::GL_SYNC_FLUSH_COMMANDS_BIT) != 0) {
}
(void)timeout;
return;
}
GLboolean GlesSpy::subIsSync(CallObserver* observer, const std::function<void()>& call, GLsync sync) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
return (GLboolean)(checkNotNull(l_ctx).mInstances.mSyncObjects.count(sync) > 0);
}
void GlesSpy::subGetSamplerParameterIiv(CallObserver* observer, const std::function<void()>& call, SamplerId sampler, uint32_t pname, GLint* params) {
subGetSamplerParameterv_GLint(observer, call, sampler, pname, params);
return;
}
void GlesSpy::subGetTexParameterIuiv(CallObserver* observer, const std::function<void()>& call, uint32_t target, uint32_t pname, GLuint* params) {
subGetTexParameter_GLuint(observer, call, target, pname, params);
return;
}
void GlesSpy::subSamplerParameterIiv(CallObserver* observer, const std::function<void()>& call, SamplerId sampler, uint32_t pname, GLint* param) {
subSamplerParameterv_GLint__CP(observer, call, sampler, pname, param);
return;
}
void GlesSpy::subTexBuffer(CallObserver* observer, const std::function<void()>& call, uint32_t target, uint32_t internalformat, BufferId buffer) {
switch (target) {
case GLenum::GL_TEXTURE_BUFFER: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, target);
}
}
switch (internalformat) {
case GLenum::GL_R16: // fall-through...
case GLenum::GL_R16F: // fall-through...
case GLenum::GL_R16I: // fall-through...
case GLenum::GL_R16UI: // fall-through...
case GLenum::GL_R32F: // fall-through...
case GLenum::GL_R32I: // fall-through...
case GLenum::GL_R32UI: // fall-through...
case GLenum::GL_R8: // fall-through...
case GLenum::GL_R8I: // fall-through...
case GLenum::GL_R8UI: // fall-through...
case GLenum::GL_RG16: // fall-through...
case GLenum::GL_RG16F: // fall-through...
case GLenum::GL_RG16I: // fall-through...
case GLenum::GL_RG16UI: // fall-through...
case GLenum::GL_RG32F: // fall-through...
case GLenum::GL_RG32I: // fall-through...
case GLenum::GL_RG32UI: // fall-through...
case GLenum::GL_RG8: // fall-through...
case GLenum::GL_RG8I: // fall-through...
case GLenum::GL_RG8UI: // fall-through...
case GLenum::GL_RGB32F: // fall-through...
case GLenum::GL_RGB32I: // fall-through...
case GLenum::GL_RGB32UI: // fall-through...
case GLenum::GL_RGBA16: // fall-through...
case GLenum::GL_RGBA16F: // fall-through...
case GLenum::GL_RGBA16I: // fall-through...
case GLenum::GL_RGBA16UI: // fall-through...
case GLenum::GL_RGBA32F: // fall-through...
case GLenum::GL_RGBA32I: // fall-through...
case GLenum::GL_RGBA32UI: // fall-through...
case GLenum::GL_RGBA8: // fall-through...
case GLenum::GL_RGBA8I: // fall-through...
case GLenum::GL_RGBA8UI: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, internalformat);
}
}
(void)buffer;
return;
}
void GlesSpy::subTexImage3D(CallObserver* observer, const std::function<void()>& call, uint32_t target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, uint32_t format, uint32_t type, TexturePointer data) {
switch (target) {
case GLenum::GL_TEXTURE_2D_ARRAY: // fall-through...
case GLenum::GL_TEXTURE_3D: {
break;
}
case GLenum::GL_TEXTURE_CUBE_MAP_ARRAY: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
break;
}
default: {
subGlErrorInvalidEnum(observer, call, target);
}
}
subCheckInternalFormat(observer, call, (uint32_t)(internalformat));
switch (format) {
case GLenum::GL_ALPHA: // fall-through...
case GLenum::GL_DEPTH_COMPONENT: // fall-through...
case GLenum::GL_DEPTH_STENCIL: // fall-through...
case GLenum::GL_LUMINANCE: // fall-through...
case GLenum::GL_LUMINANCE_ALPHA: // fall-through...
case GLenum::GL_RED: // fall-through...
case GLenum::GL_RED_INTEGER: // fall-through...
case GLenum::GL_RG: // fall-through...
case GLenum::GL_RGB: // fall-through...
case GLenum::GL_RGBA: // fall-through...
case GLenum::GL_RGBA_INTEGER: // fall-through...
case GLenum::GL_RGB_INTEGER: // fall-through...
case GLenum::GL_RG_INTEGER: {
break;
}
case GLenum::GL_STENCIL_INDEX: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
break;
}
default: {
subGlErrorInvalidEnum(observer, call, format);
}
}
switch (type) {
case GLenum::GL_HALF_FLOAT_OES: {
subRequiresExtension(observer, call, ExtensionId::GL_OES_texture_half_float);
break;
}
case GLenum::GL_BYTE: // fall-through...
case GLenum::GL_FLOAT: // fall-through...
case GLenum::GL_FLOAT_32_UNSIGNED_INT_24_8_REV: // fall-through...
case GLenum::GL_HALF_FLOAT: // fall-through...
case GLenum::GL_INT: // fall-through...
case GLenum::GL_SHORT: // fall-through...
case GLenum::GL_UNSIGNED_BYTE: // fall-through...
case GLenum::GL_UNSIGNED_INT: // fall-through...
case GLenum::GL_UNSIGNED_INT_10F_11F_11F_REV: // fall-through...
case GLenum::GL_UNSIGNED_INT_24_8: // fall-through...
case GLenum::GL_UNSIGNED_INT_2_10_10_10_REV: // fall-through...
case GLenum::GL_UNSIGNED_INT_5_9_9_9_REV: // fall-through...
case GLenum::GL_UNSIGNED_SHORT: // fall-through...
case GLenum::GL_UNSIGNED_SHORT_4_4_4_4: // fall-through...
case GLenum::GL_UNSIGNED_SHORT_5_5_5_1: // fall-through...
case GLenum::GL_UNSIGNED_SHORT_5_6_5: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, type);
}
}
(void)level;
(void)internalformat;
(void)border;
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
if (((data) != (nullptr)) && ((checkNotNull(l_ctx).mBoundBuffers.mPixelUnpackBuffer) == ((BufferId)(0UL)))) {
uint32_t l__res_0 = subImageSize(observer, call, (uint32_t)(width), (uint32_t)(height), format, type);
uint32_t l_size = (l__res_0) * ((uint32_t)(depth));
observer->read(slice((uint8_t*)(data), (uint64_t)(0UL), (uint64_t)(l_size)));
}
return;
}
uint32_t GlesSpy::subCheckWrapParam(CallObserver* observer, const std::function<void()>& call, uint32_t wrap) {
switch (wrap) {
case GLenum::GL_CLAMP_TO_EDGE: // fall-through...
case GLenum::GL_REPEAT: // fall-through...
case GLenum::GL_MIRRORED_REPEAT: // fall-through...
case GLenum::GL_CLAMP_TO_BORDER: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, wrap);
}
}
return wrap;
}
uint32_t GlesSpy::subCheckSwizzleParam(CallObserver* observer, const std::function<void()>& call, uint32_t swizzle) {
switch (swizzle) {
case GLenum::GL_RED: // fall-through...
case GLenum::GL_GREEN: // fall-through...
case GLenum::GL_BLUE: // fall-through...
case GLenum::GL_ALPHA: // fall-through...
case GLenum::GL_ZERO: // fall-through...
case GLenum::GL_ONE: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, swizzle);
}
}
return swizzle;
}
void GlesSpy::subTexParameterIuiv(CallObserver* observer, const std::function<void()>& call, uint32_t target, uint32_t pname, GLuint* params) {
subTexParameterv_GLuint__CP(observer, call, target, pname, params);
return;
}
void GlesSpy::subTexStorage3D(CallObserver* observer, const std::function<void()>& call, uint32_t target, GLsizei levels, uint32_t internalformat, GLsizei width, GLsizei height, GLsizei depth) {
switch (target) {
case GLenum::GL_TEXTURE_2D_ARRAY: // fall-through...
case GLenum::GL_TEXTURE_3D: {
break;
}
case GLenum::GL_TEXTURE_CUBE_MAP_ARRAY: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
break;
}
default: {
subGlErrorInvalidEnum(observer, call, target);
}
}
switch (internalformat) {
case GLenum::GL_COMPRESSED_R11_EAC: // fall-through...
case GLenum::GL_COMPRESSED_RG11_EAC: // fall-through...
case GLenum::GL_COMPRESSED_RGB8_ETC2: // fall-through...
case GLenum::GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2: // fall-through...
case GLenum::GL_COMPRESSED_RGBA8_ETC2_EAC: // fall-through...
case GLenum::GL_COMPRESSED_SIGNED_R11_EAC: // fall-through...
case GLenum::GL_COMPRESSED_SIGNED_RG11_EAC: // fall-through...
case GLenum::GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC: // fall-through...
case GLenum::GL_COMPRESSED_SRGB8_ETC2: // fall-through...
case GLenum::GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2: // fall-through...
case GLenum::GL_DEPTH24_STENCIL8: // fall-through...
case GLenum::GL_DEPTH32F_STENCIL8: // fall-through...
case GLenum::GL_DEPTH_COMPONENT16: // fall-through...
case GLenum::GL_DEPTH_COMPONENT24: // fall-through...
case GLenum::GL_DEPTH_COMPONENT32F: // fall-through...
case GLenum::GL_R11F_G11F_B10F: // fall-through...
case GLenum::GL_R16F: // fall-through...
case GLenum::GL_R16I: // fall-through...
case GLenum::GL_R16UI: // fall-through...
case GLenum::GL_R32F: // fall-through...
case GLenum::GL_R32I: // fall-through...
case GLenum::GL_R32UI: // fall-through...
case GLenum::GL_R8: // fall-through...
case GLenum::GL_R8I: // fall-through...
case GLenum::GL_R8UI: // fall-through...
case GLenum::GL_R8_SNORM: // fall-through...
case GLenum::GL_RG16F: // fall-through...
case GLenum::GL_RG16I: // fall-through...
case GLenum::GL_RG16UI: // fall-through...
case GLenum::GL_RG32F: // fall-through...
case GLenum::GL_RG32I: // fall-through...
case GLenum::GL_RG32UI: // fall-through...
case GLenum::GL_RG8: // fall-through...
case GLenum::GL_RG8I: // fall-through...
case GLenum::GL_RG8UI: // fall-through...
case GLenum::GL_RG8_SNORM: // fall-through...
case GLenum::GL_RGB10_A2: // fall-through...
case GLenum::GL_RGB10_A2UI: // fall-through...
case GLenum::GL_RGB16F: // fall-through...
case GLenum::GL_RGB16I: // fall-through...
case GLenum::GL_RGB16UI: // fall-through...
case GLenum::GL_RGB32F: // fall-through...
case GLenum::GL_RGB32I: // fall-through...
case GLenum::GL_RGB32UI: // fall-through...
case GLenum::GL_RGB565: // fall-through...
case GLenum::GL_RGB5_A1: // fall-through...
case GLenum::GL_RGB8: // fall-through...
case GLenum::GL_RGB8I: // fall-through...
case GLenum::GL_RGB8UI: // fall-through...
case GLenum::GL_RGB8_SNORM: // fall-through...
case GLenum::GL_RGB9_E5: // fall-through...
case GLenum::GL_RGBA16F: // fall-through...
case GLenum::GL_RGBA16I: // fall-through...
case GLenum::GL_RGBA16UI: // fall-through...
case GLenum::GL_RGBA32F: // fall-through...
case GLenum::GL_RGBA32I: // fall-through...
case GLenum::GL_RGBA32UI: // fall-through...
case GLenum::GL_RGBA4: // fall-through...
case GLenum::GL_RGBA8: // fall-through...
case GLenum::GL_RGBA8I: // fall-through...
case GLenum::GL_RGBA8UI: // fall-through...
case GLenum::GL_RGBA8_SNORM: // fall-through...
case GLenum::GL_SRGB8: // fall-through...
case GLenum::GL_SRGB8_ALPHA8: {
break;
}
case GLenum::GL_COMPRESSED_RGBA_ASTC_10x10: // fall-through...
case GLenum::GL_COMPRESSED_RGBA_ASTC_10x5: // fall-through...
case GLenum::GL_COMPRESSED_RGBA_ASTC_10x6: // fall-through...
case GLenum::GL_COMPRESSED_RGBA_ASTC_10x8: // fall-through...
case GLenum::GL_COMPRESSED_RGBA_ASTC_12x10: // fall-through...
case GLenum::GL_COMPRESSED_RGBA_ASTC_12x12: // fall-through...
case GLenum::GL_COMPRESSED_RGBA_ASTC_4x4: // fall-through...
case GLenum::GL_COMPRESSED_RGBA_ASTC_5x4: // fall-through...
case GLenum::GL_COMPRESSED_RGBA_ASTC_5x5: // fall-through...
case GLenum::GL_COMPRESSED_RGBA_ASTC_6x5: // fall-through...
case GLenum::GL_COMPRESSED_RGBA_ASTC_6x6: // fall-through...
case GLenum::GL_COMPRESSED_RGBA_ASTC_8x5: // fall-through...
case GLenum::GL_COMPRESSED_RGBA_ASTC_8x6: // fall-through...
case GLenum::GL_COMPRESSED_RGBA_ASTC_8x8: // fall-through...
case GLenum::GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10: // fall-through...
case GLenum::GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5: // fall-through...
case GLenum::GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6: // fall-through...
case GLenum::GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8: // fall-through...
case GLenum::GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10: // fall-through...
case GLenum::GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12: // fall-through...
case GLenum::GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4: // fall-through...
case GLenum::GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4: // fall-through...
case GLenum::GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5: // fall-through...
case GLenum::GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5: // fall-through...
case GLenum::GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6: // fall-through...
case GLenum::GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5: // fall-through...
case GLenum::GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6: // fall-through...
case GLenum::GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8: // fall-through...
case GLenum::GL_STENCIL_INDEX8: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
break;
}
default: {
subGlErrorInvalidEnum(observer, call, internalformat);
}
}
(void)levels;
(void)width;
(void)height;
(void)depth;
return;
}
void GlesSpy::subTexSubImage3D(CallObserver* observer, const std::function<void()>& call, uint32_t target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, uint32_t format, uint32_t type, TexturePointer data) {
switch (target) {
case GLenum::GL_TEXTURE_2D_ARRAY: // fall-through...
case GLenum::GL_TEXTURE_3D: {
break;
}
case GLenum::GL_TEXTURE_CUBE_MAP_ARRAY: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
break;
}
default: {
subGlErrorInvalidEnum(observer, call, target);
}
}
switch (format) {
case GLenum::GL_ALPHA: // fall-through...
case GLenum::GL_DEPTH_COMPONENT: // fall-through...
case GLenum::GL_DEPTH_STENCIL: // fall-through...
case GLenum::GL_LUMINANCE: // fall-through...
case GLenum::GL_LUMINANCE_ALPHA: // fall-through...
case GLenum::GL_RED: // fall-through...
case GLenum::GL_RED_INTEGER: // fall-through...
case GLenum::GL_RG: // fall-through...
case GLenum::GL_RGB: // fall-through...
case GLenum::GL_RGBA: // fall-through...
case GLenum::GL_RGBA_INTEGER: // fall-through...
case GLenum::GL_RGB_INTEGER: // fall-through...
case GLenum::GL_RG_INTEGER: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, format);
}
}
switch (type) {
case GLenum::GL_HALF_FLOAT_OES: {
subRequiresExtension(observer, call, ExtensionId::GL_OES_texture_half_float);
break;
}
case GLenum::GL_BYTE: // fall-through...
case GLenum::GL_FLOAT: // fall-through...
case GLenum::GL_FLOAT_32_UNSIGNED_INT_24_8_REV: // fall-through...
case GLenum::GL_HALF_FLOAT: // fall-through...
case GLenum::GL_INT: // fall-through...
case GLenum::GL_SHORT: // fall-through...
case GLenum::GL_UNSIGNED_BYTE: // fall-through...
case GLenum::GL_UNSIGNED_INT: // fall-through...
case GLenum::GL_UNSIGNED_INT_10F_11F_11F_REV: // fall-through...
case GLenum::GL_UNSIGNED_INT_24_8: // fall-through...
case GLenum::GL_UNSIGNED_INT_2_10_10_10_REV: // fall-through...
case GLenum::GL_UNSIGNED_INT_5_9_9_9_REV: // fall-through...
case GLenum::GL_UNSIGNED_SHORT: // fall-through...
case GLenum::GL_UNSIGNED_SHORT_4_4_4_4: // fall-through...
case GLenum::GL_UNSIGNED_SHORT_5_5_5_1: // fall-through...
case GLenum::GL_UNSIGNED_SHORT_5_6_5: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, type);
}
}
(void)level;
(void)xoffset;
(void)yoffset;
(void)zoffset;
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
if (((data) != (nullptr)) && ((checkNotNull(l_ctx).mBoundBuffers.mPixelUnpackBuffer) == ((BufferId)(0UL)))) {
uint32_t l__res_0 = subImageSize(observer, call, (uint32_t)(width), (uint32_t)(height), format, type);
uint32_t l_size = (l__res_0) * ((uint32_t)(depth));
observer->read(slice((uint8_t*)(data), (uint64_t)(0UL), (uint64_t)(l_size)));
}
return;
}
std::shared_ptr<TransformFeedback> GlesSpy::subGetBoundTransformFeedback(CallObserver* observer, const std::function<void()>& call) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
return findOrZero(checkNotNull(l_ctx).mInstances.mTransformFeedbacks, checkNotNull(l_ctx).mBoundTransformFeedback);
}
std::shared_ptr<VertexArray> GlesSpy::subNewVertexArray(CallObserver* observer, const std::function<void()>& call, std::shared_ptr<Context> ctx) {
std::shared_ptr<VertexArray> l_array = std::shared_ptr<VertexArray>(new VertexArray(VertexBufferBindingIndexToVertexBufferBinding__R(), AttributeLocationToVertexAttributeArray__R(), (BufferId)(0UL), ""));
bool l__res_0 = subVersionGreaterOrEqual(observer, call, ctx, (GLint)(3L), (GLint)(1L));
if (l__res_0) {
for (VertexBufferBindingIndex l_i = (VertexBufferBindingIndex)(0UL); l_i < (VertexBufferBindingIndex)(checkNotNull(ctx).mConstants.mMaxVertexAttribBindings); ++l_i) {
checkNotNull(l_array).mVertexBufferBindings[l_i] = std::shared_ptr<VertexBufferBinding>(new VertexBufferBinding((GLintptr)(0L), (GLsizei)(16L), (GLuint)(0UL), (BufferId)(0UL)));
}
} else {
for (VertexBufferBindingIndex l_i = (VertexBufferBindingIndex)(0UL); l_i < (VertexBufferBindingIndex)(checkNotNull(ctx).mConstants.mMaxVertexAttribs); ++l_i) {
checkNotNull(l_array).mVertexBufferBindings[l_i] = std::shared_ptr<VertexBufferBinding>(new VertexBufferBinding((GLintptr)(0L), (GLsizei)(16L), (GLuint)(0UL), (BufferId)(0UL)));
}
}
for (AttributeLocation l_i = (AttributeLocation)(0UL); l_i < (AttributeLocation)(checkNotNull(ctx).mConstants.mMaxVertexAttribs); ++l_i) {
checkNotNull(l_array).mVertexAttributeArrays[l_i] = std::shared_ptr<VertexAttributeArray>(new VertexAttributeArray(GLbooleanLabels::GL_FALSE, (GLint)(4L), (GLsizei)(0L), GLenum::GL_FLOAT, GLbooleanLabels::GL_FALSE, GLbooleanLabels::GL_FALSE, (GLuint)(0UL), nullptr, (GLuint)(0UL), (VertexBufferBindingIndex)(l_i), (GLuint)(0UL)));
}
return l_array;
}
GLint GlesSpy::subVertexAttribTypeSize(CallObserver* observer, const std::function<void()>& call, uint32_t type) {
return /* switch(type) */
/* case GLenum::GL_BYTE, GLenum::GL_UNSIGNED_BYTE: */(((type) == (GLenum::GL_BYTE))|| ((type) == (GLenum::GL_UNSIGNED_BYTE))) ? ((GLint)(1L)) :
/* case GLenum::GL_SHORT, GLenum::GL_UNSIGNED_SHORT, GLenum::GL_HALF_FLOAT, GLenum::GL_HALF_FLOAT_OES: */(((type) == (GLenum::GL_SHORT))|| ((type) == (GLenum::GL_UNSIGNED_SHORT))|| ((type) == (GLenum::GL_HALF_FLOAT))|| ((type) == (GLenum::GL_HALF_FLOAT_OES))) ? ((GLint)(2L)) :
/* case GLenum::GL_INT, GLenum::GL_UNSIGNED_INT, GLenum::GL_FLOAT, GLenum::GL_FIXED: */(((type) == (GLenum::GL_INT))|| ((type) == (GLenum::GL_UNSIGNED_INT))|| ((type) == (GLenum::GL_FLOAT))|| ((type) == (GLenum::GL_FIXED))) ? ((GLint)(4L)) :
/* case GLenum::GL_INT_2_10_10_10_REV, GLenum::GL_UNSIGNED_INT_2_10_10_10_REV: */(((type) == (GLenum::GL_INT_2_10_10_10_REV))|| ((type) == (GLenum::GL_UNSIGNED_INT_2_10_10_10_REV))) ? ((GLint)(4L)) :
/* default: */ 0;
}
void GlesSpy::subBindVertexBuffer(CallObserver* observer, const std::function<void()>& call, std::shared_ptr<Context> ctx, VertexBufferBindingIndex binding_index, BufferId buffer, GLintptr offset, GLsizei stride) {
if ((offset) < ((GLintptr)(0L))) {
subGlErrorInvalidValueMsg(observer, call, "ERR_VALUE_NEG");
}
if ((stride) < ((GLsizei)(0L))) {
subGlErrorInvalidValueMsg(observer, call, "ERR_VALUE_NEG");
}
bool l__res_0 = subVersionGreaterOrEqual(observer, call, ctx, (GLint)(3L), (GLint)(1L));
if (l__res_0) {
if (((int64_t)(binding_index)) >= ((int64_t)(checkNotNull(ctx).mConstants.mMaxVertexAttribBindings))) {
subGlErrorInvalidValueMsg(observer, call, "ERR_VALUE_GE_LIMIT");
}
if (((int64_t)(stride)) >= ((int64_t)(checkNotNull(ctx).mConstants.mMaxVertexAttribStride))) {
subGlErrorInvalidValueMsg(observer, call, "ERR_VALUE_GE_LIMIT");
}
}
if (!(checkNotNull(ctx).mInstances.mBuffers.count(buffer) > 0)) {
checkNotNull(ctx).mInstances.mBuffers[buffer] = std::shared_ptr<Buffer>(new Buffer(Slice<uint8_t>(), (GLsizeiptr)(0L), GLenum::GL_STATIC_DRAW, 0, GLbooleanLabels::GL_FALSE, nullptr, (GLintptr)(0L), (GLsizeiptr)(0L), ""));
}
std::shared_ptr<VertexArray> l_vao = findOrZero(checkNotNull(ctx).mInstances.mVertexArrays, checkNotNull(ctx).mBoundVertexArray);
std::shared_ptr<VertexBufferBinding> l_binding = findOrZero(checkNotNull(l_vao).mVertexBufferBindings, binding_index);
checkNotNull(l_binding).mBuffer = buffer;
checkNotNull(l_binding).mOffset = offset;
checkNotNull(l_binding).mStride = stride;
return;
}
void GlesSpy::subDeleteVertexArrays(CallObserver* observer, const std::function<void()>& call, GLsizei count, VertexArrayId* arrays) {
if ((count) < ((GLsizei)(0L))) {
subGlErrorInvalidValue(observer, call);
}
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
Slice<VertexArrayId> l_a = slice(arrays, (uint64_t)((GLsizei)(0L)), (uint64_t)(count));
for (GLsizei l_i = (GLsizei)(0L); l_i < count; ++l_i) {
VertexArrayId l_id = observer->read(l_a, (uint64_t)(l_i));
if ((l_id) != ((VertexArrayId)(0UL))) {
if (checkNotNull(l_ctx).mInstances.mVertexArrays.count(l_id) > 0) {
checkNotNull(l_ctx).mInstances.mVertexArrays.erase(l_id);
if ((checkNotNull(l_ctx).mBoundVertexArray) == (l_id)) {
checkNotNull(l_ctx).mBoundVertexArray = (VertexArrayId)(0UL);
}
}
}
}
return;
}
GLboolean GlesSpy::subIsVertexArray(CallObserver* observer, const std::function<void()>& call, VertexArrayId array) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
return (GLboolean)(((array) != ((VertexArrayId)(0UL))) && (checkNotNull(l_ctx).mInstances.mVertexArrays.count(array) > 0));
}
void GlesSpy::subVertexAttribBinding(CallObserver* observer, const std::function<void()>& call, std::shared_ptr<Context> ctx, AttributeLocation index, VertexBufferBindingIndex binding_index) {
bool l__res_0 = subVersionGreaterOrEqual(observer, call, ctx, (GLint)(3L), (GLint)(1L));
if (l__res_0) {
if (((int64_t)(index)) > ((int64_t)(checkNotNull(ctx).mConstants.mMaxVertexAttribs))) {
subGlErrorInvalidValueMsg(observer, call, "ERR_VALUE_GE_LIMIT");
}
if (((int64_t)(binding_index)) > ((int64_t)(checkNotNull(ctx).mConstants.mMaxVertexAttribBindings))) {
subGlErrorInvalidValueMsg(observer, call, "ERR_VALUE_GE_LIMIT");
}
}
std::shared_ptr<VertexArray> l_vao = findOrZero(checkNotNull(ctx).mInstances.mVertexArrays, checkNotNull(ctx).mBoundVertexArray);
checkNotNull(findOrZero(checkNotNull(l_vao).mVertexAttributeArrays, index)).mBinding = binding_index;
return;
}
void GlesSpy::subVertexAttribFormat(CallObserver* observer, const std::function<void()>& call, std::shared_ptr<Context> ctx, AttributeLocation index, GLint size, uint32_t type, GLboolean normalized, GLuint relativeOffset, bool integer) {
if (((int64_t)(index)) >= ((int64_t)(checkNotNull(ctx).mConstants.mMaxVertexAttribs))) {
subGlErrorInvalidValueMsg(observer, call, "ERR_VALUE_GE_LIMIT");
}
if (!((((GLint)(1L)) <= (size)) && ((size) <= ((GLint)(4L))))) {
subGlErrorInvalidValue(observer, call);
}
if (integer) {
switch (type) {
case GLenum::GL_BYTE: // fall-through...
case GLenum::GL_INT: // fall-through...
case GLenum::GL_SHORT: // fall-through...
case GLenum::GL_UNSIGNED_BYTE: // fall-through...
case GLenum::GL_UNSIGNED_INT: // fall-through...
case GLenum::GL_UNSIGNED_SHORT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
break;
}
default: {
subGlErrorInvalidEnum(observer, call, type);
}
}
} else {
switch (type) {
case GLenum::GL_BYTE: // fall-through...
case GLenum::GL_FIXED: // fall-through...
case GLenum::GL_FLOAT: // fall-through...
case GLenum::GL_SHORT: // fall-through...
case GLenum::GL_UNSIGNED_BYTE: // fall-through...
case GLenum::GL_UNSIGNED_SHORT: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
break;
}
case GLenum::GL_HALF_FLOAT_OES: {
subRequiresExtension(observer, call, ExtensionId::GL_OES_vertex_half_float);
break;
}
case GLenum::GL_HALF_FLOAT: // fall-through...
case GLenum::GL_INT: // fall-through...
case GLenum::GL_UNSIGNED_INT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
break;
}
case GLenum::GL_INT_2_10_10_10_REV: // fall-through...
case GLenum::GL_UNSIGNED_INT_2_10_10_10_REV: {
if ((size) != ((GLint)(4L))) {
subGlErrorInvalidOperation(observer, call);
}
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
break;
}
default: {
subGlErrorInvalidEnum(observer, call, type);
}
}
}
bool l__res_0 = subVersionGreaterOrEqual(observer, call, ctx, (GLint)(3L), (GLint)(1L));
if (l__res_0) {
if ((relativeOffset) > ((GLuint)(checkNotNull(ctx).mConstants.mMaxVertexAttribRelativeOffset))) {
subGlErrorInvalidValue(observer, call);
}
}
std::shared_ptr<VertexArray> l_vao = findOrZero(checkNotNull(ctx).mInstances.mVertexArrays, checkNotNull(ctx).mBoundVertexArray);
std::shared_ptr<VertexAttributeArray> l_format = findOrZero(checkNotNull(l_vao).mVertexAttributeArrays, index);
checkNotNull(l_format).mSize = size;
checkNotNull(l_format).mType = type;
if (!(integer)) {
checkNotNull(l_format).mNormalized = normalized;
}
checkNotNull(l_format).mRelativeOffset = relativeOffset;
checkNotNull(l_format).mInteger = (GLboolean)(integer);
return;
}
void GlesSpy::subVertexAttribI(CallObserver* observer, const std::function<void()>& call, AttributeLocation location, Vec4i value) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
if ((location) >= ((AttributeLocation)(checkNotNull(l_ctx).mConstants.mMaxVertexAttribs))) {
subGlErrorInvalidValue(observer, call);
}
Slice<Vec4i> l_vals = make<Vec4i>(1ULL);
observer->write<Vec4i>(l_vals, 0ULL, value);
checkNotNull(l_ctx).mVertexAttributes[location] = VertexAttributeValue(l_vals.as<uint8_t>());
return;
}
void GlesSpy::subVertexAttribPointer(CallObserver* observer, const std::function<void()>& call, std::shared_ptr<Context> ctx, AttributeLocation index, GLint size, uint32_t type, GLboolean normalized, GLsizei stride, VertexPointer pointer, bool integer) {
BufferId l_boundArrayBuffer = checkNotNull(ctx).mBoundBuffers.mArrayBuffer;
if (((checkNotNull(ctx).mBoundVertexArray) != ((VertexArrayId)(0UL))) && (((l_boundArrayBuffer) == ((BufferId)(0UL))) && ((pointer) != (nullptr)))) {
subGlErrorInvalidOperation(observer, call);
}
subVertexAttribFormat(observer, call, ctx, index, size, type, normalized, (GLuint)(0UL), integer);
VertexBufferBindingIndex l_binding_index = (VertexBufferBindingIndex)(index);
subVertexAttribBinding(observer, call, ctx, index, l_binding_index);
GLint l_vertexTypeSize = subVertexAttribTypeSize(observer, call, type);
GLsizei l_effectiveStride = /* switch((stride) != ((GLsizei)(0L))) */
/* case true: */((((stride) != ((GLsizei)(0L))) == (true))) ? (stride) :
/* case false: */((((stride) != ((GLsizei)(0L))) == (false))) ? ((GLsizei)((l_vertexTypeSize) * (size))) :
/* default: */ 0;
std::shared_ptr<VertexArray> l_vao = findOrZero(checkNotNull(ctx).mInstances.mVertexArrays, checkNotNull(ctx).mBoundVertexArray);
checkNotNull(findOrZero(checkNotNull(l_vao).mVertexAttributeArrays, index)).mStride = stride;
checkNotNull(findOrZero(checkNotNull(l_vao).mVertexAttributeArrays, index)).mPointer = pointer;
if (((checkNotNull(ctx).mBoundVertexArray) == ((VertexArrayId)(0UL))) && ((l_boundArrayBuffer) == ((BufferId)(0UL)))) {
subBindVertexBuffer(observer, call, ctx, l_binding_index, (BufferId)(0UL), (GLintptr)(0L), l_effectiveStride);
} else {
GLintptr l_offset = (GLintptr)((uint64_t)(pointer));
subBindVertexBuffer(observer, call, ctx, l_binding_index, l_boundArrayBuffer, l_offset, l_effectiveStride);
}
return;
}
void GlesSpy::subMinRequiredVersion(CallObserver* observer, const std::function<void()>& call, GLint requiredMajor, GLint requiredMinor) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
GLint l_major = checkNotNull(l_ctx).mConstants.mMajorVersion;
GLint l_minor = checkNotNull(l_ctx).mConstants.mMinorVersion;
if (((l_major) < (requiredMajor)) || (((l_major) == (requiredMajor)) && ((l_minor) < (requiredMinor)))) {
subGlErrorInvalidOperationMsg(observer, call, "ERR_WRONG_CONTEXT_VERSION");
}
return;
}
void GlesSpy::subRequiresExtension(CallObserver* observer, const std::function<void()>& call, uint32_t ext) {
return;
}
void GlesSpy::subRequiresExtension2(CallObserver* observer, const std::function<void()>& call, uint32_t ext, uint32_t ext2) {
return;
}
void GlesSpy::subGlErrorInvalidEnum(CallObserver* observer, const std::function<void()>& call, uint32_t param) {
onGlError(observer, GLenum::GL_INVALID_ENUM);
(void)newMsg(observer, Severity::SEVERITY_ERROR, "ERR_INVALID_ENUM_VALUE");
abort();
return;
}
void GlesSpy::subGlErrorInvalidValue(CallObserver* observer, const std::function<void()>& call) {
onGlError(observer, GLenum::GL_INVALID_VALUE);
(void)newMsg(observer, Severity::SEVERITY_ERROR, "ERR_INVALID_VALUE");
abort();
return;
}
void GlesSpy::subGlErrorInvalidOperation(CallObserver* observer, const std::function<void()>& call) {
subGlErrorInvalidOperationMsg(observer, call, "ERR_INVALID_OPERATION");
return;
}
std::shared_ptr<Context> GlesSpy::subGetContext(CallObserver* observer, const std::function<void()>& call) {
std::shared_ptr<Context> l_context = findOrZero(this->Contexts, this->CurrentThread);
if ((l_context) == (std::shared_ptr<Context>())) {
(void)newMsg(observer, Severity::SEVERITY_ERROR, "ERR_NO_CONTEXT_BOUND");
abort();
return std::shared_ptr<Context>();
}
return l_context;
}
void GlesSpy::subSetContext(CallObserver* observer, const std::function<void()>& call, std::shared_ptr<Context> context) {
this->Contexts[this->CurrentThread] = context;
return;
}
std::shared_ptr<Context> GlesSpy::subCreateContext(CallObserver* observer, const std::function<void()>& call) {
ContextID l_identifier = this->NextContextID;
this->NextContextID = (this->NextContextID) + ((ContextID)(1UL));
std::shared_ptr<Context> l_ctx = std::shared_ptr<Context>(new Context(0, ContextCreationInfo(), DebugState(), RasterizationState(), FragmentOperationsState(), FramebufferState(), GLenumToFramebufferId(), GLenumToRenderbufferId(), BufferBindings(), 0, 0, 0, AttributeLocationToVertexAttributeValue(), GLenumToTextureUnit__R(), GLuintToImageUnit(), GLenum::GL_TEXTURE0, PixelStorageState(), MiscellaneousState(), GLenumToQueryId(), Objects(), Constants()));
checkNotNull(l_ctx).mIdentifier = l_identifier;
return l_ctx;
}
void GlesSpy::subApplyDynamicContextState(CallObserver* observer, const std::function<void()>& call, std::shared_ptr<Context> ctx, std::shared_ptr<DynamicContextState> dynamicState) {
if ((dynamicState) != (std::shared_ptr<DynamicContextState>())) {
std::shared_ptr<Framebuffer> l_backbuffer = findOrZero(checkNotNull(ctx).mInstances.mFramebuffers, (FramebufferId)(0UL));
RenderbufferId l_color_id = (RenderbufferId)(findOrZero(checkNotNull(l_backbuffer).mAttachments, GLenum::GL_COLOR_ATTACHMENT0).mObjectName);
RenderbufferId l_depth_id = (RenderbufferId)(findOrZero(checkNotNull(l_backbuffer).mAttachments, GLenum::GL_DEPTH_ATTACHMENT).mObjectName);
RenderbufferId l_stencil_id = (RenderbufferId)(findOrZero(checkNotNull(l_backbuffer).mAttachments, GLenum::GL_STENCIL_ATTACHMENT).mObjectName);
std::shared_ptr<Renderbuffer> l_color_buffer = findOrZero(checkNotNull(ctx).mInstances.mRenderbuffers, l_color_id);
checkNotNull(l_color_buffer).mWidth = checkNotNull(dynamicState).mBackbufferWidth;
checkNotNull(l_color_buffer).mHeight = checkNotNull(dynamicState).mBackbufferHeight;
checkNotNull(l_color_buffer).mInternalFormat = checkNotNull(dynamicState).mBackbufferColorFmt;
checkNotNull(ctx).mInstances.mRenderbuffers[l_color_id] = l_color_buffer;
std::shared_ptr<Renderbuffer> l_depth_buffer = findOrZero(checkNotNull(ctx).mInstances.mRenderbuffers, l_depth_id);
checkNotNull(l_depth_buffer).mWidth = checkNotNull(dynamicState).mBackbufferWidth;
checkNotNull(l_depth_buffer).mHeight = checkNotNull(dynamicState).mBackbufferHeight;
checkNotNull(l_depth_buffer).mInternalFormat = checkNotNull(dynamicState).mBackbufferDepthFmt;
checkNotNull(ctx).mInstances.mRenderbuffers[l_depth_id] = l_depth_buffer;
std::shared_ptr<Renderbuffer> l_stencil_buffer = findOrZero(checkNotNull(ctx).mInstances.mRenderbuffers, l_stencil_id);
checkNotNull(l_stencil_buffer).mWidth = checkNotNull(dynamicState).mBackbufferWidth;
checkNotNull(l_stencil_buffer).mHeight = checkNotNull(dynamicState).mBackbufferHeight;
checkNotNull(l_stencil_buffer).mInternalFormat = checkNotNull(dynamicState).mBackbufferStencilFmt;
checkNotNull(ctx).mInstances.mRenderbuffers[l_stencil_id] = l_stencil_buffer;
if (checkNotNull(dynamicState).mResetViewportScissor) {
checkNotNull(ctx).mFragmentOperations.mScissor.mBox.mWidth = checkNotNull(dynamicState).mBackbufferWidth;
checkNotNull(ctx).mFragmentOperations.mScissor.mBox.mHeight = checkNotNull(dynamicState).mBackbufferHeight;
checkNotNull(ctx).mRasterization.mViewport.mWidth = checkNotNull(dynamicState).mBackbufferWidth;
checkNotNull(ctx).mRasterization.mViewport.mHeight = checkNotNull(dynamicState).mBackbufferHeight;
}
checkNotNull(ctx).mInfo.mPreserveBuffersOnSwap = checkNotNull(dynamicState).mPreserveBuffersOnSwap;
}
return;
}
uint32_t GlesSpy::subIndexSize(CallObserver* observer, const std::function<void()>& call, uint32_t indices_type) {
return /* switch(indices_type) */
/* case GLenum::GL_UNSIGNED_BYTE: */(((indices_type) == (GLenum::GL_UNSIGNED_BYTE))) ? (1UL) :
/* case GLenum::GL_UNSIGNED_SHORT: */(((indices_type) == (GLenum::GL_UNSIGNED_SHORT))) ? (2UL) :
/* case GLenum::GL_UNSIGNED_INT: */(((indices_type) == (GLenum::GL_UNSIGNED_INT))) ? (4UL) :
/* default: */ 0;
}
void GlesSpy::subErrorGLES10notSupported(CallObserver* observer, const std::function<void()>& call) {
onGlError(observer, GLenum::GL_INVALID_OPERATION);
abort();
return;
}
void GlesSpy::subGetnUniformfv_GLint__P(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLsizei bufSize, GLint* values) {
(void)program;
(void)location;
observer->write(slice((char*)(values), (uint64_t)((GLsizei)(0L)), (uint64_t)(bufSize)));
return;
}
void GlesSpy::subProgramUniformv_GLfloat__S(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, Slice<GLfloat> values, uint32_t type) {
subSetProgramUniform(observer, call, program, location, values.as<uint8_t>(), type);
return;
}
void GlesSpy::subProgramUniformv_GLuint__S(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, Slice<GLuint> values, uint32_t type) {
subSetProgramUniform(observer, call, program, location, values.as<uint8_t>(), type);
return;
}
void GlesSpy::subProgramUniformv_Vec2i__S(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, Slice<Vec2i> values, uint32_t type) {
subSetProgramUniform(observer, call, program, location, values.as<uint8_t>(), type);
return;
}
void GlesSpy::subProgramUniformv_Vec2u__S(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, Slice<Vec2u> values, uint32_t type) {
subSetProgramUniform(observer, call, program, location, values.as<uint8_t>(), type);
return;
}
void GlesSpy::subProgramUniformv_Vec3f__S(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, Slice<Vec3f> values, uint32_t type) {
subSetProgramUniform(observer, call, program, location, values.as<uint8_t>(), type);
return;
}
void GlesSpy::subProgramUniformv_Vec4i__S(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, Slice<Vec4i> values, uint32_t type) {
subSetProgramUniform(observer, call, program, location, values.as<uint8_t>(), type);
return;
}
void GlesSpy::subProgramUniformv_Vec4u__S(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, Slice<Vec4u> values, uint32_t type) {
subSetProgramUniform(observer, call, program, location, values.as<uint8_t>(), type);
return;
}
void GlesSpy::subProgramUniformMatrixv_Mat2f__S(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLboolean transpose, Slice<Mat2f> values, uint32_t type) {
(void)transpose;
subSetProgramUniform(observer, call, program, location, values.as<uint8_t>(), type);
return;
}
void GlesSpy::subProgramUniformMatrixv_Mat2x4f__S(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLboolean transpose, Slice<Mat2x4f> values, uint32_t type) {
(void)transpose;
subSetProgramUniform(observer, call, program, location, values.as<uint8_t>(), type);
return;
}
void GlesSpy::subProgramUniformMatrixv_Mat4f__S(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLboolean transpose, Slice<Mat4f> values, uint32_t type) {
(void)transpose;
subSetProgramUniform(observer, call, program, location, values.as<uint8_t>(), type);
return;
}
void GlesSpy::subProgramUniformMatrixv_Mat4x2f__S(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLboolean transpose, Slice<Mat4x2f> values, uint32_t type) {
(void)transpose;
subSetProgramUniform(observer, call, program, location, values.as<uint8_t>(), type);
return;
}
void GlesSpy::subUniformMatrixv_Mat2x4f__S(CallObserver* observer, const std::function<void()>& call, UniformLocation location, GLboolean transpose, Slice<Mat2x4f> values, uint32_t type) {
(void)transpose;
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
subSetProgramUniform(observer, call, checkNotNull(l_ctx).mBoundProgram, location, values.as<uint8_t>(), type);
return;
}
void GlesSpy::subUniformMatrixv_Mat4x2f__S(CallObserver* observer, const std::function<void()>& call, UniformLocation location, GLboolean transpose, Slice<Mat4x2f> values, uint32_t type) {
(void)transpose;
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
subSetProgramUniform(observer, call, checkNotNull(l_ctx).mBoundProgram, location, values.as<uint8_t>(), type);
return;
}
void GlesSpy::subGetSamplerParameterv_GLuint(CallObserver* observer, const std::function<void()>& call, SamplerId sampler, uint32_t pname, GLuint* params) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
std::shared_ptr<Sampler> l_s = findOrZero(checkNotNull(l_ctx).mInstances.mSamplers, sampler);
switch (pname) {
case GLenum::GL_TEXTURE_COMPARE_FUNC: {
observer->write<GLuint>(slice(params, 0ULL, 1ULL), 0ULL, (GLuint)(checkNotNull(l_s).mCompareFunc));
break;
}
case GLenum::GL_TEXTURE_COMPARE_MODE: {
observer->write<GLuint>(slice(params, 0ULL, 1ULL), 0ULL, (GLuint)(checkNotNull(l_s).mCompareMode));
break;
}
case GLenum::GL_TEXTURE_MIN_FILTER: {
observer->write<GLuint>(slice(params, 0ULL, 1ULL), 0ULL, (GLuint)(checkNotNull(l_s).mMinFilter));
break;
}
case GLenum::GL_TEXTURE_MAG_FILTER: {
observer->write<GLuint>(slice(params, 0ULL, 1ULL), 0ULL, (GLuint)(checkNotNull(l_s).mMagFilter));
break;
}
case GLenum::GL_TEXTURE_MIN_LOD: {
observer->write<GLuint>(slice(params, 0ULL, 1ULL), 0ULL, (GLuint)(checkNotNull(l_s).mMinLod));
break;
}
case GLenum::GL_TEXTURE_MAX_LOD: {
observer->write<GLuint>(slice(params, 0ULL, 1ULL), 0ULL, (GLuint)(checkNotNull(l_s).mMaxLod));
break;
}
case GLenum::GL_TEXTURE_WRAP_R: {
observer->write<GLuint>(slice(params, 0ULL, 1ULL), 0ULL, (GLuint)(checkNotNull(l_s).mWrapR));
break;
}
case GLenum::GL_TEXTURE_WRAP_S: {
observer->write<GLuint>(slice(params, 0ULL, 1ULL), 0ULL, (GLuint)(checkNotNull(l_s).mWrapS));
break;
}
case GLenum::GL_TEXTURE_WRAP_T: {
observer->write<GLuint>(slice(params, 0ULL, 1ULL), 0ULL, (GLuint)(checkNotNull(l_s).mWrapT));
break;
}
case GLenum::GL_TEXTURE_BORDER_COLOR: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
Slice<GLuint> l_p = slice(params, 0ULL, 4ULL);
observer->write<GLuint>(l_p, 0ULL, (GLuint)(checkNotNull(l_s).mBorderColor[0ULL]));
observer->write<GLuint>(l_p, 1ULL, (GLuint)(checkNotNull(l_s).mBorderColor[1ULL]));
observer->write<GLuint>(l_p, 2ULL, (GLuint)(checkNotNull(l_s).mBorderColor[2ULL]));
observer->write<GLuint>(l_p, 3ULL, (GLuint)(checkNotNull(l_s).mBorderColor[3ULL]));
break;
}
case GLenum::GL_TEXTURE_MAX_ANISOTROPY_EXT: {
subRequiresExtension(observer, call, ExtensionId::GL_EXT_texture_filter_anisotropic);
observer->write<GLuint>(slice(params, 0ULL, 1ULL), 0ULL, (GLuint)(checkNotNull(l_s).mMaxAnisotropy));
break;
}
default: {
subGlErrorInvalidEnum(observer, call, pname);
}
}
return;
}
void GlesSpy::subGetTexParameter_GLint(CallObserver* observer, const std::function<void()>& call, uint32_t target, uint32_t parameter, GLint* params) {
switch (target) {
case GLenum::GL_TEXTURE_2D: // fall-through...
case GLenum::GL_TEXTURE_CUBE_MAP: {
break;
}
case GLenum::GL_TEXTURE_2D_ARRAY: // fall-through...
case GLenum::GL_TEXTURE_3D: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
break;
}
case GLenum::GL_TEXTURE_2D_MULTISAMPLE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
break;
}
case GLenum::GL_TEXTURE_2D_MULTISAMPLE_ARRAY: // fall-through...
case GLenum::GL_TEXTURE_CUBE_MAP_ARRAY: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
break;
}
default: {
subGlErrorInvalidEnum(observer, call, target);
}
}
std::shared_ptr<Texture> l_t = subGetBoundTextureOrErrorInvalidEnum(observer, call, target);
switch (parameter) {
case GLenum::GL_TEXTURE_MAG_FILTER: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLint>(slice(params, 0ULL, 1ULL), 0ULL, (GLint)(checkNotNull(l_t).mMagFilter));
break;
}
case GLenum::GL_TEXTURE_MIN_FILTER: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLint>(slice(params, 0ULL, 1ULL), 0ULL, (GLint)(checkNotNull(l_t).mMinFilter));
break;
}
case GLenum::GL_TEXTURE_WRAP_S: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLint>(slice(params, 0ULL, 1ULL), 0ULL, (GLint)(checkNotNull(l_t).mWrapS));
break;
}
case GLenum::GL_TEXTURE_WRAP_T: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLint>(slice(params, 0ULL, 1ULL), 0ULL, (GLint)(checkNotNull(l_t).mWrapT));
break;
}
case GLenum::GL_TEXTURE_BASE_LEVEL: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLint>(slice(params, 0ULL, 1ULL), 0ULL, checkNotNull(l_t).mBaseLevel);
break;
}
case GLenum::GL_TEXTURE_COMPARE_FUNC: {
observer->write<GLint>(slice(params, 0ULL, 1ULL), 0ULL, (GLint)(checkNotNull(l_t).mCompareFunc));
break;
}
case GLenum::GL_TEXTURE_COMPARE_MODE: {
observer->write<GLint>(slice(params, 0ULL, 1ULL), 0ULL, (GLint)(checkNotNull(l_t).mCompareMode));
break;
}
case GLenum::GL_TEXTURE_IMMUTABLE_FORMAT: {
observer->write<GLint>(slice(params, 0ULL, 1ULL), 0ULL, (GLint)(checkNotNull(l_t).mImmutableFormat));
break;
}
case GLenum::GL_TEXTURE_MAX_LEVEL: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLint>(slice(params, 0ULL, 1ULL), 0ULL, checkNotNull(l_t).mMaxLevel);
break;
}
case GLenum::GL_TEXTURE_MAX_LOD: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLint>(slice(params, 0ULL, 1ULL), 0ULL, (GLint)(checkNotNull(l_t).mMaxLod));
break;
}
case GLenum::GL_TEXTURE_MIN_LOD: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLint>(slice(params, 0ULL, 1ULL), 0ULL, (GLint)(checkNotNull(l_t).mMinLod));
break;
}
case GLenum::GL_TEXTURE_SWIZZLE_A: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLint>(slice(params, 0ULL, 1ULL), 0ULL, (GLint)(checkNotNull(l_t).mSwizzleA));
break;
}
case GLenum::GL_TEXTURE_SWIZZLE_B: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLint>(slice(params, 0ULL, 1ULL), 0ULL, (GLint)(checkNotNull(l_t).mSwizzleB));
break;
}
case GLenum::GL_TEXTURE_SWIZZLE_G: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLint>(slice(params, 0ULL, 1ULL), 0ULL, (GLint)(checkNotNull(l_t).mSwizzleG));
break;
}
case GLenum::GL_TEXTURE_SWIZZLE_R: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLint>(slice(params, 0ULL, 1ULL), 0ULL, (GLint)(checkNotNull(l_t).mSwizzleR));
break;
}
case GLenum::GL_TEXTURE_WRAP_R: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLint>(slice(params, 0ULL, 1ULL), 0ULL, (GLint)(checkNotNull(l_t).mWrapR));
break;
}
case GLenum::GL_DEPTH_STENCIL_TEXTURE_MODE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLint>(slice(params, 0ULL, 1ULL), 0ULL, (GLint)(checkNotNull(l_t).mDepthStencilTextureMode));
break;
}
case GLenum::GL_IMAGE_FORMAT_COMPATIBILITY_TYPE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLint>(slice(params, 0ULL, 1ULL), 0ULL, slice(params, 0ULL, 1ULL)[0ULL]);
break;
}
case GLenum::GL_TEXTURE_IMMUTABLE_LEVELS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLint>(slice(params, 0ULL, 1ULL), 0ULL, (GLint)(checkNotNull(l_t).mImmutableLevels));
break;
}
case GLenum::GL_TEXTURE_BORDER_COLOR: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
Slice<GLint> l_p = slice(params, 0ULL, 4ULL);
observer->write<GLint>(l_p, 0ULL, (GLint)(checkNotNull(l_t).mBorderColor[0ULL]));
observer->write<GLint>(l_p, 1ULL, (GLint)(checkNotNull(l_t).mBorderColor[1ULL]));
observer->write<GLint>(l_p, 2ULL, (GLint)(checkNotNull(l_t).mBorderColor[2ULL]));
observer->write<GLint>(l_p, 3ULL, (GLint)(checkNotNull(l_t).mBorderColor[3ULL]));
break;
}
case GLenum::GL_TEXTURE_MAX_ANISOTROPY_EXT: {
subRequiresExtension(observer, call, ExtensionId::GL_EXT_texture_filter_anisotropic);
observer->write<GLint>(slice(params, 0ULL, 1ULL), 0ULL, (GLint)(checkNotNull(l_t).mMaxAnisotropy));
break;
}
default: {
subGlErrorInvalidEnum(observer, call, parameter);
}
}
return;
}
void GlesSpy::subSamplerParameterv_GLint__CP(CallObserver* observer, const std::function<void()>& call, SamplerId sampler, uint32_t pname, GLint* params) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
std::shared_ptr<Sampler> l_s = findOrZero(checkNotNull(l_ctx).mInstances.mSamplers, sampler);
switch (pname) {
case GLenum::GL_TEXTURE_COMPARE_FUNC: {
checkNotNull(l_s).mCompareFunc = (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
break;
}
case GLenum::GL_TEXTURE_COMPARE_MODE: {
checkNotNull(l_s).mCompareMode = (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
break;
}
case GLenum::GL_TEXTURE_MIN_FILTER: {
checkNotNull(l_s).mMinFilter = (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
break;
}
case GLenum::GL_TEXTURE_MAG_FILTER: {
checkNotNull(l_s).mMagFilter = (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
break;
}
case GLenum::GL_TEXTURE_MIN_LOD: {
checkNotNull(l_s).mMinLod = (GLfloat)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
break;
}
case GLenum::GL_TEXTURE_MAX_LOD: {
checkNotNull(l_s).mMaxLod = (GLfloat)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
break;
}
case GLenum::GL_TEXTURE_WRAP_R: {
checkNotNull(l_s).mWrapR = (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
break;
}
case GLenum::GL_TEXTURE_WRAP_S: {
checkNotNull(l_s).mWrapS = (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
break;
}
case GLenum::GL_TEXTURE_WRAP_T: {
checkNotNull(l_s).mWrapT = (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
break;
}
case GLenum::GL_TEXTURE_BORDER_COLOR: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
break;
}
case GLenum::GL_TEXTURE_MAX_ANISOTROPY_EXT: {
subRequiresExtension(observer, call, ExtensionId::GL_EXT_texture_filter_anisotropic);
checkNotNull(l_s).mMaxAnisotropy = (GLfloat)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
break;
}
default: {
subGlErrorInvalidEnum(observer, call, pname);
}
}
return;
}
void GlesSpy::subTexParameterv_GLuint__CP(CallObserver* observer, const std::function<void()>& call, uint32_t target, uint32_t pname, GLuint* params) {
if ((target) == (GLenum::GL_TEXTURE_BUFFER)) {
subGlErrorInvalidEnum(observer, call, target);
}
std::shared_ptr<Texture> l_t = subGetBoundTextureOrErrorInvalidEnum(observer, call, target);
switch (pname) {
case GLenum::GL_TEXTURE_MAG_FILTER: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
uint32_t l_magFilter = (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
switch (l_magFilter) {
case GLenum::GL_NEAREST: // fall-through...
case GLenum::GL_LINEAR: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, l_magFilter);
}
}
checkNotNull(l_t).mMagFilter = l_magFilter;
break;
}
case GLenum::GL_TEXTURE_MIN_FILTER: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
uint32_t l_minFilter = (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
switch (l_minFilter) {
case GLenum::GL_NEAREST: // fall-through...
case GLenum::GL_LINEAR: // fall-through...
case GLenum::GL_NEAREST_MIPMAP_NEAREST: // fall-through...
case GLenum::GL_LINEAR_MIPMAP_NEAREST: // fall-through...
case GLenum::GL_NEAREST_MIPMAP_LINEAR: // fall-through...
case GLenum::GL_LINEAR_MIPMAP_LINEAR: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, l_minFilter);
}
}
checkNotNull(l_t).mMinFilter = l_minFilter;
break;
}
case GLenum::GL_TEXTURE_WRAP_S: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
uint32_t l__res_0 = subCheckWrapParam(observer, call, (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL)));
checkNotNull(l_t).mWrapS = l__res_0;
break;
}
case GLenum::GL_TEXTURE_WRAP_T: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
uint32_t l__res_0 = subCheckWrapParam(observer, call, (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL)));
checkNotNull(l_t).mWrapT = l__res_0;
break;
}
case GLenum::GL_TEXTURE_BASE_LEVEL: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
GLint l_baseLevel = (GLint)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
if ((l_baseLevel) < ((GLint)(0L))) {
subGlErrorInvalidValue(observer, call);
}
checkNotNull(l_t).mBaseLevel = l_baseLevel;
break;
}
case GLenum::GL_TEXTURE_COMPARE_FUNC: {
checkNotNull(l_t).mCompareFunc = (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
break;
}
case GLenum::GL_TEXTURE_COMPARE_MODE: {
checkNotNull(l_t).mCompareMode = (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
break;
}
case GLenum::GL_TEXTURE_MAX_LEVEL: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
GLint l_maxLevel = (GLint)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
if ((l_maxLevel) < ((GLint)(0L))) {
subGlErrorInvalidValue(observer, call);
}
checkNotNull(l_t).mMaxLevel = l_maxLevel;
break;
}
case GLenum::GL_TEXTURE_MAX_LOD: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
checkNotNull(l_t).mMaxLod = (GLfloat)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
break;
}
case GLenum::GL_TEXTURE_MIN_LOD: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
checkNotNull(l_t).mMinLod = (GLfloat)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
break;
}
case GLenum::GL_TEXTURE_SWIZZLE_A: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
uint32_t l__res_0 = subCheckSwizzleParam(observer, call, (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL)));
checkNotNull(l_t).mSwizzleA = l__res_0;
break;
}
case GLenum::GL_TEXTURE_SWIZZLE_B: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
uint32_t l__res_0 = subCheckSwizzleParam(observer, call, (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL)));
checkNotNull(l_t).mSwizzleB = l__res_0;
break;
}
case GLenum::GL_TEXTURE_SWIZZLE_G: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
uint32_t l__res_0 = subCheckSwizzleParam(observer, call, (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL)));
checkNotNull(l_t).mSwizzleG = l__res_0;
break;
}
case GLenum::GL_TEXTURE_SWIZZLE_R: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
uint32_t l__res_0 = subCheckSwizzleParam(observer, call, (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL)));
checkNotNull(l_t).mSwizzleR = l__res_0;
break;
}
case GLenum::GL_TEXTURE_WRAP_R: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
checkNotNull(l_t).mWrapR = (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
break;
}
case GLenum::GL_DEPTH_STENCIL_TEXTURE_MODE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
checkNotNull(l_t).mDepthStencilTextureMode = (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
break;
}
case GLenum::GL_TEXTURE_BORDER_COLOR: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
break;
}
case GLenum::GL_TEXTURE_MAX_ANISOTROPY_EXT: {
subRequiresExtension(observer, call, ExtensionId::GL_EXT_texture_filter_anisotropic);
checkNotNull(l_t).mMaxAnisotropy = (GLfloat)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
break;
}
case GLenum::GL_TEXTURE_SRGB_DECODE_EXT: {
subRequiresExtension(observer, call, ExtensionId::GL_EXT_texture_sRGB_decode);
break;
}
default: {
subGlErrorInvalidEnum(observer, call, pname);
}
}
return;
}
void GlesSpy::subGetUniformv_GLint__P(CallObserver* observer, const std::function<void()>& call, ProgramId program, UniformLocation location, GLint* values) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
subCheckProgram(observer, call, l_ctx, program);
(void)program;
(void)location;
observer->write(slice(values, 0ULL, 16ULL));
return;
}
void GlesSpy::subUniformv_GLfloat__S(CallObserver* observer, const std::function<void()>& call, UniformLocation location, Slice<GLfloat> values, uint32_t type) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
subSetProgramUniform(observer, call, checkNotNull(l_ctx).mBoundProgram, location, values.as<uint8_t>(), type);
return;
}
void GlesSpy::subUniformv_GLuint__S(CallObserver* observer, const std::function<void()>& call, UniformLocation location, Slice<GLuint> values, uint32_t type) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
subSetProgramUniform(observer, call, checkNotNull(l_ctx).mBoundProgram, location, values.as<uint8_t>(), type);
return;
}
void GlesSpy::subUniformv_Vec2i__S(CallObserver* observer, const std::function<void()>& call, UniformLocation location, Slice<Vec2i> values, uint32_t type) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
subSetProgramUniform(observer, call, checkNotNull(l_ctx).mBoundProgram, location, values.as<uint8_t>(), type);
return;
}
void GlesSpy::subUniformv_Vec2u__S(CallObserver* observer, const std::function<void()>& call, UniformLocation location, Slice<Vec2u> values, uint32_t type) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
subSetProgramUniform(observer, call, checkNotNull(l_ctx).mBoundProgram, location, values.as<uint8_t>(), type);
return;
}
void GlesSpy::subUniformv_Vec3f__S(CallObserver* observer, const std::function<void()>& call, UniformLocation location, Slice<Vec3f> values, uint32_t type) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
subSetProgramUniform(observer, call, checkNotNull(l_ctx).mBoundProgram, location, values.as<uint8_t>(), type);
return;
}
void GlesSpy::subUniformv_Vec4i__S(CallObserver* observer, const std::function<void()>& call, UniformLocation location, Slice<Vec4i> values, uint32_t type) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
subSetProgramUniform(observer, call, checkNotNull(l_ctx).mBoundProgram, location, values.as<uint8_t>(), type);
return;
}
void GlesSpy::subUniformv_Vec4u__S(CallObserver* observer, const std::function<void()>& call, UniformLocation location, Slice<Vec4u> values, uint32_t type) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
subSetProgramUniform(observer, call, checkNotNull(l_ctx).mBoundProgram, location, values.as<uint8_t>(), type);
return;
}
void GlesSpy::subUniformMatrixv_Mat2f__S(CallObserver* observer, const std::function<void()>& call, UniformLocation location, GLboolean transpose, Slice<Mat2f> values, uint32_t type) {
(void)transpose;
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
subSetProgramUniform(observer, call, checkNotNull(l_ctx).mBoundProgram, location, values.as<uint8_t>(), type);
return;
}
void GlesSpy::subUniformMatrixv_Mat4f__S(CallObserver* observer, const std::function<void()>& call, UniformLocation location, GLboolean transpose, Slice<Mat4f> values, uint32_t type) {
(void)transpose;
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
subSetProgramUniform(observer, call, checkNotNull(l_ctx).mBoundProgram, location, values.as<uint8_t>(), type);
return;
}
void GlesSpy::subGetStateVariable_GLboolean(CallObserver* observer, const std::function<void()>& call, uint32_t name, bool isIndexed, GLuint index, GLboolean* v) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
switch (name) {
case GLenum::GL_ACTIVE_TEXTURE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mActiveTextureUnit));
break;
}
case GLenum::GL_ALIASED_LINE_WIDTH_RANGE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
Slice<GLboolean> l_s = slice(v, 0ULL, 2ULL);
observer->write<GLboolean>(l_s, 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mAliasedLineWidthRange[0ULL]));
observer->write<GLboolean>(l_s, 1ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mAliasedLineWidthRange[1ULL]));
break;
}
case GLenum::GL_ALIASED_POINT_SIZE_RANGE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
Slice<GLboolean> l_s = slice(v, 0ULL, 2ULL);
observer->write<GLboolean>(l_s, 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mAliasedPointSizeRange[0ULL]));
observer->write<GLboolean>(l_s, 1ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mAliasedPointSizeRange[1ULL]));
break;
}
case GLenum::GL_ALPHA_BITS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_ARRAY_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mBoundBuffers.mArrayBuffer));
break;
}
case GLenum::GL_ATOMIC_COUNTER_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mBoundBuffers.mAtomicCounterBuffers, index).mBinding));
} else {
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mBoundBuffers.mAtomicCounterBuffer));
}
break;
}
case GLenum::GL_ATOMIC_COUNTER_BUFFER_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mBoundBuffers.mAtomicCounterBuffers, index).mSize));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_ATOMIC_COUNTER_BUFFER_START: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mBoundBuffers.mAtomicCounterBuffers, index).mStart));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_BLEND: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
DrawBufferIndex l_i = (DrawBufferIndex)(index);
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, findOrZero(checkNotNull(l_ctx).mFragmentOperations.mBlend, l_i).mEnabled);
break;
}
case GLenum::GL_BLEND_COLOR: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
Slice<GLboolean> l_s = slice(v, 0ULL, 4ULL);
observer->write<GLboolean>(l_s, 0ULL, (GLboolean)(checkNotNull(l_ctx).mFragmentOperations.mBlendColor.mRed));
observer->write<GLboolean>(l_s, 1ULL, (GLboolean)(checkNotNull(l_ctx).mFragmentOperations.mBlendColor.mGreen));
observer->write<GLboolean>(l_s, 2ULL, (GLboolean)(checkNotNull(l_ctx).mFragmentOperations.mBlendColor.mBlue));
observer->write<GLboolean>(l_s, 3ULL, (GLboolean)(checkNotNull(l_ctx).mFragmentOperations.mBlendColor.mAlpha));
break;
}
case GLenum::GL_BLEND_DST_ALPHA: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
DrawBufferIndex l_i = (DrawBufferIndex)(index);
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mFragmentOperations.mBlend, l_i).mDstAlpha));
break;
}
case GLenum::GL_BLEND_DST_RGB: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
DrawBufferIndex l_i = (DrawBufferIndex)(index);
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mFragmentOperations.mBlend, l_i).mDstRgb));
break;
}
case GLenum::GL_BLEND_EQUATION_ALPHA: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
DrawBufferIndex l_i = (DrawBufferIndex)(index);
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mFragmentOperations.mBlend, l_i).mEquationAlpha));
break;
}
case GLenum::GL_BLEND_EQUATION_RGB: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
DrawBufferIndex l_i = (DrawBufferIndex)(index);
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mFragmentOperations.mBlend, l_i).mEquationRgb));
break;
}
case GLenum::GL_BLEND_SRC_ALPHA: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
DrawBufferIndex l_i = (DrawBufferIndex)(index);
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mFragmentOperations.mBlend, l_i).mSrcAlpha));
break;
}
case GLenum::GL_BLEND_SRC_RGB: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
DrawBufferIndex l_i = (DrawBufferIndex)(index);
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mFragmentOperations.mBlend, l_i).mSrcRgb));
break;
}
case GLenum::GL_BLUE_BITS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_COLOR_CLEAR_VALUE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
Slice<GLboolean> l_s = slice(v, 0ULL, 4ULL);
observer->write<GLboolean>(l_s, 0ULL, (GLboolean)(checkNotNull(l_ctx).mFramebuffer.mColorClearValue[0ULL]));
observer->write<GLboolean>(l_s, 1ULL, (GLboolean)(checkNotNull(l_ctx).mFramebuffer.mColorClearValue[1ULL]));
observer->write<GLboolean>(l_s, 2ULL, (GLboolean)(checkNotNull(l_ctx).mFramebuffer.mColorClearValue[2ULL]));
observer->write<GLboolean>(l_s, 3ULL, (GLboolean)(checkNotNull(l_ctx).mFramebuffer.mColorClearValue[3ULL]));
break;
}
case GLenum::GL_COLOR_WRITEMASK: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
Slice<GLboolean> l_s = slice(v, 0ULL, 4ULL);
DrawBufferIndex l_i = (DrawBufferIndex)(index);
observer->write<GLboolean>(l_s, 0ULL, findOrZero(checkNotNull(l_ctx).mFramebuffer.mColorWritemask, l_i)[0ULL]);
observer->write<GLboolean>(l_s, 1ULL, findOrZero(checkNotNull(l_ctx).mFramebuffer.mColorWritemask, l_i)[1ULL]);
observer->write<GLboolean>(l_s, 2ULL, findOrZero(checkNotNull(l_ctx).mFramebuffer.mColorWritemask, l_i)[2ULL]);
observer->write<GLboolean>(l_s, 3ULL, findOrZero(checkNotNull(l_ctx).mFramebuffer.mColorWritemask, l_i)[3ULL]);
break;
}
case GLenum::GL_COMPRESSED_TEXTURE_FORMATS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
Slice<GLboolean> l_s = slice(v, 0ULL, uint64_t((checkNotNull(l_ctx).mConstants.mCompressedTextureFormats.size())));
{
int32_t l__ = 0;
for (U32ToGLenum::iterator it = checkNotNull(l_ctx).mConstants.mCompressedTextureFormats.begin(); it != checkNotNull(l_ctx).mConstants.mCompressedTextureFormats.end(); ++it, ++l__) {
uint32_t l_i = it->first;
uint32_t l_f = it->second;
observer->write<GLboolean>(l_s, (uint64_t)(l_i), (GLboolean)(l_f));
}
}
break;
}
case GLenum::GL_CONTEXT_FLAGS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mContextFlags));
break;
}
case GLenum::GL_CONTEXT_ROBUST_ACCESS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_COPY_READ_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mBoundBuffers.mCopyReadBuffer));
break;
}
case GLenum::GL_COPY_WRITE_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mBoundBuffers.mCopyWriteBuffer));
break;
}
case GLenum::GL_CULL_FACE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mRasterization.mCullFace);
break;
}
case GLenum::GL_CULL_FACE_MODE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mRasterization.mCullFaceMode));
break;
}
case GLenum::GL_CURRENT_PROGRAM: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mBoundProgram));
break;
}
case GLenum::GL_DEBUG_GROUP_STACK_DEPTH: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_DEBUG_LOGGED_MESSAGES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_DEPTH_BITS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_DEPTH_CLEAR_VALUE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mFramebuffer.mDepthClearValue));
break;
}
case GLenum::GL_DEPTH_FUNC: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mFragmentOperations.mDepth.mFunc));
break;
}
case GLenum::GL_DEPTH_RANGE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
Slice<GLboolean> l_s = slice(v, 0ULL, 2ULL);
observer->write<GLboolean>(l_s, 0ULL, (GLboolean)(checkNotNull(l_ctx).mRasterization.mDepthRange[0ULL]));
observer->write<GLboolean>(l_s, 1ULL, (GLboolean)(checkNotNull(l_ctx).mRasterization.mDepthRange[1ULL]));
break;
}
case GLenum::GL_DEPTH_TEST: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mFragmentOperations.mDepth.mTest);
break;
}
case GLenum::GL_DEPTH_WRITEMASK: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mFramebuffer.mDepthWritemask);
break;
}
case GLenum::GL_DISPATCH_INDIRECT_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mBoundBuffers.mDispatchIndirectBuffer));
break;
}
case GLenum::GL_DITHER: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mFragmentOperations.mDither);
break;
}
case GLenum::GL_DRAW_BUFFER: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_DRAW_BUFFER0: // fall-through...
case GLenum::GL_DRAW_BUFFER1: // fall-through...
case GLenum::GL_DRAW_BUFFER2: // fall-through...
case GLenum::GL_DRAW_BUFFER3: // fall-through...
case GLenum::GL_DRAW_BUFFER4: // fall-through...
case GLenum::GL_DRAW_BUFFER5: // fall-through...
case GLenum::GL_DRAW_BUFFER6: // fall-through...
case GLenum::GL_DRAW_BUFFER7: // fall-through...
case GLenum::GL_DRAW_BUFFER8: // fall-through...
case GLenum::GL_DRAW_BUFFER9: // fall-through...
case GLenum::GL_DRAW_BUFFER10: // fall-through...
case GLenum::GL_DRAW_BUFFER11: // fall-through...
case GLenum::GL_DRAW_BUFFER12: // fall-through...
case GLenum::GL_DRAW_BUFFER13: // fall-through...
case GLenum::GL_DRAW_BUFFER14: // fall-through...
case GLenum::GL_DRAW_BUFFER15: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
std::shared_ptr<Framebuffer> l_framebuffer = subGetBoundFramebufferOrErrorInvalidEnum(observer, call, GLenum::GL_DRAW_FRAMEBUFFER);
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_framebuffer).mDrawBuffer, (GLint)((name) - (GLenum::GL_DRAW_BUFFER0)))));
break;
}
case GLenum::GL_DRAW_FRAMEBUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mBoundFramebuffers, GLenum::GL_FRAMEBUFFER)));
break;
}
case GLenum::GL_ELEMENT_ARRAY_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(findOrZero(checkNotNull(l_ctx).mInstances.mVertexArrays, checkNotNull(l_ctx).mBoundVertexArray)).mElementArrayBuffer));
break;
}
case GLenum::GL_FRAGMENT_INTERPOLATION_OFFSET_BITS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mFragmentInterpolationOffsetBits));
break;
}
case GLenum::GL_FRAGMENT_SHADER_DERIVATIVE_HINT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_FRONT_FACE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mRasterization.mFrontFace));
break;
}
case GLenum::GL_GENERATE_MIPMAP_HINT: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mMiscellaneous.mGenerateMipmapHint));
break;
}
case GLenum::GL_GREEN_BITS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_IMAGE_BINDING_NAME: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mImageUnits, index).mName));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_IMAGE_BINDING_LEVEL: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mImageUnits, index).mLevel));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_IMAGE_BINDING_LAYERED: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, findOrZero(checkNotNull(l_ctx).mImageUnits, index).mLayered);
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_IMAGE_BINDING_LAYER: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mImageUnits, index).mLayer));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_IMAGE_BINDING_ACCESS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mImageUnits, index).mAccess));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_IMAGE_BINDING_FORMAT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mImageUnits, index).mFormat));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_IMPLEMENTATION_COLOR_READ_FORMAT: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_IMPLEMENTATION_COLOR_READ_TYPE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_LAYER_PROVOKING_VERTEX: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mLayerProvokingVertex));
break;
}
case GLenum::GL_LINE_WIDTH: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mRasterization.mLineWidth));
break;
}
case GLenum::GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mConstants.mPrimitiveRestartForPatchesSupported);
break;
}
case GLenum::GL_MAJOR_VERSION: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMajorVersion));
break;
}
case GLenum::GL_MAX_3D_TEXTURE_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMax3dTextureSize));
break;
}
case GLenum::GL_MAX_ARRAY_TEXTURE_LAYERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxArrayTextureLayers));
break;
}
case GLenum::GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxAtomicCounterBufferBindings));
break;
}
case GLenum::GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxAtomicCounterBufferSize));
break;
}
case GLenum::GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxCombinedAtomicCounterBuffers));
break;
}
case GLenum::GL_MAX_COLOR_ATTACHMENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxColorAttachments));
break;
}
case GLenum::GL_MAX_COLOR_TEXTURE_SAMPLES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxColorTextureSamples));
break;
}
case GLenum::GL_MAX_DEPTH_TEXTURE_SAMPLES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxDepthTextureSamples));
break;
}
case GLenum::GL_MAX_COMBINED_ATOMIC_COUNTERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxCombinedAtomicCounters));
break;
}
case GLenum::GL_MAX_IMAGE_UNITS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxImageUnits));
break;
}
case GLenum::GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxCombinedComputeUniformComponents));
break;
}
case GLenum::GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxCombinedFragmentUniformComponents));
break;
}
case GLenum::GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxCombinedGeometryUniformComponents));
break;
}
case GLenum::GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxCombinedShaderStorageBlocks));
break;
}
case GLenum::GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxCombinedTessControlUniformComponents));
break;
}
case GLenum::GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxCombinedTessEvaluationUniformComponents));
break;
}
case GLenum::GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxCombinedTextureImageUnits));
break;
}
case GLenum::GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxCombinedShaderOutputResources));
break;
}
case GLenum::GL_MAX_COMBINED_UNIFORM_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxCombinedUniformBlocks));
break;
}
case GLenum::GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxCombinedVertexUniformComponents));
break;
}
case GLenum::GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxComputeAtomicCounterBuffers));
break;
}
case GLenum::GL_MAX_COMPUTE_ATOMIC_COUNTERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxComputeAtomicCounters));
break;
}
case GLenum::GL_MAX_COMPUTE_IMAGE_UNIFORMS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxComputeImageUniforms));
break;
}
case GLenum::GL_MAX_COMBINED_IMAGE_UNIFORMS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxCombinedImageUniforms));
break;
}
case GLenum::GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxComputeShaderStorageBlocks));
break;
}
case GLenum::GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxComputeTextureImageUnits));
break;
}
case GLenum::GL_MAX_COMPUTE_SHARED_MEMORY_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxComputeSharedMemorySize));
break;
}
case GLenum::GL_MAX_COMPUTE_UNIFORM_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxComputeUniformBlocks));
break;
}
case GLenum::GL_MAX_COMPUTE_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxComputeUniformComponents));
break;
}
case GLenum::GL_MAX_COMPUTE_WORK_GROUP_COUNT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxComputeWorkGroupCount[index]));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxComputeWorkGroupInvocations));
break;
}
case GLenum::GL_MAX_COMPUTE_WORK_GROUP_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxComputeWorkGroupSize[index]));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_MAX_CUBE_MAP_TEXTURE_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxCubeMapTextureSize));
break;
}
case GLenum::GL_MAX_DEBUG_GROUP_STACK_DEPTH: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxDebugGroupStackDepth));
break;
}
case GLenum::GL_MAX_DEBUG_LOGGED_MESSAGES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxDebugLoggedMessages));
break;
}
case GLenum::GL_MAX_DEBUG_MESSAGE_LENGTH: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxDebugMessageLength));
break;
}
case GLenum::GL_MAX_DRAW_BUFFERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxDrawBuffers));
break;
}
case GLenum::GL_MAX_ELEMENT_INDEX: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxElementIndex));
break;
}
case GLenum::GL_MAX_ELEMENTS_INDICES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxElementsIndices));
break;
}
case GLenum::GL_MAX_ELEMENTS_VERTICES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxElementsVertices));
break;
}
case GLenum::GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxFragmentAtomicCounterBuffers));
break;
}
case GLenum::GL_MAX_FRAGMENT_ATOMIC_COUNTERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxFragmentAtomicCounters));
break;
}
case GLenum::GL_MAX_FRAGMENT_IMAGE_UNIFORMS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxFragmentImageUniforms));
break;
}
case GLenum::GL_MAX_FRAGMENT_INPUT_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxFragmentInputComponents));
break;
}
case GLenum::GL_MAX_FRAGMENT_INTERPOLATION_OFFSET: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxFragmentInterpolationOffset));
break;
}
case GLenum::GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxFragmentShaderStorageBlocks));
break;
}
case GLenum::GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMinProgramTextureGatherOffset));
break;
}
case GLenum::GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxProgramTextureGatherOffset));
break;
}
case GLenum::GL_MAX_FRAGMENT_UNIFORM_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxFragmentUniformBlocks));
break;
}
case GLenum::GL_MAX_FRAGMENT_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxFragmentUniformComponents));
break;
}
case GLenum::GL_MAX_FRAGMENT_UNIFORM_VECTORS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxFragmentUniformVectors));
break;
}
case GLenum::GL_MAX_FRAMEBUFFER_HEIGHT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxFramebufferHeight));
break;
}
case GLenum::GL_MAX_FRAMEBUFFER_LAYERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxFramebufferLayers));
break;
}
case GLenum::GL_MAX_FRAMEBUFFER_SAMPLES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxFramebufferSamples));
break;
}
case GLenum::GL_MAX_FRAMEBUFFER_WIDTH: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxFramebufferWidth));
break;
}
case GLenum::GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxGeometryAtomicCounterBuffers));
break;
}
case GLenum::GL_MAX_GEOMETRY_ATOMIC_COUNTERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxGeometryAtomicCounters));
break;
}
case GLenum::GL_MAX_GEOMETRY_IMAGE_UNIFORMS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxGeometryImageUniforms));
break;
}
case GLenum::GL_MAX_GEOMETRY_INPUT_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxGeometryInputComponents));
break;
}
case GLenum::GL_MAX_GEOMETRY_OUTPUT_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxGeometryOutputComponents));
break;
}
case GLenum::GL_MAX_GEOMETRY_OUTPUT_VERTICES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxGeometryOutputVertices));
break;
}
case GLenum::GL_MAX_GEOMETRY_SHADER_INVOCATIONS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxGeometryShaderInvocations));
break;
}
case GLenum::GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxGeometryShaderStorageBlocks));
break;
}
case GLenum::GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxGeometryTextureImageUnits));
break;
}
case GLenum::GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxGeometryTotalOutputComponents));
break;
}
case GLenum::GL_MAX_GEOMETRY_UNIFORM_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxGeometryUniformBlocks));
break;
}
case GLenum::GL_MAX_GEOMETRY_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxGeometryUniformComponents));
break;
}
case GLenum::GL_MAX_INTEGER_SAMPLES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxIntegerSamples));
break;
}
case GLenum::GL_MAX_LABEL_LENGTH: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxLabelLength));
break;
}
case GLenum::GL_MAX_PROGRAM_TEXEL_OFFSET: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxProgramTexelOffset));
break;
}
case GLenum::GL_MAX_RENDERBUFFER_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxRenderbufferSize));
break;
}
case GLenum::GL_MAX_SAMPLE_MASK_WORDS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxSampleMaskWords));
break;
}
case GLenum::GL_MAX_SAMPLES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_MAX_SERVER_WAIT_TIMEOUT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxServerWaitTimeout));
break;
}
case GLenum::GL_MAX_SHADER_STORAGE_BLOCK_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxShaderStorageBlockSize));
break;
}
case GLenum::GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxShaderStorageBufferBindings));
break;
}
case GLenum::GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTessControlAtomicCounterBuffers));
break;
}
case GLenum::GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTessControlAtomicCounters));
break;
}
case GLenum::GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTessControlImageUniforms));
break;
}
case GLenum::GL_MAX_TESS_CONTROL_INPUT_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTessControlInputComponents));
break;
}
case GLenum::GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTessControlOutputComponents));
break;
}
case GLenum::GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTessControlShaderStorageBlocks));
break;
}
case GLenum::GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTessControlTextureImageUnits));
break;
}
case GLenum::GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTessControlTotalOutputComponents));
break;
}
case GLenum::GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTessControlUniformBlocks));
break;
}
case GLenum::GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTessControlUniformComponents));
break;
}
case GLenum::GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTessEvaluationAtomicCounterBuffers));
break;
}
case GLenum::GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTessEvaluationAtomicCounters));
break;
}
case GLenum::GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTessEvaluationImageUniforms));
break;
}
case GLenum::GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTessEvaluationInputComponents));
break;
}
case GLenum::GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTessEvaluationOutputComponents));
break;
}
case GLenum::GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTessEvaluationShaderStorageBlocks));
break;
}
case GLenum::GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTessEvaluationTextureImageUnits));
break;
}
case GLenum::GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTessEvaluationUniformBlocks));
break;
}
case GLenum::GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTessEvaluationUniformComponents));
break;
}
case GLenum::GL_MAX_TESS_GEN_LEVEL: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTessGenLevel));
break;
}
case GLenum::GL_MAX_PATCH_VERTICES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxPatchVertices));
break;
}
case GLenum::GL_MAX_TESS_PATCH_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTessPatchComponents));
break;
}
case GLenum::GL_MAX_TEXTURE_BUFFER_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTextureBufferSize));
break;
}
case GLenum::GL_MAX_TEXTURE_IMAGE_UNITS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTextureImageUnits));
break;
}
case GLenum::GL_MAX_TEXTURE_LOD_BIAS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTextureLodBias));
break;
}
case GLenum::GL_MAX_TEXTURE_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTextureSize));
break;
}
case GLenum::GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTransformFeedbackInterleavedComponents));
break;
}
case GLenum::GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTransformFeedbackSeparateAttribs));
break;
}
case GLenum::GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTransformFeedbackSeparateComponents));
break;
}
case GLenum::GL_MAX_UNIFORM_BLOCK_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxUniformBlockSize));
break;
}
case GLenum::GL_MAX_UNIFORM_BUFFER_BINDINGS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxUniformBufferBindings));
break;
}
case GLenum::GL_MAX_UNIFORM_LOCATIONS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxUniformLocations));
break;
}
case GLenum::GL_MAX_VARYING_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxVaryingComponents));
break;
}
case GLenum::GL_MAX_VARYING_VECTORS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxVaryingVectors));
break;
}
case GLenum::GL_MAX_VERTEX_ATOMIC_COUNTERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxVertexAtomicCounters));
break;
}
case GLenum::GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxVertexAtomicCounterBuffers));
break;
}
case GLenum::GL_MAX_VERTEX_ATTRIB_BINDINGS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxVertexAttribBindings));
break;
}
case GLenum::GL_MAX_VERTEX_ATTRIB_STRIDE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxVertexAttribStride));
break;
}
case GLenum::GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxVertexAttribRelativeOffset));
break;
}
case GLenum::GL_MAX_VERTEX_ATTRIBS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxVertexAttribs));
break;
}
case GLenum::GL_MAX_VERTEX_IMAGE_UNIFORMS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxVertexImageUniforms));
break;
}
case GLenum::GL_MAX_VERTEX_OUTPUT_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxVertexOutputComponents));
break;
}
case GLenum::GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxVertexShaderStorageBlocks));
break;
}
case GLenum::GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxVertexTextureImageUnits));
break;
}
case GLenum::GL_MAX_VERTEX_UNIFORM_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxVertexUniformBlocks));
break;
}
case GLenum::GL_MAX_VERTEX_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxVertexUniformComponents));
break;
}
case GLenum::GL_MAX_VERTEX_UNIFORM_VECTORS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxVertexUniformVectors));
break;
}
case GLenum::GL_MAX_VIEWPORT_DIMS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
Slice<GLboolean> l_s = slice(v, 0ULL, 2ULL);
observer->write<GLboolean>(l_s, 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxViewportDims[0ULL]));
observer->write<GLboolean>(l_s, 1ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxViewportDims[1ULL]));
break;
}
case GLenum::GL_MIN_FRAGMENT_INTERPOLATION_OFFSET: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMinFragmentInterpolationOffset));
break;
}
case GLenum::GL_MIN_PROGRAM_TEXEL_OFFSET: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMinProgramTexelOffset));
break;
}
case GLenum::GL_MIN_SAMPLE_SHADING_VALUE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mRasterization.mMinSampleShadingValue));
break;
}
case GLenum::GL_MINOR_VERSION: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMinorVersion));
break;
}
case GLenum::GL_MULTISAMPLE_LINE_WIDTH_RANGE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
Slice<GLboolean> l_s = slice(v, 0ULL, 2ULL);
observer->write<GLboolean>(l_s, 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMultisampleLineWidthRange[0ULL]));
observer->write<GLboolean>(l_s, 1ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMultisampleLineWidthRange[1ULL]));
break;
}
case GLenum::GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMultisampleLineWidthGranularity));
break;
}
case GLenum::GL_NUM_COMPRESSED_TEXTURE_FORMATS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(int32_t((checkNotNull(l_ctx).mConstants.mCompressedTextureFormats.size()))));
break;
}
case GLenum::GL_NUM_EXTENSIONS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(int32_t((checkNotNull(l_ctx).mConstants.mExtensions.size()))));
break;
}
case GLenum::GL_NUM_PROGRAM_BINARY_FORMATS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(int32_t((checkNotNull(l_ctx).mConstants.mProgramBinaryFormats.size()))));
break;
}
case GLenum::GL_NUM_SHADER_BINARY_FORMATS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(int32_t((checkNotNull(l_ctx).mConstants.mShaderBinaryFormats.size()))));
break;
}
case GLenum::GL_PACK_ALIGNMENT: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mPixelStorage.mPackAlignment));
break;
}
case GLenum::GL_PACK_IMAGE_HEIGHT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mPixelStorage.mPackImageHeight));
break;
}
case GLenum::GL_PACK_ROW_LENGTH: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mPixelStorage.mPackRowLength));
break;
}
case GLenum::GL_PACK_SKIP_IMAGES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mPixelStorage.mPackSkipImages));
break;
}
case GLenum::GL_PACK_SKIP_PIXELS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mPixelStorage.mPackSkipPixels));
break;
}
case GLenum::GL_PACK_SKIP_ROWS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mPixelStorage.mPackSkipRows));
break;
}
case GLenum::GL_PATCH_VERTICES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_PIXEL_PACK_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mBoundBuffers.mPixelPackBuffer));
break;
}
case GLenum::GL_PIXEL_UNPACK_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mBoundBuffers.mPixelUnpackBuffer));
break;
}
case GLenum::GL_POLYGON_OFFSET_FACTOR: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mRasterization.mPolygonOffsetFactor));
break;
}
case GLenum::GL_POLYGON_OFFSET_FILL: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mRasterization.mPolygonOffsetFill);
break;
}
case GLenum::GL_POLYGON_OFFSET_UNITS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mRasterization.mPolygonOffsetUnits));
break;
}
case GLenum::GL_PRIMITIVE_BOUNDING_BOX: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write(slice(v, 0ULL, 8ULL));
break;
}
case GLenum::GL_PRIMITIVE_RESTART_FIXED_INDEX: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mMiscellaneous.mPrimitiveRestartFixedIndex);
break;
}
case GLenum::GL_PROGRAM_BINARY_FORMATS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
Slice<GLboolean> l_s = slice(v, 0ULL, uint64_t((checkNotNull(l_ctx).mConstants.mProgramBinaryFormats.size())));
{
int32_t l__ = 0;
for (U32ToGLenum::iterator it = checkNotNull(l_ctx).mConstants.mProgramBinaryFormats.begin(); it != checkNotNull(l_ctx).mConstants.mProgramBinaryFormats.end(); ++it, ++l__) {
uint32_t l_i = it->first;
uint32_t l_f = it->second;
observer->write<GLboolean>(l_s, (uint64_t)(l_i), (GLboolean)(l_f));
}
}
break;
}
case GLenum::GL_PROGRAM_PIPELINE_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_RASTERIZER_DISCARD: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mRasterization.mRasterizerDiscard);
break;
}
case GLenum::GL_READ_BUFFER: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_READ_FRAMEBUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mBoundFramebuffers, GLenum::GL_READ_FRAMEBUFFER)));
break;
}
case GLenum::GL_RED_BITS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_RENDERBUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mBoundRenderbuffers, GLenum::GL_RENDERBUFFER)));
break;
}
case GLenum::GL_RESET_NOTIFICATION_STRATEGY: {
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_SAMPLE_ALPHA_TO_COVERAGE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mRasterization.mSampleAlphaToCoverage);
break;
}
case GLenum::GL_SAMPLE_BUFFERS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_SAMPLE_COVERAGE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mRasterization.mSampleCoverage);
break;
}
case GLenum::GL_SAMPLE_COVERAGE_INVERT: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mRasterization.mSampleCoverageInvert);
break;
}
case GLenum::GL_SAMPLE_COVERAGE_VALUE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mRasterization.mSampleCoverageValue));
break;
}
case GLenum::GL_SAMPLE_SHADING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_SAMPLER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_SAMPLES: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_SCISSOR_BOX: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
Slice<GLboolean> l_s = slice(v, 0ULL, 4ULL);
observer->write<GLboolean>(l_s, 0ULL, (GLboolean)(checkNotNull(l_ctx).mFragmentOperations.mScissor.mBox.mX));
observer->write<GLboolean>(l_s, 1ULL, (GLboolean)(checkNotNull(l_ctx).mFragmentOperations.mScissor.mBox.mY));
observer->write<GLboolean>(l_s, 2ULL, (GLboolean)(checkNotNull(l_ctx).mFragmentOperations.mScissor.mBox.mWidth));
observer->write<GLboolean>(l_s, 3ULL, (GLboolean)(checkNotNull(l_ctx).mFragmentOperations.mScissor.mBox.mHeight));
break;
}
case GLenum::GL_SCISSOR_TEST: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mFragmentOperations.mScissor.mTest);
break;
}
case GLenum::GL_SHADER_BINARY_FORMATS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
Slice<GLboolean> l_s = slice(v, 0ULL, uint64_t((checkNotNull(l_ctx).mConstants.mShaderBinaryFormats.size())));
{
int32_t l__ = 0;
for (U32ToGLenum::iterator it = checkNotNull(l_ctx).mConstants.mShaderBinaryFormats.begin(); it != checkNotNull(l_ctx).mConstants.mShaderBinaryFormats.end(); ++it, ++l__) {
uint32_t l_i = it->first;
uint32_t l_f = it->second;
observer->write<GLboolean>(l_s, (uint64_t)(l_i), (GLboolean)(l_f));
}
}
break;
}
case GLenum::GL_SHADER_COMPILER: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mConstants.mShaderCompiler);
break;
}
case GLenum::GL_SHADER_STORAGE_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mBoundBuffers.mShaderStorageBuffers, index).mBinding));
} else {
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mBoundBuffers.mShaderStorageBuffer));
}
break;
}
case GLenum::GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mShaderStorageBufferOffsetAlignment));
break;
}
case GLenum::GL_SHADER_STORAGE_BUFFER_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mBoundBuffers.mShaderStorageBuffers, index).mSize));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_SHADER_STORAGE_BUFFER_START: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mBoundBuffers.mShaderStorageBuffers, index).mStart));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_STENCIL_BACK_FAIL: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mBackFail));
break;
}
case GLenum::GL_STENCIL_BACK_FUNC: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mBackFunc));
break;
}
case GLenum::GL_STENCIL_BACK_PASS_DEPTH_FAIL: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mBackPassDepthFail));
break;
}
case GLenum::GL_STENCIL_BACK_PASS_DEPTH_PASS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mBackPassDepthPass));
break;
}
case GLenum::GL_STENCIL_BACK_REF: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mBackRef));
break;
}
case GLenum::GL_STENCIL_BACK_VALUE_MASK: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mBackValueMask));
break;
}
case GLenum::GL_STENCIL_BACK_WRITEMASK: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mFramebuffer.mStencilBackWritemask));
break;
}
case GLenum::GL_STENCIL_BITS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_STENCIL_CLEAR_VALUE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mFramebuffer.mStencilClearValue));
break;
}
case GLenum::GL_STENCIL_FAIL: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mFail));
break;
}
case GLenum::GL_STENCIL_FUNC: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mFunc));
break;
}
case GLenum::GL_STENCIL_PASS_DEPTH_FAIL: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mPassDepthFail));
break;
}
case GLenum::GL_STENCIL_PASS_DEPTH_PASS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mPassDepthPass));
break;
}
case GLenum::GL_STENCIL_REF: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mRef));
break;
}
case GLenum::GL_STENCIL_TEST: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mFragmentOperations.mStencil.mTest);
break;
}
case GLenum::GL_STENCIL_VALUE_MASK: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mValueMask));
break;
}
case GLenum::GL_STENCIL_WRITEMASK: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mFramebuffer.mStencilWritemask));
break;
}
case GLenum::GL_SUBPIXEL_BITS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mSubpixelBits));
break;
}
case GLenum::GL_TEXTURE_BINDING_2D: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(findOrZero(checkNotNull(l_ctx).mTextureUnits, checkNotNull(l_ctx).mActiveTextureUnit)).mBinding2d));
break;
}
case GLenum::GL_TEXTURE_BINDING_EXTERNAL_OES: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(findOrZero(checkNotNull(l_ctx).mTextureUnits, checkNotNull(l_ctx).mActiveTextureUnit)).mBindingExternalOes));
break;
}
case GLenum::GL_TEXTURE_BINDING_2D_ARRAY: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(findOrZero(checkNotNull(l_ctx).mTextureUnits, checkNotNull(l_ctx).mActiveTextureUnit)).mBinding2dArray));
break;
}
case GLenum::GL_TEXTURE_BINDING_2D_MULTISAMPLE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(findOrZero(checkNotNull(l_ctx).mTextureUnits, checkNotNull(l_ctx).mActiveTextureUnit)).mBinding2dMultisample));
break;
}
case GLenum::GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(findOrZero(checkNotNull(l_ctx).mTextureUnits, checkNotNull(l_ctx).mActiveTextureUnit)).mBinding2dMultisampleArray));
break;
}
case GLenum::GL_TEXTURE_BINDING_3D: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(findOrZero(checkNotNull(l_ctx).mTextureUnits, checkNotNull(l_ctx).mActiveTextureUnit)).mBinding3d));
break;
}
case GLenum::GL_TEXTURE_BINDING_BUFFER: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(findOrZero(checkNotNull(l_ctx).mTextureUnits, checkNotNull(l_ctx).mActiveTextureUnit)).mBindingBuffer));
break;
}
case GLenum::GL_TEXTURE_BINDING_CUBE_MAP: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(findOrZero(checkNotNull(l_ctx).mTextureUnits, checkNotNull(l_ctx).mActiveTextureUnit)).mBindingCubeMap));
break;
}
case GLenum::GL_TEXTURE_BINDING_CUBE_MAP_ARRAY: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(findOrZero(checkNotNull(l_ctx).mTextureUnits, checkNotNull(l_ctx).mActiveTextureUnit)).mBindingCubeMapArray));
break;
}
case GLenum::GL_TEXTURE_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mTextureBufferOffsetAlignment));
break;
}
case GLenum::GL_TRANSFORM_FEEDBACK_ACTIVE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
std::shared_ptr<TransformFeedback> l__res_0 = subGetBoundTransformFeedback(observer, call);
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l__res_0).mActive);
break;
}
case GLenum::GL_TRANSFORM_FEEDBACK_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mBoundTransformFeedback));
break;
}
case GLenum::GL_TRANSFORM_FEEDBACK_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
if (isIndexed) {
std::shared_ptr<TransformFeedback> l__res_0 = subGetBoundTransformFeedback(observer, call);
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l__res_0).mBuffers, index).mBinding));
} else {
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mBoundBuffers.mTransformFeedbackBuffer));
}
break;
}
case GLenum::GL_TRANSFORM_FEEDBACK_BUFFER_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
if (isIndexed) {
std::shared_ptr<TransformFeedback> l__res_0 = subGetBoundTransformFeedback(observer, call);
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l__res_0).mBuffers, index).mSize));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_TRANSFORM_FEEDBACK_BUFFER_START: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
if (isIndexed) {
std::shared_ptr<TransformFeedback> l__res_0 = subGetBoundTransformFeedback(observer, call);
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l__res_0).mBuffers, index).mStart));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_TRANSFORM_FEEDBACK_PAUSED: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
std::shared_ptr<TransformFeedback> l__res_0 = subGetBoundTransformFeedback(observer, call);
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l__res_0).mPaused);
break;
}
case GLenum::GL_UNIFORM_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
if (isIndexed) {
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mBoundBuffers.mUniformBuffers, index).mBinding));
} else {
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mBoundBuffers.mUniformBuffer));
}
break;
}
case GLenum::GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mUniformBufferOffsetAlignment));
break;
}
case GLenum::GL_UNIFORM_BUFFER_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
if (isIndexed) {
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mBoundBuffers.mUniformBuffers, index).mSize));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_UNIFORM_BUFFER_START: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
if (isIndexed) {
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(findOrZero(checkNotNull(l_ctx).mBoundBuffers.mUniformBuffers, index).mStart));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_UNPACK_ALIGNMENT: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mPixelStorage.mUnpackAlignment));
break;
}
case GLenum::GL_UNPACK_IMAGE_HEIGHT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mPixelStorage.mUnpackImageHeight));
break;
}
case GLenum::GL_UNPACK_ROW_LENGTH: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mPixelStorage.mUnpackRowLength));
break;
}
case GLenum::GL_UNPACK_SKIP_IMAGES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mPixelStorage.mUnpackSkipImages));
break;
}
case GLenum::GL_UNPACK_SKIP_PIXELS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mPixelStorage.mUnpackSkipPixels));
break;
}
case GLenum::GL_UNPACK_SKIP_ROWS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mPixelStorage.mUnpackSkipRows));
break;
}
case GLenum::GL_VERTEX_ARRAY_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mBoundVertexArray));
break;
}
case GLenum::GL_VERTEX_BINDING_DIVISOR: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
VertexBufferBindingIndex l_i = (VertexBufferBindingIndex)(index);
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(findOrZero(checkNotNull(findOrZero(checkNotNull(l_ctx).mInstances.mVertexArrays, checkNotNull(l_ctx).mBoundVertexArray)).mVertexBufferBindings, l_i)).mDivisor));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_VERTEX_BINDING_OFFSET: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
VertexBufferBindingIndex l_i = (VertexBufferBindingIndex)(index);
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(findOrZero(checkNotNull(findOrZero(checkNotNull(l_ctx).mInstances.mVertexArrays, checkNotNull(l_ctx).mBoundVertexArray)).mVertexBufferBindings, l_i)).mOffset));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_VERTEX_BINDING_STRIDE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
VertexBufferBindingIndex l_i = (VertexBufferBindingIndex)(index);
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(findOrZero(checkNotNull(findOrZero(checkNotNull(l_ctx).mInstances.mVertexArrays, checkNotNull(l_ctx).mBoundVertexArray)).mVertexBufferBindings, l_i)).mStride));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_VIEWPORT: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
Slice<GLboolean> l_s = slice(v, 0ULL, 4ULL);
observer->write<GLboolean>(l_s, 0ULL, (GLboolean)(checkNotNull(l_ctx).mRasterization.mViewport.mX));
observer->write<GLboolean>(l_s, 1ULL, (GLboolean)(checkNotNull(l_ctx).mRasterization.mViewport.mY));
observer->write<GLboolean>(l_s, 2ULL, (GLboolean)(checkNotNull(l_ctx).mRasterization.mViewport.mWidth));
observer->write<GLboolean>(l_s, 3ULL, (GLboolean)(checkNotNull(l_ctx).mRasterization.mViewport.mHeight));
break;
}
case GLenum::GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT: {
subRequiresExtension(observer, call, ExtensionId::GL_EXT_texture_filter_anisotropic);
observer->write<GLboolean>(slice(v, 0ULL, 1ULL), 0ULL, (GLboolean)(checkNotNull(l_ctx).mConstants.mMaxTextureMaxAnisotropyExt));
break;
}
case GLenum::GL_GPU_DISJOINT_EXT: {
subRequiresExtension(observer, call, ExtensionId::GL_EXT_disjoint_timer_query);
observer->write(slice(v, 0ULL, 1ULL));
break;
}
default: {
subGlErrorInvalidEnum(observer, call, name);
}
}
return;
}
void GlesSpy::subGetStateVariable_GLfloat(CallObserver* observer, const std::function<void()>& call, uint32_t name, bool isIndexed, GLuint index, GLfloat* v) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
switch (name) {
case GLenum::GL_ACTIVE_TEXTURE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mActiveTextureUnit));
break;
}
case GLenum::GL_ALIASED_LINE_WIDTH_RANGE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
Slice<GLfloat> l_s = slice(v, 0ULL, 2ULL);
observer->write<GLfloat>(l_s, 0ULL, checkNotNull(l_ctx).mConstants.mAliasedLineWidthRange[0ULL]);
observer->write<GLfloat>(l_s, 1ULL, checkNotNull(l_ctx).mConstants.mAliasedLineWidthRange[1ULL]);
break;
}
case GLenum::GL_ALIASED_POINT_SIZE_RANGE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
Slice<GLfloat> l_s = slice(v, 0ULL, 2ULL);
observer->write<GLfloat>(l_s, 0ULL, checkNotNull(l_ctx).mConstants.mAliasedPointSizeRange[0ULL]);
observer->write<GLfloat>(l_s, 1ULL, checkNotNull(l_ctx).mConstants.mAliasedPointSizeRange[1ULL]);
break;
}
case GLenum::GL_ALPHA_BITS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_ARRAY_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mBoundBuffers.mArrayBuffer));
break;
}
case GLenum::GL_ATOMIC_COUNTER_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mBoundBuffers.mAtomicCounterBuffers, index).mBinding));
} else {
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mBoundBuffers.mAtomicCounterBuffer));
}
break;
}
case GLenum::GL_ATOMIC_COUNTER_BUFFER_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mBoundBuffers.mAtomicCounterBuffers, index).mSize));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_ATOMIC_COUNTER_BUFFER_START: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mBoundBuffers.mAtomicCounterBuffers, index).mStart));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_BLEND: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
DrawBufferIndex l_i = (DrawBufferIndex)(index);
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mFragmentOperations.mBlend, l_i).mEnabled));
break;
}
case GLenum::GL_BLEND_COLOR: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
Slice<GLfloat> l_s = slice(v, 0ULL, 4ULL);
observer->write<GLfloat>(l_s, 0ULL, checkNotNull(l_ctx).mFragmentOperations.mBlendColor.mRed);
observer->write<GLfloat>(l_s, 1ULL, checkNotNull(l_ctx).mFragmentOperations.mBlendColor.mGreen);
observer->write<GLfloat>(l_s, 2ULL, checkNotNull(l_ctx).mFragmentOperations.mBlendColor.mBlue);
observer->write<GLfloat>(l_s, 3ULL, checkNotNull(l_ctx).mFragmentOperations.mBlendColor.mAlpha);
break;
}
case GLenum::GL_BLEND_DST_ALPHA: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
DrawBufferIndex l_i = (DrawBufferIndex)(index);
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mFragmentOperations.mBlend, l_i).mDstAlpha));
break;
}
case GLenum::GL_BLEND_DST_RGB: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
DrawBufferIndex l_i = (DrawBufferIndex)(index);
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mFragmentOperations.mBlend, l_i).mDstRgb));
break;
}
case GLenum::GL_BLEND_EQUATION_ALPHA: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
DrawBufferIndex l_i = (DrawBufferIndex)(index);
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mFragmentOperations.mBlend, l_i).mEquationAlpha));
break;
}
case GLenum::GL_BLEND_EQUATION_RGB: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
DrawBufferIndex l_i = (DrawBufferIndex)(index);
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mFragmentOperations.mBlend, l_i).mEquationRgb));
break;
}
case GLenum::GL_BLEND_SRC_ALPHA: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
DrawBufferIndex l_i = (DrawBufferIndex)(index);
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mFragmentOperations.mBlend, l_i).mSrcAlpha));
break;
}
case GLenum::GL_BLEND_SRC_RGB: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
DrawBufferIndex l_i = (DrawBufferIndex)(index);
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mFragmentOperations.mBlend, l_i).mSrcRgb));
break;
}
case GLenum::GL_BLUE_BITS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_COLOR_CLEAR_VALUE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
Slice<GLfloat> l_s = slice(v, 0ULL, 4ULL);
observer->write<GLfloat>(l_s, 0ULL, checkNotNull(l_ctx).mFramebuffer.mColorClearValue[0ULL]);
observer->write<GLfloat>(l_s, 1ULL, checkNotNull(l_ctx).mFramebuffer.mColorClearValue[1ULL]);
observer->write<GLfloat>(l_s, 2ULL, checkNotNull(l_ctx).mFramebuffer.mColorClearValue[2ULL]);
observer->write<GLfloat>(l_s, 3ULL, checkNotNull(l_ctx).mFramebuffer.mColorClearValue[3ULL]);
break;
}
case GLenum::GL_COLOR_WRITEMASK: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
Slice<GLfloat> l_s = slice(v, 0ULL, 4ULL);
DrawBufferIndex l_i = (DrawBufferIndex)(index);
observer->write<GLfloat>(l_s, 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mFramebuffer.mColorWritemask, l_i)[0ULL]));
observer->write<GLfloat>(l_s, 1ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mFramebuffer.mColorWritemask, l_i)[1ULL]));
observer->write<GLfloat>(l_s, 2ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mFramebuffer.mColorWritemask, l_i)[2ULL]));
observer->write<GLfloat>(l_s, 3ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mFramebuffer.mColorWritemask, l_i)[3ULL]));
break;
}
case GLenum::GL_COMPRESSED_TEXTURE_FORMATS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
Slice<GLfloat> l_s = slice(v, 0ULL, uint64_t((checkNotNull(l_ctx).mConstants.mCompressedTextureFormats.size())));
{
int32_t l__ = 0;
for (U32ToGLenum::iterator it = checkNotNull(l_ctx).mConstants.mCompressedTextureFormats.begin(); it != checkNotNull(l_ctx).mConstants.mCompressedTextureFormats.end(); ++it, ++l__) {
uint32_t l_i = it->first;
uint32_t l_f = it->second;
observer->write<GLfloat>(l_s, (uint64_t)(l_i), (GLfloat)(l_f));
}
}
break;
}
case GLenum::GL_CONTEXT_FLAGS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mContextFlags));
break;
}
case GLenum::GL_CONTEXT_ROBUST_ACCESS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_COPY_READ_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mBoundBuffers.mCopyReadBuffer));
break;
}
case GLenum::GL_COPY_WRITE_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mBoundBuffers.mCopyWriteBuffer));
break;
}
case GLenum::GL_CULL_FACE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mRasterization.mCullFace));
break;
}
case GLenum::GL_CULL_FACE_MODE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mRasterization.mCullFaceMode));
break;
}
case GLenum::GL_CURRENT_PROGRAM: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mBoundProgram));
break;
}
case GLenum::GL_DEBUG_GROUP_STACK_DEPTH: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_DEBUG_LOGGED_MESSAGES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_DEPTH_BITS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_DEPTH_CLEAR_VALUE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mFramebuffer.mDepthClearValue);
break;
}
case GLenum::GL_DEPTH_FUNC: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mFragmentOperations.mDepth.mFunc));
break;
}
case GLenum::GL_DEPTH_RANGE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
Slice<GLfloat> l_s = slice(v, 0ULL, 2ULL);
observer->write<GLfloat>(l_s, 0ULL, checkNotNull(l_ctx).mRasterization.mDepthRange[0ULL]);
observer->write<GLfloat>(l_s, 1ULL, checkNotNull(l_ctx).mRasterization.mDepthRange[1ULL]);
break;
}
case GLenum::GL_DEPTH_TEST: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mFragmentOperations.mDepth.mTest));
break;
}
case GLenum::GL_DEPTH_WRITEMASK: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mFramebuffer.mDepthWritemask));
break;
}
case GLenum::GL_DISPATCH_INDIRECT_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mBoundBuffers.mDispatchIndirectBuffer));
break;
}
case GLenum::GL_DITHER: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mFragmentOperations.mDither));
break;
}
case GLenum::GL_DRAW_BUFFER: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_DRAW_BUFFER0: // fall-through...
case GLenum::GL_DRAW_BUFFER1: // fall-through...
case GLenum::GL_DRAW_BUFFER2: // fall-through...
case GLenum::GL_DRAW_BUFFER3: // fall-through...
case GLenum::GL_DRAW_BUFFER4: // fall-through...
case GLenum::GL_DRAW_BUFFER5: // fall-through...
case GLenum::GL_DRAW_BUFFER6: // fall-through...
case GLenum::GL_DRAW_BUFFER7: // fall-through...
case GLenum::GL_DRAW_BUFFER8: // fall-through...
case GLenum::GL_DRAW_BUFFER9: // fall-through...
case GLenum::GL_DRAW_BUFFER10: // fall-through...
case GLenum::GL_DRAW_BUFFER11: // fall-through...
case GLenum::GL_DRAW_BUFFER12: // fall-through...
case GLenum::GL_DRAW_BUFFER13: // fall-through...
case GLenum::GL_DRAW_BUFFER14: // fall-through...
case GLenum::GL_DRAW_BUFFER15: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
std::shared_ptr<Framebuffer> l_framebuffer = subGetBoundFramebufferOrErrorInvalidEnum(observer, call, GLenum::GL_DRAW_FRAMEBUFFER);
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_framebuffer).mDrawBuffer, (GLint)((name) - (GLenum::GL_DRAW_BUFFER0)))));
break;
}
case GLenum::GL_DRAW_FRAMEBUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mBoundFramebuffers, GLenum::GL_FRAMEBUFFER)));
break;
}
case GLenum::GL_ELEMENT_ARRAY_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(findOrZero(checkNotNull(l_ctx).mInstances.mVertexArrays, checkNotNull(l_ctx).mBoundVertexArray)).mElementArrayBuffer));
break;
}
case GLenum::GL_FRAGMENT_INTERPOLATION_OFFSET_BITS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mFragmentInterpolationOffsetBits));
break;
}
case GLenum::GL_FRAGMENT_SHADER_DERIVATIVE_HINT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_FRONT_FACE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mRasterization.mFrontFace));
break;
}
case GLenum::GL_GENERATE_MIPMAP_HINT: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mMiscellaneous.mGenerateMipmapHint));
break;
}
case GLenum::GL_GREEN_BITS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_IMAGE_BINDING_NAME: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mImageUnits, index).mName));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_IMAGE_BINDING_LEVEL: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mImageUnits, index).mLevel));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_IMAGE_BINDING_LAYERED: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mImageUnits, index).mLayered));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_IMAGE_BINDING_LAYER: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mImageUnits, index).mLayer));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_IMAGE_BINDING_ACCESS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mImageUnits, index).mAccess));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_IMAGE_BINDING_FORMAT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mImageUnits, index).mFormat));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_IMPLEMENTATION_COLOR_READ_FORMAT: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_IMPLEMENTATION_COLOR_READ_TYPE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_LAYER_PROVOKING_VERTEX: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mLayerProvokingVertex));
break;
}
case GLenum::GL_LINE_WIDTH: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mRasterization.mLineWidth);
break;
}
case GLenum::GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mPrimitiveRestartForPatchesSupported));
break;
}
case GLenum::GL_MAJOR_VERSION: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMajorVersion));
break;
}
case GLenum::GL_MAX_3D_TEXTURE_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMax3dTextureSize));
break;
}
case GLenum::GL_MAX_ARRAY_TEXTURE_LAYERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxArrayTextureLayers));
break;
}
case GLenum::GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxAtomicCounterBufferBindings));
break;
}
case GLenum::GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxAtomicCounterBufferSize));
break;
}
case GLenum::GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxCombinedAtomicCounterBuffers));
break;
}
case GLenum::GL_MAX_COLOR_ATTACHMENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxColorAttachments));
break;
}
case GLenum::GL_MAX_COLOR_TEXTURE_SAMPLES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxColorTextureSamples));
break;
}
case GLenum::GL_MAX_DEPTH_TEXTURE_SAMPLES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxDepthTextureSamples));
break;
}
case GLenum::GL_MAX_COMBINED_ATOMIC_COUNTERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxCombinedAtomicCounters));
break;
}
case GLenum::GL_MAX_IMAGE_UNITS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxImageUnits));
break;
}
case GLenum::GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxCombinedComputeUniformComponents));
break;
}
case GLenum::GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxCombinedFragmentUniformComponents));
break;
}
case GLenum::GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxCombinedGeometryUniformComponents));
break;
}
case GLenum::GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxCombinedShaderStorageBlocks));
break;
}
case GLenum::GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxCombinedTessControlUniformComponents));
break;
}
case GLenum::GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxCombinedTessEvaluationUniformComponents));
break;
}
case GLenum::GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxCombinedTextureImageUnits));
break;
}
case GLenum::GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxCombinedShaderOutputResources));
break;
}
case GLenum::GL_MAX_COMBINED_UNIFORM_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxCombinedUniformBlocks));
break;
}
case GLenum::GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxCombinedVertexUniformComponents));
break;
}
case GLenum::GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxComputeAtomicCounterBuffers));
break;
}
case GLenum::GL_MAX_COMPUTE_ATOMIC_COUNTERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxComputeAtomicCounters));
break;
}
case GLenum::GL_MAX_COMPUTE_IMAGE_UNIFORMS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxComputeImageUniforms));
break;
}
case GLenum::GL_MAX_COMBINED_IMAGE_UNIFORMS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxCombinedImageUniforms));
break;
}
case GLenum::GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxComputeShaderStorageBlocks));
break;
}
case GLenum::GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxComputeTextureImageUnits));
break;
}
case GLenum::GL_MAX_COMPUTE_SHARED_MEMORY_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxComputeSharedMemorySize));
break;
}
case GLenum::GL_MAX_COMPUTE_UNIFORM_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxComputeUniformBlocks));
break;
}
case GLenum::GL_MAX_COMPUTE_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxComputeUniformComponents));
break;
}
case GLenum::GL_MAX_COMPUTE_WORK_GROUP_COUNT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxComputeWorkGroupCount[index]));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxComputeWorkGroupInvocations));
break;
}
case GLenum::GL_MAX_COMPUTE_WORK_GROUP_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxComputeWorkGroupSize[index]));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_MAX_CUBE_MAP_TEXTURE_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxCubeMapTextureSize));
break;
}
case GLenum::GL_MAX_DEBUG_GROUP_STACK_DEPTH: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxDebugGroupStackDepth));
break;
}
case GLenum::GL_MAX_DEBUG_LOGGED_MESSAGES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxDebugLoggedMessages));
break;
}
case GLenum::GL_MAX_DEBUG_MESSAGE_LENGTH: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxDebugMessageLength));
break;
}
case GLenum::GL_MAX_DRAW_BUFFERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxDrawBuffers));
break;
}
case GLenum::GL_MAX_ELEMENT_INDEX: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxElementIndex));
break;
}
case GLenum::GL_MAX_ELEMENTS_INDICES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxElementsIndices));
break;
}
case GLenum::GL_MAX_ELEMENTS_VERTICES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxElementsVertices));
break;
}
case GLenum::GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxFragmentAtomicCounterBuffers));
break;
}
case GLenum::GL_MAX_FRAGMENT_ATOMIC_COUNTERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxFragmentAtomicCounters));
break;
}
case GLenum::GL_MAX_FRAGMENT_IMAGE_UNIFORMS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxFragmentImageUniforms));
break;
}
case GLenum::GL_MAX_FRAGMENT_INPUT_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxFragmentInputComponents));
break;
}
case GLenum::GL_MAX_FRAGMENT_INTERPOLATION_OFFSET: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mConstants.mMaxFragmentInterpolationOffset);
break;
}
case GLenum::GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxFragmentShaderStorageBlocks));
break;
}
case GLenum::GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMinProgramTextureGatherOffset));
break;
}
case GLenum::GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxProgramTextureGatherOffset));
break;
}
case GLenum::GL_MAX_FRAGMENT_UNIFORM_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxFragmentUniformBlocks));
break;
}
case GLenum::GL_MAX_FRAGMENT_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxFragmentUniformComponents));
break;
}
case GLenum::GL_MAX_FRAGMENT_UNIFORM_VECTORS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxFragmentUniformVectors));
break;
}
case GLenum::GL_MAX_FRAMEBUFFER_HEIGHT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxFramebufferHeight));
break;
}
case GLenum::GL_MAX_FRAMEBUFFER_LAYERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxFramebufferLayers));
break;
}
case GLenum::GL_MAX_FRAMEBUFFER_SAMPLES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxFramebufferSamples));
break;
}
case GLenum::GL_MAX_FRAMEBUFFER_WIDTH: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxFramebufferWidth));
break;
}
case GLenum::GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxGeometryAtomicCounterBuffers));
break;
}
case GLenum::GL_MAX_GEOMETRY_ATOMIC_COUNTERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxGeometryAtomicCounters));
break;
}
case GLenum::GL_MAX_GEOMETRY_IMAGE_UNIFORMS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxGeometryImageUniforms));
break;
}
case GLenum::GL_MAX_GEOMETRY_INPUT_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxGeometryInputComponents));
break;
}
case GLenum::GL_MAX_GEOMETRY_OUTPUT_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxGeometryOutputComponents));
break;
}
case GLenum::GL_MAX_GEOMETRY_OUTPUT_VERTICES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxGeometryOutputVertices));
break;
}
case GLenum::GL_MAX_GEOMETRY_SHADER_INVOCATIONS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxGeometryShaderInvocations));
break;
}
case GLenum::GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxGeometryShaderStorageBlocks));
break;
}
case GLenum::GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxGeometryTextureImageUnits));
break;
}
case GLenum::GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxGeometryTotalOutputComponents));
break;
}
case GLenum::GL_MAX_GEOMETRY_UNIFORM_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxGeometryUniformBlocks));
break;
}
case GLenum::GL_MAX_GEOMETRY_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxGeometryUniformComponents));
break;
}
case GLenum::GL_MAX_INTEGER_SAMPLES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxIntegerSamples));
break;
}
case GLenum::GL_MAX_LABEL_LENGTH: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxLabelLength));
break;
}
case GLenum::GL_MAX_PROGRAM_TEXEL_OFFSET: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxProgramTexelOffset));
break;
}
case GLenum::GL_MAX_RENDERBUFFER_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxRenderbufferSize));
break;
}
case GLenum::GL_MAX_SAMPLE_MASK_WORDS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxSampleMaskWords));
break;
}
case GLenum::GL_MAX_SAMPLES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_MAX_SERVER_WAIT_TIMEOUT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxServerWaitTimeout));
break;
}
case GLenum::GL_MAX_SHADER_STORAGE_BLOCK_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxShaderStorageBlockSize));
break;
}
case GLenum::GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxShaderStorageBufferBindings));
break;
}
case GLenum::GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTessControlAtomicCounterBuffers));
break;
}
case GLenum::GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTessControlAtomicCounters));
break;
}
case GLenum::GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTessControlImageUniforms));
break;
}
case GLenum::GL_MAX_TESS_CONTROL_INPUT_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTessControlInputComponents));
break;
}
case GLenum::GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTessControlOutputComponents));
break;
}
case GLenum::GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTessControlShaderStorageBlocks));
break;
}
case GLenum::GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTessControlTextureImageUnits));
break;
}
case GLenum::GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTessControlTotalOutputComponents));
break;
}
case GLenum::GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTessControlUniformBlocks));
break;
}
case GLenum::GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTessControlUniformComponents));
break;
}
case GLenum::GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTessEvaluationAtomicCounterBuffers));
break;
}
case GLenum::GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTessEvaluationAtomicCounters));
break;
}
case GLenum::GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTessEvaluationImageUniforms));
break;
}
case GLenum::GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTessEvaluationInputComponents));
break;
}
case GLenum::GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTessEvaluationOutputComponents));
break;
}
case GLenum::GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTessEvaluationShaderStorageBlocks));
break;
}
case GLenum::GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTessEvaluationTextureImageUnits));
break;
}
case GLenum::GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTessEvaluationUniformBlocks));
break;
}
case GLenum::GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTessEvaluationUniformComponents));
break;
}
case GLenum::GL_MAX_TESS_GEN_LEVEL: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTessGenLevel));
break;
}
case GLenum::GL_MAX_PATCH_VERTICES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxPatchVertices));
break;
}
case GLenum::GL_MAX_TESS_PATCH_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTessPatchComponents));
break;
}
case GLenum::GL_MAX_TEXTURE_BUFFER_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTextureBufferSize));
break;
}
case GLenum::GL_MAX_TEXTURE_IMAGE_UNITS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTextureImageUnits));
break;
}
case GLenum::GL_MAX_TEXTURE_LOD_BIAS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mConstants.mMaxTextureLodBias);
break;
}
case GLenum::GL_MAX_TEXTURE_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTextureSize));
break;
}
case GLenum::GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTransformFeedbackInterleavedComponents));
break;
}
case GLenum::GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTransformFeedbackSeparateAttribs));
break;
}
case GLenum::GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxTransformFeedbackSeparateComponents));
break;
}
case GLenum::GL_MAX_UNIFORM_BLOCK_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxUniformBlockSize));
break;
}
case GLenum::GL_MAX_UNIFORM_BUFFER_BINDINGS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxUniformBufferBindings));
break;
}
case GLenum::GL_MAX_UNIFORM_LOCATIONS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxUniformLocations));
break;
}
case GLenum::GL_MAX_VARYING_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxVaryingComponents));
break;
}
case GLenum::GL_MAX_VARYING_VECTORS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxVaryingVectors));
break;
}
case GLenum::GL_MAX_VERTEX_ATOMIC_COUNTERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxVertexAtomicCounters));
break;
}
case GLenum::GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxVertexAtomicCounterBuffers));
break;
}
case GLenum::GL_MAX_VERTEX_ATTRIB_BINDINGS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxVertexAttribBindings));
break;
}
case GLenum::GL_MAX_VERTEX_ATTRIB_STRIDE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxVertexAttribStride));
break;
}
case GLenum::GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxVertexAttribRelativeOffset));
break;
}
case GLenum::GL_MAX_VERTEX_ATTRIBS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxVertexAttribs));
break;
}
case GLenum::GL_MAX_VERTEX_IMAGE_UNIFORMS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxVertexImageUniforms));
break;
}
case GLenum::GL_MAX_VERTEX_OUTPUT_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxVertexOutputComponents));
break;
}
case GLenum::GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxVertexShaderStorageBlocks));
break;
}
case GLenum::GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxVertexTextureImageUnits));
break;
}
case GLenum::GL_MAX_VERTEX_UNIFORM_BLOCKS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxVertexUniformBlocks));
break;
}
case GLenum::GL_MAX_VERTEX_UNIFORM_COMPONENTS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxVertexUniformComponents));
break;
}
case GLenum::GL_MAX_VERTEX_UNIFORM_VECTORS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxVertexUniformVectors));
break;
}
case GLenum::GL_MAX_VIEWPORT_DIMS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
Slice<GLfloat> l_s = slice(v, 0ULL, 2ULL);
observer->write<GLfloat>(l_s, 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxViewportDims[0ULL]));
observer->write<GLfloat>(l_s, 1ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMaxViewportDims[1ULL]));
break;
}
case GLenum::GL_MIN_FRAGMENT_INTERPOLATION_OFFSET: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mConstants.mMinFragmentInterpolationOffset);
break;
}
case GLenum::GL_MIN_PROGRAM_TEXEL_OFFSET: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMinProgramTexelOffset));
break;
}
case GLenum::GL_MIN_SAMPLE_SHADING_VALUE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mRasterization.mMinSampleShadingValue);
break;
}
case GLenum::GL_MINOR_VERSION: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mMinorVersion));
break;
}
case GLenum::GL_MULTISAMPLE_LINE_WIDTH_RANGE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
Slice<GLfloat> l_s = slice(v, 0ULL, 2ULL);
observer->write<GLfloat>(l_s, 0ULL, checkNotNull(l_ctx).mConstants.mMultisampleLineWidthRange[0ULL]);
observer->write<GLfloat>(l_s, 1ULL, checkNotNull(l_ctx).mConstants.mMultisampleLineWidthRange[1ULL]);
break;
}
case GLenum::GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mConstants.mMultisampleLineWidthGranularity);
break;
}
case GLenum::GL_NUM_COMPRESSED_TEXTURE_FORMATS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(int32_t((checkNotNull(l_ctx).mConstants.mCompressedTextureFormats.size()))));
break;
}
case GLenum::GL_NUM_EXTENSIONS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(int32_t((checkNotNull(l_ctx).mConstants.mExtensions.size()))));
break;
}
case GLenum::GL_NUM_PROGRAM_BINARY_FORMATS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(int32_t((checkNotNull(l_ctx).mConstants.mProgramBinaryFormats.size()))));
break;
}
case GLenum::GL_NUM_SHADER_BINARY_FORMATS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(int32_t((checkNotNull(l_ctx).mConstants.mShaderBinaryFormats.size()))));
break;
}
case GLenum::GL_PACK_ALIGNMENT: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mPixelStorage.mPackAlignment));
break;
}
case GLenum::GL_PACK_IMAGE_HEIGHT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mPixelStorage.mPackImageHeight));
break;
}
case GLenum::GL_PACK_ROW_LENGTH: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mPixelStorage.mPackRowLength));
break;
}
case GLenum::GL_PACK_SKIP_IMAGES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mPixelStorage.mPackSkipImages));
break;
}
case GLenum::GL_PACK_SKIP_PIXELS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mPixelStorage.mPackSkipPixels));
break;
}
case GLenum::GL_PACK_SKIP_ROWS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mPixelStorage.mPackSkipRows));
break;
}
case GLenum::GL_PATCH_VERTICES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_PIXEL_PACK_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mBoundBuffers.mPixelPackBuffer));
break;
}
case GLenum::GL_PIXEL_UNPACK_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mBoundBuffers.mPixelUnpackBuffer));
break;
}
case GLenum::GL_POLYGON_OFFSET_FACTOR: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mRasterization.mPolygonOffsetFactor);
break;
}
case GLenum::GL_POLYGON_OFFSET_FILL: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mRasterization.mPolygonOffsetFill));
break;
}
case GLenum::GL_POLYGON_OFFSET_UNITS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mRasterization.mPolygonOffsetUnits);
break;
}
case GLenum::GL_PRIMITIVE_BOUNDING_BOX: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write(slice(v, 0ULL, 8ULL));
break;
}
case GLenum::GL_PRIMITIVE_RESTART_FIXED_INDEX: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mMiscellaneous.mPrimitiveRestartFixedIndex));
break;
}
case GLenum::GL_PROGRAM_BINARY_FORMATS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
Slice<GLfloat> l_s = slice(v, 0ULL, uint64_t((checkNotNull(l_ctx).mConstants.mProgramBinaryFormats.size())));
{
int32_t l__ = 0;
for (U32ToGLenum::iterator it = checkNotNull(l_ctx).mConstants.mProgramBinaryFormats.begin(); it != checkNotNull(l_ctx).mConstants.mProgramBinaryFormats.end(); ++it, ++l__) {
uint32_t l_i = it->first;
uint32_t l_f = it->second;
observer->write<GLfloat>(l_s, (uint64_t)(l_i), (GLfloat)(l_f));
}
}
break;
}
case GLenum::GL_PROGRAM_PIPELINE_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_RASTERIZER_DISCARD: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mRasterization.mRasterizerDiscard));
break;
}
case GLenum::GL_READ_BUFFER: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_READ_FRAMEBUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mBoundFramebuffers, GLenum::GL_READ_FRAMEBUFFER)));
break;
}
case GLenum::GL_RED_BITS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_RENDERBUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mBoundRenderbuffers, GLenum::GL_RENDERBUFFER)));
break;
}
case GLenum::GL_RESET_NOTIFICATION_STRATEGY: {
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_SAMPLE_ALPHA_TO_COVERAGE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mRasterization.mSampleAlphaToCoverage));
break;
}
case GLenum::GL_SAMPLE_BUFFERS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_SAMPLE_COVERAGE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mRasterization.mSampleCoverage));
break;
}
case GLenum::GL_SAMPLE_COVERAGE_INVERT: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mRasterization.mSampleCoverageInvert));
break;
}
case GLenum::GL_SAMPLE_COVERAGE_VALUE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mRasterization.mSampleCoverageValue);
break;
}
case GLenum::GL_SAMPLE_SHADING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_SAMPLER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_SAMPLES: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_SCISSOR_BOX: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
Slice<GLfloat> l_s = slice(v, 0ULL, 4ULL);
observer->write<GLfloat>(l_s, 0ULL, (GLfloat)(checkNotNull(l_ctx).mFragmentOperations.mScissor.mBox.mX));
observer->write<GLfloat>(l_s, 1ULL, (GLfloat)(checkNotNull(l_ctx).mFragmentOperations.mScissor.mBox.mY));
observer->write<GLfloat>(l_s, 2ULL, (GLfloat)(checkNotNull(l_ctx).mFragmentOperations.mScissor.mBox.mWidth));
observer->write<GLfloat>(l_s, 3ULL, (GLfloat)(checkNotNull(l_ctx).mFragmentOperations.mScissor.mBox.mHeight));
break;
}
case GLenum::GL_SCISSOR_TEST: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mFragmentOperations.mScissor.mTest));
break;
}
case GLenum::GL_SHADER_BINARY_FORMATS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
Slice<GLfloat> l_s = slice(v, 0ULL, uint64_t((checkNotNull(l_ctx).mConstants.mShaderBinaryFormats.size())));
{
int32_t l__ = 0;
for (U32ToGLenum::iterator it = checkNotNull(l_ctx).mConstants.mShaderBinaryFormats.begin(); it != checkNotNull(l_ctx).mConstants.mShaderBinaryFormats.end(); ++it, ++l__) {
uint32_t l_i = it->first;
uint32_t l_f = it->second;
observer->write<GLfloat>(l_s, (uint64_t)(l_i), (GLfloat)(l_f));
}
}
break;
}
case GLenum::GL_SHADER_COMPILER: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mShaderCompiler));
break;
}
case GLenum::GL_SHADER_STORAGE_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mBoundBuffers.mShaderStorageBuffers, index).mBinding));
} else {
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mBoundBuffers.mShaderStorageBuffer));
}
break;
}
case GLenum::GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mShaderStorageBufferOffsetAlignment));
break;
}
case GLenum::GL_SHADER_STORAGE_BUFFER_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mBoundBuffers.mShaderStorageBuffers, index).mSize));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_SHADER_STORAGE_BUFFER_START: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mBoundBuffers.mShaderStorageBuffers, index).mStart));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_STENCIL_BACK_FAIL: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mBackFail));
break;
}
case GLenum::GL_STENCIL_BACK_FUNC: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mBackFunc));
break;
}
case GLenum::GL_STENCIL_BACK_PASS_DEPTH_FAIL: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mBackPassDepthFail));
break;
}
case GLenum::GL_STENCIL_BACK_PASS_DEPTH_PASS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mBackPassDepthPass));
break;
}
case GLenum::GL_STENCIL_BACK_REF: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mBackRef));
break;
}
case GLenum::GL_STENCIL_BACK_VALUE_MASK: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mBackValueMask));
break;
}
case GLenum::GL_STENCIL_BACK_WRITEMASK: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mFramebuffer.mStencilBackWritemask));
break;
}
case GLenum::GL_STENCIL_BITS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_STENCIL_CLEAR_VALUE: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mFramebuffer.mStencilClearValue));
break;
}
case GLenum::GL_STENCIL_FAIL: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mFail));
break;
}
case GLenum::GL_STENCIL_FUNC: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mFunc));
break;
}
case GLenum::GL_STENCIL_PASS_DEPTH_FAIL: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mPassDepthFail));
break;
}
case GLenum::GL_STENCIL_PASS_DEPTH_PASS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mPassDepthPass));
break;
}
case GLenum::GL_STENCIL_REF: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mRef));
break;
}
case GLenum::GL_STENCIL_TEST: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mTest));
break;
}
case GLenum::GL_STENCIL_VALUE_MASK: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mFragmentOperations.mStencil.mValueMask));
break;
}
case GLenum::GL_STENCIL_WRITEMASK: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mFramebuffer.mStencilWritemask));
break;
}
case GLenum::GL_SUBPIXEL_BITS: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mSubpixelBits));
break;
}
case GLenum::GL_TEXTURE_BINDING_2D: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(findOrZero(checkNotNull(l_ctx).mTextureUnits, checkNotNull(l_ctx).mActiveTextureUnit)).mBinding2d));
break;
}
case GLenum::GL_TEXTURE_BINDING_EXTERNAL_OES: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(findOrZero(checkNotNull(l_ctx).mTextureUnits, checkNotNull(l_ctx).mActiveTextureUnit)).mBindingExternalOes));
break;
}
case GLenum::GL_TEXTURE_BINDING_2D_ARRAY: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(findOrZero(checkNotNull(l_ctx).mTextureUnits, checkNotNull(l_ctx).mActiveTextureUnit)).mBinding2dArray));
break;
}
case GLenum::GL_TEXTURE_BINDING_2D_MULTISAMPLE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(findOrZero(checkNotNull(l_ctx).mTextureUnits, checkNotNull(l_ctx).mActiveTextureUnit)).mBinding2dMultisample));
break;
}
case GLenum::GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(findOrZero(checkNotNull(l_ctx).mTextureUnits, checkNotNull(l_ctx).mActiveTextureUnit)).mBinding2dMultisampleArray));
break;
}
case GLenum::GL_TEXTURE_BINDING_3D: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(findOrZero(checkNotNull(l_ctx).mTextureUnits, checkNotNull(l_ctx).mActiveTextureUnit)).mBinding3d));
break;
}
case GLenum::GL_TEXTURE_BINDING_BUFFER: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(findOrZero(checkNotNull(l_ctx).mTextureUnits, checkNotNull(l_ctx).mActiveTextureUnit)).mBindingBuffer));
break;
}
case GLenum::GL_TEXTURE_BINDING_CUBE_MAP: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(findOrZero(checkNotNull(l_ctx).mTextureUnits, checkNotNull(l_ctx).mActiveTextureUnit)).mBindingCubeMap));
break;
}
case GLenum::GL_TEXTURE_BINDING_CUBE_MAP_ARRAY: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(findOrZero(checkNotNull(l_ctx).mTextureUnits, checkNotNull(l_ctx).mActiveTextureUnit)).mBindingCubeMapArray));
break;
}
case GLenum::GL_TEXTURE_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write(slice(v, 0ULL, 1ULL));
break;
}
case GLenum::GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mTextureBufferOffsetAlignment));
break;
}
case GLenum::GL_TRANSFORM_FEEDBACK_ACTIVE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
std::shared_ptr<TransformFeedback> l__res_0 = subGetBoundTransformFeedback(observer, call);
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l__res_0).mActive));
break;
}
case GLenum::GL_TRANSFORM_FEEDBACK_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mBoundTransformFeedback));
break;
}
case GLenum::GL_TRANSFORM_FEEDBACK_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
if (isIndexed) {
std::shared_ptr<TransformFeedback> l__res_0 = subGetBoundTransformFeedback(observer, call);
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l__res_0).mBuffers, index).mBinding));
} else {
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mBoundBuffers.mTransformFeedbackBuffer));
}
break;
}
case GLenum::GL_TRANSFORM_FEEDBACK_BUFFER_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
if (isIndexed) {
std::shared_ptr<TransformFeedback> l__res_0 = subGetBoundTransformFeedback(observer, call);
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l__res_0).mBuffers, index).mSize));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_TRANSFORM_FEEDBACK_BUFFER_START: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
if (isIndexed) {
std::shared_ptr<TransformFeedback> l__res_0 = subGetBoundTransformFeedback(observer, call);
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l__res_0).mBuffers, index).mStart));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_TRANSFORM_FEEDBACK_PAUSED: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
std::shared_ptr<TransformFeedback> l__res_0 = subGetBoundTransformFeedback(observer, call);
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l__res_0).mPaused));
break;
}
case GLenum::GL_UNIFORM_BUFFER_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
if (isIndexed) {
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mBoundBuffers.mUniformBuffers, index).mBinding));
} else {
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mBoundBuffers.mUniformBuffer));
}
break;
}
case GLenum::GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mConstants.mUniformBufferOffsetAlignment));
break;
}
case GLenum::GL_UNIFORM_BUFFER_SIZE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
if (isIndexed) {
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mBoundBuffers.mUniformBuffers, index).mSize));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_UNIFORM_BUFFER_START: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
if (isIndexed) {
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(findOrZero(checkNotNull(l_ctx).mBoundBuffers.mUniformBuffers, index).mStart));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_UNPACK_ALIGNMENT: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mPixelStorage.mUnpackAlignment));
break;
}
case GLenum::GL_UNPACK_IMAGE_HEIGHT: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mPixelStorage.mUnpackImageHeight));
break;
}
case GLenum::GL_UNPACK_ROW_LENGTH: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mPixelStorage.mUnpackRowLength));
break;
}
case GLenum::GL_UNPACK_SKIP_IMAGES: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mPixelStorage.mUnpackSkipImages));
break;
}
case GLenum::GL_UNPACK_SKIP_PIXELS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mPixelStorage.mUnpackSkipPixels));
break;
}
case GLenum::GL_UNPACK_SKIP_ROWS: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mPixelStorage.mUnpackSkipRows));
break;
}
case GLenum::GL_VERTEX_ARRAY_BINDING: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_ctx).mBoundVertexArray));
break;
}
case GLenum::GL_VERTEX_BINDING_DIVISOR: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
VertexBufferBindingIndex l_i = (VertexBufferBindingIndex)(index);
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(findOrZero(checkNotNull(findOrZero(checkNotNull(l_ctx).mInstances.mVertexArrays, checkNotNull(l_ctx).mBoundVertexArray)).mVertexBufferBindings, l_i)).mDivisor));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_VERTEX_BINDING_OFFSET: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
VertexBufferBindingIndex l_i = (VertexBufferBindingIndex)(index);
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(findOrZero(checkNotNull(findOrZero(checkNotNull(l_ctx).mInstances.mVertexArrays, checkNotNull(l_ctx).mBoundVertexArray)).mVertexBufferBindings, l_i)).mOffset));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_VERTEX_BINDING_STRIDE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
if (isIndexed) {
VertexBufferBindingIndex l_i = (VertexBufferBindingIndex)(index);
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(findOrZero(checkNotNull(findOrZero(checkNotNull(l_ctx).mInstances.mVertexArrays, checkNotNull(l_ctx).mBoundVertexArray)).mVertexBufferBindings, l_i)).mStride));
} else {
subGlErrorInvalidEnum(observer, call, name);
}
break;
}
case GLenum::GL_VIEWPORT: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
Slice<GLfloat> l_s = slice(v, 0ULL, 4ULL);
observer->write<GLfloat>(l_s, 0ULL, (GLfloat)(checkNotNull(l_ctx).mRasterization.mViewport.mX));
observer->write<GLfloat>(l_s, 1ULL, (GLfloat)(checkNotNull(l_ctx).mRasterization.mViewport.mY));
observer->write<GLfloat>(l_s, 2ULL, (GLfloat)(checkNotNull(l_ctx).mRasterization.mViewport.mWidth));
observer->write<GLfloat>(l_s, 3ULL, (GLfloat)(checkNotNull(l_ctx).mRasterization.mViewport.mHeight));
break;
}
case GLenum::GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT: {
subRequiresExtension(observer, call, ExtensionId::GL_EXT_texture_filter_anisotropic);
observer->write<GLfloat>(slice(v, 0ULL, 1ULL), 0ULL, checkNotNull(l_ctx).mConstants.mMaxTextureMaxAnisotropyExt);
break;
}
case GLenum::GL_GPU_DISJOINT_EXT: {
subRequiresExtension(observer, call, ExtensionId::GL_EXT_disjoint_timer_query);
observer->write(slice(v, 0ULL, 1ULL));
break;
}
default: {
subGlErrorInvalidEnum(observer, call, name);
}
}
return;
}
void GlesSpy::subGetSamplerParameterv_GLfloat(CallObserver* observer, const std::function<void()>& call, SamplerId sampler, uint32_t pname, GLfloat* params) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
std::shared_ptr<Sampler> l_s = findOrZero(checkNotNull(l_ctx).mInstances.mSamplers, sampler);
switch (pname) {
case GLenum::GL_TEXTURE_COMPARE_FUNC: {
observer->write<GLfloat>(slice(params, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_s).mCompareFunc));
break;
}
case GLenum::GL_TEXTURE_COMPARE_MODE: {
observer->write<GLfloat>(slice(params, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_s).mCompareMode));
break;
}
case GLenum::GL_TEXTURE_MIN_FILTER: {
observer->write<GLfloat>(slice(params, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_s).mMinFilter));
break;
}
case GLenum::GL_TEXTURE_MAG_FILTER: {
observer->write<GLfloat>(slice(params, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_s).mMagFilter));
break;
}
case GLenum::GL_TEXTURE_MIN_LOD: {
observer->write<GLfloat>(slice(params, 0ULL, 1ULL), 0ULL, checkNotNull(l_s).mMinLod);
break;
}
case GLenum::GL_TEXTURE_MAX_LOD: {
observer->write<GLfloat>(slice(params, 0ULL, 1ULL), 0ULL, checkNotNull(l_s).mMaxLod);
break;
}
case GLenum::GL_TEXTURE_WRAP_R: {
observer->write<GLfloat>(slice(params, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_s).mWrapR));
break;
}
case GLenum::GL_TEXTURE_WRAP_S: {
observer->write<GLfloat>(slice(params, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_s).mWrapS));
break;
}
case GLenum::GL_TEXTURE_WRAP_T: {
observer->write<GLfloat>(slice(params, 0ULL, 1ULL), 0ULL, (GLfloat)(checkNotNull(l_s).mWrapT));
break;
}
case GLenum::GL_TEXTURE_BORDER_COLOR: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
Slice<GLfloat> l_p = slice(params, 0ULL, 4ULL);
observer->write<GLfloat>(l_p, 0ULL, checkNotNull(l_s).mBorderColor[0ULL]);
observer->write<GLfloat>(l_p, 1ULL, checkNotNull(l_s).mBorderColor[1ULL]);
observer->write<GLfloat>(l_p, 2ULL, checkNotNull(l_s).mBorderColor[2ULL]);
observer->write<GLfloat>(l_p, 3ULL, checkNotNull(l_s).mBorderColor[3ULL]);
break;
}
case GLenum::GL_TEXTURE_MAX_ANISOTROPY_EXT: {
subRequiresExtension(observer, call, ExtensionId::GL_EXT_texture_filter_anisotropic);
observer->write<GLfloat>(slice(params, 0ULL, 1ULL), 0ULL, checkNotNull(l_s).mMaxAnisotropy);
break;
}
default: {
subGlErrorInvalidEnum(observer, call, pname);
}
}
return;
}
void GlesSpy::subSamplerParameterv_Vec1f(CallObserver* observer, const std::function<void()>& call, SamplerId sampler, uint32_t pname, Vec1f params) {
std::shared_ptr<Context> l_ctx = subGetContext(observer, call);
std::shared_ptr<Sampler> l_s = findOrZero(checkNotNull(l_ctx).mInstances.mSamplers, sampler);
switch (pname) {
case GLenum::GL_TEXTURE_COMPARE_FUNC: {
checkNotNull(l_s).mCompareFunc = (uint32_t)(params[0ULL]);
break;
}
case GLenum::GL_TEXTURE_COMPARE_MODE: {
checkNotNull(l_s).mCompareMode = (uint32_t)(params[0ULL]);
break;
}
case GLenum::GL_TEXTURE_MIN_FILTER: {
checkNotNull(l_s).mMinFilter = (uint32_t)(params[0ULL]);
break;
}
case GLenum::GL_TEXTURE_MAG_FILTER: {
checkNotNull(l_s).mMagFilter = (uint32_t)(params[0ULL]);
break;
}
case GLenum::GL_TEXTURE_MIN_LOD: {
checkNotNull(l_s).mMinLod = params[0ULL];
break;
}
case GLenum::GL_TEXTURE_MAX_LOD: {
checkNotNull(l_s).mMaxLod = params[0ULL];
break;
}
case GLenum::GL_TEXTURE_WRAP_R: {
checkNotNull(l_s).mWrapR = (uint32_t)(params[0ULL]);
break;
}
case GLenum::GL_TEXTURE_WRAP_S: {
checkNotNull(l_s).mWrapS = (uint32_t)(params[0ULL]);
break;
}
case GLenum::GL_TEXTURE_WRAP_T: {
checkNotNull(l_s).mWrapT = (uint32_t)(params[0ULL]);
break;
}
case GLenum::GL_TEXTURE_BORDER_COLOR: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
break;
}
case GLenum::GL_TEXTURE_MAX_ANISOTROPY_EXT: {
subRequiresExtension(observer, call, ExtensionId::GL_EXT_texture_filter_anisotropic);
checkNotNull(l_s).mMaxAnisotropy = params[0ULL];
break;
}
default: {
subGlErrorInvalidEnum(observer, call, pname);
}
}
return;
}
void GlesSpy::subTexParameterv_GLfloat__CP(CallObserver* observer, const std::function<void()>& call, uint32_t target, uint32_t pname, GLfloat* params) {
if ((target) == (GLenum::GL_TEXTURE_BUFFER)) {
subGlErrorInvalidEnum(observer, call, target);
}
std::shared_ptr<Texture> l_t = subGetBoundTextureOrErrorInvalidEnum(observer, call, target);
switch (pname) {
case GLenum::GL_TEXTURE_MAG_FILTER: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
uint32_t l_magFilter = (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
switch (l_magFilter) {
case GLenum::GL_NEAREST: // fall-through...
case GLenum::GL_LINEAR: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, l_magFilter);
}
}
checkNotNull(l_t).mMagFilter = l_magFilter;
break;
}
case GLenum::GL_TEXTURE_MIN_FILTER: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
uint32_t l_minFilter = (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
switch (l_minFilter) {
case GLenum::GL_NEAREST: // fall-through...
case GLenum::GL_LINEAR: // fall-through...
case GLenum::GL_NEAREST_MIPMAP_NEAREST: // fall-through...
case GLenum::GL_LINEAR_MIPMAP_NEAREST: // fall-through...
case GLenum::GL_NEAREST_MIPMAP_LINEAR: // fall-through...
case GLenum::GL_LINEAR_MIPMAP_LINEAR: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, l_minFilter);
}
}
checkNotNull(l_t).mMinFilter = l_minFilter;
break;
}
case GLenum::GL_TEXTURE_WRAP_S: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
uint32_t l__res_0 = subCheckWrapParam(observer, call, (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL)));
checkNotNull(l_t).mWrapS = l__res_0;
break;
}
case GLenum::GL_TEXTURE_WRAP_T: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
uint32_t l__res_0 = subCheckWrapParam(observer, call, (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL)));
checkNotNull(l_t).mWrapT = l__res_0;
break;
}
case GLenum::GL_TEXTURE_BASE_LEVEL: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
GLint l_baseLevel = (GLint)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
if ((l_baseLevel) < ((GLint)(0L))) {
subGlErrorInvalidValue(observer, call);
}
checkNotNull(l_t).mBaseLevel = l_baseLevel;
break;
}
case GLenum::GL_TEXTURE_COMPARE_FUNC: {
checkNotNull(l_t).mCompareFunc = (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
break;
}
case GLenum::GL_TEXTURE_COMPARE_MODE: {
checkNotNull(l_t).mCompareMode = (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
break;
}
case GLenum::GL_TEXTURE_MAX_LEVEL: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
GLint l_maxLevel = (GLint)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
if ((l_maxLevel) < ((GLint)(0L))) {
subGlErrorInvalidValue(observer, call);
}
checkNotNull(l_t).mMaxLevel = l_maxLevel;
break;
}
case GLenum::GL_TEXTURE_MAX_LOD: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
checkNotNull(l_t).mMaxLod = observer->read(slice(params, 0ULL, 1ULL), 0ULL);
break;
}
case GLenum::GL_TEXTURE_MIN_LOD: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
checkNotNull(l_t).mMinLod = observer->read(slice(params, 0ULL, 1ULL), 0ULL);
break;
}
case GLenum::GL_TEXTURE_SWIZZLE_A: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
uint32_t l__res_0 = subCheckSwizzleParam(observer, call, (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL)));
checkNotNull(l_t).mSwizzleA = l__res_0;
break;
}
case GLenum::GL_TEXTURE_SWIZZLE_B: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
uint32_t l__res_0 = subCheckSwizzleParam(observer, call, (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL)));
checkNotNull(l_t).mSwizzleB = l__res_0;
break;
}
case GLenum::GL_TEXTURE_SWIZZLE_G: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
uint32_t l__res_0 = subCheckSwizzleParam(observer, call, (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL)));
checkNotNull(l_t).mSwizzleG = l__res_0;
break;
}
case GLenum::GL_TEXTURE_SWIZZLE_R: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
uint32_t l__res_0 = subCheckSwizzleParam(observer, call, (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL)));
checkNotNull(l_t).mSwizzleR = l__res_0;
break;
}
case GLenum::GL_TEXTURE_WRAP_R: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
checkNotNull(l_t).mWrapR = (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
break;
}
case GLenum::GL_DEPTH_STENCIL_TEXTURE_MODE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
checkNotNull(l_t).mDepthStencilTextureMode = (uint32_t)(observer->read(slice(params, 0ULL, 1ULL), 0ULL));
break;
}
case GLenum::GL_TEXTURE_BORDER_COLOR: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
break;
}
case GLenum::GL_TEXTURE_MAX_ANISOTROPY_EXT: {
subRequiresExtension(observer, call, ExtensionId::GL_EXT_texture_filter_anisotropic);
checkNotNull(l_t).mMaxAnisotropy = observer->read(slice(params, 0ULL, 1ULL), 0ULL);
break;
}
case GLenum::GL_TEXTURE_SRGB_DECODE_EXT: {
subRequiresExtension(observer, call, ExtensionId::GL_EXT_texture_sRGB_decode);
break;
}
default: {
subGlErrorInvalidEnum(observer, call, pname);
}
}
return;
}
void GlesSpy::subTexParameterv_Vec1i(CallObserver* observer, const std::function<void()>& call, uint32_t target, uint32_t pname, Vec1i params) {
if ((target) == (GLenum::GL_TEXTURE_BUFFER)) {
subGlErrorInvalidEnum(observer, call, target);
}
std::shared_ptr<Texture> l_t = subGetBoundTextureOrErrorInvalidEnum(observer, call, target);
switch (pname) {
case GLenum::GL_TEXTURE_MAG_FILTER: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
uint32_t l_magFilter = (uint32_t)(params[0ULL]);
switch (l_magFilter) {
case GLenum::GL_NEAREST: // fall-through...
case GLenum::GL_LINEAR: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, l_magFilter);
}
}
checkNotNull(l_t).mMagFilter = l_magFilter;
break;
}
case GLenum::GL_TEXTURE_MIN_FILTER: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
uint32_t l_minFilter = (uint32_t)(params[0ULL]);
switch (l_minFilter) {
case GLenum::GL_NEAREST: // fall-through...
case GLenum::GL_LINEAR: // fall-through...
case GLenum::GL_NEAREST_MIPMAP_NEAREST: // fall-through...
case GLenum::GL_LINEAR_MIPMAP_NEAREST: // fall-through...
case GLenum::GL_NEAREST_MIPMAP_LINEAR: // fall-through...
case GLenum::GL_LINEAR_MIPMAP_LINEAR: {
break;
}
default: {
subGlErrorInvalidEnum(observer, call, l_minFilter);
}
}
checkNotNull(l_t).mMinFilter = l_minFilter;
break;
}
case GLenum::GL_TEXTURE_WRAP_S: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
uint32_t l__res_0 = subCheckWrapParam(observer, call, (uint32_t)(params[0ULL]));
checkNotNull(l_t).mWrapS = l__res_0;
break;
}
case GLenum::GL_TEXTURE_WRAP_T: {
subMinRequiredVersion(observer, call, (GLint)(2L), (GLint)(0L));
uint32_t l__res_0 = subCheckWrapParam(observer, call, (uint32_t)(params[0ULL]));
checkNotNull(l_t).mWrapT = l__res_0;
break;
}
case GLenum::GL_TEXTURE_BASE_LEVEL: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
GLint l_baseLevel = params[0ULL];
if ((l_baseLevel) < ((GLint)(0L))) {
subGlErrorInvalidValue(observer, call);
}
checkNotNull(l_t).mBaseLevel = l_baseLevel;
break;
}
case GLenum::GL_TEXTURE_COMPARE_FUNC: {
checkNotNull(l_t).mCompareFunc = (uint32_t)(params[0ULL]);
break;
}
case GLenum::GL_TEXTURE_COMPARE_MODE: {
checkNotNull(l_t).mCompareMode = (uint32_t)(params[0ULL]);
break;
}
case GLenum::GL_TEXTURE_MAX_LEVEL: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
GLint l_maxLevel = params[0ULL];
if ((l_maxLevel) < ((GLint)(0L))) {
subGlErrorInvalidValue(observer, call);
}
checkNotNull(l_t).mMaxLevel = l_maxLevel;
break;
}
case GLenum::GL_TEXTURE_MAX_LOD: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
checkNotNull(l_t).mMaxLod = (GLfloat)(params[0ULL]);
break;
}
case GLenum::GL_TEXTURE_MIN_LOD: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
checkNotNull(l_t).mMinLod = (GLfloat)(params[0ULL]);
break;
}
case GLenum::GL_TEXTURE_SWIZZLE_A: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
uint32_t l__res_0 = subCheckSwizzleParam(observer, call, (uint32_t)(params[0ULL]));
checkNotNull(l_t).mSwizzleA = l__res_0;
break;
}
case GLenum::GL_TEXTURE_SWIZZLE_B: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
uint32_t l__res_0 = subCheckSwizzleParam(observer, call, (uint32_t)(params[0ULL]));
checkNotNull(l_t).mSwizzleB = l__res_0;
break;
}
case GLenum::GL_TEXTURE_SWIZZLE_G: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
uint32_t l__res_0 = subCheckSwizzleParam(observer, call, (uint32_t)(params[0ULL]));
checkNotNull(l_t).mSwizzleG = l__res_0;
break;
}
case GLenum::GL_TEXTURE_SWIZZLE_R: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
uint32_t l__res_0 = subCheckSwizzleParam(observer, call, (uint32_t)(params[0ULL]));
checkNotNull(l_t).mSwizzleR = l__res_0;
break;
}
case GLenum::GL_TEXTURE_WRAP_R: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(0L));
checkNotNull(l_t).mWrapR = (uint32_t)(params[0ULL]);
break;
}
case GLenum::GL_DEPTH_STENCIL_TEXTURE_MODE: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(1L));
checkNotNull(l_t).mDepthStencilTextureMode = (uint32_t)(params[0ULL]);
break;
}
case GLenum::GL_TEXTURE_BORDER_COLOR: {
subMinRequiredVersion(observer, call, (GLint)(3L), (GLint)(2L));
break;
}
case GLenum::GL_TEXTURE_MAX_ANISOTROPY_EXT: {
subRequiresExtension(observer, call, ExtensionId::GL_EXT_texture_filter_anisotropic);
checkNotNull(l_t).mMaxAnisotropy = (GLfloat)(params[0ULL]);
break;
}
case GLenum::GL_TEXTURE_SRGB_DECODE_EXT: {
subRequiresExtension(observer, call, ExtensionId::GL_EXT_texture_sRGB_decode);
break;
}
default: {
subGlErrorInvalidEnum(observer, call, pname);
}
}
return;
}
} // namespace gapii