Commit a0648780 by Lingfeng Yang Committed by Commit Bot

GLES1: Revise entry points

- Move the entry points common to GLES1/2 to GLES2 since GLES2 is the primary use case and we want to isolate the GLES1-only bits. - Update entry points with all the wanted extensions for Android. - Auto-generate GLES1-specific entry points and use them as a macro in Context.h. - Move all GLES1-specific renderer implementations to ContextGLES1.cpp + Fix getting pointer params in generate_entry_points.py BUG=angleproject:2306 Change-Id: If32bfd2b63657acecaec6adb10cabf39f06c4832 Reviewed-on: https://chromium-review.googlesource.com/959630Reviewed-by: 's avatarLingfeng Yang <lfy@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Lingfeng Yang <lfy@google.com>
parent d429ac56
......@@ -76,9 +76,15 @@
"glFramebufferTexture2D": {
"textarget": "TextureTarget"
},
"glFramebufferTexture2DOES": {
"textarget": "TextureTarget"
},
"glGenerateMipmap": {
"target": "TextureType"
},
"glGenerateMipmapOES": {
"target": "TextureType"
},
"glGetBufferParameteriv": {
"target": "BufferBinding"
},
......
......@@ -14,12 +14,28 @@ from datetime import date
# List of supported extensions. Add to this list to enable new extensions
# available in gl.xml.
# TODO(jmadill): Support extensions not in gl.xml.
supported_extensions = sorted([
# ES1 (statically linked by some tests even if we don't support the extension)
gles1_extensions = [
# ES1 (Possibly the min set of extensions needed by Android)
"GL_OES_draw_texture",
"GL_OES_framebuffer_object",
"GL_OES_matrix_palette",
"GL_OES_point_size_array",
"GL_OES_query_matrix",
"GL_OES_matrix_palette",
"GL_OES_draw_texture",
"GL_OES_texture_cube_map",
]
# List of GLES1 extensions for which we don't need to add Context.h decls.
gles1_no_context_decl_extensions = [
"GL_OES_framebuffer_object",
]
# List of GLES1 API calls that have had their semantics changed in later GLES versions, but the
# name was kept the same
gles1_overloaded = [
"glGetPointerv",
]
supported_extensions = sorted(gles1_extensions + [
# ES2+
"GL_ANGLE_framebuffer_blit",
"GL_ANGLE_framebuffer_multisample",
......@@ -134,6 +150,26 @@ template_entry_point_def = """{return_type}GL_APIENTRY {name}({params})
{default_return_if_needed}}}
"""
context_gles_header = """// GENERATED FILE - DO NOT EDIT.
// Generated by {script_name} using data from {data_source_name}.
//
// Copyright {year} 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.
//
// Context_gles_{annotation_lower}_autogen.h: Creates a macro for interfaces in Context.
#ifndef ANGLE_CONTEXT_GLES_{annotation_upper}_AUTOGEN_H_
#define ANGLE_CONTEXT_GLES_{annotation_upper}_AUTOGEN_H_
#define ANGLE_GLES1_CONTEXT_API \\
{interface}
#endif // ANGLE_CONTEXT_API_{annotation_upper}_AUTOGEN_H_
"""
context_gles_decl = """ {return_type} {name_lower_no_suffix}({internal_params}); \\"""
def script_relative(path):
return os.path.join(os.path.dirname(sys.argv[0]), path)
......@@ -156,11 +192,23 @@ def type_name_sep_index(param):
return max(space, pointer)
def just_the_type(param):
if "*" in param:
return param[:type_name_sep_index(param) + 1]
return param[:type_name_sep_index(param)]
def just_the_name(param):
return param[type_name_sep_index(param)+1:]
def make_param(param_type, param_name):
return param_type + " " + param_name
def just_the_type_packed(param, entry):
name = just_the_name(param)
if entry.has_key(name):
return entry[name]
else:
return just_the_type(param)
def just_the_name_packed(param, reserved_set):
name = just_the_name(param)
if name in reserved_set:
......@@ -253,6 +301,23 @@ def format_entry_point_def(cmd_name, proto, params):
context_getter = get_context_getter_function(cmd_name),
event_comment = event_comment)
def format_context_gles_decl(cmd_name, proto, params):
packed_gl_enums = cmd_packed_gl_enums.get(cmd_name, {})
internal_params = ", ".join([make_param(just_the_type_packed(param, packed_gl_enums),
just_the_name_packed(param, packed_gl_enums)) for param in params])
return_type = proto[:-len(cmd_name)]
name_lower_no_suffix = cmd_name[2:3].lower() + cmd_name[3:]
for suffix in strip_suffixes:
if name_lower_no_suffix.endswith(suffix):
name_lower_no_suffix = name_lower_no_suffix[0:-len(suffix)]
return context_gles_decl.format(
return_type = return_type,
name_lower_no_suffix = name_lower_no_suffix,
internal_params = internal_params)
def path_to(folder, file):
return os.path.join(script_relative(".."), "src", folder, file)
......@@ -273,6 +338,25 @@ def get_entry_points(all_commands, gles_commands):
return decls, defs
def get_gles1_decls(all_commands, gles_commands):
decls = []
for command in all_commands:
proto = command.find('proto')
cmd_name = proto.find('name').text
if cmd_name not in gles_commands:
continue
if cmd_name in gles1_overloaded:
continue
param_text = ["".join(param.itertext()) for param in command.findall('param')]
proto_text = "".join(proto.itertext())
decls.append(format_context_gles_decl(cmd_name, proto_text, param_text))
return decls
def write_file(annotation, comment, template, entry_points, suffix, includes):
content = template.format(
......@@ -292,6 +376,31 @@ def write_file(annotation, comment, template, entry_points, suffix, includes):
out.write(content)
out.close()
def write_context_api_decls(annotation, template, decls):
interface_lines = []
for i in decls['core']:
interface_lines.append(i)
for extname in sorted(decls['exts'].keys()):
interface_lines.append(" /* " + extname + " */ \\")
interface_lines.extend(decls['exts'][extname])
content = template.format(
annotation_lower = annotation.lower(),
annotation_upper = annotation.upper(),
script_name = os.path.basename(sys.argv[0]),
data_source_name = "gl.xml",
year = date.today().year,
interface = "\n".join(interface_lines))
path = path_to("libANGLE", "Context_gles_%s_autogen.h" % annotation.lower())
with open(path, "w") as out:
out.write(content)
out.close()
all_commands = root.findall('commands/command')
all_cmd_names = []
......@@ -305,12 +414,21 @@ template_sources_includes = """#include "libGLESv2/entry_points_gles_{}_autogen.
#include "libGLESv2/global_state.h"
"""
# First run through the main GLES entry points.
for major_version, minor_version in [[1, 0], [2, 0], [3, 0], [3, 1]]:
gles1decls = {}
gles1decls['core'] = []
gles1decls['exts'] = {}
# First run through the main GLES entry points. Since ES2+ is the primary use
# case, we go through those first and then add ES1-only APIs at the end.
for major_version, minor_version in [[2, 0], [3, 0], [3, 1], [1, 0]]:
annotation = "{}_{}".format(major_version, minor_version)
name_prefix = "GL_ES_VERSION_"
if major_version == 1:
is_gles1 = major_version == 1
if is_gles1:
name_prefix = "GL_VERSION_ES_CM_"
comment = annotation.replace("_", ".")
gles_xpath = ".//feature[@name='{}{}']//command".format(name_prefix, annotation)
gles_commands = [cmd.attrib['name'] for cmd in root.findall(gles_xpath)]
......@@ -339,6 +457,9 @@ for major_version, minor_version in [[1, 0], [2, 0], [3, 0], [3, 1]]:
"\n".join(decls), "h", header_includes)
write_file(annotation, comment, template_entry_point_source,
"\n".join(defs), "cpp", source_includes)
if is_gles1:
gles1decls['core'] = get_gles1_decls(all_commands, gles_commands)
# After we finish with the main entry points, we process the extensions.
extension_defs = []
......@@ -348,6 +469,9 @@ extension_decls = []
# in sorted order.
ext_data = {}
for gles1ext in gles1_extensions:
gles1decls['exts'][gles1ext] = []
for extension in root.findall("extensions/extension"):
extension_name = extension.attrib['name']
if not extension_name in supported_extensions:
......@@ -401,6 +525,10 @@ for extension_name, ext_cmd_names in sorted(ext_data.iteritems()):
extension_defs += defs
extension_decls += decls
if extension_name in gles1_extensions:
if extension_name not in gles1_no_context_decl_extensions:
gles1decls['exts'][extension_name] = get_gles1_decls(all_commands, ext_cmd_names)
header_includes = template_header_includes.format(
major="", minor="")
header_includes += """
......@@ -423,6 +551,8 @@ write_file("ext", "extension", template_entry_point_header,
write_file("ext", "extension", template_entry_point_source,
"\n".join([item for item in extension_defs]), "cpp", source_includes)
write_context_api_decls("1_0", context_gles_header, gles1decls)
sorted_cmd_names = ["Invalid"] + [cmd[2:] for cmd in sorted(all_cmd_names)]
entry_points_enum = template_entry_points_enum_header.format(
......
......@@ -5944,512 +5944,6 @@ void Context::texStorage1D(GLenum target, GLsizei levels, GLenum internalformat,
UNIMPLEMENTED();
}
void Context::alphaFunc(GLenum func, GLfloat ref)
{
UNIMPLEMENTED();
}
void Context::alphaFuncx(GLenum func, GLfixed ref)
{
UNIMPLEMENTED();
}
void Context::clearColorx(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
{
UNIMPLEMENTED();
}
void Context::clearDepthx(GLfixed depth)
{
UNIMPLEMENTED();
}
void Context::clientActiveTexture(GLenum texture)
{
UNIMPLEMENTED();
}
void Context::clipPlanef(GLenum p, const GLfloat *eqn)
{
UNIMPLEMENTED();
}
void Context::clipPlanex(GLenum plane, const GLfixed *equation)
{
UNIMPLEMENTED();
}
void Context::color4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
{
UNIMPLEMENTED();
}
void Context::color4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
{
UNIMPLEMENTED();
}
void Context::color4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
{
UNIMPLEMENTED();
}
void Context::colorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
{
UNIMPLEMENTED();
}
void Context::cullFace(GLenum mode)
{
UNIMPLEMENTED();
}
void Context::depthRangex(GLfixed n, GLfixed f)
{
UNIMPLEMENTED();
}
void Context::disableClientState(GLenum array)
{
UNIMPLEMENTED();
}
void Context::enableClientState(GLenum array)
{
UNIMPLEMENTED();
}
void Context::fogf(GLenum pname, GLfloat param)
{
UNIMPLEMENTED();
}
void Context::fogfv(GLenum pname, const GLfloat *params)
{
UNIMPLEMENTED();
}
void Context::fogx(GLenum pname, GLfixed param)
{
UNIMPLEMENTED();
}
void Context::fogxv(GLenum pname, const GLfixed *param)
{
UNIMPLEMENTED();
}
void Context::frustumf(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f)
{
UNIMPLEMENTED();
}
void Context::frustumx(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f)
{
UNIMPLEMENTED();
}
void Context::getBufferParameteriv(GLenum target, GLenum pname, GLint *params)
{
UNIMPLEMENTED();
}
void Context::getClipPlanef(GLenum plane, GLfloat *equation)
{
UNIMPLEMENTED();
}
void Context::getClipPlanex(GLenum plane, GLfixed *equation)
{
UNIMPLEMENTED();
}
void Context::getFixedv(GLenum pname, GLfixed *params)
{
UNIMPLEMENTED();
}
void Context::getLightfv(GLenum light, GLenum pname, GLfloat *params)
{
UNIMPLEMENTED();
}
void Context::getLightxv(GLenum light, GLenum pname, GLfixed *params)
{
UNIMPLEMENTED();
}
void Context::getMaterialfv(GLenum face, GLenum pname, GLfloat *params)
{
UNIMPLEMENTED();
}
void Context::getMaterialxv(GLenum face, GLenum pname, GLfixed *params)
{
UNIMPLEMENTED();
}
void Context::getTexEnvfv(GLenum target, GLenum pname, GLfloat *params)
{
UNIMPLEMENTED();
}
void Context::getTexEnviv(GLenum target, GLenum pname, GLint *params)
{
UNIMPLEMENTED();
}
void Context::getTexEnvxv(GLenum target, GLenum pname, GLfixed *params)
{
UNIMPLEMENTED();
}
void Context::getTexParameterxv(TextureType target, GLenum pname, GLfixed *params)
{
UNIMPLEMENTED();
}
void Context::lightModelf(GLenum pname, GLfloat param)
{
UNIMPLEMENTED();
}
void Context::lightModelfv(GLenum pname, const GLfloat *params)
{
UNIMPLEMENTED();
}
void Context::lightModelx(GLenum pname, GLfixed param)
{
UNIMPLEMENTED();
}
void Context::lightModelxv(GLenum pname, const GLfixed *param)
{
UNIMPLEMENTED();
}
void Context::lightf(GLenum light, GLenum pname, GLfloat param)
{
UNIMPLEMENTED();
}
void Context::lightfv(GLenum light, GLenum pname, const GLfloat *params)
{
UNIMPLEMENTED();
}
void Context::lightx(GLenum light, GLenum pname, GLfixed param)
{
UNIMPLEMENTED();
}
void Context::lightxv(GLenum light, GLenum pname, const GLfixed *params)
{
UNIMPLEMENTED();
}
void Context::lineWidthx(GLfixed width)
{
UNIMPLEMENTED();
}
void Context::loadIdentity()
{
UNIMPLEMENTED();
}
void Context::loadMatrixf(const GLfloat *m)
{
UNIMPLEMENTED();
}
void Context::loadMatrixx(const GLfixed *m)
{
UNIMPLEMENTED();
}
void Context::logicOp(GLenum opcode)
{
UNIMPLEMENTED();
}
void Context::materialf(GLenum face, GLenum pname, GLfloat param)
{
UNIMPLEMENTED();
}
void Context::materialfv(GLenum face, GLenum pname, const GLfloat *params)
{
UNIMPLEMENTED();
}
void Context::materialx(GLenum face, GLenum pname, GLfixed param)
{
UNIMPLEMENTED();
}
void Context::materialxv(GLenum face, GLenum pname, const GLfixed *param)
{
UNIMPLEMENTED();
}
void Context::matrixMode(GLenum mode)
{
UNIMPLEMENTED();
}
void Context::multMatrixf(const GLfloat *m)
{
UNIMPLEMENTED();
}
void Context::multMatrixx(const GLfixed *m)
{
UNIMPLEMENTED();
}
void Context::multiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
{
UNIMPLEMENTED();
}
void Context::multiTexCoord4x(GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
{
UNIMPLEMENTED();
}
void Context::normal3f(GLfloat nx, GLfloat ny, GLfloat nz)
{
UNIMPLEMENTED();
}
void Context::normal3x(GLfixed nx, GLfixed ny, GLfixed nz)
{
UNIMPLEMENTED();
}
void Context::normalPointer(GLenum type, GLsizei stride, const void *pointer)
{
UNIMPLEMENTED();
}
void Context::orthof(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f)
{
UNIMPLEMENTED();
}
void Context::orthox(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f)
{
UNIMPLEMENTED();
}
void Context::pointParameterf(GLenum pname, GLfloat param)
{
UNIMPLEMENTED();
}
void Context::pointParameterfv(GLenum pname, const GLfloat *params)
{
UNIMPLEMENTED();
}
void Context::pointParameterx(GLenum pname, GLfixed param)
{
UNIMPLEMENTED();
}
void Context::pointParameterxv(GLenum pname, const GLfixed *params)
{
UNIMPLEMENTED();
}
void Context::pointSize(GLfloat size)
{
UNIMPLEMENTED();
}
void Context::pointSizex(GLfixed size)
{
UNIMPLEMENTED();
}
void Context::polygonOffsetx(GLfixed factor, GLfixed units)
{
UNIMPLEMENTED();
}
void Context::popMatrix()
{
UNIMPLEMENTED();
}
void Context::pushMatrix()
{
UNIMPLEMENTED();
}
void Context::rotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
{
UNIMPLEMENTED();
}
void Context::rotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
{
UNIMPLEMENTED();
}
void Context::sampleCoveragex(GLclampx value, GLboolean invert)
{
UNIMPLEMENTED();
}
void Context::scalef(GLfloat x, GLfloat y, GLfloat z)
{
UNIMPLEMENTED();
}
void Context::scalex(GLfixed x, GLfixed y, GLfixed z)
{
UNIMPLEMENTED();
}
void Context::shadeModel(GLenum mode)
{
UNIMPLEMENTED();
}
void Context::texCoordPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
{
UNIMPLEMENTED();
}
void Context::texEnvf(GLenum target, GLenum pname, GLfloat param)
{
UNIMPLEMENTED();
}
void Context::texEnvfv(GLenum target, GLenum pname, const GLfloat *params)
{
UNIMPLEMENTED();
}
void Context::texEnvi(GLenum target, GLenum pname, GLint param)
{
UNIMPLEMENTED();
}
void Context::texEnviv(GLenum target, GLenum pname, const GLint *params)
{
UNIMPLEMENTED();
}
void Context::texEnvx(GLenum target, GLenum pname, GLfixed param)
{
UNIMPLEMENTED();
}
void Context::texEnvxv(GLenum target, GLenum pname, const GLfixed *params)
{
UNIMPLEMENTED();
}
void Context::texParameterx(TextureType target, GLenum pname, GLfixed param)
{
UNIMPLEMENTED();
}
void Context::texParameterxv(TextureType target, GLenum pname, const GLfixed *params)
{
UNIMPLEMENTED();
}
void Context::translatef(GLfloat x, GLfloat y, GLfloat z)
{
UNIMPLEMENTED();
}
void Context::translatex(GLfixed x, GLfixed y, GLfixed z)
{
UNIMPLEMENTED();
}
void Context::vertexPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
{
UNIMPLEMENTED();
}
void Context::drawTexf(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height)
{
UNIMPLEMENTED();
}
void Context::drawTexfv(const GLfloat *coords)
{
UNIMPLEMENTED();
}
void Context::drawTexi(GLint x, GLint y, GLint z, GLint width, GLint height)
{
UNIMPLEMENTED();
}
void Context::drawTexiv(const GLint *coords)
{
UNIMPLEMENTED();
}
void Context::drawTexs(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height)
{
UNIMPLEMENTED();
}
void Context::drawTexsv(const GLshort *coords)
{
UNIMPLEMENTED();
}
void Context::drawTexx(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height)
{
UNIMPLEMENTED();
}
void Context::drawTexxv(const GLfixed *coords)
{
UNIMPLEMENTED();
}
void Context::currentPaletteMatrix(GLuint matrixpaletteindex)
{
UNIMPLEMENTED();
}
void Context::loadPaletteFromModelViewMatrix()
{
UNIMPLEMENTED();
}
void Context::matrixIndexPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
{
UNIMPLEMENTED();
}
void Context::weightPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
{
UNIMPLEMENTED();
}
void Context::pointSizePointer(GLenum type, GLsizei stride, const void *pointer)
{
UNIMPLEMENTED();
}
GLbitfield Context::queryMatrixx(GLfixed *mantissa, GLint *exponent)
{
UNIMPLEMENTED();
return 0;
}
bool Context::getQueryParameterInfo(GLenum pname, GLenum *type, unsigned int *numParams)
{
// Please note: the query type returned for DEPTH_CLEAR_VALUE in this implementation
......
......@@ -19,6 +19,7 @@
#include "libANGLE/Caps.h"
#include "libANGLE/Constants.h"
#include "libANGLE/ContextState.h"
#include "libANGLE/Context_gles_1_0_autogen.h"
#include "libANGLE/Error.h"
#include "libANGLE/HandleAllocator.h"
#include "libANGLE/PackedGLEnums.h"
......@@ -125,116 +126,8 @@ class Context final : angle::NonCopyable
void setFenceNV(GLuint fence, GLenum condition);
GLboolean testFenceNV(GLuint fence);
// OpenGL ES 1
void alphaFunc(GLenum func, GLfloat ref);
void alphaFuncx(GLenum func, GLfixed ref);
void clearColorx(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
void clearDepthx(GLfixed depth);
void clientActiveTexture(GLenum texture);
void clipPlanef(GLenum p, const GLfloat *eqn);
void clipPlanex(GLenum plane, const GLfixed *equation);
void color4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
void color4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
void color4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
void colorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer);
void cullFace(GLenum mode);
void depthRangex(GLfixed n, GLfixed f);
void disableClientState(GLenum array);
void enableClientState(GLenum array);
void fogf(GLenum pname, GLfloat param);
void fogfv(GLenum pname, const GLfloat *params);
void fogx(GLenum pname, GLfixed param);
void fogxv(GLenum pname, const GLfixed *param);
void frustumf(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
void frustumx(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
void getBufferParameteriv(GLenum target, GLenum pname, GLint *params);
void getClipPlanef(GLenum plane, GLfloat *equation);
void getClipPlanex(GLenum plane, GLfixed *equation);
void getFixedv(GLenum pname, GLfixed *params);
void getLightfv(GLenum light, GLenum pname, GLfloat *params);
void getLightxv(GLenum light, GLenum pname, GLfixed *params);
void getMaterialfv(GLenum face, GLenum pname, GLfloat *params);
void getMaterialxv(GLenum face, GLenum pname, GLfixed *params);
void getTexEnvfv(GLenum target, GLenum pname, GLfloat *params);
void getTexEnviv(GLenum target, GLenum pname, GLint *params);
void getTexEnvxv(GLenum target, GLenum pname, GLfixed *params);
void getTexParameterxv(TextureType target, GLenum pname, GLfixed *params);
void lightModelf(GLenum pname, GLfloat param);
void lightModelfv(GLenum pname, const GLfloat *params);
void lightModelx(GLenum pname, GLfixed param);
void lightModelxv(GLenum pname, const GLfixed *param);
void lightf(GLenum light, GLenum pname, GLfloat param);
void lightfv(GLenum light, GLenum pname, const GLfloat *params);
void lightx(GLenum light, GLenum pname, GLfixed param);
void lightxv(GLenum light, GLenum pname, const GLfixed *params);
void lineWidthx(GLfixed width);
void loadIdentity();
void loadMatrixf(const GLfloat *m);
void loadMatrixx(const GLfixed *m);
void logicOp(GLenum opcode);
void materialf(GLenum face, GLenum pname, GLfloat param);
void materialfv(GLenum face, GLenum pname, const GLfloat *params);
void materialx(GLenum face, GLenum pname, GLfixed param);
void materialxv(GLenum face, GLenum pname, const GLfixed *param);
void matrixMode(GLenum mode);
void multMatrixf(const GLfloat *m);
void multMatrixx(const GLfixed *m);
void multiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
void multiTexCoord4x(GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
void normal3f(GLfloat nx, GLfloat ny, GLfloat nz);
void normal3x(GLfixed nx, GLfixed ny, GLfixed nz);
void normalPointer(GLenum type, GLsizei stride, const void *pointer);
void orthof(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
void orthox(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
void pointParameterf(GLenum pname, GLfloat param);
void pointParameterfv(GLenum pname, const GLfloat *params);
void pointParameterx(GLenum pname, GLfixed param);
void pointParameterxv(GLenum pname, const GLfixed *params);
void pointSize(GLfloat size);
void pointSizex(GLfixed size);
void polygonOffsetx(GLfixed factor, GLfixed units);
void popMatrix();
void pushMatrix();
void rotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
void rotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
void sampleCoveragex(GLclampx value, GLboolean invert);
void scalef(GLfloat x, GLfloat y, GLfloat z);
void scalex(GLfixed x, GLfixed y, GLfixed z);
void shadeModel(GLenum mode);
void texCoordPointer(GLint size, GLenum type, GLsizei stride, const void *pointer);
void texEnvf(GLenum target, GLenum pname, GLfloat param);
void texEnvfv(GLenum target, GLenum pname, const GLfloat *params);
void texEnvi(GLenum target, GLenum pname, GLint param);
void texEnviv(GLenum target, GLenum pname, const GLint *params);
void texEnvx(GLenum target, GLenum pname, GLfixed param);
void texEnvxv(GLenum target, GLenum pname, const GLfixed *params);
void texParameterx(TextureType target, GLenum pname, GLfixed param);
void texParameterxv(TextureType target, GLenum pname, const GLfixed *params);
void translatef(GLfloat x, GLfloat y, GLfloat z);
void translatex(GLfixed x, GLfixed y, GLfixed z);
void vertexPointer(GLint size, GLenum type, GLsizei stride, const void *pointer);
// GL_OES_draw_texture
void drawTexf(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
void drawTexfv(const GLfloat *coords);
void drawTexi(GLint x, GLint y, GLint z, GLint width, GLint height);
void drawTexiv(const GLint *coords);
void drawTexs(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
void drawTexsv(const GLshort *coords);
void drawTexx(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
void drawTexxv(const GLfixed *coords);
// GL_OES_matrix_palette
void currentPaletteMatrix(GLuint matrixpaletteindex);
void loadPaletteFromModelViewMatrix();
void matrixIndexPointer(GLint size, GLenum type, GLsizei stride, const void *pointer);
void weightPointer(GLint size, GLenum type, GLsizei stride, const void *pointer);
// GL_OES_point_size_array
void pointSizePointer(GLenum type, GLsizei stride, const void *pointer);
// GL_OES_query_matrix
GLbitfield queryMatrixx(GLfixed *mantissa, GLint *exponent);
// GLES1 emulation: Interface to entry points
ANGLE_GLES1_CONTEXT_API
// OpenGL ES 2+
void bindTexture(TextureType target, GLuint handle);
......
......@@ -29,9 +29,11 @@ enum class EntryPoint
BindBufferBase,
BindBufferRange,
BindFramebuffer,
BindFramebufferOES,
BindImageTexture,
BindProgramPipeline,
BindRenderbuffer,
BindRenderbufferOES,
BindSampler,
BindTexture,
BindTransformFeedback,
......@@ -48,6 +50,7 @@ enum class EntryPoint
BufferData,
BufferSubData,
CheckFramebufferStatus,
CheckFramebufferStatusOES,
Clear,
ClearBufferfi,
ClearBufferfv,
......@@ -87,11 +90,13 @@ enum class EntryPoint
DeleteBuffers,
DeleteFencesNV,
DeleteFramebuffers,
DeleteFramebuffersOES,
DeleteProgram,
DeleteProgramPipelines,
DeleteQueries,
DeleteQueriesEXT,
DeleteRenderbuffers,
DeleteRenderbuffersOES,
DeleteSamplers,
DeleteShader,
DeleteSync,
......@@ -149,7 +154,9 @@ enum class EntryPoint
Fogxv,
FramebufferParameteri,
FramebufferRenderbuffer,
FramebufferRenderbufferOES,
FramebufferTexture2D,
FramebufferTexture2DOES,
FramebufferTextureLayer,
FrontFace,
Frustumf,
......@@ -157,16 +164,19 @@ enum class EntryPoint
GenBuffers,
GenFencesNV,
GenFramebuffers,
GenFramebuffersOES,
GenProgramPipelines,
GenQueries,
GenQueriesEXT,
GenRenderbuffers,
GenRenderbuffersOES,
GenSamplers,
GenTextures,
GenTransformFeedbacks,
GenVertexArrays,
GenVertexArraysOES,
GenerateMipmap,
GenerateMipmapOES,
GetActiveAttrib,
GetActiveUniform,
GetActiveUniformBlockName,
......@@ -189,6 +199,7 @@ enum class EntryPoint
GetFloatv,
GetFragDataLocation,
GetFramebufferAttachmentParameteriv,
GetFramebufferAttachmentParameterivOES,
GetFramebufferParameteriv,
GetGraphicsResetStatusEXT,
GetInteger64i_v,
......@@ -224,6 +235,7 @@ enum class EntryPoint
GetQueryiv,
GetQueryivEXT,
GetRenderbufferParameteriv,
GetRenderbufferParameterivOES,
GetSamplerParameterfv,
GetSamplerParameteriv,
GetShaderInfoLog,
......@@ -236,6 +248,9 @@ enum class EntryPoint
GetTexEnvfv,
GetTexEnviv,
GetTexEnvxv,
GetTexGenfvOES,
GetTexGenivOES,
GetTexGenxvOES,
GetTexLevelParameterfv,
GetTexLevelParameteriv,
GetTexParameterfv,
......@@ -264,11 +279,13 @@ enum class EntryPoint
IsEnabled,
IsFenceNV,
IsFramebuffer,
IsFramebufferOES,
IsProgram,
IsProgramPipeline,
IsQuery,
IsQueryEXT,
IsRenderbuffer,
IsRenderbufferOES,
IsSampler,
IsShader,
IsSync,
......@@ -376,6 +393,7 @@ enum class EntryPoint
RenderbufferStorage,
RenderbufferStorageMultisample,
RenderbufferStorageMultisampleANGLE,
RenderbufferStorageOES,
ResumeTransformFeedback,
Rotatef,
Rotatex,
......@@ -407,6 +425,12 @@ enum class EntryPoint
TexEnviv,
TexEnvx,
TexEnvxv,
TexGenfOES,
TexGenfvOES,
TexGeniOES,
TexGenivOES,
TexGenxOES,
TexGenxvOES,
TexImage2D,
TexImage3D,
TexParameterf,
......
......@@ -696,4 +696,170 @@ bool ValidateQueryMatrixxOES(Context *context, GLfixed *mantissa, GLint *exponen
UNIMPLEMENTED();
return true;
}
bool ValidateGenFramebuffersOES(Context *context, GLsizei n, GLuint *framebuffers)
{
UNIMPLEMENTED();
return true;
}
bool ValidateDeleteFramebuffersOES(Context *context, GLsizei n, const GLuint *framebuffers)
{
UNIMPLEMENTED();
return true;
}
bool ValidateGenRenderbuffersOES(Context *context, GLsizei n, GLuint *renderbuffers)
{
UNIMPLEMENTED();
return true;
}
bool ValidateDeleteRenderbuffersOES(Context *context, GLsizei n, const GLuint *renderbuffers)
{
UNIMPLEMENTED();
return true;
}
bool ValidateBindFramebufferOES(Context *context, GLenum target, GLuint framebuffer)
{
UNIMPLEMENTED();
return true;
}
bool ValidateBindRenderbufferOES(Context *context, GLenum target, GLuint renderbuffer)
{
UNIMPLEMENTED();
return true;
}
bool ValidateCheckFramebufferStatusOES(Context *context, GLenum target)
{
UNIMPLEMENTED();
return true;
}
bool ValidateFramebufferRenderbufferOES(Context *context,
GLenum target,
GLenum attachment,
GLenum rbtarget,
GLuint renderbuffer)
{
UNIMPLEMENTED();
return true;
}
bool ValidateFramebufferTexture2DOES(Context *context,
GLenum target,
GLenum attachment,
TextureTarget textarget,
GLuint texture,
GLint level)
{
UNIMPLEMENTED();
return true;
}
bool ValidateGenerateMipmapOES(Context *context, TextureType target)
{
UNIMPLEMENTED();
return true;
}
bool ValidateGetFramebufferAttachmentParameterivOES(Context *context,
GLenum target,
GLenum attachment,
GLenum pname,
GLint *params)
{
UNIMPLEMENTED();
return true;
}
bool ValidateGetRenderbufferParameterivOES(Context *context,
GLenum target,
GLenum pname,
GLint *params)
{
UNIMPLEMENTED();
return true;
}
bool ValidateIsFramebufferOES(Context *context, GLuint framebuffer)
{
UNIMPLEMENTED();
return true;
}
bool ValidateIsRenderbufferOES(Context *context, GLuint renderbuffer)
{
UNIMPLEMENTED();
return true;
}
bool ValidateRenderbufferStorageOES(Context *context,
GLenum target,
GLint internalformat,
GLsizei width,
GLsizei height)
{
UNIMPLEMENTED();
return true;
}
// GL_OES_texture_cube_map
bool ValidateGetTexGenfvOES(Context *context, GLenum coord, GLenum pname, GLfloat *params)
{
UNIMPLEMENTED();
return true;
}
bool ValidateGetTexGenivOES(Context *context, GLenum coord, GLenum pname, int *params)
{
UNIMPLEMENTED();
return true;
}
bool ValidateGetTexGenxvOES(Context *context, GLenum coord, GLenum pname, GLfixed *params)
{
UNIMPLEMENTED();
return true;
}
bool ValidateTexGenfvOES(Context *context, GLenum coord, GLenum pname, const GLfloat *params)
{
UNIMPLEMENTED();
return true;
}
bool ValidateTexGenivOES(Context *context, GLenum coord, GLenum pname, const GLint *param)
{
UNIMPLEMENTED();
return true;
}
bool ValidateTexGenxvOES(Context *context, GLenum coord, GLenum pname, const GLint *param)
{
UNIMPLEMENTED();
return true;
}
bool ValidateTexGenfOES(Context *context, GLenum coord, GLenum pname, GLfloat param)
{
UNIMPLEMENTED();
return true;
}
bool ValidateTexGeniOES(Context *context, GLenum coord, GLenum pname, GLint param)
{
UNIMPLEMENTED();
return true;
}
bool ValidateTexGenxOES(Context *context, GLenum coord, GLenum pname, GLfixed param)
{
UNIMPLEMENTED();
return true;
}
}
......@@ -203,6 +203,64 @@ bool ValidatePointSizePointerOES(Context *context,
// GL_OES_query_matrix
bool ValidateQueryMatrixxOES(Context *context, GLfixed *mantissa, GLint *exponent);
}
// GL_OES_framebuffer_object
bool ValidateGenFramebuffersOES(Context *context, GLsizei n, GLuint *framebuffers);
bool ValidateDeleteFramebuffersOES(Context *context, GLsizei n, const GLuint *framebuffers);
bool ValidateGenRenderbuffersOES(Context *context, GLsizei n, GLuint *renderbuffers);
bool ValidateDeleteRenderbuffersOES(Context *context, GLsizei n, const GLuint *renderbuffers);
bool ValidateBindFramebufferOES(Context *context, GLenum target, GLuint framebuffer);
bool ValidateBindRenderbufferOES(Context *context, GLenum target, GLuint renderbuffer);
bool ValidateCheckFramebufferStatusOES(Context *context, GLenum target);
bool ValidateFramebufferRenderbufferOES(Context *context,
GLenum target,
GLenum attachment,
GLenum rbtarget,
GLuint renderbuffer);
bool ValidateFramebufferTexture2DOES(Context *context,
GLenum target,
GLenum attachment,
TextureTarget textarget,
GLuint texture,
GLint level);
bool ValidateGenerateMipmapOES(Context *context, TextureType target);
bool ValidateGetFramebufferAttachmentParameterivOES(Context *context,
GLenum target,
GLenum attachment,
GLenum pname,
GLint *params);
bool ValidateGetRenderbufferParameterivOES(Context *context,
GLenum target,
GLenum pname,
GLint *params);
bool ValidateIsFramebufferOES(Context *context, GLuint framebuffer);
bool ValidateIsRenderbufferOES(Context *context, GLuint renderbuffer);
bool ValidateRenderbufferStorageOES(Context *context,
GLenum target,
GLint internalformat,
GLsizei width,
GLsizei height);
// GL_OES_texture_cube_map
bool ValidateGetTexGenfvOES(Context *context, GLenum coord, GLenum pname, GLfloat *params);
bool ValidateGetTexGenivOES(Context *context, GLenum coord, GLenum pname, int *params);
bool ValidateGetTexGenxvOES(Context *context, GLenum coord, GLenum pname, GLfixed *params);
bool ValidateTexGenfvOES(Context *context, GLenum coord, GLenum pname, const GLfloat *params);
bool ValidateTexGenivOES(Context *context, GLenum coord, GLenum pname, const GLint *params);
bool ValidateTexGenxvOES(Context *context, GLenum coord, GLenum pname, const GLfixed *params);
bool ValidateTexGenfOES(Context *context, GLenum coord, GLenum pname, GLfloat param);
bool ValidateTexGeniOES(Context *context, GLenum coord, GLenum pname, GLint param);
bool ValidateTexGenxOES(Context *context, GLenum coord, GLenum pname, GLfixed param);
} // namespace gl
#endif // LIBANGLE_VALIDATION_ES1_H_
......@@ -9,6 +9,7 @@
#include "angle_gl.h"
#include "libGLESv2/entry_points_gles_1_0_autogen.h"
#include "libGLESv2/entry_points_gles_2_0_autogen.h"
#include "libGLESv2/entry_points_gles_ext_autogen.h"
extern "C" {
......
......@@ -146,6 +146,7 @@
'libANGLE/Config.h',
'libANGLE/Constants.h',
'libANGLE/Context.cpp',
'libANGLE/Context_gles_1_0.cpp',
'libANGLE/Context.h',
'libANGLE/ContextState.cpp',
'libANGLE/ContextState.h',
......
......@@ -200,6 +200,38 @@ ANGLE_EXPORT void GL_APIENTRY
DrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
ANGLE_EXPORT void GL_APIENTRY DrawTexxvOES(const GLfixed *coords);
// GL_OES_framebuffer_object
ANGLE_EXPORT void GL_APIENTRY BindFramebufferOES(GLenum target, GLuint framebuffer);
ANGLE_EXPORT void GL_APIENTRY BindRenderbufferOES(GLenum target, GLuint renderbuffer);
ANGLE_EXPORT GLenum GL_APIENTRY CheckFramebufferStatusOES(GLenum target);
ANGLE_EXPORT void GL_APIENTRY DeleteFramebuffersOES(GLsizei n, const GLuint *framebuffers);
ANGLE_EXPORT void GL_APIENTRY DeleteRenderbuffersOES(GLsizei n, const GLuint *renderbuffers);
ANGLE_EXPORT void GL_APIENTRY FramebufferRenderbufferOES(GLenum target,
GLenum attachment,
GLenum renderbuffertarget,
GLuint renderbuffer);
ANGLE_EXPORT void GL_APIENTRY FramebufferTexture2DOES(GLenum target,
GLenum attachment,
GLenum textarget,
GLuint texture,
GLint level);
ANGLE_EXPORT void GL_APIENTRY GenFramebuffersOES(GLsizei n, GLuint *framebuffers);
ANGLE_EXPORT void GL_APIENTRY GenRenderbuffersOES(GLsizei n, GLuint *renderbuffers);
ANGLE_EXPORT void GL_APIENTRY GenerateMipmapOES(GLenum target);
ANGLE_EXPORT void GL_APIENTRY GetFramebufferAttachmentParameterivOES(GLenum target,
GLenum attachment,
GLenum pname,
GLint *params);
ANGLE_EXPORT void GL_APIENTRY GetRenderbufferParameterivOES(GLenum target,
GLenum pname,
GLint *params);
ANGLE_EXPORT GLboolean GL_APIENTRY IsFramebufferOES(GLuint framebuffer);
ANGLE_EXPORT GLboolean GL_APIENTRY IsRenderbufferOES(GLuint renderbuffer);
ANGLE_EXPORT void GL_APIENTRY RenderbufferStorageOES(GLenum target,
GLenum internalformat,
GLsizei width,
GLsizei height);
// GL_OES_get_program_binary
ANGLE_EXPORT void GL_APIENTRY GetProgramBinaryOES(GLuint program,
GLsizei bufSize,
......@@ -234,6 +266,17 @@ ANGLE_EXPORT void GL_APIENTRY PointSizePointerOES(GLenum type, GLsizei stride, c
// GL_OES_query_matrix
ANGLE_EXPORT GLbitfield GL_APIENTRY QueryMatrixxOES(GLfixed *mantissa, GLint *exponent);
// GL_OES_texture_cube_map
ANGLE_EXPORT void GL_APIENTRY GetTexGenfvOES(GLenum coord, GLenum pname, GLfloat *params);
ANGLE_EXPORT void GL_APIENTRY GetTexGenivOES(GLenum coord, GLenum pname, GLint *params);
ANGLE_EXPORT void GL_APIENTRY GetTexGenxvOES(GLenum coord, GLenum pname, GLfixed *params);
ANGLE_EXPORT void GL_APIENTRY TexGenfOES(GLenum coord, GLenum pname, GLfloat param);
ANGLE_EXPORT void GL_APIENTRY TexGenfvOES(GLenum coord, GLenum pname, const GLfloat *params);
ANGLE_EXPORT void GL_APIENTRY TexGeniOES(GLenum coord, GLenum pname, GLint param);
ANGLE_EXPORT void GL_APIENTRY TexGenivOES(GLenum coord, GLenum pname, const GLint *params);
ANGLE_EXPORT void GL_APIENTRY TexGenxOES(GLenum coord, GLenum pname, GLfixed param);
ANGLE_EXPORT void GL_APIENTRY TexGenxvOES(GLenum coord, GLenum pname, const GLfixed *params);
// GL_OES_vertex_array_object
ANGLE_EXPORT void GL_APIENTRY BindVertexArrayOES(GLuint array);
ANGLE_EXPORT void GL_APIENTRY DeleteVertexArraysOES(GLsizei n, const GLuint *arrays);
......
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