Commit cb59a909 by Jiajia Qin Committed by Commit Bot

GLES31: Auto-generate entry points source.

BUG=angleproject:2254 Change-Id: If9071066571f09902657528053e4af68b7dcdd2d Reviewed-on: https://chromium-review.googlesource.com/781105Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 7881cfdf
......@@ -24,9 +24,9 @@ template_entry_point_header = """// GENERATED FILE - DO NOT EDIT.
#ifndef LIBGLESV2_ENTRYPOINTSGLES{major_version}{minor_version}_AUTOGEN_H_
#define LIBGLESV2_ENTRYPOINTSGLES{major_version}{minor_version}_AUTOGEN_H_
#include <GLES{major_version}/gl{major_version}.h>
#include <GLES{major_version}/gl{major_version}{minor_version_nonzero}.h>
#include <export.h>
{include_platform}
namespace gl
{{
{entry_points}
......@@ -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/validationES{major_version}.h"
#include "libANGLE/validationES{major_version}{minor_version_nonzero}.h"
#include "libGLESv2/global_state.h"
namespace gl
......@@ -118,18 +118,7 @@ def script_relative(path):
tree = etree.parse(script_relative('gl.xml'))
root = tree.getroot()
gles2_xpath = ".//feature[@name='GL_ES_VERSION_2_0']//command"
gles2_commands = [cmd.attrib['name'] for cmd in root.findall(gles2_xpath)]
gles3_xpath = ".//feature[@name='GL_ES_VERSION_3_0']//command"
gles3_commands = [cmd.attrib['name'] for cmd in root.findall(gles3_xpath)]
commands = root.find(".//commands[@namespace='GL']")
entry_point_decls_gles_2_0 = []
entry_point_defs_gles_2_0 = []
entry_point_decls_gles_3_0 = []
entry_point_defs_gles_3_0 = []
cmd_names = []
with open(script_relative('entry_point_packed_gl_enums.json')) as f:
......@@ -244,55 +233,58 @@ def format_entry_point_def_oldstyle(cmd_name, proto, params):
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)
params = ["".join(param.itertext()) for param in command.findall("./param")]
proto = "".join(command.find("./proto").itertext())
cmd_names += [cmd_name]
entry_point_decls_gles_2_0 += [format_entry_point_decl(cmd_name, proto, params)]
entry_point_defs_gles_2_0 += [format_entry_point_def(cmd_name, proto, params)]
for cmd_name in gles3_commands:
command_xpath = "command/proto[name='" + cmd_name + "']/.."
command = commands.find(command_xpath)
params = ["".join(param.itertext()) for param in command.findall("./param")]
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)]
gles_2_0_header = template_entry_point_header.format(
script_name = os.path.basename(sys.argv[0]),
data_source_name = "gl.xml",
year = date.today().year,
major_version = 2,
minor_version = 0,
entry_points = "\n".join(entry_point_decls_gles_2_0))
gles_2_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 = 2,
minor_version = 0,
entry_points = "\n".join(entry_point_defs_gles_2_0))
gles_3_0_header = template_entry_point_header.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_decls_gles_3_0))
def path_to(folder, file):
return os.path.join(script_relative(".."), "src", folder, file)
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))
for major_version, minor_version in [[2, 0], [3, 0], [3, 1]]:
gles_xpath = ".//feature[@name='GL_ES_VERSION_{}_{}']//command".format(major_version, minor_version)
gles_commands = [cmd.attrib['name'] for cmd in root.findall(gles_xpath)]
entry_point_decls = []
entry_point_defs = []
for cmd_name in gles_commands:
command_xpath = "command/proto[name='" + cmd_name + "']/.."
command = commands.find(command_xpath)
params = ["".join(param.itertext()) for param in command.findall("./param")]
proto = "".join(command.find("./proto").itertext())
cmd_names += [cmd_name]
entry_point_decls += [format_entry_point_decl(cmd_name, proto, params)]
if major_version == 3 and minor_version == 1:
entry_point_defs += [format_entry_point_def_oldstyle(cmd_name, proto, params)]
else:
entry_point_defs += [format_entry_point_def(cmd_name, proto, params)]
for type in ["header", "source"]:
if type == "header":
template = template_entry_point_header
entry_points = "\n".join(entry_point_decls)
suffix = "h"
else:
template = template_entry_point_source
entry_points = "\n".join(entry_point_defs)
suffix = "cpp"
if type == "header" and major_version == 3 and minor_version == 1:
# We include the platform.h header since it undefines the conflicting MemoryBarrier macro.
include_platform = "\n#include \"common/platform.h\"\n"
else:
include_platform = ""
content = template.format(
script_name = os.path.basename(sys.argv[0]),
data_source_name = "gl.xml",
year = date.today().year,
major_version = major_version,
minor_version = minor_version,
minor_version_nonzero = minor_version if minor_version else "",
include_platform = include_platform,
entry_points = entry_points)
path = path_to("libGLESv2", "entry_points_gles_{}_{}_autogen.{}".format(major_version, minor_version, suffix))
with open(path, "w") as out:
out.write(content)
out.close()
# TODO(jmadill): Remove manually added entry points once we auto-gen them.
manual_cmd_names = ["Invalid"] + [cmd[2:] for cmd in cmd_names] + ["DrawElementsInstancedANGLE"]
......@@ -302,31 +294,7 @@ entry_points_enum = template_entry_points_enum_header.format(
year = date.today().year,
entry_points_list = ",\n".join([" " + cmd for cmd in manual_cmd_names]))
def path_to(folder, file):
return os.path.join(script_relative(".."), "src", folder, file)
gles_2_0_header_path = path_to("libGLESv2", "entry_points_gles_2_0_autogen.h")
gles_2_0_source_path = path_to("libGLESv2", "entry_points_gles_2_0_autogen.cpp")
gles_3_0_header_path = path_to("libGLESv2", "entry_points_gles_3_0_autogen.h")
gles_3_0_source_path = path_to("libGLESv2", "entry_points_gles_3_0_autogen.cpp")
entry_points_enum_header_path = path_to("libANGLE", "entry_points_enum_autogen.h")
with open(gles_2_0_header_path, "w") as out:
out.write(gles_2_0_header)
out.close()
with open(gles_2_0_source_path, "w") as out:
out.write(gles_2_0_source)
out.close()
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()
......@@ -262,6 +262,74 @@ enum class EntryPoint
TexStorage2D,
TexStorage3D,
GetInternalformativ,
DispatchCompute,
DispatchComputeIndirect,
DrawArraysIndirect,
DrawElementsIndirect,
FramebufferParameteri,
GetFramebufferParameteriv,
GetProgramInterfaceiv,
GetProgramResourceIndex,
GetProgramResourceName,
GetProgramResourceiv,
GetProgramResourceLocation,
UseProgramStages,
ActiveShaderProgram,
CreateShaderProgramv,
BindProgramPipeline,
DeleteProgramPipelines,
GenProgramPipelines,
IsProgramPipeline,
GetProgramPipelineiv,
ProgramUniform1i,
ProgramUniform2i,
ProgramUniform3i,
ProgramUniform4i,
ProgramUniform1ui,
ProgramUniform2ui,
ProgramUniform3ui,
ProgramUniform4ui,
ProgramUniform1f,
ProgramUniform2f,
ProgramUniform3f,
ProgramUniform4f,
ProgramUniform1iv,
ProgramUniform2iv,
ProgramUniform3iv,
ProgramUniform4iv,
ProgramUniform1uiv,
ProgramUniform2uiv,
ProgramUniform3uiv,
ProgramUniform4uiv,
ProgramUniform1fv,
ProgramUniform2fv,
ProgramUniform3fv,
ProgramUniform4fv,
ProgramUniformMatrix2fv,
ProgramUniformMatrix3fv,
ProgramUniformMatrix4fv,
ProgramUniformMatrix2x3fv,
ProgramUniformMatrix3x2fv,
ProgramUniformMatrix2x4fv,
ProgramUniformMatrix4x2fv,
ProgramUniformMatrix3x4fv,
ProgramUniformMatrix4x3fv,
ValidateProgramPipeline,
GetProgramPipelineInfoLog,
BindImageTexture,
GetBooleani_v,
MemoryBarrier,
MemoryBarrierByRegion,
TexStorage2DMultisample,
GetMultisamplefv,
SampleMaski,
GetTexLevelParameteriv,
GetTexLevelParameterfv,
BindVertexBuffer,
VertexAttribFormat,
VertexAttribIFormat,
VertexAttribBinding,
VertexBindingDivisor,
DrawElementsInstancedANGLE
};
} // namespace gl
......
......@@ -824,8 +824,8 @@
'libGLESv2/entry_points_gles_2_0_ext.h',
'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',
'libGLESv2/entry_points_gles_3_1_autogen.cpp',
'libGLESv2/entry_points_gles_3_1_autogen.h',
'libGLESv2/global_state.cpp',
'libGLESv2/global_state.h',
'libGLESv2/libGLESv2.cpp',
......
// GENERATED FILE - DO NOT EDIT.
// Generated by generate_entry_points.py using data from gl.xml.
//
// Copyright(c) 2016 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_1.cpp : Implements the GLES 3.1 Entry point.
#include "libGLESv2/entry_points_gles_3_1.h"
#include "libGLESv2/global_state.h"
// entry_points_gles_3_1_autogen.cpp:
// Defines the GLES 3.1 entry points.
#include "libANGLE/Context.h"
#include "libANGLE/validationES31.h"
#include "libGLESv2/global_state.h"
namespace gl
{
void GL_APIENTRY DispatchCompute(GLuint numGroupsX, GLuint numGroupsY, GLuint numGroupsZ)
void GL_APIENTRY DispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z)
{
EVENT("(GLuint numGroupsX = %u, GLuint numGroupsY = %u, numGroupsZ = %u", numGroupsX,
numGroupsY, numGroupsZ);
EVENT("(GLuint num_groups_x = %u, GLuint num_groups_y = %u, GLuint num_groups_z = %u)",
num_groups_x, num_groups_y, num_groups_z);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateDispatchCompute(context, numGroupsX, numGroupsY, numGroupsZ))
!ValidateDispatchCompute(context, num_groups_x, num_groups_y, num_groups_z))
{
return;
}
context->dispatchCompute(numGroupsX, numGroupsY, numGroupsZ);
context->dispatchCompute(num_groups_x, num_groups_y, num_groups_z);
}
}
......@@ -51,7 +50,8 @@ void GL_APIENTRY DispatchComputeIndirect(GLintptr indirect)
void GL_APIENTRY DrawArraysIndirect(GLenum mode, const void *indirect)
{
EVENT("(GLenum mode = 0x%X, const void* indirect)", mode, indirect);
EVENT("(GLenum mode = 0x%X, const void *indirect = 0x%0.8p)", mode, indirect);
Context *context = GetValidGlobalContext();
if (context)
{
......@@ -66,7 +66,9 @@ void GL_APIENTRY DrawArraysIndirect(GLenum mode, const void *indirect)
void GL_APIENTRY DrawElementsIndirect(GLenum mode, GLenum type, const void *indirect)
{
EVENT("(GLenum mode = 0x%X, GLenum type = 0x%X, const void* indirect)", mode, type, indirect);
EVENT("(GLenum mode = 0x%X, GLenum type = 0x%X, const void *indirect = 0x%0.8p)", mode, type,
indirect);
Context *context = GetValidGlobalContext();
if (context)
{
......@@ -83,6 +85,7 @@ void GL_APIENTRY DrawElementsIndirect(GLenum mode, GLenum type, const void *indi
void GL_APIENTRY FramebufferParameteri(GLenum target, GLenum pname, GLint param)
{
EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint param = %d)", target, pname, param);
Context *context = GetValidGlobalContext();
if (context)
{
......@@ -98,8 +101,9 @@ void GL_APIENTRY FramebufferParameteri(GLenum target, GLenum pname, GLint param)
void GL_APIENTRY GetFramebufferParameteriv(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();
if (context)
{
......@@ -119,9 +123,10 @@ void GL_APIENTRY GetProgramInterfaceiv(GLuint program,
GLint *params)
{
EVENT(
"(GLuint program = %u, GLenum programInterface = 0x%X, GLenum pname = 0x%X, GLint* params "
"(GLuint program = %u, GLenum programInterface = 0x%X, GLenum pname = 0x%X, GLint *params "
"= 0x%0.8p)",
program, programInterface, pname, params);
Context *context = GetValidGlobalContext();
if (context)
{
......@@ -130,6 +135,7 @@ void GL_APIENTRY GetProgramInterfaceiv(GLuint program,
{
return;
}
context->getProgramInterfaceiv(program, programInterface, pname, params);
}
}
......@@ -138,19 +144,22 @@ GLuint GL_APIENTRY GetProgramResourceIndex(GLuint program,
GLenum programInterface,
const GLchar *name)
{
EVENT("(GLuint program = %u, GLenum programInterface = 0x%X, const GLchar* name = 0x%0.8p)",
EVENT("(GLuint program = %u, GLenum programInterface = 0x%X, const GLchar *name = 0x%0.8p)",
program, programInterface, name);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateGetProgramResourceIndex(context, program, programInterface, name))
{
return GL_INVALID_INDEX;
return GetDefaultReturnValue<EntryPoint::GetProgramResourceIndex, GLuint>();
}
return context->getProgramResourceIndex(program, programInterface, name);
}
return GL_INVALID_INDEX;
return GetDefaultReturnValue<EntryPoint::GetProgramResourceIndex, GLuint>();
}
void GL_APIENTRY GetProgramResourceName(GLuint program,
......@@ -162,8 +171,9 @@ void GL_APIENTRY GetProgramResourceName(GLuint program,
{
EVENT(
"(GLuint program = %u, GLenum programInterface = 0x%X, GLuint index = %u, GLsizei bufSize "
"= %d, GLsizei* length = 0x%0.8p, GLchar* name = 0x%0.8p)",
"= %d, GLsizei *length = 0x%0.8p, GLchar *name = 0x%0.8p)",
program, programInterface, index, bufSize, length, name);
Context *context = GetValidGlobalContext();
if (context)
{
......@@ -173,6 +183,7 @@ void GL_APIENTRY GetProgramResourceName(GLuint program,
{
return;
}
context->getProgramResourceName(program, programInterface, index, bufSize, length, name);
}
}
......@@ -188,9 +199,10 @@ void GL_APIENTRY GetProgramResourceiv(GLuint program,
{
EVENT(
"(GLuint program = %u, GLenum programInterface = 0x%X, GLuint index = %u, GLsizei "
"propCount = %d, const GLenum* props = 0x%0.8p, GLsizei bufSize = %d, GLsizei* length = "
"0x%0.8p, GLint* params = 0x%0.8p)",
"propCount = %d, const GLenum *props = 0x%0.8p, GLsizei bufSize = %d, GLsizei *length = "
"0x%0.8p, GLint *params = 0x%0.8p)",
program, programInterface, index, propCount, props, bufSize, length, params);
Context *context = GetValidGlobalContext();
if (context)
{
......@@ -200,6 +212,7 @@ void GL_APIENTRY GetProgramResourceiv(GLuint program,
{
return;
}
context->getProgramResourceiv(program, programInterface, index, propCount, props, bufSize,
length, params);
}
......@@ -209,19 +222,22 @@ GLint GL_APIENTRY GetProgramResourceLocation(GLuint program,
GLenum programInterface,
const GLchar *name)
{
EVENT("(GLuint program = %u, GLenum programInterface = 0x%X, const GLchar* name = 0x%0.8p)",
EVENT("(GLuint program = %u, GLenum programInterface = 0x%X, const GLchar *name = 0x%0.8p)",
program, programInterface, name);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() &&
!ValidateGetProgramResourceLocation(context, program, programInterface, name))
{
return -1;
return GetDefaultReturnValue<EntryPoint::GetProgramResourceLocation, GLint>();
}
return context->getProgramResourceLocation(program, programInterface, name);
}
return -1;
return GetDefaultReturnValue<EntryPoint::GetProgramResourceLocation, GLint>();
}
void GL_APIENTRY UseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program)
......@@ -269,17 +285,19 @@ GLuint GL_APIENTRY CreateShaderProgramv(GLenum type, GLsizei count, const GLchar
if (!context->skipValidation() &&
!ValidateCreateShaderProgramv(context, type, count, strings))
{
return 0u;
return GetDefaultReturnValue<EntryPoint::CreateShaderProgramv, GLuint>();
}
return context->createShaderProgramv(type, count, strings);
}
return 0u;
return GetDefaultReturnValue<EntryPoint::CreateShaderProgramv, GLuint>();
}
void GL_APIENTRY BindProgramPipeline(GLuint pipeline)
{
EVENT("(GLuint pipeline = %u)", pipeline);
Context *context = GetValidGlobalContext();
if (context)
{
......@@ -294,7 +312,8 @@ void GL_APIENTRY BindProgramPipeline(GLuint pipeline)
void GL_APIENTRY DeleteProgramPipelines(GLsizei n, const GLuint *pipelines)
{
EVENT("(GLsizei n = %d, const GLuint* pipelines = 0x%0.8p)", n, pipelines);
EVENT("(GLsizei n = %d, const GLuint *pipelines = 0x%0.8p)", n, pipelines);
Context *context = GetValidGlobalContext();
if (context)
{
......@@ -309,7 +328,8 @@ void GL_APIENTRY DeleteProgramPipelines(GLsizei n, const GLuint *pipelines)
void GL_APIENTRY GenProgramPipelines(GLsizei n, GLuint *pipelines)
{
EVENT("(GLsizei n = %d, GLuint* pipelines = 0x%0.8p)", n, pipelines);
EVENT("(GLsizei n = %d, GLuint *pipelines = 0x%0.8p)", n, pipelines);
Context *context = GetValidGlobalContext();
if (context)
{
......@@ -325,18 +345,19 @@ void GL_APIENTRY GenProgramPipelines(GLsizei n, GLuint *pipelines)
GLboolean GL_APIENTRY IsProgramPipeline(GLuint pipeline)
{
EVENT("(GLuint pipeline = %u)", pipeline);
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateIsProgramPipeline(context, pipeline))
{
return GL_FALSE;
return GetDefaultReturnValue<EntryPoint::IsProgramPipeline, GLboolean>();
}
return context->isProgramPipeline(pipeline);
}
return GL_FALSE;
return GetDefaultReturnValue<EntryPoint::IsProgramPipeline, GLboolean>();
}
void GL_APIENTRY GetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params)
......@@ -588,13 +609,15 @@ void GL_APIENTRY ProgramUniform1iv(GLuint program,
const GLint *value)
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLint* value = "
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLint *value = "
"0x%0.8p)",
program, location, count, value);
Context *context = GetValidGlobalContext();
if (context)
{
if (!ValidateProgramUniform1iv(context, program, location, count, value))
if (!context->skipValidation() &&
!ValidateProgramUniform1iv(context, program, location, count, value))
{
return;
}
......@@ -609,13 +632,15 @@ void GL_APIENTRY ProgramUniform2iv(GLuint program,
const GLint *value)
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLint* value = "
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLint *value = "
"0x%0.8p)",
program, location, count, value);
Context *context = GetValidGlobalContext();
if (context)
{
if (!ValidateProgramUniform2iv(context, program, location, count, value))
if (!context->skipValidation() &&
!ValidateProgramUniform2iv(context, program, location, count, value))
{
return;
}
......@@ -630,13 +655,15 @@ void GL_APIENTRY ProgramUniform3iv(GLuint program,
const GLint *value)
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLint* value = "
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLint *value = "
"0x%0.8p)",
program, location, count, value);
Context *context = GetValidGlobalContext();
if (context)
{
if (!ValidateProgramUniform3iv(context, program, location, count, value))
if (!context->skipValidation() &&
!ValidateProgramUniform3iv(context, program, location, count, value))
{
return;
}
......@@ -651,13 +678,15 @@ void GL_APIENTRY ProgramUniform4iv(GLuint program,
const GLint *value)
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLint* value = "
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLint *value = "
"0x%0.8p)",
program, location, count, value);
Context *context = GetValidGlobalContext();
if (context)
{
if (!ValidateProgramUniform4iv(context, program, location, count, value))
if (!context->skipValidation() &&
!ValidateProgramUniform4iv(context, program, location, count, value))
{
return;
}
......@@ -672,13 +701,15 @@ void GL_APIENTRY ProgramUniform1uiv(GLuint program,
const GLuint *value)
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLuint* value = "
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLuint *value = "
"0x%0.8p)",
program, location, count, value);
Context *context = GetValidGlobalContext();
if (context)
{
if (!ValidateProgramUniform1uiv(context, program, location, count, value))
if (!context->skipValidation() &&
!ValidateProgramUniform1uiv(context, program, location, count, value))
{
return;
}
......@@ -693,13 +724,15 @@ void GL_APIENTRY ProgramUniform2uiv(GLuint program,
const GLuint *value)
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLuint* value = "
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLuint *value = "
"0x%0.8p)",
program, location, count, value);
Context *context = GetValidGlobalContext();
if (context)
{
if (!ValidateProgramUniform2uiv(context, program, location, count, value))
if (!context->skipValidation() &&
!ValidateProgramUniform2uiv(context, program, location, count, value))
{
return;
}
......@@ -714,13 +747,15 @@ void GL_APIENTRY ProgramUniform3uiv(GLuint program,
const GLuint *value)
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLuint* value = "
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLuint *value = "
"0x%0.8p)",
program, location, count, value);
Context *context = GetValidGlobalContext();
if (context)
{
if (!ValidateProgramUniform3uiv(context, program, location, count, value))
if (!context->skipValidation() &&
!ValidateProgramUniform3uiv(context, program, location, count, value))
{
return;
}
......@@ -735,13 +770,15 @@ void GL_APIENTRY ProgramUniform4uiv(GLuint program,
const GLuint *value)
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLuint* value = "
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLuint *value = "
"0x%0.8p)",
program, location, count, value);
Context *context = GetValidGlobalContext();
if (context)
{
if (!ValidateProgramUniform4uiv(context, program, location, count, value))
if (!context->skipValidation() &&
!ValidateProgramUniform4uiv(context, program, location, count, value))
{
return;
}
......@@ -756,13 +793,15 @@ void GL_APIENTRY ProgramUniform1fv(GLuint program,
const GLfloat *value)
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLfloat* value = "
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLfloat *value = "
"0x%0.8p)",
program, location, count, value);
Context *context = GetValidGlobalContext();
if (context)
{
if (!ValidateProgramUniform1fv(context, program, location, count, value))
if (!context->skipValidation() &&
!ValidateProgramUniform1fv(context, program, location, count, value))
{
return;
}
......@@ -777,13 +816,15 @@ void GL_APIENTRY ProgramUniform2fv(GLuint program,
const GLfloat *value)
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLfloat* value = "
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLfloat *value = "
"0x%0.8p)",
program, location, count, value);
Context *context = GetValidGlobalContext();
if (context)
{
if (!ValidateProgramUniform2fv(context, program, location, count, value))
if (!context->skipValidation() &&
!ValidateProgramUniform2fv(context, program, location, count, value))
{
return;
}
......@@ -798,13 +839,15 @@ void GL_APIENTRY ProgramUniform3fv(GLuint program,
const GLfloat *value)
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLfloat* value = "
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLfloat *value = "
"0x%0.8p)",
program, location, count, value);
Context *context = GetValidGlobalContext();
if (context)
{
if (!ValidateProgramUniform3fv(context, program, location, count, value))
if (!context->skipValidation() &&
!ValidateProgramUniform3fv(context, program, location, count, value))
{
return;
}
......@@ -819,13 +862,15 @@ void GL_APIENTRY ProgramUniform4fv(GLuint program,
const GLfloat *value)
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLfloat* value = "
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLfloat *value = "
"0x%0.8p)",
program, location, count, value);
Context *context = GetValidGlobalContext();
if (context)
{
if (!ValidateProgramUniform4fv(context, program, location, count, value))
if (!context->skipValidation() &&
!ValidateProgramUniform4fv(context, program, location, count, value))
{
return;
}
......@@ -842,12 +887,14 @@ void GL_APIENTRY ProgramUniformMatrix2fv(GLuint program,
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
"const GLfloat* value = 0x%0.8p)",
"const GLfloat *value = 0x%0.8p)",
program, location, count, transpose, value);
Context *context = GetValidGlobalContext();
if (context)
{
if (!ValidateProgramUniformMatrix2fv(context, program, location, count, transpose, value))
if (!context->skipValidation() &&
!ValidateProgramUniformMatrix2fv(context, program, location, count, transpose, value))
{
return;
}
......@@ -864,12 +911,14 @@ void GL_APIENTRY ProgramUniformMatrix3fv(GLuint program,
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
"const GLfloat* value = 0x%0.8p)",
"const GLfloat *value = 0x%0.8p)",
program, location, count, transpose, value);
Context *context = GetValidGlobalContext();
if (context)
{
if (!ValidateProgramUniformMatrix3fv(context, program, location, count, transpose, value))
if (!context->skipValidation() &&
!ValidateProgramUniformMatrix3fv(context, program, location, count, transpose, value))
{
return;
}
......@@ -886,12 +935,14 @@ void GL_APIENTRY ProgramUniformMatrix4fv(GLuint program,
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
"const GLfloat* value = 0x%0.8p)",
"const GLfloat *value = 0x%0.8p)",
program, location, count, transpose, value);
Context *context = GetValidGlobalContext();
if (context)
{
if (!ValidateProgramUniformMatrix4fv(context, program, location, count, transpose, value))
if (!context->skipValidation() &&
!ValidateProgramUniformMatrix4fv(context, program, location, count, transpose, value))
{
return;
}
......@@ -908,12 +959,14 @@ void GL_APIENTRY ProgramUniformMatrix2x3fv(GLuint program,
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
"const GLfloat* value = 0x%0.8p)",
"const GLfloat *value = 0x%0.8p)",
program, location, count, transpose, value);
Context *context = GetValidGlobalContext();
if (context)
{
if (!ValidateProgramUniformMatrix2x3fv(context, program, location, count, transpose, value))
if (!context->skipValidation() &&
!ValidateProgramUniformMatrix2x3fv(context, program, location, count, transpose, value))
{
return;
}
......@@ -930,12 +983,14 @@ void GL_APIENTRY ProgramUniformMatrix3x2fv(GLuint program,
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
"const GLfloat* value = 0x%0.8p)",
"const GLfloat *value = 0x%0.8p)",
program, location, count, transpose, value);
Context *context = GetValidGlobalContext();
if (context)
{
if (!ValidateProgramUniformMatrix3x2fv(context, program, location, count, transpose, value))
if (!context->skipValidation() &&
!ValidateProgramUniformMatrix3x2fv(context, program, location, count, transpose, value))
{
return;
}
......@@ -952,12 +1007,14 @@ void GL_APIENTRY ProgramUniformMatrix2x4fv(GLuint program,
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
"const GLfloat* value = 0x%0.8p)",
"const GLfloat *value = 0x%0.8p)",
program, location, count, transpose, value);
Context *context = GetValidGlobalContext();
if (context)
{
if (!ValidateProgramUniformMatrix2x4fv(context, program, location, count, transpose, value))
if (!context->skipValidation() &&
!ValidateProgramUniformMatrix2x4fv(context, program, location, count, transpose, value))
{
return;
}
......@@ -974,12 +1031,14 @@ void GL_APIENTRY ProgramUniformMatrix4x2fv(GLuint program,
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
"const GLfloat* value = 0x%0.8p)",
"const GLfloat *value = 0x%0.8p)",
program, location, count, transpose, value);
Context *context = GetValidGlobalContext();
if (context)
{
if (!ValidateProgramUniformMatrix4x2fv(context, program, location, count, transpose, value))
if (!context->skipValidation() &&
!ValidateProgramUniformMatrix4x2fv(context, program, location, count, transpose, value))
{
return;
}
......@@ -996,12 +1055,14 @@ void GL_APIENTRY ProgramUniformMatrix3x4fv(GLuint program,
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
"const GLfloat* value = 0x%0.8p)",
"const GLfloat *value = 0x%0.8p)",
program, location, count, transpose, value);
Context *context = GetValidGlobalContext();
if (context)
{
if (!ValidateProgramUniformMatrix3x4fv(context, program, location, count, transpose, value))
if (!context->skipValidation() &&
!ValidateProgramUniformMatrix3x4fv(context, program, location, count, transpose, value))
{
return;
}
......@@ -1018,12 +1079,14 @@ void GL_APIENTRY ProgramUniformMatrix4x3fv(GLuint program,
{
EVENT(
"(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
"const GLfloat* value = 0x%0.8p)",
"const GLfloat *value = 0x%0.8p)",
program, location, count, transpose, value);
Context *context = GetValidGlobalContext();
if (context)
{
if (!ValidateProgramUniformMatrix4x3fv(context, program, location, count, transpose, value))
if (!context->skipValidation() &&
!ValidateProgramUniformMatrix4x3fv(context, program, location, count, transpose, value))
{
return;
}
......@@ -1083,6 +1146,7 @@ void GL_APIENTRY BindImageTexture(GLuint unit,
"(GLuint unit = %u, GLuint texture = %u, GLint level = %d, GLboolean layered = %u, GLint "
"layer = %d, GLenum access = 0x%X, GLenum format = 0x%X)",
unit, texture, level, layered, layer, access, format);
Context *context = GetValidGlobalContext();
if (context)
{
......@@ -1098,7 +1162,7 @@ void GL_APIENTRY BindImageTexture(GLuint unit,
void GL_APIENTRY GetBooleani_v(GLenum target, GLuint index, GLboolean *data)
{
EVENT("(GLenum target = 0x%X, GLuint index = %u, GLboolean* data = 0x%0.8p)", target, index,
EVENT("(GLenum target = 0x%X, GLuint index = %u, GLboolean *data = 0x%0.8p)", target, index,
data);
Context *context = GetValidGlobalContext();
......@@ -1108,6 +1172,7 @@ void GL_APIENTRY GetBooleani_v(GLenum target, GLuint index, GLboolean *data)
{
return;
}
context->getBooleani_v(target, index, data);
}
}
......@@ -1155,6 +1220,7 @@ void GL_APIENTRY TexStorage2DMultisample(GLenum target,
"(GLenum target = 0x%X, GLsizei samples = %d, GLenum internalformat = 0x%X, GLsizei width "
"= %d, GLsizei height = %d, GLboolean fixedsamplelocations = %u)",
target, samples, internalformat, width, height, fixedsamplelocations);
Context *context = GetValidGlobalContext();
if (context)
{
......@@ -1164,6 +1230,7 @@ void GL_APIENTRY TexStorage2DMultisample(GLenum target,
{
return;
}
context->texStorage2DMultisample(target, samples, internalformat, width, height,
fixedsamplelocations);
}
......@@ -1171,7 +1238,7 @@ void GL_APIENTRY TexStorage2DMultisample(GLenum target,
void GL_APIENTRY GetMultisamplefv(GLenum pname, GLuint index, GLfloat *val)
{
EVENT("(GLenum pname = 0x%X, GLuint index = %u, GLfloat* val = 0x%0.8p)", pname, index, val);
EVENT("(GLenum pname = 0x%X, GLuint index = %u, GLfloat *val = 0x%0.8p)", pname, index, val);
Context *context = GetValidGlobalContext();
if (context)
......@@ -1188,6 +1255,7 @@ void GL_APIENTRY GetMultisamplefv(GLenum pname, GLuint index, GLfloat *val)
void GL_APIENTRY SampleMaski(GLuint maskNumber, GLbitfield mask)
{
EVENT("(GLuint maskNumber = %u, GLbitfield mask = 0x%X)", maskNumber, mask);
Context *context = GetValidGlobalContext();
if (context)
{
......@@ -1195,13 +1263,14 @@ void GL_APIENTRY SampleMaski(GLuint maskNumber, GLbitfield mask)
{
return;
}
context->sampleMaski(maskNumber, mask);
}
}
void GL_APIENTRY GetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
{
EVENT("(GLenum target = 0x%X, GLint level = %d, GLenum pname = 0x%X, GLint* params = 0x%0.8p)",
EVENT("(GLenum target = 0x%X, GLint level = %d, GLenum pname = 0x%X, GLint *params = 0x%0.8p)",
target, level, pname, params);
Context *context = GetValidGlobalContext();
......@@ -1220,7 +1289,7 @@ void GL_APIENTRY GetTexLevelParameteriv(GLenum target, GLint level, GLenum pname
void GL_APIENTRY GetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params)
{
EVENT(
"(GLenum target = 0x%X, GLint level = %d, GLenum pname = 0x%X, GLfloat* params = 0x%0.8p)",
"(GLenum target = 0x%X, GLint level = %d, GLenum pname = 0x%X, GLfloat *params = 0x%0.8p)",
target, level, pname, params);
Context *context = GetValidGlobalContext();
......@@ -1244,6 +1313,7 @@ void GL_APIENTRY BindVertexBuffer(GLuint bindingindex,
EVENT(
"(GLuint bindingindex = %u, GLuint buffer = %u, GLintptr offset = %d, GLsizei stride = %d)",
bindingindex, buffer, offset, stride);
Context *context = GetValidGlobalContext();
if (context)
{
......@@ -1267,6 +1337,7 @@ void GL_APIENTRY VertexAttribFormat(GLuint attribindex,
"(GLuint attribindex = %u, GLint size = %d, GLenum type = 0x%X, GLboolean normalized = %u, "
"GLuint relativeoffset = %u)",
attribindex, size, type, normalized, relativeoffset);
Context *context = GetValidGlobalContext();
if (context)
{
......@@ -1290,6 +1361,7 @@ void GL_APIENTRY VertexAttribIFormat(GLuint attribindex,
"(GLuint attribindex = %u, GLint size = %d, GLenum type = 0x%X, GLuint relativeoffset = "
"%u)",
attribindex, size, type, relativeoffset);
Context *context = GetValidGlobalContext();
if (context)
{
......@@ -1306,6 +1378,7 @@ void GL_APIENTRY VertexAttribIFormat(GLuint attribindex,
void GL_APIENTRY VertexAttribBinding(GLuint attribindex, GLuint bindingindex)
{
EVENT("(GLuint attribindex = %u, GLuint bindingindex = %u)", attribindex, bindingindex);
Context *context = GetValidGlobalContext();
if (context)
{
......@@ -1322,6 +1395,7 @@ void GL_APIENTRY VertexAttribBinding(GLuint attribindex, GLuint bindingindex)
void GL_APIENTRY VertexBindingDivisor(GLuint bindingindex, GLuint divisor)
{
EVENT("(GLuint bindingindex = %u, GLuint divisor = %u)", bindingindex, divisor);
Context *context = GetValidGlobalContext();
if (context)
{
......
// GENERATED FILE - DO NOT EDIT.
// Generated by generate_entry_points.py using data from gl.xml.
//
// Copyright(c) 2016 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_1_autogen.h:
// Defines the GLES 3.1 entry points.
// entry_points_gles_3_1.h : Defines the GLES 3.1 entry points.
#ifndef LIBGLESV2_ENTRYPOINTGLES31_H_
#define LIBGLESV2_ENTRYPOINTGLES31_H_
#ifndef LIBGLESV2_ENTRYPOINTSGLES31_AUTOGEN_H_
#define LIBGLESV2_ENTRYPOINTSGLES31_AUTOGEN_H_
#include <GLES3/gl31.h>
#include <export.h>
// we include the platform.h header since it undefines the conflicting MemoryBarrier macro
#include "common/platform.h"
namespace gl
{
ANGLE_EXPORT void GL_APIENTRY DispatchCompute(GLuint numGroupsX,
GLuint numGroupsY,
GLuint numGroupsZ);
ANGLE_EXPORT void GL_APIENTRY DispatchCompute(GLuint num_groups_x,
GLuint num_groups_y,
GLuint num_groups_z);
ANGLE_EXPORT void GL_APIENTRY DispatchComputeIndirect(GLintptr indirect);
ANGLE_EXPORT void GL_APIENTRY DrawArraysIndirect(GLenum mode, const void *indirect);
ANGLE_EXPORT void GL_APIENTRY DrawElementsIndirect(GLenum mode, GLenum type, const void *indirect);
......@@ -190,7 +190,6 @@ ANGLE_EXPORT void GL_APIENTRY BindImageTexture(GLuint unit,
GLenum access,
GLenum format);
ANGLE_EXPORT void GL_APIENTRY GetBooleani_v(GLenum target, GLuint index, GLboolean *data);
ANGLE_EXPORT void GL_APIENTRY MemoryBarrier(GLbitfield barriers);
ANGLE_EXPORT void GL_APIENTRY MemoryBarrierByRegion(GLbitfield barriers);
ANGLE_EXPORT void GL_APIENTRY TexStorage2DMultisample(GLenum target,
......@@ -224,6 +223,6 @@ ANGLE_EXPORT void GL_APIENTRY VertexAttribIFormat(GLuint attribindex,
GLuint relativeoffset);
ANGLE_EXPORT void GL_APIENTRY VertexAttribBinding(GLuint attribindex, GLuint bindingindex);
ANGLE_EXPORT void GL_APIENTRY VertexBindingDivisor(GLuint bindingindex, GLuint divisor);
};
} // namespace gl
#endif // LIBGLESV2_ENTRYPOINTGLES31_H_
#endif // LIBGLESV2_ENTRYPOINTSGLES31_AUTOGEN_H_
......@@ -32,7 +32,7 @@ template_cpp = """// GENERATED FILE - DO NOT EDIT.
#include "libGLESv2/entry_points_gles_2_0_autogen.h"
#include "libGLESv2/entry_points_gles_2_0_ext.h"
#include "libGLESv2/entry_points_gles_3_0_autogen.h"
#include "libGLESv2/entry_points_gles_3_1.h"
#include "libGLESv2/entry_points_gles_3_1_autogen.h"
#include "platform/Platform.h"
#define P(FUNC) reinterpret_cast<__eglMustCastToProperFunctionPointerType>(FUNC)
......
......@@ -9,7 +9,7 @@
#include "libGLESv2/entry_points_gles_2_0_autogen.h"
#include "libGLESv2/entry_points_gles_2_0_ext.h"
#include "libGLESv2/entry_points_gles_3_0_autogen.h"
#include "libGLESv2/entry_points_gles_3_1.h"
#include "libGLESv2/entry_points_gles_3_1_autogen.h"
#include "common/event_tracer.h"
......
......@@ -16,7 +16,7 @@
#include "libGLESv2/entry_points_gles_2_0_autogen.h"
#include "libGLESv2/entry_points_gles_2_0_ext.h"
#include "libGLESv2/entry_points_gles_3_0_autogen.h"
#include "libGLESv2/entry_points_gles_3_1.h"
#include "libGLESv2/entry_points_gles_3_1_autogen.h"
#include "platform/Platform.h"
#define P(FUNC) reinterpret_cast<__eglMustCastToProperFunctionPointerType>(FUNC)
......
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