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.
// Defines the GLES {major_version}.{minor_version} entry points.
#include "libANGLE/Context.h"
#include "libANGLE/validationES2.h"
#include "libANGLE/validationES{major_version}.h"
#include "libGLESv2/global_state.h"
namespace gl
......@@ -96,6 +96,23 @@ template_entry_point_def = """{return_type}GL_APIENTRY {name}({params})
{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):
return os.path.join(os.path.dirname(sys.argv[0]), path)
......@@ -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",
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:
command_xpath = "command/proto[name='" + cmd_name + "']/.."
command = commands.find(command_xpath)
......@@ -201,7 +237,7 @@ for cmd_name in gles3_commands:
proto = "".join(command.find("./proto").itertext())
cmd_names += [cmd_name]
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(
script_name = os.path.basename(sys.argv[0]),
......@@ -227,6 +263,14 @@ gles_3_0_header = template_entry_point_header.format(
minor_version = 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.
manual_cmd_names = ["Invalid"] + [cmd[2:] for cmd in cmd_names] + ["DrawElementsInstancedANGLE"]
entry_points_enum = template_entry_points_enum_header.format(
......@@ -256,6 +300,10 @@ with open(gles_3_0_header_path, "w") as out:
out.write(gles_3_0_header)
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:
out.write(entry_points_enum)
out.close()
......@@ -191,13 +191,33 @@ struct DefaultReturnValue<EP, GLboolean>
static constexpr GLboolean kValue = GL_FALSE;
};
// Catch-all rule for pointer types.
// Catch-all rules for pointer types.
template <EntryPoint EP, typename PointerType>
struct DefaultReturnValue<EP, const PointerType *>
{
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>
constexpr ANGLE_INLINE ReturnType GetDefaultReturnValue()
{
......
......@@ -798,7 +798,7 @@
'libGLESv2/entry_points_gles_2_0_autogen.h',
'libGLESv2/entry_points_gles_2_0_ext.cpp',
'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_1.cpp',
'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
// found in the LICENSE file.
//
// entry_points_gles_3_0.cpp : Implements the GLES 3.0 entry points.
// entry_points_gles_3_0_autogen.cpp:
// Defines the GLES 3.0 entry points.
#include "libANGLE/Context.h"
#include "libANGLE/validationES3.h"
......@@ -12,20 +14,19 @@
namespace gl
{
void GL_APIENTRY ReadBuffer(GLenum mode)
void GL_APIENTRY ReadBuffer(GLenum src)
{
EVENT("(GLenum mode = 0x%X)", mode);
EVENT("(GLenum src = 0x%X)", src);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateReadBuffer(context, mode))
if (!context->skipValidation() && !ValidateReadBuffer(context, src))
{
return;
}
context->readBuffer(mode);
context->readBuffer(src);
}
}
......@@ -38,8 +39,7 @@ void GL_APIENTRY DrawRangeElements(GLenum mode,
{
EVENT(
"(GLenum mode = 0x%X, GLuint start = %u, GLuint end = %u, GLsizei count = %d, GLenum type "
"= 0x%X, "
"const void* indices = 0x%0.8p)",
"= 0x%X, const void *indices = 0x%0.8p)",
mode, start, end, count, type, indices);
Context *context = GetValidGlobalContext();
......@@ -71,8 +71,8 @@ void GL_APIENTRY TexImage3D(GLenum target,
{
EVENT(
"(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, "
"GLenum type = 0x%X, const void* pixels = 0x%0.8p)",
"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();
......@@ -103,9 +103,9 @@ void GL_APIENTRY TexSubImage3D(GLenum target,
const void *pixels)
{
EVENT(
"(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, "
"GLint zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, "
"GLenum format = 0x%X, GLenum type = 0x%X, const void* pixels = 0x%0.8p)",
"(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint "
"zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLenum format "
"= 0x%X, GLenum type = 0x%X, const void *pixels = 0x%0.8p)",
target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
Context *context = GetValidGlobalContext();
......@@ -134,8 +134,8 @@ void GL_APIENTRY CopyTexSubImage3D(GLenum target,
GLsizei height)
{
EVENT(
"(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, "
"GLint zoffset = %d, GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)",
"(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint "
"zoffset = %d, GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)",
target, level, xoffset, yoffset, zoffset, x, y, width, height);
Context *context = GetValidGlobalContext();
......@@ -164,9 +164,8 @@ void GL_APIENTRY CompressedTexImage3D(GLenum target,
{
EVENT(
"(GLenum target = 0x%X, GLint level = %d, GLenum internalformat = 0x%X, GLsizei width = "
"%d, "
"GLsizei height = %d, GLsizei depth = %d, GLint border = %d, GLsizei imageSize = %d, "
"const void* data = 0x%0.8p)",
"%d, GLsizei height = %d, GLsizei depth = %d, GLint border = %d, GLsizei imageSize = %d, "
"const void *data = 0x%0.8p)",
target, level, internalformat, width, height, depth, border, imageSize, data);
Context *context = GetValidGlobalContext();
......@@ -197,9 +196,9 @@ void GL_APIENTRY CompressedTexSubImage3D(GLenum target,
const void *data)
{
EVENT(
"(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, "
"GLint zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, "
"GLenum format = 0x%X, GLsizei imageSize = %d, const void* data = 0x%0.8p)",
"(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint "
"zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLenum format "
"= 0x%X, GLsizei imageSize = %d, const void *data = 0x%0.8p)",
target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
Context *context = GetValidGlobalContext();
......@@ -219,7 +218,7 @@ void GL_APIENTRY CompressedTexSubImage3D(GLenum target,
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();
if (context)
......@@ -235,7 +234,7 @@ void GL_APIENTRY GenQueries(GLsizei n, 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();
if (context)
......@@ -258,13 +257,13 @@ GLboolean GL_APIENTRY IsQuery(GLuint id)
{
if (!context->skipValidation() && !ValidateIsQuery(context, id))
{
return GL_FALSE;
return GetDefaultReturnValue<EntryPoint::IsQuery, GLboolean>();
}
return context->isQuery(id);
}
return GL_FALSE;
return GetDefaultReturnValue<EntryPoint::IsQuery, GLboolean>();
}
void GL_APIENTRY BeginQuery(GLenum target, GLuint id)
......@@ -301,7 +300,7 @@ void GL_APIENTRY EndQuery(GLenum target)
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);
Context *context = GetValidGlobalContext();
......@@ -318,7 +317,7 @@ void GL_APIENTRY GetQueryiv(GLenum target, GLenum pname, GLint *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();
if (context)
......@@ -341,18 +340,18 @@ GLboolean GL_APIENTRY UnmapBuffer(GLenum target)
{
if (!context->skipValidation() && !ValidateUnmapBuffer(context, target))
{
return GL_FALSE;
return GetDefaultReturnValue<EntryPoint::UnmapBuffer, GLboolean>();
}
return context->unmapBuffer(target);
}
return GL_FALSE;
return GetDefaultReturnValue<EntryPoint::UnmapBuffer, GLboolean>();
}
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);
Context *context = GetValidGlobalContext();
......@@ -370,6 +369,8 @@ void GL_APIENTRY GetBufferPointerv(GLenum target, GLenum pname, void **params)
void GL_APIENTRY DrawBuffers(GLsizei n, const GLenum *bufs)
{
EVENT("(GLsizei n = %d, const GLenum *bufs = 0x%0.8p)", n, bufs);
Context *context = GetValidGlobalContext();
if (context)
{
......@@ -388,7 +389,7 @@ void GL_APIENTRY UniformMatrix2x3fv(GLint location,
const GLfloat *value)
{
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)",
location, count, transpose, value);
......@@ -411,7 +412,7 @@ void GL_APIENTRY UniformMatrix3x2fv(GLint location,
const GLfloat *value)
{
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)",
location, count, transpose, value);
......@@ -434,7 +435,7 @@ void GL_APIENTRY UniformMatrix2x4fv(GLint location,
const GLfloat *value)
{
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)",
location, count, transpose, value);
......@@ -457,7 +458,7 @@ void GL_APIENTRY UniformMatrix4x2fv(GLint location,
const GLfloat *value)
{
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)",
location, count, transpose, value);
......@@ -480,7 +481,7 @@ void GL_APIENTRY UniformMatrix3x4fv(GLint location,
const GLfloat *value)
{
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)",
location, count, transpose, value);
......@@ -503,7 +504,7 @@ void GL_APIENTRY UniformMatrix4x3fv(GLint location,
const GLfloat *value)
{
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)",
location, count, transpose, value);
......@@ -533,8 +534,7 @@ void GL_APIENTRY BlitFramebuffer(GLint srcX0,
{
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 "
"%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);
......@@ -615,13 +615,13 @@ void *GL_APIENTRY MapBufferRange(GLenum target,
if (!context->skipValidation() &&
!ValidateMapBufferRange(context, target, offset, length, access))
{
return nullptr;
return GetDefaultReturnValue<EntryPoint::MapBufferRange, void *>();
}
return context->mapBufferRange(target, offset, length, access);
}
return nullptr;
return GetDefaultReturnValue<EntryPoint::MapBufferRange, void *>();
}
void GL_APIENTRY FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
......@@ -649,7 +649,7 @@ void GL_APIENTRY BindVertexArray(GLuint array)
Context *context = GetValidGlobalContext();
if (context)
{
if (!ValidateBindVertexArray(context, array))
if (!context->skipValidation() && !ValidateBindVertexArray(context, array))
{
return;
}
......@@ -660,7 +660,7 @@ void GL_APIENTRY BindVertexArray(GLuint array)
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();
if (context)
......@@ -676,7 +676,7 @@ void GL_APIENTRY DeleteVertexArrays(GLsizei n, const 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();
if (context)
......@@ -699,18 +699,18 @@ GLboolean GL_APIENTRY IsVertexArray(GLuint array)
{
if (!context->skipValidation() && !ValidateIsVertexArray(context, array))
{
return GL_FALSE;
return GetDefaultReturnValue<EntryPoint::IsVertexArray, GLboolean>();
}
return context->isVertexArray(array);
}
return GL_FALSE;
return GetDefaultReturnValue<EntryPoint::IsVertexArray, GLboolean>();
}
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();
if (context)
......@@ -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();
if (context)
......@@ -799,7 +799,7 @@ void GL_APIENTRY TransformFeedbackVaryings(GLuint program,
GLenum bufferMode)
{
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)",
program, count, varyings, bufferMode);
......@@ -825,8 +825,8 @@ void GL_APIENTRY GetTransformFeedbackVarying(GLuint program,
GLchar *name)
{
EVENT(
"(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)",
"(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)",
program, index, bufSize, length, size, type, name);
Context *context = GetValidGlobalContext();
......@@ -847,8 +847,8 @@ void GL_APIENTRY
VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer)
{
EVENT(
"(GLuint index = %u, GLint size = %d, GLenum type = 0x%X, GLsizei stride = %d, const void* "
"pointer = 0x%0.8p)",
"(GLuint index = %u, GLint size = %d, GLenum type = 0x%X, GLsizei stride = %d, const void "
"*pointer = 0x%0.8p)",
index, size, type, stride, pointer);
Context *context = GetValidGlobalContext();
......@@ -866,7 +866,7 @@ VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, cons
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);
Context *context = GetValidGlobalContext();
......@@ -884,7 +884,7 @@ void GL_APIENTRY GetVertexAttribIiv(GLuint index, GLenum pname, GLint *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);
Context *context = GetValidGlobalContext();
......@@ -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)
{
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();
if (context)
......@@ -952,7 +952,7 @@ void GL_APIENTRY VertexAttribI4iv(GLuint index, const GLint *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();
if (context)
......@@ -968,7 +968,7 @@ void GL_APIENTRY VertexAttribI4uiv(GLuint index, const GLuint *v)
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);
Context *context = GetValidGlobalContext();
......@@ -993,13 +993,13 @@ GLint GL_APIENTRY GetFragDataLocation(GLuint program, const GLchar *name)
{
if (!context->skipValidation() && !ValidateGetFragDataLocation(context, program, name))
{
return -1;
return GetDefaultReturnValue<EntryPoint::GetFragDataLocation, GLint>();
}
return context->getFragDataLocation(program, name);
}
return -1;
return GetDefaultReturnValue<EntryPoint::GetFragDataLocation, GLint>();
}
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
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);
Context *context = GetValidGlobalContext();
......@@ -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)
{
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);
Context *context = GetValidGlobalContext();
......@@ -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)
{
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();
if (context)
......@@ -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)
{
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);
Context *context = GetValidGlobalContext();
......@@ -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)
{
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);
Context *context = GetValidGlobalContext();
......@@ -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)
{
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);
Context *context = GetValidGlobalContext();
......@@ -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)
{
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);
Context *context = GetValidGlobalContext();
......@@ -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)
{
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);
Context *context = GetValidGlobalContext();
......@@ -1216,13 +1217,13 @@ const GLubyte *GL_APIENTRY GetStringi(GLenum name, GLuint index)
{
if (!context->skipValidation() && !ValidateGetStringi(context, name, index))
{
return nullptr;
return GetDefaultReturnValue<EntryPoint::GetStringi, const GLubyte *>();
}
return context->getStringi(name, index);
}
return nullptr;
return GetDefaultReturnValue<EntryPoint::GetStringi, const GLubyte *>();
}
void GL_APIENTRY CopyBufferSubData(GLenum readTarget,
......@@ -1256,8 +1257,8 @@ void GL_APIENTRY GetUniformIndices(GLuint program,
GLuint *uniformIndices)
{
EVENT(
"(GLuint program = %u, GLsizei uniformCount = %d, const GLchar* const* uniformNames = "
"0x%0.8p, GLuint* uniformIndices = 0x%0.8p)",
"(GLuint program = %u, GLsizei uniformCount = %d, const GLchar *const*uniformNames = "
"0x%0.8p, GLuint *uniformIndices = 0x%0.8p)",
program, uniformCount, uniformNames, uniformIndices);
Context *context = GetValidGlobalContext();
......@@ -1280,8 +1281,8 @@ void GL_APIENTRY GetActiveUniformsiv(GLuint program,
GLint *params)
{
EVENT(
"(GLuint program = %u, GLsizei uniformCount = %d, const GLuint* uniformIndices = 0x%0.8p, "
"GLenum pname = 0x%X, GLint* params = 0x%0.8p)",
"(GLuint program = %u, GLsizei uniformCount = %d, const GLuint *uniformIndices = 0x%0.8p, "
"GLenum pname = 0x%X, GLint *params = 0x%0.8p)",
program, uniformCount, uniformIndices, pname, params);
Context *context = GetValidGlobalContext();
......@@ -1300,7 +1301,7 @@ void GL_APIENTRY GetActiveUniformsiv(GLuint program,
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);
Context *context = GetValidGlobalContext();
......@@ -1309,13 +1310,13 @@ GLuint GL_APIENTRY GetUniformBlockIndex(GLuint program, const GLchar *uniformBlo
if (!context->skipValidation() &&
!ValidateGetUniformBlockIndex(context, program, uniformBlockName))
{
return GL_INVALID_INDEX;
return GetDefaultReturnValue<EntryPoint::GetUniformBlockIndex, GLuint>();
}
return context->getUniformBlockIndex(program, uniformBlockName);
}
return GL_INVALID_INDEX;
return GetDefaultReturnValue<EntryPoint::GetUniformBlockIndex, GLuint>();
}
void GL_APIENTRY GetActiveUniformBlockiv(GLuint program,
......@@ -1324,7 +1325,7 @@ void GL_APIENTRY GetActiveUniformBlockiv(GLuint program,
GLint *params)
{
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)",
program, uniformBlockIndex, pname, params);
......@@ -1348,8 +1349,8 @@ void GL_APIENTRY GetActiveUniformBlockName(GLuint program,
GLchar *uniformBlockName)
{
EVENT(
"(GLuint program = %u, GLuint uniformBlockIndex = %u, GLsizei bufSize = %d, GLsizei* "
"length = 0x%0.8p, GLchar* uniformBlockName = 0x%0.8p)",
"(GLuint program = %u, GLuint uniformBlockIndex = %u, GLsizei bufSize = %d, GLsizei "
"*length = 0x%0.8p, GLchar *uniformBlockName = 0x%0.8p)",
program, uniformBlockIndex, bufSize, length, uniformBlockName);
Context *context = GetValidGlobalContext();
......@@ -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)",
mode, first, count, instanceCount);
EVENT("(GLenum mode = 0x%X, GLint first = %d, GLsizei count = %d, GLsizei instancecount = %d)",
mode, first, count, instancecount);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateDrawArraysInstanced(context, mode, first, count, instanceCount))
!ValidateDrawArraysInstanced(context, mode, first, count, instancecount))
{
return;
}
context->drawArraysInstanced(mode, first, count, instanceCount);
context->drawArraysInstanced(mode, first, count, instancecount);
}
}
......@@ -1409,26 +1410,26 @@ void GL_APIENTRY DrawElementsInstanced(GLenum mode,
GLsizei count,
GLenum type,
const void *indices,
GLsizei instanceCount)
GLsizei instancecount)
{
EVENT(
"(GLenum mode = 0x%X, GLsizei count = %d, GLenum type = 0x%X, const void* indices = "
"0x%0.8p, GLsizei instanceCount = %d)",
mode, count, type, indices, instanceCount);
"(GLenum mode = 0x%X, GLsizei count = %d, GLenum type = 0x%X, const void *indices = "
"0x%0.8p, GLsizei instancecount = %d)",
mode, count, type, indices, instancecount);
Context *context = GetValidGlobalContext();
if (context)
{
context->gatherParams<EntryPoint::DrawElementsInstanced>(mode, count, type, indices,
instanceCount);
instancecount);
if (!context->skipValidation() &&
!ValidateDrawElementsInstanced(context, mode, count, type, indices, instanceCount))
!ValidateDrawElementsInstanced(context, mode, count, type, indices, instancecount))
{
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)
{
if (!context->skipValidation() && !ValidateFenceSync(context, condition, flags))
{
return nullptr;
return GetDefaultReturnValue<EntryPoint::FenceSync, GLsync>();
}
return context->fenceSync(condition, flags);
}
return nullptr;
return GetDefaultReturnValue<EntryPoint::FenceSync, GLsync>();
}
GLboolean GL_APIENTRY IsSync(GLsync sync)
......@@ -1459,13 +1460,13 @@ GLboolean GL_APIENTRY IsSync(GLsync sync)
{
if (!context->skipValidation() && !ValidateIsSync(context, sync))
{
return GL_FALSE;
return GetDefaultReturnValue<EntryPoint::IsSync, GLboolean>();
}
return context->isSync(sync);
}
return GL_FALSE;
return GetDefaultReturnValue<EntryPoint::IsSync, GLboolean>();
}
void GL_APIENTRY DeleteSync(GLsync sync)
......@@ -1494,13 +1495,13 @@ GLenum GL_APIENTRY ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeou
{
if (!context->skipValidation() && !ValidateClientWaitSync(context, sync, flags, timeout))
{
return GL_WAIT_FAILED;
return GetDefaultReturnValue<EntryPoint::ClientWaitSync, GLenum>();
}
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)
......@@ -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();
if (context)
{
if (!context->skipValidation() && !ValidateGetInteger64v(context, pname, params))
if (!context->skipValidation() && !ValidateGetInteger64v(context, pname, data))
{
return;
}
context->getInteger64v(pname, params);
context->getInteger64v(pname, data);
}
}
......@@ -1540,8 +1541,8 @@ void GL_APIENTRY
GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)
{
EVENT(
"(GLsync sync = 0x%0.8p, GLenum pname = 0x%X, GLsizei bufSize = %d, GLsizei* length = "
"0x%0.8p, GLint* values = 0x%0.8p)",
"(GLsync sync = 0x%0.8p, GLenum pname = 0x%X, GLsizei bufSize = %d, GLsizei *length = "
"0x%0.8p, GLint *values = 0x%0.8p)",
sync, pname, bufSize, length, values);
Context *context = GetValidGlobalContext();
......@@ -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)
{
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);
Context *context = GetValidGlobalContext();
......@@ -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)
{
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);
Context *context = GetValidGlobalContext();
......@@ -1594,7 +1595,7 @@ void GL_APIENTRY GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *pa
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();
if (context)
......@@ -1610,7 +1611,7 @@ void GL_APIENTRY GenSamplers(GLsizei count, 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();
if (context)
......@@ -1633,13 +1634,13 @@ GLboolean GL_APIENTRY IsSampler(GLuint sampler)
{
if (!context->skipValidation() && !ValidateIsSampler(context, sampler))
{
return GL_FALSE;
return GetDefaultReturnValue<EntryPoint::IsSampler, GLboolean>();
}
return context->isSampler(sampler);
}
return GL_FALSE;
return GetDefaultReturnValue<EntryPoint::IsSampler, GLboolean>();
}
void GL_APIENTRY BindSampler(GLuint unit, GLuint sampler)
......@@ -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)
{
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);
Context *context = GetValidGlobalContext();
......@@ -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)
{
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();
if (context)
......@@ -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)
{
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);
Context *context = GetValidGlobalContext();
......@@ -1730,7 +1731,7 @@ void GL_APIENTRY SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat
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);
Context *context = GetValidGlobalContext();
......@@ -1748,7 +1749,7 @@ void GL_APIENTRY GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *para
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);
Context *context = GetValidGlobalContext();
......@@ -1798,7 +1799,7 @@ void GL_APIENTRY BindTransformFeedback(GLenum target, GLuint id)
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();
if (context)
......@@ -1814,7 +1815,7 @@ void GL_APIENTRY DeleteTransformFeedbacks(GLsizei n, const 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();
if (context)
......@@ -1837,18 +1838,18 @@ GLboolean GL_APIENTRY IsTransformFeedback(GLuint id)
{
if (!context->skipValidation() && !ValidateIsTransformFeedback(context, id))
{
return GL_FALSE;
return GetDefaultReturnValue<EntryPoint::IsTransformFeedback, GLboolean>();
}
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();
if (context)
......@@ -1862,9 +1863,9 @@ void GL_APIENTRY PauseTransformFeedback(void)
}
}
void GL_APIENTRY ResumeTransformFeedback(void)
void GL_APIENTRY ResumeTransformFeedback()
{
EVENT("(void)");
EVENT("()");
Context *context = GetValidGlobalContext();
if (context)
......@@ -1885,8 +1886,8 @@ void GL_APIENTRY GetProgramBinary(GLuint program,
void *binary)
{
EVENT(
"(GLuint program = %u, GLsizei bufSize = %d, GLsizei* length = 0x%0.8p, GLenum* "
"binaryFormat = 0x%0.8p, void* binary = 0x%0.8p)",
"(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();
......@@ -1908,7 +1909,7 @@ void GL_APIENTRY ProgramBinary(GLuint program,
GLsizei length)
{
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)",
program, binaryFormat, binary, length);
......@@ -1947,7 +1948,7 @@ void GL_APIENTRY InvalidateFramebuffer(GLenum target,
const GLenum *attachments)
{
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);
Context *context = GetValidGlobalContext();
......@@ -1972,9 +1973,8 @@ void GL_APIENTRY InvalidateSubFramebuffer(GLenum target,
GLsizei height)
{
EVENT(
"(GLenum target = 0x%X, GLsizei numAttachments = %d, const GLenum* attachments = 0x%0.8p, "
"GLint x = %d, "
"GLint y = %d, GLsizei width = %d, GLsizei height = %d)",
"(GLenum target = 0x%X, GLsizei numAttachments = %d, const GLenum *attachments = 0x%0.8p, "
"GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)",
target, numAttachments, attachments, x, y, width, height);
Context *context = GetValidGlobalContext();
......@@ -2021,8 +2021,7 @@ void GL_APIENTRY TexStorage3D(GLenum target,
{
EVENT(
"(GLenum target = 0x%X, GLsizei levels = %d, GLenum internalformat = 0x%X, GLsizei width = "
"%d, "
"GLsizei height = %d, GLsizei depth = %d)",
"%d, GLsizei height = %d, GLsizei depth = %d)",
target, levels, internalformat, width, height, depth);
Context *context = GetValidGlobalContext();
......@@ -2046,8 +2045,7 @@ void GL_APIENTRY GetInternalformativ(GLenum target,
{
EVENT(
"(GLenum target = 0x%X, GLenum internalformat = 0x%X, GLenum pname = 0x%X, GLsizei bufSize "
"= %d, "
"GLint* params = 0x%0.8p)",
"= %d, GLint *params = 0x%0.8p)",
target, internalformat, pname, bufSize, params);
Context *context = GetValidGlobalContext();
......@@ -2062,4 +2060,4 @@ void GL_APIENTRY GetInternalformativ(GLenum target,
context->getInternalformativ(target, internalformat, pname, bufSize, params);
}
}
}
} // namespace gl
......@@ -955,6 +955,14 @@ TEST_P(UniformBufferTest, BlockContainingNestedStructs)
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.
ANGLE_INSTANTIATE_TEST(UniformBufferTest,
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