Commit 57ae8c16 by Jamie Madill Committed by Commit Bot

GLES3: Auto-generate entry points source.

Lots of incidental fixes to formatting and naming. Adds specific default return type overloads for ClientWaitSync and GetUniformBlockIndex. BUG=angleproject:1309 Change-Id: Id67cbc0b19fc2cb94c859ab8390f1ff36b1bbd25 Reviewed-on: https://chromium-review.googlesource.com/637203Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent e8ef2bc4
...@@ -46,7 +46,7 @@ template_entry_point_source = """// GENERATED FILE - DO NOT EDIT. ...@@ -46,7 +46,7 @@ template_entry_point_source = """// GENERATED FILE - DO NOT EDIT.
// Defines the GLES {major_version}.{minor_version} entry points. // Defines the GLES {major_version}.{minor_version} entry points.
#include "libANGLE/Context.h" #include "libANGLE/Context.h"
#include "libANGLE/validationES2.h" #include "libANGLE/validationES{major_version}.h"
#include "libGLESv2/global_state.h" #include "libGLESv2/global_state.h"
namespace gl namespace gl
...@@ -96,6 +96,23 @@ template_entry_point_def = """{return_type}GL_APIENTRY {name}({params}) ...@@ -96,6 +96,23 @@ template_entry_point_def = """{return_type}GL_APIENTRY {name}({params})
{default_return_if_needed}}} {default_return_if_needed}}}
""" """
template_entry_point_def_oldstyle = """{return_type}GL_APIENTRY {name}({params})
{{
EVENT("({format_params})"{comma_if_needed}{pass_params});
Context *context = {context_getter}();
if (context)
{{
if (!context->skipValidation() && !Validate{name}({validate_params}))
{{
return{default_value_if_needed};
}}
{return_if_needed}context->{name_lower}({pass_params});
}}
{default_return_if_needed}}}
"""
def script_relative(path): def script_relative(path):
return os.path.join(os.path.dirname(sys.argv[0]), path) return os.path.join(os.path.dirname(sys.argv[0]), path)
...@@ -185,6 +202,25 @@ def format_entry_point_def(cmd_name, proto, params): ...@@ -185,6 +202,25 @@ def format_entry_point_def(cmd_name, proto, params):
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))
def format_entry_point_def_oldstyle(cmd_name, proto, params):
pass_params = [just_the_name(param) for param in params]
format_params = [param_format_string(param) for param in params]
return_type = proto[:-len(cmd_name)]
default_return = default_return_value(cmd_name, return_type.strip())
return template_entry_point_def_oldstyle.format(
name = cmd_name[2:],
name_lower = cmd_name[2:3].lower() + cmd_name[3:],
return_type = return_type,
params = ", ".join(params),
pass_params = ", ".join(pass_params),
comma_if_needed = ", " if len(params) > 0 else "",
validate_params = ", ".join(["context"] + pass_params),
format_params = ", ".join(format_params),
return_if_needed = "" if default_return == "" else "return ",
default_return_if_needed = "" if default_return == "" else "\n return " + default_return + ";\n",
default_value_if_needed = "" if default_return == "" else (" " + default_return),
context_getter = get_context_getter_function(cmd_name))
for cmd_name in gles2_commands: for cmd_name in gles2_commands:
command_xpath = "command/proto[name='" + cmd_name + "']/.." command_xpath = "command/proto[name='" + cmd_name + "']/.."
command = commands.find(command_xpath) command = commands.find(command_xpath)
...@@ -201,7 +237,7 @@ for cmd_name in gles3_commands: ...@@ -201,7 +237,7 @@ for cmd_name in gles3_commands:
proto = "".join(command.find("./proto").itertext()) proto = "".join(command.find("./proto").itertext())
cmd_names += [cmd_name] cmd_names += [cmd_name]
entry_point_decls_gles_3_0 += [format_entry_point_decl(cmd_name, proto, params)] entry_point_decls_gles_3_0 += [format_entry_point_decl(cmd_name, proto, params)]
entry_point_defs_gles_3_0 += [format_entry_point_def(cmd_name, proto, params)] entry_point_defs_gles_3_0 += [format_entry_point_def_oldstyle(cmd_name, proto, params)]
gles_2_0_header = template_entry_point_header.format( gles_2_0_header = template_entry_point_header.format(
script_name = os.path.basename(sys.argv[0]), script_name = os.path.basename(sys.argv[0]),
...@@ -227,6 +263,14 @@ gles_3_0_header = template_entry_point_header.format( ...@@ -227,6 +263,14 @@ gles_3_0_header = template_entry_point_header.format(
minor_version = 0, minor_version = 0,
entry_points = "\n".join(entry_point_decls_gles_3_0)) entry_points = "\n".join(entry_point_decls_gles_3_0))
gles_3_0_source = template_entry_point_source.format(
script_name = os.path.basename(sys.argv[0]),
data_source_name = "gl.xml",
year = date.today().year,
major_version = 3,
minor_version = 0,
entry_points = "\n".join(entry_point_defs_gles_3_0))
# TODO(jmadill): Remove manually added entry points once we auto-gen them. # TODO(jmadill): Remove manually added entry points once we auto-gen them.
manual_cmd_names = ["Invalid"] + [cmd[2:] for cmd in cmd_names] + ["DrawElementsInstancedANGLE"] manual_cmd_names = ["Invalid"] + [cmd[2:] for cmd in cmd_names] + ["DrawElementsInstancedANGLE"]
entry_points_enum = template_entry_points_enum_header.format( entry_points_enum = template_entry_points_enum_header.format(
...@@ -256,6 +300,10 @@ with open(gles_3_0_header_path, "w") as out: ...@@ -256,6 +300,10 @@ with open(gles_3_0_header_path, "w") as out:
out.write(gles_3_0_header) out.write(gles_3_0_header)
out.close() out.close()
with open(gles_3_0_source_path, "w") as out:
out.write(gles_3_0_source)
out.close()
with open(entry_points_enum_header_path, "w") as out: with open(entry_points_enum_header_path, "w") as out:
out.write(entry_points_enum) out.write(entry_points_enum)
out.close() out.close()
...@@ -191,13 +191,33 @@ struct DefaultReturnValue<EP, GLboolean> ...@@ -191,13 +191,33 @@ struct DefaultReturnValue<EP, GLboolean>
static constexpr GLboolean kValue = GL_FALSE; static constexpr GLboolean kValue = GL_FALSE;
}; };
// Catch-all rule for pointer types. // Catch-all rules for pointer types.
template <EntryPoint EP, typename PointerType> template <EntryPoint EP, typename PointerType>
struct DefaultReturnValue<EP, const PointerType *> struct DefaultReturnValue<EP, const PointerType *>
{ {
static constexpr const PointerType *kValue = nullptr; static constexpr const PointerType *kValue = nullptr;
}; };
template <EntryPoint EP, typename PointerType>
struct DefaultReturnValue<EP, PointerType *>
{
static constexpr PointerType *kValue = nullptr;
};
// Overloaded to return invalid index
template <>
struct DefaultReturnValue<EntryPoint::GetUniformBlockIndex, GLuint>
{
static constexpr GLuint kValue = GL_INVALID_INDEX;
};
// Specialized enum error value.
template <>
struct DefaultReturnValue<EntryPoint::ClientWaitSync, GLenum>
{
static constexpr GLenum kValue = GL_WAIT_FAILED;
};
template <EntryPoint EP, typename ReturnType> template <EntryPoint EP, typename ReturnType>
constexpr ANGLE_INLINE ReturnType GetDefaultReturnValue() constexpr ANGLE_INLINE ReturnType GetDefaultReturnValue()
{ {
......
...@@ -798,7 +798,7 @@ ...@@ -798,7 +798,7 @@
'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_3_0.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.cpp', 'libGLESv2/entry_points_gles_3_1.cpp',
'libGLESv2/entry_points_gles_3_1.h', 'libGLESv2/entry_points_gles_3_1.h',
......
// GENERATED FILE - DO NOT EDIT.
// Generated by generate_entry_points.py using data from gl.xml.
// //
// Copyright(c) 2014 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
// found in the LICENSE file. // found in the LICENSE file.
// //
// entry_points_gles_3_0_autogen.cpp:
// entry_points_gles_3_0.cpp : Implements the GLES 3.0 entry points. // Defines the GLES 3.0 entry points.
#include "libANGLE/Context.h" #include "libANGLE/Context.h"
#include "libANGLE/validationES3.h" #include "libANGLE/validationES3.h"
...@@ -12,20 +14,19 @@ ...@@ -12,20 +14,19 @@
namespace gl namespace gl
{ {
void GL_APIENTRY ReadBuffer(GLenum src)
void GL_APIENTRY ReadBuffer(GLenum mode)
{ {
EVENT("(GLenum mode = 0x%X)", mode); EVENT("(GLenum src = 0x%X)", src);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateReadBuffer(context, mode)) if (!context->skipValidation() && !ValidateReadBuffer(context, src))
{ {
return; return;
} }
context->readBuffer(mode); context->readBuffer(src);
} }
} }
...@@ -38,8 +39,7 @@ void GL_APIENTRY DrawRangeElements(GLenum mode, ...@@ -38,8 +39,7 @@ void GL_APIENTRY DrawRangeElements(GLenum mode,
{ {
EVENT( EVENT(
"(GLenum mode = 0x%X, GLuint start = %u, GLuint end = %u, GLsizei count = %d, GLenum type " "(GLenum mode = 0x%X, GLuint start = %u, GLuint end = %u, GLsizei count = %d, GLenum type "
"= 0x%X, " "= 0x%X, const void *indices = 0x%0.8p)",
"const void* indices = 0x%0.8p)",
mode, start, end, count, type, indices); mode, start, end, count, type, indices);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -71,8 +71,8 @@ void GL_APIENTRY TexImage3D(GLenum target, ...@@ -71,8 +71,8 @@ void GL_APIENTRY TexImage3D(GLenum target,
{ {
EVENT( EVENT(
"(GLenum target = 0x%X, GLint level = %d, GLint internalformat = %d, GLsizei width = %d, " "(GLenum target = 0x%X, GLint level = %d, GLint internalformat = %d, GLsizei width = %d, "
"GLsizei height = %d, GLsizei depth = %d, GLint border = %d, GLenum format = 0x%X, " "GLsizei height = %d, GLsizei depth = %d, GLint border = %d, GLenum format = 0x%X, GLenum "
"GLenum type = 0x%X, const void* pixels = 0x%0.8p)", "type = 0x%X, const void *pixels = 0x%0.8p)",
target, level, internalformat, width, height, depth, border, format, type, pixels); target, level, internalformat, width, height, depth, border, format, type, pixels);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -103,9 +103,9 @@ void GL_APIENTRY TexSubImage3D(GLenum target, ...@@ -103,9 +103,9 @@ void GL_APIENTRY TexSubImage3D(GLenum target,
const void *pixels) const void *pixels)
{ {
EVENT( EVENT(
"(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, " "(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint "
"GLint zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, " "zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLenum format "
"GLenum format = 0x%X, GLenum type = 0x%X, const void* pixels = 0x%0.8p)", "= 0x%X, GLenum type = 0x%X, const void *pixels = 0x%0.8p)",
target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -134,8 +134,8 @@ void GL_APIENTRY CopyTexSubImage3D(GLenum target, ...@@ -134,8 +134,8 @@ void GL_APIENTRY CopyTexSubImage3D(GLenum target,
GLsizei height) GLsizei height)
{ {
EVENT( EVENT(
"(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, " "(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint "
"GLint zoffset = %d, GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)", "zoffset = %d, GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)",
target, level, xoffset, yoffset, zoffset, x, y, width, height); target, level, xoffset, yoffset, zoffset, x, y, width, height);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -164,9 +164,8 @@ void GL_APIENTRY CompressedTexImage3D(GLenum target, ...@@ -164,9 +164,8 @@ void GL_APIENTRY CompressedTexImage3D(GLenum target,
{ {
EVENT( EVENT(
"(GLenum target = 0x%X, GLint level = %d, GLenum internalformat = 0x%X, GLsizei width = " "(GLenum target = 0x%X, GLint level = %d, GLenum internalformat = 0x%X, GLsizei width = "
"%d, " "%d, GLsizei height = %d, GLsizei depth = %d, GLint border = %d, GLsizei imageSize = %d, "
"GLsizei height = %d, GLsizei depth = %d, GLint border = %d, GLsizei imageSize = %d, " "const void *data = 0x%0.8p)",
"const void* data = 0x%0.8p)",
target, level, internalformat, width, height, depth, border, imageSize, data); target, level, internalformat, width, height, depth, border, imageSize, data);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -197,9 +196,9 @@ void GL_APIENTRY CompressedTexSubImage3D(GLenum target, ...@@ -197,9 +196,9 @@ void GL_APIENTRY CompressedTexSubImage3D(GLenum target,
const void *data) const void *data)
{ {
EVENT( EVENT(
"(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, " "(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint "
"GLint zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, " "zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLenum format "
"GLenum format = 0x%X, GLsizei imageSize = %d, const void* data = 0x%0.8p)", "= 0x%X, GLsizei imageSize = %d, const void *data = 0x%0.8p)",
target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -219,7 +218,7 @@ void GL_APIENTRY CompressedTexSubImage3D(GLenum target, ...@@ -219,7 +218,7 @@ void GL_APIENTRY CompressedTexSubImage3D(GLenum target,
void GL_APIENTRY GenQueries(GLsizei n, GLuint *ids) void GL_APIENTRY GenQueries(GLsizei n, GLuint *ids)
{ {
EVENT("(GLsizei n = %d, GLuint* ids = 0x%0.8p)", n, ids); EVENT("(GLsizei n = %d, GLuint *ids = 0x%0.8p)", n, ids);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -235,7 +234,7 @@ void GL_APIENTRY GenQueries(GLsizei n, GLuint *ids) ...@@ -235,7 +234,7 @@ void GL_APIENTRY GenQueries(GLsizei n, GLuint *ids)
void GL_APIENTRY DeleteQueries(GLsizei n, const GLuint *ids) void GL_APIENTRY DeleteQueries(GLsizei n, const GLuint *ids)
{ {
EVENT("(GLsizei n = %d, GLuint* ids = 0x%0.8p)", n, ids); EVENT("(GLsizei n = %d, const GLuint *ids = 0x%0.8p)", n, ids);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -258,13 +257,13 @@ GLboolean GL_APIENTRY IsQuery(GLuint id) ...@@ -258,13 +257,13 @@ GLboolean GL_APIENTRY IsQuery(GLuint id)
{ {
if (!context->skipValidation() && !ValidateIsQuery(context, id)) if (!context->skipValidation() && !ValidateIsQuery(context, id))
{ {
return GL_FALSE; return GetDefaultReturnValue<EntryPoint::IsQuery, GLboolean>();
} }
return context->isQuery(id); return context->isQuery(id);
} }
return GL_FALSE; return GetDefaultReturnValue<EntryPoint::IsQuery, GLboolean>();
} }
void GL_APIENTRY BeginQuery(GLenum target, GLuint id) void GL_APIENTRY BeginQuery(GLenum target, GLuint id)
...@@ -301,7 +300,7 @@ void GL_APIENTRY EndQuery(GLenum target) ...@@ -301,7 +300,7 @@ void GL_APIENTRY EndQuery(GLenum target)
void GL_APIENTRY GetQueryiv(GLenum target, GLenum pname, GLint *params) void GL_APIENTRY GetQueryiv(GLenum target, GLenum pname, GLint *params)
{ {
EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint* params = 0x%0.8p)", target, pname, EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint *params = 0x%0.8p)", target, pname,
params); params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -318,7 +317,7 @@ void GL_APIENTRY GetQueryiv(GLenum target, GLenum pname, GLint *params) ...@@ -318,7 +317,7 @@ void GL_APIENTRY GetQueryiv(GLenum target, GLenum pname, GLint *params)
void GL_APIENTRY GetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params) void GL_APIENTRY GetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params)
{ {
EVENT("(GLuint id = %u, GLenum pname = 0x%X, GLint* params = 0x%0.8p)", id, pname, params); EVENT("(GLuint id = %u, GLenum pname = 0x%X, GLuint *params = 0x%0.8p)", id, pname, params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -341,18 +340,18 @@ GLboolean GL_APIENTRY UnmapBuffer(GLenum target) ...@@ -341,18 +340,18 @@ GLboolean GL_APIENTRY UnmapBuffer(GLenum target)
{ {
if (!context->skipValidation() && !ValidateUnmapBuffer(context, target)) if (!context->skipValidation() && !ValidateUnmapBuffer(context, target))
{ {
return GL_FALSE; return GetDefaultReturnValue<EntryPoint::UnmapBuffer, GLboolean>();
} }
return context->unmapBuffer(target); return context->unmapBuffer(target);
} }
return GL_FALSE; return GetDefaultReturnValue<EntryPoint::UnmapBuffer, GLboolean>();
} }
void GL_APIENTRY GetBufferPointerv(GLenum target, GLenum pname, void **params) void GL_APIENTRY GetBufferPointerv(GLenum target, GLenum pname, void **params)
{ {
EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, void** params = 0x%0.8p)", target, pname, EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, void **params = 0x%0.8p)", target, pname,
params); params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -370,6 +369,8 @@ void GL_APIENTRY GetBufferPointerv(GLenum target, GLenum pname, void **params) ...@@ -370,6 +369,8 @@ void GL_APIENTRY GetBufferPointerv(GLenum target, GLenum pname, void **params)
void GL_APIENTRY DrawBuffers(GLsizei n, const GLenum *bufs) void GL_APIENTRY DrawBuffers(GLsizei n, const GLenum *bufs)
{ {
EVENT("(GLsizei n = %d, const GLenum *bufs = 0x%0.8p)", n, bufs);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
...@@ -388,7 +389,7 @@ void GL_APIENTRY UniformMatrix2x3fv(GLint location, ...@@ -388,7 +389,7 @@ void GL_APIENTRY UniformMatrix2x3fv(GLint location,
const GLfloat *value) const GLfloat *value)
{ {
EVENT( EVENT(
"(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat* value " "(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat *value "
"= 0x%0.8p)", "= 0x%0.8p)",
location, count, transpose, value); location, count, transpose, value);
...@@ -411,7 +412,7 @@ void GL_APIENTRY UniformMatrix3x2fv(GLint location, ...@@ -411,7 +412,7 @@ void GL_APIENTRY UniformMatrix3x2fv(GLint location,
const GLfloat *value) const GLfloat *value)
{ {
EVENT( EVENT(
"(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat* value " "(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat *value "
"= 0x%0.8p)", "= 0x%0.8p)",
location, count, transpose, value); location, count, transpose, value);
...@@ -434,7 +435,7 @@ void GL_APIENTRY UniformMatrix2x4fv(GLint location, ...@@ -434,7 +435,7 @@ void GL_APIENTRY UniformMatrix2x4fv(GLint location,
const GLfloat *value) const GLfloat *value)
{ {
EVENT( EVENT(
"(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat* value " "(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat *value "
"= 0x%0.8p)", "= 0x%0.8p)",
location, count, transpose, value); location, count, transpose, value);
...@@ -457,7 +458,7 @@ void GL_APIENTRY UniformMatrix4x2fv(GLint location, ...@@ -457,7 +458,7 @@ void GL_APIENTRY UniformMatrix4x2fv(GLint location,
const GLfloat *value) const GLfloat *value)
{ {
EVENT( EVENT(
"(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat* value " "(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat *value "
"= 0x%0.8p)", "= 0x%0.8p)",
location, count, transpose, value); location, count, transpose, value);
...@@ -480,7 +481,7 @@ void GL_APIENTRY UniformMatrix3x4fv(GLint location, ...@@ -480,7 +481,7 @@ void GL_APIENTRY UniformMatrix3x4fv(GLint location,
const GLfloat *value) const GLfloat *value)
{ {
EVENT( EVENT(
"(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat* value " "(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat *value "
"= 0x%0.8p)", "= 0x%0.8p)",
location, count, transpose, value); location, count, transpose, value);
...@@ -503,7 +504,7 @@ void GL_APIENTRY UniformMatrix4x3fv(GLint location, ...@@ -503,7 +504,7 @@ void GL_APIENTRY UniformMatrix4x3fv(GLint location,
const GLfloat *value) const GLfloat *value)
{ {
EVENT( EVENT(
"(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat* value " "(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat *value "
"= 0x%0.8p)", "= 0x%0.8p)",
location, count, transpose, value); location, count, transpose, value);
...@@ -533,8 +534,7 @@ void GL_APIENTRY BlitFramebuffer(GLint srcX0, ...@@ -533,8 +534,7 @@ void GL_APIENTRY BlitFramebuffer(GLint srcX0,
{ {
EVENT( EVENT(
"(GLint srcX0 = %d, GLint srcY0 = %d, GLint srcX1 = %d, GLint srcY1 = %d, GLint dstX0 = " "(GLint srcX0 = %d, GLint srcY0 = %d, GLint srcX1 = %d, GLint srcY1 = %d, GLint dstX0 = "
"%d, " "%d, GLint dstY0 = %d, GLint dstX1 = %d, GLint dstY1 = %d, GLbitfield mask = 0x%X, GLenum "
"GLint dstY0 = %d, GLint dstX1 = %d, GLint dstY1 = %d, GLbitfield mask = 0x%X, GLenum "
"filter = 0x%X)", "filter = 0x%X)",
srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
...@@ -615,13 +615,13 @@ void *GL_APIENTRY MapBufferRange(GLenum target, ...@@ -615,13 +615,13 @@ void *GL_APIENTRY MapBufferRange(GLenum target,
if (!context->skipValidation() && if (!context->skipValidation() &&
!ValidateMapBufferRange(context, target, offset, length, access)) !ValidateMapBufferRange(context, target, offset, length, access))
{ {
return nullptr; return GetDefaultReturnValue<EntryPoint::MapBufferRange, void *>();
} }
return context->mapBufferRange(target, offset, length, access); return context->mapBufferRange(target, offset, length, access);
} }
return nullptr; return GetDefaultReturnValue<EntryPoint::MapBufferRange, void *>();
} }
void GL_APIENTRY FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length) void GL_APIENTRY FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
...@@ -649,7 +649,7 @@ void GL_APIENTRY BindVertexArray(GLuint array) ...@@ -649,7 +649,7 @@ void GL_APIENTRY BindVertexArray(GLuint array)
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!ValidateBindVertexArray(context, array)) if (!context->skipValidation() && !ValidateBindVertexArray(context, array))
{ {
return; return;
} }
...@@ -660,7 +660,7 @@ void GL_APIENTRY BindVertexArray(GLuint array) ...@@ -660,7 +660,7 @@ void GL_APIENTRY BindVertexArray(GLuint array)
void GL_APIENTRY DeleteVertexArrays(GLsizei n, const GLuint *arrays) void GL_APIENTRY DeleteVertexArrays(GLsizei n, const GLuint *arrays)
{ {
EVENT("(GLsizei n = %d, const GLuint* arrays = 0x%0.8p)", n, arrays); EVENT("(GLsizei n = %d, const GLuint *arrays = 0x%0.8p)", n, arrays);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -676,7 +676,7 @@ void GL_APIENTRY DeleteVertexArrays(GLsizei n, const GLuint *arrays) ...@@ -676,7 +676,7 @@ void GL_APIENTRY DeleteVertexArrays(GLsizei n, const GLuint *arrays)
void GL_APIENTRY GenVertexArrays(GLsizei n, GLuint *arrays) void GL_APIENTRY GenVertexArrays(GLsizei n, GLuint *arrays)
{ {
EVENT("(GLsizei n = %d, GLuint* arrays = 0x%0.8p)", n, arrays); EVENT("(GLsizei n = %d, GLuint *arrays = 0x%0.8p)", n, arrays);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -699,18 +699,18 @@ GLboolean GL_APIENTRY IsVertexArray(GLuint array) ...@@ -699,18 +699,18 @@ GLboolean GL_APIENTRY IsVertexArray(GLuint array)
{ {
if (!context->skipValidation() && !ValidateIsVertexArray(context, array)) if (!context->skipValidation() && !ValidateIsVertexArray(context, array))
{ {
return GL_FALSE; return GetDefaultReturnValue<EntryPoint::IsVertexArray, GLboolean>();
} }
return context->isVertexArray(array); return context->isVertexArray(array);
} }
return GL_FALSE; return GetDefaultReturnValue<EntryPoint::IsVertexArray, GLboolean>();
} }
void GL_APIENTRY GetIntegeri_v(GLenum target, GLuint index, GLint *data) void GL_APIENTRY GetIntegeri_v(GLenum target, GLuint index, GLint *data)
{ {
EVENT("(GLenum target = 0x%X, GLuint index = %u, GLint* data = 0x%0.8p)", target, index, data); EVENT("(GLenum target = 0x%X, GLuint index = %u, GLint *data = 0x%0.8p)", target, index, data);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -740,9 +740,9 @@ void GL_APIENTRY BeginTransformFeedback(GLenum primitiveMode) ...@@ -740,9 +740,9 @@ void GL_APIENTRY BeginTransformFeedback(GLenum primitiveMode)
} }
} }
void GL_APIENTRY EndTransformFeedback(void) void GL_APIENTRY EndTransformFeedback()
{ {
EVENT("(void)"); EVENT("()");
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -799,7 +799,7 @@ void GL_APIENTRY TransformFeedbackVaryings(GLuint program, ...@@ -799,7 +799,7 @@ void GL_APIENTRY TransformFeedbackVaryings(GLuint program,
GLenum bufferMode) GLenum bufferMode)
{ {
EVENT( EVENT(
"(GLuint program = %u, GLsizei count = %d, const GLchar* const* varyings = 0x%0.8p, GLenum " "(GLuint program = %u, GLsizei count = %d, const GLchar *const*varyings = 0x%0.8p, GLenum "
"bufferMode = 0x%X)", "bufferMode = 0x%X)",
program, count, varyings, bufferMode); program, count, varyings, bufferMode);
...@@ -825,8 +825,8 @@ void GL_APIENTRY GetTransformFeedbackVarying(GLuint program, ...@@ -825,8 +825,8 @@ void GL_APIENTRY GetTransformFeedbackVarying(GLuint program,
GLchar *name) GLchar *name)
{ {
EVENT( EVENT(
"(GLuint program = %u, GLuint index = %u, GLsizei bufSize = %d, GLsizei* length = 0x%0.8p, " "(GLuint program = %u, GLuint index = %u, GLsizei bufSize = %d, GLsizei *length = 0x%0.8p, "
"GLsizei* size = 0x%0.8p, GLenum* type = 0x%0.8p, GLchar* name = 0x%0.8p)", "GLsizei *size = 0x%0.8p, GLenum *type = 0x%0.8p, GLchar *name = 0x%0.8p)",
program, index, bufSize, length, size, type, name); program, index, bufSize, length, size, type, name);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -847,8 +847,8 @@ void GL_APIENTRY ...@@ -847,8 +847,8 @@ void GL_APIENTRY
VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer) VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer)
{ {
EVENT( EVENT(
"(GLuint index = %u, GLint size = %d, GLenum type = 0x%X, GLsizei stride = %d, const void* " "(GLuint index = %u, GLint size = %d, GLenum type = 0x%X, GLsizei stride = %d, const void "
"pointer = 0x%0.8p)", "*pointer = 0x%0.8p)",
index, size, type, stride, pointer); index, size, type, stride, pointer);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -866,7 +866,7 @@ VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, cons ...@@ -866,7 +866,7 @@ VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, cons
void GL_APIENTRY GetVertexAttribIiv(GLuint index, GLenum pname, GLint *params) void GL_APIENTRY GetVertexAttribIiv(GLuint index, GLenum pname, GLint *params)
{ {
EVENT("(GLuint index = %u, GLenum pname = 0x%X, GLint* params = 0x%0.8p)", index, pname, EVENT("(GLuint index = %u, GLenum pname = 0x%X, GLint *params = 0x%0.8p)", index, pname,
params); params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -884,7 +884,7 @@ void GL_APIENTRY GetVertexAttribIiv(GLuint index, GLenum pname, GLint *params) ...@@ -884,7 +884,7 @@ void GL_APIENTRY GetVertexAttribIiv(GLuint index, GLenum pname, GLint *params)
void GL_APIENTRY GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params) void GL_APIENTRY GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params)
{ {
EVENT("(GLuint index = %u, GLenum pname = 0x%X, GLuint* params = 0x%0.8p)", index, pname, EVENT("(GLuint index = %u, GLenum pname = 0x%X, GLuint *params = 0x%0.8p)", index, pname,
params); params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -936,7 +936,7 @@ void GL_APIENTRY VertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GL ...@@ -936,7 +936,7 @@ void GL_APIENTRY VertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GL
void GL_APIENTRY VertexAttribI4iv(GLuint index, const GLint *v) void GL_APIENTRY VertexAttribI4iv(GLuint index, const GLint *v)
{ {
EVENT("(GLuint index = %u, const GLint* v = 0x%0.8p)", index, v); EVENT("(GLuint index = %u, const GLint *v = 0x%0.8p)", index, v);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -952,7 +952,7 @@ void GL_APIENTRY VertexAttribI4iv(GLuint index, const GLint *v) ...@@ -952,7 +952,7 @@ void GL_APIENTRY VertexAttribI4iv(GLuint index, const GLint *v)
void GL_APIENTRY VertexAttribI4uiv(GLuint index, const GLuint *v) void GL_APIENTRY VertexAttribI4uiv(GLuint index, const GLuint *v)
{ {
EVENT("(GLuint index = %u, const GLuint* v = 0x%0.8p)", index, v); EVENT("(GLuint index = %u, const GLuint *v = 0x%0.8p)", index, v);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -968,7 +968,7 @@ void GL_APIENTRY VertexAttribI4uiv(GLuint index, const GLuint *v) ...@@ -968,7 +968,7 @@ void GL_APIENTRY VertexAttribI4uiv(GLuint index, const GLuint *v)
void GL_APIENTRY GetUniformuiv(GLuint program, GLint location, GLuint *params) void GL_APIENTRY GetUniformuiv(GLuint program, GLint location, GLuint *params)
{ {
EVENT("(GLuint program = %u, GLint location = %d, GLuint* params = 0x%0.8p)", program, location, EVENT("(GLuint program = %u, GLint location = %d, GLuint *params = 0x%0.8p)", program, location,
params); params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -993,13 +993,13 @@ GLint GL_APIENTRY GetFragDataLocation(GLuint program, const GLchar *name) ...@@ -993,13 +993,13 @@ GLint GL_APIENTRY GetFragDataLocation(GLuint program, const GLchar *name)
{ {
if (!context->skipValidation() && !ValidateGetFragDataLocation(context, program, name)) if (!context->skipValidation() && !ValidateGetFragDataLocation(context, program, name))
{ {
return -1; return GetDefaultReturnValue<EntryPoint::GetFragDataLocation, GLint>();
} }
return context->getFragDataLocation(program, name); return context->getFragDataLocation(program, name);
} }
return -1; return GetDefaultReturnValue<EntryPoint::GetFragDataLocation, GLint>();
} }
void GL_APIENTRY Uniform1ui(GLint location, GLuint v0) void GL_APIENTRY Uniform1ui(GLint location, GLuint v0)
...@@ -1070,7 +1070,7 @@ void GL_APIENTRY Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLu ...@@ -1070,7 +1070,7 @@ void GL_APIENTRY Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLu
void GL_APIENTRY Uniform1uiv(GLint location, GLsizei count, const GLuint *value) void GL_APIENTRY Uniform1uiv(GLint location, GLsizei count, const GLuint *value)
{ {
EVENT("(GLint location = %d, GLsizei count = %d, const GLuint* value = 0x%0.8p)", location, EVENT("(GLint location = %d, GLsizei count = %d, const GLuint *value = 0x%0.8p)", location,
count, value); count, value);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -1087,7 +1087,7 @@ void GL_APIENTRY Uniform1uiv(GLint location, GLsizei count, const GLuint *value) ...@@ -1087,7 +1087,7 @@ void GL_APIENTRY Uniform1uiv(GLint location, GLsizei count, const GLuint *value)
void GL_APIENTRY Uniform2uiv(GLint location, GLsizei count, const GLuint *value) void GL_APIENTRY Uniform2uiv(GLint location, GLsizei count, const GLuint *value)
{ {
EVENT("(GLint location = %d, GLsizei count = %d, const GLuint* value = 0x%0.8p)", location, EVENT("(GLint location = %d, GLsizei count = %d, const GLuint *value = 0x%0.8p)", location,
count, value); count, value);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -1104,7 +1104,8 @@ void GL_APIENTRY Uniform2uiv(GLint location, GLsizei count, const GLuint *value) ...@@ -1104,7 +1104,8 @@ void GL_APIENTRY Uniform2uiv(GLint location, GLsizei count, const GLuint *value)
void GL_APIENTRY Uniform3uiv(GLint location, GLsizei count, const GLuint *value) void GL_APIENTRY Uniform3uiv(GLint location, GLsizei count, const GLuint *value)
{ {
EVENT("(GLint location = %d, GLsizei count = %d, const GLuint* value)", location, count, value); EVENT("(GLint location = %d, GLsizei count = %d, const GLuint *value = 0x%0.8p)", location,
count, value);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -1120,7 +1121,7 @@ void GL_APIENTRY Uniform3uiv(GLint location, GLsizei count, const GLuint *value) ...@@ -1120,7 +1121,7 @@ void GL_APIENTRY Uniform3uiv(GLint location, GLsizei count, const GLuint *value)
void GL_APIENTRY Uniform4uiv(GLint location, GLsizei count, const GLuint *value) void GL_APIENTRY Uniform4uiv(GLint location, GLsizei count, const GLuint *value)
{ {
EVENT("(GLint location = %d, GLsizei count = %d, const GLuint* value = 0x%0.8p)", location, EVENT("(GLint location = %d, GLsizei count = %d, const GLuint *value = 0x%0.8p)", location,
count, value); count, value);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -1137,7 +1138,7 @@ void GL_APIENTRY Uniform4uiv(GLint location, GLsizei count, const GLuint *value) ...@@ -1137,7 +1138,7 @@ void GL_APIENTRY Uniform4uiv(GLint location, GLsizei count, const GLuint *value)
void GL_APIENTRY ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value) void GL_APIENTRY ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value)
{ {
EVENT("(GLenum buffer = 0x%X, GLint drawbuffer = %d, const GLint* value = 0x%0.8p)", buffer, EVENT("(GLenum buffer = 0x%X, GLint drawbuffer = %d, const GLint *value = 0x%0.8p)", buffer,
drawbuffer, value); drawbuffer, value);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -1155,7 +1156,7 @@ void GL_APIENTRY ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *val ...@@ -1155,7 +1156,7 @@ void GL_APIENTRY ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *val
void GL_APIENTRY ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value) void GL_APIENTRY ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)
{ {
EVENT("(GLenum buffer = 0x%X, GLint drawbuffer = %d, const GLuint* value = 0x%0.8p)", buffer, EVENT("(GLenum buffer = 0x%X, GLint drawbuffer = %d, const GLuint *value = 0x%0.8p)", buffer,
drawbuffer, value); drawbuffer, value);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -1173,7 +1174,7 @@ void GL_APIENTRY ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *v ...@@ -1173,7 +1174,7 @@ void GL_APIENTRY ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *v
void GL_APIENTRY ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value) void GL_APIENTRY ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)
{ {
EVENT("(GLenum buffer = 0x%X, GLint drawbuffer = %d, const GLfloat* value = 0x%0.8p)", buffer, EVENT("(GLenum buffer = 0x%X, GLint drawbuffer = %d, const GLfloat *value = 0x%0.8p)", buffer,
drawbuffer, value); drawbuffer, value);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -1191,7 +1192,7 @@ void GL_APIENTRY ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *v ...@@ -1191,7 +1192,7 @@ void GL_APIENTRY ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *v
void GL_APIENTRY ClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) void GL_APIENTRY ClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
{ {
EVENT("(GLenum buffer = 0x%X, GLint drawbuffer = %d, GLfloat depth, GLint stencil = %d)", EVENT("(GLenum buffer = 0x%X, GLint drawbuffer = %d, GLfloat depth = %f, GLint stencil = %d)",
buffer, drawbuffer, depth, stencil); buffer, drawbuffer, depth, stencil);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -1216,13 +1217,13 @@ const GLubyte *GL_APIENTRY GetStringi(GLenum name, GLuint index) ...@@ -1216,13 +1217,13 @@ const GLubyte *GL_APIENTRY GetStringi(GLenum name, GLuint index)
{ {
if (!context->skipValidation() && !ValidateGetStringi(context, name, index)) if (!context->skipValidation() && !ValidateGetStringi(context, name, index))
{ {
return nullptr; return GetDefaultReturnValue<EntryPoint::GetStringi, const GLubyte *>();
} }
return context->getStringi(name, index); return context->getStringi(name, index);
} }
return nullptr; return GetDefaultReturnValue<EntryPoint::GetStringi, const GLubyte *>();
} }
void GL_APIENTRY CopyBufferSubData(GLenum readTarget, void GL_APIENTRY CopyBufferSubData(GLenum readTarget,
...@@ -1256,8 +1257,8 @@ void GL_APIENTRY GetUniformIndices(GLuint program, ...@@ -1256,8 +1257,8 @@ void GL_APIENTRY GetUniformIndices(GLuint program,
GLuint *uniformIndices) GLuint *uniformIndices)
{ {
EVENT( EVENT(
"(GLuint program = %u, GLsizei uniformCount = %d, const GLchar* const* uniformNames = " "(GLuint program = %u, GLsizei uniformCount = %d, const GLchar *const*uniformNames = "
"0x%0.8p, GLuint* uniformIndices = 0x%0.8p)", "0x%0.8p, GLuint *uniformIndices = 0x%0.8p)",
program, uniformCount, uniformNames, uniformIndices); program, uniformCount, uniformNames, uniformIndices);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -1280,8 +1281,8 @@ void GL_APIENTRY GetActiveUniformsiv(GLuint program, ...@@ -1280,8 +1281,8 @@ void GL_APIENTRY GetActiveUniformsiv(GLuint program,
GLint *params) GLint *params)
{ {
EVENT( EVENT(
"(GLuint program = %u, GLsizei uniformCount = %d, const GLuint* uniformIndices = 0x%0.8p, " "(GLuint program = %u, GLsizei uniformCount = %d, const GLuint *uniformIndices = 0x%0.8p, "
"GLenum pname = 0x%X, GLint* params = 0x%0.8p)", "GLenum pname = 0x%X, GLint *params = 0x%0.8p)",
program, uniformCount, uniformIndices, pname, params); program, uniformCount, uniformIndices, pname, params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -1300,7 +1301,7 @@ void GL_APIENTRY GetActiveUniformsiv(GLuint program, ...@@ -1300,7 +1301,7 @@ void GL_APIENTRY GetActiveUniformsiv(GLuint program,
GLuint GL_APIENTRY GetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName) GLuint GL_APIENTRY GetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName)
{ {
EVENT("(GLuint program = %u, const GLchar* uniformBlockName = 0x%0.8p)", program, EVENT("(GLuint program = %u, const GLchar *uniformBlockName = 0x%0.8p)", program,
uniformBlockName); uniformBlockName);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -1309,13 +1310,13 @@ GLuint GL_APIENTRY GetUniformBlockIndex(GLuint program, const GLchar *uniformBlo ...@@ -1309,13 +1310,13 @@ GLuint GL_APIENTRY GetUniformBlockIndex(GLuint program, const GLchar *uniformBlo
if (!context->skipValidation() && if (!context->skipValidation() &&
!ValidateGetUniformBlockIndex(context, program, uniformBlockName)) !ValidateGetUniformBlockIndex(context, program, uniformBlockName))
{ {
return GL_INVALID_INDEX; return GetDefaultReturnValue<EntryPoint::GetUniformBlockIndex, GLuint>();
} }
return context->getUniformBlockIndex(program, uniformBlockName); return context->getUniformBlockIndex(program, uniformBlockName);
} }
return GL_INVALID_INDEX; return GetDefaultReturnValue<EntryPoint::GetUniformBlockIndex, GLuint>();
} }
void GL_APIENTRY GetActiveUniformBlockiv(GLuint program, void GL_APIENTRY GetActiveUniformBlockiv(GLuint program,
...@@ -1324,7 +1325,7 @@ void GL_APIENTRY GetActiveUniformBlockiv(GLuint program, ...@@ -1324,7 +1325,7 @@ void GL_APIENTRY GetActiveUniformBlockiv(GLuint program,
GLint *params) GLint *params)
{ {
EVENT( EVENT(
"(GLuint program = %u, GLuint uniformBlockIndex = %u, GLenum pname = 0x%X, GLint* params = " "(GLuint program = %u, GLuint uniformBlockIndex = %u, GLenum pname = 0x%X, GLint *params = "
"0x%0.8p)", "0x%0.8p)",
program, uniformBlockIndex, pname, params); program, uniformBlockIndex, pname, params);
...@@ -1348,8 +1349,8 @@ void GL_APIENTRY GetActiveUniformBlockName(GLuint program, ...@@ -1348,8 +1349,8 @@ void GL_APIENTRY GetActiveUniformBlockName(GLuint program,
GLchar *uniformBlockName) GLchar *uniformBlockName)
{ {
EVENT( EVENT(
"(GLuint program = %u, GLuint uniformBlockIndex = %u, GLsizei bufSize = %d, GLsizei* " "(GLuint program = %u, GLuint uniformBlockIndex = %u, GLsizei bufSize = %d, GLsizei "
"length = 0x%0.8p, GLchar* uniformBlockName = 0x%0.8p)", "*length = 0x%0.8p, GLchar *uniformBlockName = 0x%0.8p)",
program, uniformBlockIndex, bufSize, length, uniformBlockName); program, uniformBlockIndex, bufSize, length, uniformBlockName);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -1387,21 +1388,21 @@ void GL_APIENTRY UniformBlockBinding(GLuint program, ...@@ -1387,21 +1388,21 @@ void GL_APIENTRY UniformBlockBinding(GLuint program,
} }
} }
void GL_APIENTRY DrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount) void GL_APIENTRY DrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount)
{ {
EVENT("(GLenum mode = 0x%X, GLint first = %d, GLsizei count = %d, GLsizei instanceCount = %d)", EVENT("(GLenum mode = 0x%X, GLint first = %d, GLsizei count = %d, GLsizei instancecount = %d)",
mode, first, count, instanceCount); mode, first, count, instancecount);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && if (!context->skipValidation() &&
!ValidateDrawArraysInstanced(context, mode, first, count, instanceCount)) !ValidateDrawArraysInstanced(context, mode, first, count, instancecount))
{ {
return; return;
} }
context->drawArraysInstanced(mode, first, count, instanceCount); context->drawArraysInstanced(mode, first, count, instancecount);
} }
} }
...@@ -1409,26 +1410,26 @@ void GL_APIENTRY DrawElementsInstanced(GLenum mode, ...@@ -1409,26 +1410,26 @@ void GL_APIENTRY DrawElementsInstanced(GLenum mode,
GLsizei count, GLsizei count,
GLenum type, GLenum type,
const void *indices, const void *indices,
GLsizei instanceCount) GLsizei instancecount)
{ {
EVENT( EVENT(
"(GLenum mode = 0x%X, GLsizei count = %d, GLenum type = 0x%X, const void* indices = " "(GLenum mode = 0x%X, GLsizei count = %d, GLenum type = 0x%X, const void *indices = "
"0x%0.8p, GLsizei instanceCount = %d)", "0x%0.8p, GLsizei instancecount = %d)",
mode, count, type, indices, instanceCount); mode, count, type, indices, instancecount);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
context->gatherParams<EntryPoint::DrawElementsInstanced>(mode, count, type, indices, context->gatherParams<EntryPoint::DrawElementsInstanced>(mode, count, type, indices,
instanceCount); instancecount);
if (!context->skipValidation() && if (!context->skipValidation() &&
!ValidateDrawElementsInstanced(context, mode, count, type, indices, instanceCount)) !ValidateDrawElementsInstanced(context, mode, count, type, indices, instancecount))
{ {
return; return;
} }
context->drawElementsInstanced(mode, count, type, indices, instanceCount); context->drawElementsInstanced(mode, count, type, indices, instancecount);
} }
} }
...@@ -1441,13 +1442,13 @@ GLsync GL_APIENTRY FenceSync(GLenum condition, GLbitfield flags) ...@@ -1441,13 +1442,13 @@ GLsync GL_APIENTRY FenceSync(GLenum condition, GLbitfield flags)
{ {
if (!context->skipValidation() && !ValidateFenceSync(context, condition, flags)) if (!context->skipValidation() && !ValidateFenceSync(context, condition, flags))
{ {
return nullptr; return GetDefaultReturnValue<EntryPoint::FenceSync, GLsync>();
} }
return context->fenceSync(condition, flags); return context->fenceSync(condition, flags);
} }
return nullptr; return GetDefaultReturnValue<EntryPoint::FenceSync, GLsync>();
} }
GLboolean GL_APIENTRY IsSync(GLsync sync) GLboolean GL_APIENTRY IsSync(GLsync sync)
...@@ -1459,13 +1460,13 @@ GLboolean GL_APIENTRY IsSync(GLsync sync) ...@@ -1459,13 +1460,13 @@ GLboolean GL_APIENTRY IsSync(GLsync sync)
{ {
if (!context->skipValidation() && !ValidateIsSync(context, sync)) if (!context->skipValidation() && !ValidateIsSync(context, sync))
{ {
return GL_FALSE; return GetDefaultReturnValue<EntryPoint::IsSync, GLboolean>();
} }
return context->isSync(sync); return context->isSync(sync);
} }
return GL_FALSE; return GetDefaultReturnValue<EntryPoint::IsSync, GLboolean>();
} }
void GL_APIENTRY DeleteSync(GLsync sync) void GL_APIENTRY DeleteSync(GLsync sync)
...@@ -1494,13 +1495,13 @@ GLenum GL_APIENTRY ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeou ...@@ -1494,13 +1495,13 @@ GLenum GL_APIENTRY ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeou
{ {
if (!context->skipValidation() && !ValidateClientWaitSync(context, sync, flags, timeout)) if (!context->skipValidation() && !ValidateClientWaitSync(context, sync, flags, timeout))
{ {
return GL_WAIT_FAILED; return GetDefaultReturnValue<EntryPoint::ClientWaitSync, GLenum>();
} }
return context->clientWaitSync(sync, flags, timeout); return context->clientWaitSync(sync, flags, timeout);
} }
return GL_WAIT_FAILED; return GetDefaultReturnValue<EntryPoint::ClientWaitSync, GLenum>();
} }
void GL_APIENTRY WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) void GL_APIENTRY WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
...@@ -1520,19 +1521,19 @@ void GL_APIENTRY WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) ...@@ -1520,19 +1521,19 @@ void GL_APIENTRY WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
} }
} }
void GL_APIENTRY GetInteger64v(GLenum pname, GLint64 *params) void GL_APIENTRY GetInteger64v(GLenum pname, GLint64 *data)
{ {
EVENT("(GLenum pname = 0x%X, GLint64* params = 0x%0.8p)", pname, params); EVENT("(GLenum pname = 0x%X, GLint64 *data = 0x%0.8p)", pname, data);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
{ {
if (!context->skipValidation() && !ValidateGetInteger64v(context, pname, params)) if (!context->skipValidation() && !ValidateGetInteger64v(context, pname, data))
{ {
return; return;
} }
context->getInteger64v(pname, params); context->getInteger64v(pname, data);
} }
} }
...@@ -1540,8 +1541,8 @@ void GL_APIENTRY ...@@ -1540,8 +1541,8 @@ void GL_APIENTRY
GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values) GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)
{ {
EVENT( EVENT(
"(GLsync sync = 0x%0.8p, GLenum pname = 0x%X, GLsizei bufSize = %d, GLsizei* length = " "(GLsync sync = 0x%0.8p, GLenum pname = 0x%X, GLsizei bufSize = %d, GLsizei *length = "
"0x%0.8p, GLint* values = 0x%0.8p)", "0x%0.8p, GLint *values = 0x%0.8p)",
sync, pname, bufSize, length, values); sync, pname, bufSize, length, values);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -1559,7 +1560,7 @@ GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *va ...@@ -1559,7 +1560,7 @@ GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *va
void GL_APIENTRY GetInteger64i_v(GLenum target, GLuint index, GLint64 *data) void GL_APIENTRY GetInteger64i_v(GLenum target, GLuint index, GLint64 *data)
{ {
EVENT("(GLenum target = 0x%X, GLuint index = %u, GLint64* data = 0x%0.8p)", target, index, EVENT("(GLenum target = 0x%X, GLuint index = %u, GLint64 *data = 0x%0.8p)", target, index,
data); data);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -1576,7 +1577,7 @@ void GL_APIENTRY GetInteger64i_v(GLenum target, GLuint index, GLint64 *data) ...@@ -1576,7 +1577,7 @@ void GL_APIENTRY GetInteger64i_v(GLenum target, GLuint index, GLint64 *data)
void GL_APIENTRY GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params) void GL_APIENTRY GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params)
{ {
EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint64* params = 0x%0.8p)", target, pname, EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint64 *params = 0x%0.8p)", target, pname,
params); params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -1594,7 +1595,7 @@ void GL_APIENTRY GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *pa ...@@ -1594,7 +1595,7 @@ void GL_APIENTRY GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *pa
void GL_APIENTRY GenSamplers(GLsizei count, GLuint *samplers) void GL_APIENTRY GenSamplers(GLsizei count, GLuint *samplers)
{ {
EVENT("(GLsizei count = %d, GLuint* samplers = 0x%0.8p)", count, samplers); EVENT("(GLsizei count = %d, GLuint *samplers = 0x%0.8p)", count, samplers);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -1610,7 +1611,7 @@ void GL_APIENTRY GenSamplers(GLsizei count, GLuint *samplers) ...@@ -1610,7 +1611,7 @@ void GL_APIENTRY GenSamplers(GLsizei count, GLuint *samplers)
void GL_APIENTRY DeleteSamplers(GLsizei count, const GLuint *samplers) void GL_APIENTRY DeleteSamplers(GLsizei count, const GLuint *samplers)
{ {
EVENT("(GLsizei count = %d, const GLuint* samplers = 0x%0.8p)", count, samplers); EVENT("(GLsizei count = %d, const GLuint *samplers = 0x%0.8p)", count, samplers);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -1633,13 +1634,13 @@ GLboolean GL_APIENTRY IsSampler(GLuint sampler) ...@@ -1633,13 +1634,13 @@ GLboolean GL_APIENTRY IsSampler(GLuint sampler)
{ {
if (!context->skipValidation() && !ValidateIsSampler(context, sampler)) if (!context->skipValidation() && !ValidateIsSampler(context, sampler))
{ {
return GL_FALSE; return GetDefaultReturnValue<EntryPoint::IsSampler, GLboolean>();
} }
return context->isSampler(sampler); return context->isSampler(sampler);
} }
return GL_FALSE; return GetDefaultReturnValue<EntryPoint::IsSampler, GLboolean>();
} }
void GL_APIENTRY BindSampler(GLuint unit, GLuint sampler) void GL_APIENTRY BindSampler(GLuint unit, GLuint sampler)
...@@ -1677,7 +1678,7 @@ void GL_APIENTRY SamplerParameteri(GLuint sampler, GLenum pname, GLint param) ...@@ -1677,7 +1678,7 @@ void GL_APIENTRY SamplerParameteri(GLuint sampler, GLenum pname, GLint param)
void GL_APIENTRY SamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param) void GL_APIENTRY SamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param)
{ {
EVENT("(GLuint sampler = %u, GLenum pname = 0x%X, const GLint* params = 0x%0.8p)", sampler, EVENT("(GLuint sampler = %u, GLenum pname = 0x%X, const GLint *param = 0x%0.8p)", sampler,
pname, param); pname, param);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -1695,7 +1696,7 @@ void GL_APIENTRY SamplerParameteriv(GLuint sampler, GLenum pname, const GLint *p ...@@ -1695,7 +1696,7 @@ void GL_APIENTRY SamplerParameteriv(GLuint sampler, GLenum pname, const GLint *p
void GL_APIENTRY SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param) void GL_APIENTRY SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
{ {
EVENT("(GLuint sampler = %u, GLenum pname = 0x%X, GLfloat param = %g)", sampler, pname, param); EVENT("(GLuint sampler = %u, GLenum pname = 0x%X, GLfloat param = %f)", sampler, pname, param);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -1712,7 +1713,7 @@ void GL_APIENTRY SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param) ...@@ -1712,7 +1713,7 @@ void GL_APIENTRY SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
void GL_APIENTRY SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param) void GL_APIENTRY SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param)
{ {
EVENT("(GLuint sampler = %u, GLenum pname = 0x%X, const GLfloat* params = 0x%0.8p)", sampler, EVENT("(GLuint sampler = %u, GLenum pname = 0x%X, const GLfloat *param = 0x%0.8p)", sampler,
pname, param); pname, param);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -1730,7 +1731,7 @@ void GL_APIENTRY SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat ...@@ -1730,7 +1731,7 @@ void GL_APIENTRY SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat
void GL_APIENTRY GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params) void GL_APIENTRY GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params)
{ {
EVENT("(GLuint sampler = %u, GLenum pname = 0x%X, GLint* params = 0x%0.8p)", sampler, pname, EVENT("(GLuint sampler = %u, GLenum pname = 0x%X, GLint *params = 0x%0.8p)", sampler, pname,
params); params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -1748,7 +1749,7 @@ void GL_APIENTRY GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *para ...@@ -1748,7 +1749,7 @@ void GL_APIENTRY GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *para
void GL_APIENTRY GetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params) void GL_APIENTRY GetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params)
{ {
EVENT("(GLuint sample = %ur, GLenum pname = 0x%X, GLfloat* params = 0x%0.8p)", sampler, pname, EVENT("(GLuint sampler = %u, GLenum pname = 0x%X, GLfloat *params = 0x%0.8p)", sampler, pname,
params); params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -1798,7 +1799,7 @@ void GL_APIENTRY BindTransformFeedback(GLenum target, GLuint id) ...@@ -1798,7 +1799,7 @@ void GL_APIENTRY BindTransformFeedback(GLenum target, GLuint id)
void GL_APIENTRY DeleteTransformFeedbacks(GLsizei n, const GLuint *ids) void GL_APIENTRY DeleteTransformFeedbacks(GLsizei n, const GLuint *ids)
{ {
EVENT("(GLsizei n = %d, const GLuint* ids = 0x%0.8p)", n, ids); EVENT("(GLsizei n = %d, const GLuint *ids = 0x%0.8p)", n, ids);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -1814,7 +1815,7 @@ void GL_APIENTRY DeleteTransformFeedbacks(GLsizei n, const GLuint *ids) ...@@ -1814,7 +1815,7 @@ void GL_APIENTRY DeleteTransformFeedbacks(GLsizei n, const GLuint *ids)
void GL_APIENTRY GenTransformFeedbacks(GLsizei n, GLuint *ids) void GL_APIENTRY GenTransformFeedbacks(GLsizei n, GLuint *ids)
{ {
EVENT("(GLsizei n = %d, GLuint* ids = 0x%0.8p)", n, ids); EVENT("(GLsizei n = %d, GLuint *ids = 0x%0.8p)", n, ids);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -1837,18 +1838,18 @@ GLboolean GL_APIENTRY IsTransformFeedback(GLuint id) ...@@ -1837,18 +1838,18 @@ GLboolean GL_APIENTRY IsTransformFeedback(GLuint id)
{ {
if (!context->skipValidation() && !ValidateIsTransformFeedback(context, id)) if (!context->skipValidation() && !ValidateIsTransformFeedback(context, id))
{ {
return GL_FALSE; return GetDefaultReturnValue<EntryPoint::IsTransformFeedback, GLboolean>();
} }
return context->isTransformFeedback(id); return context->isTransformFeedback(id);
} }
return GL_FALSE; return GetDefaultReturnValue<EntryPoint::IsTransformFeedback, GLboolean>();
} }
void GL_APIENTRY PauseTransformFeedback(void) void GL_APIENTRY PauseTransformFeedback()
{ {
EVENT("(void)"); EVENT("()");
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -1862,9 +1863,9 @@ void GL_APIENTRY PauseTransformFeedback(void) ...@@ -1862,9 +1863,9 @@ void GL_APIENTRY PauseTransformFeedback(void)
} }
} }
void GL_APIENTRY ResumeTransformFeedback(void) void GL_APIENTRY ResumeTransformFeedback()
{ {
EVENT("(void)"); EVENT("()");
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -1885,8 +1886,8 @@ void GL_APIENTRY GetProgramBinary(GLuint program, ...@@ -1885,8 +1886,8 @@ void GL_APIENTRY GetProgramBinary(GLuint program,
void *binary) void *binary)
{ {
EVENT( EVENT(
"(GLuint program = %u, GLsizei bufSize = %d, GLsizei* length = 0x%0.8p, GLenum* " "(GLuint program = %u, GLsizei bufSize = %d, GLsizei *length = 0x%0.8p, GLenum "
"binaryFormat = 0x%0.8p, void* binary = 0x%0.8p)", "*binaryFormat = 0x%0.8p, void *binary = 0x%0.8p)",
program, bufSize, length, binaryFormat, binary); program, bufSize, length, binaryFormat, binary);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -1908,7 +1909,7 @@ void GL_APIENTRY ProgramBinary(GLuint program, ...@@ -1908,7 +1909,7 @@ void GL_APIENTRY ProgramBinary(GLuint program,
GLsizei length) GLsizei length)
{ {
EVENT( EVENT(
"(GLuint program = %u, GLenum binaryFormat = 0x%X, const void* binary = 0x%0.8p, GLsizei " "(GLuint program = %u, GLenum binaryFormat = 0x%X, const void *binary = 0x%0.8p, GLsizei "
"length = %d)", "length = %d)",
program, binaryFormat, binary, length); program, binaryFormat, binary, length);
...@@ -1947,7 +1948,7 @@ void GL_APIENTRY InvalidateFramebuffer(GLenum target, ...@@ -1947,7 +1948,7 @@ void GL_APIENTRY InvalidateFramebuffer(GLenum target,
const GLenum *attachments) const GLenum *attachments)
{ {
EVENT( EVENT(
"(GLenum target = 0x%X, GLsizei numAttachments = %d, const GLenum* attachments = 0x%0.8p)", "(GLenum target = 0x%X, GLsizei numAttachments = %d, const GLenum *attachments = 0x%0.8p)",
target, numAttachments, attachments); target, numAttachments, attachments);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -1972,9 +1973,8 @@ void GL_APIENTRY InvalidateSubFramebuffer(GLenum target, ...@@ -1972,9 +1973,8 @@ void GL_APIENTRY InvalidateSubFramebuffer(GLenum target,
GLsizei height) GLsizei height)
{ {
EVENT( EVENT(
"(GLenum target = 0x%X, GLsizei numAttachments = %d, const GLenum* attachments = 0x%0.8p, " "(GLenum target = 0x%X, GLsizei numAttachments = %d, const GLenum *attachments = 0x%0.8p, "
"GLint x = %d, " "GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)",
"GLint y = %d, GLsizei width = %d, GLsizei height = %d)",
target, numAttachments, attachments, x, y, width, height); target, numAttachments, attachments, x, y, width, height);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -2021,8 +2021,7 @@ void GL_APIENTRY TexStorage3D(GLenum target, ...@@ -2021,8 +2021,7 @@ void GL_APIENTRY TexStorage3D(GLenum target,
{ {
EVENT( EVENT(
"(GLenum target = 0x%X, GLsizei levels = %d, GLenum internalformat = 0x%X, GLsizei width = " "(GLenum target = 0x%X, GLsizei levels = %d, GLenum internalformat = 0x%X, GLsizei width = "
"%d, " "%d, GLsizei height = %d, GLsizei depth = %d)",
"GLsizei height = %d, GLsizei depth = %d)",
target, levels, internalformat, width, height, depth); target, levels, internalformat, width, height, depth);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -2046,8 +2045,7 @@ void GL_APIENTRY GetInternalformativ(GLenum target, ...@@ -2046,8 +2045,7 @@ void GL_APIENTRY GetInternalformativ(GLenum target,
{ {
EVENT( EVENT(
"(GLenum target = 0x%X, GLenum internalformat = 0x%X, GLenum pname = 0x%X, GLsizei bufSize " "(GLenum target = 0x%X, GLenum internalformat = 0x%X, GLenum pname = 0x%X, GLsizei bufSize "
"= %d, " "= %d, GLint *params = 0x%0.8p)",
"GLint* params = 0x%0.8p)",
target, internalformat, pname, bufSize, params); target, internalformat, pname, bufSize, params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -2062,4 +2060,4 @@ void GL_APIENTRY GetInternalformativ(GLenum target, ...@@ -2062,4 +2060,4 @@ void GL_APIENTRY GetInternalformativ(GLenum target,
context->getInternalformativ(target, internalformat, pname, bufSize, params); context->getInternalformativ(target, internalformat, pname, bufSize, params);
} }
} }
} } // namespace gl
...@@ -955,6 +955,14 @@ TEST_P(UniformBufferTest, BlockContainingNestedStructs) ...@@ -955,6 +955,14 @@ TEST_P(UniformBufferTest, BlockContainingNestedStructs)
EXPECT_PIXEL_COLOR_EQ(0, 0, GLColor::green); EXPECT_PIXEL_COLOR_EQ(0, 0, GLColor::green);
} }
// Tests GetUniformBlockIndex return value on error.
TEST_P(UniformBufferTest, GetUniformBlockIndexDefaultReturn)
{
ASSERT_FALSE(glIsProgram(99));
EXPECT_EQ(GL_INVALID_INDEX, glGetUniformBlockIndex(99, "farts"));
EXPECT_GL_ERROR(GL_INVALID_VALUE);
}
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against. // Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
ANGLE_INSTANTIATE_TEST(UniformBufferTest, ANGLE_INSTANTIATE_TEST(UniformBufferTest,
ES3_D3D11(), ES3_D3D11(),
......
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