blob: 42680852cad0c7e1e0e6e8436359b11394c4e64c [file] [log] [blame]
// GENERATED FILE - DO NOT EDIT.
// Generated by generate_entry_points.py using data from gl.xml.
//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// entry_points_gl_4_3_autogen.cpp:
// Defines the GL 4.3 entry points.
#include "libGL/entry_points_gl_4_3_autogen.h"
#include "libANGLE/Context.h"
#include "libANGLE/Context.inl.h"
#include "libANGLE/entry_points_utils.h"
#include "libANGLE/gl_enum_utils.h"
#include "libANGLE/validationEGL.h"
#include "libANGLE/validationES.h"
#include "libANGLE/validationES1.h"
#include "libANGLE/validationES2.h"
#include "libANGLE/validationES3.h"
#include "libANGLE/validationES31.h"
#include "libANGLE/validationES32.h"
#include "libANGLE/validationESEXT.h"
#include "libANGLE/validationGL43_autogen.h"
#include "libGLESv2/global_state.h"
namespace gl
{
void GL_APIENTRY BindVertexBuffer(GLuint bindingindex,
GLuint buffer,
GLintptr offset,
GLsizei stride)
{
Context *context = GetValidGlobalContext();
EVENT("glBindVertexBuffer",
"context = %d, GLuint bindingindex = %u, GLuint buffer = %u, GLintptr offset = %llu, "
"GLsizei stride = %d",
CID(context), bindingindex, buffer, static_cast<unsigned long long>(offset), stride);
if (context)
{
BufferID bufferPacked = FromGL<BufferID>(buffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateBindVertexBuffer(context, bindingindex, bufferPacked, offset, stride));
if (isCallValid)
{
context->bindVertexBuffer(bindingindex, bufferPacked, offset, stride);
}
ANGLE_CAPTURE(BindVertexBuffer, isCallValid, context, bindingindex, bufferPacked, offset,
stride);
}
}
void GL_APIENTRY
ClearBufferData(GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data)
{
Context *context = GetValidGlobalContext();
EVENT("glClearBufferData",
"context = %d, GLenum target = %s, GLenum internalformat = %s, GLenum format = %s, "
"GLenum type = %s, const void *data = 0x%016" PRIxPTR "",
CID(context), GLenumToString(GLenumGroup::BufferStorageTarget, target),
GLenumToString(GLenumGroup::InternalFormat, internalformat),
GLenumToString(GLenumGroup::PixelFormat, format),
GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)data);
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateClearBufferData(context, target, internalformat, format, type, data));
if (isCallValid)
{
context->clearBufferData(target, internalformat, format, type, data);
}
ANGLE_CAPTURE(ClearBufferData, isCallValid, context, target, internalformat, format, type,
data);
}
}
void GL_APIENTRY ClearBufferSubData(GLenum target,
GLenum internalformat,
GLintptr offset,
GLsizeiptr size,
GLenum format,
GLenum type,
const void *data)
{
Context *context = GetValidGlobalContext();
EVENT("glClearBufferSubData",
"context = %d, GLenum target = %s, GLenum internalformat = %s, GLintptr offset = %llu, "
"GLsizeiptr size = %llu, GLenum format = %s, GLenum type = %s, const void *data = "
"0x%016" PRIxPTR "",
CID(context), GLenumToString(GLenumGroup::DefaultGroup, target),
GLenumToString(GLenumGroup::InternalFormat, internalformat),
static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size),
GLenumToString(GLenumGroup::PixelFormat, format),
GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)data);
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateClearBufferSubData(context, target, internalformat, offset,
size, format, type, data));
if (isCallValid)
{
context->clearBufferSubData(target, internalformat, offset, size, format, type, data);
}
ANGLE_CAPTURE(ClearBufferSubData, isCallValid, context, target, internalformat, offset,
size, format, type, data);
}
}
void GL_APIENTRY CopyImageSubData(GLuint srcName,
GLenum srcTarget,
GLint srcLevel,
GLint srcX,
GLint srcY,
GLint srcZ,
GLuint dstName,
GLenum dstTarget,
GLint dstLevel,
GLint dstX,
GLint dstY,
GLint dstZ,
GLsizei srcWidth,
GLsizei srcHeight,
GLsizei srcDepth)
{
Context *context = GetValidGlobalContext();
EVENT("glCopyImageSubData",
"context = %d, GLuint srcName = %u, GLenum srcTarget = %s, GLint srcLevel = %d, GLint "
"srcX = %d, GLint srcY = %d, GLint srcZ = %d, GLuint dstName = %u, GLenum dstTarget = "
"%s, GLint dstLevel = %d, GLint dstX = %d, GLint dstY = %d, GLint dstZ = %d, GLsizei "
"srcWidth = %d, GLsizei srcHeight = %d, GLsizei srcDepth = %d",
CID(context), srcName, GLenumToString(GLenumGroup::CopyBufferSubDataTarget, srcTarget),
srcLevel, srcX, srcY, srcZ, dstName,
GLenumToString(GLenumGroup::CopyBufferSubDataTarget, dstTarget), dstLevel, dstX, dstY,
dstZ, srcWidth, srcHeight, srcDepth);
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateCopyImageSubData(context, srcName, srcTarget, srcLevel, srcX,
srcY, srcZ, dstName, dstTarget, dstLevel, dstX,
dstY, dstZ, srcWidth, srcHeight, srcDepth));
if (isCallValid)
{
context->copyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName,
dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight,
srcDepth);
}
ANGLE_CAPTURE(CopyImageSubData, isCallValid, context, srcName, srcTarget, srcLevel, srcX,
srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth,
srcHeight, srcDepth);
}
}
void GL_APIENTRY DebugMessageCallback(GLDEBUGPROC callback, const void *userParam)
{
Context *context = GetValidGlobalContext();
EVENT("glDebugMessageCallback",
"context = %d, GLDEBUGPROC callback = 0x%016" PRIxPTR
", const void *userParam = 0x%016" PRIxPTR "",
CID(context), (uintptr_t)callback, (uintptr_t)userParam);
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateDebugMessageCallback(context, callback, userParam));
if (isCallValid)
{
context->debugMessageCallback(callback, userParam);
}
ANGLE_CAPTURE(DebugMessageCallback, isCallValid, context, callback, userParam);
}
}
void GL_APIENTRY DebugMessageControl(GLenum source,
GLenum type,
GLenum severity,
GLsizei count,
const GLuint *ids,
GLboolean enabled)
{
Context *context = GetValidGlobalContext();
EVENT("glDebugMessageControl",
"context = %d, GLenum source = %s, GLenum type = %s, GLenum severity = %s, GLsizei count "
"= %d, const GLuint *ids = 0x%016" PRIxPTR ", GLboolean enabled = %s",
CID(context), GLenumToString(GLenumGroup::DebugSource, source),
GLenumToString(GLenumGroup::DebugType, type),
GLenumToString(GLenumGroup::DebugSeverity, severity), count, (uintptr_t)ids,
GLbooleanToString(enabled));
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateDebugMessageControl(context, source, type, severity, count, ids, enabled));
if (isCallValid)
{
context->debugMessageControl(source, type, severity, count, ids, enabled);
}
ANGLE_CAPTURE(DebugMessageControl, isCallValid, context, source, type, severity, count, ids,
enabled);
}
}
void GL_APIENTRY DebugMessageInsert(GLenum source,
GLenum type,
GLuint id,
GLenum severity,
GLsizei length,
const GLchar *buf)
{
Context *context = GetValidGlobalContext();
EVENT("glDebugMessageInsert",
"context = %d, GLenum source = %s, GLenum type = %s, GLuint id = %u, GLenum severity = "
"%s, GLsizei length = %d, const GLchar *buf = 0x%016" PRIxPTR "",
CID(context), GLenumToString(GLenumGroup::DebugSource, source),
GLenumToString(GLenumGroup::DebugType, type), id,
GLenumToString(GLenumGroup::DebugSeverity, severity), length, (uintptr_t)buf);
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateDebugMessageInsert(context, source, type, id, severity, length, buf));
if (isCallValid)
{
context->debugMessageInsert(source, type, id, severity, length, buf);
}
ANGLE_CAPTURE(DebugMessageInsert, isCallValid, context, source, type, id, severity, length,
buf);
}
}
void GL_APIENTRY DispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z)
{
Context *context = GetValidGlobalContext();
EVENT("glDispatchCompute",
"context = %d, GLuint num_groups_x = %u, GLuint num_groups_y = %u, GLuint num_groups_z = "
"%u",
CID(context), num_groups_x, num_groups_y, num_groups_z);
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateDispatchCompute(context, num_groups_x, num_groups_y, num_groups_z));
if (isCallValid)
{
context->dispatchCompute(num_groups_x, num_groups_y, num_groups_z);
}
ANGLE_CAPTURE(DispatchCompute, isCallValid, context, num_groups_x, num_groups_y,
num_groups_z);
}
}
void GL_APIENTRY DispatchComputeIndirect(GLintptr indirect)
{
Context *context = GetValidGlobalContext();
EVENT("glDispatchComputeIndirect", "context = %d, GLintptr indirect = %llu", CID(context),
static_cast<unsigned long long>(indirect));
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateDispatchComputeIndirect(context, indirect));
if (isCallValid)
{
context->dispatchComputeIndirect(indirect);
}
ANGLE_CAPTURE(DispatchComputeIndirect, isCallValid, context, indirect);
}
}
void GL_APIENTRY FramebufferParameteri(GLenum target, GLenum pname, GLint param)
{
Context *context = GetValidGlobalContext();
EVENT("glFramebufferParameteri",
"context = %d, GLenum target = %s, GLenum pname = %s, GLint param = %d", CID(context),
GLenumToString(GLenumGroup::FramebufferTarget, target),
GLenumToString(GLenumGroup::FramebufferParameterName, pname), param);
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateFramebufferParameteri(context, target, pname, param));
if (isCallValid)
{
context->framebufferParameteri(target, pname, param);
}
ANGLE_CAPTURE(FramebufferParameteri, isCallValid, context, target, pname, param);
}
}
GLuint GL_APIENTRY GetDebugMessageLog(GLuint count,
GLsizei bufSize,
GLenum *sources,
GLenum *types,
GLuint *ids,
GLenum *severities,
GLsizei *lengths,
GLchar *messageLog)
{
Context *context = GetValidGlobalContext();
EVENT("glGetDebugMessageLog",
"context = %d, GLuint count = %u, GLsizei bufSize = %d, GLenum *sources = 0x%016" PRIxPTR
", GLenum *types = 0x%016" PRIxPTR ", GLuint *ids = 0x%016" PRIxPTR
", GLenum *severities = 0x%016" PRIxPTR ", GLsizei *lengths = 0x%016" PRIxPTR
", GLchar *messageLog = 0x%016" PRIxPTR "",
CID(context), count, bufSize, (uintptr_t)sources, (uintptr_t)types, (uintptr_t)ids,
(uintptr_t)severities, (uintptr_t)lengths, (uintptr_t)messageLog);
GLuint returnValue;
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetDebugMessageLog(context, count, bufSize, sources, types, ids,
severities, lengths, messageLog));
if (isCallValid)
{
returnValue = context->getDebugMessageLog(count, bufSize, sources, types, ids,
severities, lengths, messageLog);
}
else
{
returnValue = GetDefaultReturnValue<EntryPoint::GetDebugMessageLog, GLuint>();
}
ANGLE_CAPTURE(GetDebugMessageLog, isCallValid, context, count, bufSize, sources, types, ids,
severities, lengths, messageLog, returnValue);
}
else
{
returnValue = GetDefaultReturnValue<EntryPoint::GetDebugMessageLog, GLuint>();
}
return returnValue;
}
void GL_APIENTRY GetFramebufferParameteriv(GLenum target, GLenum pname, GLint *params)
{
Context *context = GetValidGlobalContext();
EVENT("glGetFramebufferParameteriv",
"context = %d, GLenum target = %s, GLenum pname = %s, GLint *params = 0x%016" PRIxPTR "",
CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target),
GLenumToString(GLenumGroup::FramebufferAttachmentParameterName, pname),
(uintptr_t)params);
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetFramebufferParameteriv(context, target, pname, params));
if (isCallValid)
{
context->getFramebufferParameteriv(target, pname, params);
}
ANGLE_CAPTURE(GetFramebufferParameteriv, isCallValid, context, target, pname, params);
}
}
void GL_APIENTRY GetInternalformati64v(GLenum target,
GLenum internalformat,
GLenum pname,
GLsizei bufSize,
GLint64 *params)
{
Context *context = GetValidGlobalContext();
EVENT("glGetInternalformati64v",
"context = %d, GLenum target = %s, GLenum internalformat = %s, GLenum pname = %s, "
"GLsizei bufSize = %d, GLint64 *params = 0x%016" PRIxPTR "",
CID(context), GLenumToString(GLenumGroup::TextureTarget, target),
GLenumToString(GLenumGroup::InternalFormat, internalformat),
GLenumToString(GLenumGroup::InternalFormatPName, pname), bufSize, (uintptr_t)params);
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetInternalformati64v(context, target, internalformat, pname,
bufSize, params));
if (isCallValid)
{
context->getInternalformati64v(target, internalformat, pname, bufSize, params);
}
ANGLE_CAPTURE(GetInternalformati64v, isCallValid, context, target, internalformat, pname,
bufSize, params);
}
}
void GL_APIENTRY
GetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label)
{
Context *context = GetValidGlobalContext();
EVENT("glGetObjectLabel",
"context = %d, GLenum identifier = %s, GLuint name = %u, GLsizei bufSize = %d, GLsizei "
"*length = 0x%016" PRIxPTR ", GLchar *label = 0x%016" PRIxPTR "",
CID(context), GLenumToString(GLenumGroup::DefaultGroup, identifier), name, bufSize,
(uintptr_t)length, (uintptr_t)label);
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateGetObjectLabel(context, identifier, name, bufSize, length, label));
if (isCallValid)
{
context->getObjectLabel(identifier, name, bufSize, length, label);
}
ANGLE_CAPTURE(GetObjectLabel, isCallValid, context, identifier, name, bufSize, length,
label);
}
}
void GL_APIENTRY GetObjectPtrLabel(const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label)
{
Context *context = GetValidGlobalContext();
EVENT("glGetObjectPtrLabel",
"context = %d, const void *ptr = 0x%016" PRIxPTR
", GLsizei bufSize = %d, GLsizei *length = 0x%016" PRIxPTR
", GLchar *label = 0x%016" PRIxPTR "",
CID(context), (uintptr_t)ptr, bufSize, (uintptr_t)length, (uintptr_t)label);
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetObjectPtrLabel(context, ptr, bufSize, length, label));
if (isCallValid)
{
context->getObjectPtrLabel(ptr, bufSize, length, label);
}
ANGLE_CAPTURE(GetObjectPtrLabel, isCallValid, context, ptr, bufSize, length, label);
}
}
void GL_APIENTRY GetProgramInterfaceiv(GLuint program,
GLenum programInterface,
GLenum pname,
GLint *params)
{
Context *context = GetValidGlobalContext();
EVENT("glGetProgramInterfaceiv",
"context = %d, GLuint program = %u, GLenum programInterface = %s, GLenum pname = %s, "
"GLint *params = 0x%016" PRIxPTR "",
CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface),
GLenumToString(GLenumGroup::ProgramInterfacePName, pname), (uintptr_t)params);
if (context)
{
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetProgramInterfaceiv(context, programPacked, programInterface,
pname, params));
if (isCallValid)
{
context->getProgramInterfaceiv(programPacked, programInterface, pname, params);
}
ANGLE_CAPTURE(GetProgramInterfaceiv, isCallValid, context, programPacked, programInterface,
pname, params);
}
}
GLuint GL_APIENTRY GetProgramResourceIndex(GLuint program,
GLenum programInterface,
const GLchar *name)
{
Context *context = GetValidGlobalContext();
EVENT("glGetProgramResourceIndex",
"context = %d, GLuint program = %u, GLenum programInterface = %s, const GLchar *name = "
"0x%016" PRIxPTR "",
CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface),
(uintptr_t)name);
GLuint returnValue;
if (context)
{
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateGetProgramResourceIndex(context, programPacked, programInterface, name));
if (isCallValid)
{
returnValue = context->getProgramResourceIndex(programPacked, programInterface, name);
}
else
{
returnValue = GetDefaultReturnValue<EntryPoint::GetProgramResourceIndex, GLuint>();
}
ANGLE_CAPTURE(GetProgramResourceIndex, isCallValid, context, programPacked,
programInterface, name, returnValue);
}
else
{
returnValue = GetDefaultReturnValue<EntryPoint::GetProgramResourceIndex, GLuint>();
}
return returnValue;
}
GLint GL_APIENTRY GetProgramResourceLocation(GLuint program,
GLenum programInterface,
const GLchar *name)
{
Context *context = GetValidGlobalContext();
EVENT("glGetProgramResourceLocation",
"context = %d, GLuint program = %u, GLenum programInterface = %s, const GLchar *name = "
"0x%016" PRIxPTR "",
CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface),
(uintptr_t)name);
GLint returnValue;
if (context)
{
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateGetProgramResourceLocation(context, programPacked, programInterface, name));
if (isCallValid)
{
returnValue =
context->getProgramResourceLocation(programPacked, programInterface, name);
}
else
{
returnValue = GetDefaultReturnValue<EntryPoint::GetProgramResourceLocation, GLint>();
}
ANGLE_CAPTURE(GetProgramResourceLocation, isCallValid, context, programPacked,
programInterface, name, returnValue);
}
else
{
returnValue = GetDefaultReturnValue<EntryPoint::GetProgramResourceLocation, GLint>();
}
return returnValue;
}
GLint GL_APIENTRY GetProgramResourceLocationIndex(GLuint program,
GLenum programInterface,
const GLchar *name)
{
Context *context = GetValidGlobalContext();
EVENT("glGetProgramResourceLocationIndex",
"context = %d, GLuint program = %u, GLenum programInterface = %s, const GLchar *name = "
"0x%016" PRIxPTR "",
CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface),
(uintptr_t)name);
GLint returnValue;
if (context)
{
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetProgramResourceLocationIndex(
context, programPacked, programInterface, name));
if (isCallValid)
{
returnValue =
context->getProgramResourceLocationIndex(programPacked, programInterface, name);
}
else
{
returnValue =
GetDefaultReturnValue<EntryPoint::GetProgramResourceLocationIndex, GLint>();
}
ANGLE_CAPTURE(GetProgramResourceLocationIndex, isCallValid, context, programPacked,
programInterface, name, returnValue);
}
else
{
returnValue = GetDefaultReturnValue<EntryPoint::GetProgramResourceLocationIndex, GLint>();
}
return returnValue;
}
void GL_APIENTRY GetProgramResourceName(GLuint program,
GLenum programInterface,
GLuint index,
GLsizei bufSize,
GLsizei *length,
GLchar *name)
{
Context *context = GetValidGlobalContext();
EVENT("glGetProgramResourceName",
"context = %d, GLuint program = %u, GLenum programInterface = %s, GLuint index = %u, "
"GLsizei bufSize = %d, GLsizei *length = 0x%016" PRIxPTR ", GLchar *name = 0x%016" PRIxPTR
"",
CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface),
index, bufSize, (uintptr_t)length, (uintptr_t)name);
if (context)
{
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetProgramResourceName(context, programPacked, programInterface,
index, bufSize, length, name));
if (isCallValid)
{
context->getProgramResourceName(programPacked, programInterface, index, bufSize, length,
name);
}
ANGLE_CAPTURE(GetProgramResourceName, isCallValid, context, programPacked, programInterface,
index, bufSize, length, name);
}
}
void GL_APIENTRY GetProgramResourceiv(GLuint program,
GLenum programInterface,
GLuint index,
GLsizei propCount,
const GLenum *props,
GLsizei bufSize,
GLsizei *length,
GLint *params)
{
Context *context = GetValidGlobalContext();
EVENT("glGetProgramResourceiv",
"context = %d, GLuint program = %u, GLenum programInterface = %s, GLuint index = %u, "
"GLsizei propCount = %d, const GLenum *props = 0x%016" PRIxPTR
", GLsizei bufSize = %d, GLsizei *length = 0x%016" PRIxPTR
", GLint *params = 0x%016" PRIxPTR "",
CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface),
index, propCount, (uintptr_t)props, bufSize, (uintptr_t)length, (uintptr_t)params);
if (context)
{
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateGetProgramResourceiv(context, programPacked, programInterface, index,
propCount, props, bufSize, length, params));
if (isCallValid)
{
context->getProgramResourceiv(programPacked, programInterface, index, propCount, props,
bufSize, length, params);
}
ANGLE_CAPTURE(GetProgramResourceiv, isCallValid, context, programPacked, programInterface,
index, propCount, props, bufSize, length, params);
}
}
void GL_APIENTRY InvalidateBufferData(GLuint buffer)
{
Context *context = GetValidGlobalContext();
EVENT("glInvalidateBufferData", "context = %d, GLuint buffer = %u", CID(context), buffer);
if (context)
{
BufferID bufferPacked = FromGL<BufferID>(buffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateInvalidateBufferData(context, bufferPacked));
if (isCallValid)
{
context->invalidateBufferData(bufferPacked);
}
ANGLE_CAPTURE(InvalidateBufferData, isCallValid, context, bufferPacked);
}
}
void GL_APIENTRY InvalidateBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr length)
{
Context *context = GetValidGlobalContext();
EVENT("glInvalidateBufferSubData",
"context = %d, GLuint buffer = %u, GLintptr offset = %llu, GLsizeiptr length = %llu",
CID(context), buffer, static_cast<unsigned long long>(offset),
static_cast<unsigned long long>(length));
if (context)
{
BufferID bufferPacked = FromGL<BufferID>(buffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateInvalidateBufferSubData(context, bufferPacked, offset, length));
if (isCallValid)
{
context->invalidateBufferSubData(bufferPacked, offset, length);
}
ANGLE_CAPTURE(InvalidateBufferSubData, isCallValid, context, bufferPacked, offset, length);
}
}
void GL_APIENTRY InvalidateFramebuffer(GLenum target,
GLsizei numAttachments,
const GLenum *attachments)
{
Context *context = GetValidGlobalContext();
EVENT("glInvalidateFramebuffer",
"context = %d, GLenum target = %s, GLsizei numAttachments = %d, const GLenum "
"*attachments = 0x%016" PRIxPTR "",
CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), numAttachments,
(uintptr_t)attachments);
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateInvalidateFramebuffer(context, target, numAttachments, attachments));
if (isCallValid)
{
context->invalidateFramebuffer(target, numAttachments, attachments);
}
ANGLE_CAPTURE(InvalidateFramebuffer, isCallValid, context, target, numAttachments,
attachments);
}
}
void GL_APIENTRY InvalidateSubFramebuffer(GLenum target,
GLsizei numAttachments,
const GLenum *attachments,
GLint x,
GLint y,
GLsizei width,
GLsizei height)
{
Context *context = GetValidGlobalContext();
EVENT("glInvalidateSubFramebuffer",
"context = %d, GLenum target = %s, GLsizei numAttachments = %d, const GLenum "
"*attachments = 0x%016" PRIxPTR
", GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d",
CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), numAttachments,
(uintptr_t)attachments, x, y, width, height);
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateInvalidateSubFramebuffer(context, target, numAttachments,
attachments, x, y, width, height));
if (isCallValid)
{
context->invalidateSubFramebuffer(target, numAttachments, attachments, x, y, width,
height);
}
ANGLE_CAPTURE(InvalidateSubFramebuffer, isCallValid, context, target, numAttachments,
attachments, x, y, width, height);
}
}
void GL_APIENTRY InvalidateTexImage(GLuint texture, GLint level)
{
Context *context = GetValidGlobalContext();
EVENT("glInvalidateTexImage", "context = %d, GLuint texture = %u, GLint level = %d",
CID(context), texture, level);
if (context)
{
TextureID texturePacked = FromGL<TextureID>(texture);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateInvalidateTexImage(context, texturePacked, level));
if (isCallValid)
{
context->invalidateTexImage(texturePacked, level);
}
ANGLE_CAPTURE(InvalidateTexImage, isCallValid, context, texturePacked, level);
}
}
void GL_APIENTRY InvalidateTexSubImage(GLuint texture,
GLint level,
GLint xoffset,
GLint yoffset,
GLint zoffset,
GLsizei width,
GLsizei height,
GLsizei depth)
{
Context *context = GetValidGlobalContext();
EVENT("glInvalidateTexSubImage",
"context = %d, GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset "
"= %d, GLint zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d",
CID(context), texture, level, xoffset, yoffset, zoffset, width, height, depth);
if (context)
{
TextureID texturePacked = FromGL<TextureID>(texture);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateInvalidateTexSubImage(context, texturePacked, level, xoffset,
yoffset, zoffset, width, height, depth));
if (isCallValid)
{
context->invalidateTexSubImage(texturePacked, level, xoffset, yoffset, zoffset, width,
height, depth);
}
ANGLE_CAPTURE(InvalidateTexSubImage, isCallValid, context, texturePacked, level, xoffset,
yoffset, zoffset, width, height, depth);
}
}
void GL_APIENTRY MultiDrawArraysIndirect(GLenum mode,
const void *indirect,
GLsizei drawcount,
GLsizei stride)
{
Context *context = GetValidGlobalContext();
EVENT("glMultiDrawArraysIndirect",
"context = %d, GLenum mode = %s, const void *indirect = 0x%016" PRIxPTR
", GLsizei drawcount = %d, GLsizei stride = %d",
CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)indirect,
drawcount, stride);
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateMultiDrawArraysIndirect(context, mode, indirect, drawcount, stride));
if (isCallValid)
{
context->multiDrawArraysIndirect(mode, indirect, drawcount, stride);
}
ANGLE_CAPTURE(MultiDrawArraysIndirect, isCallValid, context, mode, indirect, drawcount,
stride);
}
}
void GL_APIENTRY MultiDrawElementsIndirect(GLenum mode,
GLenum type,
const void *indirect,
GLsizei drawcount,
GLsizei stride)
{
Context *context = GetValidGlobalContext();
EVENT("glMultiDrawElementsIndirect",
"context = %d, GLenum mode = %s, GLenum type = %s, const void *indirect = 0x%016" PRIxPTR
", GLsizei drawcount = %d, GLsizei stride = %d",
CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode),
GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indirect, drawcount,
stride);
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateMultiDrawElementsIndirect(context, mode, type, indirect, drawcount, stride));
if (isCallValid)
{
context->multiDrawElementsIndirect(mode, type, indirect, drawcount, stride);
}
ANGLE_CAPTURE(MultiDrawElementsIndirect, isCallValid, context, mode, type, indirect,
drawcount, stride);
}
}
void GL_APIENTRY ObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar *label)
{
Context *context = GetValidGlobalContext();
EVENT("glObjectLabel",
"context = %d, GLenum identifier = %s, GLuint name = %u, GLsizei length = %d, const "
"GLchar *label = 0x%016" PRIxPTR "",
CID(context), GLenumToString(GLenumGroup::ObjectIdentifier, identifier), name, length,
(uintptr_t)label);
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateObjectLabel(context, identifier, name, length, label));
if (isCallValid)
{
context->objectLabel(identifier, name, length, label);
}
ANGLE_CAPTURE(ObjectLabel, isCallValid, context, identifier, name, length, label);
}
}
void GL_APIENTRY ObjectPtrLabel(const void *ptr, GLsizei length, const GLchar *label)
{
Context *context = GetValidGlobalContext();
EVENT("glObjectPtrLabel",
"context = %d, const void *ptr = 0x%016" PRIxPTR
", GLsizei length = %d, const GLchar *label = 0x%016" PRIxPTR "",
CID(context), (uintptr_t)ptr, length, (uintptr_t)label);
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateObjectPtrLabel(context, ptr, length, label));
if (isCallValid)
{
context->objectPtrLabel(ptr, length, label);
}
ANGLE_CAPTURE(ObjectPtrLabel, isCallValid, context, ptr, length, label);
}
}
void GL_APIENTRY PopDebugGroup()
{
Context *context = GetValidGlobalContext();
EVENT("glPopDebugGroup", "context = %d", CID(context));
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidatePopDebugGroup(context));
if (isCallValid)
{
context->popDebugGroup();
}
ANGLE_CAPTURE(PopDebugGroup, isCallValid, context);
}
}
void GL_APIENTRY PushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLchar *message)
{
Context *context = GetValidGlobalContext();
EVENT("glPushDebugGroup",
"context = %d, GLenum source = %s, GLuint id = %u, GLsizei length = %d, const GLchar "
"*message = 0x%016" PRIxPTR "",
CID(context), GLenumToString(GLenumGroup::DebugSource, source), id, length,
(uintptr_t)message);
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidatePushDebugGroup(context, source, id, length, message));
if (isCallValid)
{
context->pushDebugGroup(source, id, length, message);
}
ANGLE_CAPTURE(PushDebugGroup, isCallValid, context, source, id, length, message);
}
}
void GL_APIENTRY ShaderStorageBlockBinding(GLuint program,
GLuint storageBlockIndex,
GLuint storageBlockBinding)
{
Context *context = GetValidGlobalContext();
EVENT("glShaderStorageBlockBinding",
"context = %d, GLuint program = %u, GLuint storageBlockIndex = %u, GLuint "
"storageBlockBinding = %u",
CID(context), program, storageBlockIndex, storageBlockBinding);
if (context)
{
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateShaderStorageBlockBinding(
context, programPacked, storageBlockIndex, storageBlockBinding));
if (isCallValid)
{
context->shaderStorageBlockBinding(programPacked, storageBlockIndex,
storageBlockBinding);
}
ANGLE_CAPTURE(ShaderStorageBlockBinding, isCallValid, context, programPacked,
storageBlockIndex, storageBlockBinding);
}
}
void GL_APIENTRY TexBufferRange(GLenum target,
GLenum internalformat,
GLuint buffer,
GLintptr offset,
GLsizeiptr size)
{
Context *context = GetValidGlobalContext();
EVENT("glTexBufferRange",
"context = %d, GLenum target = %s, GLenum internalformat = %s, GLuint buffer = %u, "
"GLintptr offset = %llu, GLsizeiptr size = %llu",
CID(context), GLenumToString(GLenumGroup::TextureTarget, target),
GLenumToString(GLenumGroup::InternalFormat, internalformat), buffer,
static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size));
if (context)
{
BufferID bufferPacked = FromGL<BufferID>(buffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateTexBufferRange(context, target, internalformat, bufferPacked, offset, size));
if (isCallValid)
{
context->texBufferRange(target, internalformat, bufferPacked, offset, size);
}
ANGLE_CAPTURE(TexBufferRange, isCallValid, context, target, internalformat, bufferPacked,
offset, size);
}
}
void GL_APIENTRY TexStorage2DMultisample(GLenum target,
GLsizei samples,
GLenum internalformat,
GLsizei width,
GLsizei height,
GLboolean fixedsamplelocations)
{
Context *context = GetValidGlobalContext();
EVENT("glTexStorage2DMultisample",
"context = %d, GLenum target = %s, GLsizei samples = %d, GLenum internalformat = %s, "
"GLsizei width = %d, GLsizei height = %d, GLboolean fixedsamplelocations = %s",
CID(context), GLenumToString(GLenumGroup::TextureTarget, target), samples,
GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height,
GLbooleanToString(fixedsamplelocations));
if (context)
{
TextureType targetPacked = FromGL<TextureType>(target);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateTexStorage2DMultisample(context, targetPacked, samples, internalformat, width,
height, fixedsamplelocations));
if (isCallValid)
{
context->texStorage2DMultisample(targetPacked, samples, internalformat, width, height,
fixedsamplelocations);
}
ANGLE_CAPTURE(TexStorage2DMultisample, isCallValid, context, targetPacked, samples,
internalformat, width, height, fixedsamplelocations);
}
}
void GL_APIENTRY TexStorage3DMultisample(GLenum target,
GLsizei samples,
GLenum internalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLboolean fixedsamplelocations)
{
Context *context = GetValidGlobalContext();
EVENT("glTexStorage3DMultisample",
"context = %d, GLenum target = %s, GLsizei samples = %d, GLenum internalformat = %s, "
"GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLboolean "
"fixedsamplelocations = %s",
CID(context), GLenumToString(GLenumGroup::TextureTarget, target), samples,
GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, depth,
GLbooleanToString(fixedsamplelocations));
if (context)
{
TextureType targetPacked = FromGL<TextureType>(target);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateTexStorage3DMultisample(context, targetPacked, samples, internalformat, width,
height, depth, fixedsamplelocations));
if (isCallValid)
{
context->texStorage3DMultisample(targetPacked, samples, internalformat, width, height,
depth, fixedsamplelocations);
}
ANGLE_CAPTURE(TexStorage3DMultisample, isCallValid, context, targetPacked, samples,
internalformat, width, height, depth, fixedsamplelocations);
}
}
void GL_APIENTRY TextureView(GLuint texture,
GLenum target,
GLuint origtexture,
GLenum internalformat,
GLuint minlevel,
GLuint numlevels,
GLuint minlayer,
GLuint numlayers)
{
Context *context = GetValidGlobalContext();
EVENT("glTextureView",
"context = %d, GLuint texture = %u, GLenum target = %s, GLuint origtexture = %u, GLenum "
"internalformat = %s, GLuint minlevel = %u, GLuint numlevels = %u, GLuint minlayer = %u, "
"GLuint numlayers = %u",
CID(context), texture, GLenumToString(GLenumGroup::TextureTarget, target), origtexture,
GLenumToString(GLenumGroup::InternalFormat, internalformat), minlevel, numlevels,
minlayer, numlayers);
if (context)
{
TextureID texturePacked = FromGL<TextureID>(texture);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateTextureView(context, texturePacked, target, origtexture, internalformat,
minlevel, numlevels, minlayer, numlayers));
if (isCallValid)
{
context->textureView(texturePacked, target, origtexture, internalformat, minlevel,
numlevels, minlayer, numlayers);
}
ANGLE_CAPTURE(TextureView, isCallValid, context, texturePacked, target, origtexture,
internalformat, minlevel, numlevels, minlayer, numlayers);
}
}
void GL_APIENTRY VertexAttribBinding(GLuint attribindex, GLuint bindingindex)
{
Context *context = GetValidGlobalContext();
EVENT("glVertexAttribBinding",
"context = %d, GLuint attribindex = %u, GLuint bindingindex = %u", CID(context),
attribindex, bindingindex);
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribBinding(context, attribindex, bindingindex));
if (isCallValid)
{
context->vertexAttribBinding(attribindex, bindingindex);
}
ANGLE_CAPTURE(VertexAttribBinding, isCallValid, context, attribindex, bindingindex);
}
}
void GL_APIENTRY VertexAttribFormat(GLuint attribindex,
GLint size,
GLenum type,
GLboolean normalized,
GLuint relativeoffset)
{
Context *context = GetValidGlobalContext();
EVENT("glVertexAttribFormat",
"context = %d, GLuint attribindex = %u, GLint size = %d, GLenum type = %s, GLboolean "
"normalized = %s, GLuint relativeoffset = %u",
CID(context), attribindex, size, GLenumToString(GLenumGroup::DefaultGroup, type),
GLbooleanToString(normalized), relativeoffset);
if (context)
{
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribFormat(context, attribindex, size, typePacked,
normalized, relativeoffset));
if (isCallValid)
{
context->vertexAttribFormat(attribindex, size, typePacked, normalized, relativeoffset);
}
ANGLE_CAPTURE(VertexAttribFormat, isCallValid, context, attribindex, size, typePacked,
normalized, relativeoffset);
}
}
void GL_APIENTRY VertexAttribIFormat(GLuint attribindex,
GLint size,
GLenum type,
GLuint relativeoffset)
{
Context *context = GetValidGlobalContext();
EVENT("glVertexAttribIFormat",
"context = %d, GLuint attribindex = %u, GLint size = %d, GLenum type = %s, GLuint "
"relativeoffset = %u",
CID(context), attribindex, size, GLenumToString(GLenumGroup::DefaultGroup, type),
relativeoffset);
if (context)
{
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateVertexAttribIFormat(context, attribindex, size, typePacked, relativeoffset));
if (isCallValid)
{
context->vertexAttribIFormat(attribindex, size, typePacked, relativeoffset);
}
ANGLE_CAPTURE(VertexAttribIFormat, isCallValid, context, attribindex, size, typePacked,
relativeoffset);
}
}
void GL_APIENTRY VertexAttribLFormat(GLuint attribindex,
GLint size,
GLenum type,
GLuint relativeoffset)
{
Context *context = GetValidGlobalContext();
EVENT("glVertexAttribLFormat",
"context = %d, GLuint attribindex = %u, GLint size = %d, GLenum type = %s, GLuint "
"relativeoffset = %u",
CID(context), attribindex, size, GLenumToString(GLenumGroup::VertexAttribType, type),
relativeoffset);
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateVertexAttribLFormat(context, attribindex, size, type, relativeoffset));
if (isCallValid)
{
context->vertexAttribLFormat(attribindex, size, type, relativeoffset);
}
ANGLE_CAPTURE(VertexAttribLFormat, isCallValid, context, attribindex, size, type,
relativeoffset);
}
}
void GL_APIENTRY VertexBindingDivisor(GLuint bindingindex, GLuint divisor)
{
Context *context = GetValidGlobalContext();
EVENT("glVertexBindingDivisor", "context = %d, GLuint bindingindex = %u, GLuint divisor = %u",
CID(context), bindingindex, divisor);
if (context)
{
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateVertexBindingDivisor(context, bindingindex, divisor));
if (isCallValid)
{
context->vertexBindingDivisor(bindingindex, divisor);
}
ANGLE_CAPTURE(VertexBindingDivisor, isCallValid, context, bindingindex, divisor);
}
}
} // namespace gl