Commit fa920ebb by Jamie Madill Committed by Commit Bot

Entry Points: Auto-generate extensions EPs.

This is partially complete - it is missing the auto-gen for custom ANGLE and Chromium extensions that aren't present in gl.xml. We can upstream some of these extensions, but will also need to make custom handling for some extensions that are too volatile or under- specced to upstream to Khronos. This also tweaks some of the Context method names to match what the auto-generator expects. It also updates some TexStorage entry points. Also includes a specialized error return value for glTestFenceNV. Also removes the TexImage3DOES entry point which was neither used nor accessible to the application. Bug: angleproject:2263 Change-Id: I3667c22b1b15f84ab4c7dfecb5745aaf73d11e76 Reviewed-on: https://chromium-review.googlesource.com/846420 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent c71862aa
...@@ -11,6 +11,41 @@ import sys, os, pprint, json ...@@ -11,6 +11,41 @@ import sys, os, pprint, json
import xml.etree.ElementTree as etree import xml.etree.ElementTree as etree
from datetime import date from datetime import date
# List of supported extensions. Add to this list to enable new extensions
# available in gl.xml.
# TODO(jmadill): Support extensions not in gl.xml.
supported_extensions = sorted([
"GL_ANGLE_framebuffer_blit",
"GL_ANGLE_framebuffer_multisample",
"GL_ANGLE_instanced_arrays",
"GL_ANGLE_translated_shader_source",
"GL_EXT_debug_marker",
"GL_EXT_discard_framebuffer",
"GL_EXT_disjoint_timer_query",
"GL_EXT_draw_buffers",
"GL_EXT_map_buffer_range",
"GL_EXT_occlusion_query_boolean",
"GL_EXT_robustness",
"GL_EXT_texture_storage",
"GL_KHR_debug",
"GL_NV_fence",
"GL_OES_EGL_image",
"GL_OES_get_program_binary",
"GL_OES_mapbuffer",
"GL_OES_vertex_array_object",
])
# This is a list of exceptions for entry points which don't want to have
# the EVENT macro. This is required for some debug marker entry points.
no_event_marker_exceptions_list = sorted([
"glPushGroupMarkerEXT",
"glPopGroupMarkerEXT",
"glInsertEventMarkerEXT",
])
# Strip these suffixes from Context entry point names. NV is excluded (for now).
strip_suffixes = ["ANGLE", "EXT", "KHR", "OES"]
template_entry_point_header = """// GENERATED FILE - DO NOT EDIT. template_entry_point_header = """// GENERATED FILE - DO NOT EDIT.
// Generated by {script_name} using data from {data_source_name}. // Generated by {script_name} using data from {data_source_name}.
// //
...@@ -78,7 +113,7 @@ template_entry_point_decl = """ANGLE_EXPORT {return_type}GL_APIENTRY {name}({par ...@@ -78,7 +113,7 @@ template_entry_point_decl = """ANGLE_EXPORT {return_type}GL_APIENTRY {name}({par
template_entry_point_def = """{return_type}GL_APIENTRY {name}({params}) template_entry_point_def = """{return_type}GL_APIENTRY {name}({params})
{{ {{
EVENT("({format_params})"{comma_if_needed}{pass_params}); {event_comment}EVENT("({format_params})"{comma_if_needed}{pass_params});
Context *context = {context_getter}(); Context *context = {context_getter}();
if (context) if (context)
...@@ -138,7 +173,10 @@ format_dict = { ...@@ -138,7 +173,10 @@ format_dict = {
"GLsizeiptr": "%d", "GLsizeiptr": "%d",
"GLsync": "0x%0.8p", "GLsync": "0x%0.8p",
"GLuint": "%u", "GLuint": "%u",
"GLuint64": "%llu" "GLuint64": "%llu",
"GLDEBUGPROC": "0x%0.8p",
"GLDEBUGPROCKHR": "0x%0.8p",
"GLeglImageOES": "0x%0.8p",
} }
def param_format_string(param): def param_format_string(param):
...@@ -162,6 +200,10 @@ def get_context_getter_function(cmd_name): ...@@ -162,6 +200,10 @@ def get_context_getter_function(cmd_name):
else: else:
return "GetValidGlobalContext" return "GetValidGlobalContext"
template_event_comment = """// Don't run an EVENT() macro on the EXT_debug_marker entry points.
// It can interfere with the debug events being set by the caller.
// """
def format_entry_point_def(cmd_name, proto, params): def format_entry_point_def(cmd_name, proto, params):
packed_gl_enums = cmd_packed_gl_enums.get(cmd_name, {}) packed_gl_enums = cmd_packed_gl_enums.get(cmd_name, {})
internal_params = [just_the_name_packed(param, packed_gl_enums) for param in params] internal_params = [just_the_name_packed(param, packed_gl_enums) for param in params]
...@@ -178,8 +220,13 @@ def format_entry_point_def(cmd_name, proto, params): ...@@ -178,8 +220,13 @@ def format_entry_point_def(cmd_name, proto, params):
format_params = [param_format_string(param) for param in params] format_params = [param_format_string(param) for param in params]
return_type = proto[:-len(cmd_name)] return_type = proto[:-len(cmd_name)]
default_return = default_return_value(cmd_name, return_type.strip()) default_return = default_return_value(cmd_name, return_type.strip())
event_comment = template_event_comment if cmd_name in no_event_marker_exceptions_list else ""
name_lower_no_suffix = cmd_name[2:3].lower() + cmd_name[3:] name_lower_no_suffix = cmd_name[2:3].lower() + cmd_name[3:]
for suffix in strip_suffixes:
if name_lower_no_suffix.endswith(suffix):
name_lower_no_suffix = name_lower_no_suffix[0:-len(suffix)]
return template_entry_point_def.format( return template_entry_point_def.format(
name = cmd_name[2:], name = cmd_name[2:],
name_lower_no_suffix = name_lower_no_suffix, name_lower_no_suffix = name_lower_no_suffix,
...@@ -193,16 +240,15 @@ def format_entry_point_def(cmd_name, proto, params): ...@@ -193,16 +240,15 @@ def format_entry_point_def(cmd_name, proto, params):
format_params = ", ".join(format_params), format_params = ", ".join(format_params),
return_if_needed = "" if default_return == "" else "return ", return_if_needed = "" if default_return == "" else "return ",
default_return_if_needed = "" if default_return == "" else "\n return " + default_return + ";\n", default_return_if_needed = "" if default_return == "" else "\n return " + default_return + ";\n",
context_getter = get_context_getter_function(cmd_name)) context_getter = get_context_getter_function(cmd_name),
event_comment = event_comment)
def path_to(folder, file): def path_to(folder, file):
return os.path.join(script_relative(".."), "src", folder, file) return os.path.join(script_relative(".."), "src", folder, file)
def get_entry_points(all_commands, gles_commands): def get_entry_points(all_commands, gles_commands):
decls = [] decls = []
defs = [] defs = []
for command in all_commands: for command in all_commands:
proto = command.find('proto') proto = command.find('proto')
cmd_name = proto.find('name').text cmd_name = proto.find('name').text
...@@ -212,7 +258,6 @@ def get_entry_points(all_commands, gles_commands): ...@@ -212,7 +258,6 @@ def get_entry_points(all_commands, gles_commands):
param_text = ["".join(param.itertext()) for param in command.findall('param')] param_text = ["".join(param.itertext()) for param in command.findall('param')]
proto_text = "".join(proto.itertext()) proto_text = "".join(proto.itertext())
decls.append(format_entry_point_decl(cmd_name, proto_text, param_text)) decls.append(format_entry_point_decl(cmd_name, proto_text, param_text))
defs.append(format_entry_point_def(cmd_name, proto_text, param_text)) defs.append(format_entry_point_def(cmd_name, proto_text, param_text))
...@@ -274,8 +319,79 @@ for major_version, minor_version in [[2, 0], [3, 0], [3, 1]]: ...@@ -274,8 +319,79 @@ for major_version, minor_version in [[2, 0], [3, 0], [3, 1]]:
write_file(annotation, comment, template_entry_point_source, write_file(annotation, comment, template_entry_point_source,
"\n".join(defs), "cpp", source_includes) "\n".join(defs), "cpp", source_includes)
# TODO(jmadill): Remove manually added entry points once we auto-gen them. # After we finish with the main entry points, we process the extensions.
all_cmd_names += ["glDrawElementsInstancedANGLE"] extension_defs = []
extension_decls = []
# Use a first step to run through the extensions so we can generate them
# in sorted order.
ext_data = {}
for extension in root.findall("extensions/extension"):
extension_name = extension.attrib['name']
if not extension_name in supported_extensions:
continue
ext_cmd_names = []
# There's an extra step here to filter out 'api=gl' extensions. This
# is necessary for handling KHR extensions, which have separate entry
# point signatures (without the suffix) for desktop GL. Note that this
# extra step is necessary because of Etree's limited Xpath support.
for require in extension.findall('require'):
if 'api' in require.attrib and require.attrib['api'] != 'gles2':
continue
# Another special case for EXT_texture_storage
filter_out_comment = "Supported only if GL_EXT_direct_state_access is supported"
if 'comment' in require.attrib and require.attrib['comment'] == filter_out_comment:
continue
extension_commands = require.findall('command')
ext_cmd_names += [command.attrib['name'] for command in extension_commands]
ext_data[extension_name] = sorted(ext_cmd_names)
for extension_name, ext_cmd_names in sorted(ext_data.iteritems()):
# Detect and filter duplicate extensions.
dupes = []
for ext_cmd in ext_cmd_names:
if ext_cmd in all_cmd_names:
dupes.append(ext_cmd)
for dupe in dupes:
ext_cmd_names.remove(dupe)
all_cmd_names += ext_cmd_names
decls, defs = get_entry_points(all_commands, ext_cmd_names)
# Avoid writing out entry points defined by a prior extension.
for dupe in dupes:
msg = "// {} is already defined.\n".format(dupe[2:])
defs.append(msg)
# Write the extension name as a comment before the first EP.
comment = "\n// {}".format(extension_name)
defs.insert(0, comment)
decls.insert(0, comment)
extension_defs += defs
extension_decls += decls
header_includes = template_header_includes.format(2, 2, "")
source_includes = template_sources_includes.format(2, "")
source_includes += """#include "libANGLE/validationES.h"
#include "libANGLE/validationES3.h"
#include "libANGLE/validationES31.h"
"""
write_file("2_0_EXT", "extension", template_entry_point_header,
"\n".join([item for item in extension_decls]), "h", header_includes)
write_file("2_0_EXT", "extension", template_entry_point_source,
"\n".join([item for item in extension_defs]), "cpp", source_includes)
sorted_cmd_names = ["Invalid"] + [cmd[2:] for cmd in sorted(all_cmd_names)] sorted_cmd_names = ["Invalid"] + [cmd[2:] for cmd in sorted(all_cmd_names)]
......
...@@ -2196,7 +2196,7 @@ bool Context::isContextLost() ...@@ -2196,7 +2196,7 @@ bool Context::isContextLost()
return mContextLost; return mContextLost;
} }
GLenum Context::getResetStatus() GLenum Context::getGraphicsResetStatus()
{ {
// Even if the application doesn't want to know about resets, we want to know // Even if the application doesn't want to know about resets, we want to know
// as it will allow us to skip all the calls. // as it will allow us to skip all the calls.
...@@ -5799,18 +5799,23 @@ GLboolean Context::testFenceNV(GLuint fence) ...@@ -5799,18 +5799,23 @@ GLboolean Context::testFenceNV(GLuint fence)
return result; return result;
} }
void Context::eGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image) void Context::eGLImageTargetTexture2D(GLenum target, GLeglImageOES image)
{ {
Texture *texture = getTargetTexture(target); Texture *texture = getTargetTexture(target);
egl::Image *imageObject = reinterpret_cast<egl::Image *>(image); egl::Image *imageObject = reinterpret_cast<egl::Image *>(image);
handleError(texture->setEGLImageTarget(this, target, imageObject)); handleError(texture->setEGLImageTarget(this, target, imageObject));
} }
void Context::eGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image) void Context::eGLImageTargetRenderbufferStorage(GLenum target, GLeglImageOES image)
{ {
Renderbuffer *renderbuffer = mGLState.getCurrentRenderbuffer(); Renderbuffer *renderbuffer = mGLState.getCurrentRenderbuffer();
egl::Image *imageObject = reinterpret_cast<egl::Image *>(image); egl::Image *imageObject = reinterpret_cast<egl::Image *>(image);
handleError(renderbuffer->setStorageEGLImageTarget(this, imageObject)); handleError(renderbuffer->setStorageEGLImageTarget(this, imageObject));
} }
void Context::texStorage1D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width)
{
UNIMPLEMENTED();
}
} // namespace gl } // namespace gl
...@@ -983,8 +983,30 @@ class Context final : public ValidationContext ...@@ -983,8 +983,30 @@ class Context final : public ValidationContext
GLenum type, GLenum type,
GLsizei bufSize, GLsizei bufSize,
void *data); void *data);
void eGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image); void eGLImageTargetTexture2D(GLenum target, GLeglImageOES image);
void eGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image); void eGLImageTargetRenderbufferStorage(GLenum target, GLeglImageOES image);
void getFramebufferParameteriv(GLenum target, GLenum pname, GLint *params);
void framebufferParameteri(GLenum target, GLenum pname, GLint param);
void dispatchCompute(GLuint numGroupsX, GLuint numGroupsY, GLuint numGroupsZ);
void dispatchComputeIndirect(GLintptr indirect);
void texStorage1D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
void texStorage2D(GLenum target,
GLsizei levels,
GLenum internalFormat,
GLsizei width,
GLsizei height);
void texStorage3D(GLenum target,
GLsizei levels,
GLenum internalFormat,
GLsizei width,
GLsizei height,
GLsizei depth);
void memoryBarrier(GLbitfield barriers);
void memoryBarrierByRegion(GLbitfield barriers);
// Consumes the error. // Consumes the error.
void handleError(const Error &error) override; void handleError(const Error &error) override;
...@@ -992,7 +1014,7 @@ class Context final : public ValidationContext ...@@ -992,7 +1014,7 @@ class Context final : public ValidationContext
GLenum getError(); GLenum getError();
void markContextLost(); void markContextLost();
bool isContextLost(); bool isContextLost();
GLenum getResetStatus(); GLenum getGraphicsResetStatus();
bool isResetNotificationEnabled(); bool isResetNotificationEnabled();
const egl::Config *getConfig() const; const egl::Config *getConfig() const;
...@@ -1011,36 +1033,16 @@ class Context final : public ValidationContext ...@@ -1011,36 +1033,16 @@ class Context final : public ValidationContext
rx::ContextImpl *getImplementation() const { return mImplementation.get(); } rx::ContextImpl *getImplementation() const { return mImplementation.get(); }
const Workarounds &getWorkarounds() const; const Workarounds &getWorkarounds() const;
void getFramebufferParameteriv(GLenum target, GLenum pname, GLint *params);
void framebufferParameteri(GLenum target, GLenum pname, GLint param);
Error getScratchBuffer(size_t requestedSizeBytes, angle::MemoryBuffer **scratchBufferOut) const; Error getScratchBuffer(size_t requestedSizeBytes, angle::MemoryBuffer **scratchBufferOut) const;
Error getZeroFilledBuffer(size_t requstedSizeBytes, angle::MemoryBuffer **zeroBufferOut) const; Error getZeroFilledBuffer(size_t requstedSizeBytes, angle::MemoryBuffer **zeroBufferOut) const;
Error prepareForDispatch(); Error prepareForDispatch();
void dispatchCompute(GLuint numGroupsX, GLuint numGroupsY, GLuint numGroupsZ);
void dispatchComputeIndirect(GLintptr indirect);
MemoryProgramCache *getMemoryProgramCache() const { return mMemoryProgramCache; } MemoryProgramCache *getMemoryProgramCache() const { return mMemoryProgramCache; }
template <EntryPoint EP, typename... ParamsT> template <EntryPoint EP, typename... ParamsT>
void gatherParams(ParamsT &&... params); void gatherParams(ParamsT &&... params);
void texStorage2D(GLenum target,
GLsizei levels,
GLenum internalFormat,
GLsizei width,
GLsizei height);
void texStorage3D(GLenum target,
GLsizei levels,
GLenum internalFormat,
GLsizei width,
GLsizei height,
GLsizei depth);
void memoryBarrier(GLbitfield barriers);
void memoryBarrierByRegion(GLbitfield barriers);
// Notification for a state change in a Texture. // Notification for a state change in a Texture.
void onTextureChange(const Texture *texture); void onTextureChange(const Texture *texture);
......
...@@ -20,6 +20,7 @@ enum class EntryPoint ...@@ -20,6 +20,7 @@ enum class EntryPoint
ActiveTexture, ActiveTexture,
AttachShader, AttachShader,
BeginQuery, BeginQuery,
BeginQueryEXT,
BeginTransformFeedback, BeginTransformFeedback,
BindAttribLocation, BindAttribLocation,
BindBuffer, BindBuffer,
...@@ -33,6 +34,7 @@ enum class EntryPoint ...@@ -33,6 +34,7 @@ enum class EntryPoint
BindTexture, BindTexture,
BindTransformFeedback, BindTransformFeedback,
BindVertexArray, BindVertexArray,
BindVertexArrayOES,
BindVertexBuffer, BindVertexBuffer,
BlendColor, BlendColor,
BlendEquation, BlendEquation,
...@@ -40,6 +42,7 @@ enum class EntryPoint ...@@ -40,6 +42,7 @@ enum class EntryPoint
BlendFunc, BlendFunc,
BlendFuncSeparate, BlendFuncSeparate,
BlitFramebuffer, BlitFramebuffer,
BlitFramebufferANGLE,
BufferData, BufferData,
BufferSubData, BufferSubData,
CheckFramebufferStatus, CheckFramebufferStatus,
...@@ -66,11 +69,16 @@ enum class EntryPoint ...@@ -66,11 +69,16 @@ enum class EntryPoint
CreateShader, CreateShader,
CreateShaderProgramv, CreateShaderProgramv,
CullFace, CullFace,
DebugMessageCallbackKHR,
DebugMessageControlKHR,
DebugMessageInsertKHR,
DeleteBuffers, DeleteBuffers,
DeleteFencesNV,
DeleteFramebuffers, DeleteFramebuffers,
DeleteProgram, DeleteProgram,
DeleteProgramPipelines, DeleteProgramPipelines,
DeleteQueries, DeleteQueries,
DeleteQueriesEXT,
DeleteRenderbuffers, DeleteRenderbuffers,
DeleteSamplers, DeleteSamplers,
DeleteShader, DeleteShader,
...@@ -78,45 +86,57 @@ enum class EntryPoint ...@@ -78,45 +86,57 @@ enum class EntryPoint
DeleteTextures, DeleteTextures,
DeleteTransformFeedbacks, DeleteTransformFeedbacks,
DeleteVertexArrays, DeleteVertexArrays,
DeleteVertexArraysOES,
DepthFunc, DepthFunc,
DepthMask, DepthMask,
DepthRangef, DepthRangef,
DetachShader, DetachShader,
Disable, Disable,
DisableVertexAttribArray, DisableVertexAttribArray,
DiscardFramebufferEXT,
DispatchCompute, DispatchCompute,
DispatchComputeIndirect, DispatchComputeIndirect,
DrawArrays, DrawArrays,
DrawArraysIndirect, DrawArraysIndirect,
DrawArraysInstanced, DrawArraysInstanced,
DrawArraysInstancedANGLE,
DrawBuffers, DrawBuffers,
DrawBuffersEXT,
DrawElements, DrawElements,
DrawElementsIndirect, DrawElementsIndirect,
DrawElementsInstanced, DrawElementsInstanced,
DrawElementsInstancedANGLE, DrawElementsInstancedANGLE,
DrawRangeElements, DrawRangeElements,
EGLImageTargetRenderbufferStorageOES,
EGLImageTargetTexture2DOES,
Enable, Enable,
EnableVertexAttribArray, EnableVertexAttribArray,
EndQuery, EndQuery,
EndQueryEXT,
EndTransformFeedback, EndTransformFeedback,
FenceSync, FenceSync,
Finish, Finish,
FinishFenceNV,
Flush, Flush,
FlushMappedBufferRange, FlushMappedBufferRange,
FlushMappedBufferRangeEXT,
FramebufferParameteri, FramebufferParameteri,
FramebufferRenderbuffer, FramebufferRenderbuffer,
FramebufferTexture2D, FramebufferTexture2D,
FramebufferTextureLayer, FramebufferTextureLayer,
FrontFace, FrontFace,
GenBuffers, GenBuffers,
GenFencesNV,
GenFramebuffers, GenFramebuffers,
GenProgramPipelines, GenProgramPipelines,
GenQueries, GenQueries,
GenQueriesEXT,
GenRenderbuffers, GenRenderbuffers,
GenSamplers, GenSamplers,
GenTextures, GenTextures,
GenTransformFeedbacks, GenTransformFeedbacks,
GenVertexArrays, GenVertexArrays,
GenVertexArraysOES,
GenerateMipmap, GenerateMipmap,
GetActiveAttrib, GetActiveAttrib,
GetActiveUniform, GetActiveUniform,
...@@ -130,18 +150,26 @@ enum class EntryPoint ...@@ -130,18 +150,26 @@ enum class EntryPoint
GetBufferParameteri64v, GetBufferParameteri64v,
GetBufferParameteriv, GetBufferParameteriv,
GetBufferPointerv, GetBufferPointerv,
GetBufferPointervOES,
GetDebugMessageLogKHR,
GetError, GetError,
GetFenceivNV,
GetFloatv, GetFloatv,
GetFragDataLocation, GetFragDataLocation,
GetFramebufferAttachmentParameteriv, GetFramebufferAttachmentParameteriv,
GetFramebufferParameteriv, GetFramebufferParameteriv,
GetGraphicsResetStatusEXT,
GetInteger64i_v, GetInteger64i_v,
GetInteger64v, GetInteger64v,
GetIntegeri_v, GetIntegeri_v,
GetIntegerv, GetIntegerv,
GetInternalformativ, GetInternalformativ,
GetMultisamplefv, GetMultisamplefv,
GetObjectLabelKHR,
GetObjectPtrLabelKHR,
GetPointervKHR,
GetProgramBinary, GetProgramBinary,
GetProgramBinaryOES,
GetProgramInfoLog, GetProgramInfoLog,
GetProgramInterfaceiv, GetProgramInterfaceiv,
GetProgramPipelineInfoLog, GetProgramPipelineInfoLog,
...@@ -151,8 +179,13 @@ enum class EntryPoint ...@@ -151,8 +179,13 @@ enum class EntryPoint
GetProgramResourceName, GetProgramResourceName,
GetProgramResourceiv, GetProgramResourceiv,
GetProgramiv, GetProgramiv,
GetQueryObjecti64vEXT,
GetQueryObjectivEXT,
GetQueryObjectui64vEXT,
GetQueryObjectuiv, GetQueryObjectuiv,
GetQueryObjectuivEXT,
GetQueryiv, GetQueryiv,
GetQueryivEXT,
GetRenderbufferParameteriv, GetRenderbufferParameteriv,
GetSamplerParameterfv, GetSamplerParameterfv,
GetSamplerParameteriv, GetSamplerParameteriv,
...@@ -168,6 +201,7 @@ enum class EntryPoint ...@@ -168,6 +201,7 @@ enum class EntryPoint
GetTexParameterfv, GetTexParameterfv,
GetTexParameteriv, GetTexParameteriv,
GetTransformFeedbackVarying, GetTransformFeedbackVarying,
GetTranslatedShaderSourceANGLE,
GetUniformBlockIndex, GetUniformBlockIndex,
GetUniformIndices, GetUniformIndices,
GetUniformLocation, GetUniformLocation,
...@@ -179,15 +213,20 @@ enum class EntryPoint ...@@ -179,15 +213,20 @@ enum class EntryPoint
GetVertexAttribPointerv, GetVertexAttribPointerv,
GetVertexAttribfv, GetVertexAttribfv,
GetVertexAttribiv, GetVertexAttribiv,
GetnUniformfvEXT,
GetnUniformivEXT,
Hint, Hint,
InsertEventMarkerEXT,
InvalidateFramebuffer, InvalidateFramebuffer,
InvalidateSubFramebuffer, InvalidateSubFramebuffer,
IsBuffer, IsBuffer,
IsEnabled, IsEnabled,
IsFenceNV,
IsFramebuffer, IsFramebuffer,
IsProgram, IsProgram,
IsProgramPipeline, IsProgramPipeline,
IsQuery, IsQuery,
IsQueryEXT,
IsRenderbuffer, IsRenderbuffer,
IsSampler, IsSampler,
IsShader, IsShader,
...@@ -195,15 +234,23 @@ enum class EntryPoint ...@@ -195,15 +234,23 @@ enum class EntryPoint
IsTexture, IsTexture,
IsTransformFeedback, IsTransformFeedback,
IsVertexArray, IsVertexArray,
IsVertexArrayOES,
LineWidth, LineWidth,
LinkProgram, LinkProgram,
MapBufferOES,
MapBufferRange, MapBufferRange,
MapBufferRangeEXT,
MemoryBarrier, MemoryBarrier,
MemoryBarrierByRegion, MemoryBarrierByRegion,
ObjectLabelKHR,
ObjectPtrLabelKHR,
PauseTransformFeedback, PauseTransformFeedback,
PixelStorei, PixelStorei,
PolygonOffset, PolygonOffset,
PopDebugGroupKHR,
PopGroupMarkerEXT,
ProgramBinary, ProgramBinary,
ProgramBinaryOES,
ProgramParameteri, ProgramParameteri,
ProgramUniform1f, ProgramUniform1f,
ProgramUniform1fv, ProgramUniform1fv,
...@@ -238,11 +285,16 @@ enum class EntryPoint ...@@ -238,11 +285,16 @@ enum class EntryPoint
ProgramUniformMatrix4fv, ProgramUniformMatrix4fv,
ProgramUniformMatrix4x2fv, ProgramUniformMatrix4x2fv,
ProgramUniformMatrix4x3fv, ProgramUniformMatrix4x3fv,
PushDebugGroupKHR,
PushGroupMarkerEXT,
QueryCounterEXT,
ReadBuffer, ReadBuffer,
ReadPixels, ReadPixels,
ReadnPixelsEXT,
ReleaseShaderCompiler, ReleaseShaderCompiler,
RenderbufferStorage, RenderbufferStorage,
RenderbufferStorageMultisample, RenderbufferStorageMultisample,
RenderbufferStorageMultisampleANGLE,
ResumeTransformFeedback, ResumeTransformFeedback,
SampleCoverage, SampleCoverage,
SampleMaski, SampleMaski,
...@@ -251,6 +303,7 @@ enum class EntryPoint ...@@ -251,6 +303,7 @@ enum class EntryPoint
SamplerParameteri, SamplerParameteri,
SamplerParameteriv, SamplerParameteriv,
Scissor, Scissor,
SetFenceNV,
ShaderBinary, ShaderBinary,
ShaderSource, ShaderSource,
StencilFunc, StencilFunc,
...@@ -259,15 +312,19 @@ enum class EntryPoint ...@@ -259,15 +312,19 @@ enum class EntryPoint
StencilMaskSeparate, StencilMaskSeparate,
StencilOp, StencilOp,
StencilOpSeparate, StencilOpSeparate,
TestFenceNV,
TexImage2D, TexImage2D,
TexImage3D, TexImage3D,
TexParameterf, TexParameterf,
TexParameterfv, TexParameterfv,
TexParameteri, TexParameteri,
TexParameteriv, TexParameteriv,
TexStorage1DEXT,
TexStorage2D, TexStorage2D,
TexStorage2DEXT,
TexStorage2DMultisample, TexStorage2DMultisample,
TexStorage3D, TexStorage3D,
TexStorage3DEXT,
TexSubImage2D, TexSubImage2D,
TexSubImage3D, TexSubImage3D,
TransformFeedbackVaryings, TransformFeedbackVaryings,
...@@ -306,6 +363,7 @@ enum class EntryPoint ...@@ -306,6 +363,7 @@ enum class EntryPoint
UniformMatrix4x2fv, UniformMatrix4x2fv,
UniformMatrix4x3fv, UniformMatrix4x3fv,
UnmapBuffer, UnmapBuffer,
UnmapBufferOES,
UseProgram, UseProgram,
UseProgramStages, UseProgramStages,
ValidateProgram, ValidateProgram,
...@@ -320,6 +378,7 @@ enum class EntryPoint ...@@ -320,6 +378,7 @@ enum class EntryPoint
VertexAttrib4fv, VertexAttrib4fv,
VertexAttribBinding, VertexAttribBinding,
VertexAttribDivisor, VertexAttribDivisor,
VertexAttribDivisorANGLE,
VertexAttribFormat, VertexAttribFormat,
VertexAttribI4i, VertexAttribI4i,
VertexAttribI4iv, VertexAttribI4iv,
......
...@@ -217,6 +217,13 @@ struct DefaultReturnValue<EntryPoint::ClientWaitSync, GLenum> ...@@ -217,6 +217,13 @@ struct DefaultReturnValue<EntryPoint::ClientWaitSync, GLenum>
static constexpr GLenum kValue = GL_WAIT_FAILED; static constexpr GLenum kValue = GL_WAIT_FAILED;
}; };
// glTestFenceNV should still return TRUE for an invalid fence.
template <>
struct DefaultReturnValue<EntryPoint::TestFenceNV, GLboolean>
{
static constexpr GLboolean kValue = GL_TRUE;
};
template <EntryPoint EP, typename ReturnType> template <EntryPoint EP, typename ReturnType>
constexpr ANGLE_INLINE ReturnType GetDefaultReturnValue() constexpr ANGLE_INLINE ReturnType GetDefaultReturnValue()
{ {
......
...@@ -6646,4 +6646,39 @@ bool ValidatePopGroupMarkerEXT(Context *context) ...@@ -6646,4 +6646,39 @@ bool ValidatePopGroupMarkerEXT(Context *context)
return true; return true;
} }
bool ValidateTexStorage1DEXT(Context *context,
GLenum target,
GLsizei levels,
GLenum internalformat,
GLsizei width)
{
UNIMPLEMENTED();
ANGLE_VALIDATION_ERR(context, InvalidOperation(), ExtensionNotEnabled);
return false;
}
bool ValidateTexStorage3DEXT(Context *context,
GLenum target,
GLsizei levels,
GLenum internalformat,
GLsizei width,
GLsizei height,
GLsizei depth)
{
if (!context->getExtensions().textureStorage)
{
ANGLE_VALIDATION_ERR(context, InvalidOperation(), ExtensionNotEnabled);
return false;
}
if (context->getClientMajorVersion() < 3)
{
ANGLE_VALIDATION_ERR(context, InvalidOperation(), ExtensionNotEnabled);
return false;
}
return ValidateES3TexStorage3DParameters(context, target, levels, internalformat, width, height,
depth);
}
} // namespace gl } // namespace gl
...@@ -720,6 +720,18 @@ bool ValidateTexImage3DOES(Context *context, ...@@ -720,6 +720,18 @@ bool ValidateTexImage3DOES(Context *context,
GLenum type, GLenum type,
const void *pixels); const void *pixels);
bool ValidatePopGroupMarkerEXT(Context *context); bool ValidatePopGroupMarkerEXT(Context *context);
bool ValidateTexStorage1DEXT(Context *context,
GLenum target,
GLsizei levels,
GLenum internalformat,
GLsizei width);
bool ValidateTexStorage3DEXT(Context *context,
GLenum target,
GLsizei levels,
GLenum internalformat,
GLsizei width,
GLsizei height,
GLsizei depth);
} // namespace gl } // namespace gl
......
...@@ -826,6 +826,8 @@ ...@@ -826,6 +826,8 @@
'libGLESv2/entry_points_gles_2_0_autogen.h', 'libGLESv2/entry_points_gles_2_0_autogen.h',
'libGLESv2/entry_points_gles_2_0_ext.cpp', 'libGLESv2/entry_points_gles_2_0_ext.cpp',
'libGLESv2/entry_points_gles_2_0_ext.h', 'libGLESv2/entry_points_gles_2_0_ext.h',
'libGLESv2/entry_points_gles_2_0_ext_autogen.cpp',
'libGLESv2/entry_points_gles_2_0_ext_autogen.h',
'libGLESv2/entry_points_gles_3_0_autogen.cpp', 'libGLESv2/entry_points_gles_3_0_autogen.cpp',
'libGLESv2/entry_points_gles_3_0_autogen.h', 'libGLESv2/entry_points_gles_3_0_autogen.h',
'libGLESv2/entry_points_gles_3_1_autogen.cpp', 'libGLESv2/entry_points_gles_3_1_autogen.cpp',
......
...@@ -46,1161 +46,6 @@ void SetRobustLengthParam(GLsizei *length, GLsizei value) ...@@ -46,1161 +46,6 @@ void SetRobustLengthParam(GLsizei *length, GLsizei value)
} // anonymous namespace } // anonymous namespace
void GL_APIENTRY GenQueriesEXT(GLsizei n, GLuint *ids)
{
EVENT("(GLsizei n = %d, GLuint* ids = 0x%0.8p)", n, ids);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateGenQueriesEXT(context, n, ids))
{
return;
}
context->genQueries(n, ids);
}
}
void GL_APIENTRY DeleteQueriesEXT(GLsizei n, const GLuint *ids)
{
EVENT("(GLsizei n = %d, const GLuint *ids = 0x%0.8p)", n, ids);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateDeleteQueriesEXT(context, n, ids))
{
return;
}
context->deleteQueries(n, ids);
}
}
GLboolean GL_APIENTRY IsQueryEXT(GLuint id)
{
EVENT("(GLuint id = %d)", id);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateIsQueryEXT(context, id))
{
return GL_FALSE;
}
return context->isQuery(id);
}
return GL_FALSE;
}
void GL_APIENTRY BeginQueryEXT(GLenum target, GLuint id)
{
EVENT("(GLenum target = 0x%X, GLuint %d)", target, id);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateBeginQueryEXT(context, target, id))
{
return;
}
context->beginQuery(target, id);
}
}
void GL_APIENTRY EndQueryEXT(GLenum target)
{
EVENT("GLenum target = 0x%X)", target);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateEndQueryEXT(context, target))
{
return;
}
context->endQuery(target);
}
}
void GL_APIENTRY QueryCounterEXT(GLuint id, GLenum target)
{
EVENT("GLuint id = %d, GLenum target = 0x%X)", id, target);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateQueryCounterEXT(context, id, target))
{
return;
}
context->queryCounter(id, target);
}
}
void GL_APIENTRY GetQueryivEXT(GLenum target, GLenum pname, GLint *params)
{
EVENT("GLenum target = 0x%X, GLenum pname = 0x%X, GLint *params = 0x%0.8p)", target, pname,
params);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateGetQueryivEXT(context, target, pname, params))
{
return;
}
context->getQueryiv(target, pname, params);
}
}
void GL_APIENTRY GetQueryObjectivEXT(GLuint id, GLenum pname, GLint *params)
{
EVENT("(GLuint id = %d, GLenum pname = 0x%X, GLuint *params = 0x%0.8p)", id, pname, params);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateGetQueryObjectivEXT(context, id, pname, params))
{
return;
}
context->getQueryObjectiv(id, pname, params);
}
}
void GL_APIENTRY GetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint *params)
{
EVENT("(GLuint id = %d, GLenum pname = 0x%X, GLuint *params = 0x%0.8p)", id, pname, params);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateGetQueryObjectuivEXT(context, id, pname, params))
{
return;
}
context->getQueryObjectuiv(id, pname, params);
}
}
void GL_APIENTRY GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64 *params)
{
EVENT("(GLuint id = %d, GLenum pname = 0x%X, GLuint *params = 0x%0.16p)", id, pname, params);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateGetQueryObjecti64vEXT(context, id, pname, params))
{
return;
}
context->getQueryObjecti64v(id, pname, params);
}
}
void GL_APIENTRY GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64 *params)
{
EVENT("(GLuint id = %d, GLenum pname = 0x%X, GLuint *params = 0x%0.16p)", id, pname, params);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateGetQueryObjectui64vEXT(context, id, pname, params))
{
return;
}
context->getQueryObjectui64v(id, pname, params);
}
}
void GL_APIENTRY DeleteFencesNV(GLsizei n, const GLuint *fences)
{
EVENT("(GLsizei n = %d, const GLuint* fences = 0x%0.8p)", n, fences);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateDeleteFencesNV(context, n, fences))
{
return;
}
context->deleteFencesNV(n, fences);
}
}
void GL_APIENTRY DrawArraysInstancedANGLE(GLenum mode,
GLint first,
GLsizei count,
GLsizei primcount)
{
EVENT("(GLenum mode = 0x%X, GLint first = %d, GLsizei count = %d, GLsizei primcount = %d)",
mode, first, count, primcount);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateDrawArraysInstancedANGLE(context, mode, first, count, primcount))
{
return;
}
context->drawArraysInstanced(mode, first, count, primcount);
}
}
void GL_APIENTRY DrawElementsInstancedANGLE(GLenum mode,
GLsizei count,
GLenum type,
const void *indices,
GLsizei primcount)
{
EVENT(
"(GLenum mode = 0x%X, GLsizei count = %d, GLenum type = 0x%X, const void* indices = "
"0x%0.8p, GLsizei primcount = %d)",
mode, count, type, indices, primcount);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::DrawElementsInstancedANGLE>(mode, count, type, indices,
primcount);
if (!context->skipValidation() &&
!ValidateDrawElementsInstancedANGLE(context, mode, count, type, indices, primcount))
{
return;
}
context->drawElementsInstanced(mode, count, type, indices, primcount);
}
}
void GL_APIENTRY FinishFenceNV(GLuint fence)
{
EVENT("(GLuint fence = %d)", fence);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateFinishFenceNV(context, fence))
{
return;
}
context->finishFenceNV(fence);
}
}
void GL_APIENTRY GenFencesNV(GLsizei n, GLuint *fences)
{
EVENT("(GLsizei n = %d, GLuint* fences = 0x%0.8p)", n, fences);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateGenFencesNV(context, n, fences))
{
return;
}
context->genFencesNV(n, fences);
}
}
void GL_APIENTRY GetFenceivNV(GLuint fence, GLenum pname, GLint *params)
{
EVENT("(GLuint fence = %d, GLenum pname = 0x%X, GLint *params = 0x%0.8p)", fence, pname,
params);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateGetFenceivNV(context, fence, pname, params))
{
return;
}
context->getFenceivNV(fence, pname, params);
}
}
GLenum GL_APIENTRY GetGraphicsResetStatusEXT()
{
EVENT("()");
Context *context = GetGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateGetGraphicsResetStatusEXT(context))
{
return GL_NO_ERROR;
}
return context->getResetStatus();
}
return GL_NO_ERROR;
}
void GL_APIENTRY GetTranslatedShaderSourceANGLE(GLuint shader,
GLsizei bufsize,
GLsizei *length,
GLchar *source)
{
EVENT(
"(GLuint shader = %d, GLsizei bufsize = %d, GLsizei* length = 0x%0.8p, GLchar* source = "
"0x%0.8p)",
shader, bufsize, length, source);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateGetTranslatedShaderSourceANGLE(context, shader, bufsize, length, source))
{
return;
}
context->getTranslatedShaderSource(shader, bufsize, length, source);
}
}
void GL_APIENTRY GetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize, GLfloat *params)
{
EVENT(
"(GLuint program = %d, GLint location = %d, GLsizei bufSize = %d, GLfloat* params = "
"0x%0.8p)",
program, location, bufSize, params);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateGetnUniformfvEXT(context, program, location, bufSize, params))
{
return;
}
context->getnUniformfv(program, location, bufSize, params);
}
}
void GL_APIENTRY GetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint *params)
{
EVENT(
"(GLuint program = %d, GLint location = %d, GLsizei bufSize = %d, GLint* params = 0x%0.8p)",
program, location, bufSize, params);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateGetnUniformivEXT(context, program, location, bufSize, params))
{
return;
}
context->getnUniformiv(program, location, bufSize, params);
}
}
GLboolean GL_APIENTRY IsFenceNV(GLuint fence)
{
EVENT("(GLuint fence = %d)", fence);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateIsFenceNV(context, fence))
{
return GL_FALSE;
}
return context->isFenceNV(fence);
}
return GL_FALSE;
}
void GL_APIENTRY ReadnPixelsEXT(GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
GLsizei bufSize,
void *data)
{
EVENT(
"(GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d, "
"GLenum format = 0x%X, GLenum type = 0x%X, GLsizei bufSize = 0x%d, void *data = 0x%0.8p)",
x, y, width, height, format, type, bufSize, data);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateReadnPixelsEXT(context, x, y, width, height, format, type, bufSize, data))
{
return;
}
context->readnPixels(x, y, width, height, format, type, bufSize, data);
}
}
void GL_APIENTRY RenderbufferStorageMultisampleANGLE(GLenum target,
GLsizei samples,
GLenum internalformat,
GLsizei width,
GLsizei height)
{
EVENT(
"(GLenum target = 0x%X, GLsizei samples = %d, GLenum internalformat = 0x%X, GLsizei width "
"= %d, GLsizei height = %d)",
target, samples, internalformat, width, height);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateRenderbufferStorageMultisampleANGLE(context, target, samples, internalformat,
width, height))
{
return;
}
context->renderbufferStorageMultisample(target, samples, internalformat, width, height);
}
}
void GL_APIENTRY SetFenceNV(GLuint fence, GLenum condition)
{
EVENT("(GLuint fence = %d, GLenum condition = 0x%X)", fence, condition);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateSetFenceNV(context, fence, condition))
{
return;
}
context->setFenceNV(fence, condition);
}
}
GLboolean GL_APIENTRY TestFenceNV(GLuint fence)
{
EVENT("(GLuint fence = %d)", fence);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateTestFenceNV(context, fence))
{
return GL_TRUE;
}
return context->testFenceNV(fence);
}
return GL_TRUE;
}
void GL_APIENTRY
TexStorage2DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
{
EVENT(
"(GLenum target = 0x%X, GLsizei levels = %d, GLenum internalformat = 0x%X, GLsizei width = "
"%d, GLsizei height = %d)",
target, levels, internalformat, width, height);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateTexStorage2DEXT(context, target, levels, internalformat, width, height))
{
return;
}
context->texStorage2D(target, levels, internalformat, width, height);
}
}
void GL_APIENTRY VertexAttribDivisorANGLE(GLuint index, GLuint divisor)
{
EVENT("(GLuint index = %d, GLuint divisor = %d)", index, divisor);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateVertexAttribDivisorANGLE(context, index, divisor))
{
return;
}
context->vertexAttribDivisor(index, divisor);
}
}
void GL_APIENTRY BlitFramebufferANGLE(GLint srcX0,
GLint srcY0,
GLint srcX1,
GLint srcY1,
GLint dstX0,
GLint dstY0,
GLint dstX1,
GLint dstY1,
GLbitfield mask,
GLenum filter)
{
EVENT(
"(GLint srcX0 = %d, GLint srcY0 = %d, GLint srcX1 = %d, GLint srcY1 = %d, "
"GLint dstX0 = %d, GLint dstY0 = %d, GLint dstX1 = %d, GLint dstY1 = %d, "
"GLbitfield mask = 0x%X, GLenum filter = 0x%X)",
srcX0, srcY0, srcX1, srcX1, dstX0, dstY0, dstX1, dstY1, mask, filter);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateBlitFramebufferANGLE(context, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1,
dstY1, mask, filter))
{
return;
}
context->blitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask,
filter);
}
}
void GL_APIENTRY DiscardFramebufferEXT(GLenum target,
GLsizei numAttachments,
const GLenum *attachments)
{
EVENT("(GLenum target = 0x%X, GLsizei numAttachments = %d, attachments = 0x%0.8p)", target,
numAttachments, attachments);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateDiscardFramebufferEXT(context, target, numAttachments, attachments))
{
return;
}
context->discardFramebuffer(target, numAttachments, attachments);
}
}
void GL_APIENTRY TexImage3DOES(GLenum target,
GLint level,
GLenum internalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLint border,
GLenum format,
GLenum type,
const void *pixels)
{
EVENT(
"(GLenum target = 0x%X, GLint level = %d, GLenum internalformat = 0x%X, "
"GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLint border = %d, "
"GLenum format = 0x%X, GLenum type = 0x%x, const void* pixels = 0x%0.8p)",
target, level, internalformat, width, height, depth, border, format, type, pixels);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateTexImage3DOES(context, target, level, internalformat, width, height, depth,
border, format, type, pixels))
{
return;
}
context->texImage3D(target, level, internalformat, width, height, depth, border, format,
type, pixels);
}
}
void GL_APIENTRY GetProgramBinaryOES(GLuint program,
GLsizei bufSize,
GLsizei *length,
GLenum *binaryFormat,
void *binary)
{
EVENT(
"(GLenum program = 0x%X, bufSize = %d, length = 0x%0.8p, binaryFormat = 0x%0.8p, binary = "
"0x%0.8p)",
program, bufSize, length, binaryFormat, binary);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateGetProgramBinaryOES(context, program, bufSize, length, binaryFormat, binary))
{
return;
}
context->getProgramBinary(program, bufSize, length, binaryFormat, binary);
}
}
void GL_APIENTRY ProgramBinaryOES(GLuint program,
GLenum binaryFormat,
const void *binary,
GLint length)
{
EVENT("(GLenum program = 0x%X, binaryFormat = 0x%x, binary = 0x%0.8p, length = %d)", program,
binaryFormat, binary, length);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateProgramBinaryOES(context, program, binaryFormat, binary, length))
{
return;
}
context->programBinary(program, binaryFormat, binary, length);
}
}
void GL_APIENTRY DrawBuffersEXT(GLsizei n, const GLenum *bufs)
{
EVENT("(GLenum n = %d, bufs = 0x%0.8p)", n, bufs);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateDrawBuffersEXT(context, n, bufs))
{
return;
}
context->drawBuffers(n, bufs);
}
}
void GL_APIENTRY GetBufferPointervOES(GLenum target, GLenum pname, void **params)
{
EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, void** params = 0x%0.8p)", target, pname,
params);
Context *context = GetValidGlobalContext();
if (context)
{
BufferBinding targetPacked = FromGLenum<BufferBinding>(target);
if (!context->skipValidation() &&
!ValidateGetBufferPointervOES(context, targetPacked, pname, params))
{
return;
}
context->getBufferPointerv(targetPacked, pname, params);
}
}
void *GL_APIENTRY MapBufferOES(GLenum target, GLenum access)
{
EVENT("(GLenum target = 0x%X, GLbitfield access = 0x%X)", target, access);
Context *context = GetValidGlobalContext();
if (context)
{
BufferBinding targetPacked = FromGLenum<BufferBinding>(target);
if (!context->skipValidation() && !ValidateMapBufferOES(context, targetPacked, access))
{
return nullptr;
}
return context->mapBuffer(targetPacked, access);
}
return nullptr;
}
GLboolean GL_APIENTRY UnmapBufferOES(GLenum target)
{
EVENT("(GLenum target = 0x%X)", target);
Context *context = GetValidGlobalContext();
if (context)
{
BufferBinding targetPacked = FromGLenum<BufferBinding>(target);
if (!context->skipValidation() && !ValidateUnmapBufferOES(context, targetPacked))
{
return GL_FALSE;
}
return context->unmapBuffer(targetPacked);
}
return GL_FALSE;
}
void *GL_APIENTRY MapBufferRangeEXT(GLenum target,
GLintptr offset,
GLsizeiptr length,
GLbitfield access)
{
EVENT(
"(GLenum target = 0x%X, GLintptr offset = %d, GLsizeiptr length = %d, GLbitfield access = "
"0x%X)",
target, offset, length, access);
Context *context = GetValidGlobalContext();
if (context)
{
BufferBinding targetPacked = FromGLenum<BufferBinding>(target);
if (!context->skipValidation() &&
!ValidateMapBufferRangeEXT(context, targetPacked, offset, length, access))
{
return nullptr;
}
return context->mapBufferRange(targetPacked, offset, length, access);
}
return nullptr;
}
void GL_APIENTRY FlushMappedBufferRangeEXT(GLenum target, GLintptr offset, GLsizeiptr length)
{
EVENT("(GLenum target = 0x%X, GLintptr offset = %d, GLsizeiptr length = %d)", target, offset,
length);
Context *context = GetValidGlobalContext();
if (context)
{
BufferBinding targetPacked = FromGLenum<BufferBinding>(target);
if (!context->skipValidation() &&
!ValidateFlushMappedBufferRangeEXT(context, targetPacked, offset, length))
{
return;
}
context->flushMappedBufferRange(targetPacked, offset, length);
}
}
void GL_APIENTRY InsertEventMarkerEXT(GLsizei length, const char *marker)
{
// Don't run an EVENT() macro on the EXT_debug_marker entry points.
// It can interfere with the debug events being set by the caller.
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateInsertEventMarkerEXT(context, length, marker))
{
return;
}
context->insertEventMarker(length, marker);
}
}
void GL_APIENTRY PushGroupMarkerEXT(GLsizei length, const char *marker)
{
// Don't run an EVENT() macro on the EXT_debug_marker entry points.
// It can interfere with the debug events being set by the caller.
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidatePushGroupMarkerEXT(context, length, marker))
{
return;
}
context->pushGroupMarker(length, marker);
}
}
void GL_APIENTRY PopGroupMarkerEXT()
{
// Don't run an EVENT() macro on the EXT_debug_marker entry points.
// It can interfere with the debug events being set by the caller.
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidatePopGroupMarkerEXT(context))
{
return;
}
context->popGroupMarker();
}
}
ANGLE_EXPORT void GL_APIENTRY EGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image)
{
EVENT("(GLenum target = 0x%X, GLeglImageOES image = 0x%0.8p)", target, image);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateEGLImageTargetTexture2DOES(context, target, image))
{
return;
}
context->eGLImageTargetTexture2DOES(target, image);
}
}
ANGLE_EXPORT void GL_APIENTRY EGLImageTargetRenderbufferStorageOES(GLenum target,
GLeglImageOES image)
{
EVENT("(GLenum target = 0x%X, GLeglImageOES image = 0x%0.8p)", target, image);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateEGLImageTargetRenderbufferStorageOES(context, target, image))
{
return;
}
context->eGLImageTargetRenderbufferStorageOES(target, image);
}
}
void GL_APIENTRY BindVertexArrayOES(GLuint array)
{
EVENT("(GLuint array = %u)", array);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateBindVertexArrayOES(context, array))
{
return;
}
context->bindVertexArray(array);
}
}
void GL_APIENTRY DeleteVertexArraysOES(GLsizei n, const GLuint *arrays)
{
EVENT("(GLsizei n = %d, const GLuint* arrays = 0x%0.8p)", n, arrays);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateDeleteVertexArraysOES(context, n, arrays))
{
return;
}
context->deleteVertexArrays(n, arrays);
}
}
void GL_APIENTRY GenVertexArraysOES(GLsizei n, GLuint *arrays)
{
EVENT("(GLsizei n = %d, GLuint* arrays = 0x%0.8p)", n, arrays);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateGenVertexArraysOES(context, n, arrays))
{
return;
}
context->genVertexArrays(n, arrays);
}
}
GLboolean GL_APIENTRY IsVertexArrayOES(GLuint array)
{
EVENT("(GLuint array = %u)", array);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateIsVertexArrayOES(context, array))
{
return GL_FALSE;
}
return context->isVertexArray(array);
}
return GL_FALSE;
}
void GL_APIENTRY DebugMessageControlKHR(GLenum source,
GLenum type,
GLenum severity,
GLsizei count,
const GLuint *ids,
GLboolean enabled)
{
EVENT(
"(GLenum source = 0x%X, GLenum type = 0x%X, GLenum severity = 0x%X, GLsizei count = %d, "
"GLint *ids = 0x%0.8p, GLboolean enabled = %d)",
source, type, severity, count, ids, enabled);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateDebugMessageControlKHR(context, source, type, severity, count, ids, enabled))
{
return;
}
context->debugMessageControl(source, type, severity, count, ids, enabled);
}
}
void GL_APIENTRY DebugMessageInsertKHR(GLenum source,
GLenum type,
GLuint id,
GLenum severity,
GLsizei length,
const GLchar *buf)
{
EVENT(
"(GLenum source = 0x%X, GLenum type = 0x%X, GLint id = %d, GLenum severity = 0x%X, GLsizei "
"length = %d, const GLchar *buf = 0x%0.8p)",
source, type, id, severity, length, buf);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateDebugMessageInsertKHR(context, source, type, id, severity, length, buf))
{
return;
}
context->debugMessageInsert(source, type, id, severity, length, buf);
}
}
void GL_APIENTRY DebugMessageCallbackKHR(GLDEBUGPROCKHR callback, const void *userParam)
{
EVENT("(GLDEBUGPROCKHR callback = 0x%0.8p, const void *userParam = 0x%0.8p)", callback,
userParam);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateDebugMessageCallbackKHR(context, callback, userParam))
{
return;
}
context->debugMessageCallback(callback, userParam);
}
}
GLuint GL_APIENTRY GetDebugMessageLogKHR(GLuint count,
GLsizei bufSize,
GLenum *sources,
GLenum *types,
GLuint *ids,
GLenum *severities,
GLsizei *lengths,
GLchar *messageLog)
{
EVENT(
"(GLsizei count = %d, GLsizei bufSize = %d, GLenum *sources, GLenum *types = 0x%0.8p, "
"GLuint *ids = 0x%0.8p, GLenum *severities = 0x%0.8p, GLsizei *lengths = 0x%0.8p, GLchar "
"*messageLog = 0x%0.8p)",
count, bufSize, sources, types, ids, severities, lengths, messageLog);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateGetDebugMessageLogKHR(context, count, bufSize, sources, types, ids, severities,
lengths, messageLog))
{
return 0;
}
return context->getDebugMessageLog(count, bufSize, sources, types, ids, severities, lengths,
messageLog);
}
return 0;
}
void GL_APIENTRY PushDebugGroupKHR(GLenum source, GLuint id, GLsizei length, const GLchar *message)
{
EVENT(
"(GLenum source = 0x%X, GLuint id = 0x%X, GLsizei length = %d, const GLchar *message = "
"0x%0.8p)",
source, id, length, message);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidatePushDebugGroupKHR(context, source, id, length, message))
{
return;
}
std::string msg(message, (length > 0) ? static_cast<size_t>(length) : strlen(message));
context->pushDebugGroup(source, id, length, message);
}
}
void GL_APIENTRY PopDebugGroupKHR(void)
{
EVENT("()");
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidatePopDebugGroupKHR(context))
{
return;
}
context->popDebugGroup();
}
}
void GL_APIENTRY ObjectLabelKHR(GLenum identifier, GLuint name, GLsizei length, const GLchar *label)
{
EVENT(
"(GLenum identifier = 0x%X, GLuint name = %u, GLsizei length = %d, const GLchar *label = "
"0x%0.8p)",
identifier, name, length, label);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateObjectLabelKHR(context, identifier, name, length, label))
{
return;
}
context->objectLabel(identifier, name, length, label);
}
}
void GL_APIENTRY
GetObjectLabelKHR(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label)
{
EVENT(
"(GLenum identifier = 0x%X, GLuint name = %u, GLsizei bufSize = %d, GLsizei *length = "
"0x%0.8p, GLchar *label = 0x%0.8p)",
identifier, name, bufSize, length, label);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateGetObjectLabelKHR(context, identifier, name, bufSize, length, label))
{
return;
}
context->getObjectLabel(identifier, name, bufSize, length, label);
}
}
void GL_APIENTRY ObjectPtrLabelKHR(const void *ptr, GLsizei length, const GLchar *label)
{
EVENT("(const void *ptr = 0x%0.8p, GLsizei length = %d, const GLchar *label = 0x%0.8p)", ptr,
length, label);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateObjectPtrLabelKHR(context, ptr, length, label))
{
return;
}
context->objectPtrLabel(ptr, length, label);
}
}
void GL_APIENTRY GetObjectPtrLabelKHR(const void *ptr,
GLsizei bufSize,
GLsizei *length,
GLchar *label)
{
EVENT(
"(const void *ptr = 0x%0.8p, GLsizei bufSize = %d, GLsizei *length = 0x%0.8p, GLchar "
"*label = 0x%0.8p)",
ptr, bufSize, length, label);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateGetObjectPtrLabelKHR(context, ptr, bufSize, length, label))
{
return;
}
context->getObjectPtrLabel(ptr, bufSize, length, label);
}
}
void GL_APIENTRY GetPointervKHR(GLenum pname, void **params)
{
EVENT("(GLenum pname = 0x%X, void **params = 0x%0.8p)", pname, params);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateGetPointervKHR(context, pname, params))
{
return;
}
context->getPointerv(pname, params);
}
}
ANGLE_EXPORT void GL_APIENTRY BindUniformLocationCHROMIUM(GLuint program, ANGLE_EXPORT void GL_APIENTRY BindUniformLocationCHROMIUM(GLuint program,
GLint location, GLint location,
const GLchar *name) const GLchar *name)
......
...@@ -16,185 +16,6 @@ ...@@ -16,185 +16,6 @@
namespace gl namespace gl
{ {
// GL_ANGLE_framebuffer_blit
ANGLE_EXPORT void GL_APIENTRY BlitFramebufferANGLE(GLint srcX0,
GLint srcY0,
GLint srcX1,
GLint srcY1,
GLint dstX0,
GLint dstY0,
GLint dstX1,
GLint dstY1,
GLbitfield mask,
GLenum filter);
// GL_ANGLE_framebuffer_multisample
ANGLE_EXPORT void GL_APIENTRY RenderbufferStorageMultisampleANGLE(GLenum target,
GLsizei samples,
GLenum internalformat,
GLsizei width,
GLsizei height);
// GL_EXT_discard_framebuffer
ANGLE_EXPORT void GL_APIENTRY DiscardFramebufferEXT(GLenum target,
GLsizei numAttachments,
const GLenum *attachments);
// GL_NV_fence
ANGLE_EXPORT void GL_APIENTRY DeleteFencesNV(GLsizei n, const GLuint *fences);
ANGLE_EXPORT void GL_APIENTRY GenFencesNV(GLsizei n, GLuint *fences);
ANGLE_EXPORT GLboolean GL_APIENTRY IsFenceNV(GLuint fence);
ANGLE_EXPORT GLboolean GL_APIENTRY TestFenceNV(GLuint fence);
ANGLE_EXPORT void GL_APIENTRY GetFenceivNV(GLuint fence, GLenum pname, GLint *params);
ANGLE_EXPORT void GL_APIENTRY FinishFenceNV(GLuint fence);
ANGLE_EXPORT void GL_APIENTRY SetFenceNV(GLuint fence, GLenum condition);
// GL_ANGLE_translated_shader_source
ANGLE_EXPORT void GL_APIENTRY GetTranslatedShaderSourceANGLE(GLuint shader,
GLsizei bufsize,
GLsizei *length,
GLchar *source);
// GL_EXT_texture_storage
ANGLE_EXPORT void GL_APIENTRY TexStorage2DEXT(GLenum target,
GLsizei levels,
GLenum internalformat,
GLsizei width,
GLsizei height);
// GL_EXT_robustness
ANGLE_EXPORT GLenum GL_APIENTRY GetGraphicsResetStatusEXT(void);
ANGLE_EXPORT void GL_APIENTRY ReadnPixelsEXT(GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
GLsizei bufSize,
void *data);
ANGLE_EXPORT void GL_APIENTRY GetnUniformfvEXT(GLuint program,
GLint location,
GLsizei bufSize,
float *params);
ANGLE_EXPORT void GL_APIENTRY GetnUniformivEXT(GLuint program,
GLint location,
GLsizei bufSize,
GLint *params);
// GL_EXT_occlusion_query_boolean
ANGLE_EXPORT void GL_APIENTRY GenQueriesEXT(GLsizei n, GLuint *ids);
ANGLE_EXPORT void GL_APIENTRY DeleteQueriesEXT(GLsizei n, const GLuint *ids);
ANGLE_EXPORT GLboolean GL_APIENTRY IsQueryEXT(GLuint id);
ANGLE_EXPORT void GL_APIENTRY BeginQueryEXT(GLenum target, GLuint id);
ANGLE_EXPORT void GL_APIENTRY EndQueryEXT(GLenum target);
ANGLE_EXPORT void GL_APIENTRY GetQueryivEXT(GLenum target, GLenum pname, GLint *params);
ANGLE_EXPORT void GL_APIENTRY GetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint *params);
// GL_EXT_disjoint_timer_query
ANGLE_EXPORT void GL_APIENTRY QueryCounterEXT(GLuint id, GLenum target);
ANGLE_EXPORT void GL_APIENTRY GetQueryObjectivEXT(GLuint id, GLenum pname, GLint *params);
ANGLE_EXPORT void GL_APIENTRY GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64 *params);
ANGLE_EXPORT void GL_APIENTRY GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64 *params);
// GL_EXT_draw_buffers
ANGLE_EXPORT void GL_APIENTRY DrawBuffersEXT(GLsizei n, const GLenum *bufs);
// GL_ANGLE_instanced_arrays
ANGLE_EXPORT void GL_APIENTRY DrawArraysInstancedANGLE(GLenum mode,
GLint first,
GLsizei count,
GLsizei primcount);
ANGLE_EXPORT void GL_APIENTRY DrawElementsInstancedANGLE(GLenum mode,
GLsizei count,
GLenum type,
const void *indices,
GLsizei primcount);
ANGLE_EXPORT void GL_APIENTRY VertexAttribDivisorANGLE(GLuint index, GLuint divisor);
// GL_OES_get_program_binary
ANGLE_EXPORT void GL_APIENTRY GetProgramBinaryOES(GLuint program,
GLsizei bufSize,
GLsizei *length,
GLenum *binaryFormat,
void *binary);
ANGLE_EXPORT void GL_APIENTRY ProgramBinaryOES(GLuint program,
GLenum binaryFormat,
const void *binary,
GLint length);
// GL_OES_mapbuffer
ANGLE_EXPORT void *GL_APIENTRY MapBufferOES(GLenum target, GLenum access);
ANGLE_EXPORT GLboolean GL_APIENTRY UnmapBufferOES(GLenum target);
ANGLE_EXPORT void GL_APIENTRY GetBufferPointervOES(GLenum target, GLenum pname, void **params);
// GL_EXT_map_buffer_range
ANGLE_EXPORT void *GL_APIENTRY MapBufferRangeEXT(GLenum target,
GLintptr offset,
GLsizeiptr length,
GLbitfield access);
ANGLE_EXPORT void GL_APIENTRY FlushMappedBufferRangeEXT(GLenum target,
GLintptr offset,
GLsizeiptr length);
// GL_EXT_debug_marker
ANGLE_EXPORT void GL_APIENTRY InsertEventMarkerEXT(GLsizei length, const char *marker);
ANGLE_EXPORT void GL_APIENTRY PushGroupMarkerEXT(GLsizei length, const char *marker);
ANGLE_EXPORT void GL_APIENTRY PopGroupMarkerEXT();
// GL_OES_EGL_image
ANGLE_EXPORT void GL_APIENTRY EGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image);
ANGLE_EXPORT void GL_APIENTRY EGLImageTargetRenderbufferStorageOES(GLenum target,
GLeglImageOES image);
// GL_OES_vertex_array_object
ANGLE_EXPORT void GL_APIENTRY BindVertexArrayOES(GLuint array);
ANGLE_EXPORT void GL_APIENTRY DeleteVertexArraysOES(GLsizei n, const GLuint *arrays);
ANGLE_EXPORT void GL_APIENTRY GenVertexArraysOES(GLsizei n, GLuint *arrays);
ANGLE_EXPORT GLboolean GL_APIENTRY IsVertexArrayOES(GLuint array);
// GL_KHR_debug
ANGLE_EXPORT void GL_APIENTRY DebugMessageControlKHR(GLenum source,
GLenum type,
GLenum severity,
GLsizei count,
const GLuint *ids,
GLboolean enabled);
ANGLE_EXPORT void GL_APIENTRY DebugMessageInsertKHR(GLenum source,
GLenum type,
GLuint id,
GLenum severity,
GLsizei length,
const GLchar *buf);
ANGLE_EXPORT void GL_APIENTRY DebugMessageCallbackKHR(GLDEBUGPROCKHR callback,
const void *userParam);
ANGLE_EXPORT GLuint GL_APIENTRY GetDebugMessageLogKHR(GLuint count,
GLsizei bufSize,
GLenum *sources,
GLenum *types,
GLuint *ids,
GLenum *severities,
GLsizei *lengths,
GLchar *messageLog);
ANGLE_EXPORT void GL_APIENTRY PushDebugGroupKHR(GLenum source,
GLuint id,
GLsizei length,
const GLchar *message);
ANGLE_EXPORT void GL_APIENTRY PopDebugGroupKHR(void);
ANGLE_EXPORT void GL_APIENTRY ObjectLabelKHR(GLenum identifier,
GLuint name,
GLsizei length,
const GLchar *label);
ANGLE_EXPORT void GL_APIENTRY
GetObjectLabelKHR(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
ANGLE_EXPORT void GL_APIENTRY ObjectPtrLabelKHR(const void *ptr,
GLsizei length,
const GLchar *label);
ANGLE_EXPORT void GL_APIENTRY GetObjectPtrLabelKHR(const void *ptr,
GLsizei bufSize,
GLsizei *length,
GLchar *label);
ANGLE_EXPORT void GL_APIENTRY GetPointervKHR(GLenum pname, void **params);
// GL_CHROMIUM_bind_uniform_location // GL_CHROMIUM_bind_uniform_location
ANGLE_EXPORT void GL_APIENTRY BindUniformLocationCHROMIUM(GLuint program, ANGLE_EXPORT void GL_APIENTRY BindUniformLocationCHROMIUM(GLuint program,
GLint location, GLint location,
......
// GENERATED FILE - DO NOT EDIT.
// Generated by generate_entry_points.py using data from gl.xml.
//
// Copyright 2018 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_gles_2_0_ext_autogen.cpp:
// Defines the GLES extension entry points.
#include "libANGLE/Context.h"
#include "libANGLE/validationES.h"
#include "libANGLE/validationES2.h"
#include "libANGLE/validationES3.h"
#include "libANGLE/validationES31.h"
#include "libGLESv2/global_state.h"
namespace gl
{
// GL_ANGLE_framebuffer_blit
void GL_APIENTRY BlitFramebufferANGLE(GLint srcX0,
GLint srcY0,
GLint srcX1,
GLint srcY1,
GLint dstX0,
GLint dstY0,
GLint dstX1,
GLint dstY1,
GLbitfield mask,
GLenum filter)
{
EVENT(
"(GLint srcX0 = %d, GLint srcY0 = %d, GLint srcX1 = %d, GLint srcY1 = %d, GLint dstX0 = "
"%d, GLint dstY0 = %d, GLint dstX1 = %d, GLint dstY1 = %d, GLbitfield mask = 0x%X, GLenum "
"filter = 0x%X)",
srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::BlitFramebufferANGLE>(srcX0, srcY0, srcX1, srcY1, dstX0,
dstY0, dstX1, dstY1, mask, filter);
if (context->skipValidation() ||
ValidateBlitFramebufferANGLE(context, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1,
dstY1, mask, filter))
{
context->blitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask,
filter);
}
}
}
// GL_ANGLE_framebuffer_multisample
void GL_APIENTRY RenderbufferStorageMultisampleANGLE(GLenum target,
GLsizei samples,
GLenum internalformat,
GLsizei width,
GLsizei height)
{
EVENT(
"(GLenum target = 0x%X, GLsizei samples = %d, GLenum internalformat = 0x%X, GLsizei width "
"= %d, GLsizei height = %d)",
target, samples, internalformat, width, height);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::RenderbufferStorageMultisampleANGLE>(
target, samples, internalformat, width, height);
if (context->skipValidation() ||
ValidateRenderbufferStorageMultisampleANGLE(context, target, samples, internalformat,
width, height))
{
context->renderbufferStorageMultisample(target, samples, internalformat, width, height);
}
}
}
// GL_ANGLE_instanced_arrays
void GL_APIENTRY DrawArraysInstancedANGLE(GLenum mode,
GLint first,
GLsizei count,
GLsizei primcount)
{
EVENT("(GLenum mode = 0x%X, GLint first = %d, GLsizei count = %d, GLsizei primcount = %d)",
mode, first, count, primcount);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::DrawArraysInstancedANGLE>(mode, first, count, primcount);
if (context->skipValidation() ||
ValidateDrawArraysInstancedANGLE(context, mode, first, count, primcount))
{
context->drawArraysInstanced(mode, first, count, primcount);
}
}
}
void GL_APIENTRY DrawElementsInstancedANGLE(GLenum mode,
GLsizei count,
GLenum type,
const void *indices,
GLsizei primcount)
{
EVENT(
"(GLenum mode = 0x%X, GLsizei count = %d, GLenum type = 0x%X, const void *indices = "
"0x%0.8p, GLsizei primcount = %d)",
mode, count, type, indices, primcount);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::DrawElementsInstancedANGLE>(mode, count, type, indices,
primcount);
if (context->skipValidation() ||
ValidateDrawElementsInstancedANGLE(context, mode, count, type, indices, primcount))
{
context->drawElementsInstanced(mode, count, type, indices, primcount);
}
}
}
void GL_APIENTRY VertexAttribDivisorANGLE(GLuint index, GLuint divisor)
{
EVENT("(GLuint index = %u, GLuint divisor = %u)", index, divisor);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::VertexAttribDivisorANGLE>(index, divisor);
if (context->skipValidation() || ValidateVertexAttribDivisorANGLE(context, index, divisor))
{
context->vertexAttribDivisor(index, divisor);
}
}
}
// GL_ANGLE_translated_shader_source
void GL_APIENTRY GetTranslatedShaderSourceANGLE(GLuint shader,
GLsizei bufsize,
GLsizei *length,
GLchar *source)
{
EVENT(
"(GLuint shader = %u, GLsizei bufsize = %d, GLsizei *length = 0x%0.8p, GLchar *source = "
"0x%0.8p)",
shader, bufsize, length, source);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::GetTranslatedShaderSourceANGLE>(shader, bufsize, length,
source);
if (context->skipValidation() ||
ValidateGetTranslatedShaderSourceANGLE(context, shader, bufsize, length, source))
{
context->getTranslatedShaderSource(shader, bufsize, length, source);
}
}
}
// GL_EXT_debug_marker
void GL_APIENTRY InsertEventMarkerEXT(GLsizei length, const GLchar *marker)
{
// Don't run an EVENT() macro on the EXT_debug_marker entry points.
// It can interfere with the debug events being set by the caller.
// EVENT("(GLsizei length = %d, const GLchar *marker = 0x%0.8p)", length, marker);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::InsertEventMarkerEXT>(length, marker);
if (context->skipValidation() || ValidateInsertEventMarkerEXT(context, length, marker))
{
context->insertEventMarker(length, marker);
}
}
}
void GL_APIENTRY PopGroupMarkerEXT()
{
// Don't run an EVENT() macro on the EXT_debug_marker entry points.
// It can interfere with the debug events being set by the caller.
// EVENT("()");
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::PopGroupMarkerEXT>();
if (context->skipValidation() || ValidatePopGroupMarkerEXT(context))
{
context->popGroupMarker();
}
}
}
void GL_APIENTRY PushGroupMarkerEXT(GLsizei length, const GLchar *marker)
{
// Don't run an EVENT() macro on the EXT_debug_marker entry points.
// It can interfere with the debug events being set by the caller.
// EVENT("(GLsizei length = %d, const GLchar *marker = 0x%0.8p)", length, marker);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::PushGroupMarkerEXT>(length, marker);
if (context->skipValidation() || ValidatePushGroupMarkerEXT(context, length, marker))
{
context->pushGroupMarker(length, marker);
}
}
}
// GL_EXT_discard_framebuffer
void GL_APIENTRY DiscardFramebufferEXT(GLenum target,
GLsizei numAttachments,
const GLenum *attachments)
{
EVENT(
"(GLenum target = 0x%X, GLsizei numAttachments = %d, const GLenum *attachments = 0x%0.8p)",
target, numAttachments, attachments);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::DiscardFramebufferEXT>(target, numAttachments,
attachments);
if (context->skipValidation() ||
ValidateDiscardFramebufferEXT(context, target, numAttachments, attachments))
{
context->discardFramebuffer(target, numAttachments, attachments);
}
}
}
// GL_EXT_disjoint_timer_query
void GL_APIENTRY BeginQueryEXT(GLenum target, GLuint id)
{
EVENT("(GLenum target = 0x%X, GLuint id = %u)", target, id);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::BeginQueryEXT>(target, id);
if (context->skipValidation() || ValidateBeginQueryEXT(context, target, id))
{
context->beginQuery(target, id);
}
}
}
void GL_APIENTRY DeleteQueriesEXT(GLsizei n, const GLuint *ids)
{
EVENT("(GLsizei n = %d, const GLuint *ids = 0x%0.8p)", n, ids);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::DeleteQueriesEXT>(n, ids);
if (context->skipValidation() || ValidateDeleteQueriesEXT(context, n, ids))
{
context->deleteQueries(n, ids);
}
}
}
void GL_APIENTRY EndQueryEXT(GLenum target)
{
EVENT("(GLenum target = 0x%X)", target);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::EndQueryEXT>(target);
if (context->skipValidation() || ValidateEndQueryEXT(context, target))
{
context->endQuery(target);
}
}
}
void GL_APIENTRY GenQueriesEXT(GLsizei n, GLuint *ids)
{
EVENT("(GLsizei n = %d, GLuint *ids = 0x%0.8p)", n, ids);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::GenQueriesEXT>(n, ids);
if (context->skipValidation() || ValidateGenQueriesEXT(context, n, ids))
{
context->genQueries(n, ids);
}
}
}
void GL_APIENTRY GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64 *params)
{
EVENT("(GLuint id = %u, GLenum pname = 0x%X, GLint64 *params = 0x%0.8p)", id, pname, params);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::GetQueryObjecti64vEXT>(id, pname, params);
if (context->skipValidation() || ValidateGetQueryObjecti64vEXT(context, id, pname, params))
{
context->getQueryObjecti64v(id, pname, params);
}
}
}
void GL_APIENTRY GetQueryObjectivEXT(GLuint id, GLenum pname, GLint *params)
{
EVENT("(GLuint id = %u, GLenum pname = 0x%X, GLint *params = 0x%0.8p)", id, pname, params);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::GetQueryObjectivEXT>(id, pname, params);
if (context->skipValidation() || ValidateGetQueryObjectivEXT(context, id, pname, params))
{
context->getQueryObjectiv(id, pname, params);
}
}
}
void GL_APIENTRY GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64 *params)
{
EVENT("(GLuint id = %u, GLenum pname = 0x%X, GLuint64 *params = 0x%0.8p)", id, pname, params);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::GetQueryObjectui64vEXT>(id, pname, params);
if (context->skipValidation() || ValidateGetQueryObjectui64vEXT(context, id, pname, params))
{
context->getQueryObjectui64v(id, pname, params);
}
}
}
void GL_APIENTRY GetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint *params)
{
EVENT("(GLuint id = %u, GLenum pname = 0x%X, GLuint *params = 0x%0.8p)", id, pname, params);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::GetQueryObjectuivEXT>(id, pname, params);
if (context->skipValidation() || ValidateGetQueryObjectuivEXT(context, id, pname, params))
{
context->getQueryObjectuiv(id, pname, params);
}
}
}
void GL_APIENTRY GetQueryivEXT(GLenum target, GLenum pname, GLint *params)
{
EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint *params = 0x%0.8p)", target, pname,
params);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::GetQueryivEXT>(target, pname, params);
if (context->skipValidation() || ValidateGetQueryivEXT(context, target, pname, params))
{
context->getQueryiv(target, pname, params);
}
}
}
GLboolean GL_APIENTRY IsQueryEXT(GLuint id)
{
EVENT("(GLuint id = %u)", id);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::IsQueryEXT>(id);
if (context->skipValidation() || ValidateIsQueryEXT(context, id))
{
return context->isQuery(id);
}
}
return GetDefaultReturnValue<EntryPoint::IsQueryEXT, GLboolean>();
}
void GL_APIENTRY QueryCounterEXT(GLuint id, GLenum target)
{
EVENT("(GLuint id = %u, GLenum target = 0x%X)", id, target);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::QueryCounterEXT>(id, target);
if (context->skipValidation() || ValidateQueryCounterEXT(context, id, target))
{
context->queryCounter(id, target);
}
}
}
// GL_EXT_draw_buffers
void GL_APIENTRY DrawBuffersEXT(GLsizei n, const GLenum *bufs)
{
EVENT("(GLsizei n = %d, const GLenum *bufs = 0x%0.8p)", n, bufs);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::DrawBuffersEXT>(n, bufs);
if (context->skipValidation() || ValidateDrawBuffersEXT(context, n, bufs))
{
context->drawBuffers(n, bufs);
}
}
}
// GL_EXT_map_buffer_range
void GL_APIENTRY FlushMappedBufferRangeEXT(GLenum target, GLintptr offset, GLsizeiptr length)
{
EVENT("(GLenum target = 0x%X, GLintptr offset = %d, GLsizeiptr length = %d)", target, offset,
length);
Context *context = GetValidGlobalContext();
if (context)
{
BufferBinding targetPacked = FromGLenum<BufferBinding>(target);
context->gatherParams<EntryPoint::FlushMappedBufferRangeEXT>(targetPacked, offset, length);
if (context->skipValidation() ||
ValidateFlushMappedBufferRangeEXT(context, targetPacked, offset, length))
{
context->flushMappedBufferRange(targetPacked, offset, length);
}
}
}
void *GL_APIENTRY MapBufferRangeEXT(GLenum target,
GLintptr offset,
GLsizeiptr length,
GLbitfield access)
{
EVENT(
"(GLenum target = 0x%X, GLintptr offset = %d, GLsizeiptr length = %d, GLbitfield access = "
"0x%X)",
target, offset, length, access);
Context *context = GetValidGlobalContext();
if (context)
{
BufferBinding targetPacked = FromGLenum<BufferBinding>(target);
context->gatherParams<EntryPoint::MapBufferRangeEXT>(targetPacked, offset, length, access);
if (context->skipValidation() ||
ValidateMapBufferRangeEXT(context, targetPacked, offset, length, access))
{
return context->mapBufferRange(targetPacked, offset, length, access);
}
}
return GetDefaultReturnValue<EntryPoint::MapBufferRangeEXT, void *>();
}
// GL_EXT_occlusion_query_boolean
// BeginQueryEXT is already defined.
// DeleteQueriesEXT is already defined.
// EndQueryEXT is already defined.
// GenQueriesEXT is already defined.
// GetQueryObjectuivEXT is already defined.
// GetQueryivEXT is already defined.
// IsQueryEXT is already defined.
// GL_EXT_robustness
GLenum GL_APIENTRY GetGraphicsResetStatusEXT()
{
EVENT("()");
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::GetGraphicsResetStatusEXT>();
if (context->skipValidation() || ValidateGetGraphicsResetStatusEXT(context))
{
return context->getGraphicsResetStatus();
}
}
return GetDefaultReturnValue<EntryPoint::GetGraphicsResetStatusEXT, GLenum>();
}
void GL_APIENTRY GetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize, GLfloat *params)
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei bufSize = %d, GLfloat *params = "
"0x%0.8p)",
program, location, bufSize, params);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::GetnUniformfvEXT>(program, location, bufSize, params);
if (context->skipValidation() ||
ValidateGetnUniformfvEXT(context, program, location, bufSize, params))
{
context->getnUniformfv(program, location, bufSize, params);
}
}
}
void GL_APIENTRY GetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint *params)
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei bufSize = %d, GLint *params = 0x%0.8p)",
program, location, bufSize, params);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::GetnUniformivEXT>(program, location, bufSize, params);
if (context->skipValidation() ||
ValidateGetnUniformivEXT(context, program, location, bufSize, params))
{
context->getnUniformiv(program, location, bufSize, params);
}
}
}
void GL_APIENTRY ReadnPixelsEXT(GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
GLsizei bufSize,
void *data)
{
EVENT(
"(GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d, GLenum format = "
"0x%X, GLenum type = 0x%X, GLsizei bufSize = %d, void *data = 0x%0.8p)",
x, y, width, height, format, type, bufSize, data);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::ReadnPixelsEXT>(x, y, width, height, format, type,
bufSize, data);
if (context->skipValidation() ||
ValidateReadnPixelsEXT(context, x, y, width, height, format, type, bufSize, data))
{
context->readnPixels(x, y, width, height, format, type, bufSize, data);
}
}
}
// GL_EXT_texture_storage
void GL_APIENTRY TexStorage1DEXT(GLenum target,
GLsizei levels,
GLenum internalformat,
GLsizei width)
{
EVENT(
"(GLenum target = 0x%X, GLsizei levels = %d, GLenum internalformat = 0x%X, GLsizei width = "
"%d)",
target, levels, internalformat, width);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::TexStorage1DEXT>(target, levels, internalformat, width);
if (context->skipValidation() ||
ValidateTexStorage1DEXT(context, target, levels, internalformat, width))
{
context->texStorage1D(target, levels, internalformat, width);
}
}
}
void GL_APIENTRY
TexStorage2DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
{
EVENT(
"(GLenum target = 0x%X, GLsizei levels = %d, GLenum internalformat = 0x%X, GLsizei width = "
"%d, GLsizei height = %d)",
target, levels, internalformat, width, height);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::TexStorage2DEXT>(target, levels, internalformat, width,
height);
if (context->skipValidation() ||
ValidateTexStorage2DEXT(context, target, levels, internalformat, width, height))
{
context->texStorage2D(target, levels, internalformat, width, height);
}
}
}
void GL_APIENTRY TexStorage3DEXT(GLenum target,
GLsizei levels,
GLenum internalformat,
GLsizei width,
GLsizei height,
GLsizei depth)
{
EVENT(
"(GLenum target = 0x%X, GLsizei levels = %d, GLenum internalformat = 0x%X, GLsizei width = "
"%d, GLsizei height = %d, GLsizei depth = %d)",
target, levels, internalformat, width, height, depth);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::TexStorage3DEXT>(target, levels, internalformat, width,
height, depth);
if (context->skipValidation() ||
ValidateTexStorage3DEXT(context, target, levels, internalformat, width, height, depth))
{
context->texStorage3D(target, levels, internalformat, width, height, depth);
}
}
}
// GL_KHR_debug
void GL_APIENTRY DebugMessageCallbackKHR(GLDEBUGPROCKHR callback, const void *userParam)
{
EVENT("(GLDEBUGPROCKHR callback = 0x%0.8p, const void *userParam = 0x%0.8p)", callback,
userParam);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::DebugMessageCallbackKHR>(callback, userParam);
if (context->skipValidation() ||
ValidateDebugMessageCallbackKHR(context, callback, userParam))
{
context->debugMessageCallback(callback, userParam);
}
}
}
void GL_APIENTRY DebugMessageControlKHR(GLenum source,
GLenum type,
GLenum severity,
GLsizei count,
const GLuint *ids,
GLboolean enabled)
{
EVENT(
"(GLenum source = 0x%X, GLenum type = 0x%X, GLenum severity = 0x%X, GLsizei count = %d, "
"const GLuint *ids = 0x%0.8p, GLboolean enabled = %u)",
source, type, severity, count, ids, enabled);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::DebugMessageControlKHR>(source, type, severity, count,
ids, enabled);
if (context->skipValidation() ||
ValidateDebugMessageControlKHR(context, source, type, severity, count, ids, enabled))
{
context->debugMessageControl(source, type, severity, count, ids, enabled);
}
}
}
void GL_APIENTRY DebugMessageInsertKHR(GLenum source,
GLenum type,
GLuint id,
GLenum severity,
GLsizei length,
const GLchar *buf)
{
EVENT(
"(GLenum source = 0x%X, GLenum type = 0x%X, GLuint id = %u, GLenum severity = 0x%X, "
"GLsizei length = %d, const GLchar *buf = 0x%0.8p)",
source, type, id, severity, length, buf);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::DebugMessageInsertKHR>(source, type, id, severity, length,
buf);
if (context->skipValidation() ||
ValidateDebugMessageInsertKHR(context, source, type, id, severity, length, buf))
{
context->debugMessageInsert(source, type, id, severity, length, buf);
}
}
}
GLuint GL_APIENTRY GetDebugMessageLogKHR(GLuint count,
GLsizei bufSize,
GLenum *sources,
GLenum *types,
GLuint *ids,
GLenum *severities,
GLsizei *lengths,
GLchar *messageLog)
{
EVENT(
"(GLuint count = %u, GLsizei bufSize = %d, GLenum *sources = 0x%0.8p, GLenum *types = "
"0x%0.8p, GLuint *ids = 0x%0.8p, GLenum *severities = 0x%0.8p, GLsizei *lengths = 0x%0.8p, "
"GLchar *messageLog = 0x%0.8p)",
count, bufSize, sources, types, ids, severities, lengths, messageLog);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::GetDebugMessageLogKHR>(
count, bufSize, sources, types, ids, severities, lengths, messageLog);
if (context->skipValidation() ||
ValidateGetDebugMessageLogKHR(context, count, bufSize, sources, types, ids, severities,
lengths, messageLog))
{
return context->getDebugMessageLog(count, bufSize, sources, types, ids, severities,
lengths, messageLog);
}
}
return GetDefaultReturnValue<EntryPoint::GetDebugMessageLogKHR, GLuint>();
}
void GL_APIENTRY
GetObjectLabelKHR(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label)
{
EVENT(
"(GLenum identifier = 0x%X, GLuint name = %u, GLsizei bufSize = %d, GLsizei *length = "
"0x%0.8p, GLchar *label = 0x%0.8p)",
identifier, name, bufSize, length, label);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::GetObjectLabelKHR>(identifier, name, bufSize, length,
label);
if (context->skipValidation() ||
ValidateGetObjectLabelKHR(context, identifier, name, bufSize, length, label))
{
context->getObjectLabel(identifier, name, bufSize, length, label);
}
}
}
void GL_APIENTRY GetObjectPtrLabelKHR(const void *ptr,
GLsizei bufSize,
GLsizei *length,
GLchar *label)
{
EVENT(
"(const void *ptr = 0x%0.8p, GLsizei bufSize = %d, GLsizei *length = 0x%0.8p, GLchar "
"*label = 0x%0.8p)",
ptr, bufSize, length, label);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::GetObjectPtrLabelKHR>(ptr, bufSize, length, label);
if (context->skipValidation() ||
ValidateGetObjectPtrLabelKHR(context, ptr, bufSize, length, label))
{
context->getObjectPtrLabel(ptr, bufSize, length, label);
}
}
}
void GL_APIENTRY GetPointervKHR(GLenum pname, void **params)
{
EVENT("(GLenum pname = 0x%X, void **params = 0x%0.8p)", pname, params);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::GetPointervKHR>(pname, params);
if (context->skipValidation() || ValidateGetPointervKHR(context, pname, params))
{
context->getPointerv(pname, params);
}
}
}
void GL_APIENTRY ObjectLabelKHR(GLenum identifier, GLuint name, GLsizei length, const GLchar *label)
{
EVENT(
"(GLenum identifier = 0x%X, GLuint name = %u, GLsizei length = %d, const GLchar *label = "
"0x%0.8p)",
identifier, name, length, label);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::ObjectLabelKHR>(identifier, name, length, label);
if (context->skipValidation() ||
ValidateObjectLabelKHR(context, identifier, name, length, label))
{
context->objectLabel(identifier, name, length, label);
}
}
}
void GL_APIENTRY ObjectPtrLabelKHR(const void *ptr, GLsizei length, const GLchar *label)
{
EVENT("(const void *ptr = 0x%0.8p, GLsizei length = %d, const GLchar *label = 0x%0.8p)", ptr,
length, label);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::ObjectPtrLabelKHR>(ptr, length, label);
if (context->skipValidation() || ValidateObjectPtrLabelKHR(context, ptr, length, label))
{
context->objectPtrLabel(ptr, length, label);
}
}
}
void GL_APIENTRY PopDebugGroupKHR()
{
EVENT("()");
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::PopDebugGroupKHR>();
if (context->skipValidation() || ValidatePopDebugGroupKHR(context))
{
context->popDebugGroup();
}
}
}
void GL_APIENTRY PushDebugGroupKHR(GLenum source, GLuint id, GLsizei length, const GLchar *message)
{
EVENT(
"(GLenum source = 0x%X, GLuint id = %u, GLsizei length = %d, const GLchar *message = "
"0x%0.8p)",
source, id, length, message);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::PushDebugGroupKHR>(source, id, length, message);
if (context->skipValidation() ||
ValidatePushDebugGroupKHR(context, source, id, length, message))
{
context->pushDebugGroup(source, id, length, message);
}
}
}
// GL_NV_fence
void GL_APIENTRY DeleteFencesNV(GLsizei n, const GLuint *fences)
{
EVENT("(GLsizei n = %d, const GLuint *fences = 0x%0.8p)", n, fences);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::DeleteFencesNV>(n, fences);
if (context->skipValidation() || ValidateDeleteFencesNV(context, n, fences))
{
context->deleteFencesNV(n, fences);
}
}
}
void GL_APIENTRY FinishFenceNV(GLuint fence)
{
EVENT("(GLuint fence = %u)", fence);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::FinishFenceNV>(fence);
if (context->skipValidation() || ValidateFinishFenceNV(context, fence))
{
context->finishFenceNV(fence);
}
}
}
void GL_APIENTRY GenFencesNV(GLsizei n, GLuint *fences)
{
EVENT("(GLsizei n = %d, GLuint *fences = 0x%0.8p)", n, fences);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::GenFencesNV>(n, fences);
if (context->skipValidation() || ValidateGenFencesNV(context, n, fences))
{
context->genFencesNV(n, fences);
}
}
}
void GL_APIENTRY GetFenceivNV(GLuint fence, GLenum pname, GLint *params)
{
EVENT("(GLuint fence = %u, GLenum pname = 0x%X, GLint *params = 0x%0.8p)", fence, pname,
params);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::GetFenceivNV>(fence, pname, params);
if (context->skipValidation() || ValidateGetFenceivNV(context, fence, pname, params))
{
context->getFenceivNV(fence, pname, params);
}
}
}
GLboolean GL_APIENTRY IsFenceNV(GLuint fence)
{
EVENT("(GLuint fence = %u)", fence);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::IsFenceNV>(fence);
if (context->skipValidation() || ValidateIsFenceNV(context, fence))
{
return context->isFenceNV(fence);
}
}
return GetDefaultReturnValue<EntryPoint::IsFenceNV, GLboolean>();
}
void GL_APIENTRY SetFenceNV(GLuint fence, GLenum condition)
{
EVENT("(GLuint fence = %u, GLenum condition = 0x%X)", fence, condition);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::SetFenceNV>(fence, condition);
if (context->skipValidation() || ValidateSetFenceNV(context, fence, condition))
{
context->setFenceNV(fence, condition);
}
}
}
GLboolean GL_APIENTRY TestFenceNV(GLuint fence)
{
EVENT("(GLuint fence = %u)", fence);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::TestFenceNV>(fence);
if (context->skipValidation() || ValidateTestFenceNV(context, fence))
{
return context->testFenceNV(fence);
}
}
return GetDefaultReturnValue<EntryPoint::TestFenceNV, GLboolean>();
}
// GL_OES_EGL_image
void GL_APIENTRY EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image)
{
EVENT("(GLenum target = 0x%X, GLeglImageOES image = 0x%0.8p)", target, image);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::EGLImageTargetRenderbufferStorageOES>(target, image);
if (context->skipValidation() ||
ValidateEGLImageTargetRenderbufferStorageOES(context, target, image))
{
context->eGLImageTargetRenderbufferStorage(target, image);
}
}
}
void GL_APIENTRY EGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image)
{
EVENT("(GLenum target = 0x%X, GLeglImageOES image = 0x%0.8p)", target, image);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::EGLImageTargetTexture2DOES>(target, image);
if (context->skipValidation() || ValidateEGLImageTargetTexture2DOES(context, target, image))
{
context->eGLImageTargetTexture2D(target, image);
}
}
}
// GL_OES_get_program_binary
void GL_APIENTRY GetProgramBinaryOES(GLuint program,
GLsizei bufSize,
GLsizei *length,
GLenum *binaryFormat,
void *binary)
{
EVENT(
"(GLuint program = %u, GLsizei bufSize = %d, GLsizei *length = 0x%0.8p, GLenum "
"*binaryFormat = 0x%0.8p, void *binary = 0x%0.8p)",
program, bufSize, length, binaryFormat, binary);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::GetProgramBinaryOES>(program, bufSize, length,
binaryFormat, binary);
if (context->skipValidation() ||
ValidateGetProgramBinaryOES(context, program, bufSize, length, binaryFormat, binary))
{
context->getProgramBinary(program, bufSize, length, binaryFormat, binary);
}
}
}
void GL_APIENTRY ProgramBinaryOES(GLuint program,
GLenum binaryFormat,
const void *binary,
GLint length)
{
EVENT(
"(GLuint program = %u, GLenum binaryFormat = 0x%X, const void *binary = 0x%0.8p, GLint "
"length = %d)",
program, binaryFormat, binary, length);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::ProgramBinaryOES>(program, binaryFormat, binary, length);
if (context->skipValidation() ||
ValidateProgramBinaryOES(context, program, binaryFormat, binary, length))
{
context->programBinary(program, binaryFormat, binary, length);
}
}
}
// GL_OES_mapbuffer
void GL_APIENTRY GetBufferPointervOES(GLenum target, GLenum pname, void **params)
{
EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, void **params = 0x%0.8p)", target, pname,
params);
Context *context = GetValidGlobalContext();
if (context)
{
BufferBinding targetPacked = FromGLenum<BufferBinding>(target);
context->gatherParams<EntryPoint::GetBufferPointervOES>(targetPacked, pname, params);
if (context->skipValidation() ||
ValidateGetBufferPointervOES(context, targetPacked, pname, params))
{
context->getBufferPointerv(targetPacked, pname, params);
}
}
}
void *GL_APIENTRY MapBufferOES(GLenum target, GLenum access)
{
EVENT("(GLenum target = 0x%X, GLenum access = 0x%X)", target, access);
Context *context = GetValidGlobalContext();
if (context)
{
BufferBinding targetPacked = FromGLenum<BufferBinding>(target);
context->gatherParams<EntryPoint::MapBufferOES>(targetPacked, access);
if (context->skipValidation() || ValidateMapBufferOES(context, targetPacked, access))
{
return context->mapBuffer(targetPacked, access);
}
}
return GetDefaultReturnValue<EntryPoint::MapBufferOES, void *>();
}
GLboolean GL_APIENTRY UnmapBufferOES(GLenum target)
{
EVENT("(GLenum target = 0x%X)", target);
Context *context = GetValidGlobalContext();
if (context)
{
BufferBinding targetPacked = FromGLenum<BufferBinding>(target);
context->gatherParams<EntryPoint::UnmapBufferOES>(targetPacked);
if (context->skipValidation() || ValidateUnmapBufferOES(context, targetPacked))
{
return context->unmapBuffer(targetPacked);
}
}
return GetDefaultReturnValue<EntryPoint::UnmapBufferOES, GLboolean>();
}
// GL_OES_vertex_array_object
void GL_APIENTRY BindVertexArrayOES(GLuint array)
{
EVENT("(GLuint array = %u)", array);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::BindVertexArrayOES>(array);
if (context->skipValidation() || ValidateBindVertexArrayOES(context, array))
{
context->bindVertexArray(array);
}
}
}
void GL_APIENTRY DeleteVertexArraysOES(GLsizei n, const GLuint *arrays)
{
EVENT("(GLsizei n = %d, const GLuint *arrays = 0x%0.8p)", n, arrays);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::DeleteVertexArraysOES>(n, arrays);
if (context->skipValidation() || ValidateDeleteVertexArraysOES(context, n, arrays))
{
context->deleteVertexArrays(n, arrays);
}
}
}
void GL_APIENTRY GenVertexArraysOES(GLsizei n, GLuint *arrays)
{
EVENT("(GLsizei n = %d, GLuint *arrays = 0x%0.8p)", n, arrays);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::GenVertexArraysOES>(n, arrays);
if (context->skipValidation() || ValidateGenVertexArraysOES(context, n, arrays))
{
context->genVertexArrays(n, arrays);
}
}
}
GLboolean GL_APIENTRY IsVertexArrayOES(GLuint array)
{
EVENT("(GLuint array = %u)", array);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::IsVertexArrayOES>(array);
if (context->skipValidation() || ValidateIsVertexArrayOES(context, array))
{
return context->isVertexArray(array);
}
}
return GetDefaultReturnValue<EntryPoint::IsVertexArrayOES, GLboolean>();
}
} // namespace gl
// GENERATED FILE - DO NOT EDIT.
// Generated by generate_entry_points.py using data from gl.xml.
//
// Copyright 2018 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_gles_2_0_ext_autogen.h:
// Defines the GLES extension entry points.
#ifndef LIBGLESV2_ENTRY_POINTS_GLES_2_0_EXT_AUTOGEN_H_
#define LIBGLESV2_ENTRY_POINTS_GLES_2_0_EXT_AUTOGEN_H_
#include <GLES2/gl2.h>
#include <export.h>
namespace gl
{
// GL_ANGLE_framebuffer_blit
ANGLE_EXPORT void GL_APIENTRY BlitFramebufferANGLE(GLint srcX0,
GLint srcY0,
GLint srcX1,
GLint srcY1,
GLint dstX0,
GLint dstY0,
GLint dstX1,
GLint dstY1,
GLbitfield mask,
GLenum filter);
// GL_ANGLE_framebuffer_multisample
ANGLE_EXPORT void GL_APIENTRY RenderbufferStorageMultisampleANGLE(GLenum target,
GLsizei samples,
GLenum internalformat,
GLsizei width,
GLsizei height);
// GL_ANGLE_instanced_arrays
ANGLE_EXPORT void GL_APIENTRY DrawArraysInstancedANGLE(GLenum mode,
GLint first,
GLsizei count,
GLsizei primcount);
ANGLE_EXPORT void GL_APIENTRY DrawElementsInstancedANGLE(GLenum mode,
GLsizei count,
GLenum type,
const void *indices,
GLsizei primcount);
ANGLE_EXPORT void GL_APIENTRY VertexAttribDivisorANGLE(GLuint index, GLuint divisor);
// GL_ANGLE_translated_shader_source
ANGLE_EXPORT void GL_APIENTRY GetTranslatedShaderSourceANGLE(GLuint shader,
GLsizei bufsize,
GLsizei *length,
GLchar *source);
// GL_EXT_debug_marker
ANGLE_EXPORT void GL_APIENTRY InsertEventMarkerEXT(GLsizei length, const GLchar *marker);
ANGLE_EXPORT void GL_APIENTRY PopGroupMarkerEXT();
ANGLE_EXPORT void GL_APIENTRY PushGroupMarkerEXT(GLsizei length, const GLchar *marker);
// GL_EXT_discard_framebuffer
ANGLE_EXPORT void GL_APIENTRY DiscardFramebufferEXT(GLenum target,
GLsizei numAttachments,
const GLenum *attachments);
// GL_EXT_disjoint_timer_query
ANGLE_EXPORT void GL_APIENTRY BeginQueryEXT(GLenum target, GLuint id);
ANGLE_EXPORT void GL_APIENTRY DeleteQueriesEXT(GLsizei n, const GLuint *ids);
ANGLE_EXPORT void GL_APIENTRY EndQueryEXT(GLenum target);
ANGLE_EXPORT void GL_APIENTRY GenQueriesEXT(GLsizei n, GLuint *ids);
ANGLE_EXPORT void GL_APIENTRY GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64 *params);
ANGLE_EXPORT void GL_APIENTRY GetQueryObjectivEXT(GLuint id, GLenum pname, GLint *params);
ANGLE_EXPORT void GL_APIENTRY GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64 *params);
ANGLE_EXPORT void GL_APIENTRY GetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint *params);
ANGLE_EXPORT void GL_APIENTRY GetQueryivEXT(GLenum target, GLenum pname, GLint *params);
ANGLE_EXPORT GLboolean GL_APIENTRY IsQueryEXT(GLuint id);
ANGLE_EXPORT void GL_APIENTRY QueryCounterEXT(GLuint id, GLenum target);
// GL_EXT_draw_buffers
ANGLE_EXPORT void GL_APIENTRY DrawBuffersEXT(GLsizei n, const GLenum *bufs);
// GL_EXT_map_buffer_range
ANGLE_EXPORT void GL_APIENTRY FlushMappedBufferRangeEXT(GLenum target,
GLintptr offset,
GLsizeiptr length);
ANGLE_EXPORT void *GL_APIENTRY MapBufferRangeEXT(GLenum target,
GLintptr offset,
GLsizeiptr length,
GLbitfield access);
// GL_EXT_occlusion_query_boolean
// GL_EXT_robustness
ANGLE_EXPORT GLenum GL_APIENTRY GetGraphicsResetStatusEXT();
ANGLE_EXPORT void GL_APIENTRY GetnUniformfvEXT(GLuint program,
GLint location,
GLsizei bufSize,
GLfloat *params);
ANGLE_EXPORT void GL_APIENTRY GetnUniformivEXT(GLuint program,
GLint location,
GLsizei bufSize,
GLint *params);
ANGLE_EXPORT void GL_APIENTRY ReadnPixelsEXT(GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
GLsizei bufSize,
void *data);
// GL_EXT_texture_storage
ANGLE_EXPORT void GL_APIENTRY TexStorage1DEXT(GLenum target,
GLsizei levels,
GLenum internalformat,
GLsizei width);
ANGLE_EXPORT void GL_APIENTRY TexStorage2DEXT(GLenum target,
GLsizei levels,
GLenum internalformat,
GLsizei width,
GLsizei height);
ANGLE_EXPORT void GL_APIENTRY TexStorage3DEXT(GLenum target,
GLsizei levels,
GLenum internalformat,
GLsizei width,
GLsizei height,
GLsizei depth);
// GL_KHR_debug
ANGLE_EXPORT void GL_APIENTRY DebugMessageCallbackKHR(GLDEBUGPROCKHR callback,
const void *userParam);
ANGLE_EXPORT void GL_APIENTRY DebugMessageControlKHR(GLenum source,
GLenum type,
GLenum severity,
GLsizei count,
const GLuint *ids,
GLboolean enabled);
ANGLE_EXPORT void GL_APIENTRY DebugMessageInsertKHR(GLenum source,
GLenum type,
GLuint id,
GLenum severity,
GLsizei length,
const GLchar *buf);
ANGLE_EXPORT GLuint GL_APIENTRY GetDebugMessageLogKHR(GLuint count,
GLsizei bufSize,
GLenum *sources,
GLenum *types,
GLuint *ids,
GLenum *severities,
GLsizei *lengths,
GLchar *messageLog);
ANGLE_EXPORT void GL_APIENTRY
GetObjectLabelKHR(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
ANGLE_EXPORT void GL_APIENTRY GetObjectPtrLabelKHR(const void *ptr,
GLsizei bufSize,
GLsizei *length,
GLchar *label);
ANGLE_EXPORT void GL_APIENTRY GetPointervKHR(GLenum pname, void **params);
ANGLE_EXPORT void GL_APIENTRY ObjectLabelKHR(GLenum identifier,
GLuint name,
GLsizei length,
const GLchar *label);
ANGLE_EXPORT void GL_APIENTRY ObjectPtrLabelKHR(const void *ptr,
GLsizei length,
const GLchar *label);
ANGLE_EXPORT void GL_APIENTRY PopDebugGroupKHR();
ANGLE_EXPORT void GL_APIENTRY PushDebugGroupKHR(GLenum source,
GLuint id,
GLsizei length,
const GLchar *message);
// GL_NV_fence
ANGLE_EXPORT void GL_APIENTRY DeleteFencesNV(GLsizei n, const GLuint *fences);
ANGLE_EXPORT void GL_APIENTRY FinishFenceNV(GLuint fence);
ANGLE_EXPORT void GL_APIENTRY GenFencesNV(GLsizei n, GLuint *fences);
ANGLE_EXPORT void GL_APIENTRY GetFenceivNV(GLuint fence, GLenum pname, GLint *params);
ANGLE_EXPORT GLboolean GL_APIENTRY IsFenceNV(GLuint fence);
ANGLE_EXPORT void GL_APIENTRY SetFenceNV(GLuint fence, GLenum condition);
ANGLE_EXPORT GLboolean GL_APIENTRY TestFenceNV(GLuint fence);
// GL_OES_EGL_image
ANGLE_EXPORT void GL_APIENTRY EGLImageTargetRenderbufferStorageOES(GLenum target,
GLeglImageOES image);
ANGLE_EXPORT void GL_APIENTRY EGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image);
// GL_OES_get_program_binary
ANGLE_EXPORT void GL_APIENTRY GetProgramBinaryOES(GLuint program,
GLsizei bufSize,
GLsizei *length,
GLenum *binaryFormat,
void *binary);
ANGLE_EXPORT void GL_APIENTRY ProgramBinaryOES(GLuint program,
GLenum binaryFormat,
const void *binary,
GLint length);
// GL_OES_mapbuffer
ANGLE_EXPORT void GL_APIENTRY GetBufferPointervOES(GLenum target, GLenum pname, void **params);
ANGLE_EXPORT void *GL_APIENTRY MapBufferOES(GLenum target, GLenum access);
ANGLE_EXPORT GLboolean GL_APIENTRY UnmapBufferOES(GLenum target);
// GL_OES_vertex_array_object
ANGLE_EXPORT void GL_APIENTRY BindVertexArrayOES(GLuint array);
ANGLE_EXPORT void GL_APIENTRY DeleteVertexArraysOES(GLsizei n, const GLuint *arrays);
ANGLE_EXPORT void GL_APIENTRY GenVertexArraysOES(GLsizei n, GLuint *arrays);
ANGLE_EXPORT GLboolean GL_APIENTRY IsVertexArrayOES(GLuint array);
} // namespace gl
#endif // LIBGLESV2_ENTRY_POINTS_GLES_2_0_EXT_AUTOGEN_H_
...@@ -31,6 +31,7 @@ template_cpp = """// GENERATED FILE - DO NOT EDIT. ...@@ -31,6 +31,7 @@ template_cpp = """// GENERATED FILE - DO NOT EDIT.
#include "libGLESv2/entry_points_egl_ext.h" #include "libGLESv2/entry_points_egl_ext.h"
#include "libGLESv2/entry_points_gles_2_0_autogen.h" #include "libGLESv2/entry_points_gles_2_0_autogen.h"
#include "libGLESv2/entry_points_gles_2_0_ext.h" #include "libGLESv2/entry_points_gles_2_0_ext.h"
#include "libGLESv2/entry_points_gles_2_0_ext_autogen.h"
#include "libGLESv2/entry_points_gles_3_0_autogen.h" #include "libGLESv2/entry_points_gles_3_0_autogen.h"
#include "libGLESv2/entry_points_gles_3_1_autogen.h" #include "libGLESv2/entry_points_gles_3_1_autogen.h"
#include "platform/Platform.h" #include "platform/Platform.h"
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "libGLESv2/entry_points_gles_2_0_autogen.h" #include "libGLESv2/entry_points_gles_2_0_autogen.h"
#include "libGLESv2/entry_points_gles_2_0_ext.h" #include "libGLESv2/entry_points_gles_2_0_ext.h"
#include "libGLESv2/entry_points_gles_2_0_ext_autogen.h"
#include "libGLESv2/entry_points_gles_3_0_autogen.h" #include "libGLESv2/entry_points_gles_3_0_autogen.h"
#include "libGLESv2/entry_points_gles_3_1_autogen.h" #include "libGLESv2/entry_points_gles_3_1_autogen.h"
......
// GENERATED FILE - DO NOT EDIT. // GENERATED FILE - DO NOT EDIT.
// Generated by ./gen_proc_table.py using data from proc_table_data.json. // Generated by gen_proc_table.py using data from proc_table_data.json.
// //
// Copyright 2017 The ANGLE Project Authors. All rights reserved. // Copyright 2017 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "libGLESv2/entry_points_egl_ext.h" #include "libGLESv2/entry_points_egl_ext.h"
#include "libGLESv2/entry_points_gles_2_0_autogen.h" #include "libGLESv2/entry_points_gles_2_0_autogen.h"
#include "libGLESv2/entry_points_gles_2_0_ext.h" #include "libGLESv2/entry_points_gles_2_0_ext.h"
#include "libGLESv2/entry_points_gles_2_0_ext_autogen.h"
#include "libGLESv2/entry_points_gles_3_0_autogen.h" #include "libGLESv2/entry_points_gles_3_0_autogen.h"
#include "libGLESv2/entry_points_gles_3_1_autogen.h" #include "libGLESv2/entry_points_gles_3_1_autogen.h"
#include "platform/Platform.h" #include "platform/Platform.h"
......
...@@ -70,8 +70,8 @@ TEST_P(FenceNVTest, Errors) ...@@ -70,8 +70,8 @@ TEST_P(FenceNVTest, Errors)
return; return;
} }
// glTestFenceNV should still return TRUE for an invalid fence and generate an INVALID_OPERATION EXPECT_GL_TRUE(glTestFenceNV(10)) << "glTestFenceNV should still return TRUE for an invalid "
EXPECT_GL_TRUE(glTestFenceNV(10)); "fence and generate an INVALID_OPERATION";
EXPECT_GL_ERROR(GL_INVALID_OPERATION); EXPECT_GL_ERROR(GL_INVALID_OPERATION);
GLuint fence = 20; GLuint fence = 20;
...@@ -85,8 +85,8 @@ TEST_P(FenceNVTest, Errors) ...@@ -85,8 +85,8 @@ TEST_P(FenceNVTest, Errors)
glGenFencesNV(1, &fence); glGenFencesNV(1, &fence);
EXPECT_GL_NO_ERROR(); EXPECT_GL_NO_ERROR();
// glTestFenceNV should still return TRUE for a fence that is not started and generate an INVALID_OPERATION EXPECT_GL_TRUE(glTestFenceNV(fence)) << "glTestFenceNV should still return TRUE for a fence "
EXPECT_GL_TRUE(glTestFenceNV(fence)); "that is not started and generate an INVALID_OPERATION";
EXPECT_GL_ERROR(GL_INVALID_OPERATION); EXPECT_GL_ERROR(GL_INVALID_OPERATION);
// glGetFenceivNV should generate an INVALID_OPERATION for an invalid or unstarted fence and not modify the params // glGetFenceivNV should generate an INVALID_OPERATION for an invalid or unstarted fence and not modify the params
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment