mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Merge inbound to mozilla-central. a=merge
This commit is contained in:
commit
6cf5ac594a
@ -105,9 +105,6 @@ let whitelist = [
|
||||
// Bug 1441857
|
||||
{propName: "--positionDurationBox-width-long",
|
||||
isFromDevTools: false},
|
||||
// Bug 1441860
|
||||
{propName: "--rule-flex-toggle-color",
|
||||
isFromDevTools: true},
|
||||
// Bug 1441929
|
||||
{propName: "--theme-search-overlays-semitransparent",
|
||||
isFromDevTools: true},
|
||||
|
@ -1,5 +1,5 @@
|
||||
This is the PDF.js project output, https://github.com/mozilla/pdf.js
|
||||
|
||||
Current extension version is: 2.0.385
|
||||
Current extension version is: 2.0.402
|
||||
|
||||
Taken from upstream commit: 99060e24
|
||||
Taken from upstream commit: 401f3a9d
|
||||
|
@ -68,8 +68,7 @@ var PdfjsChromeUtils = {
|
||||
this._browsers = new WeakSet();
|
||||
if (!this._ppmm) {
|
||||
// global parent process message manager (PPMM)
|
||||
this._ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"].
|
||||
getService(Ci.nsIMessageBroadcaster);
|
||||
this._ppmm = Services.ppmm;
|
||||
this._ppmm.addMessageListener("PDFJS:Parent:clearUserPref", this);
|
||||
this._ppmm.addMessageListener("PDFJS:Parent:setIntPref", this);
|
||||
this._ppmm.addMessageListener("PDFJS:Parent:setBoolPref", this);
|
||||
@ -78,8 +77,7 @@ var PdfjsChromeUtils = {
|
||||
this._ppmm.addMessageListener("PDFJS:Parent:isDefaultHandlerApp", this);
|
||||
|
||||
// global dom message manager (MMg)
|
||||
this._mmg = Cc["@mozilla.org/globalmessagemanager;1"].
|
||||
getService(Ci.nsIMessageListenerManager);
|
||||
this._mmg = Services.mm;
|
||||
this._mmg.addMessageListener("PDFJS:Parent:displayWarning", this);
|
||||
|
||||
this._mmg.addMessageListener("PDFJS:Parent:addEventListener", this);
|
||||
|
@ -35,8 +35,7 @@ var PdfjsContentUtils = {
|
||||
// child *process* mm, or when loaded into the parent for in-content
|
||||
// support the psuedo child process mm 'child PPMM'.
|
||||
if (!this._mm) {
|
||||
this._mm = Cc["@mozilla.org/childprocessmessagemanager;1"].
|
||||
getService(Ci.nsISyncMessageSender);
|
||||
this._mm = Services.cpmm;
|
||||
this._mm.addMessageListener("PDFJS:Child:updateSettings", this);
|
||||
|
||||
Services.obs.addObserver(this, "quit-application");
|
||||
|
@ -1893,7 +1893,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
|
||||
if (worker.destroyed) {
|
||||
return Promise.reject(new Error('Worker was destroyed'));
|
||||
}
|
||||
let apiVersion = '2.0.385';
|
||||
let apiVersion = '2.0.402';
|
||||
source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange');
|
||||
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
|
||||
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
|
||||
@ -3210,8 +3210,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
|
||||
}();
|
||||
var version, build;
|
||||
{
|
||||
exports.version = version = '2.0.385';
|
||||
exports.build = build = '99060e24';
|
||||
exports.version = version = '2.0.402';
|
||||
exports.build = build = '401f3a9d';
|
||||
}
|
||||
exports.getDocument = getDocument;
|
||||
exports.LoopbackPort = LoopbackPort;
|
||||
@ -4606,8 +4606,8 @@ exports.SVGGraphics = SVGGraphics;
|
||||
"use strict";
|
||||
|
||||
|
||||
var pdfjsVersion = '2.0.385';
|
||||
var pdfjsBuild = '99060e24';
|
||||
var pdfjsVersion = '2.0.402';
|
||||
var pdfjsBuild = '401f3a9d';
|
||||
var pdfjsSharedUtil = __w_pdfjs_require__(0);
|
||||
var pdfjsDisplayGlobal = __w_pdfjs_require__(13);
|
||||
var pdfjsDisplayAPI = __w_pdfjs_require__(4);
|
||||
|
@ -21073,8 +21073,8 @@ exports.PostScriptCompiler = PostScriptCompiler;
|
||||
"use strict";
|
||||
|
||||
|
||||
var pdfjsVersion = '2.0.385';
|
||||
var pdfjsBuild = '99060e24';
|
||||
var pdfjsVersion = '2.0.402';
|
||||
var pdfjsBuild = '401f3a9d';
|
||||
var pdfjsCoreWorker = __w_pdfjs_require__(20);
|
||||
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;
|
||||
|
||||
@ -21275,7 +21275,7 @@ var WorkerMessageHandler = {
|
||||
var cancelXHRs = null;
|
||||
var WorkerTasks = [];
|
||||
let apiVersion = docParams.apiVersion;
|
||||
let workerVersion = '2.0.385';
|
||||
let workerVersion = '2.0.402';
|
||||
if (apiVersion !== null && apiVersion !== workerVersion) {
|
||||
throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`);
|
||||
}
|
||||
|
@ -23,4 +23,5 @@ const ThemeVariableMap = [
|
||||
["--lwt-toolbarbutton-icon-fill-attention", "icon_attention_color"],
|
||||
["--lwt-toolbarbutton-hover-background", "button_background_hover"],
|
||||
["--lwt-toolbarbutton-active-background", "button_background_active"],
|
||||
["--lwt-selected-tab-background-color", "tab_selected"],
|
||||
];
|
||||
|
@ -530,13 +530,14 @@ tabbrowser {
|
||||
|
||||
/* Lightweight theme on tabs */
|
||||
:root[lwtheme-image] #tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background[selected=true] {
|
||||
background-attachment: scroll, fixed;
|
||||
background-attachment: scroll, scroll, fixed;
|
||||
background-color: transparent;
|
||||
background-image: linear-gradient(var(--toolbar-bgcolor), var(--toolbar-bgcolor)),
|
||||
background-image: linear-gradient(var(--lwt-selected-tab-background-color, transparent), var(--lwt-selected-tab-background-color, transparent)),
|
||||
linear-gradient(var(--toolbar-bgcolor), var(--toolbar-bgcolor)),
|
||||
var(--lwt-header-image);
|
||||
background-position: 0 0, right top;
|
||||
background-repeat: repeat-x, no-repeat;
|
||||
background-size: auto 100%, auto auto;
|
||||
background-position: 0 0, 0 0, right top;
|
||||
background-repeat: repeat-x, repeat-x, no-repeat;
|
||||
background-size: auto 100%, auto 100%, auto auto;
|
||||
}
|
||||
|
||||
/* Tab hover */
|
||||
|
@ -472,7 +472,7 @@
|
||||
.ruleview-flex {
|
||||
background: url("chrome://devtools/skin/images/command-frames.svg");
|
||||
-moz-context-properties: fill;
|
||||
fill: var(--rule-shape-toggle-color);
|
||||
fill: var(--rule-flex-toggle-color);
|
||||
border-radius: 0;
|
||||
background-size: 1em;
|
||||
}
|
||||
|
@ -93,6 +93,8 @@ bool WebGLContext::IsExtensionSupported(dom::CallerType callerType,
|
||||
|
||||
if (allowPrivilegedExts) {
|
||||
switch (ext) {
|
||||
case WebGLExtensionID::EXT_disjoint_timer_query:
|
||||
return WebGLExtensionDisjointTimerQuery::IsSupported(this);
|
||||
case WebGLExtensionID::MOZ_debug:
|
||||
return true;
|
||||
case WebGLExtensionID::WEBGL_debug_renderer_info:
|
||||
@ -118,8 +120,6 @@ WebGLContext::IsExtensionSupported(WebGLExtensionID ext) const
|
||||
switch (ext) {
|
||||
// In alphabetical order
|
||||
// EXT_
|
||||
case WebGLExtensionID::EXT_disjoint_timer_query:
|
||||
return WebGLExtensionDisjointTimerQuery::IsSupported(this);
|
||||
case WebGLExtensionID::EXT_texture_filter_anisotropic:
|
||||
return gl->IsExtensionSupported(gl::GLContext::EXT_texture_filter_anisotropic);
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "WebGLContext.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include "angle/ShaderLang.h"
|
||||
#include "GLSLANG/ShaderLang.h"
|
||||
#include "CanvasUtils.h"
|
||||
#include "gfxPrefs.h"
|
||||
#include "GLContext.h"
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include "WebGLShader.h"
|
||||
|
||||
#include "angle/ShaderLang.h"
|
||||
#include "GLSLANG/ShaderLang.h"
|
||||
#include "GLContext.h"
|
||||
#include "mozilla/dom/WebGLRenderingContextBinding.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
#include "WebGLShaderValidator.h"
|
||||
|
||||
#include "angle/ShaderLang.h"
|
||||
#include "gfxPrefs.h"
|
||||
#include "GLContext.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
@ -438,7 +437,7 @@ ShaderValidator::CalcNumSamplerUniforms() const
|
||||
if (type == LOCAL_GL_SAMPLER_2D ||
|
||||
type == LOCAL_GL_SAMPLER_CUBE)
|
||||
{
|
||||
accum += itr->arraySize;
|
||||
accum += itr->getArraySizeProduct();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
#ifndef WEBGL_SHADER_VALIDATOR_H_
|
||||
#define WEBGL_SHADER_VALIDATOR_H_
|
||||
|
||||
#include "angle/ShaderLang.h"
|
||||
#include "GLSLANG/ShaderLang.h"
|
||||
#include "GLDefs.h"
|
||||
#include "nsString.h"
|
||||
#include <string>
|
||||
|
@ -191,6 +191,9 @@ LOCAL_INCLUDES += [
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
|
||||
USE_LIBS += [ 'translator' ] # Grab the Angle shader translator.
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
LOCAL_INCLUDES += [
|
||||
'/dom/base',
|
||||
@ -198,6 +201,7 @@ LOCAL_INCLUDES += [
|
||||
'/dom/svg',
|
||||
'/dom/workers',
|
||||
'/dom/xul',
|
||||
'/gfx/angle/checkout/include',
|
||||
'/gfx/gl',
|
||||
'/image',
|
||||
'/js/xpconnect/src',
|
||||
@ -213,4 +217,4 @@ CXXFLAGS += CONFIG['TK_CFLAGS']
|
||||
LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
|
||||
|
||||
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
|
||||
CXXFLAGS += ['-Wno-error=shadow']
|
||||
CXXFLAGS += ['-Wno-error=shadow', '-Wno-missing-braces']
|
||||
|
@ -7561,7 +7561,6 @@ skip-if = (os == 'android')
|
||||
[generated/test_conformance__context__user-defined-properties-on-context.html]
|
||||
[generated/test_conformance__extensions__angle-instanced-arrays-out-of-bounds.html]
|
||||
[generated/test_conformance__extensions__angle-instanced-arrays.html]
|
||||
fail-if = (os == 'mac')
|
||||
[generated/test_conformance__extensions__ext-blend-minmax.html]
|
||||
[generated/test_conformance__extensions__ext-disjoint-timer-query.html]
|
||||
[generated/test_conformance__extensions__ext-frag-depth.html]
|
||||
|
@ -668,8 +668,6 @@ fail-if = (os == 'mac' && os_version == '10.8')
|
||||
|
||||
####################
|
||||
# failure on OSX
|
||||
[generated/test_conformance__extensions__angle-instanced-arrays.html]
|
||||
fail-if = (os == 'mac')
|
||||
[generated/test_2_conformance2__textures__misc__tex-unpack-params.html]
|
||||
skip-if = (os == 'mac' && debug)
|
||||
fail-if = (os == 'mac')
|
||||
|
@ -19,7 +19,7 @@ fail-if = (os == 'android')
|
||||
[ensure-exts/test_EXT_color_buffer_half_float.html]
|
||||
fail-if = (os == 'android')
|
||||
[ensure-exts/test_EXT_disjoint_timer_query.html]
|
||||
fail-if = (os == 'android') || (os == 'win' && os_version == '5.1')
|
||||
fail-if = 1
|
||||
[ensure-exts/test_EXT_frag_depth.html]
|
||||
fail-if = (os == 'android')
|
||||
[ensure-exts/test_EXT_sRGB.html]
|
||||
|
@ -1,51 +0,0 @@
|
||||
# This is the official list of The ANGLE Project Authors
|
||||
# for copyright purposes.
|
||||
# This file is distinct from the CONTRIBUTORS files.
|
||||
# See the latter for an explanation.
|
||||
|
||||
# Names should be added to this file as
|
||||
# Name or Organization
|
||||
# Email addresses for individuals are tracked elsewhere to avoid spam.
|
||||
|
||||
Google Inc.
|
||||
TransGaming Inc.
|
||||
3DLabs Inc. Ltd.
|
||||
|
||||
Adobe Systems Inc.
|
||||
Autodesk, Inc.
|
||||
BlackBerry Limited
|
||||
Cable Television Laboratories, Inc.
|
||||
Cloud Party, Inc.
|
||||
Imagination Technologies Ltd.
|
||||
Intel Corporation
|
||||
Mozilla Corporation
|
||||
Turbulenz
|
||||
Klarälvdalens Datakonsult AB
|
||||
Microsoft Corporation
|
||||
Microsoft Open Technologies, Inc.
|
||||
NVIDIA Corporation
|
||||
Opera Software ASA
|
||||
The Qt Company Ltd.
|
||||
Advanced Micro Devices, Inc.
|
||||
|
||||
Jacek Caban
|
||||
Mark Callow
|
||||
Ginn Chen
|
||||
Tibor den Ouden
|
||||
Régis Fénéon
|
||||
James Hauxwell
|
||||
Sam Hocevar
|
||||
Pierre Leveille
|
||||
Jonathan Liu
|
||||
Boying Lu
|
||||
Aitor Moreno
|
||||
Yuri O'Donnell
|
||||
Josh Soref
|
||||
Maks Naumov
|
||||
Jinyoung Hur
|
||||
Sebastian Bergstein
|
||||
James Ross-Gowan
|
||||
Nickolay Artamonov
|
||||
Ihsan Akmal
|
||||
Andrei Volykhin
|
||||
Jérôme Duval
|
@ -1,765 +0,0 @@
|
||||
# Copyright 2014-2015 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# import the use_x11 variable
|
||||
import("//build/config/dcheck_always_on.gni")
|
||||
import("//build/config/linux/pkg_config.gni")
|
||||
import("//build/config/ui.gni")
|
||||
import("//testing/libfuzzer/fuzzer_test.gni")
|
||||
import("//third_party/angle/gni/angle.gni")
|
||||
import("//ui/ozone/ozone.gni")
|
||||
|
||||
declare_args() {
|
||||
# Use the PCI lib to collect GPU information on Linux.
|
||||
use_libpci = is_linux && (!is_chromecast || is_cast_desktop_build) &&
|
||||
(use_x11 || use_ozone)
|
||||
}
|
||||
|
||||
if (ozone_platform_gbm) {
|
||||
pkg_config("libdrm") {
|
||||
packages = [ "libdrm" ]
|
||||
}
|
||||
}
|
||||
|
||||
angle_git_is_present = exec_script("src/commit_id.py",
|
||||
[
|
||||
"check",
|
||||
rebase_path(".", root_build_dir),
|
||||
],
|
||||
"value")
|
||||
|
||||
angle_use_commit_id = angle_git_is_present == 1
|
||||
|
||||
gles_gypi = exec_script("//build/gypi_to_gn.py",
|
||||
[ rebase_path("src/libGLESv2.gypi") ],
|
||||
"scope",
|
||||
[ "src/libGLESv2.gypi" ])
|
||||
|
||||
compiler_gypi = exec_script("//build/gypi_to_gn.py",
|
||||
[ rebase_path("src/compiler.gypi") ],
|
||||
"scope",
|
||||
[ "src/compiler.gypi" ])
|
||||
|
||||
# This config is exported to dependent targets (and also applied to internal
|
||||
# ones).
|
||||
config("external_config") {
|
||||
include_dirs = [ "include" ]
|
||||
}
|
||||
|
||||
# This config is applied to internal Angle targets (not pushed to dependents).
|
||||
config("internal_config") {
|
||||
include_dirs = [
|
||||
"include",
|
||||
"src",
|
||||
]
|
||||
|
||||
# Prevent the GL headers from redeclaring ANGLE entry points.
|
||||
defines = [
|
||||
"GL_GLEXT_PROTOTYPES",
|
||||
"EGL_EGLEXT_PROTOTYPES",
|
||||
]
|
||||
|
||||
if (target_cpu == "x86") {
|
||||
defines += [ "ANGLE_X86_CPU" ]
|
||||
}
|
||||
if (target_cpu == "x64") {
|
||||
defines += [ "ANGLE_X64_CPU" ]
|
||||
}
|
||||
}
|
||||
|
||||
config("extra_warnings") {
|
||||
# Enable more default warnings on Windows.
|
||||
if (is_win) {
|
||||
cflags = [
|
||||
"/we4244", # Conversion: possible loss of data.
|
||||
"/we4456", # Variable shadowing.
|
||||
"/we4458", # declaration hides class member.
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
copy("copy_compiler_dll") {
|
||||
sources = [
|
||||
"$windows_sdk_path/Redist/D3D/$target_cpu/d3dcompiler_47.dll",
|
||||
]
|
||||
outputs = [
|
||||
"$root_out_dir/d3dcompiler_47.dll",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
angle_undefine_configs = [ "//build/config/compiler:default_include_dirs" ]
|
||||
|
||||
# Holds the shared includes so we only need to list them once.
|
||||
source_set("includes") {
|
||||
sources = [
|
||||
"include/EGL/egl.h",
|
||||
"include/EGL/eglext.h",
|
||||
"include/EGL/eglplatform.h",
|
||||
"include/GLES2/gl2.h",
|
||||
"include/GLES2/gl2ext.h",
|
||||
"include/GLES2/gl2platform.h",
|
||||
"include/GLES3/gl3.h",
|
||||
"include/GLES3/gl31.h",
|
||||
"include/GLES3/gl32.h",
|
||||
"include/GLES3/gl3platform.h",
|
||||
"include/GLSLANG/ShaderLang.h",
|
||||
"include/KHR/khrplatform.h",
|
||||
]
|
||||
}
|
||||
|
||||
static_library("preprocessor") {
|
||||
sources = rebase_path(compiler_gypi.angle_preprocessor_sources, ".", "src")
|
||||
|
||||
configs -= angle_undefine_configs
|
||||
configs += [ ":internal_config" ]
|
||||
|
||||
public_deps = [
|
||||
":angle_common",
|
||||
]
|
||||
}
|
||||
|
||||
config("translator_disable_pool_alloc") {
|
||||
defines = [ "ANGLE_TRANSLATOR_DISABLE_POOL_ALLOC" ]
|
||||
}
|
||||
|
||||
config("debug_annotations_config") {
|
||||
if (is_debug) {
|
||||
defines = [ "ANGLE_ENABLE_DEBUG_ANNOTATIONS" ]
|
||||
}
|
||||
}
|
||||
|
||||
config("angle_release_asserts_config") {
|
||||
if (dcheck_always_on) {
|
||||
defines = [ "ANGLE_ENABLE_RELEASE_ASSERTS" ]
|
||||
}
|
||||
}
|
||||
|
||||
config("angle_common_config") {
|
||||
include_dirs = [ "src/common/third_party/base" ]
|
||||
}
|
||||
|
||||
static_library("angle_common") {
|
||||
sources = rebase_path(gles_gypi.libangle_common_sources, ".", "src")
|
||||
|
||||
if (is_linux || is_android) {
|
||||
sources += rebase_path(gles_gypi.libangle_common_linux_sources, ".", "src")
|
||||
}
|
||||
|
||||
if (is_mac) {
|
||||
sources += rebase_path(gles_gypi.libangle_common_mac_sources, ".", "src")
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
sources += rebase_path(gles_gypi.libangle_common_win_sources, ".", "src")
|
||||
}
|
||||
|
||||
configs -= angle_undefine_configs
|
||||
configs += [
|
||||
":angle_common_config",
|
||||
":debug_annotations_config",
|
||||
":extra_warnings",
|
||||
":internal_config",
|
||||
]
|
||||
|
||||
public_deps = [
|
||||
":commit_id",
|
||||
]
|
||||
public_configs = [ ":angle_common_config" ]
|
||||
all_dependent_configs = [ ":angle_release_asserts_config" ]
|
||||
}
|
||||
|
||||
config("angle_image_util_config") {
|
||||
include_dirs = [
|
||||
"include",
|
||||
"src",
|
||||
]
|
||||
}
|
||||
|
||||
static_library("angle_image_util") {
|
||||
sources = rebase_path(gles_gypi.libangle_image_util_sources, ".", "src")
|
||||
|
||||
configs -= angle_undefine_configs
|
||||
configs += [
|
||||
":internal_config",
|
||||
":extra_warnings",
|
||||
]
|
||||
|
||||
public_configs = [ ":angle_image_util_config" ]
|
||||
|
||||
public_deps = [
|
||||
":angle_common",
|
||||
]
|
||||
}
|
||||
|
||||
config("angle_gpu_info_util_config") {
|
||||
include_dirs = [
|
||||
"include",
|
||||
"src",
|
||||
]
|
||||
}
|
||||
|
||||
static_library("angle_gpu_info_util") {
|
||||
configs -= angle_undefine_configs
|
||||
configs += [
|
||||
":internal_config",
|
||||
":extra_warnings",
|
||||
]
|
||||
|
||||
public_configs = [ ":angle_gpu_info_util_config" ]
|
||||
|
||||
public_deps = [
|
||||
":angle_common",
|
||||
]
|
||||
|
||||
sources = rebase_path(gles_gypi.libangle_gpu_info_util_sources, ".", "src")
|
||||
deps = []
|
||||
libs = []
|
||||
defines = []
|
||||
|
||||
if (is_win) {
|
||||
sources +=
|
||||
rebase_path(gles_gypi.libangle_gpu_info_util_win_sources, ".", "src")
|
||||
libs += [ "setupapi.lib" ]
|
||||
defines += [ "GPU_INFO_USE_SETUPAPI" ]
|
||||
}
|
||||
|
||||
if (is_linux) {
|
||||
sources +=
|
||||
rebase_path(gles_gypi.libangle_gpu_info_util_linux_sources, ".", "src")
|
||||
|
||||
if (use_x11) {
|
||||
sources +=
|
||||
rebase_path(gles_gypi.libangle_gpu_info_util_x11_sources, ".", "src")
|
||||
deps += [ "src/third_party/libXNVCtrl:libXNVCtrl" ]
|
||||
defines += [ "GPU_INFO_USE_X11" ]
|
||||
libs += [
|
||||
"X11",
|
||||
"Xi",
|
||||
"Xext",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
if (use_libpci) {
|
||||
sources +=
|
||||
rebase_path(gles_gypi.libangle_gpu_info_util_libpci_sources, ".", "src")
|
||||
defines += [ "GPU_INFO_USE_LIBPCI" ]
|
||||
libs += [ "pci" ]
|
||||
}
|
||||
|
||||
if (is_mac) {
|
||||
sources +=
|
||||
rebase_path(gles_gypi.libangle_gpu_info_util_mac_sources, ".", "src")
|
||||
libs += [
|
||||
"IOKit.framework",
|
||||
"CoreFoundation.framework",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
static_library("translator") {
|
||||
sources = rebase_path(compiler_gypi.angle_translator_sources, ".", "src")
|
||||
defines = []
|
||||
|
||||
if (angle_enable_essl || use_libfuzzer) {
|
||||
sources +=
|
||||
rebase_path(compiler_gypi.angle_translator_essl_sources, ".", "src")
|
||||
defines += [ "ANGLE_ENABLE_ESSL" ]
|
||||
}
|
||||
|
||||
if (angle_enable_glsl || use_libfuzzer) {
|
||||
sources +=
|
||||
rebase_path(compiler_gypi.angle_translator_glsl_sources, ".", "src")
|
||||
defines += [ "ANGLE_ENABLE_GLSL" ]
|
||||
}
|
||||
|
||||
if (angle_enable_hlsl || use_libfuzzer) {
|
||||
sources +=
|
||||
rebase_path(compiler_gypi.angle_translator_hlsl_sources, ".", "src")
|
||||
defines += [ "ANGLE_ENABLE_HLSL" ]
|
||||
}
|
||||
|
||||
if (angle_enable_vulkan || use_libfuzzer) {
|
||||
sources += rebase_path(compiler_gypi.angle_translator_lib_vulkan_sources,
|
||||
".",
|
||||
"src")
|
||||
defines += [ "ANGLE_ENABLE_VULKAN" ]
|
||||
}
|
||||
|
||||
configs -= angle_undefine_configs
|
||||
configs += [ ":internal_config" ]
|
||||
public_configs = [ ":external_config" ]
|
||||
if (use_libfuzzer) {
|
||||
all_dependent_configs = [ ":translator_disable_pool_alloc" ]
|
||||
}
|
||||
|
||||
deps = [
|
||||
":includes",
|
||||
":preprocessor",
|
||||
]
|
||||
|
||||
public_deps = [
|
||||
":angle_common",
|
||||
]
|
||||
|
||||
if (is_win) {
|
||||
# Necessary to suppress some system header xtree warnigns in Release.
|
||||
# For some reason this warning doesn't get triggered in Chromium
|
||||
cflags = [ "/wd4718" ]
|
||||
}
|
||||
}
|
||||
|
||||
source_set("translator_fuzzer") {
|
||||
sources = [
|
||||
"src/compiler/fuzz/translator_fuzzer.cpp",
|
||||
]
|
||||
|
||||
include_dirs = [
|
||||
"include",
|
||||
"src",
|
||||
]
|
||||
|
||||
deps = [
|
||||
":translator",
|
||||
]
|
||||
}
|
||||
|
||||
config("commit_id_config") {
|
||||
include_dirs = [ "$root_gen_dir/angle" ]
|
||||
}
|
||||
|
||||
commit_id_output_file = "$root_gen_dir/angle/id/commit.h"
|
||||
if (angle_use_commit_id) {
|
||||
action("commit_id") {
|
||||
script = "src/commit_id.py"
|
||||
outputs = [
|
||||
commit_id_output_file,
|
||||
]
|
||||
|
||||
args = [
|
||||
"gen",
|
||||
rebase_path(".", root_build_dir),
|
||||
rebase_path(commit_id_output_file, root_build_dir),
|
||||
]
|
||||
|
||||
public_configs = [ ":commit_id_config" ]
|
||||
}
|
||||
} else {
|
||||
copy("commit_id") {
|
||||
sources = [
|
||||
"src/commit.h",
|
||||
]
|
||||
outputs = [
|
||||
commit_id_output_file,
|
||||
]
|
||||
public_configs = [ ":commit_id_config" ]
|
||||
}
|
||||
}
|
||||
|
||||
config("libANGLE_config") {
|
||||
cflags = []
|
||||
defines = []
|
||||
if (angle_enable_d3d9) {
|
||||
defines += [ "ANGLE_ENABLE_D3D9" ]
|
||||
}
|
||||
if (angle_enable_d3d11) {
|
||||
defines += [ "ANGLE_ENABLE_D3D11" ]
|
||||
}
|
||||
if (angle_enable_gl) {
|
||||
defines += [ "ANGLE_ENABLE_OPENGL" ]
|
||||
if (use_x11) {
|
||||
defines += [ "ANGLE_USE_X11" ]
|
||||
}
|
||||
}
|
||||
if (angle_enable_vulkan) {
|
||||
defines += [ "ANGLE_ENABLE_VULKAN" ]
|
||||
}
|
||||
if (angle_enable_null) {
|
||||
defines += [ "ANGLE_ENABLE_NULL" ]
|
||||
}
|
||||
defines += [ "LIBANGLE_IMPLEMENTATION" ]
|
||||
|
||||
if (is_win) {
|
||||
cflags += [ "/wd4530" ] # C++ exception handler used, but unwind semantics are not enabled.
|
||||
}
|
||||
}
|
||||
|
||||
static_library("libANGLE") {
|
||||
sources = rebase_path(gles_gypi.libangle_sources, ".", "src")
|
||||
|
||||
include_dirs = []
|
||||
libs = []
|
||||
defines = []
|
||||
public_deps = [
|
||||
":angle_common",
|
||||
]
|
||||
deps = [
|
||||
":angle_gpu_info_util",
|
||||
":angle_image_util",
|
||||
":commit_id",
|
||||
":includes",
|
||||
":translator",
|
||||
]
|
||||
|
||||
# Shared D3D sources.
|
||||
if (angle_enable_d3d9 || angle_enable_d3d11) {
|
||||
sources += rebase_path(gles_gypi.libangle_d3d_shared_sources, ".", "src")
|
||||
|
||||
defines += [ "ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ " + "\"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" ]
|
||||
}
|
||||
|
||||
if (angle_enable_d3d9) {
|
||||
sources += rebase_path(gles_gypi.libangle_d3d9_sources, ".", "src")
|
||||
libs += [ "d3d9.lib" ]
|
||||
}
|
||||
|
||||
if (angle_enable_d3d11) {
|
||||
sources += rebase_path(gles_gypi.libangle_d3d11_sources, ".", "src")
|
||||
sources += rebase_path(gles_gypi.libangle_d3d11_win32_sources, ".", "src")
|
||||
libs += [ "dxguid.lib" ]
|
||||
}
|
||||
|
||||
if (angle_enable_gl) {
|
||||
sources += rebase_path(gles_gypi.libangle_gl_sources, ".", "src")
|
||||
include_dirs += [ "src/third_party/khronos" ]
|
||||
|
||||
if (is_win) {
|
||||
sources += rebase_path(gles_gypi.libangle_gl_wgl_sources, ".", "src")
|
||||
}
|
||||
if (use_x11) {
|
||||
sources += rebase_path(gles_gypi.libangle_gl_glx_sources, ".", "src")
|
||||
deps += [ "src/third_party/libXNVCtrl:libXNVCtrl" ]
|
||||
libs += [
|
||||
"X11",
|
||||
"Xi",
|
||||
"Xext",
|
||||
]
|
||||
}
|
||||
if (is_mac) {
|
||||
sources += rebase_path(gles_gypi.libangle_gl_cgl_sources, ".", "src")
|
||||
libs += [
|
||||
"Cocoa.framework",
|
||||
"IOSurface.framework",
|
||||
"OpenGL.framework",
|
||||
"QuartzCore.framework",
|
||||
]
|
||||
}
|
||||
if (is_android) {
|
||||
sources += rebase_path(gles_gypi.libangle_gl_egl_sources, ".", "src")
|
||||
sources += rebase_path(gles_gypi.libangle_gl_egl_dl_sources, ".", "src")
|
||||
sources +=
|
||||
rebase_path(gles_gypi.libangle_gl_egl_android_sources, ".", "src")
|
||||
libs += [
|
||||
"android",
|
||||
"log",
|
||||
]
|
||||
}
|
||||
if (ozone_platform_gbm) {
|
||||
configs += [ ":libdrm" ]
|
||||
defines += [ "ANGLE_USE_OZONE" ]
|
||||
deps += [ "//third_party/minigbm" ]
|
||||
sources += rebase_path(gles_gypi.libangle_gl_egl_sources, ".", "src")
|
||||
sources += rebase_path(gles_gypi.libangle_gl_egl_dl_sources, ".", "src")
|
||||
sources += rebase_path(gles_gypi.libangle_gl_ozone_sources, ".", "src")
|
||||
}
|
||||
}
|
||||
|
||||
if (angle_enable_vulkan) {
|
||||
sources += rebase_path(gles_gypi.libangle_vulkan_sources, ".", "src")
|
||||
if (is_win) {
|
||||
sources +=
|
||||
rebase_path(gles_gypi.libangle_vulkan_win32_sources, ".", "src")
|
||||
}
|
||||
if (is_linux) {
|
||||
sources += rebase_path(gles_gypi.libangle_vulkan_xcb_sources, ".", "src")
|
||||
}
|
||||
deps += [ "//third_party/angle/src/vulkan_support:angle_vulkan" ]
|
||||
}
|
||||
|
||||
if (angle_enable_null) {
|
||||
sources += rebase_path(gles_gypi.libangle_null_sources, ".", "src")
|
||||
}
|
||||
|
||||
if (is_debug) {
|
||||
defines += [ "ANGLE_GENERATE_SHADER_DEBUG_INFO" ]
|
||||
}
|
||||
|
||||
configs -= angle_undefine_configs
|
||||
|
||||
configs += [
|
||||
":commit_id_config",
|
||||
":debug_annotations_config",
|
||||
":extra_warnings",
|
||||
":internal_config",
|
||||
]
|
||||
|
||||
public_configs = [ ":libANGLE_config" ]
|
||||
|
||||
if (is_win) {
|
||||
data_deps = [
|
||||
":copy_compiler_dll",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
config("shared_library_public_config") {
|
||||
if (is_mac && !is_component_build) {
|
||||
# Executable targets that depend on the shared libraries below need to have
|
||||
# the rpath setup in non-component build configurations.
|
||||
ldflags = [
|
||||
"-rpath",
|
||||
"@executable_path/",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
# This config controls export definitions on ANGLE API calls.
|
||||
config("angle_static") {
|
||||
defines = [
|
||||
"ANGLE_EXPORT=",
|
||||
"EGLAPI=",
|
||||
"GL_APICALL=",
|
||||
]
|
||||
}
|
||||
|
||||
shared_library("libGLESv2") {
|
||||
sources = rebase_path(gles_gypi.libglesv2_sources, ".", "src")
|
||||
|
||||
if (is_android) {
|
||||
configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
ldflags =
|
||||
[ "/DEF:" + rebase_path("src/libGLESv2/libGLESv2.def", root_build_dir) ]
|
||||
}
|
||||
|
||||
if (is_mac && !is_component_build) {
|
||||
ldflags = [
|
||||
"-install_name",
|
||||
"@rpath/${target_name}.dylib",
|
||||
]
|
||||
public_configs = [ ":shared_library_public_config" ]
|
||||
}
|
||||
|
||||
configs -= angle_undefine_configs
|
||||
configs += [
|
||||
":commit_id_config",
|
||||
":debug_annotations_config",
|
||||
":internal_config",
|
||||
]
|
||||
|
||||
defines = [ "LIBGLESV2_IMPLEMENTATION" ]
|
||||
if (is_win) {
|
||||
defines += [ "GL_APICALL=" ]
|
||||
} else {
|
||||
defines += [ "GL_APICALL=__attribute__((visibility(\"default\")))" ]
|
||||
}
|
||||
|
||||
deps = [
|
||||
":includes",
|
||||
":libANGLE",
|
||||
"//build/config:exe_and_shlib_deps",
|
||||
]
|
||||
}
|
||||
|
||||
static_library("libGLESv2_static") {
|
||||
sources = rebase_path(gles_gypi.libglesv2_sources, ".", "src")
|
||||
|
||||
configs -= angle_undefine_configs
|
||||
configs += [
|
||||
":commit_id_config",
|
||||
":debug_annotations_config",
|
||||
":internal_config",
|
||||
]
|
||||
|
||||
public_configs = [ ":angle_static" ]
|
||||
|
||||
deps = [
|
||||
":includes",
|
||||
":libANGLE",
|
||||
]
|
||||
}
|
||||
|
||||
shared_library("libEGL") {
|
||||
sources = rebase_path(gles_gypi.libegl_sources, ".", "src")
|
||||
|
||||
if (is_android) {
|
||||
configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
|
||||
}
|
||||
configs -= angle_undefine_configs
|
||||
configs += [
|
||||
":commit_id_config",
|
||||
":debug_annotations_config",
|
||||
":extra_warnings",
|
||||
":internal_config",
|
||||
]
|
||||
|
||||
defines = [ "LIBEGL_IMPLEMENTATION" ]
|
||||
if (is_win) {
|
||||
defines += [ "EGLAPI=" ]
|
||||
} else {
|
||||
defines += [ "EGLAPI=__attribute__((visibility(\"default\")))" ]
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
ldflags = [ "/DEF:" + rebase_path("src/libEGL/libEGL.def", root_build_dir) ]
|
||||
}
|
||||
|
||||
if (is_mac && !is_component_build) {
|
||||
ldflags = [
|
||||
"-install_name",
|
||||
"@rpath/${target_name}.dylib",
|
||||
]
|
||||
public_configs = [ ":shared_library_public_config" ]
|
||||
}
|
||||
|
||||
deps = [
|
||||
":includes",
|
||||
":libGLESv2",
|
||||
"//build/config:exe_and_shlib_deps",
|
||||
]
|
||||
}
|
||||
|
||||
static_library("libEGL_static") {
|
||||
sources = rebase_path(gles_gypi.libegl_sources, ".", "src")
|
||||
|
||||
configs -= angle_undefine_configs
|
||||
configs += [
|
||||
":commit_id_config",
|
||||
":debug_annotations_config",
|
||||
":extra_warnings",
|
||||
":internal_config",
|
||||
]
|
||||
|
||||
public_configs = [ ":angle_static" ]
|
||||
|
||||
deps = [
|
||||
":includes",
|
||||
":libGLESv2_static",
|
||||
]
|
||||
}
|
||||
|
||||
util_gypi = exec_script("//build/gypi_to_gn.py",
|
||||
[ rebase_path("util/util.gyp") ],
|
||||
"scope",
|
||||
[ "util/util.gyp" ])
|
||||
|
||||
config("angle_util_config") {
|
||||
include_dirs = [ "util" ]
|
||||
if (is_linux && use_x11) {
|
||||
libs = [ "X11" ]
|
||||
}
|
||||
}
|
||||
|
||||
foreach(is_shared_library,
|
||||
[
|
||||
true,
|
||||
false,
|
||||
]) {
|
||||
if (is_shared_library) {
|
||||
library_type = "shared_library"
|
||||
library_name = "angle_util"
|
||||
dep_suffix = ""
|
||||
} else {
|
||||
library_type = "static_library"
|
||||
library_name = "angle_util_static"
|
||||
dep_suffix = "_static"
|
||||
}
|
||||
|
||||
target(library_type, library_name) {
|
||||
sources = rebase_path(util_gypi.util_sources, ".", "util")
|
||||
|
||||
if (is_win) {
|
||||
sources += rebase_path(util_gypi.util_win32_sources, ".", "util")
|
||||
}
|
||||
|
||||
if (is_linux) {
|
||||
sources += rebase_path(util_gypi.util_linux_sources, ".", "util")
|
||||
libs = [
|
||||
"rt",
|
||||
"dl",
|
||||
]
|
||||
}
|
||||
|
||||
if (is_mac) {
|
||||
sources += rebase_path(util_gypi.util_osx_sources, ".", "util")
|
||||
libs = [
|
||||
"AppKit.framework",
|
||||
"QuartzCore.framework",
|
||||
]
|
||||
}
|
||||
|
||||
if (use_x11) {
|
||||
sources += rebase_path(util_gypi.util_x11_sources, ".", "util")
|
||||
}
|
||||
|
||||
if (is_android) {
|
||||
if (is_shared_library) {
|
||||
configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
|
||||
}
|
||||
|
||||
# To prevent linux sources filtering on android
|
||||
set_sources_assignment_filter([])
|
||||
sources += rebase_path(util_gypi.util_linux_sources, ".", "util")
|
||||
sources += rebase_path(util_gypi.util_android_sources, ".", "util")
|
||||
libs = [
|
||||
"android",
|
||||
"log",
|
||||
]
|
||||
}
|
||||
|
||||
if (use_ozone) {
|
||||
sources += rebase_path(util_gypi.util_ozone_sources, ".", "util")
|
||||
}
|
||||
|
||||
configs += [
|
||||
":debug_annotations_config",
|
||||
":extra_warnings",
|
||||
]
|
||||
|
||||
public_configs = [
|
||||
":angle_util_config",
|
||||
":internal_config",
|
||||
]
|
||||
|
||||
deps = [
|
||||
":angle_common",
|
||||
":libEGL${dep_suffix}",
|
||||
":libGLESv2${dep_suffix}",
|
||||
]
|
||||
|
||||
if (is_shared_library) {
|
||||
defines = [ "LIBANGLE_UTIL_IMPLEMENTATION" ]
|
||||
|
||||
deps += [ "//build/config:exe_and_shlib_deps" ]
|
||||
|
||||
if (is_mac && !is_component_build) {
|
||||
ldflags = [
|
||||
"-install_name",
|
||||
"@rpath/lib${target_name}.dylib",
|
||||
]
|
||||
public_configs += [ ":shared_library_public_config" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Convenience targets for some of the samples so they can be built
|
||||
# with Chromium's toolchain.
|
||||
|
||||
executable("angle_shader_translator") {
|
||||
testonly = true
|
||||
|
||||
sources = [
|
||||
"samples/shader_translator/shader_translator.cpp",
|
||||
]
|
||||
|
||||
deps = [
|
||||
":translator",
|
||||
"//build/config:exe_and_shlib_deps",
|
||||
]
|
||||
}
|
@ -1,126 +0,0 @@
|
||||
# This is the official list of people who can contribute
|
||||
# (and who have contributed) code to the ANGLE project
|
||||
# repository.
|
||||
# The AUTHORS file lists the copyright holders; this file
|
||||
# lists people. For example, Google employees are listed here
|
||||
# but not in AUTHORS, because Google holds the copyright.
|
||||
#
|
||||
|
||||
TransGaming Inc.
|
||||
Nicolas Capens
|
||||
Daniel Koch
|
||||
Geoff Lang
|
||||
Andrew Lewycky
|
||||
Jamie Madill
|
||||
Gavriel State
|
||||
Shannon Woods
|
||||
|
||||
Google Inc.
|
||||
Brent Austin
|
||||
Michael Bai
|
||||
John Bauman
|
||||
Peter Beverloo
|
||||
Steve Block
|
||||
Rachel Blum
|
||||
Eric Boren
|
||||
Henry Bridge
|
||||
Nat Duca
|
||||
Peter Kasting
|
||||
Vangelis Kokkevis
|
||||
Zhenyao Mo
|
||||
Daniel Nicoara
|
||||
Alastair Patrick
|
||||
Alok Priyadarshi
|
||||
Kenneth Russell
|
||||
Brian Salomon
|
||||
Gregg Tavares
|
||||
Jeff Timanus
|
||||
Ben Vanik
|
||||
Adrienne Walker
|
||||
thestig@chromium.org
|
||||
Justin Schuh
|
||||
Scott Graham
|
||||
Corentin Wallez
|
||||
|
||||
Adobe Systems Inc.
|
||||
Alexandru Chiculita
|
||||
Steve Minns
|
||||
Max Vujovic
|
||||
|
||||
Autodesk, Inc.
|
||||
Ranger Harke
|
||||
|
||||
Cloud Party, Inc.
|
||||
Conor Dickinson
|
||||
|
||||
The Qt Company Ltd.
|
||||
Andrew Knight
|
||||
|
||||
Imagination Technologies Ltd.
|
||||
Gregoire Payen de La Garanderie
|
||||
|
||||
Intel Corporation
|
||||
Jin Yang
|
||||
Andy Chen
|
||||
Josh Triplett
|
||||
Sudarsana Nagineni
|
||||
Jiajia Qin
|
||||
Jiawei Shao
|
||||
Jie Chen
|
||||
Qiankun Miao
|
||||
Bryan Bernhart
|
||||
Yunchao He
|
||||
Xinghua Cao
|
||||
Brandon Jones
|
||||
|
||||
Klarälvdalens Datakonsult AB
|
||||
Milian Wolff
|
||||
|
||||
Mozilla Corp.
|
||||
Ehsan Akhgari
|
||||
Edwin Flores
|
||||
Jeff Gilbert
|
||||
Mike Hommey
|
||||
Benoit Jacob
|
||||
Makoto Kato
|
||||
Vladimir Vukicevic
|
||||
|
||||
Turbulenz
|
||||
Michael Braithwaite
|
||||
|
||||
Ulrik Persson (ddefrostt)
|
||||
Mark Banner (standard8mbp)
|
||||
David Kilzer
|
||||
Jacek Caban
|
||||
Tibor den Ouden
|
||||
Régis Fénéon
|
||||
Sebastian Bergstein
|
||||
James Ross-Gowan
|
||||
Andrei Volykhin
|
||||
Jérôme Duval
|
||||
|
||||
Microsoft Corporation
|
||||
Cooper Partin
|
||||
Austin Kinross
|
||||
Minmin Gong
|
||||
Shawn Hargreaves
|
||||
|
||||
Microsoft Open Technologies, Inc.
|
||||
Cooper Partin
|
||||
Austin Kinross
|
||||
|
||||
NVIDIA Corporation
|
||||
Olli Etuaho
|
||||
Arun Patole
|
||||
Qingqing Deng
|
||||
Kimmo Kinnunen
|
||||
Sami Väisänen
|
||||
Martin Radev
|
||||
|
||||
Opera Software ASA
|
||||
Daniel Bratell
|
||||
Tomasz Moniuszko
|
||||
David Landell
|
||||
|
||||
Advanced Micro Devices, Inc.
|
||||
Russ Lind
|
125
gfx/angle/DEPS
125
gfx/angle/DEPS
@ -1,125 +0,0 @@
|
||||
vars = {
|
||||
'android_git': 'https://android.googlesource.com',
|
||||
'chromium_git': 'https://chromium.googlesource.com',
|
||||
}
|
||||
|
||||
deps = {
|
||||
|
||||
'buildtools':
|
||||
Var('chromium_git') + '/chromium/buildtools.git' + '@' + '98f00fa10dbad2cdbb2e297a66c3d6d5bc3994f3',
|
||||
|
||||
'testing/gmock':
|
||||
Var('chromium_git') + '/external/googlemock.git' + '@' + '0421b6f358139f02e102c9c332ce19a33faf75be', # from svn revision 566
|
||||
|
||||
'testing/gtest':
|
||||
Var('chromium_git') + '/external/github.com/google/googletest.git' + '@' + '6f8a66431cb592dad629028a50b3dd418a408c87',
|
||||
|
||||
# Cherry is a dEQP management GUI written in Go. We use it for viewing test results.
|
||||
'third_party/cherry':
|
||||
Var('android_git') + '/platform/external/cherry' + '@' + 'd2e26b4d864ec2a6757e7f1174e464949ca5bf73',
|
||||
|
||||
'third_party/deqp/src':
|
||||
Var('android_git') + '/platform/external/deqp' + '@' + '455d82c60b096e7bd83b6a2f5ed70c61e4bfa759',
|
||||
|
||||
'third_party/glslang-angle/src':
|
||||
Var('android_git') + '/platform/external/shaderc/glslang' + '@' + '1e275c8486325aaab34734ad9a650c0121c5efdb',
|
||||
|
||||
'third_party/gyp':
|
||||
Var('chromium_git') + '/external/gyp' + '@' + 'c6f471687407bf28ddfc63f1a8f47aeb7bf54edc',
|
||||
|
||||
'third_party/libpng':
|
||||
Var('android_git') + '/platform/external/libpng' + '@' + '094e181e79a3d6c23fd005679025058b7df1ad6c',
|
||||
|
||||
'third_party/spirv-headers/src':
|
||||
Var('android_git') + '/platform/external/shaderc/spirv-headers' + '@' + 'c470b68225a04965bf87d35e143ae92f831e8110',
|
||||
|
||||
'third_party/spirv-tools-angle/src':
|
||||
Var('android_git') + '/platform/external/shaderc/spirv-tools' + '@' + '68c5f0436f1d4f1f137e608780190865d0b193ca',
|
||||
|
||||
'third_party/vulkan-validation-layers/src':
|
||||
Var('android_git') + '/platform/external/vulkan-validation-layers' + '@' + 'f47c534fee2f26f6b783209d56e0ade48e30eb8d',
|
||||
|
||||
'third_party/zlib':
|
||||
Var('chromium_git') + '/chromium/src/third_party/zlib' + '@' + '24ab14872e8e068ba08cc31cc3d43bcc6d5cb832',
|
||||
}
|
||||
|
||||
hooks = [
|
||||
# Pull clang-format binaries using checked-in hashes.
|
||||
{
|
||||
'name': 'clang_format_win',
|
||||
'pattern': '.',
|
||||
'action': [ 'download_from_google_storage',
|
||||
'--no_resume',
|
||||
'--platform=win32',
|
||||
'--no_auth',
|
||||
'--bucket', 'chromium-clang-format',
|
||||
'-s', 'buildtools/win/clang-format.exe.sha1',
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'clang_format_mac',
|
||||
'pattern': '.',
|
||||
'action': [ 'download_from_google_storage',
|
||||
'--no_resume',
|
||||
'--platform=darwin',
|
||||
'--no_auth',
|
||||
'--bucket', 'chromium-clang-format',
|
||||
'-s', 'buildtools/mac/clang-format.sha1',
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'clang_format_linux',
|
||||
'pattern': '.',
|
||||
'action': [ 'download_from_google_storage',
|
||||
'--no_resume',
|
||||
'--platform=linux*',
|
||||
'--no_auth',
|
||||
'--bucket', 'chromium-clang-format',
|
||||
'-s', 'buildtools/linux64/clang-format.sha1',
|
||||
],
|
||||
},
|
||||
# Pull GN binaries using checked-in hashes.
|
||||
{
|
||||
'name': 'gn_win',
|
||||
'pattern': '.',
|
||||
'action': [ 'download_from_google_storage',
|
||||
'--no_resume',
|
||||
'--platform=win32',
|
||||
'--no_auth',
|
||||
'--bucket', 'chromium-gn',
|
||||
'-s', 'buildtools/win/gn.exe.sha1',
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'gn_mac',
|
||||
'pattern': '.',
|
||||
'action': [ 'download_from_google_storage',
|
||||
'--no_resume',
|
||||
'--platform=darwin',
|
||||
'--no_auth',
|
||||
'--bucket', 'chromium-gn',
|
||||
'-s', 'buildtools/mac/gn.sha1',
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'gn_linux64',
|
||||
'pattern': '.',
|
||||
'action': [ 'download_from_google_storage',
|
||||
'--no_resume',
|
||||
'--platform=linux*',
|
||||
'--no_auth',
|
||||
'--bucket', 'chromium-gn',
|
||||
'-s', 'buildtools/linux64/gn.sha1',
|
||||
],
|
||||
},
|
||||
{
|
||||
# A change to a .gyp, .gypi, or to GYP itself should run the generator.
|
||||
'pattern': '.',
|
||||
'action': ['python', 'gyp/gyp_angle'],
|
||||
},
|
||||
]
|
||||
|
||||
recursedeps = [
|
||||
# buildtools provides clang_format.
|
||||
'buildtools',
|
||||
]
|
@ -1,46 +0,0 @@
|
||||
# This file is used to manage the ANGLE's dependencies in the Chromium src repo. It is
|
||||
# used by gclient to determine what version of each dependency to check out, and
|
||||
# where.
|
||||
#
|
||||
# These deps are duplicated in ANGLE's DEPS file which we use for the standalone
|
||||
# build. The dual file setup is necessary because Chromium can only recurse into
|
||||
# a single file and we do not want to import all of ANGLE's standalone DEPS.
|
||||
#
|
||||
# If you make a change to one of these dependencies please also update the
|
||||
# standalone DEPS file.
|
||||
|
||||
vars = {
|
||||
'android_git': 'https://android.googlesource.com',
|
||||
|
||||
# Current revision of dEQP.
|
||||
'deqp_revision': '455d82c60b096e7bd83b6a2f5ed70c61e4bfa759',
|
||||
|
||||
# Current revision of glslang, the Khronos SPIRV compiler.
|
||||
'glslang_revision': '1e275c8486325aaab34734ad9a650c0121c5efdb',
|
||||
|
||||
# Current revision fo the SPIRV-Headers Vulkan support library.
|
||||
'spirv_headers_revision': 'c470b68225a04965bf87d35e143ae92f831e8110',
|
||||
|
||||
# Current revision of SPIRV-Tools for Vulkan.
|
||||
'spirv_tools_revision': '68c5f0436f1d4f1f137e608780190865d0b193ca',
|
||||
|
||||
# Current revision of the Vulkan Validation Layers SDK.
|
||||
'vulkan_revision': 'f47c534fee2f26f6b783209d56e0ade48e30eb8d',
|
||||
}
|
||||
|
||||
deps = {
|
||||
'src/third_party/deqp/src':
|
||||
Var('android_git') + '/platform/external/deqp@' + Var('deqp_revision'),
|
||||
|
||||
'src/third_party/glslang-angle/src':
|
||||
Var('android_git') + '/platform/external/shaderc/glslang@' + Var('glslang_revision'),
|
||||
|
||||
'src/third_party/spirv-headers/src':
|
||||
Var('android_git') + '/platform/external/shaderc/spirv-headers@' + Var('spirv_headers_revision'),
|
||||
|
||||
'src/third_party/spirv-tools-angle/src':
|
||||
Var('android_git') + '/platform/external/shaderc/spirv-tools@' + Var('spirv_tools_revision'),
|
||||
|
||||
'src/third_party/vulkan-validation-layers/src':
|
||||
Var('android_git') + '/platform/external/vulkan-validation-layers@' + Var('vulkan_revision'),
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
// Copyright (C) 2002-2013 The ANGLE Project Authors.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following
|
||||
// disclaimer in the documentation and/or other materials provided
|
||||
// with the distribution.
|
||||
//
|
||||
// Neither the name of TransGaming Inc., Google Inc., 3DLabs Inc.
|
||||
// Ltd., nor the names of their contributors may be used to endorse
|
||||
// or promote products derived from this software without specific
|
||||
// prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
@ -1,10 +0,0 @@
|
||||
Name: ANGLE
|
||||
URL: https://code.google.com/p/angleproject/
|
||||
Version: 2422
|
||||
License: BSD
|
||||
License File: LICENSE
|
||||
|
||||
Description:
|
||||
ANGLE is a conformant implementation of the OpenGL ES 2.0
|
||||
specification that is hardware‐accelerated via Direct3D.
|
||||
|
@ -1,75 +0,0 @@
|
||||
# ANGLE - Almost Native Graphics Layer Engine
|
||||
|
||||
The goal of ANGLE is to allow users of multiple operating systems to seamlessly run WebGL and other
|
||||
OpenGL ES content by translating OpenGL ES API calls to one of the hardware-supported APIs available
|
||||
for that platform. ANGLE currently provides translation from OpenGL ES 2.0 and 3.0 to desktop
|
||||
OpenGL, OpenGL ES, Direct3D 9, and Direct3D 11. Support for translation from OpenGL ES to Vulkan is
|
||||
underway, and future plans include compute shader support (ES 3.1) and MacOS support.
|
||||
|
||||
### Level of OpenGL ES support via backing renderers
|
||||
|
||||
| | Direct3D 9 | Direct3D 11 | Desktop GL | GL ES | Vulkan |
|
||||
|----------------|:-------------:|:----------------:|:--------------:|:-------------:|:-------------:|
|
||||
| OpenGL ES 2.0 | complete | complete | complete | complete | in progress |
|
||||
| OpenGL ES 3.0 | | complete | complete | in progress | not started |
|
||||
| OpenGL ES 3.1 | | not started | in progress | in progress | not started |
|
||||
|
||||
### Platform support via backing renderers
|
||||
|
||||
| | Direct3D 9 | Direct3D 11 | Desktop GL | GL ES | Vulkan |
|
||||
|------------:|:--------------:|:--------------:|:-------------:|:-----------:|:-----------:|
|
||||
| Windows | complete | complete | complete | complete | in progress |
|
||||
| Linux | | | complete | | planned |
|
||||
| Mac OS X | | | in progress | | |
|
||||
| Chrome OS | | | | complete | planned |
|
||||
| Android | | | | complete | planned |
|
||||
|
||||
ANGLE v1.0.772 was certified compliant by passing the ES 2.0.3 conformance tests in October 2011.
|
||||
ANGLE also provides an implementation of the EGL 1.4 specification.
|
||||
|
||||
ANGLE is used as the default WebGL backend for both Google Chrome and Mozilla Firefox on Windows
|
||||
platforms. Chrome uses ANGLE for all graphics rendering on Windows, including the accelerated
|
||||
Canvas2D implementation and the Native Client sandbox environment.
|
||||
|
||||
Portions of the ANGLE shader compiler are used as a shader validator and translator by WebGL
|
||||
implementations across multiple platforms. It is used on Mac OS X, Linux, and in mobile variants of
|
||||
the browsers. Having one shader validator helps to ensure that a consistent set of GLSL ES shaders
|
||||
are accepted across browsers and platforms. The shader translator can be used to translate shaders
|
||||
to other shading languages, and to optionally apply shader modifications to work around bugs or
|
||||
quirks in the native graphics drivers. The translator targets Desktop GLSL, Direct3D HLSL, and even
|
||||
ESSL for native GLES2 platforms.
|
||||
|
||||
## Sources
|
||||
|
||||
ANGLE repository is hosted by Chromium project and can be
|
||||
[browsed online](https://chromium.googlesource.com/angle/angle) or cloned with
|
||||
|
||||
git clone https://chromium.googlesource.com/angle/angle
|
||||
|
||||
|
||||
## Building
|
||||
|
||||
View the [Dev setup instructions](doc/DevSetup.md). For generating a Windows Store version of ANGLE view the [Windows Store instructions](doc/BuildingAngleForWindowsStore.md)
|
||||
|
||||
## Contributing
|
||||
|
||||
* Join our [Google group](https://groups.google.com/group/angleproject) to keep up to date.
|
||||
* Join us on IRC in the #ANGLEproject channel on FreeNode.
|
||||
* File bugs in the [issue tracker](http://code.google.com/p/angleproject/issues/list) (preferably with an isolated test-case).
|
||||
* [Choose an ANGLE branch](doc/ChoosingANGLEBranch.md) to track in your own project.
|
||||
|
||||
|
||||
* Read ANGLE development [documentation](doc).
|
||||
* Look at [pending](https://chromium-review.googlesource.com/#/q/project:angle/angle+status:open)
|
||||
and [merged](https://chromium-review.googlesource.com/#/q/project:angle/angle+status:merged) changes.
|
||||
* Become a [code contributor](doc/ContributingCode.md).
|
||||
* Use ANGLE's [coding standard](doc/CodingStandard.md).
|
||||
* Learn how to [build ANGLE for Chromium development](doc/BuildingAngleForChromiumDevelopment.md).
|
||||
* Get help on [debugging ANGLE](doc/DebuggingTips.md).
|
||||
|
||||
|
||||
* Read about WebGL on the [Khronos WebGL Wiki](http://khronos.org/webgl/wiki/Main_Page).
|
||||
* Learn about implementation details in the [OpenGL Insights chapter on ANGLE](http://www.seas.upenn.edu/~pcozzi/OpenGLInsights/OpenGLInsights-ANGLE.pdf) and this [ANGLE presentation](https://drive.google.com/file/d/0Bw29oYeC09QbbHoxNE5EUFh0RGs/view?usp=sharing).
|
||||
* Learn about the past, present, and future of the ANGLE implementation in [this recent presentation](https://docs.google.com/presentation/d/1CucIsdGVDmdTWRUbg68IxLE5jXwCb2y1E9YVhQo0thg/pub?start=false&loop=false).
|
||||
* If you use ANGLE in your own project, we'd love to hear about it!
|
||||
|
@ -12,10 +12,10 @@
|
||||
|
||||
// clang-format off
|
||||
|
||||
#ifndef EGL_ANGLE_display_robust_resource_initialization
|
||||
#define EGL_ANGLE_display_robust_resource_initialization 1
|
||||
#define EGL_DISPLAY_ROBUST_RESOURCE_INITIALIZATION_ANGLE 0x3453
|
||||
#endif /* EGL_ANGLE_display_robust_resource_initialization */
|
||||
#ifndef EGL_ANGLE_robust_resource_initialization
|
||||
#define EGL_ANGLE_robust_resource_initialization 1
|
||||
#define EGL_ROBUST_RESOURCE_INITIALIZATION_ANGLE 0x3453
|
||||
#endif /* EGL_ANGLE_robust_resource_initialization */
|
||||
|
||||
#ifndef EGL_ANGLE_keyed_mutex
|
||||
#define EGL_ANGLE_keyed_mutex 1
|
||||
@ -51,16 +51,17 @@
|
||||
#define EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE 0x3205
|
||||
#define EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE 0x3206
|
||||
#define EGL_PLATFORM_ANGLE_DEBUG_LAYERS_ENABLED_ANGLE 0x3451
|
||||
#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE 0x3209
|
||||
#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE 0x320A
|
||||
#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE 0x345E
|
||||
#endif /* EGL_ANGLE_platform_angle */
|
||||
|
||||
#ifndef EGL_ANGLE_platform_angle_d3d
|
||||
#define EGL_ANGLE_platform_angle_d3d 1
|
||||
#define EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE 0x3207
|
||||
#define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3208
|
||||
#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE 0x3209
|
||||
#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE 0x320A
|
||||
#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE 0x320B
|
||||
#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE 0x320C
|
||||
#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE 0x320B
|
||||
#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_REFERENCE_ANGLE 0x320C
|
||||
#define EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE 0x320F
|
||||
#endif /* EGL_ANGLE_platform_angle_d3d */
|
||||
|
||||
@ -105,16 +106,16 @@
|
||||
#define EGL_EXPERIMENTAL_PRESENT_PATH_COPY_ANGLE 0x33AA
|
||||
#endif /* EGL_ANGLE_experimental_present_path */
|
||||
|
||||
#ifndef EGL_ANGLE_stream_producer_d3d_texture_nv12
|
||||
#define EGL_ANGLE_stream_producer_d3d_texture_nv12
|
||||
#ifndef EGL_ANGLE_stream_producer_d3d_texture
|
||||
#define EGL_ANGLE_stream_producer_d3d_texture
|
||||
#define EGL_D3D_TEXTURE_SUBRESOURCE_ID_ANGLE 0x33AB
|
||||
typedef EGLBoolean(EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERD3DTEXTURENV12ANGLEPROC)(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
|
||||
typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMPOSTD3DTEXTURENV12ANGLEPROC)(EGLDisplay dpy, EGLStreamKHR stream, void *texture, const EGLAttrib *attrib_list);
|
||||
typedef EGLBoolean(EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERD3DTEXTUREANGLEPROC)(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
|
||||
typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMPOSTD3DTEXTUREANGLEPROC)(EGLDisplay dpy, EGLStreamKHR stream, void *texture, const EGLAttrib *attrib_list);
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglCreateStreamProducerD3DTextureNV12ANGLE(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglStreamPostD3DTextureNV12ANGLE(EGLDisplay dpy, EGLStreamKHR stream, void *texture, const EGLAttrib *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglCreateStreamProducerD3DTextureANGLE(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglStreamPostD3DTextureANGLE(EGLDisplay dpy, EGLStreamKHR stream, void *texture, const EGLAttrib *attrib_list);
|
||||
#endif
|
||||
#endif /* EGL_ANGLE_stream_producer_d3d_texture_nv12 */
|
||||
#endif /* EGL_ANGLE_stream_producer_d3d_texture */
|
||||
|
||||
#ifndef EGL_ANGLE_create_context_webgl_compatibility
|
||||
#define EGL_ANGLE_create_context_webgl_compatibility 1
|
||||
@ -165,6 +166,15 @@ EGLAPI EGLint EGLAPIENTRY eglProgramCacheResizeANGLE(EGLDisplay dpy, EGLint limi
|
||||
#endif
|
||||
#endif /* EGL_ANGLE_program_cache_control */
|
||||
|
||||
#ifndef EGL_ANGLE_iosurface_client_buffer
|
||||
#define EGL_ANGLE_iosurface_client_buffer 1
|
||||
#define EGL_IOSURFACE_ANGLE 0x3454
|
||||
#define EGL_IOSURFACE_PLANE_ANGLE 0x345A
|
||||
#define EGL_TEXTURE_RECTANGLE_ANGLE 0x345B
|
||||
#define EGL_TEXTURE_TYPE_ANGLE 0x345C
|
||||
#define EGL_TEXTURE_INTERNAL_FORMAT_ANGLE 0x345D
|
||||
#endif /* EGL_ANGLE_iosurface_client_buffer */
|
||||
|
||||
// clang-format on
|
||||
|
||||
#endif // INCLUDE_EGL_EGLEXT_ANGLE_
|
590
gfx/angle/checkout/include/GLES/gl.h
Normal file
590
gfx/angle/checkout/include/GLES/gl.h
Normal file
@ -0,0 +1,590 @@
|
||||
#ifndef __gl_h_
|
||||
#define __gl_h_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2013-2017 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
/*
|
||||
** This header is generated from the Khronos OpenGL / OpenGL ES XML
|
||||
** API Registry. The current version of the Registry, generator scripts
|
||||
** used to make the header, and the header can be found at
|
||||
** https://github.com/KhronosGroup/OpenGL-Registry
|
||||
*/
|
||||
|
||||
#include <GLES/glplatform.h>
|
||||
|
||||
/* Generated on date 20171212 */
|
||||
|
||||
/* Generated C header for:
|
||||
* API: gles1
|
||||
* Profile: common
|
||||
* Versions considered: .*
|
||||
* Versions emitted: .*
|
||||
* Default extensions included: None
|
||||
* Additional extensions included: ^(GL_OES_read_format|GL_OES_compressed_paletted_texture|GL_OES_point_size_array|GL_OES_point_sprite)$
|
||||
* Extensions removed: _nomatch_^
|
||||
*/
|
||||
|
||||
#ifndef GL_VERSION_ES_CM_1_0
|
||||
#define GL_VERSION_ES_CM_1_0 1
|
||||
#include <KHR/khrplatform.h>
|
||||
typedef khronos_int8_t GLbyte;
|
||||
typedef khronos_float_t GLclampf;
|
||||
typedef short GLshort;
|
||||
typedef unsigned short GLushort;
|
||||
typedef void GLvoid;
|
||||
typedef unsigned int GLenum;
|
||||
typedef khronos_float_t GLfloat;
|
||||
typedef khronos_int32_t GLfixed;
|
||||
typedef unsigned int GLuint;
|
||||
typedef khronos_ssize_t GLsizeiptr;
|
||||
typedef khronos_intptr_t GLintptr;
|
||||
typedef unsigned int GLbitfield;
|
||||
typedef int GLint;
|
||||
typedef khronos_uint8_t GLubyte;
|
||||
typedef unsigned char GLboolean;
|
||||
typedef int GLsizei;
|
||||
typedef khronos_int32_t GLclampx;
|
||||
#define GL_VERSION_ES_CL_1_0 1
|
||||
#define GL_VERSION_ES_CM_1_1 1
|
||||
#define GL_VERSION_ES_CL_1_1 1
|
||||
#define GL_DEPTH_BUFFER_BIT 0x00000100
|
||||
#define GL_STENCIL_BUFFER_BIT 0x00000400
|
||||
#define GL_COLOR_BUFFER_BIT 0x00004000
|
||||
#define GL_FALSE 0
|
||||
#define GL_TRUE 1
|
||||
#define GL_POINTS 0x0000
|
||||
#define GL_LINES 0x0001
|
||||
#define GL_LINE_LOOP 0x0002
|
||||
#define GL_LINE_STRIP 0x0003
|
||||
#define GL_TRIANGLES 0x0004
|
||||
#define GL_TRIANGLE_STRIP 0x0005
|
||||
#define GL_TRIANGLE_FAN 0x0006
|
||||
#define GL_NEVER 0x0200
|
||||
#define GL_LESS 0x0201
|
||||
#define GL_EQUAL 0x0202
|
||||
#define GL_LEQUAL 0x0203
|
||||
#define GL_GREATER 0x0204
|
||||
#define GL_NOTEQUAL 0x0205
|
||||
#define GL_GEQUAL 0x0206
|
||||
#define GL_ALWAYS 0x0207
|
||||
#define GL_ZERO 0
|
||||
#define GL_ONE 1
|
||||
#define GL_SRC_COLOR 0x0300
|
||||
#define GL_ONE_MINUS_SRC_COLOR 0x0301
|
||||
#define GL_SRC_ALPHA 0x0302
|
||||
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
|
||||
#define GL_DST_ALPHA 0x0304
|
||||
#define GL_ONE_MINUS_DST_ALPHA 0x0305
|
||||
#define GL_DST_COLOR 0x0306
|
||||
#define GL_ONE_MINUS_DST_COLOR 0x0307
|
||||
#define GL_SRC_ALPHA_SATURATE 0x0308
|
||||
#define GL_CLIP_PLANE0 0x3000
|
||||
#define GL_CLIP_PLANE1 0x3001
|
||||
#define GL_CLIP_PLANE2 0x3002
|
||||
#define GL_CLIP_PLANE3 0x3003
|
||||
#define GL_CLIP_PLANE4 0x3004
|
||||
#define GL_CLIP_PLANE5 0x3005
|
||||
#define GL_FRONT 0x0404
|
||||
#define GL_BACK 0x0405
|
||||
#define GL_FRONT_AND_BACK 0x0408
|
||||
#define GL_FOG 0x0B60
|
||||
#define GL_LIGHTING 0x0B50
|
||||
#define GL_TEXTURE_2D 0x0DE1
|
||||
#define GL_CULL_FACE 0x0B44
|
||||
#define GL_ALPHA_TEST 0x0BC0
|
||||
#define GL_BLEND 0x0BE2
|
||||
#define GL_COLOR_LOGIC_OP 0x0BF2
|
||||
#define GL_DITHER 0x0BD0
|
||||
#define GL_STENCIL_TEST 0x0B90
|
||||
#define GL_DEPTH_TEST 0x0B71
|
||||
#define GL_POINT_SMOOTH 0x0B10
|
||||
#define GL_LINE_SMOOTH 0x0B20
|
||||
#define GL_SCISSOR_TEST 0x0C11
|
||||
#define GL_COLOR_MATERIAL 0x0B57
|
||||
#define GL_NORMALIZE 0x0BA1
|
||||
#define GL_RESCALE_NORMAL 0x803A
|
||||
#define GL_VERTEX_ARRAY 0x8074
|
||||
#define GL_NORMAL_ARRAY 0x8075
|
||||
#define GL_COLOR_ARRAY 0x8076
|
||||
#define GL_TEXTURE_COORD_ARRAY 0x8078
|
||||
#define GL_MULTISAMPLE 0x809D
|
||||
#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
|
||||
#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
|
||||
#define GL_SAMPLE_COVERAGE 0x80A0
|
||||
#define GL_NO_ERROR 0
|
||||
#define GL_INVALID_ENUM 0x0500
|
||||
#define GL_INVALID_VALUE 0x0501
|
||||
#define GL_INVALID_OPERATION 0x0502
|
||||
#define GL_STACK_OVERFLOW 0x0503
|
||||
#define GL_STACK_UNDERFLOW 0x0504
|
||||
#define GL_OUT_OF_MEMORY 0x0505
|
||||
#define GL_EXP 0x0800
|
||||
#define GL_EXP2 0x0801
|
||||
#define GL_FOG_DENSITY 0x0B62
|
||||
#define GL_FOG_START 0x0B63
|
||||
#define GL_FOG_END 0x0B64
|
||||
#define GL_FOG_MODE 0x0B65
|
||||
#define GL_FOG_COLOR 0x0B66
|
||||
#define GL_CW 0x0900
|
||||
#define GL_CCW 0x0901
|
||||
#define GL_CURRENT_COLOR 0x0B00
|
||||
#define GL_CURRENT_NORMAL 0x0B02
|
||||
#define GL_CURRENT_TEXTURE_COORDS 0x0B03
|
||||
#define GL_POINT_SIZE 0x0B11
|
||||
#define GL_POINT_SIZE_MIN 0x8126
|
||||
#define GL_POINT_SIZE_MAX 0x8127
|
||||
#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
|
||||
#define GL_POINT_DISTANCE_ATTENUATION 0x8129
|
||||
#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
|
||||
#define GL_LINE_WIDTH 0x0B21
|
||||
#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
|
||||
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
|
||||
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
|
||||
#define GL_CULL_FACE_MODE 0x0B45
|
||||
#define GL_FRONT_FACE 0x0B46
|
||||
#define GL_SHADE_MODEL 0x0B54
|
||||
#define GL_DEPTH_RANGE 0x0B70
|
||||
#define GL_DEPTH_WRITEMASK 0x0B72
|
||||
#define GL_DEPTH_CLEAR_VALUE 0x0B73
|
||||
#define GL_DEPTH_FUNC 0x0B74
|
||||
#define GL_STENCIL_CLEAR_VALUE 0x0B91
|
||||
#define GL_STENCIL_FUNC 0x0B92
|
||||
#define GL_STENCIL_VALUE_MASK 0x0B93
|
||||
#define GL_STENCIL_FAIL 0x0B94
|
||||
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
|
||||
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
|
||||
#define GL_STENCIL_REF 0x0B97
|
||||
#define GL_STENCIL_WRITEMASK 0x0B98
|
||||
#define GL_MATRIX_MODE 0x0BA0
|
||||
#define GL_VIEWPORT 0x0BA2
|
||||
#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
|
||||
#define GL_PROJECTION_STACK_DEPTH 0x0BA4
|
||||
#define GL_TEXTURE_STACK_DEPTH 0x0BA5
|
||||
#define GL_MODELVIEW_MATRIX 0x0BA6
|
||||
#define GL_PROJECTION_MATRIX 0x0BA7
|
||||
#define GL_TEXTURE_MATRIX 0x0BA8
|
||||
#define GL_ALPHA_TEST_FUNC 0x0BC1
|
||||
#define GL_ALPHA_TEST_REF 0x0BC2
|
||||
#define GL_BLEND_DST 0x0BE0
|
||||
#define GL_BLEND_SRC 0x0BE1
|
||||
#define GL_LOGIC_OP_MODE 0x0BF0
|
||||
#define GL_SCISSOR_BOX 0x0C10
|
||||
#define GL_COLOR_CLEAR_VALUE 0x0C22
|
||||
#define GL_COLOR_WRITEMASK 0x0C23
|
||||
#define GL_MAX_LIGHTS 0x0D31
|
||||
#define GL_MAX_CLIP_PLANES 0x0D32
|
||||
#define GL_MAX_TEXTURE_SIZE 0x0D33
|
||||
#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
|
||||
#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
|
||||
#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
|
||||
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||
#define GL_MAX_TEXTURE_UNITS 0x84E2
|
||||
#define GL_SUBPIXEL_BITS 0x0D50
|
||||
#define GL_RED_BITS 0x0D52
|
||||
#define GL_GREEN_BITS 0x0D53
|
||||
#define GL_BLUE_BITS 0x0D54
|
||||
#define GL_ALPHA_BITS 0x0D55
|
||||
#define GL_DEPTH_BITS 0x0D56
|
||||
#define GL_STENCIL_BITS 0x0D57
|
||||
#define GL_POLYGON_OFFSET_UNITS 0x2A00
|
||||
#define GL_POLYGON_OFFSET_FILL 0x8037
|
||||
#define GL_POLYGON_OFFSET_FACTOR 0x8038
|
||||
#define GL_TEXTURE_BINDING_2D 0x8069
|
||||
#define GL_VERTEX_ARRAY_SIZE 0x807A
|
||||
#define GL_VERTEX_ARRAY_TYPE 0x807B
|
||||
#define GL_VERTEX_ARRAY_STRIDE 0x807C
|
||||
#define GL_NORMAL_ARRAY_TYPE 0x807E
|
||||
#define GL_NORMAL_ARRAY_STRIDE 0x807F
|
||||
#define GL_COLOR_ARRAY_SIZE 0x8081
|
||||
#define GL_COLOR_ARRAY_TYPE 0x8082
|
||||
#define GL_COLOR_ARRAY_STRIDE 0x8083
|
||||
#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
|
||||
#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
|
||||
#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
|
||||
#define GL_VERTEX_ARRAY_POINTER 0x808E
|
||||
#define GL_NORMAL_ARRAY_POINTER 0x808F
|
||||
#define GL_COLOR_ARRAY_POINTER 0x8090
|
||||
#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
|
||||
#define GL_SAMPLE_BUFFERS 0x80A8
|
||||
#define GL_SAMPLES 0x80A9
|
||||
#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
|
||||
#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
|
||||
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
|
||||
#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
|
||||
#define GL_DONT_CARE 0x1100
|
||||
#define GL_FASTEST 0x1101
|
||||
#define GL_NICEST 0x1102
|
||||
#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
|
||||
#define GL_POINT_SMOOTH_HINT 0x0C51
|
||||
#define GL_LINE_SMOOTH_HINT 0x0C52
|
||||
#define GL_FOG_HINT 0x0C54
|
||||
#define GL_GENERATE_MIPMAP_HINT 0x8192
|
||||
#define GL_LIGHT_MODEL_AMBIENT 0x0B53
|
||||
#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
|
||||
#define GL_AMBIENT 0x1200
|
||||
#define GL_DIFFUSE 0x1201
|
||||
#define GL_SPECULAR 0x1202
|
||||
#define GL_POSITION 0x1203
|
||||
#define GL_SPOT_DIRECTION 0x1204
|
||||
#define GL_SPOT_EXPONENT 0x1205
|
||||
#define GL_SPOT_CUTOFF 0x1206
|
||||
#define GL_CONSTANT_ATTENUATION 0x1207
|
||||
#define GL_LINEAR_ATTENUATION 0x1208
|
||||
#define GL_QUADRATIC_ATTENUATION 0x1209
|
||||
#define GL_BYTE 0x1400
|
||||
#define GL_UNSIGNED_BYTE 0x1401
|
||||
#define GL_SHORT 0x1402
|
||||
#define GL_UNSIGNED_SHORT 0x1403
|
||||
#define GL_FLOAT 0x1406
|
||||
#define GL_FIXED 0x140C
|
||||
#define GL_CLEAR 0x1500
|
||||
#define GL_AND 0x1501
|
||||
#define GL_AND_REVERSE 0x1502
|
||||
#define GL_COPY 0x1503
|
||||
#define GL_AND_INVERTED 0x1504
|
||||
#define GL_NOOP 0x1505
|
||||
#define GL_XOR 0x1506
|
||||
#define GL_OR 0x1507
|
||||
#define GL_NOR 0x1508
|
||||
#define GL_EQUIV 0x1509
|
||||
#define GL_INVERT 0x150A
|
||||
#define GL_OR_REVERSE 0x150B
|
||||
#define GL_COPY_INVERTED 0x150C
|
||||
#define GL_OR_INVERTED 0x150D
|
||||
#define GL_NAND 0x150E
|
||||
#define GL_SET 0x150F
|
||||
#define GL_EMISSION 0x1600
|
||||
#define GL_SHININESS 0x1601
|
||||
#define GL_AMBIENT_AND_DIFFUSE 0x1602
|
||||
#define GL_MODELVIEW 0x1700
|
||||
#define GL_PROJECTION 0x1701
|
||||
#define GL_TEXTURE 0x1702
|
||||
#define GL_ALPHA 0x1906
|
||||
#define GL_RGB 0x1907
|
||||
#define GL_RGBA 0x1908
|
||||
#define GL_LUMINANCE 0x1909
|
||||
#define GL_LUMINANCE_ALPHA 0x190A
|
||||
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||
#define GL_PACK_ALIGNMENT 0x0D05
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
|
||||
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
|
||||
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
|
||||
#define GL_FLAT 0x1D00
|
||||
#define GL_SMOOTH 0x1D01
|
||||
#define GL_KEEP 0x1E00
|
||||
#define GL_REPLACE 0x1E01
|
||||
#define GL_INCR 0x1E02
|
||||
#define GL_DECR 0x1E03
|
||||
#define GL_VENDOR 0x1F00
|
||||
#define GL_RENDERER 0x1F01
|
||||
#define GL_VERSION 0x1F02
|
||||
#define GL_EXTENSIONS 0x1F03
|
||||
#define GL_MODULATE 0x2100
|
||||
#define GL_DECAL 0x2101
|
||||
#define GL_ADD 0x0104
|
||||
#define GL_TEXTURE_ENV_MODE 0x2200
|
||||
#define GL_TEXTURE_ENV_COLOR 0x2201
|
||||
#define GL_TEXTURE_ENV 0x2300
|
||||
#define GL_NEAREST 0x2600
|
||||
#define GL_LINEAR 0x2601
|
||||
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
|
||||
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
|
||||
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
|
||||
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
|
||||
#define GL_TEXTURE_MAG_FILTER 0x2800
|
||||
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||
#define GL_TEXTURE_WRAP_S 0x2802
|
||||
#define GL_TEXTURE_WRAP_T 0x2803
|
||||
#define GL_GENERATE_MIPMAP 0x8191
|
||||
#define GL_TEXTURE0 0x84C0
|
||||
#define GL_TEXTURE1 0x84C1
|
||||
#define GL_TEXTURE2 0x84C2
|
||||
#define GL_TEXTURE3 0x84C3
|
||||
#define GL_TEXTURE4 0x84C4
|
||||
#define GL_TEXTURE5 0x84C5
|
||||
#define GL_TEXTURE6 0x84C6
|
||||
#define GL_TEXTURE7 0x84C7
|
||||
#define GL_TEXTURE8 0x84C8
|
||||
#define GL_TEXTURE9 0x84C9
|
||||
#define GL_TEXTURE10 0x84CA
|
||||
#define GL_TEXTURE11 0x84CB
|
||||
#define GL_TEXTURE12 0x84CC
|
||||
#define GL_TEXTURE13 0x84CD
|
||||
#define GL_TEXTURE14 0x84CE
|
||||
#define GL_TEXTURE15 0x84CF
|
||||
#define GL_TEXTURE16 0x84D0
|
||||
#define GL_TEXTURE17 0x84D1
|
||||
#define GL_TEXTURE18 0x84D2
|
||||
#define GL_TEXTURE19 0x84D3
|
||||
#define GL_TEXTURE20 0x84D4
|
||||
#define GL_TEXTURE21 0x84D5
|
||||
#define GL_TEXTURE22 0x84D6
|
||||
#define GL_TEXTURE23 0x84D7
|
||||
#define GL_TEXTURE24 0x84D8
|
||||
#define GL_TEXTURE25 0x84D9
|
||||
#define GL_TEXTURE26 0x84DA
|
||||
#define GL_TEXTURE27 0x84DB
|
||||
#define GL_TEXTURE28 0x84DC
|
||||
#define GL_TEXTURE29 0x84DD
|
||||
#define GL_TEXTURE30 0x84DE
|
||||
#define GL_TEXTURE31 0x84DF
|
||||
#define GL_ACTIVE_TEXTURE 0x84E0
|
||||
#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
|
||||
#define GL_REPEAT 0x2901
|
||||
#define GL_CLAMP_TO_EDGE 0x812F
|
||||
#define GL_LIGHT0 0x4000
|
||||
#define GL_LIGHT1 0x4001
|
||||
#define GL_LIGHT2 0x4002
|
||||
#define GL_LIGHT3 0x4003
|
||||
#define GL_LIGHT4 0x4004
|
||||
#define GL_LIGHT5 0x4005
|
||||
#define GL_LIGHT6 0x4006
|
||||
#define GL_LIGHT7 0x4007
|
||||
#define GL_ARRAY_BUFFER 0x8892
|
||||
#define GL_ELEMENT_ARRAY_BUFFER 0x8893
|
||||
#define GL_ARRAY_BUFFER_BINDING 0x8894
|
||||
#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
|
||||
#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
|
||||
#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
|
||||
#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
|
||||
#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
|
||||
#define GL_STATIC_DRAW 0x88E4
|
||||
#define GL_DYNAMIC_DRAW 0x88E8
|
||||
#define GL_BUFFER_SIZE 0x8764
|
||||
#define GL_BUFFER_USAGE 0x8765
|
||||
#define GL_SUBTRACT 0x84E7
|
||||
#define GL_COMBINE 0x8570
|
||||
#define GL_COMBINE_RGB 0x8571
|
||||
#define GL_COMBINE_ALPHA 0x8572
|
||||
#define GL_RGB_SCALE 0x8573
|
||||
#define GL_ADD_SIGNED 0x8574
|
||||
#define GL_INTERPOLATE 0x8575
|
||||
#define GL_CONSTANT 0x8576
|
||||
#define GL_PRIMARY_COLOR 0x8577
|
||||
#define GL_PREVIOUS 0x8578
|
||||
#define GL_OPERAND0_RGB 0x8590
|
||||
#define GL_OPERAND1_RGB 0x8591
|
||||
#define GL_OPERAND2_RGB 0x8592
|
||||
#define GL_OPERAND0_ALPHA 0x8598
|
||||
#define GL_OPERAND1_ALPHA 0x8599
|
||||
#define GL_OPERAND2_ALPHA 0x859A
|
||||
#define GL_ALPHA_SCALE 0x0D1C
|
||||
#define GL_SRC0_RGB 0x8580
|
||||
#define GL_SRC1_RGB 0x8581
|
||||
#define GL_SRC2_RGB 0x8582
|
||||
#define GL_SRC0_ALPHA 0x8588
|
||||
#define GL_SRC1_ALPHA 0x8589
|
||||
#define GL_SRC2_ALPHA 0x858A
|
||||
#define GL_DOT3_RGB 0x86AE
|
||||
#define GL_DOT3_RGBA 0x86AF
|
||||
GL_API void GL_APIENTRY glAlphaFunc (GLenum func, GLfloat ref);
|
||||
GL_API void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
GL_API void GL_APIENTRY glClearDepthf (GLfloat d);
|
||||
GL_API void GL_APIENTRY glClipPlanef (GLenum p, const GLfloat *eqn);
|
||||
GL_API void GL_APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
GL_API void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f);
|
||||
GL_API void GL_APIENTRY glFogf (GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glFogfv (GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glFrustumf (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
|
||||
GL_API void GL_APIENTRY glGetClipPlanef (GLenum plane, GLfloat *equation);
|
||||
GL_API void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data);
|
||||
GL_API void GL_APIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params);
|
||||
GL_API void GL_APIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params);
|
||||
GL_API void GL_APIENTRY glGetTexEnvfv (GLenum target, GLenum pname, GLfloat *params);
|
||||
GL_API void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
|
||||
GL_API void GL_APIENTRY glLightModelf (GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glLightModelfv (GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glLightf (GLenum light, GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glLineWidth (GLfloat width);
|
||||
GL_API void GL_APIENTRY glLoadMatrixf (const GLfloat *m);
|
||||
GL_API void GL_APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glMultMatrixf (const GLfloat *m);
|
||||
GL_API void GL_APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
|
||||
GL_API void GL_APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz);
|
||||
GL_API void GL_APIENTRY glOrthof (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
|
||||
GL_API void GL_APIENTRY glPointParameterf (GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glPointSize (GLfloat size);
|
||||
GL_API void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
|
||||
GL_API void GL_APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
|
||||
GL_API void GL_APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z);
|
||||
GL_API void GL_APIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z);
|
||||
GL_API void GL_APIENTRY glActiveTexture (GLenum texture);
|
||||
GL_API void GL_APIENTRY glAlphaFuncx (GLenum func, GLfixed ref);
|
||||
GL_API void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
|
||||
GL_API void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
|
||||
GL_API void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
|
||||
GL_API void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
|
||||
GL_API void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
|
||||
GL_API void GL_APIENTRY glClear (GLbitfield mask);
|
||||
GL_API void GL_APIENTRY glClearColorx (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
|
||||
GL_API void GL_APIENTRY glClearDepthx (GLfixed depth);
|
||||
GL_API void GL_APIENTRY glClearStencil (GLint s);
|
||||
GL_API void GL_APIENTRY glClientActiveTexture (GLenum texture);
|
||||
GL_API void GL_APIENTRY glClipPlanex (GLenum plane, const GLfixed *equation);
|
||||
GL_API void GL_APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
|
||||
GL_API void GL_APIENTRY glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
|
||||
GL_API void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
GL_API void GL_APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const void *pointer);
|
||||
GL_API void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
|
||||
GL_API void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
|
||||
GL_API void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
||||
GL_API void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_API void GL_APIENTRY glCullFace (GLenum mode);
|
||||
GL_API void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
|
||||
GL_API void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
|
||||
GL_API void GL_APIENTRY glDepthFunc (GLenum func);
|
||||
GL_API void GL_APIENTRY glDepthMask (GLboolean flag);
|
||||
GL_API void GL_APIENTRY glDepthRangex (GLfixed n, GLfixed f);
|
||||
GL_API void GL_APIENTRY glDisable (GLenum cap);
|
||||
GL_API void GL_APIENTRY glDisableClientState (GLenum array);
|
||||
GL_API void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
|
||||
GL_API void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
|
||||
GL_API void GL_APIENTRY glEnable (GLenum cap);
|
||||
GL_API void GL_APIENTRY glEnableClientState (GLenum array);
|
||||
GL_API void GL_APIENTRY glFinish (void);
|
||||
GL_API void GL_APIENTRY glFlush (void);
|
||||
GL_API void GL_APIENTRY glFogx (GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glFogxv (GLenum pname, const GLfixed *param);
|
||||
GL_API void GL_APIENTRY glFrontFace (GLenum mode);
|
||||
GL_API void GL_APIENTRY glFrustumx (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
|
||||
GL_API void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data);
|
||||
GL_API void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||
GL_API void GL_APIENTRY glGetClipPlanex (GLenum plane, GLfixed *equation);
|
||||
GL_API void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
|
||||
GL_API void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
|
||||
GL_API GLenum GL_APIENTRY glGetError (void);
|
||||
GL_API void GL_APIENTRY glGetFixedv (GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data);
|
||||
GL_API void GL_APIENTRY glGetLightxv (GLenum light, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetPointerv (GLenum pname, void **params);
|
||||
GL_API const GLubyte *GL_APIENTRY glGetString (GLenum name);
|
||||
GL_API void GL_APIENTRY glGetTexEnviv (GLenum target, GLenum pname, GLint *params);
|
||||
GL_API void GL_APIENTRY glGetTexEnvxv (GLenum target, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||
GL_API void GL_APIENTRY glGetTexParameterxv (GLenum target, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glHint (GLenum target, GLenum mode);
|
||||
GL_API GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
|
||||
GL_API GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
|
||||
GL_API GLboolean GL_APIENTRY glIsTexture (GLuint texture);
|
||||
GL_API void GL_APIENTRY glLightModelx (GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glLightModelxv (GLenum pname, const GLfixed *param);
|
||||
GL_API void GL_APIENTRY glLightx (GLenum light, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glLightxv (GLenum light, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glLineWidthx (GLfixed width);
|
||||
GL_API void GL_APIENTRY glLoadIdentity (void);
|
||||
GL_API void GL_APIENTRY glLoadMatrixx (const GLfixed *m);
|
||||
GL_API void GL_APIENTRY glLogicOp (GLenum opcode);
|
||||
GL_API void GL_APIENTRY glMaterialx (GLenum face, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glMaterialxv (GLenum face, GLenum pname, const GLfixed *param);
|
||||
GL_API void GL_APIENTRY glMatrixMode (GLenum mode);
|
||||
GL_API void GL_APIENTRY glMultMatrixx (const GLfixed *m);
|
||||
GL_API void GL_APIENTRY glMultiTexCoord4x (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
|
||||
GL_API void GL_APIENTRY glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz);
|
||||
GL_API void GL_APIENTRY glNormalPointer (GLenum type, GLsizei stride, const void *pointer);
|
||||
GL_API void GL_APIENTRY glOrthox (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
|
||||
GL_API void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
|
||||
GL_API void GL_APIENTRY glPointParameterx (GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glPointParameterxv (GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glPointSizex (GLfixed size);
|
||||
GL_API void GL_APIENTRY glPolygonOffsetx (GLfixed factor, GLfixed units);
|
||||
GL_API void GL_APIENTRY glPopMatrix (void);
|
||||
GL_API void GL_APIENTRY glPushMatrix (void);
|
||||
GL_API void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
|
||||
GL_API void GL_APIENTRY glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
|
||||
GL_API void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
|
||||
GL_API void GL_APIENTRY glSampleCoveragex (GLclampx value, GLboolean invert);
|
||||
GL_API void GL_APIENTRY glScalex (GLfixed x, GLfixed y, GLfixed z);
|
||||
GL_API void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_API void GL_APIENTRY glShadeModel (GLenum mode);
|
||||
GL_API void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
|
||||
GL_API void GL_APIENTRY glStencilMask (GLuint mask);
|
||||
GL_API void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
|
||||
GL_API void GL_APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const void *pointer);
|
||||
GL_API void GL_APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param);
|
||||
GL_API void GL_APIENTRY glTexEnvx (GLenum target, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glTexEnviv (GLenum target, GLenum pname, const GLint *params);
|
||||
GL_API void GL_APIENTRY glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
|
||||
GL_API void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
|
||||
GL_API void GL_APIENTRY glTexParameterx (GLenum target, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
|
||||
GL_API void GL_APIENTRY glTexParameterxv (GLenum target, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
|
||||
GL_API void GL_APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z);
|
||||
GL_API void GL_APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const void *pointer);
|
||||
GL_API void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
#endif /* GL_VERSION_ES_CM_1_0 */
|
||||
|
||||
#ifndef GL_OES_compressed_paletted_texture
|
||||
#define GL_OES_compressed_paletted_texture 1
|
||||
#define GL_PALETTE4_RGB8_OES 0x8B90
|
||||
#define GL_PALETTE4_RGBA8_OES 0x8B91
|
||||
#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
|
||||
#define GL_PALETTE4_RGBA4_OES 0x8B93
|
||||
#define GL_PALETTE4_RGB5_A1_OES 0x8B94
|
||||
#define GL_PALETTE8_RGB8_OES 0x8B95
|
||||
#define GL_PALETTE8_RGBA8_OES 0x8B96
|
||||
#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
|
||||
#define GL_PALETTE8_RGBA4_OES 0x8B98
|
||||
#define GL_PALETTE8_RGB5_A1_OES 0x8B99
|
||||
#endif /* GL_OES_compressed_paletted_texture */
|
||||
|
||||
#ifndef GL_OES_point_size_array
|
||||
#define GL_OES_point_size_array 1
|
||||
#define GL_POINT_SIZE_ARRAY_OES 0x8B9C
|
||||
#define GL_POINT_SIZE_ARRAY_TYPE_OES 0x898A
|
||||
#define GL_POINT_SIZE_ARRAY_STRIDE_OES 0x898B
|
||||
#define GL_POINT_SIZE_ARRAY_POINTER_OES 0x898C
|
||||
#define GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES 0x8B9F
|
||||
GL_API void GL_APIENTRY glPointSizePointerOES (GLenum type, GLsizei stride, const void *pointer);
|
||||
#endif /* GL_OES_point_size_array */
|
||||
|
||||
#ifndef GL_OES_point_sprite
|
||||
#define GL_OES_point_sprite 1
|
||||
#define GL_POINT_SPRITE_OES 0x8861
|
||||
#define GL_COORD_REPLACE_OES 0x8862
|
||||
#endif /* GL_OES_point_sprite */
|
||||
|
||||
#ifndef GL_OES_read_format
|
||||
#define GL_OES_read_format 1
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
|
||||
#endif /* GL_OES_read_format */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
965
gfx/angle/checkout/include/GLES/glext.h
Normal file
965
gfx/angle/checkout/include/GLES/glext.h
Normal file
@ -0,0 +1,965 @@
|
||||
#ifndef __glext_h_
|
||||
#define __glext_h_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2013-2017 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
/*
|
||||
** This header is generated from the Khronos OpenGL / OpenGL ES XML
|
||||
** API Registry. The current version of the Registry, generator scripts
|
||||
** used to make the header, and the header can be found at
|
||||
** https://github.com/KhronosGroup/OpenGL-Registry
|
||||
*/
|
||||
|
||||
#ifndef GL_APIENTRYP
|
||||
#define GL_APIENTRYP GL_APIENTRY*
|
||||
#endif
|
||||
|
||||
/* Generated on date 20171212 */
|
||||
|
||||
/* Generated C header for:
|
||||
* API: gles1
|
||||
* Profile: common
|
||||
* Versions considered: .*
|
||||
* Versions emitted: _nomatch_^
|
||||
* Default extensions included: gles1
|
||||
* Additional extensions included: _nomatch_^
|
||||
* Extensions removed: ^(GL_OES_read_format|GL_OES_compressed_paletted_texture|GL_OES_point_size_array|GL_OES_point_sprite)$
|
||||
*/
|
||||
|
||||
#ifndef GL_OES_EGL_image
|
||||
#define GL_OES_EGL_image 1
|
||||
typedef void *GLeglImageOES;
|
||||
typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
|
||||
typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
|
||||
GL_API void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
|
||||
#endif
|
||||
#endif /* GL_OES_EGL_image */
|
||||
|
||||
#ifndef GL_OES_blend_equation_separate
|
||||
#define GL_OES_blend_equation_separate 1
|
||||
#define GL_BLEND_EQUATION_RGB_OES 0x8009
|
||||
#define GL_BLEND_EQUATION_ALPHA_OES 0x883D
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEOESPROC) (GLenum modeRGB, GLenum modeAlpha);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glBlendEquationSeparateOES (GLenum modeRGB, GLenum modeAlpha);
|
||||
#endif
|
||||
#endif /* GL_OES_blend_equation_separate */
|
||||
|
||||
#ifndef GL_OES_blend_func_separate
|
||||
#define GL_OES_blend_func_separate 1
|
||||
#define GL_BLEND_DST_RGB_OES 0x80C8
|
||||
#define GL_BLEND_SRC_RGB_OES 0x80C9
|
||||
#define GL_BLEND_DST_ALPHA_OES 0x80CA
|
||||
#define GL_BLEND_SRC_ALPHA_OES 0x80CB
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEOESPROC) (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glBlendFuncSeparateOES (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
|
||||
#endif
|
||||
#endif /* GL_OES_blend_func_separate */
|
||||
|
||||
#ifndef GL_OES_blend_subtract
|
||||
#define GL_OES_blend_subtract 1
|
||||
#define GL_BLEND_EQUATION_OES 0x8009
|
||||
#define GL_FUNC_ADD_OES 0x8006
|
||||
#define GL_FUNC_SUBTRACT_OES 0x800A
|
||||
#define GL_FUNC_REVERSE_SUBTRACT_OES 0x800B
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONOESPROC) (GLenum mode);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glBlendEquationOES (GLenum mode);
|
||||
#endif
|
||||
#endif /* GL_OES_blend_subtract */
|
||||
|
||||
#ifndef GL_OES_byte_coordinates
|
||||
#define GL_OES_byte_coordinates 1
|
||||
#endif /* GL_OES_byte_coordinates */
|
||||
|
||||
#ifndef GL_OES_compressed_ETC1_RGB8_sub_texture
|
||||
#define GL_OES_compressed_ETC1_RGB8_sub_texture 1
|
||||
#endif /* GL_OES_compressed_ETC1_RGB8_sub_texture */
|
||||
|
||||
#ifndef GL_OES_compressed_ETC1_RGB8_texture
|
||||
#define GL_OES_compressed_ETC1_RGB8_texture 1
|
||||
#define GL_ETC1_RGB8_OES 0x8D64
|
||||
#endif /* GL_OES_compressed_ETC1_RGB8_texture */
|
||||
|
||||
#ifndef GL_OES_depth24
|
||||
#define GL_OES_depth24 1
|
||||
#define GL_DEPTH_COMPONENT24_OES 0x81A6
|
||||
#endif /* GL_OES_depth24 */
|
||||
|
||||
#ifndef GL_OES_depth32
|
||||
#define GL_OES_depth32 1
|
||||
#define GL_DEPTH_COMPONENT32_OES 0x81A7
|
||||
#endif /* GL_OES_depth32 */
|
||||
|
||||
#ifndef GL_OES_draw_texture
|
||||
#define GL_OES_draw_texture 1
|
||||
#define GL_TEXTURE_CROP_RECT_OES 0x8B9D
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXSOESPROC) (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXIOESPROC) (GLint x, GLint y, GLint z, GLint width, GLint height);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXXOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXSVOESPROC) (const GLshort *coords);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXIVOESPROC) (const GLint *coords);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXXVOESPROC) (const GLfixed *coords);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXFOESPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWTEXFVOESPROC) (const GLfloat *coords);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glDrawTexsOES (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
|
||||
GL_API void GL_APIENTRY glDrawTexiOES (GLint x, GLint y, GLint z, GLint width, GLint height);
|
||||
GL_API void GL_APIENTRY glDrawTexxOES (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
|
||||
GL_API void GL_APIENTRY glDrawTexsvOES (const GLshort *coords);
|
||||
GL_API void GL_APIENTRY glDrawTexivOES (const GLint *coords);
|
||||
GL_API void GL_APIENTRY glDrawTexxvOES (const GLfixed *coords);
|
||||
GL_API void GL_APIENTRY glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
|
||||
GL_API void GL_APIENTRY glDrawTexfvOES (const GLfloat *coords);
|
||||
#endif
|
||||
#endif /* GL_OES_draw_texture */
|
||||
|
||||
#ifndef GL_OES_element_index_uint
|
||||
#define GL_OES_element_index_uint 1
|
||||
#define GL_UNSIGNED_INT 0x1405
|
||||
#endif /* GL_OES_element_index_uint */
|
||||
|
||||
#ifndef GL_OES_extended_matrix_palette
|
||||
#define GL_OES_extended_matrix_palette 1
|
||||
#endif /* GL_OES_extended_matrix_palette */
|
||||
|
||||
#ifndef GL_OES_fbo_render_mipmap
|
||||
#define GL_OES_fbo_render_mipmap 1
|
||||
#endif /* GL_OES_fbo_render_mipmap */
|
||||
|
||||
#ifndef GL_OES_fixed_point
|
||||
#define GL_OES_fixed_point 1
|
||||
#define GL_FIXED_OES 0x140C
|
||||
typedef void (GL_APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLfixed ref);
|
||||
typedef void (GL_APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
|
||||
typedef void (GL_APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLfixed depth);
|
||||
typedef void (GL_APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation);
|
||||
typedef void (GL_APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
|
||||
typedef void (GL_APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLfixed n, GLfixed f);
|
||||
typedef void (GL_APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *param);
|
||||
typedef void (GL_APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
|
||||
typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum plane, GLfixed *equation);
|
||||
typedef void (GL_APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *param);
|
||||
typedef void (GL_APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width);
|
||||
typedef void (GL_APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m);
|
||||
typedef void (GL_APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *param);
|
||||
typedef void (GL_APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m);
|
||||
typedef void (GL_APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
|
||||
typedef void (GL_APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz);
|
||||
typedef void (GL_APIENTRYP PFNGLORTHOXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
|
||||
typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size);
|
||||
typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units);
|
||||
typedef void (GL_APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
|
||||
typedef void (GL_APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
|
||||
typedef void (GL_APIENTRYP PFNGLGETLIGHTXVOESPROC) (GLenum light, GLenum pname, GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETMATERIALXVOESPROC) (GLenum face, GLenum pname, GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXOESPROC) (GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEXOESPROC) (GLclampx value, GLboolean invert);
|
||||
typedef void (GL_APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glAlphaFuncxOES (GLenum func, GLfixed ref);
|
||||
GL_API void GL_APIENTRY glClearColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
|
||||
GL_API void GL_APIENTRY glClearDepthxOES (GLfixed depth);
|
||||
GL_API void GL_APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation);
|
||||
GL_API void GL_APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
|
||||
GL_API void GL_APIENTRY glDepthRangexOES (GLfixed n, GLfixed f);
|
||||
GL_API void GL_APIENTRY glFogxOES (GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glFogxvOES (GLenum pname, const GLfixed *param);
|
||||
GL_API void GL_APIENTRY glFrustumxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
|
||||
GL_API void GL_APIENTRY glGetClipPlanexOES (GLenum plane, GLfixed *equation);
|
||||
GL_API void GL_APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetTexEnvxvOES (GLenum target, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glLightModelxOES (GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *param);
|
||||
GL_API void GL_APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glLineWidthxOES (GLfixed width);
|
||||
GL_API void GL_APIENTRY glLoadMatrixxOES (const GLfixed *m);
|
||||
GL_API void GL_APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *param);
|
||||
GL_API void GL_APIENTRY glMultMatrixxOES (const GLfixed *m);
|
||||
GL_API void GL_APIENTRY glMultiTexCoord4xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
|
||||
GL_API void GL_APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz);
|
||||
GL_API void GL_APIENTRY glOrthoxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
|
||||
GL_API void GL_APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glPointSizexOES (GLfixed size);
|
||||
GL_API void GL_APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units);
|
||||
GL_API void GL_APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
|
||||
GL_API void GL_APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z);
|
||||
GL_API void GL_APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z);
|
||||
GL_API void GL_APIENTRY glGetLightxvOES (GLenum light, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetMaterialxvOES (GLenum face, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glPointParameterxOES (GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glSampleCoveragexOES (GLclampx value, GLboolean invert);
|
||||
GL_API void GL_APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params);
|
||||
#endif
|
||||
#endif /* GL_OES_fixed_point */
|
||||
|
||||
#ifndef GL_OES_framebuffer_object
|
||||
#define GL_OES_framebuffer_object 1
|
||||
#define GL_NONE_OES 0
|
||||
#define GL_FRAMEBUFFER_OES 0x8D40
|
||||
#define GL_RENDERBUFFER_OES 0x8D41
|
||||
#define GL_RGBA4_OES 0x8056
|
||||
#define GL_RGB5_A1_OES 0x8057
|
||||
#define GL_RGB565_OES 0x8D62
|
||||
#define GL_DEPTH_COMPONENT16_OES 0x81A5
|
||||
#define GL_RENDERBUFFER_WIDTH_OES 0x8D42
|
||||
#define GL_RENDERBUFFER_HEIGHT_OES 0x8D43
|
||||
#define GL_RENDERBUFFER_INTERNAL_FORMAT_OES 0x8D44
|
||||
#define GL_RENDERBUFFER_RED_SIZE_OES 0x8D50
|
||||
#define GL_RENDERBUFFER_GREEN_SIZE_OES 0x8D51
|
||||
#define GL_RENDERBUFFER_BLUE_SIZE_OES 0x8D52
|
||||
#define GL_RENDERBUFFER_ALPHA_SIZE_OES 0x8D53
|
||||
#define GL_RENDERBUFFER_DEPTH_SIZE_OES 0x8D54
|
||||
#define GL_RENDERBUFFER_STENCIL_SIZE_OES 0x8D55
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES 0x8CD0
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES 0x8CD1
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES 0x8CD2
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES 0x8CD3
|
||||
#define GL_COLOR_ATTACHMENT0_OES 0x8CE0
|
||||
#define GL_DEPTH_ATTACHMENT_OES 0x8D00
|
||||
#define GL_STENCIL_ATTACHMENT_OES 0x8D20
|
||||
#define GL_FRAMEBUFFER_COMPLETE_OES 0x8CD5
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES 0x8CD6
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES 0x8CD7
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES 0x8CD9
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES 0x8CDA
|
||||
#define GL_FRAMEBUFFER_UNSUPPORTED_OES 0x8CDD
|
||||
#define GL_FRAMEBUFFER_BINDING_OES 0x8CA6
|
||||
#define GL_RENDERBUFFER_BINDING_OES 0x8CA7
|
||||
#define GL_MAX_RENDERBUFFER_SIZE_OES 0x84E8
|
||||
#define GL_INVALID_FRAMEBUFFER_OPERATION_OES 0x0506
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFEROESPROC) (GLuint renderbuffer);
|
||||
typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFEROESPROC) (GLenum target, GLuint renderbuffer);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSOESPROC) (GLsizei n, const GLuint *renderbuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSOESPROC) (GLsizei n, GLuint *renderbuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVOESPROC) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFEROESPROC) (GLuint framebuffer);
|
||||
typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFEROESPROC) (GLenum target, GLuint framebuffer);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSOESPROC) (GLsizei n, const GLuint *framebuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSOESPROC) (GLsizei n, GLuint *framebuffers);
|
||||
typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSOESPROC) (GLenum target);
|
||||
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEROESPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPOESPROC) (GLenum target);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API GLboolean GL_APIENTRY glIsRenderbufferOES (GLuint renderbuffer);
|
||||
GL_API void GL_APIENTRY glBindRenderbufferOES (GLenum target, GLuint renderbuffer);
|
||||
GL_API void GL_APIENTRY glDeleteRenderbuffersOES (GLsizei n, const GLuint *renderbuffers);
|
||||
GL_API void GL_APIENTRY glGenRenderbuffersOES (GLsizei n, GLuint *renderbuffers);
|
||||
GL_API void GL_APIENTRY glRenderbufferStorageOES (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GL_API void GL_APIENTRY glGetRenderbufferParameterivOES (GLenum target, GLenum pname, GLint *params);
|
||||
GL_API GLboolean GL_APIENTRY glIsFramebufferOES (GLuint framebuffer);
|
||||
GL_API void GL_APIENTRY glBindFramebufferOES (GLenum target, GLuint framebuffer);
|
||||
GL_API void GL_APIENTRY glDeleteFramebuffersOES (GLsizei n, const GLuint *framebuffers);
|
||||
GL_API void GL_APIENTRY glGenFramebuffersOES (GLsizei n, GLuint *framebuffers);
|
||||
GL_API GLenum GL_APIENTRY glCheckFramebufferStatusOES (GLenum target);
|
||||
GL_API void GL_APIENTRY glFramebufferRenderbufferOES (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
GL_API void GL_APIENTRY glFramebufferTexture2DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
GL_API void GL_APIENTRY glGetFramebufferAttachmentParameterivOES (GLenum target, GLenum attachment, GLenum pname, GLint *params);
|
||||
GL_API void GL_APIENTRY glGenerateMipmapOES (GLenum target);
|
||||
#endif
|
||||
#endif /* GL_OES_framebuffer_object */
|
||||
|
||||
#ifndef GL_OES_mapbuffer
|
||||
#define GL_OES_mapbuffer 1
|
||||
#define GL_WRITE_ONLY_OES 0x88B9
|
||||
#define GL_BUFFER_ACCESS_OES 0x88BB
|
||||
#define GL_BUFFER_MAPPED_OES 0x88BC
|
||||
#define GL_BUFFER_MAP_POINTER_OES 0x88BD
|
||||
typedef void *(GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
|
||||
typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void **params);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void *GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
|
||||
GL_API GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
|
||||
GL_API void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void **params);
|
||||
#endif
|
||||
#endif /* GL_OES_mapbuffer */
|
||||
|
||||
#ifndef GL_OES_matrix_get
|
||||
#define GL_OES_matrix_get 1
|
||||
#define GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES 0x898D
|
||||
#define GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES 0x898E
|
||||
#define GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES 0x898F
|
||||
#endif /* GL_OES_matrix_get */
|
||||
|
||||
#ifndef GL_OES_matrix_palette
|
||||
#define GL_OES_matrix_palette 1
|
||||
#define GL_MAX_VERTEX_UNITS_OES 0x86A4
|
||||
#define GL_MAX_PALETTE_MATRICES_OES 0x8842
|
||||
#define GL_MATRIX_PALETTE_OES 0x8840
|
||||
#define GL_MATRIX_INDEX_ARRAY_OES 0x8844
|
||||
#define GL_WEIGHT_ARRAY_OES 0x86AD
|
||||
#define GL_CURRENT_PALETTE_MATRIX_OES 0x8843
|
||||
#define GL_MATRIX_INDEX_ARRAY_SIZE_OES 0x8846
|
||||
#define GL_MATRIX_INDEX_ARRAY_TYPE_OES 0x8847
|
||||
#define GL_MATRIX_INDEX_ARRAY_STRIDE_OES 0x8848
|
||||
#define GL_MATRIX_INDEX_ARRAY_POINTER_OES 0x8849
|
||||
#define GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES 0x8B9E
|
||||
#define GL_WEIGHT_ARRAY_SIZE_OES 0x86AB
|
||||
#define GL_WEIGHT_ARRAY_TYPE_OES 0x86A9
|
||||
#define GL_WEIGHT_ARRAY_STRIDE_OES 0x86AA
|
||||
#define GL_WEIGHT_ARRAY_POINTER_OES 0x86AC
|
||||
#define GL_WEIGHT_ARRAY_BUFFER_BINDING_OES 0x889E
|
||||
typedef void (GL_APIENTRYP PFNGLCURRENTPALETTEMATRIXOESPROC) (GLuint matrixpaletteindex);
|
||||
typedef void (GL_APIENTRYP PFNGLLOADPALETTEFROMMODELVIEWMATRIXOESPROC) (void);
|
||||
typedef void (GL_APIENTRYP PFNGLMATRIXINDEXPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
|
||||
typedef void (GL_APIENTRYP PFNGLWEIGHTPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glCurrentPaletteMatrixOES (GLuint matrixpaletteindex);
|
||||
GL_API void GL_APIENTRY glLoadPaletteFromModelViewMatrixOES (void);
|
||||
GL_API void GL_APIENTRY glMatrixIndexPointerOES (GLint size, GLenum type, GLsizei stride, const void *pointer);
|
||||
GL_API void GL_APIENTRY glWeightPointerOES (GLint size, GLenum type, GLsizei stride, const void *pointer);
|
||||
#endif
|
||||
#endif /* GL_OES_matrix_palette */
|
||||
|
||||
#ifndef GL_OES_packed_depth_stencil
|
||||
#define GL_OES_packed_depth_stencil 1
|
||||
#define GL_DEPTH_STENCIL_OES 0x84F9
|
||||
#define GL_UNSIGNED_INT_24_8_OES 0x84FA
|
||||
#define GL_DEPTH24_STENCIL8_OES 0x88F0
|
||||
#endif /* GL_OES_packed_depth_stencil */
|
||||
|
||||
#ifndef GL_OES_query_matrix
|
||||
#define GL_OES_query_matrix 1
|
||||
typedef GLbitfield (GL_APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed *mantissa, GLint *exponent);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API GLbitfield GL_APIENTRY glQueryMatrixxOES (GLfixed *mantissa, GLint *exponent);
|
||||
#endif
|
||||
#endif /* GL_OES_query_matrix */
|
||||
|
||||
#ifndef GL_OES_required_internalformat
|
||||
#define GL_OES_required_internalformat 1
|
||||
#define GL_ALPHA8_OES 0x803C
|
||||
#define GL_LUMINANCE4_ALPHA4_OES 0x8043
|
||||
#define GL_LUMINANCE8_ALPHA8_OES 0x8045
|
||||
#define GL_LUMINANCE8_OES 0x8040
|
||||
#define GL_RGB8_OES 0x8051
|
||||
#define GL_RGBA8_OES 0x8058
|
||||
#define GL_RGB10_EXT 0x8052
|
||||
#define GL_RGB10_A2_EXT 0x8059
|
||||
#endif /* GL_OES_required_internalformat */
|
||||
|
||||
#ifndef GL_OES_rgb8_rgba8
|
||||
#define GL_OES_rgb8_rgba8 1
|
||||
#endif /* GL_OES_rgb8_rgba8 */
|
||||
|
||||
#ifndef GL_OES_single_precision
|
||||
#define GL_OES_single_precision 1
|
||||
typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth);
|
||||
typedef void (GL_APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation);
|
||||
typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf n, GLclampf f);
|
||||
typedef void (GL_APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
|
||||
typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum plane, GLfloat *equation);
|
||||
typedef void (GL_APIENTRYP PFNGLORTHOFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glClearDepthfOES (GLclampf depth);
|
||||
GL_API void GL_APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation);
|
||||
GL_API void GL_APIENTRY glDepthRangefOES (GLclampf n, GLclampf f);
|
||||
GL_API void GL_APIENTRY glFrustumfOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
|
||||
GL_API void GL_APIENTRY glGetClipPlanefOES (GLenum plane, GLfloat *equation);
|
||||
GL_API void GL_APIENTRY glOrthofOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
|
||||
#endif
|
||||
#endif /* GL_OES_single_precision */
|
||||
|
||||
#ifndef GL_OES_stencil1
|
||||
#define GL_OES_stencil1 1
|
||||
#define GL_STENCIL_INDEX1_OES 0x8D46
|
||||
#endif /* GL_OES_stencil1 */
|
||||
|
||||
#ifndef GL_OES_stencil4
|
||||
#define GL_OES_stencil4 1
|
||||
#define GL_STENCIL_INDEX4_OES 0x8D47
|
||||
#endif /* GL_OES_stencil4 */
|
||||
|
||||
#ifndef GL_OES_stencil8
|
||||
#define GL_OES_stencil8 1
|
||||
#define GL_STENCIL_INDEX8_OES 0x8D48
|
||||
#endif /* GL_OES_stencil8 */
|
||||
|
||||
#ifndef GL_OES_stencil_wrap
|
||||
#define GL_OES_stencil_wrap 1
|
||||
#define GL_INCR_WRAP_OES 0x8507
|
||||
#define GL_DECR_WRAP_OES 0x8508
|
||||
#endif /* GL_OES_stencil_wrap */
|
||||
|
||||
#ifndef GL_OES_surfaceless_context
|
||||
#define GL_OES_surfaceless_context 1
|
||||
#define GL_FRAMEBUFFER_UNDEFINED_OES 0x8219
|
||||
#endif /* GL_OES_surfaceless_context */
|
||||
|
||||
#ifndef GL_OES_texture_cube_map
|
||||
#define GL_OES_texture_cube_map 1
|
||||
#define GL_NORMAL_MAP_OES 0x8511
|
||||
#define GL_REFLECTION_MAP_OES 0x8512
|
||||
#define GL_TEXTURE_CUBE_MAP_OES 0x8513
|
||||
#define GL_TEXTURE_BINDING_CUBE_MAP_OES 0x8514
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES 0x8515
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES 0x8516
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES 0x8517
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES 0x8518
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES 0x8519
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES 0x851A
|
||||
#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES 0x851C
|
||||
#define GL_TEXTURE_GEN_MODE_OES 0x2500
|
||||
#define GL_TEXTURE_GEN_STR_OES 0x8D60
|
||||
typedef void (GL_APIENTRYP PFNGLTEXGENFOESPROC) (GLenum coord, GLenum pname, GLfloat param);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXGENFVOESPROC) (GLenum coord, GLenum pname, const GLfloat *params);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXGENIOESPROC) (GLenum coord, GLenum pname, GLint param);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXGENIVOESPROC) (GLenum coord, GLenum pname, const GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETTEXGENFVOESPROC) (GLenum coord, GLenum pname, GLfloat *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETTEXGENIVOESPROC) (GLenum coord, GLenum pname, GLint *params);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glTexGenfOES (GLenum coord, GLenum pname, GLfloat param);
|
||||
GL_API void GL_APIENTRY glTexGenfvOES (GLenum coord, GLenum pname, const GLfloat *params);
|
||||
GL_API void GL_APIENTRY glTexGeniOES (GLenum coord, GLenum pname, GLint param);
|
||||
GL_API void GL_APIENTRY glTexGenivOES (GLenum coord, GLenum pname, const GLint *params);
|
||||
GL_API void GL_APIENTRY glGetTexGenfvOES (GLenum coord, GLenum pname, GLfloat *params);
|
||||
GL_API void GL_APIENTRY glGetTexGenivOES (GLenum coord, GLenum pname, GLint *params);
|
||||
#endif
|
||||
#endif /* GL_OES_texture_cube_map */
|
||||
|
||||
#ifndef GL_OES_texture_env_crossbar
|
||||
#define GL_OES_texture_env_crossbar 1
|
||||
#endif /* GL_OES_texture_env_crossbar */
|
||||
|
||||
#ifndef GL_OES_texture_mirrored_repeat
|
||||
#define GL_OES_texture_mirrored_repeat 1
|
||||
#define GL_MIRRORED_REPEAT_OES 0x8370
|
||||
#endif /* GL_OES_texture_mirrored_repeat */
|
||||
|
||||
#ifndef GL_OES_texture_npot
|
||||
#define GL_OES_texture_npot 1
|
||||
#endif /* GL_OES_texture_npot */
|
||||
|
||||
#ifndef GL_OES_vertex_array_object
|
||||
#define GL_OES_vertex_array_object 1
|
||||
#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5
|
||||
typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
|
||||
typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glBindVertexArrayOES (GLuint array);
|
||||
GL_API void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
|
||||
GL_API void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
|
||||
GL_API GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
|
||||
#endif
|
||||
#endif /* GL_OES_vertex_array_object */
|
||||
|
||||
#ifndef GL_AMD_compressed_3DC_texture
|
||||
#define GL_AMD_compressed_3DC_texture 1
|
||||
#define GL_3DC_X_AMD 0x87F9
|
||||
#define GL_3DC_XY_AMD 0x87FA
|
||||
#endif /* GL_AMD_compressed_3DC_texture */
|
||||
|
||||
#ifndef GL_AMD_compressed_ATC_texture
|
||||
#define GL_AMD_compressed_ATC_texture 1
|
||||
#define GL_ATC_RGB_AMD 0x8C92
|
||||
#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
|
||||
#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
|
||||
#endif /* GL_AMD_compressed_ATC_texture */
|
||||
|
||||
#ifndef GL_APPLE_copy_texture_levels
|
||||
#define GL_APPLE_copy_texture_levels 1
|
||||
typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
|
||||
#endif
|
||||
#endif /* GL_APPLE_copy_texture_levels */
|
||||
|
||||
#ifndef GL_APPLE_framebuffer_multisample
|
||||
#define GL_APPLE_framebuffer_multisample 1
|
||||
#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56
|
||||
#define GL_MAX_SAMPLES_APPLE 0x8D57
|
||||
#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8
|
||||
#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9
|
||||
#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6
|
||||
#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA
|
||||
typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GL_API void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
|
||||
#endif
|
||||
#endif /* GL_APPLE_framebuffer_multisample */
|
||||
|
||||
#ifndef GL_APPLE_sync
|
||||
#define GL_APPLE_sync 1
|
||||
typedef struct __GLsync *GLsync;
|
||||
typedef khronos_uint64_t GLuint64;
|
||||
typedef khronos_int64_t GLint64;
|
||||
#define GL_SYNC_OBJECT_APPLE 0x8A53
|
||||
#define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE 0x9111
|
||||
#define GL_OBJECT_TYPE_APPLE 0x9112
|
||||
#define GL_SYNC_CONDITION_APPLE 0x9113
|
||||
#define GL_SYNC_STATUS_APPLE 0x9114
|
||||
#define GL_SYNC_FLAGS_APPLE 0x9115
|
||||
#define GL_SYNC_FENCE_APPLE 0x9116
|
||||
#define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117
|
||||
#define GL_UNSIGNALED_APPLE 0x9118
|
||||
#define GL_SIGNALED_APPLE 0x9119
|
||||
#define GL_ALREADY_SIGNALED_APPLE 0x911A
|
||||
#define GL_TIMEOUT_EXPIRED_APPLE 0x911B
|
||||
#define GL_CONDITION_SATISFIED_APPLE 0x911C
|
||||
#define GL_WAIT_FAILED_APPLE 0x911D
|
||||
#define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE 0x00000001
|
||||
#define GL_TIMEOUT_IGNORED_APPLE 0xFFFFFFFFFFFFFFFFull
|
||||
typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync);
|
||||
typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
|
||||
typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
|
||||
typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags);
|
||||
GL_API GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync);
|
||||
GL_API void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync);
|
||||
GL_API GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
|
||||
GL_API void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
|
||||
GL_API void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params);
|
||||
GL_API void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
|
||||
#endif
|
||||
#endif /* GL_APPLE_sync */
|
||||
|
||||
#ifndef GL_APPLE_texture_2D_limited_npot
|
||||
#define GL_APPLE_texture_2D_limited_npot 1
|
||||
#endif /* GL_APPLE_texture_2D_limited_npot */
|
||||
|
||||
#ifndef GL_APPLE_texture_format_BGRA8888
|
||||
#define GL_APPLE_texture_format_BGRA8888 1
|
||||
#define GL_BGRA_EXT 0x80E1
|
||||
#define GL_BGRA8_EXT 0x93A1
|
||||
#endif /* GL_APPLE_texture_format_BGRA8888 */
|
||||
|
||||
#ifndef GL_APPLE_texture_max_level
|
||||
#define GL_APPLE_texture_max_level 1
|
||||
#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D
|
||||
#endif /* GL_APPLE_texture_max_level */
|
||||
|
||||
#ifndef GL_ARM_rgba8
|
||||
#define GL_ARM_rgba8 1
|
||||
#endif /* GL_ARM_rgba8 */
|
||||
|
||||
#ifndef GL_EXT_blend_minmax
|
||||
#define GL_EXT_blend_minmax 1
|
||||
#define GL_MIN_EXT 0x8007
|
||||
#define GL_MAX_EXT 0x8008
|
||||
#endif /* GL_EXT_blend_minmax */
|
||||
|
||||
#ifndef GL_EXT_debug_marker
|
||||
#define GL_EXT_debug_marker 1
|
||||
typedef char GLchar;
|
||||
typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
|
||||
typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
|
||||
typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
|
||||
GL_API void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
|
||||
GL_API void GL_APIENTRY glPopGroupMarkerEXT (void);
|
||||
#endif
|
||||
#endif /* GL_EXT_debug_marker */
|
||||
|
||||
#ifndef GL_EXT_discard_framebuffer
|
||||
#define GL_EXT_discard_framebuffer 1
|
||||
#define GL_COLOR_EXT 0x1800
|
||||
#define GL_DEPTH_EXT 0x1801
|
||||
#define GL_STENCIL_EXT 0x1802
|
||||
typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
|
||||
#endif
|
||||
#endif /* GL_EXT_discard_framebuffer */
|
||||
|
||||
#ifndef GL_EXT_map_buffer_range
|
||||
#define GL_EXT_map_buffer_range 1
|
||||
#define GL_MAP_READ_BIT_EXT 0x0001
|
||||
#define GL_MAP_WRITE_BIT_EXT 0x0002
|
||||
#define GL_MAP_INVALIDATE_RANGE_BIT_EXT 0x0004
|
||||
#define GL_MAP_INVALIDATE_BUFFER_BIT_EXT 0x0008
|
||||
#define GL_MAP_FLUSH_EXPLICIT_BIT_EXT 0x0010
|
||||
#define GL_MAP_UNSYNCHRONIZED_BIT_EXT 0x0020
|
||||
typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
|
||||
typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void *GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
|
||||
GL_API void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length);
|
||||
#endif
|
||||
#endif /* GL_EXT_map_buffer_range */
|
||||
|
||||
#ifndef GL_EXT_multi_draw_arrays
|
||||
#define GL_EXT_multi_draw_arrays 1
|
||||
typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
|
||||
typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
|
||||
GL_API void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
|
||||
#endif
|
||||
#endif /* GL_EXT_multi_draw_arrays */
|
||||
|
||||
#ifndef GL_EXT_multisampled_render_to_texture
|
||||
#define GL_EXT_multisampled_render_to_texture 1
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C
|
||||
#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
|
||||
#define GL_MAX_SAMPLES_EXT 0x8D57
|
||||
typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
|
||||
#endif
|
||||
#endif /* GL_EXT_multisampled_render_to_texture */
|
||||
|
||||
#ifndef GL_EXT_read_format_bgra
|
||||
#define GL_EXT_read_format_bgra 1
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365
|
||||
#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
|
||||
#endif /* GL_EXT_read_format_bgra */
|
||||
|
||||
#ifndef GL_EXT_robustness
|
||||
#define GL_EXT_robustness 1
|
||||
#define GL_GUILTY_CONTEXT_RESET_EXT 0x8253
|
||||
#define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254
|
||||
#define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255
|
||||
#define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3
|
||||
#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256
|
||||
#define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252
|
||||
#define GL_NO_RESET_NOTIFICATION_EXT 0x8261
|
||||
typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
|
||||
typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
|
||||
typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
|
||||
GL_API void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
|
||||
GL_API void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
|
||||
GL_API void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);
|
||||
#endif
|
||||
#endif /* GL_EXT_robustness */
|
||||
|
||||
#ifndef GL_EXT_sRGB
|
||||
#define GL_EXT_sRGB 1
|
||||
#define GL_SRGB_EXT 0x8C40
|
||||
#define GL_SRGB_ALPHA_EXT 0x8C42
|
||||
#define GL_SRGB8_ALPHA8_EXT 0x8C43
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210
|
||||
#endif /* GL_EXT_sRGB */
|
||||
|
||||
#ifndef GL_EXT_texture_compression_dxt1
|
||||
#define GL_EXT_texture_compression_dxt1 1
|
||||
#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
|
||||
#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
|
||||
#endif /* GL_EXT_texture_compression_dxt1 */
|
||||
|
||||
#ifndef GL_EXT_texture_filter_anisotropic
|
||||
#define GL_EXT_texture_filter_anisotropic 1
|
||||
#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
|
||||
#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
|
||||
#endif /* GL_EXT_texture_filter_anisotropic */
|
||||
|
||||
#ifndef GL_EXT_texture_format_BGRA8888
|
||||
#define GL_EXT_texture_format_BGRA8888 1
|
||||
#endif /* GL_EXT_texture_format_BGRA8888 */
|
||||
|
||||
#ifndef GL_EXT_texture_lod_bias
|
||||
#define GL_EXT_texture_lod_bias 1
|
||||
#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
|
||||
#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
|
||||
#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
|
||||
#endif /* GL_EXT_texture_lod_bias */
|
||||
|
||||
#ifndef GL_EXT_texture_storage
|
||||
#define GL_EXT_texture_storage 1
|
||||
#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F
|
||||
#define GL_ALPHA8_EXT 0x803C
|
||||
#define GL_LUMINANCE8_EXT 0x8040
|
||||
#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
|
||||
#define GL_RGBA32F_EXT 0x8814
|
||||
#define GL_RGB32F_EXT 0x8815
|
||||
#define GL_ALPHA32F_EXT 0x8816
|
||||
#define GL_LUMINANCE32F_EXT 0x8818
|
||||
#define GL_LUMINANCE_ALPHA32F_EXT 0x8819
|
||||
#define GL_RGBA16F_EXT 0x881A
|
||||
#define GL_RGB16F_EXT 0x881B
|
||||
#define GL_ALPHA16F_EXT 0x881C
|
||||
#define GL_LUMINANCE16F_EXT 0x881E
|
||||
#define GL_LUMINANCE_ALPHA16F_EXT 0x881F
|
||||
#define GL_R8_EXT 0x8229
|
||||
#define GL_RG8_EXT 0x822B
|
||||
#define GL_R32F_EXT 0x822E
|
||||
#define GL_RG32F_EXT 0x8230
|
||||
#define GL_R16F_EXT 0x822D
|
||||
#define GL_RG16F_EXT 0x822F
|
||||
typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
|
||||
GL_API void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GL_API void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
|
||||
GL_API void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
|
||||
GL_API void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GL_API void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
|
||||
#endif
|
||||
#endif /* GL_EXT_texture_storage */
|
||||
|
||||
#ifndef GL_IMG_multisampled_render_to_texture
|
||||
#define GL_IMG_multisampled_render_to_texture 1
|
||||
#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134
|
||||
#define GL_MAX_SAMPLES_IMG 0x9135
|
||||
#define GL_TEXTURE_SAMPLES_IMG 0x9136
|
||||
typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
|
||||
#endif
|
||||
#endif /* GL_IMG_multisampled_render_to_texture */
|
||||
|
||||
#ifndef GL_IMG_read_format
|
||||
#define GL_IMG_read_format 1
|
||||
#define GL_BGRA_IMG 0x80E1
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365
|
||||
#endif /* GL_IMG_read_format */
|
||||
|
||||
#ifndef GL_IMG_texture_compression_pvrtc
|
||||
#define GL_IMG_texture_compression_pvrtc 1
|
||||
#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
|
||||
#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
|
||||
#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
|
||||
#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
|
||||
#endif /* GL_IMG_texture_compression_pvrtc */
|
||||
|
||||
#ifndef GL_IMG_texture_env_enhanced_fixed_function
|
||||
#define GL_IMG_texture_env_enhanced_fixed_function 1
|
||||
#define GL_MODULATE_COLOR_IMG 0x8C04
|
||||
#define GL_RECIP_ADD_SIGNED_ALPHA_IMG 0x8C05
|
||||
#define GL_TEXTURE_ALPHA_MODULATE_IMG 0x8C06
|
||||
#define GL_FACTOR_ALPHA_MODULATE_IMG 0x8C07
|
||||
#define GL_FRAGMENT_ALPHA_MODULATE_IMG 0x8C08
|
||||
#define GL_ADD_BLEND_IMG 0x8C09
|
||||
#define GL_DOT3_RGBA_IMG 0x86AF
|
||||
#endif /* GL_IMG_texture_env_enhanced_fixed_function */
|
||||
|
||||
#ifndef GL_IMG_user_clip_plane
|
||||
#define GL_IMG_user_clip_plane 1
|
||||
#define GL_CLIP_PLANE0_IMG 0x3000
|
||||
#define GL_CLIP_PLANE1_IMG 0x3001
|
||||
#define GL_CLIP_PLANE2_IMG 0x3002
|
||||
#define GL_CLIP_PLANE3_IMG 0x3003
|
||||
#define GL_CLIP_PLANE4_IMG 0x3004
|
||||
#define GL_CLIP_PLANE5_IMG 0x3005
|
||||
#define GL_MAX_CLIP_PLANES_IMG 0x0D32
|
||||
typedef void (GL_APIENTRYP PFNGLCLIPPLANEFIMGPROC) (GLenum p, const GLfloat *eqn);
|
||||
typedef void (GL_APIENTRYP PFNGLCLIPPLANEXIMGPROC) (GLenum p, const GLfixed *eqn);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glClipPlanefIMG (GLenum p, const GLfloat *eqn);
|
||||
GL_API void GL_APIENTRY glClipPlanexIMG (GLenum p, const GLfixed *eqn);
|
||||
#endif
|
||||
#endif /* GL_IMG_user_clip_plane */
|
||||
|
||||
#ifndef GL_NV_fence
|
||||
#define GL_NV_fence 1
|
||||
#define GL_ALL_COMPLETED_NV 0x84F2
|
||||
#define GL_FENCE_STATUS_NV 0x84F3
|
||||
#define GL_FENCE_CONDITION_NV 0x84F4
|
||||
typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
|
||||
typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
|
||||
typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
|
||||
typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
|
||||
GL_API void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
|
||||
GL_API GLboolean GL_APIENTRY glIsFenceNV (GLuint fence);
|
||||
GL_API GLboolean GL_APIENTRY glTestFenceNV (GLuint fence);
|
||||
GL_API void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
|
||||
GL_API void GL_APIENTRY glFinishFenceNV (GLuint fence);
|
||||
GL_API void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
|
||||
#endif
|
||||
#endif /* GL_NV_fence */
|
||||
|
||||
#ifndef GL_QCOM_driver_control
|
||||
#define GL_QCOM_driver_control 1
|
||||
typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
|
||||
typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
|
||||
typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
|
||||
typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
|
||||
GL_API void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
|
||||
GL_API void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
|
||||
GL_API void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
|
||||
#endif
|
||||
#endif /* GL_QCOM_driver_control */
|
||||
|
||||
#ifndef GL_QCOM_extended_get
|
||||
#define GL_QCOM_extended_get 1
|
||||
#define GL_TEXTURE_WIDTH_QCOM 0x8BD2
|
||||
#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3
|
||||
#define GL_TEXTURE_DEPTH_QCOM 0x8BD4
|
||||
#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5
|
||||
#define GL_TEXTURE_FORMAT_QCOM 0x8BD6
|
||||
#define GL_TEXTURE_TYPE_QCOM 0x8BD7
|
||||
#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8
|
||||
#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9
|
||||
#define GL_TEXTURE_TARGET_QCOM 0x8BDA
|
||||
#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB
|
||||
#define GL_STATE_RESTORE 0x8BDC
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, void **params);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
|
||||
GL_API void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
|
||||
GL_API void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
|
||||
GL_API void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
|
||||
GL_API void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
|
||||
GL_API void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
|
||||
GL_API void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels);
|
||||
GL_API void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, void **params);
|
||||
#endif
|
||||
#endif /* GL_QCOM_extended_get */
|
||||
|
||||
#ifndef GL_QCOM_extended_get2
|
||||
#define GL_QCOM_extended_get2 1
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
|
||||
typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
|
||||
GL_API void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
|
||||
GL_API GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
|
||||
GL_API void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
|
||||
#endif
|
||||
#endif /* GL_QCOM_extended_get2 */
|
||||
|
||||
#ifndef GL_QCOM_perfmon_global_mode
|
||||
#define GL_QCOM_perfmon_global_mode 1
|
||||
#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0
|
||||
#endif /* GL_QCOM_perfmon_global_mode */
|
||||
|
||||
#ifndef GL_QCOM_tiled_rendering
|
||||
#define GL_QCOM_tiled_rendering 1
|
||||
#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001
|
||||
#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002
|
||||
#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004
|
||||
#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008
|
||||
#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010
|
||||
#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020
|
||||
#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040
|
||||
#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080
|
||||
#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100
|
||||
#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200
|
||||
#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400
|
||||
#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800
|
||||
#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000
|
||||
#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000
|
||||
#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000
|
||||
#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000
|
||||
#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000
|
||||
#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000
|
||||
#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000
|
||||
#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000
|
||||
#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000
|
||||
#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000
|
||||
#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000
|
||||
#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000
|
||||
#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000
|
||||
#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000
|
||||
#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000
|
||||
#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000
|
||||
#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000
|
||||
#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000
|
||||
#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000
|
||||
#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000
|
||||
typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
|
||||
typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GL_API void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
|
||||
GL_API void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
|
||||
#endif
|
||||
#endif /* GL_QCOM_tiled_rendering */
|
||||
|
||||
#ifndef GL_QCOM_writeonly_rendering
|
||||
#define GL_QCOM_writeonly_rendering 1
|
||||
#define GL_WRITEONLY_RENDERING_QCOM 0x8823
|
||||
#endif /* GL_QCOM_writeonly_rendering */
|
||||
|
||||
/* ANGLE GLES1 extensions */
|
||||
#include "glext_angle.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
17
gfx/angle/checkout/include/GLES/glext_angle.h
Normal file
17
gfx/angle/checkout/include/GLES/glext_angle.h
Normal file
@ -0,0 +1,17 @@
|
||||
//
|
||||
// Copyright (c) 2018 The ANGLE Project Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
//
|
||||
// glext_angle.h: ANGLE modifications to the glext.h header file.
|
||||
// Currently we don't include this file directly, we patch glext.h
|
||||
// to include it implicitly so it is visible throughout our code.
|
||||
|
||||
#ifndef INCLUDE_GLES_GLEXT_ANGLE_H_
|
||||
#define INCLUDE_GLES_GLEXT_ANGLE_H_
|
||||
|
||||
// clang-format off
|
||||
|
||||
// clang-format on
|
||||
|
||||
#endif // INCLUDE_GLES_GLEXT_ANGLE_H_
|
38
gfx/angle/checkout/include/GLES/glplatform.h
Normal file
38
gfx/angle/checkout/include/GLES/glplatform.h
Normal file
@ -0,0 +1,38 @@
|
||||
#ifndef __glplatform_h_
|
||||
#define __glplatform_h_
|
||||
|
||||
/*
|
||||
** Copyright (c) 2017 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/* Platform-specific types and definitions for OpenGL ES 1.X gl.h
|
||||
*
|
||||
* Adopters may modify khrplatform.h and this file to suit their platform.
|
||||
* Please contribute modifications back to Khronos as pull requests on the
|
||||
* public github repository:
|
||||
* https://github.com/KhronosGroup/OpenGL-Registry
|
||||
*/
|
||||
|
||||
#include <KHR/khrplatform.h>
|
||||
|
||||
#ifndef GL_API
|
||||
#define GL_API KHRONOS_APICALL
|
||||
#endif
|
||||
|
||||
#ifndef GL_APIENTRY
|
||||
#define GL_APIENTRY KHRONOS_APIENTRY
|
||||
#endif
|
||||
|
||||
#endif /* __glplatform_h_ */
|
@ -29,7 +29,7 @@ GL_APICALL void GL_APIENTRY glRequestExtensionANGLE (const GLchar *name);
|
||||
|
||||
#ifndef GL_ANGLE_robust_resource_initialization
|
||||
#define GL_ANGLE_robust_resource_initialization 1
|
||||
#define GL_CONTEXT_ROBUST_RESOURCE_INITIALIZATION_ANGLE 0x93AB
|
||||
#define GL_ROBUST_RESOURCE_INITIALIZATION_ANGLE 0x93AB
|
||||
#endif /* GL_ANGLE_robust_resource_initialization */
|
||||
|
||||
#ifndef GL_CHROMIUM_framebuffer_mixed_samples
|
@ -25,7 +25,7 @@
|
||||
|
||||
// Version number for shader translation API.
|
||||
// It is incremented every time the API changes.
|
||||
#define ANGLE_SH_VERSION 182
|
||||
#define ANGLE_SH_VERSION 196
|
||||
|
||||
enum ShShaderSpec
|
||||
{
|
||||
@ -214,13 +214,9 @@ const ShCompileOptions SH_REWRITE_FLOAT_UNARY_MINUS_OPERATOR = UINT64_C(1) << 29
|
||||
// It works by using an expression to emulate this function.
|
||||
const ShCompileOptions SH_EMULATE_ATAN2_FLOAT_FUNCTION = UINT64_C(1) << 30;
|
||||
|
||||
// Set to 1 to translate gl_ViewID_OVR to an uniform so that the extension can be emulated.
|
||||
// "uniform highp uint ViewID_OVR".
|
||||
const ShCompileOptions SH_TRANSLATE_VIEWID_OVR_TO_UNIFORM = UINT64_C(1) << 31;
|
||||
|
||||
// Set to initialize uninitialized local variables. Should only be used with GLSL output. In HLSL
|
||||
// output variables are initialized regardless of if this flag is set.
|
||||
const ShCompileOptions SH_INITIALIZE_UNINITIALIZED_LOCALS = UINT64_C(1) << 32;
|
||||
// Set to initialize uninitialized local and global temporary variables. Should only be used with
|
||||
// GLSL output. In HLSL output variables are initialized regardless of if this flag is set.
|
||||
const ShCompileOptions SH_INITIALIZE_UNINITIALIZED_LOCALS = UINT64_C(1) << 31;
|
||||
|
||||
// The flag modifies the shader in the following way:
|
||||
// Every occurrence of gl_InstanceID is replaced by the global temporary variable InstanceID.
|
||||
@ -229,7 +225,7 @@ const ShCompileOptions SH_INITIALIZE_UNINITIALIZED_LOCALS = UINT64_C(1) << 32;
|
||||
// ViewID_OVR = uint(gl_InstanceID) % num_views;
|
||||
// InstanceID = gl_InstanceID / num_views;
|
||||
// ViewID_OVR is added as a varying variable to both the vertex and fragment shaders.
|
||||
const ShCompileOptions SH_INITIALIZE_BUILTINS_FOR_INSTANCED_MULTIVIEW = UINT64_C(1) << 33;
|
||||
const ShCompileOptions SH_INITIALIZE_BUILTINS_FOR_INSTANCED_MULTIVIEW = UINT64_C(1) << 32;
|
||||
|
||||
// With the flag enabled the GLSL/ESSL vertex shader is modified to include code for viewport
|
||||
// selection in the following way:
|
||||
@ -239,11 +235,31 @@ const ShCompileOptions SH_INITIALIZE_BUILTINS_FOR_INSTANCED_MULTIVIEW = UINT64_C
|
||||
// - A declaration of the uniform multiviewBaseViewLayerIndex.
|
||||
// Note: The SH_INITIALIZE_BUILTINS_FOR_INSTANCED_MULTIVIEW flag also has to be enabled to have the
|
||||
// temporary variable ViewID_OVR declared and initialized.
|
||||
const ShCompileOptions SH_SELECT_VIEW_IN_NV_GLSL_VERTEX_SHADER = UINT64_C(1) << 34;
|
||||
const ShCompileOptions SH_SELECT_VIEW_IN_NV_GLSL_VERTEX_SHADER = UINT64_C(1) << 33;
|
||||
|
||||
// If the flag is enabled, gl_PointSize is clamped to the maximum point size specified in
|
||||
// ShBuiltInResources in vertex shaders.
|
||||
const ShCompileOptions SH_CLAMP_POINT_SIZE = UINT64_C(1) << 35;
|
||||
const ShCompileOptions SH_CLAMP_POINT_SIZE = UINT64_C(1) << 34;
|
||||
|
||||
// Turn some arithmetic operations that operate on a float vector-scalar pair into vector-vector
|
||||
// operations. This is done recursively. Some scalar binary operations inside vector constructors
|
||||
// are also turned into vector operations.
|
||||
//
|
||||
// This is targeted to work around a bug in NVIDIA OpenGL drivers that was reproducible on NVIDIA
|
||||
// driver version 387.92. It works around the most common occurrences of the bug.
|
||||
const ShCompileOptions SH_REWRITE_VECTOR_SCALAR_ARITHMETIC = UINT64_C(1) << 35;
|
||||
|
||||
// Don't use loops to initialize uninitialized variables. Only has an effect if some kind of
|
||||
// variable initialization is turned on.
|
||||
const ShCompileOptions SH_DONT_USE_LOOPS_TO_INITIALIZE_VARIABLES = UINT64_C(1) << 36;
|
||||
|
||||
// Don't use D3D constant register zero when allocating space for uniforms. This is targeted to work
|
||||
// around a bug in NVIDIA D3D driver version 388.59 where in very specific cases the driver would
|
||||
// not handle constant register zero correctly. Only has an effect on HLSL translation.
|
||||
const ShCompileOptions SH_SKIP_D3D_CONSTANT_REGISTER_ZERO = UINT64_C(1) << 37;
|
||||
|
||||
// Clamp gl_FragDepth to the range [0.0, 1.0] in case it is statically used.
|
||||
const ShCompileOptions SH_CLAMP_FRAG_DEPTH = UINT64_C(1) << 38;
|
||||
|
||||
// Defines alternate strategies for implementing array index clamping.
|
||||
enum ShArrayIndexClampingStrategy
|
||||
@ -292,7 +308,7 @@ struct ShBuiltInResources
|
||||
int ARM_shader_framebuffer_fetch;
|
||||
int OVR_multiview;
|
||||
int EXT_YUV_target;
|
||||
int OES_geometry_shader;
|
||||
int EXT_geometry_shader;
|
||||
|
||||
// Set to 1 to enable replacing GL_EXT_draw_buffers #extension directives
|
||||
// with GL_NV_draw_buffers in ESSL output. This flag can be used to emulate
|
||||
@ -418,7 +434,7 @@ struct ShBuiltInResources
|
||||
// maximum point size (higher limit from ALIASED_POINT_SIZE_RANGE)
|
||||
float MaxPointSize;
|
||||
|
||||
// OES_geometry_shader constants
|
||||
// EXT_geometry_shader constants
|
||||
int MaxGeometryUniformComponents;
|
||||
int MaxGeometryUniformBlocks;
|
||||
int MaxGeometryInputComponents;
|
||||
@ -586,6 +602,14 @@ bool GetUniformBlockRegister(const ShHandle handle,
|
||||
// Note that the map contains also registers of samplers that have been extracted from structs.
|
||||
const std::map<std::string, unsigned int> *GetUniformRegisterMap(const ShHandle handle);
|
||||
|
||||
bool HasValidGeometryShaderInputPrimitiveType(const ShHandle handle);
|
||||
bool HasValidGeometryShaderOutputPrimitiveType(const ShHandle handle);
|
||||
bool HasValidGeometryShaderMaxVertices(const ShHandle handle);
|
||||
GLenum GetGeometryShaderInputPrimitiveType(const ShHandle handle);
|
||||
GLenum GetGeometryShaderOutputPrimitiveType(const ShHandle handle);
|
||||
int GetGeometryShaderInvocations(const ShHandle handle);
|
||||
int GetGeometryShaderMaxVertices(const ShHandle handle);
|
||||
|
||||
} // namespace sh
|
||||
|
||||
#endif // GLSLANG_SHADERLANG_H_
|
@ -11,6 +11,7 @@
|
||||
#define GLSLANG_SHADERVARS_H_
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@ -37,6 +38,8 @@ bool InterpolationTypesMatch(InterpolationType a, InterpolationType b);
|
||||
enum BlockLayoutType
|
||||
{
|
||||
BLOCKLAYOUT_STANDARD,
|
||||
BLOCKLAYOUT_STD140 = BLOCKLAYOUT_STANDARD,
|
||||
BLOCKLAYOUT_STD430, // Shader storage block layout qualifier
|
||||
BLOCKLAYOUT_PACKED,
|
||||
BLOCKLAYOUT_SHARED
|
||||
};
|
||||
@ -59,13 +62,35 @@ enum class BlockType
|
||||
struct ShaderVariable
|
||||
{
|
||||
ShaderVariable();
|
||||
ShaderVariable(GLenum typeIn);
|
||||
ShaderVariable(GLenum typeIn, unsigned int arraySizeIn);
|
||||
~ShaderVariable();
|
||||
ShaderVariable(const ShaderVariable &other);
|
||||
ShaderVariable &operator=(const ShaderVariable &other);
|
||||
|
||||
bool isArray() const { return arraySize > 0; }
|
||||
unsigned int elementCount() const { return std::max(1u, arraySize); }
|
||||
bool isArrayOfArrays() const { return arraySizes.size() >= 2u; }
|
||||
bool isArray() const { return !arraySizes.empty(); }
|
||||
unsigned int getArraySizeProduct() const;
|
||||
|
||||
// Array size 0 means not an array when passed to or returned from these functions.
|
||||
// Note that setArraySize() is deprecated and should not be used inside ANGLE.
|
||||
unsigned int getOutermostArraySize() const { return isArray() ? arraySizes.back() : 0; }
|
||||
void setArraySize(unsigned int size);
|
||||
|
||||
// Turn this ShaderVariable from an array into a specific element in that array. Will update
|
||||
// flattenedOffsetInParentArrays.
|
||||
void indexIntoArray(unsigned int arrayIndex);
|
||||
|
||||
// Get the nth nested array size from the top. Caller is responsible for range checking
|
||||
// arrayNestingIndex.
|
||||
unsigned int getNestedArraySize(unsigned int arrayNestingIndex) const;
|
||||
|
||||
// This function should only be used with variables that are of a basic type or an array of a
|
||||
// basic type. Shader interface variables that are enumerated according to rules in GLES 3.1
|
||||
// spec section 7.3.1.1 page 77 are fine. For those variables the return value should match the
|
||||
// ARRAY_SIZE value that can be queried through the API.
|
||||
unsigned int getBasicTypeElementCount() const;
|
||||
|
||||
bool isStruct() const { return !fields.empty(); }
|
||||
|
||||
// All of the shader's variables are described using nested data
|
||||
@ -83,13 +108,24 @@ struct ShaderVariable
|
||||
const ShaderVariable **leafVar,
|
||||
std::string* originalFullName) const;
|
||||
|
||||
bool isBuiltIn() const { return name.compare(0, 3, "gl_") == 0; }
|
||||
bool isBuiltIn() const;
|
||||
|
||||
GLenum type;
|
||||
GLenum precision;
|
||||
std::string name;
|
||||
std::string mappedName;
|
||||
unsigned int arraySize;
|
||||
|
||||
// Used to make an array type. Outermost array size is stored at the end of the vector.
|
||||
std::vector<unsigned int> arraySizes;
|
||||
|
||||
// Offset of this variable in parent arrays. In case the parent is an array of arrays, the
|
||||
// offset is outerArrayElement * innerArraySize + innerArrayElement.
|
||||
// For example, if there's a variable declared as size 3 array of size 4 array of int:
|
||||
// int a[3][4];
|
||||
// then the flattenedOffsetInParentArrays of a[2] would be 2.
|
||||
// and flattenedOffsetInParentArrays of a[2][1] would be 2*4 + 1 = 9.
|
||||
unsigned int flattenedOffsetInParentArrays;
|
||||
|
||||
bool staticUse;
|
||||
std::vector<ShaderVariable> fields;
|
||||
std::string structName;
|
||||
@ -134,6 +170,8 @@ struct Uniform : public VariableWithLocation
|
||||
|
||||
int binding;
|
||||
int offset;
|
||||
bool readonly;
|
||||
bool writeonly;
|
||||
|
||||
// Decide whether two uniforms are the same at shader link time,
|
||||
// assuming one from vertex shader and the other from fragment shader.
|
||||
@ -188,7 +226,7 @@ struct Varying : public VariableWithLocation
|
||||
{
|
||||
Varying();
|
||||
~Varying();
|
||||
Varying(const Varying &otherg);
|
||||
Varying(const Varying &other);
|
||||
Varying &operator=(const Varying &other);
|
||||
bool operator==(const Varying &other) const;
|
||||
bool operator!=(const Varying &other) const
|
||||
@ -224,14 +262,21 @@ struct InterfaceBlock
|
||||
// Decide whether two interface blocks are the same at shader link time.
|
||||
bool isSameInterfaceBlockAtLinkTime(const InterfaceBlock &other) const;
|
||||
|
||||
bool isBuiltIn() const { return name.compare(0, 3, "gl_") == 0; }
|
||||
bool isBuiltIn() const;
|
||||
|
||||
bool isArray() const { return arraySize > 0; }
|
||||
unsigned int elementCount() const { return std::max(1u, arraySize); }
|
||||
|
||||
std::string name;
|
||||
std::string mappedName;
|
||||
std::string instanceName;
|
||||
unsigned int arraySize;
|
||||
BlockLayoutType layout;
|
||||
|
||||
// Deprecated. Matrix packing should only be queried from individual fields of the block.
|
||||
// TODO(oetuaho): Remove this once it is no longer used in Chromium.
|
||||
bool isRowMajorLayout;
|
||||
|
||||
int binding;
|
||||
bool staticUse;
|
||||
BlockType blockType;
|
||||
@ -240,6 +285,13 @@ struct InterfaceBlock
|
||||
|
||||
struct WorkGroupSize
|
||||
{
|
||||
// Must have a trivial default constructor since it is used in YYSTYPE.
|
||||
WorkGroupSize() = default;
|
||||
explicit constexpr WorkGroupSize(int initialSize)
|
||||
: localSizeQualifiers{initialSize, initialSize, initialSize}
|
||||
{
|
||||
}
|
||||
|
||||
void fill(int fillValue);
|
||||
void setLocalSize(int localSizeX, int localSizeY, int localSizeZ);
|
||||
|
||||
@ -261,7 +313,7 @@ struct WorkGroupSize
|
||||
// Checks whether either all of the values are set, or none of them are.
|
||||
bool isLocalSizeValid() const;
|
||||
|
||||
int localSizeQualifiers[3];
|
||||
std::array<int, 3> localSizeQualifiers;
|
||||
};
|
||||
|
||||
} // namespace sh
|
0
gfx/angle/include/KHR/khrplatform.h → gfx/angle/checkout/include/KHR/khrplatform.h
Executable file → Normal file
0
gfx/angle/include/KHR/khrplatform.h → gfx/angle/checkout/include/KHR/khrplatform.h
Executable file → Normal file
@ -10,6 +10,8 @@
|
||||
#ifndef ANGLEGL_H_
|
||||
#define ANGLEGL_H_
|
||||
|
||||
#include "GLES/gl.h"
|
||||
#include "GLES/glext.h"
|
||||
#include "GLES2/gl2.h"
|
||||
#include "GLES2/gl2ext.h"
|
||||
#include "GLES3/gl3.h"
|
@ -15,11 +15,11 @@
|
||||
#if defined(_WIN32)
|
||||
# if !defined(LIBANGLE_IMPLEMENTATION)
|
||||
# define ANGLE_PLATFORM_EXPORT __declspec(dllimport)
|
||||
# else
|
||||
# define ANGLE_PLATFORM_EXPORT __declspec(dllexport)
|
||||
# endif
|
||||
#elif defined(__GNUC__)
|
||||
# if defined(LIBANGLE_IMPLEMENTATION)
|
||||
# define ANGLE_PLATFORM_EXPORT __attribute__((visibility ("default")))
|
||||
# endif
|
||||
#elif defined(__GNUC__) || defined(__clang__)
|
||||
# define ANGLE_PLATFORM_EXPORT __attribute__((visibility ("default")))
|
||||
#endif
|
||||
#if !defined(ANGLE_PLATFORM_EXPORT)
|
||||
# define ANGLE_PLATFORM_EXPORT
|
||||
@ -264,8 +264,10 @@ inline void DefaultCacheProgram(PlatformMethods *platform,
|
||||
|
||||
#define ANGLE_PLATFORM_METHOD_DEF(Name, CapsName) CapsName##Func Name = Default##CapsName;
|
||||
|
||||
struct PlatformMethods
|
||||
struct ANGLE_PLATFORM_EXPORT PlatformMethods
|
||||
{
|
||||
PlatformMethods();
|
||||
|
||||
// User data pointer for any implementation specific members. Put it at the start of the
|
||||
// platform structure so it doesn't become overwritten if one version of the platform
|
||||
// adds or removes new members.
|
@ -97,9 +97,9 @@ struct WorkaroundsD3D
|
||||
// This driver bug is fixed in 21.20.16.4542.
|
||||
bool emulateIsnanFloat = false;
|
||||
|
||||
// On some Intel drivers, using clear() may not take effect. One of such situation is to clear
|
||||
// a target with width or height < 16. To work around this bug, we call clear() twice on these
|
||||
// platforms. Tracking bug: https://crbug.com/655534
|
||||
// On some Intel drivers, using clear() may not take effect. To work around this bug, we call
|
||||
// clear() twice on these platforms.
|
||||
// Tracking bug: https://crbug.com/655534
|
||||
bool callClearTwice = false;
|
||||
|
||||
// On some Intel drivers, copying from staging storage to constant buffer storage does not
|
||||
@ -112,6 +112,22 @@ struct WorkaroundsD3D
|
||||
// target slice will be selected in the geometry shader stage. The workaround flag is added to
|
||||
// make it possible to select the code path in end2end and performance tests.
|
||||
bool selectViewInGeometryShader = false;
|
||||
|
||||
// When rendering with no render target on D3D, two bugs lead to incorrect behavior on Intel
|
||||
// drivers < 4815. The rendering samples always pass neglecting discard statements in pixel
|
||||
// shader.
|
||||
// 1. If rendertarget is not set, the pixel shader will be recompiled to drop 'SV_TARGET'.
|
||||
// When using a pixel shader with no 'SV_TARGET' in a draw, the pixels are always generated even
|
||||
// if they should be discard by 'discard' statements.
|
||||
// 2. If ID3D11BlendState.RenderTarget[].RenderTargetWriteMask is 0 and rendertarget is not set,
|
||||
// then rendering samples also pass neglecting discard statements in pixel shader.
|
||||
// So we add a dummy texture as render target in such case. See http://anglebug.com/2152
|
||||
bool addDummyTextureNoRenderTarget = false;
|
||||
|
||||
// Don't use D3D constant register zero when allocating space for uniforms in the vertex shader.
|
||||
// This is targeted to work around a bug in NVIDIA D3D driver version 388.59 where in very
|
||||
// specific cases the driver would not handle constant register zero correctly.
|
||||
bool skipVSConstantRegisterZero = false;
|
||||
};
|
||||
|
||||
} // namespace angle
|
3
gfx/angle/checkout/out/gen/angle/id/commit.h
Normal file
3
gfx/angle/checkout/out/gen/angle/id/commit.h
Normal file
@ -0,0 +1,3 @@
|
||||
#define ANGLE_COMMIT_HASH "7edc21933ef1"
|
||||
#define ANGLE_COMMIT_HASH_SIZE 12
|
||||
#define ANGLE_COMMIT_DATE "2018-03-01 22:15:11 -0800"
|
63
gfx/angle/checkout/src/common/aligned_memory.cpp
Normal file
63
gfx/angle/checkout/src/common/aligned_memory.cpp
Normal file
@ -0,0 +1,63 @@
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// aligned_memory: An aligned memory allocator. Based on Chrome's base/memory/aligned_memory.
|
||||
//
|
||||
|
||||
#include "common/aligned_memory.h"
|
||||
|
||||
#include "common/debug.h"
|
||||
|
||||
#if defined(COMPILER_MSVC)
|
||||
#include <malloc.h>
|
||||
#else
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
namespace angle
|
||||
{
|
||||
|
||||
void *AlignedAlloc(size_t size, size_t alignment)
|
||||
{
|
||||
ASSERT(size > 0);
|
||||
ASSERT((alignment & (alignment - 1)) == 0);
|
||||
ASSERT((alignment % sizeof(void *)) == 0);
|
||||
void *ptr = nullptr;
|
||||
#if defined(ANGLE_PLATFORM_WINDOWS)
|
||||
ptr = _aligned_malloc(size, alignment);
|
||||
// Android technically supports posix_memalign(), but does not expose it in
|
||||
// the current version of the library headers used by Chrome. Luckily,
|
||||
// memalign() on Android returns pointers which can safely be used with
|
||||
// free(), so we can use it instead. Issue filed to document this:
|
||||
// http://code.google.com/p/android/issues/detail?id=35391
|
||||
#elif defined(ANGLE_PLATFORM_ANDROID)
|
||||
ptr = memalign(alignment, size);
|
||||
#else
|
||||
if (posix_memalign(&ptr, alignment, size))
|
||||
ptr = nullptr;
|
||||
#endif
|
||||
// Since aligned allocations may fail for non-memory related reasons, force a
|
||||
// crash if we encounter a failed allocation.
|
||||
if (!ptr)
|
||||
{
|
||||
ERR() << "If you crashed here, your aligned allocation is incorrect: "
|
||||
<< "size=" << size << ", alignment=" << alignment;
|
||||
ASSERT(false);
|
||||
}
|
||||
// Sanity check alignment just to be safe.
|
||||
ASSERT((reinterpret_cast<uintptr_t>(ptr) & (alignment - 1)) == 0);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void AlignedFree(void *ptr)
|
||||
{
|
||||
#if defined(_MSC_VER)
|
||||
_aligned_free(ptr);
|
||||
#else
|
||||
free(ptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace angle
|
23
gfx/angle/checkout/src/common/aligned_memory.h
Normal file
23
gfx/angle/checkout/src/common/aligned_memory.h
Normal file
@ -0,0 +1,23 @@
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// aligned_memory: An aligned memory allocator. Based on Chrome's base/memory/aligned_memory.
|
||||
//
|
||||
|
||||
#ifndef COMMON_ALIGNED_MEMORY_H_
|
||||
#define COMMON_ALIGNED_MEMORY_H_
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
namespace angle
|
||||
{
|
||||
|
||||
// This can be replaced with std::aligned_malloc when we have C++17.
|
||||
void *AlignedAlloc(size_t size, size_t alignment);
|
||||
void AlignedFree(void *ptr);
|
||||
|
||||
} // namespace angle
|
||||
|
||||
#endif // COMMON_ALIGNED_MEMORY_H_
|
@ -14,9 +14,39 @@
|
||||
|
||||
namespace angle
|
||||
{
|
||||
// dirtyPointer is a special value that will make the comparison with any valid pointer fail and
|
||||
// force the renderer to re-apply the state.
|
||||
const uintptr_t DirtyPointer = std::numeric_limits<uintptr_t>::max();
|
||||
}
|
||||
|
||||
std::string ArrayString(unsigned int i)
|
||||
{
|
||||
// We assume that UINT_MAX and GL_INVALID_INDEX are equal.
|
||||
ASSERT(i != UINT_MAX);
|
||||
|
||||
std::stringstream strstr;
|
||||
strstr << "[";
|
||||
strstr << i;
|
||||
strstr << "]";
|
||||
return strstr.str();
|
||||
}
|
||||
|
||||
std::string ArrayIndexString(const std::vector<unsigned int> &indices)
|
||||
{
|
||||
std::stringstream strstr;
|
||||
|
||||
for (auto indicesIt = indices.rbegin(); indicesIt != indices.rend(); ++indicesIt)
|
||||
{
|
||||
// We assume that UINT_MAX and GL_INVALID_INDEX are equal.
|
||||
ASSERT(*indicesIt != UINT_MAX);
|
||||
strstr << "[";
|
||||
strstr << (*indicesIt);
|
||||
strstr << "]";
|
||||
}
|
||||
|
||||
return strstr.str();
|
||||
}
|
||||
|
||||
size_t FormatStringIntoVector(const char *fmt, va_list vararg, std::vector<char>& outBuffer)
|
||||
{
|
||||
// The state of the va_list passed to vsnprintf is undefined after the call, do a copy in case
|
@ -30,7 +30,7 @@ using Microsoft::WRL::ComPtr;
|
||||
class NonCopyable
|
||||
{
|
||||
protected:
|
||||
NonCopyable() = default;
|
||||
constexpr NonCopyable() = default;
|
||||
~NonCopyable() = default;
|
||||
|
||||
private:
|
||||
@ -160,23 +160,11 @@ inline const char* MakeStaticString(const std::string &str)
|
||||
return strings.insert(str).first->c_str();
|
||||
}
|
||||
|
||||
inline std::string ArrayString(unsigned int i)
|
||||
{
|
||||
// We assume UINT_MAX and GL_INVALID_INDEX are equal
|
||||
// See DynamicHLSL.cpp
|
||||
if (i == UINT_MAX)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
std::string ArrayString(unsigned int i);
|
||||
|
||||
std::stringstream strstr;
|
||||
|
||||
strstr << "[";
|
||||
strstr << i;
|
||||
strstr << "]";
|
||||
|
||||
return strstr.str();
|
||||
}
|
||||
// Indices are stored in vectors with the outermost index in the back. In the output of the function
|
||||
// the indices are reversed.
|
||||
std::string ArrayIndexString(const std::vector<unsigned int> &indices);
|
||||
|
||||
inline std::string Str(int i)
|
||||
{
|
||||
@ -208,9 +196,15 @@ std::string ToString(const T &value)
|
||||
#define GL_BGRA4_ANGLEX 0x6ABC
|
||||
#define GL_BGR5_A1_ANGLEX 0x6ABD
|
||||
#define GL_INT_64_ANGLEX 0x6ABE
|
||||
#define GL_UINT_64_ANGLEX 0x6ABF
|
||||
#define GL_BGRA8_SRGB_ANGLEX 0x6AC0
|
||||
|
||||
// Hidden enum for the NULL D3D device type.
|
||||
#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE 0x6AC0
|
||||
// These are dummy formats used to fit typeless D3D textures that can be bound to EGL pbuffers into
|
||||
// the format system (for extension EGL_ANGLE_d3d_texture_client_buffer):
|
||||
#define GL_RGBA8_TYPELESS_ANGLEX 0x6AC1
|
||||
#define GL_RGBA8_TYPELESS_SRGB_ANGLEX 0x6AC2
|
||||
#define GL_BGRA8_TYPELESS_ANGLEX 0x6AC3
|
||||
#define GL_BGRA8_TYPELESS_SRGB_ANGLEX 0x6AC4
|
||||
|
||||
// TODO(jmadill): Clean this up at some point.
|
||||
#define EGL_PLATFORM_ANGLE_PLATFORM_METHODS_ANGLEX 0x9999
|
@ -22,7 +22,7 @@
|
||||
namespace angle
|
||||
{
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
template <size_t N, typename BitsT, typename ParamT = std::size_t>
|
||||
class BitSetT final
|
||||
{
|
||||
public:
|
||||
@ -73,10 +73,10 @@ class BitSetT final
|
||||
bool operator==(const BitSetT &other) const;
|
||||
bool operator!=(const BitSetT &other) const;
|
||||
|
||||
constexpr bool operator[](std::size_t pos) const;
|
||||
Reference operator[](std::size_t pos) { return Reference(this, pos); }
|
||||
constexpr bool operator[](ParamT pos) const;
|
||||
Reference operator[](ParamT pos) { return Reference(this, pos); }
|
||||
|
||||
bool test(std::size_t pos) const;
|
||||
bool test(ParamT pos) const;
|
||||
|
||||
bool all() const;
|
||||
bool any() const;
|
||||
@ -96,13 +96,13 @@ class BitSetT final
|
||||
BitSetT &operator>>=(std::size_t pos);
|
||||
|
||||
BitSetT &set();
|
||||
BitSetT &set(std::size_t pos, bool value = true);
|
||||
BitSetT &set(ParamT pos, bool value = true);
|
||||
|
||||
BitSetT &reset();
|
||||
BitSetT &reset(std::size_t pos);
|
||||
BitSetT &reset(ParamT pos);
|
||||
|
||||
BitSetT &flip();
|
||||
BitSetT &flip(std::size_t pos);
|
||||
BitSetT &flip(ParamT pos);
|
||||
|
||||
unsigned long to_ulong() const { return static_cast<unsigned long>(mBits); }
|
||||
BitsT bits() const { return mBits; }
|
||||
@ -111,7 +111,10 @@ class BitSetT final
|
||||
Iterator end() const { return Iterator(BitSetT()); }
|
||||
|
||||
private:
|
||||
constexpr static BitsT Bit(std::size_t x) { return (static_cast<BitsT>(1) << x); }
|
||||
constexpr static BitsT Bit(ParamT x)
|
||||
{
|
||||
return (static_cast<BitsT>(1) << static_cast<size_t>(x));
|
||||
}
|
||||
constexpr static BitsT Mask(std::size_t x) { return ((Bit(x - 1) - 1) << 1) + 1; }
|
||||
|
||||
BitsT mBits;
|
||||
@ -202,148 +205,148 @@ unsigned long IterableBitSet<N>::Iterator::getNextBit()
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
BitSetT<N, BitsT>::BitSetT() : mBits(0)
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
BitSetT<N, BitsT, ParamT>::BitSetT() : mBits(0)
|
||||
{
|
||||
static_assert(N > 0, "Bitset type cannot support zero bits.");
|
||||
static_assert(N <= sizeof(BitsT) * 8, "Bitset type cannot support a size this large.");
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
BitSetT<N, BitsT>::BitSetT(BitsT value) : mBits(value & Mask(N))
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
BitSetT<N, BitsT, ParamT>::BitSetT(BitsT value) : mBits(value & Mask(N))
|
||||
{
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
BitSetT<N, BitsT>::~BitSetT()
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
BitSetT<N, BitsT, ParamT>::~BitSetT()
|
||||
{
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
BitSetT<N, BitsT>::BitSetT(const BitSetT &other) : mBits(other.mBits)
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
BitSetT<N, BitsT, ParamT>::BitSetT(const BitSetT &other) : mBits(other.mBits)
|
||||
{
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
BitSetT<N, BitsT> &BitSetT<N, BitsT>::operator=(const BitSetT &other)
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
BitSetT<N, BitsT, ParamT> &BitSetT<N, BitsT, ParamT>::operator=(const BitSetT &other)
|
||||
{
|
||||
mBits = other.mBits;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
bool BitSetT<N, BitsT>::operator==(const BitSetT &other) const
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
bool BitSetT<N, BitsT, ParamT>::operator==(const BitSetT &other) const
|
||||
{
|
||||
return mBits == other.mBits;
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
bool BitSetT<N, BitsT>::operator!=(const BitSetT &other) const
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
bool BitSetT<N, BitsT, ParamT>::operator!=(const BitSetT &other) const
|
||||
{
|
||||
return mBits != other.mBits;
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
constexpr bool BitSetT<N, BitsT>::operator[](std::size_t pos) const
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
constexpr bool BitSetT<N, BitsT, ParamT>::operator[](ParamT pos) const
|
||||
{
|
||||
return test(pos);
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
bool BitSetT<N, BitsT>::test(std::size_t pos) const
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
bool BitSetT<N, BitsT, ParamT>::test(ParamT pos) const
|
||||
{
|
||||
return (mBits & Bit(pos)) != 0;
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
bool BitSetT<N, BitsT>::all() const
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
bool BitSetT<N, BitsT, ParamT>::all() const
|
||||
{
|
||||
ASSERT(mBits == (mBits & Mask(N)));
|
||||
return mBits == Mask(N);
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
bool BitSetT<N, BitsT>::any() const
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
bool BitSetT<N, BitsT, ParamT>::any() const
|
||||
{
|
||||
ASSERT(mBits == (mBits & Mask(N)));
|
||||
return (mBits != 0);
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
bool BitSetT<N, BitsT>::none() const
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
bool BitSetT<N, BitsT, ParamT>::none() const
|
||||
{
|
||||
ASSERT(mBits == (mBits & Mask(N)));
|
||||
return (mBits == 0);
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
std::size_t BitSetT<N, BitsT>::count() const
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
std::size_t BitSetT<N, BitsT, ParamT>::count() const
|
||||
{
|
||||
return gl::BitCount(mBits);
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
BitSetT<N, BitsT> &BitSetT<N, BitsT>::operator&=(const BitSetT &other)
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
BitSetT<N, BitsT, ParamT> &BitSetT<N, BitsT, ParamT>::operator&=(const BitSetT &other)
|
||||
{
|
||||
mBits &= other.mBits;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
BitSetT<N, BitsT> &BitSetT<N, BitsT>::operator|=(const BitSetT &other)
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
BitSetT<N, BitsT, ParamT> &BitSetT<N, BitsT, ParamT>::operator|=(const BitSetT &other)
|
||||
{
|
||||
mBits |= other.mBits;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
BitSetT<N, BitsT> &BitSetT<N, BitsT>::operator^=(const BitSetT &other)
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
BitSetT<N, BitsT, ParamT> &BitSetT<N, BitsT, ParamT>::operator^=(const BitSetT &other)
|
||||
{
|
||||
mBits = (mBits ^ other.mBits) & Mask(N);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
BitSetT<N, BitsT> BitSetT<N, BitsT>::operator~() const
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
BitSetT<N, BitsT, ParamT> BitSetT<N, BitsT, ParamT>::operator~() const
|
||||
{
|
||||
return BitSetT<N, BitsT>(~mBits & Mask(N));
|
||||
return BitSetT<N, BitsT, ParamT>(~mBits & Mask(N));
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
BitSetT<N, BitsT> BitSetT<N, BitsT>::operator<<(std::size_t pos) const
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
BitSetT<N, BitsT, ParamT> BitSetT<N, BitsT, ParamT>::operator<<(std::size_t pos) const
|
||||
{
|
||||
return BitSetT<N, BitsT>((mBits << pos) & Mask(N));
|
||||
return BitSetT<N, BitsT, ParamT>((mBits << pos) & Mask(N));
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
BitSetT<N, BitsT> &BitSetT<N, BitsT>::operator<<=(std::size_t pos)
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
BitSetT<N, BitsT, ParamT> &BitSetT<N, BitsT, ParamT>::operator<<=(std::size_t pos)
|
||||
{
|
||||
mBits = (mBits << pos & Mask(N));
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
BitSetT<N, BitsT> BitSetT<N, BitsT>::operator>>(std::size_t pos) const
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
BitSetT<N, BitsT, ParamT> BitSetT<N, BitsT, ParamT>::operator>>(std::size_t pos) const
|
||||
{
|
||||
return BitSetT<N, BitsT>(mBits >> pos);
|
||||
return BitSetT<N, BitsT, ParamT>(mBits >> pos);
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
BitSetT<N, BitsT> &BitSetT<N, BitsT>::operator>>=(std::size_t pos)
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
BitSetT<N, BitsT, ParamT> &BitSetT<N, BitsT, ParamT>::operator>>=(std::size_t pos)
|
||||
{
|
||||
mBits = ((mBits >> pos) & Mask(N));
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
BitSetT<N, BitsT> &BitSetT<N, BitsT>::set()
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
BitSetT<N, BitsT, ParamT> &BitSetT<N, BitsT, ParamT>::set()
|
||||
{
|
||||
mBits = Mask(N);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
BitSetT<N, BitsT> &BitSetT<N, BitsT>::set(std::size_t pos, bool value)
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
BitSetT<N, BitsT, ParamT> &BitSetT<N, BitsT, ParamT>::set(ParamT pos, bool value)
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
@ -356,36 +359,36 @@ BitSetT<N, BitsT> &BitSetT<N, BitsT>::set(std::size_t pos, bool value)
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
BitSetT<N, BitsT> &BitSetT<N, BitsT>::reset()
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
BitSetT<N, BitsT, ParamT> &BitSetT<N, BitsT, ParamT>::reset()
|
||||
{
|
||||
mBits = 0;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
BitSetT<N, BitsT> &BitSetT<N, BitsT>::reset(std::size_t pos)
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
BitSetT<N, BitsT, ParamT> &BitSetT<N, BitsT, ParamT>::reset(ParamT pos)
|
||||
{
|
||||
mBits &= ~Bit(pos);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
BitSetT<N, BitsT> &BitSetT<N, BitsT>::flip()
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
BitSetT<N, BitsT, ParamT> &BitSetT<N, BitsT, ParamT>::flip()
|
||||
{
|
||||
mBits ^= Mask(N);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
BitSetT<N, BitsT> &BitSetT<N, BitsT>::flip(std::size_t pos)
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
BitSetT<N, BitsT, ParamT> &BitSetT<N, BitsT, ParamT>::flip(ParamT pos)
|
||||
{
|
||||
mBits ^= Bit(pos);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
BitSetT<N, BitsT>::Iterator::Iterator(const BitSetT &bits) : mBitsCopy(bits), mCurrentBit(0)
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
BitSetT<N, BitsT, ParamT>::Iterator::Iterator(const BitSetT &bits) : mBitsCopy(bits), mCurrentBit(0)
|
||||
{
|
||||
if (bits.any())
|
||||
{
|
||||
@ -393,8 +396,8 @@ BitSetT<N, BitsT>::Iterator::Iterator(const BitSetT &bits) : mBitsCopy(bits), mC
|
||||
}
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
typename BitSetT<N, BitsT>::Iterator &BitSetT<N, BitsT>::Iterator::operator++()
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
typename BitSetT<N, BitsT, ParamT>::Iterator &BitSetT<N, BitsT, ParamT>::Iterator::operator++()
|
||||
{
|
||||
ASSERT(mBitsCopy.any());
|
||||
mBitsCopy.reset(mCurrentBit);
|
||||
@ -402,26 +405,26 @@ typename BitSetT<N, BitsT>::Iterator &BitSetT<N, BitsT>::Iterator::operator++()
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
bool BitSetT<N, BitsT>::Iterator::operator==(const Iterator &other) const
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
bool BitSetT<N, BitsT, ParamT>::Iterator::operator==(const Iterator &other) const
|
||||
{
|
||||
return mBitsCopy == other.mBitsCopy;
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
bool BitSetT<N, BitsT>::Iterator::operator!=(const Iterator &other) const
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
bool BitSetT<N, BitsT, ParamT>::Iterator::operator!=(const Iterator &other) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
std::size_t BitSetT<N, BitsT>::Iterator::operator*() const
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
std::size_t BitSetT<N, BitsT, ParamT>::Iterator::operator*() const
|
||||
{
|
||||
return mCurrentBit;
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
std::size_t BitSetT<N, BitsT>::Iterator::getNextBit()
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
std::size_t BitSetT<N, BitsT, ParamT>::Iterator::getNextBit()
|
||||
{
|
||||
if (mBitsCopy.none())
|
||||
{
|
||||
@ -435,10 +438,10 @@ template <size_t N>
|
||||
using BitSet32 = BitSetT<N, uint32_t>;
|
||||
|
||||
// ScanForward for 64-bits requires a 64-bit implementation.
|
||||
#if defined(ANGLE_X64_CPU)
|
||||
#if defined(ANGLE_IS_64_BIT_CPU)
|
||||
template <size_t N>
|
||||
using BitSet64 = BitSetT<N, uint64_t>;
|
||||
#endif // defined(ANGLE_X64_CPU)
|
||||
#endif // defined(ANGLE_IS_64_BIT_CPU)
|
||||
|
||||
namespace priv
|
||||
{
|
||||
@ -453,7 +456,7 @@ struct GetBitSet
|
||||
};
|
||||
|
||||
// Prefer 64-bit bitsets on 64-bit CPUs. They seem faster than 32-bit.
|
||||
#if defined(ANGLE_X64_CPU)
|
||||
#if defined(ANGLE_IS_64_BIT_CPU)
|
||||
template <size_t N>
|
||||
struct GetBitSet<N, EnableIfBitsFit<N, uint64_t>>
|
||||
{
|
||||
@ -465,7 +468,7 @@ struct GetBitSet<N, EnableIfBitsFit<N, uint32_t>>
|
||||
{
|
||||
using Type = BitSet32<N>;
|
||||
};
|
||||
#endif // defined(ANGLE_X64_CPU)
|
||||
#endif // defined(ANGLE_IS_64_BIT_CPU)
|
||||
|
||||
} // namespace priv
|
||||
|
||||
@ -474,25 +477,25 @@ using BitSet = typename priv::GetBitSet<N>::Type;
|
||||
|
||||
} // angle
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
inline angle::BitSetT<N, BitsT> operator&(const angle::BitSetT<N, BitsT> &lhs,
|
||||
const angle::BitSetT<N, BitsT> &rhs)
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
inline angle::BitSetT<N, BitsT, ParamT> operator&(const angle::BitSetT<N, BitsT, ParamT> &lhs,
|
||||
const angle::BitSetT<N, BitsT, ParamT> &rhs)
|
||||
{
|
||||
return angle::BitSetT<N, BitsT>(lhs.bits() & rhs.bits());
|
||||
return angle::BitSetT<N, BitsT, ParamT>(lhs.bits() & rhs.bits());
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
inline angle::BitSetT<N, BitsT> operator|(const angle::BitSetT<N, BitsT> &lhs,
|
||||
const angle::BitSetT<N, BitsT> &rhs)
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
inline angle::BitSetT<N, BitsT, ParamT> operator|(const angle::BitSetT<N, BitsT, ParamT> &lhs,
|
||||
const angle::BitSetT<N, BitsT, ParamT> &rhs)
|
||||
{
|
||||
return angle::BitSetT<N, BitsT>(lhs.bits() | rhs.bits());
|
||||
return angle::BitSetT<N, BitsT, ParamT>(lhs.bits() | rhs.bits());
|
||||
}
|
||||
|
||||
template <size_t N, typename BitsT>
|
||||
inline angle::BitSetT<N, BitsT> operator^(const angle::BitSetT<N, BitsT> &lhs,
|
||||
const angle::BitSetT<N, BitsT> &rhs)
|
||||
template <size_t N, typename BitsT, typename ParamT>
|
||||
inline angle::BitSetT<N, BitsT, ParamT> operator^(const angle::BitSetT<N, BitsT, ParamT> &lhs,
|
||||
const angle::BitSetT<N, BitsT, ParamT> &rhs)
|
||||
{
|
||||
return angle::BitSetT<N, BitsT>(lhs.bits() ^ rhs.bits());
|
||||
return angle::BitSetT<N, BitsT, ParamT>(lhs.bits() ^ rhs.bits());
|
||||
}
|
||||
|
||||
#endif // COMMON_BITSETITERATOR_H_
|
@ -16,6 +16,10 @@
|
||||
#include <ostream>
|
||||
#include <vector>
|
||||
|
||||
#if defined(ANGLE_PLATFORM_ANDROID)
|
||||
#include <android/log.h>
|
||||
#endif
|
||||
|
||||
#include "common/angleutils.h"
|
||||
#include "common/Optional.h"
|
||||
|
||||
@ -160,10 +164,16 @@ void Trace(LogSeverity severity, const char *message)
|
||||
}
|
||||
}
|
||||
|
||||
if (severity == LOG_ERR)
|
||||
if (severity == LOG_ERR || severity == LOG_WARN)
|
||||
{
|
||||
#if defined(ANGLE_PLATFORM_ANDROID)
|
||||
__android_log_print((severity == LOG_ERR) ? ANDROID_LOG_ERROR : ANDROID_LOG_WARN, "ANGLE",
|
||||
"%s: %s\n", LogSeverityName(severity), str.c_str());
|
||||
#else
|
||||
// Note: we use fprintf because <iostream> includes static initializers.
|
||||
fprintf(stderr, "%s: %s\n", LogSeverityName(severity), str.c_str());
|
||||
fprintf((severity == LOG_ERR) ? stderr : stdout, "%s: %s\n", LogSeverityName(severity),
|
||||
str.c_str());
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(ANGLE_PLATFORM_WINDOWS) && \
|
@ -220,14 +220,16 @@ std::ostream &FmtHexInt(std::ostream &os, T value)
|
||||
#if defined(COMPILER_GCC) || defined(__clang__)
|
||||
#define ANGLE_CRASH() __builtin_trap()
|
||||
#else
|
||||
#define ANGLE_CRASH() ((void)(*(volatile char *)0 = 0))
|
||||
#define ANGLE_CRASH() ((void)(*(volatile char *)0 = 0)), __assume(0)
|
||||
#endif
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
#define ANGLE_ASSERT_IMPL(expression) assert(expression)
|
||||
#define ANGLE_ASSERT_IMPL_IS_NORETURN 0
|
||||
#else
|
||||
// TODO(jmadill): Detect if debugger is attached and break.
|
||||
#define ANGLE_ASSERT_IMPL(expression) ANGLE_CRASH()
|
||||
#define ANGLE_ASSERT_IMPL_IS_NORETURN 1
|
||||
#endif // !defined(NDEBUG)
|
||||
|
||||
// A macro asserting a condition and outputting failures to the debug log
|
||||
@ -236,6 +238,7 @@ std::ostream &FmtHexInt(std::ostream &os, T value)
|
||||
(expression ? static_cast<void>(0) : ((ERR() << "\t! Assert failed in " << __FUNCTION__ << "(" \
|
||||
<< __LINE__ << "): " << #expression), \
|
||||
ANGLE_ASSERT_IMPL(expression)))
|
||||
#define UNREACHABLE_IS_NORETURN ANGLE_ASSERT_IMPL_IS_NORETURN
|
||||
#else
|
||||
// These are just dummy values.
|
||||
#define COMPACT_ANGLE_LOG_EX_ASSERT(ClassName, ...) \
|
||||
@ -249,6 +252,7 @@ constexpr LogSeverity LOG_ASSERT = LOG_EVENT;
|
||||
#define ASSERT(condition) \
|
||||
ANGLE_LAZY_STREAM(ANGLE_LOG_STREAM(ASSERT), false ? !(condition) : false) \
|
||||
<< "Check failed: " #condition ". "
|
||||
#define UNREACHABLE_IS_NORETURN 0
|
||||
#endif // defined(ANGLE_ENABLE_ASSERTS)
|
||||
|
||||
#define UNUSED_VARIABLE(variable) ((void)variable)
|
@ -60,37 +60,52 @@ inline unsigned int ceilPow2(unsigned int x)
|
||||
return x;
|
||||
}
|
||||
|
||||
inline int clampToInt(unsigned int x)
|
||||
{
|
||||
return static_cast<int>(std::min(x, static_cast<unsigned int>(std::numeric_limits<int>::max())));
|
||||
}
|
||||
|
||||
template <typename DestT, typename SrcT>
|
||||
inline DestT clampCast(SrcT value)
|
||||
{
|
||||
static const DestT destLo = std::numeric_limits<DestT>::min();
|
||||
static const DestT destHi = std::numeric_limits<DestT>::max();
|
||||
static const SrcT srcLo = static_cast<SrcT>(destLo);
|
||||
static const SrcT srcHi = static_cast<SrcT>(destHi);
|
||||
// For floating-point types with denormalization, min returns the minimum positive normalized
|
||||
// value. To find the value that has no values less than it, use numeric_limits::lowest.
|
||||
constexpr const long double destLo =
|
||||
static_cast<long double>(std::numeric_limits<DestT>::lowest());
|
||||
constexpr const long double destHi =
|
||||
static_cast<long double>(std::numeric_limits<DestT>::max());
|
||||
constexpr const long double srcLo =
|
||||
static_cast<long double>(std::numeric_limits<SrcT>::lowest());
|
||||
constexpr long double srcHi = static_cast<long double>(std::numeric_limits<SrcT>::max());
|
||||
|
||||
// When value is outside of or equal to the limits for DestT we use the DestT limit directly.
|
||||
// This avoids undefined behaviors due to loss of precision when converting from floats to
|
||||
// integers:
|
||||
// destHi for ints is 2147483647 but the closest float number is around 2147483648, so when
|
||||
// doing a conversion from float to int we run into an UB because the float is outside of the
|
||||
// range representable by the int.
|
||||
if (value <= srcLo)
|
||||
if (destHi < srcHi)
|
||||
{
|
||||
return destLo;
|
||||
DestT destMax = std::numeric_limits<DestT>::max();
|
||||
if (value >= static_cast<SrcT>(destMax))
|
||||
{
|
||||
return destMax;
|
||||
}
|
||||
}
|
||||
else if (value >= srcHi)
|
||||
|
||||
if (destLo > srcLo)
|
||||
{
|
||||
return destHi;
|
||||
}
|
||||
else
|
||||
{
|
||||
return static_cast<DestT>(value);
|
||||
DestT destLow = std::numeric_limits<DestT>::lowest();
|
||||
if (value <= static_cast<SrcT>(destLow))
|
||||
{
|
||||
return destLow;
|
||||
}
|
||||
}
|
||||
|
||||
return static_cast<DestT>(value);
|
||||
}
|
||||
|
||||
// Specialize clampCast for bool->int conversion to avoid MSVS 2015 performance warning when the max
|
||||
// value is casted to the source type.
|
||||
template <>
|
||||
inline unsigned int clampCast(bool value)
|
||||
{
|
||||
return static_cast<unsigned int>(value);
|
||||
}
|
||||
|
||||
template <>
|
||||
inline int clampCast(bool value)
|
||||
{
|
||||
return static_cast<int>(value);
|
||||
}
|
||||
|
||||
template<typename T, typename MIN, typename MAX>
|
||||
@ -613,6 +628,12 @@ class Range
|
||||
T low() const { return mLow; }
|
||||
T high() const { return mHigh; }
|
||||
|
||||
void invalidate()
|
||||
{
|
||||
mLow = std::numeric_limits<T>::max();
|
||||
mHigh = std::numeric_limits<T>::min();
|
||||
}
|
||||
|
||||
private:
|
||||
T mLow;
|
||||
T mHigh;
|
||||
@ -873,12 +894,12 @@ inline int BitCount(uint32_t bits)
|
||||
{
|
||||
return static_cast<int>(__popcnt(bits));
|
||||
}
|
||||
#if defined(ANGLE_X64_CPU)
|
||||
#if defined(ANGLE_IS_64_BIT_CPU)
|
||||
inline int BitCount(uint64_t bits)
|
||||
{
|
||||
return static_cast<int>(__popcnt64(bits));
|
||||
}
|
||||
#endif // defined(ANGLE_X64_CPU)
|
||||
#endif // defined(ANGLE_IS_64_BIT_CPU)
|
||||
#endif // defined(ANGLE_PLATFORM_WINDOWS)
|
||||
|
||||
#if defined(ANGLE_PLATFORM_POSIX)
|
||||
@ -887,12 +908,12 @@ inline int BitCount(uint32_t bits)
|
||||
return __builtin_popcount(bits);
|
||||
}
|
||||
|
||||
#if defined(ANGLE_X64_CPU)
|
||||
#if defined(ANGLE_IS_64_BIT_CPU)
|
||||
inline int BitCount(uint64_t bits)
|
||||
{
|
||||
return __builtin_popcountll(bits);
|
||||
}
|
||||
#endif // defined(ANGLE_X64_CPU)
|
||||
#endif // defined(ANGLE_IS_64_BIT_CPU)
|
||||
#endif // defined(ANGLE_PLATFORM_POSIX)
|
||||
|
||||
#if defined(ANGLE_PLATFORM_WINDOWS)
|
||||
@ -907,7 +928,7 @@ inline unsigned long ScanForward(uint32_t bits)
|
||||
return firstBitIndex;
|
||||
}
|
||||
|
||||
#if defined(ANGLE_X64_CPU)
|
||||
#if defined(ANGLE_IS_64_BIT_CPU)
|
||||
inline unsigned long ScanForward(uint64_t bits)
|
||||
{
|
||||
ASSERT(bits != 0u);
|
||||
@ -916,7 +937,7 @@ inline unsigned long ScanForward(uint64_t bits)
|
||||
ASSERT(ret != 0u);
|
||||
return firstBitIndex;
|
||||
}
|
||||
#endif // defined(ANGLE_X64_CPU)
|
||||
#endif // defined(ANGLE_IS_64_BIT_CPU)
|
||||
#endif // defined(ANGLE_PLATFORM_WINDOWS)
|
||||
|
||||
#if defined(ANGLE_PLATFORM_POSIX)
|
||||
@ -926,13 +947,13 @@ inline unsigned long ScanForward(uint32_t bits)
|
||||
return static_cast<unsigned long>(__builtin_ctz(bits));
|
||||
}
|
||||
|
||||
#if defined(ANGLE_X64_CPU)
|
||||
#if defined(ANGLE_IS_64_BIT_CPU)
|
||||
inline unsigned long ScanForward(uint64_t bits)
|
||||
{
|
||||
ASSERT(bits != 0u);
|
||||
return static_cast<unsigned long>(__builtin_ctzll(bits));
|
||||
}
|
||||
#endif // defined(ANGLE_X64_CPU)
|
||||
#endif // defined(ANGLE_IS_64_BIT_CPU)
|
||||
#endif // defined(ANGLE_PLATFORM_POSIX)
|
||||
|
||||
// Return the index of the most significant bit set. Indexing is such that bit 0 is the least
|
290
gfx/angle/checkout/src/common/matrix_utils.cpp
Normal file
290
gfx/angle/checkout/src/common/matrix_utils.cpp
Normal file
@ -0,0 +1,290 @@
|
||||
//
|
||||
// Copyright 2018 The ANGLE Project Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
//
|
||||
|
||||
// matrix_utils.cpp: Contains implementations for Mat4 methods.
|
||||
|
||||
#include "common/matrix_utils.h"
|
||||
|
||||
namespace angle
|
||||
{
|
||||
|
||||
Mat4::Mat4() : Mat4(1.f, 0.f, 0.f, 0.f, 0.f, 1.f, 0.f, 0.f, 0.f, 0.f, 1.f, 0.f, 0.f, 0.f, 0.f, 1.f)
|
||||
{
|
||||
}
|
||||
|
||||
Mat4::Mat4(const Matrix<float> generalMatrix) : Matrix(std::vector<float>(16, 0), 4, 4)
|
||||
{
|
||||
unsigned int minCols = std::min((unsigned int)4, generalMatrix.columns());
|
||||
unsigned int minRows = std::min((unsigned int)4, generalMatrix.rows());
|
||||
for (unsigned int i = 0; i < minCols; i++)
|
||||
{
|
||||
for (unsigned int j = 0; j < minRows; j++)
|
||||
{
|
||||
mElements[j * minCols + i] = generalMatrix.at(j, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Mat4::Mat4(const std::vector<float> &elements) : Matrix(elements, 4)
|
||||
{
|
||||
}
|
||||
|
||||
Mat4::Mat4(const float *elements) : Matrix(elements, 4)
|
||||
{
|
||||
}
|
||||
|
||||
Mat4::Mat4(float m00,
|
||||
float m01,
|
||||
float m02,
|
||||
float m03,
|
||||
float m10,
|
||||
float m11,
|
||||
float m12,
|
||||
float m13,
|
||||
float m20,
|
||||
float m21,
|
||||
float m22,
|
||||
float m23,
|
||||
float m30,
|
||||
float m31,
|
||||
float m32,
|
||||
float m33)
|
||||
: Matrix(std::vector<float>(16, 0), 4, 4)
|
||||
{
|
||||
mElements[0] = m00;
|
||||
mElements[1] = m01;
|
||||
mElements[2] = m02;
|
||||
mElements[3] = m03;
|
||||
mElements[4] = m10;
|
||||
mElements[5] = m11;
|
||||
mElements[6] = m12;
|
||||
mElements[7] = m13;
|
||||
mElements[8] = m20;
|
||||
mElements[9] = m21;
|
||||
mElements[10] = m22;
|
||||
mElements[11] = m23;
|
||||
mElements[12] = m30;
|
||||
mElements[13] = m31;
|
||||
mElements[14] = m32;
|
||||
mElements[15] = m33;
|
||||
}
|
||||
|
||||
// static
|
||||
Mat4 Mat4::Rotate(float angle, const Vector3 &axis)
|
||||
{
|
||||
auto axis_normalized = axis.normalized();
|
||||
float angle_radians = angle * (3.14159265358979323f / 180.0f);
|
||||
float c = cos(angle_radians);
|
||||
float ci = 1.f - c;
|
||||
float s = sin(angle_radians);
|
||||
|
||||
float x = axis_normalized.x();
|
||||
float y = axis_normalized.y();
|
||||
float z = axis_normalized.z();
|
||||
|
||||
float x2 = x * x;
|
||||
float y2 = y * y;
|
||||
float z2 = z * z;
|
||||
|
||||
float xy = x * y;
|
||||
float yz = y * z;
|
||||
float zx = z * x;
|
||||
|
||||
float r00 = c + ci * x2;
|
||||
float r01 = ci * xy + s * z;
|
||||
float r02 = ci * zx - s * y;
|
||||
float r03 = 0.f;
|
||||
|
||||
float r10 = ci * xy - s * z;
|
||||
float r11 = c + ci * y2;
|
||||
float r12 = ci * yz + s * x;
|
||||
float r13 = 0.f;
|
||||
|
||||
float r20 = ci * zx + s * y;
|
||||
float r21 = ci * yz - s * x;
|
||||
float r22 = c + ci * z2;
|
||||
float r23 = 0.f;
|
||||
|
||||
float r30 = 0.f;
|
||||
float r31 = 0.f;
|
||||
float r32 = 0.f;
|
||||
float r33 = 1.f;
|
||||
|
||||
return Mat4(r00, r01, r02, r03, r10, r11, r12, r13, r20, r21, r22, r23, r30, r31, r32, r33);
|
||||
}
|
||||
|
||||
// static
|
||||
Mat4 Mat4::Translate(const Vector3 &t)
|
||||
{
|
||||
float r00 = 1.f;
|
||||
float r01 = 0.f;
|
||||
float r02 = 0.f;
|
||||
float r03 = 0.f;
|
||||
|
||||
float r10 = 0.f;
|
||||
float r11 = 1.f;
|
||||
float r12 = 0.f;
|
||||
float r13 = 0.f;
|
||||
|
||||
float r20 = 0.f;
|
||||
float r21 = 0.f;
|
||||
float r22 = 1.f;
|
||||
float r23 = 0.f;
|
||||
|
||||
float r30 = t.x();
|
||||
float r31 = t.y();
|
||||
float r32 = t.z();
|
||||
float r33 = 1.f;
|
||||
|
||||
return Mat4(r00, r01, r02, r03, r10, r11, r12, r13, r20, r21, r22, r23, r30, r31, r32, r33);
|
||||
}
|
||||
|
||||
// static
|
||||
Mat4 Mat4::Scale(const Vector3 &s)
|
||||
{
|
||||
float r00 = s.x();
|
||||
float r01 = 0.f;
|
||||
float r02 = 0.f;
|
||||
float r03 = 0.f;
|
||||
|
||||
float r10 = 0.f;
|
||||
float r11 = s.y();
|
||||
float r12 = 0.f;
|
||||
float r13 = 0.f;
|
||||
|
||||
float r20 = 0.f;
|
||||
float r21 = 0.f;
|
||||
float r22 = s.z();
|
||||
float r23 = 0.f;
|
||||
|
||||
float r30 = 0.f;
|
||||
float r31 = 0.f;
|
||||
float r32 = 0.f;
|
||||
float r33 = 1.f;
|
||||
|
||||
return Mat4(r00, r01, r02, r03, r10, r11, r12, r13, r20, r21, r22, r23, r30, r31, r32, r33);
|
||||
}
|
||||
|
||||
// static
|
||||
Mat4 Mat4::Frustum(float l, float r, float b, float t, float n, float f)
|
||||
{
|
||||
float nn = 2.f * n;
|
||||
float fpn = f + n;
|
||||
float fmn = f - n;
|
||||
float tpb = t + b;
|
||||
float tmb = t - b;
|
||||
float rpl = r + l;
|
||||
float rml = r - l;
|
||||
|
||||
float r00 = nn / rml;
|
||||
float r01 = 0.f;
|
||||
float r02 = 0.f;
|
||||
float r03 = 0.f;
|
||||
|
||||
float r10 = 0.f;
|
||||
float r11 = nn / tmb;
|
||||
float r12 = 0.f;
|
||||
float r13 = 0.f;
|
||||
|
||||
float r20 = rpl / rml;
|
||||
float r21 = tpb / tmb;
|
||||
float r22 = -fpn / fmn;
|
||||
float r23 = -1.f;
|
||||
|
||||
float r30 = 0.f;
|
||||
float r31 = 0.f;
|
||||
float r32 = -nn * f / fmn;
|
||||
float r33 = 0.f;
|
||||
|
||||
return Mat4(r00, r01, r02, r03, r10, r11, r12, r13, r20, r21, r22, r23, r30, r31, r32, r33);
|
||||
}
|
||||
|
||||
// static
|
||||
Mat4 Mat4::Perspective(float fov, float aspectRatio, float n, float f)
|
||||
{
|
||||
const float frustumHeight = tanf(static_cast<float>(fov / 360.0f * 3.14159265358979323)) * n;
|
||||
const float frustumWidth = frustumHeight * aspectRatio;
|
||||
return Frustum(-frustumWidth, frustumWidth, -frustumHeight, frustumHeight, n, f);
|
||||
}
|
||||
|
||||
// static
|
||||
Mat4 Mat4::Ortho(float l, float r, float b, float t, float n, float f)
|
||||
{
|
||||
float fpn = f + n;
|
||||
float fmn = f - n;
|
||||
float tpb = t + b;
|
||||
float tmb = t - b;
|
||||
float rpl = r + l;
|
||||
float rml = r - l;
|
||||
|
||||
float r00 = 2.f / rml;
|
||||
float r01 = 0.f;
|
||||
float r02 = 0.f;
|
||||
float r03 = 0.f;
|
||||
|
||||
float r10 = 0.f;
|
||||
float r11 = 2.f / tmb;
|
||||
float r12 = 0.f;
|
||||
float r13 = 0.f;
|
||||
|
||||
float r20 = 0.f;
|
||||
float r21 = 0.f;
|
||||
float r22 = -2.f / fmn;
|
||||
float r23 = 0.f;
|
||||
|
||||
float r30 = -rpl / rml;
|
||||
float r31 = -tpb / tmb;
|
||||
float r32 = -fpn / fmn;
|
||||
float r33 = 1.f;
|
||||
|
||||
return Mat4(r00, r01, r02, r03, r10, r11, r12, r13, r20, r21, r22, r23, r30, r31, r32, r33);
|
||||
}
|
||||
|
||||
Mat4 Mat4::product(const Mat4 &m)
|
||||
{
|
||||
const float *a = mElements.data();
|
||||
const float *b = m.mElements.data();
|
||||
|
||||
return Mat4(a[0] * b[0] + a[4] * b[1] + a[8] * b[2] + a[12] * b[3],
|
||||
a[1] * b[0] + a[5] * b[1] + a[9] * b[2] + a[13] * b[3],
|
||||
a[2] * b[0] + a[6] * b[1] + a[10] * b[2] + a[14] * b[3],
|
||||
a[3] * b[0] + a[7] * b[1] + a[11] * b[2] + a[15] * b[3],
|
||||
|
||||
a[0] * b[4] + a[4] * b[5] + a[8] * b[6] + a[12] * b[7],
|
||||
a[1] * b[4] + a[5] * b[5] + a[9] * b[6] + a[13] * b[7],
|
||||
a[2] * b[4] + a[6] * b[5] + a[10] * b[6] + a[14] * b[7],
|
||||
a[3] * b[4] + a[7] * b[5] + a[11] * b[6] + a[15] * b[7],
|
||||
|
||||
a[0] * b[8] + a[4] * b[9] + a[8] * b[10] + a[12] * b[11],
|
||||
a[1] * b[8] + a[5] * b[9] + a[9] * b[10] + a[13] * b[11],
|
||||
a[2] * b[8] + a[6] * b[9] + a[10] * b[10] + a[14] * b[11],
|
||||
a[3] * b[8] + a[7] * b[9] + a[11] * b[10] + a[15] * b[11],
|
||||
|
||||
a[0] * b[12] + a[4] * b[13] + a[8] * b[14] + a[12] * b[15],
|
||||
a[1] * b[12] + a[5] * b[13] + a[9] * b[14] + a[13] * b[15],
|
||||
a[2] * b[12] + a[6] * b[13] + a[10] * b[14] + a[14] * b[15],
|
||||
a[3] * b[12] + a[7] * b[13] + a[11] * b[14] + a[15] * b[15]);
|
||||
}
|
||||
|
||||
Vector4 Mat4::product(const Vector4 &b)
|
||||
{
|
||||
return Vector4(
|
||||
mElements[0] * b.x() + mElements[4] * b.y() + mElements[8] * b.z() + mElements[12] * b.w(),
|
||||
mElements[1] * b.x() + mElements[5] * b.y() + mElements[9] * b.z() + mElements[13] * b.w(),
|
||||
mElements[2] * b.x() + mElements[6] * b.y() + mElements[10] * b.z() + mElements[14] * b.w(),
|
||||
mElements[3] * b.x() + mElements[7] * b.y() + mElements[11] * b.z() +
|
||||
mElements[15] * b.w());
|
||||
}
|
||||
|
||||
void Mat4::dump()
|
||||
{
|
||||
printf("[ %f %f %f %f ]\n", mElements[0], mElements[4], mElements[8], mElements[12]);
|
||||
printf("[ %f %f %f %f ]\n", mElements[1], mElements[5], mElements[9], mElements[13]);
|
||||
printf("[ %f %f %f %f ]\n", mElements[2], mElements[6], mElements[10], mElements[14]);
|
||||
printf("[ %f %f %f %f ]\n", mElements[3], mElements[7], mElements[11], mElements[15]);
|
||||
}
|
||||
|
||||
} // namespace angle
|
362
gfx/angle/checkout/src/common/matrix_utils.h
Normal file
362
gfx/angle/checkout/src/common/matrix_utils.h
Normal file
@ -0,0 +1,362 @@
|
||||
//
|
||||
// Copyright 2015 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.
|
||||
//
|
||||
// Matrix:
|
||||
// Utility class implementing various matrix operations.
|
||||
// Supports matrices with minimum 2 and maximum 4 number of rows/columns.
|
||||
//
|
||||
// TODO: Check if we can merge Matrix.h in sample_util with this and replace it with this
|
||||
// implementation.
|
||||
// TODO: Rename this file to Matrix.h once we remove Matrix.h in sample_util.
|
||||
|
||||
#ifndef COMMON_MATRIX_UTILS_H_
|
||||
#define COMMON_MATRIX_UTILS_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "common/debug.h"
|
||||
#include "common/mathutil.h"
|
||||
#include "common/vector_utils.h"
|
||||
|
||||
namespace angle
|
||||
{
|
||||
|
||||
template <typename T>
|
||||
class Matrix
|
||||
{
|
||||
public:
|
||||
Matrix(const std::vector<T> &elements, const unsigned int &numRows, const unsigned int &numCols)
|
||||
: mElements(elements), mRows(numRows), mCols(numCols)
|
||||
{
|
||||
ASSERT(rows() >= 1 && rows() <= 4);
|
||||
ASSERT(columns() >= 1 && columns() <= 4);
|
||||
}
|
||||
|
||||
Matrix(const std::vector<T> &elements, const unsigned int &size)
|
||||
: mElements(elements), mRows(size), mCols(size)
|
||||
{
|
||||
ASSERT(rows() >= 1 && rows() <= 4);
|
||||
ASSERT(columns() >= 1 && columns() <= 4);
|
||||
}
|
||||
|
||||
Matrix(const T *elements, const unsigned int &size) : mRows(size), mCols(size)
|
||||
{
|
||||
ASSERT(rows() >= 1 && rows() <= 4);
|
||||
ASSERT(columns() >= 1 && columns() <= 4);
|
||||
for (size_t i = 0; i < size * size; i++)
|
||||
mElements.push_back(elements[i]);
|
||||
}
|
||||
|
||||
const T &operator()(const unsigned int &rowIndex, const unsigned int &columnIndex) const
|
||||
{
|
||||
return mElements[rowIndex * columns() + columnIndex];
|
||||
}
|
||||
|
||||
T &operator()(const unsigned int &rowIndex, const unsigned int &columnIndex)
|
||||
{
|
||||
return mElements[rowIndex * columns() + columnIndex];
|
||||
}
|
||||
|
||||
const T &at(const unsigned int &rowIndex, const unsigned int &columnIndex) const
|
||||
{
|
||||
return operator()(rowIndex, columnIndex);
|
||||
}
|
||||
|
||||
Matrix<T> operator*(const Matrix<T> &m)
|
||||
{
|
||||
ASSERT(columns() == m.rows());
|
||||
|
||||
unsigned int resultRows = rows();
|
||||
unsigned int resultCols = m.columns();
|
||||
Matrix<T> result(std::vector<T>(resultRows * resultCols), resultRows, resultCols);
|
||||
for (unsigned int i = 0; i < resultRows; i++)
|
||||
{
|
||||
for (unsigned int j = 0; j < resultCols; j++)
|
||||
{
|
||||
T tmp = 0.0f;
|
||||
for (unsigned int k = 0; k < columns(); k++)
|
||||
tmp += at(i, k) * m(k, j);
|
||||
result(i, j) = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void operator*=(const Matrix<T> &m)
|
||||
{
|
||||
ASSERT(columns() == m.rows());
|
||||
Matrix<T> res = (*this) * m;
|
||||
size_t numElts = res.elements().size();
|
||||
mElements.resize(numElts);
|
||||
memcpy(mElements.data(), res.data(), numElts * sizeof(float));
|
||||
}
|
||||
|
||||
unsigned int size() const
|
||||
{
|
||||
ASSERT(rows() == columns());
|
||||
return rows();
|
||||
}
|
||||
|
||||
unsigned int rows() const { return mRows; }
|
||||
|
||||
unsigned int columns() const { return mCols; }
|
||||
|
||||
std::vector<T> elements() const { return mElements; }
|
||||
T *data() { return mElements.data(); }
|
||||
|
||||
Matrix<T> compMult(const Matrix<T> &mat1) const
|
||||
{
|
||||
Matrix result(std::vector<T>(mElements.size()), size());
|
||||
for (unsigned int i = 0; i < columns(); i++)
|
||||
for (unsigned int j = 0; j < rows(); j++)
|
||||
result(i, j) = at(i, j) * mat1(i, j);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Matrix<T> outerProduct(const Matrix<T> &mat1) const
|
||||
{
|
||||
unsigned int cols = mat1.columns();
|
||||
Matrix result(std::vector<T>(rows() * cols), rows(), cols);
|
||||
for (unsigned int i = 0; i < rows(); i++)
|
||||
for (unsigned int j = 0; j < cols; j++)
|
||||
result(i, j) = at(i, 0) * mat1(0, j);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Matrix<T> transpose() const
|
||||
{
|
||||
Matrix result(std::vector<T>(mElements.size()), columns(), rows());
|
||||
for (unsigned int i = 0; i < columns(); i++)
|
||||
for (unsigned int j = 0; j < rows(); j++)
|
||||
result(i, j) = at(j, i);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
T determinant() const
|
||||
{
|
||||
ASSERT(rows() == columns());
|
||||
|
||||
switch (size())
|
||||
{
|
||||
case 2:
|
||||
return at(0, 0) * at(1, 1) - at(0, 1) * at(1, 0);
|
||||
|
||||
case 3:
|
||||
return at(0, 0) * at(1, 1) * at(2, 2) + at(0, 1) * at(1, 2) * at(2, 0) +
|
||||
at(0, 2) * at(1, 0) * at(2, 1) - at(0, 2) * at(1, 1) * at(2, 0) -
|
||||
at(0, 1) * at(1, 0) * at(2, 2) - at(0, 0) * at(1, 2) * at(2, 1);
|
||||
|
||||
case 4:
|
||||
{
|
||||
const float minorMatrices[4][3 * 3] = {
|
||||
{
|
||||
at(1, 1), at(2, 1), at(3, 1), at(1, 2), at(2, 2), at(3, 2), at(1, 3),
|
||||
at(2, 3), at(3, 3),
|
||||
},
|
||||
{
|
||||
at(1, 0), at(2, 0), at(3, 0), at(1, 2), at(2, 2), at(3, 2), at(1, 3),
|
||||
at(2, 3), at(3, 3),
|
||||
},
|
||||
{
|
||||
at(1, 0), at(2, 0), at(3, 0), at(1, 1), at(2, 1), at(3, 1), at(1, 3),
|
||||
at(2, 3), at(3, 3),
|
||||
},
|
||||
{
|
||||
at(1, 0), at(2, 0), at(3, 0), at(1, 1), at(2, 1), at(3, 1), at(1, 2),
|
||||
at(2, 2), at(3, 2),
|
||||
}};
|
||||
return at(0, 0) * Matrix<T>(minorMatrices[0], 3).determinant() -
|
||||
at(0, 1) * Matrix<T>(minorMatrices[1], 3).determinant() +
|
||||
at(0, 2) * Matrix<T>(minorMatrices[2], 3).determinant() -
|
||||
at(0, 3) * Matrix<T>(minorMatrices[3], 3).determinant();
|
||||
}
|
||||
|
||||
default:
|
||||
UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
|
||||
return T();
|
||||
}
|
||||
|
||||
Matrix<T> inverse() const
|
||||
{
|
||||
ASSERT(rows() == columns());
|
||||
|
||||
Matrix<T> cof(std::vector<T>(mElements.size()), rows(), columns());
|
||||
switch (size())
|
||||
{
|
||||
case 2:
|
||||
cof(0, 0) = at(1, 1);
|
||||
cof(0, 1) = -at(1, 0);
|
||||
cof(1, 0) = -at(0, 1);
|
||||
cof(1, 1) = at(0, 0);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
cof(0, 0) = at(1, 1) * at(2, 2) - at(2, 1) * at(1, 2);
|
||||
cof(0, 1) = -(at(1, 0) * at(2, 2) - at(2, 0) * at(1, 2));
|
||||
cof(0, 2) = at(1, 0) * at(2, 1) - at(2, 0) * at(1, 1);
|
||||
cof(1, 0) = -(at(0, 1) * at(2, 2) - at(2, 1) * at(0, 2));
|
||||
cof(1, 1) = at(0, 0) * at(2, 2) - at(2, 0) * at(0, 2);
|
||||
cof(1, 2) = -(at(0, 0) * at(2, 1) - at(2, 0) * at(0, 1));
|
||||
cof(2, 0) = at(0, 1) * at(1, 2) - at(1, 1) * at(0, 2);
|
||||
cof(2, 1) = -(at(0, 0) * at(1, 2) - at(1, 0) * at(0, 2));
|
||||
cof(2, 2) = at(0, 0) * at(1, 1) - at(1, 0) * at(0, 1);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
cof(0, 0) = at(1, 1) * at(2, 2) * at(3, 3) + at(2, 1) * at(3, 2) * at(1, 3) +
|
||||
at(3, 1) * at(1, 2) * at(2, 3) - at(1, 1) * at(3, 2) * at(2, 3) -
|
||||
at(2, 1) * at(1, 2) * at(3, 3) - at(3, 1) * at(2, 2) * at(1, 3);
|
||||
cof(0, 1) = -(at(1, 0) * at(2, 2) * at(3, 3) + at(2, 0) * at(3, 2) * at(1, 3) +
|
||||
at(3, 0) * at(1, 2) * at(2, 3) - at(1, 0) * at(3, 2) * at(2, 3) -
|
||||
at(2, 0) * at(1, 2) * at(3, 3) - at(3, 0) * at(2, 2) * at(1, 3));
|
||||
cof(0, 2) = at(1, 0) * at(2, 1) * at(3, 3) + at(2, 0) * at(3, 1) * at(1, 3) +
|
||||
at(3, 0) * at(1, 1) * at(2, 3) - at(1, 0) * at(3, 1) * at(2, 3) -
|
||||
at(2, 0) * at(1, 1) * at(3, 3) - at(3, 0) * at(2, 1) * at(1, 3);
|
||||
cof(0, 3) = -(at(1, 0) * at(2, 1) * at(3, 2) + at(2, 0) * at(3, 1) * at(1, 2) +
|
||||
at(3, 0) * at(1, 1) * at(2, 2) - at(1, 0) * at(3, 1) * at(2, 2) -
|
||||
at(2, 0) * at(1, 1) * at(3, 2) - at(3, 0) * at(2, 1) * at(1, 2));
|
||||
cof(1, 0) = -(at(0, 1) * at(2, 2) * at(3, 3) + at(2, 1) * at(3, 2) * at(0, 3) +
|
||||
at(3, 1) * at(0, 2) * at(2, 3) - at(0, 1) * at(3, 2) * at(2, 3) -
|
||||
at(2, 1) * at(0, 2) * at(3, 3) - at(3, 1) * at(2, 2) * at(0, 3));
|
||||
cof(1, 1) = at(0, 0) * at(2, 2) * at(3, 3) + at(2, 0) * at(3, 2) * at(0, 3) +
|
||||
at(3, 0) * at(0, 2) * at(2, 3) - at(0, 0) * at(3, 2) * at(2, 3) -
|
||||
at(2, 0) * at(0, 2) * at(3, 3) - at(3, 0) * at(2, 2) * at(0, 3);
|
||||
cof(1, 2) = -(at(0, 0) * at(2, 1) * at(3, 3) + at(2, 0) * at(3, 1) * at(0, 3) +
|
||||
at(3, 0) * at(0, 1) * at(2, 3) - at(0, 0) * at(3, 1) * at(2, 3) -
|
||||
at(2, 0) * at(0, 1) * at(3, 3) - at(3, 0) * at(2, 1) * at(0, 3));
|
||||
cof(1, 3) = at(0, 0) * at(2, 1) * at(3, 2) + at(2, 0) * at(3, 1) * at(0, 2) +
|
||||
at(3, 0) * at(0, 1) * at(2, 2) - at(0, 0) * at(3, 1) * at(2, 2) -
|
||||
at(2, 0) * at(0, 1) * at(3, 2) - at(3, 0) * at(2, 1) * at(0, 2);
|
||||
cof(2, 0) = at(0, 1) * at(1, 2) * at(3, 3) + at(1, 1) * at(3, 2) * at(0, 3) +
|
||||
at(3, 1) * at(0, 2) * at(1, 3) - at(0, 1) * at(3, 2) * at(1, 3) -
|
||||
at(1, 1) * at(0, 2) * at(3, 3) - at(3, 1) * at(1, 2) * at(0, 3);
|
||||
cof(2, 1) = -(at(0, 0) * at(1, 2) * at(3, 3) + at(1, 0) * at(3, 2) * at(0, 3) +
|
||||
at(3, 0) * at(0, 2) * at(1, 3) - at(0, 0) * at(3, 2) * at(1, 3) -
|
||||
at(1, 0) * at(0, 2) * at(3, 3) - at(3, 0) * at(1, 2) * at(0, 3));
|
||||
cof(2, 2) = at(0, 0) * at(1, 1) * at(3, 3) + at(1, 0) * at(3, 1) * at(0, 3) +
|
||||
at(3, 0) * at(0, 1) * at(1, 3) - at(0, 0) * at(3, 1) * at(1, 3) -
|
||||
at(1, 0) * at(0, 1) * at(3, 3) - at(3, 0) * at(1, 1) * at(0, 3);
|
||||
cof(2, 3) = -(at(0, 0) * at(1, 1) * at(3, 2) + at(1, 0) * at(3, 1) * at(0, 2) +
|
||||
at(3, 0) * at(0, 1) * at(1, 2) - at(0, 0) * at(3, 1) * at(1, 2) -
|
||||
at(1, 0) * at(0, 1) * at(3, 2) - at(3, 0) * at(1, 1) * at(0, 2));
|
||||
cof(3, 0) = -(at(0, 1) * at(1, 2) * at(2, 3) + at(1, 1) * at(2, 2) * at(0, 3) +
|
||||
at(2, 1) * at(0, 2) * at(1, 3) - at(0, 1) * at(2, 2) * at(1, 3) -
|
||||
at(1, 1) * at(0, 2) * at(2, 3) - at(2, 1) * at(1, 2) * at(0, 3));
|
||||
cof(3, 1) = at(0, 0) * at(1, 2) * at(2, 3) + at(1, 0) * at(2, 2) * at(0, 3) +
|
||||
at(2, 0) * at(0, 2) * at(1, 3) - at(0, 0) * at(2, 2) * at(1, 3) -
|
||||
at(1, 0) * at(0, 2) * at(2, 3) - at(2, 0) * at(1, 2) * at(0, 3);
|
||||
cof(3, 2) = -(at(0, 0) * at(1, 1) * at(2, 3) + at(1, 0) * at(2, 1) * at(0, 3) +
|
||||
at(2, 0) * at(0, 1) * at(1, 3) - at(0, 0) * at(2, 1) * at(1, 3) -
|
||||
at(1, 0) * at(0, 1) * at(2, 3) - at(2, 0) * at(1, 1) * at(0, 3));
|
||||
cof(3, 3) = at(0, 0) * at(1, 1) * at(2, 2) + at(1, 0) * at(2, 1) * at(0, 2) +
|
||||
at(2, 0) * at(0, 1) * at(1, 2) - at(0, 0) * at(2, 1) * at(1, 2) -
|
||||
at(1, 0) * at(0, 1) * at(2, 2) - at(2, 0) * at(1, 1) * at(0, 2);
|
||||
break;
|
||||
|
||||
default:
|
||||
UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
|
||||
// The inverse of A is the transpose of the cofactor matrix times the reciprocal of the
|
||||
// determinant of A.
|
||||
Matrix<T> adjugateMatrix(cof.transpose());
|
||||
T det = determinant();
|
||||
Matrix<T> result(std::vector<T>(mElements.size()), rows(), columns());
|
||||
for (unsigned int i = 0; i < rows(); i++)
|
||||
for (unsigned int j = 0; j < columns(); j++)
|
||||
result(i, j) = det ? adjugateMatrix(i, j) / det : T();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void setToIdentity()
|
||||
{
|
||||
ASSERT(rows() == columns());
|
||||
|
||||
const auto one = T(1);
|
||||
const auto zero = T(0);
|
||||
|
||||
for (auto &e : mElements)
|
||||
e = zero;
|
||||
|
||||
for (unsigned int i = 0; i < rows(); ++i)
|
||||
{
|
||||
const auto pos = i * columns() + (i % columns());
|
||||
mElements[pos] = one;
|
||||
}
|
||||
}
|
||||
|
||||
template <unsigned int Size>
|
||||
static void setToIdentity(T (&matrix)[Size])
|
||||
{
|
||||
static_assert(gl::iSquareRoot<Size>() != 0, "Matrix is not square.");
|
||||
|
||||
const auto cols = gl::iSquareRoot<Size>();
|
||||
const auto one = T(1);
|
||||
const auto zero = T(0);
|
||||
|
||||
for (auto &e : matrix)
|
||||
e = zero;
|
||||
|
||||
for (unsigned int i = 0; i < cols; ++i)
|
||||
{
|
||||
const auto pos = i * cols + (i % cols);
|
||||
matrix[pos] = one;
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
std::vector<T> mElements;
|
||||
unsigned int mRows;
|
||||
unsigned int mCols;
|
||||
};
|
||||
|
||||
class Mat4 : public Matrix<float>
|
||||
{
|
||||
public:
|
||||
Mat4();
|
||||
Mat4(const Matrix<float> generalMatrix);
|
||||
Mat4(const std::vector<float> &elements);
|
||||
Mat4(const float *elements);
|
||||
Mat4(float m00,
|
||||
float m01,
|
||||
float m02,
|
||||
float m03,
|
||||
float m10,
|
||||
float m11,
|
||||
float m12,
|
||||
float m13,
|
||||
float m20,
|
||||
float m21,
|
||||
float m22,
|
||||
float m23,
|
||||
float m30,
|
||||
float m31,
|
||||
float m32,
|
||||
float m33);
|
||||
|
||||
static Mat4 Rotate(float angle, const Vector3 &axis);
|
||||
static Mat4 Translate(const Vector3 &t);
|
||||
static Mat4 Scale(const Vector3 &s);
|
||||
static Mat4 Frustum(float l, float r, float b, float t, float n, float f);
|
||||
static Mat4 Perspective(float fov, float aspectRatio, float n, float f);
|
||||
static Mat4 Ortho(float l, float r, float b, float t, float n, float f);
|
||||
|
||||
Mat4 product(const Mat4 &m);
|
||||
Vector4 product(const Vector4 &b);
|
||||
void dump();
|
||||
};
|
||||
|
||||
} // namespace angle
|
||||
|
||||
#endif // COMMON_MATRIX_UTILS_H_
|
@ -58,7 +58,8 @@
|
||||
# include <d3dcompiler.h>
|
||||
# endif
|
||||
|
||||
# if defined(ANGLE_ENABLE_D3D11)
|
||||
// Include D3D11 headers when OpenGL is enabled on Windows for interop extensions.
|
||||
#if defined(ANGLE_ENABLE_D3D11) || defined(ANGLE_ENABLE_OPENGL)
|
||||
#include <d3d10_1.h>
|
||||
#include <d3d11.h>
|
||||
#include <d3d11_3.h>
|
||||
@ -91,6 +92,11 @@
|
||||
#define ANGLE_USE_SSE
|
||||
#endif
|
||||
|
||||
// Mips and arm devices need to include stddef for size_t.
|
||||
#if defined(__mips__) || defined(__arm__) || defined(__aarch64__)
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
// The MemoryBarrier function name collides with a macro under Windows
|
||||
// We will undef the macro so that the function name does not get replaced
|
||||
#undef MemoryBarrier
|
@ -142,7 +142,8 @@ Optional<std::vector<wchar_t>> WidenString(size_t length, const char *cString)
|
||||
{
|
||||
std::vector<wchar_t> wcstring(length + 1);
|
||||
#if !defined(ANGLE_PLATFORM_WINDOWS)
|
||||
size_t written = mbstowcs(wcstring.data(), cString, length + 1);
|
||||
mbstate_t mbstate = {};
|
||||
size_t written = mbsrtowcs(wcstring.data(), &cString, length + 1, &mbstate);
|
||||
if (written == 0)
|
||||
{
|
||||
return Optional<std::vector<wchar_t>>::Invalid();
|
||||
@ -158,6 +159,11 @@ Optional<std::vector<wchar_t>> WidenString(size_t length, const char *cString)
|
||||
return Optional<std::vector<wchar_t>>(wcstring);
|
||||
}
|
||||
|
||||
bool BeginsWith(const std::string &str, const std::string &prefix)
|
||||
{
|
||||
return strncmp(str.c_str(), prefix.c_str(), prefix.length()) == 0;
|
||||
}
|
||||
|
||||
bool BeginsWith(const std::string &str, const char *prefix)
|
||||
{
|
||||
return strncmp(str.c_str(), prefix, strlen(prefix)) == 0;
|
||||
@ -168,6 +174,11 @@ bool BeginsWith(const char *str, const char *prefix)
|
||||
return strncmp(str, prefix, strlen(prefix)) == 0;
|
||||
}
|
||||
|
||||
bool BeginsWith(const std::string &str, const std::string &prefix, const size_t prefixLength)
|
||||
{
|
||||
return strncmp(str.c_str(), prefix.c_str(), prefixLength) == 0;
|
||||
}
|
||||
|
||||
bool EndsWith(const std::string &str, const char *suffix)
|
||||
{
|
||||
const auto len = strlen(suffix);
|
||||
@ -187,4 +198,17 @@ void ToLower(std::string *str)
|
||||
}
|
||||
}
|
||||
|
||||
bool ReplaceSubstring(std::string *str,
|
||||
const std::string &substring,
|
||||
const std::string &replacement)
|
||||
{
|
||||
size_t replacePos = str->find(substring);
|
||||
if (replacePos == std::string::npos)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
str->replace(replacePos, substring.size(), replacement);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace angle
|
@ -48,6 +48,10 @@ bool ReadFileToString(const std::string &path, std::string *stringOut);
|
||||
|
||||
Optional<std::vector<wchar_t>> WidenString(size_t length, const char *cString);
|
||||
|
||||
// Check if the string str begins with the given prefix.
|
||||
// The comparison is case sensitive.
|
||||
bool BeginsWith(const std::string &str, const std::string &prefix);
|
||||
|
||||
// Check if the string str begins with the given prefix.
|
||||
// Prefix may not be NULL and needs to be NULL terminated.
|
||||
// The comparison is case sensitive.
|
||||
@ -58,6 +62,11 @@ bool BeginsWith(const std::string &str, const char *prefix);
|
||||
// The comparison is case sensitive.
|
||||
bool BeginsWith(const char *str, const char *prefix);
|
||||
|
||||
// Check if the string str begins with the first prefixLength characters of the given prefix.
|
||||
// The length of the prefix string should be greater than or equal to prefixLength.
|
||||
// The comparison is case sensitive.
|
||||
bool BeginsWith(const std::string &str, const std::string &prefix, const size_t prefixLength);
|
||||
|
||||
// Check if the string str ends with the given suffix.
|
||||
// Suffix may not be NUL and needs to be NULL terminated.
|
||||
// The comparison is case sensitive.
|
||||
@ -65,6 +74,12 @@ bool EndsWith(const std::string& str, const char* suffix);
|
||||
|
||||
// Convert to lower-case.
|
||||
void ToLower(std::string *str);
|
||||
}
|
||||
|
||||
// Replaces the substring 'substring' in 'str' with 'replacement'. Returns true if successful.
|
||||
bool ReplaceSubstring(std::string *str,
|
||||
const std::string &substring,
|
||||
const std::string &replacement);
|
||||
|
||||
} // namespace angle
|
||||
|
||||
#endif // LIBANGLE_STRING_UTILS_H_
|
33
gfx/angle/checkout/src/common/system_utils.cpp
Normal file
33
gfx/angle/checkout/src/common/system_utils.cpp
Normal file
@ -0,0 +1,33 @@
|
||||
//
|
||||
// Copyright 2018 The ANGLE Project Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
//
|
||||
|
||||
// system_utils.cpp: Implementation of common functions
|
||||
|
||||
#include "system_utils.h"
|
||||
|
||||
namespace angle
|
||||
{
|
||||
|
||||
bool PrependPathToEnvironmentVar(const char *variableName, const char *path)
|
||||
{
|
||||
std::string oldValue = GetEnvironmentVar(variableName);
|
||||
const char *newValue = nullptr;
|
||||
std::string buf;
|
||||
if (oldValue.empty())
|
||||
{
|
||||
newValue = path;
|
||||
}
|
||||
else
|
||||
{
|
||||
buf = path;
|
||||
buf += GetPathSeparator();
|
||||
buf += oldValue;
|
||||
newValue = buf.c_str();
|
||||
}
|
||||
return SetEnvironmentVar(variableName, newValue);
|
||||
}
|
||||
|
||||
} // namespace angle
|
@ -21,6 +21,9 @@ const char *GetSharedLibraryExtension();
|
||||
Optional<std::string> GetCWD();
|
||||
bool SetCWD(const char *dirName);
|
||||
bool SetEnvironmentVar(const char *variableName, const char *value);
|
||||
std::string GetEnvironmentVar(const char *variableName);
|
||||
const char *GetPathSeparator();
|
||||
bool PrependPathToEnvironmentVar(const char *variableName, const char *path);
|
||||
|
||||
} // namespace angle
|
||||
|
@ -86,4 +86,15 @@ bool SetEnvironmentVar(const char *variableName, const char *value)
|
||||
return (setenv(variableName, value, 1) == 0);
|
||||
}
|
||||
|
||||
std::string GetEnvironmentVar(const char *variableName)
|
||||
{
|
||||
const char *value = getenv(variableName);
|
||||
return (value == nullptr ? std::string() : std::string(value));
|
||||
}
|
||||
|
||||
const char *GetPathSeparator()
|
||||
{
|
||||
return ":";
|
||||
}
|
||||
|
||||
} // namespace angle
|
@ -91,4 +91,15 @@ bool SetEnvironmentVar(const char *variableName, const char *value)
|
||||
return (setenv(variableName, value, 1) == 0);
|
||||
}
|
||||
|
||||
std::string GetEnvironmentVar(const char *variableName)
|
||||
{
|
||||
const char *value = getenv(variableName);
|
||||
return (value == nullptr ? std::string() : std::string(value));
|
||||
}
|
||||
|
||||
const char *GetPathSeparator()
|
||||
{
|
||||
return ":";
|
||||
}
|
||||
|
||||
} // namespace angle
|
@ -76,4 +76,24 @@ bool SetEnvironmentVar(const char *variableName, const char *value)
|
||||
return (SetEnvironmentVariableA(variableName, value) == TRUE);
|
||||
}
|
||||
|
||||
std::string GetEnvironmentVar(const char *variableName)
|
||||
{
|
||||
std::array<char, MAX_PATH> oldValue;
|
||||
DWORD result =
|
||||
GetEnvironmentVariableA(variableName, oldValue.data(), static_cast<DWORD>(oldValue.size()));
|
||||
if (result == 0)
|
||||
{
|
||||
return std::string();
|
||||
}
|
||||
else
|
||||
{
|
||||
return std::string(oldValue.data());
|
||||
}
|
||||
}
|
||||
|
||||
const char *GetPathSeparator()
|
||||
{
|
||||
return ";";
|
||||
}
|
||||
|
||||
} // namespace angle
|
320
gfx/angle/checkout/src/common/third_party/smhasher/src/PMurHash.cpp
vendored
Normal file
320
gfx/angle/checkout/src/common/third_party/smhasher/src/PMurHash.cpp
vendored
Normal file
@ -0,0 +1,320 @@
|
||||
/*-----------------------------------------------------------------------------
|
||||
* MurmurHash3 was written by Austin Appleby, and is placed in the public
|
||||
* domain.
|
||||
*
|
||||
* This implementation was written by Shane Day, and is also public domain.
|
||||
*
|
||||
* This is a portable ANSI C implementation of MurmurHash3_x86_32 (Murmur3A)
|
||||
* with support for progressive processing.
|
||||
*/
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
||||
If you want to understand the MurmurHash algorithm you would be much better
|
||||
off reading the original source. Just point your browser at:
|
||||
http://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp
|
||||
|
||||
|
||||
What this version provides?
|
||||
|
||||
1. Progressive data feeding. Useful when the entire payload to be hashed
|
||||
does not fit in memory or when the data is streamed through the application.
|
||||
Also useful when hashing a number of strings with a common prefix. A partial
|
||||
hash of a prefix string can be generated and reused for each suffix string.
|
||||
|
||||
2. Portability. Plain old C so that it should compile on any old compiler.
|
||||
Both CPU endian and access-alignment neutral, but avoiding inefficient code
|
||||
when possible depending on CPU capabilities.
|
||||
|
||||
3. Drop in. I personally like nice self contained public domain code, making it
|
||||
easy to pilfer without loads of refactoring to work properly in the existing
|
||||
application code & makefile structure and mucking around with licence files.
|
||||
Just copy PMurHash.h and PMurHash.c and you're ready to go.
|
||||
|
||||
|
||||
How does it work?
|
||||
|
||||
We can only process entire 32 bit chunks of input, except for the very end
|
||||
that may be shorter. So along with the partial hash we need to give back to
|
||||
the caller a carry containing up to 3 bytes that we were unable to process.
|
||||
This carry also needs to record the number of bytes the carry holds. I use
|
||||
the low 2 bits as a count (0..3) and the carry bytes are shifted into the
|
||||
high byte in stream order.
|
||||
|
||||
To handle endianess I simply use a macro that reads a uint32_t and define
|
||||
that macro to be a direct read on little endian machines, a read and swap
|
||||
on big endian machines, or a byte-by-byte read if the endianess is unknown.
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include "PMurHash.h"
|
||||
|
||||
/* I used ugly type names in the header to avoid potential conflicts with
|
||||
* application or system typedefs & defines. Since I'm not including any more
|
||||
* headers below here I can rename these so that the code reads like C99 */
|
||||
#undef uint32_t
|
||||
#define uint32_t MH_UINT32
|
||||
#undef uint8_t
|
||||
#define uint8_t MH_UINT8
|
||||
|
||||
/* MSVC warnings we choose to ignore */
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(disable: 4127) /* conditional expression is constant */
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Endianess, misalignment capabilities and util macros
|
||||
*
|
||||
* The following 3 macros are defined in this section. The other macros defined
|
||||
* are only needed to help derive these 3.
|
||||
*
|
||||
* READ_UINT32(x) Read a little endian unsigned 32-bit int
|
||||
* UNALIGNED_SAFE Defined if READ_UINT32 works on non-word boundaries
|
||||
* ROTL32(x,r) Rotate x left by r bits
|
||||
*/
|
||||
|
||||
/* Convention is to define __BYTE_ORDER == to one of these values */
|
||||
#if !defined(__BIG_ENDIAN)
|
||||
#define __BIG_ENDIAN 4321
|
||||
#endif
|
||||
#if !defined(__LITTLE_ENDIAN)
|
||||
#define __LITTLE_ENDIAN 1234
|
||||
#endif
|
||||
|
||||
/* I386 */
|
||||
#if defined(_M_IX86) || defined(__i386__) || defined(__i386) || defined(i386)
|
||||
#define __BYTE_ORDER __LITTLE_ENDIAN
|
||||
#define UNALIGNED_SAFE
|
||||
#endif
|
||||
|
||||
/* gcc 'may' define __LITTLE_ENDIAN__ or __BIG_ENDIAN__ to 1 (Note the trailing __),
|
||||
* or even _LITTLE_ENDIAN or _BIG_ENDIAN (Note the single _ prefix) */
|
||||
#if !defined(__BYTE_ORDER)
|
||||
#if defined(__LITTLE_ENDIAN__) && __LITTLE_ENDIAN__==1 || defined(_LITTLE_ENDIAN) && _LITTLE_ENDIAN==1
|
||||
#define __BYTE_ORDER __LITTLE_ENDIAN
|
||||
#elif defined(__BIG_ENDIAN__) && __BIG_ENDIAN__==1 || defined(_BIG_ENDIAN) && _BIG_ENDIAN==1
|
||||
#define __BYTE_ORDER __BIG_ENDIAN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* gcc (usually) defines xEL/EB macros for ARM and MIPS endianess */
|
||||
#if !defined(__BYTE_ORDER)
|
||||
#if defined(__ARMEL__) || defined(__MIPSEL__)
|
||||
#define __BYTE_ORDER __LITTLE_ENDIAN
|
||||
#endif
|
||||
#if defined(__ARMEB__) || defined(__MIPSEB__)
|
||||
#define __BYTE_ORDER __BIG_ENDIAN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Now find best way we can to READ_UINT32 */
|
||||
#if __BYTE_ORDER==__LITTLE_ENDIAN
|
||||
/* CPU endian matches murmurhash algorithm, so read 32-bit word directly */
|
||||
#define READ_UINT32(ptr) (*((uint32_t*)(ptr)))
|
||||
#elif __BYTE_ORDER==__BIG_ENDIAN
|
||||
/* TODO: Add additional cases below where a compiler provided bswap32 is available */
|
||||
#if defined(__GNUC__) && (__GNUC__>4 || (__GNUC__==4 && __GNUC_MINOR__>=3))
|
||||
#define READ_UINT32(ptr) (__builtin_bswap32(*((uint32_t*)(ptr))))
|
||||
#else
|
||||
/* Without a known fast bswap32 we're just as well off doing this */
|
||||
#define READ_UINT32(ptr) (ptr[0]|ptr[1]<<8|ptr[2]<<16|ptr[3]<<24)
|
||||
#define UNALIGNED_SAFE
|
||||
#endif
|
||||
#else
|
||||
/* Unknown endianess so last resort is to read individual bytes */
|
||||
#define READ_UINT32(ptr) (ptr[0]|ptr[1]<<8|ptr[2]<<16|ptr[3]<<24)
|
||||
|
||||
/* Since we're not doing word-reads we can skip the messing about with realignment */
|
||||
#define UNALIGNED_SAFE
|
||||
#endif
|
||||
|
||||
/* Find best way to ROTL32 */
|
||||
#if defined(_MSC_VER)
|
||||
#include <stdlib.h> /* Microsoft put _rotl declaration in here */
|
||||
#define ROTL32(x,r) _rotl(x,r)
|
||||
#else
|
||||
/* gcc recognises this code and generates a rotate instruction for CPUs with one */
|
||||
#define ROTL32(x,r) (((uint32_t)x << r) | ((uint32_t)x >> (32 - r)))
|
||||
#endif
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Core murmurhash algorithm macros */
|
||||
|
||||
#define C1 (0xcc9e2d51)
|
||||
#define C2 (0x1b873593)
|
||||
|
||||
/* This is the main processing body of the algorithm. It operates
|
||||
* on each full 32-bits of input. */
|
||||
#define DOBLOCK(h1, k1) do{ \
|
||||
k1 *= C1; \
|
||||
k1 = ROTL32(k1,15); \
|
||||
k1 *= C2; \
|
||||
\
|
||||
h1 ^= k1; \
|
||||
h1 = ROTL32(h1,13); \
|
||||
h1 = h1*5+0xe6546b64; \
|
||||
}while(0)
|
||||
|
||||
|
||||
/* Append unaligned bytes to carry, forcing hash churn if we have 4 bytes */
|
||||
/* cnt=bytes to process, h1=name of h1 var, c=carry, n=bytes in c, ptr/len=payload */
|
||||
#define DOBYTES(cnt, h1, c, n, ptr, len) do{ \
|
||||
int _i = cnt; \
|
||||
while(_i--) { \
|
||||
c = c>>8 | *ptr++<<24; \
|
||||
n++; len--; \
|
||||
if(n==4) { \
|
||||
DOBLOCK(h1, c); \
|
||||
n = 0; \
|
||||
} \
|
||||
} }while(0)
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
namespace angle
|
||||
{
|
||||
/* Main hashing function. Initialise carry to 0 and h1 to 0 or an initial seed
|
||||
* if wanted. Both ph1 and pcarry are required arguments. */
|
||||
void PMurHash32_Process(uint32_t *ph1, uint32_t *pcarry, const void *key, int len)
|
||||
{
|
||||
uint32_t h1 = *ph1;
|
||||
uint32_t c = *pcarry;
|
||||
|
||||
const uint8_t *ptr = (uint8_t*)key;
|
||||
const uint8_t *end;
|
||||
|
||||
/* Extract carry count from low 2 bits of c value */
|
||||
int n = c & 3;
|
||||
|
||||
#if defined(UNALIGNED_SAFE)
|
||||
/* This CPU handles unaligned word access */
|
||||
|
||||
/* Consume any carry bytes */
|
||||
int i = (4-n) & 3;
|
||||
if(i && i <= len) {
|
||||
DOBYTES(i, h1, c, n, ptr, len);
|
||||
}
|
||||
|
||||
/* Process 32-bit chunks */
|
||||
end = ptr + len/4*4;
|
||||
for( ; ptr < end ; ptr+=4) {
|
||||
uint32_t k1 = READ_UINT32(ptr);
|
||||
DOBLOCK(h1, k1);
|
||||
}
|
||||
|
||||
#else /*UNALIGNED_SAFE*/
|
||||
/* This CPU does not handle unaligned word access */
|
||||
|
||||
/* Consume enough so that the next data byte is word aligned */
|
||||
int i = -(long)ptr & 3;
|
||||
if(i && i <= len) {
|
||||
DOBYTES(i, h1, c, n, ptr, len);
|
||||
}
|
||||
|
||||
/* We're now aligned. Process in aligned blocks. Specialise for each possible carry count */
|
||||
end = ptr + len/4*4;
|
||||
switch(n) { /* how many bytes in c */
|
||||
case 0: /* c=[----] w=[3210] b=[3210]=w c'=[----] */
|
||||
for( ; ptr < end ; ptr+=4) {
|
||||
uint32_t k1 = READ_UINT32(ptr);
|
||||
DOBLOCK(h1, k1);
|
||||
}
|
||||
break;
|
||||
case 1: /* c=[0---] w=[4321] b=[3210]=c>>24|w<<8 c'=[4---] */
|
||||
for( ; ptr < end ; ptr+=4) {
|
||||
uint32_t k1 = c>>24;
|
||||
c = READ_UINT32(ptr);
|
||||
k1 |= c<<8;
|
||||
DOBLOCK(h1, k1);
|
||||
}
|
||||
break;
|
||||
case 2: /* c=[10--] w=[5432] b=[3210]=c>>16|w<<16 c'=[54--] */
|
||||
for( ; ptr < end ; ptr+=4) {
|
||||
uint32_t k1 = c>>16;
|
||||
c = READ_UINT32(ptr);
|
||||
k1 |= c<<16;
|
||||
DOBLOCK(h1, k1);
|
||||
}
|
||||
break;
|
||||
case 3: /* c=[210-] w=[6543] b=[3210]=c>>8|w<<24 c'=[654-] */
|
||||
for( ; ptr < end ; ptr+=4) {
|
||||
uint32_t k1 = c>>8;
|
||||
c = READ_UINT32(ptr);
|
||||
k1 |= c<<24;
|
||||
DOBLOCK(h1, k1);
|
||||
}
|
||||
}
|
||||
#endif /*UNALIGNED_SAFE*/
|
||||
|
||||
/* Advance over whole 32-bit chunks, possibly leaving 1..3 bytes */
|
||||
len -= len/4*4;
|
||||
|
||||
/* Append any remaining bytes into carry */
|
||||
DOBYTES(len, h1, c, n, ptr, len);
|
||||
|
||||
/* Copy out new running hash and carry */
|
||||
*ph1 = h1;
|
||||
*pcarry = (c & ~0xff) | n;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
/* Finalize a hash. To match the original Murmur3A the total_length must be provided */
|
||||
uint32_t PMurHash32_Result(uint32_t h, uint32_t carry, uint32_t total_length)
|
||||
{
|
||||
uint32_t k1;
|
||||
int n = carry & 3;
|
||||
if(n) {
|
||||
k1 = carry >> (4-n)*8;
|
||||
k1 *= C1; k1 = ROTL32(k1,15); k1 *= C2; h ^= k1;
|
||||
}
|
||||
h ^= total_length;
|
||||
|
||||
/* fmix */
|
||||
h ^= h >> 16;
|
||||
h *= 0x85ebca6b;
|
||||
h ^= h >> 13;
|
||||
h *= 0xc2b2ae35;
|
||||
h ^= h >> 16;
|
||||
|
||||
return h;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
/* Murmur3A compatable all-at-once */
|
||||
uint32_t PMurHash32(uint32_t seed, const void *key, int len)
|
||||
{
|
||||
uint32_t h1=seed, carry=0;
|
||||
PMurHash32_Process(&h1, &carry, key, len);
|
||||
return PMurHash32_Result(h1, carry, len);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
/* Provide an API suitable for smhasher */
|
||||
void PMurHash32_test(const void *key, int len, uint32_t seed, void *out)
|
||||
{
|
||||
uint32_t h1=seed, carry=0;
|
||||
const uint8_t *ptr = (uint8_t*)key;
|
||||
const uint8_t *end = ptr + len;
|
||||
|
||||
#if 0 /* Exercise the progressive processing */
|
||||
while(ptr < end) {
|
||||
//const uint8_t *mid = ptr + rand()%(end-ptr)+1;
|
||||
const uint8_t *mid = ptr + (rand()&0xF);
|
||||
mid = mid<end?mid:end;
|
||||
PMurHash32_Process(&h1, &carry, ptr, mid-ptr);
|
||||
ptr = mid;
|
||||
}
|
||||
#else
|
||||
PMurHash32_Process(&h1, &carry, ptr, (int)(end-ptr));
|
||||
#endif
|
||||
h1 = PMurHash32_Result(h1, carry, len);
|
||||
*(uint32_t*)out = h1;
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
59
gfx/angle/checkout/src/common/third_party/smhasher/src/PMurHash.h
vendored
Normal file
59
gfx/angle/checkout/src/common/third_party/smhasher/src/PMurHash.h
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
/*-----------------------------------------------------------------------------
|
||||
* MurmurHash3 was written by Austin Appleby, and is placed in the public
|
||||
* domain.
|
||||
*
|
||||
* This implementation was written by Shane Day, and is also public domain.
|
||||
*
|
||||
* This is a portable ANSI C implementation of MurmurHash3_x86_32 (Murmur3A)
|
||||
* with support for progressive processing.
|
||||
*/
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Determine what native type to use for uint32_t */
|
||||
|
||||
/* We can't use the name 'uint32_t' here because it will conflict with
|
||||
* any version provided by the system headers or application. */
|
||||
|
||||
/* First look for special cases */
|
||||
#if defined(_MSC_VER)
|
||||
#define MH_UINT32 unsigned long
|
||||
#endif
|
||||
|
||||
/* If the compiler says it's C99 then take its word for it */
|
||||
#if !defined(MH_UINT32) && ( \
|
||||
defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L )
|
||||
#include <stdint.h>
|
||||
#define MH_UINT32 uint32_t
|
||||
#endif
|
||||
|
||||
/* Otherwise try testing against max value macros from limit.h */
|
||||
#if !defined(MH_UINT32)
|
||||
#include <limits.h>
|
||||
#if (USHRT_MAX == 0xffffffffUL)
|
||||
#define MH_UINT32 unsigned short
|
||||
#elif (UINT_MAX == 0xffffffffUL)
|
||||
#define MH_UINT32 unsigned int
|
||||
#elif (ULONG_MAX == 0xffffffffUL)
|
||||
#define MH_UINT32 unsigned long
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(MH_UINT32)
|
||||
#error Unable to determine type name for unsigned 32-bit int
|
||||
#endif
|
||||
|
||||
/* I'm yet to work on a platform where 'unsigned char' is not 8 bits */
|
||||
#define MH_UINT8 unsigned char
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Prototypes */
|
||||
|
||||
namespace angle
|
||||
{
|
||||
void PMurHash32_Process(MH_UINT32 *ph1, MH_UINT32 *pcarry, const void *key, int len);
|
||||
MH_UINT32 PMurHash32_Result(MH_UINT32 h1, MH_UINT32 carry, MH_UINT32 total_length);
|
||||
MH_UINT32 PMurHash32(MH_UINT32 seed, const void *key, int len);
|
||||
|
||||
void PMurHash32_test(const void *key, int len, MH_UINT32 seed, void *out);
|
||||
}
|
@ -76,7 +76,7 @@ constexpr std::array<UniformTypeInfo, 59> kInfoTable = {
|
||||
sizeof(GLint) * 4, sizeof(GLint) * 1, true, false, false},
|
||||
{GL_INT_SAMPLER_2D_ARRAY, GL_INT, GL_TEXTURE_2D_ARRAY, GL_NONE, GL_NONE, 1, 1, 1,
|
||||
sizeof(GLint), sizeof(GLint) * 4, sizeof(GLint) * 1, true, false, false},
|
||||
{GL_INT_SAMPLER_2D_MULTISAMPLE, GL_INT, GL_TEXTURE_2D, GL_NONE, GL_NONE, 1, 1, 1,
|
||||
{GL_INT_SAMPLER_2D_MULTISAMPLE, GL_INT, GL_TEXTURE_2D_MULTISAMPLE, GL_NONE, GL_NONE, 1, 1, 1,
|
||||
sizeof(GLint), sizeof(GLint) * 4, sizeof(GLint) * 1, true, false, false},
|
||||
{GL_INT_SAMPLER_3D, GL_INT, GL_TEXTURE_3D, GL_NONE, GL_NONE, 1, 1, 1, sizeof(GLint),
|
||||
sizeof(GLint) * 4, sizeof(GLint) * 1, true, false, false},
|
||||
@ -94,8 +94,8 @@ constexpr std::array<UniformTypeInfo, 59> kInfoTable = {
|
||||
sizeof(GLint) * 4, sizeof(GLint) * 1, true, false, false},
|
||||
{GL_SAMPLER_2D_ARRAY_SHADOW, GL_INT, GL_TEXTURE_2D_ARRAY, GL_NONE, GL_NONE, 1, 1, 1,
|
||||
sizeof(GLint), sizeof(GLint) * 4, sizeof(GLint) * 1, true, false, false},
|
||||
{GL_SAMPLER_2D_MULTISAMPLE, GL_INT, GL_TEXTURE_2D, GL_NONE, GL_NONE, 1, 1, 1, sizeof(GLint),
|
||||
sizeof(GLint) * 4, sizeof(GLint) * 1, true, false, false},
|
||||
{GL_SAMPLER_2D_MULTISAMPLE, GL_INT, GL_TEXTURE_2D_MULTISAMPLE, GL_NONE, GL_NONE, 1, 1, 1,
|
||||
sizeof(GLint), sizeof(GLint) * 4, sizeof(GLint) * 1, true, false, false},
|
||||
{GL_SAMPLER_2D_RECT_ANGLE, GL_INT, GL_TEXTURE_2D, GL_NONE, GL_NONE, 1, 1, 1, sizeof(GLint),
|
||||
sizeof(GLint) * 4, sizeof(GLint) * 1, true, false, false},
|
||||
{GL_SAMPLER_2D_SHADOW, GL_INT, GL_TEXTURE_2D, GL_NONE, GL_NONE, 1, 1, 1, sizeof(GLint),
|
||||
@ -124,8 +124,8 @@ constexpr std::array<UniformTypeInfo, 59> kInfoTable = {
|
||||
sizeof(GLuint), sizeof(GLuint) * 4, sizeof(GLuint) * 1, true, false, false},
|
||||
{GL_UNSIGNED_INT_SAMPLER_2D_ARRAY, GL_UNSIGNED_INT, GL_TEXTURE_2D_ARRAY, GL_NONE, GL_NONE, 1,
|
||||
1, 1, sizeof(GLuint), sizeof(GLuint) * 4, sizeof(GLuint) * 1, true, false, false},
|
||||
{GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE, GL_UNSIGNED_INT, GL_TEXTURE_2D, GL_NONE, GL_NONE, 1,
|
||||
1, 1, sizeof(GLuint), sizeof(GLuint) * 4, sizeof(GLuint) * 1, true, false, false},
|
||||
{GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE, GL_UNSIGNED_INT, GL_TEXTURE_2D_MULTISAMPLE, GL_NONE,
|
||||
GL_NONE, 1, 1, 1, sizeof(GLuint), sizeof(GLuint) * 4, sizeof(GLuint) * 1, true, false, false},
|
||||
{GL_UNSIGNED_INT_SAMPLER_3D, GL_UNSIGNED_INT, GL_TEXTURE_3D, GL_NONE, GL_NONE, 1, 1, 1,
|
||||
sizeof(GLuint), sizeof(GLuint) * 4, sizeof(GLuint) * 1, true, false, false},
|
||||
{GL_UNSIGNED_INT_SAMPLER_CUBE, GL_UNSIGNED_INT, GL_TEXTURE_CUBE_MAP, GL_NONE, GL_NONE, 1, 1, 1,
|
@ -7,6 +7,7 @@
|
||||
// utilities.cpp: Conversion functions and other utility routines.
|
||||
|
||||
#include "common/utilities.h"
|
||||
#include <GLSLANG/ShaderVars.h>
|
||||
#include "common/mathutil.h"
|
||||
#include "common/platform.h"
|
||||
|
||||
@ -735,88 +736,160 @@ int VariableSortOrder(GLenum type)
|
||||
}
|
||||
}
|
||||
|
||||
std::string ParseResourceName(const std::string &name, size_t *outSubscript)
|
||||
std::string ParseResourceName(const std::string &name, std::vector<unsigned int> *outSubscripts)
|
||||
{
|
||||
if (outSubscripts)
|
||||
{
|
||||
outSubscripts->clear();
|
||||
}
|
||||
// Strip any trailing array indexing operators and retrieve the subscripts.
|
||||
size_t baseNameLength = name.length();
|
||||
bool hasIndex = true;
|
||||
while (hasIndex)
|
||||
{
|
||||
size_t open = name.find_last_of('[', baseNameLength - 1);
|
||||
size_t close = name.find_last_of(']', baseNameLength - 1);
|
||||
hasIndex = (open != std::string::npos) && (close == baseNameLength - 1);
|
||||
if (hasIndex)
|
||||
{
|
||||
baseNameLength = open;
|
||||
if (outSubscripts)
|
||||
{
|
||||
int index = atoi(name.substr(open + 1).c_str());
|
||||
if (index >= 0)
|
||||
{
|
||||
outSubscripts->push_back(index);
|
||||
}
|
||||
else
|
||||
{
|
||||
outSubscripts->push_back(GL_INVALID_INDEX);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return name.substr(0, baseNameLength);
|
||||
}
|
||||
|
||||
const sh::ShaderVariable *FindShaderVarField(const sh::ShaderVariable &var,
|
||||
const std::string &fullName)
|
||||
{
|
||||
if (var.fields.empty())
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
size_t pos = fullName.find_first_of(".");
|
||||
if (pos == std::string::npos)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
std::string topName = fullName.substr(0, pos);
|
||||
if (topName != var.name)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
std::string fieldName = fullName.substr(pos + 1);
|
||||
if (fieldName.empty())
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
for (const auto &field : var.fields)
|
||||
{
|
||||
if (field.name == fieldName)
|
||||
{
|
||||
return &field;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
unsigned int ArraySizeProduct(const std::vector<unsigned int> &arraySizes)
|
||||
{
|
||||
unsigned int arraySizeProduct = 1u;
|
||||
for (unsigned int arraySize : arraySizes)
|
||||
{
|
||||
arraySizeProduct *= arraySize;
|
||||
}
|
||||
return arraySizeProduct;
|
||||
}
|
||||
|
||||
unsigned int ParseArrayIndex(const std::string &name, size_t *nameLengthWithoutArrayIndexOut)
|
||||
{
|
||||
ASSERT(nameLengthWithoutArrayIndexOut != nullptr);
|
||||
|
||||
// Strip any trailing array operator and retrieve the subscript
|
||||
size_t open = name.find_last_of('[');
|
||||
size_t close = name.find_last_of(']');
|
||||
bool hasIndex = (open != std::string::npos) && (close == name.length() - 1);
|
||||
if (!hasIndex)
|
||||
if (open != std::string::npos && name.back() == ']')
|
||||
{
|
||||
if (outSubscript)
|
||||
bool indexIsValidDecimalNumber = true;
|
||||
for (size_t i = open + 1; i < name.length() - 1u; ++i)
|
||||
{
|
||||
*outSubscript = GL_INVALID_INDEX;
|
||||
if (!isdigit(name[i]))
|
||||
{
|
||||
indexIsValidDecimalNumber = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
}
|
||||
if (indexIsValidDecimalNumber)
|
||||
{
|
||||
errno = 0; // reset global error flag.
|
||||
unsigned long subscript =
|
||||
strtoul(name.c_str() + open + 1, /*endptr*/ nullptr, /*radix*/ 10);
|
||||
|
||||
if (outSubscript)
|
||||
{
|
||||
int index = atoi(name.substr(open + 1).c_str());
|
||||
if (index >= 0)
|
||||
{
|
||||
*outSubscript = index;
|
||||
}
|
||||
else
|
||||
{
|
||||
*outSubscript = GL_INVALID_INDEX;
|
||||
// Check if resulting integer is out-of-range or conversion error.
|
||||
if ((subscript <= static_cast<unsigned long>(UINT_MAX)) &&
|
||||
!(subscript == ULONG_MAX && errno == ERANGE) && !(errno != 0 && subscript == 0))
|
||||
{
|
||||
*nameLengthWithoutArrayIndexOut = open;
|
||||
return static_cast<unsigned int>(subscript);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return name.substr(0, open);
|
||||
*nameLengthWithoutArrayIndexOut = name.length();
|
||||
return GL_INVALID_INDEX;
|
||||
}
|
||||
|
||||
template <>
|
||||
GLuint ConvertToGLuint(GLfloat param)
|
||||
const char *GetGenericErrorMessage(GLenum error)
|
||||
{
|
||||
return uiround<GLuint>(param);
|
||||
}
|
||||
|
||||
template <>
|
||||
GLint ConvertToGLint(uint32_t param)
|
||||
{
|
||||
uint32_t max = static_cast<uint32_t>(std::numeric_limits<GLint>::max());
|
||||
return static_cast<GLint>(param >= max ? max : param);
|
||||
}
|
||||
|
||||
template <>
|
||||
GLint ConvertToGLint(uint64_t param)
|
||||
{
|
||||
uint64_t max = static_cast<uint64_t>(std::numeric_limits<GLint>::max());
|
||||
return static_cast<GLint>(param >= max ? max : param);
|
||||
}
|
||||
|
||||
template <>
|
||||
GLint ConvertToGLint(GLfloat param)
|
||||
{
|
||||
return iround<GLint>(param);
|
||||
}
|
||||
|
||||
template <>
|
||||
GLint ConvertFromGLfloat(GLfloat param)
|
||||
{
|
||||
return iround<GLint>(param);
|
||||
}
|
||||
template <>
|
||||
GLuint ConvertFromGLfloat(GLfloat param)
|
||||
{
|
||||
return uiround<GLuint>(param);
|
||||
}
|
||||
|
||||
unsigned int ParseAndStripArrayIndex(std::string *name)
|
||||
{
|
||||
unsigned int subscript = GL_INVALID_INDEX;
|
||||
|
||||
// Strip any trailing array operator and retrieve the subscript
|
||||
size_t open = name->find_last_of('[');
|
||||
size_t close = name->find_last_of(']');
|
||||
if (open != std::string::npos && close == name->length() - 1)
|
||||
switch (error)
|
||||
{
|
||||
subscript = atoi(name->c_str() + open + 1);
|
||||
name->erase(open);
|
||||
case GL_NO_ERROR:
|
||||
return "";
|
||||
case GL_INVALID_ENUM:
|
||||
return "Invalid enum.";
|
||||
case GL_INVALID_VALUE:
|
||||
return "Invalid value.";
|
||||
case GL_INVALID_OPERATION:
|
||||
return "Invalid operation.";
|
||||
case GL_STACK_OVERFLOW:
|
||||
return "Stack overflow.";
|
||||
case GL_STACK_UNDERFLOW:
|
||||
return "Stack underflow.";
|
||||
case GL_OUT_OF_MEMORY:
|
||||
return "Out of memory.";
|
||||
case GL_INVALID_FRAMEBUFFER_OPERATION:
|
||||
return "Invalid framebuffer operation.";
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return "Unknown error.";
|
||||
}
|
||||
}
|
||||
|
||||
return subscript;
|
||||
unsigned int ElementTypeSize(GLenum elementType)
|
||||
{
|
||||
switch (elementType)
|
||||
{
|
||||
case GL_UNSIGNED_BYTE:
|
||||
return sizeof(GLubyte);
|
||||
case GL_UNSIGNED_SHORT:
|
||||
return sizeof(GLushort);
|
||||
case GL_UNSIGNED_INT:
|
||||
return sizeof(GLuint);
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace gl
|
||||
@ -874,6 +947,51 @@ bool IsRenderbufferTarget(EGLenum target)
|
||||
{
|
||||
return target == EGL_GL_RENDERBUFFER_KHR;
|
||||
}
|
||||
|
||||
const char *GetGenericErrorMessage(EGLint error)
|
||||
{
|
||||
switch (error)
|
||||
{
|
||||
case EGL_SUCCESS:
|
||||
return "";
|
||||
case EGL_NOT_INITIALIZED:
|
||||
return "Not initialized.";
|
||||
case EGL_BAD_ACCESS:
|
||||
return "Bad access.";
|
||||
case EGL_BAD_ALLOC:
|
||||
return "Bad allocation.";
|
||||
case EGL_BAD_ATTRIBUTE:
|
||||
return "Bad attribute.";
|
||||
case EGL_BAD_CONFIG:
|
||||
return "Bad config.";
|
||||
case EGL_BAD_CONTEXT:
|
||||
return "Bad context.";
|
||||
case EGL_BAD_CURRENT_SURFACE:
|
||||
return "Bad current surface.";
|
||||
case EGL_BAD_DISPLAY:
|
||||
return "Bad display.";
|
||||
case EGL_BAD_MATCH:
|
||||
return "Bad match.";
|
||||
case EGL_BAD_NATIVE_WINDOW:
|
||||
return "Bad native window.";
|
||||
case EGL_BAD_PARAMETER:
|
||||
return "Bad parameter.";
|
||||
case EGL_BAD_SURFACE:
|
||||
return "Bad surface.";
|
||||
case EGL_CONTEXT_LOST:
|
||||
return "Context lost.";
|
||||
case EGL_BAD_STREAM_KHR:
|
||||
return "Bad stream.";
|
||||
case EGL_BAD_STATE_KHR:
|
||||
return "Bad state.";
|
||||
case EGL_BAD_DEVICE_EXT:
|
||||
return "Bad device.";
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return "Unknown error.";
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace egl
|
||||
|
||||
namespace egl_gl
|
||||
@ -908,6 +1026,22 @@ GLenum EGLImageTargetToGLTextureTarget(EGLenum eglTarget)
|
||||
}
|
||||
}
|
||||
|
||||
GLenum EGLTextureTargetToGLTextureTarget(EGLenum eglTarget)
|
||||
{
|
||||
switch (eglTarget)
|
||||
{
|
||||
case EGL_TEXTURE_2D:
|
||||
return GL_TEXTURE_2D;
|
||||
|
||||
case EGL_TEXTURE_RECTANGLE_ANGLE:
|
||||
return GL_TEXTURE_RECTANGLE_ANGLE;
|
||||
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return GL_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
GLuint EGLClientBufferToGLObjectHandle(EGLClientBuffer buffer)
|
||||
{
|
||||
return static_cast<GLuint>(reinterpret_cast<uintptr_t>(buffer));
|
@ -12,12 +12,18 @@
|
||||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
|
||||
#include "angle_gl.h"
|
||||
#include <string>
|
||||
#include <math.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "angle_gl.h"
|
||||
|
||||
#include "common/mathutil.h"
|
||||
|
||||
namespace sh
|
||||
{
|
||||
struct ShaderVariable;
|
||||
}
|
||||
|
||||
namespace gl
|
||||
{
|
||||
|
||||
@ -49,10 +55,17 @@ bool IsCubeMapTextureTarget(GLenum target);
|
||||
size_t CubeMapTextureTargetToLayerIndex(GLenum target);
|
||||
GLenum LayerIndexToCubeMapTextureTarget(size_t index);
|
||||
|
||||
// Parse the base resource name and array index. Returns the base name of the resource.
|
||||
// outSubscript is set to GL_INVALID_INDEX if the provided name is not an array or the array index
|
||||
// is invalid.
|
||||
std::string ParseResourceName(const std::string &name, size_t *outSubscript);
|
||||
// Parse the base resource name and array indices. Returns the base name of the resource.
|
||||
// If the provided name doesn't index an array, the outSubscripts vector will be empty.
|
||||
// If the provided name indexes an array, the outSubscripts vector will contain indices with
|
||||
// outermost array indices in the back. If an array index is invalid, GL_INVALID_INDEX is added to
|
||||
// outSubscripts.
|
||||
std::string ParseResourceName(const std::string &name, std::vector<unsigned int> *outSubscripts);
|
||||
|
||||
// Find the child field which matches 'fullName' == var.name + "." + field.name.
|
||||
// Return nullptr if not found.
|
||||
const sh::ShaderVariable *FindShaderVarField(const sh::ShaderVariable &var,
|
||||
const std::string &fullName);
|
||||
|
||||
// Find the range of index values in the provided indices pointer. Primitive restart indices are
|
||||
// only counted in the range if primitive restart is disabled.
|
||||
@ -67,101 +80,20 @@ GLuint GetPrimitiveRestartIndex(GLenum indexType);
|
||||
bool IsTriangleMode(GLenum drawMode);
|
||||
bool IsIntegerFormat(GLenum unsizedFormat);
|
||||
|
||||
// [OpenGL ES 3.0.2] Section 2.3.1 page 14
|
||||
// Data Conversion For State-Setting Commands
|
||||
// Floating-point values are rounded to the nearest integer, instead of truncated, as done by static_cast.
|
||||
template <typename outT> outT iround(GLfloat value) { return static_cast<outT>(value > 0.0f ? floor(value + 0.5f) : ceil(value - 0.5f)); }
|
||||
template <typename outT> outT uiround(GLfloat value) { return static_cast<outT>(value + 0.5f); }
|
||||
// Returns the product of the sizes in the vector, or 1 if the vector is empty. Doesn't currently
|
||||
// perform overflow checks.
|
||||
unsigned int ArraySizeProduct(const std::vector<unsigned int> &arraySizes);
|
||||
|
||||
// Helper for converting arbitrary GL types to other GL types used in queries and state setting
|
||||
|
||||
// TODO(jie.a.chen@intel.com): Add the conversion rule for all helpers as the spec requires:
|
||||
// "If a value is so large in magnitude that it cannot be represented with the requested type,"
|
||||
// "then the nearest value representable using the requested type is returned."
|
||||
|
||||
template <typename ParamType>
|
||||
GLuint ConvertToGLuint(ParamType param)
|
||||
{
|
||||
return static_cast<GLuint>(param);
|
||||
}
|
||||
template <>
|
||||
GLuint ConvertToGLuint(GLfloat param);
|
||||
|
||||
template <typename ParamType>
|
||||
GLint ConvertToGLint(ParamType param)
|
||||
{
|
||||
return static_cast<GLint>(param);
|
||||
}
|
||||
|
||||
template <>
|
||||
GLint ConvertToGLint(uint32_t param);
|
||||
|
||||
template <>
|
||||
GLint ConvertToGLint(uint64_t param);
|
||||
|
||||
template <>
|
||||
GLint ConvertToGLint(GLfloat param);
|
||||
|
||||
// Same conversion as uint
|
||||
template <typename ParamType>
|
||||
GLenum ConvertToGLenum(ParamType param)
|
||||
{
|
||||
return static_cast<GLenum>(ConvertToGLuint(param));
|
||||
}
|
||||
|
||||
template <typename ParamType>
|
||||
GLfloat ConvertToGLfloat(ParamType param)
|
||||
{
|
||||
return static_cast<GLfloat>(param);
|
||||
}
|
||||
|
||||
template <typename ParamType>
|
||||
ParamType ConvertFromGLfloat(GLfloat param)
|
||||
{
|
||||
return static_cast<ParamType>(param);
|
||||
}
|
||||
template <>
|
||||
GLint ConvertFromGLfloat(GLfloat param);
|
||||
template <>
|
||||
GLuint ConvertFromGLfloat(GLfloat param);
|
||||
|
||||
template <typename ParamType>
|
||||
ParamType ConvertFromGLenum(GLenum param)
|
||||
{
|
||||
return static_cast<ParamType>(param);
|
||||
}
|
||||
|
||||
template <typename ParamType>
|
||||
ParamType ConvertFromGLuint(GLuint param)
|
||||
{
|
||||
return static_cast<ParamType>(param);
|
||||
}
|
||||
|
||||
template <typename ParamType>
|
||||
ParamType ConvertFromGLint(GLint param)
|
||||
{
|
||||
return static_cast<ParamType>(param);
|
||||
}
|
||||
|
||||
template <typename ParamType>
|
||||
ParamType ConvertFromGLboolean(GLboolean param)
|
||||
{
|
||||
return static_cast<ParamType>(param ? GL_TRUE : GL_FALSE);
|
||||
}
|
||||
|
||||
template <typename ParamType>
|
||||
ParamType ConvertFromGLint64(GLint64 param)
|
||||
{
|
||||
return clampCast<ParamType>(param);
|
||||
}
|
||||
|
||||
unsigned int ParseAndStripArrayIndex(std::string *name);
|
||||
// Return the array index at the end of name, and write the length of name before the final array
|
||||
// index into nameLengthWithoutArrayIndexOut. In case name doesn't include an array index, return
|
||||
// GL_INVALID_INDEX and write the length of the original string.
|
||||
unsigned int ParseArrayIndex(const std::string &name, size_t *nameLengthWithoutArrayIndexOut);
|
||||
|
||||
struct UniformTypeInfo final : angle::NonCopyable
|
||||
{
|
||||
constexpr UniformTypeInfo(GLenum type,
|
||||
GLenum componentType,
|
||||
GLenum samplerTextureType,
|
||||
GLenum textureType,
|
||||
GLenum transposedMatrixType,
|
||||
GLenum boolVectorType,
|
||||
int rowCount,
|
||||
@ -175,7 +107,7 @@ struct UniformTypeInfo final : angle::NonCopyable
|
||||
bool isImageType)
|
||||
: type(type),
|
||||
componentType(componentType),
|
||||
samplerTextureType(samplerTextureType),
|
||||
textureType(textureType),
|
||||
transposedMatrixType(transposedMatrixType),
|
||||
boolVectorType(boolVectorType),
|
||||
rowCount(rowCount),
|
||||
@ -192,7 +124,7 @@ struct UniformTypeInfo final : angle::NonCopyable
|
||||
|
||||
GLenum type;
|
||||
GLenum componentType;
|
||||
GLenum samplerTextureType;
|
||||
GLenum textureType;
|
||||
GLenum transposedMatrixType;
|
||||
GLenum boolVectorType;
|
||||
int rowCount;
|
||||
@ -208,6 +140,10 @@ struct UniformTypeInfo final : angle::NonCopyable
|
||||
|
||||
const UniformTypeInfo &GetUniformTypeInfo(GLenum uniformType);
|
||||
|
||||
const char *GetGenericErrorMessage(GLenum error);
|
||||
|
||||
unsigned int ElementTypeSize(GLenum elementType);
|
||||
|
||||
} // namespace gl
|
||||
|
||||
namespace egl
|
||||
@ -219,12 +155,15 @@ size_t CubeMapTextureTargetToLayerIndex(EGLenum target);
|
||||
EGLenum LayerIndexToCubeMapTextureTarget(size_t index);
|
||||
bool IsTextureTarget(EGLenum target);
|
||||
bool IsRenderbufferTarget(EGLenum target);
|
||||
}
|
||||
|
||||
const char *GetGenericErrorMessage(EGLint error);
|
||||
} // namespace egl
|
||||
|
||||
namespace egl_gl
|
||||
{
|
||||
GLenum EGLCubeMapTargetToGLCubeMapTarget(EGLenum eglTarget);
|
||||
GLenum EGLImageTargetToGLTextureTarget(EGLenum eglTarget);
|
||||
GLenum EGLTextureTargetToGLTextureTarget(EGLenum eglTarget);
|
||||
GLuint EGLClientBufferToGLObjectHandle(EGLClientBuffer buffer);
|
||||
}
|
||||
|
@ -118,6 +118,8 @@ const char *Diagnostics::message(ID id)
|
||||
return "extension directive must occur before any non-preprocessor tokens in ESSL3";
|
||||
case PP_UNDEFINED_SHIFT:
|
||||
return "shift exponent is negative or undefined";
|
||||
case PP_TOKENIZER_ERROR:
|
||||
return "internal tokenizer error";
|
||||
// Errors end.
|
||||
// Warnings begin.
|
||||
case PP_EOF_IN_DIRECTIVE:
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user