Merge "Fix negative eglGetCurrentSurface tests."
authorMika Isojärvi <misojarvi@google.com>
Fri, 20 Mar 2015 18:04:40 +0000 (18:04 +0000)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Fri, 20 Mar 2015 18:04:41 +0000 (18:04 +0000)
91 files changed:
Android.mk
MODULE_LICENSE_APACHE2 [new file with mode: 0644]
NOTICE [new file with mode: 0644]
android/cts/com.drawelements.deqp.gles3.xml
android/cts/es30-lmp-mr1.txt
android/cts/es30-lmp.txt
android/package/src/com/drawelements/deqp/execserver/ExecServerActivity.java
android/package/src/com/drawelements/deqp/execserver/ExecService.java
android/package/src/com/drawelements/deqp/execserver/ServiceStarter.java
android/package/src/com/drawelements/deqp/testercore/DeqpInstrumentation.java
android/package/src/com/drawelements/deqp/testercore/Log.java
android/package/src/com/drawelements/deqp/testercore/RemoteAPI.java
android/package/src/com/drawelements/deqp/testercore/TestLogParser.java
android/scripts/build.py
android/scripts/common.py
android/scripts/install.py
data/gles2/shaders/functions.test
data/gles2/shaders/scoping.test
framework/common/tcuTexture.cpp
framework/common/tcuTexture.hpp
framework/common/tcuTextureUtil.cpp
framework/delibs/cmake/Defs.cmake
framework/delibs/decpp/CMakeLists.txt
framework/delibs/decpp/deArrayUtil.cpp [new file with mode: 0644]
framework/delibs/decpp/deArrayUtil.hpp [new file with mode: 0644]
framework/delibs/decpp/deDefs.hpp
framework/delibs/decpp/deMeta.cpp [new file with mode: 0644]
framework/delibs/decpp/deMeta.hpp [new file with mode: 0644]
framework/egl/egluStaticES20Library.inl
framework/egl/egluStaticES30Library.inl
framework/opengl/gluCallLogUtil.inl
framework/opengl/gluCallLogWrapper.inl
framework/opengl/gluCallLogWrapperApi.inl
framework/opengl/gluES3PlusWrapperFuncs.inl
framework/opengl/gluObjectWrapper.cpp
framework/opengl/gluQueryUtil.inl
framework/opengl/gluShaderUtil.cpp
framework/opengl/gluStrUtil.hpp
framework/opengl/gluStrUtil.inl
framework/opengl/gluStrUtilPrototypes.inl
framework/opengl/gluTexture.hpp
framework/opengl/gluTextureUtil.cpp
framework/opengl/gluVarType.cpp
framework/opengl/simplereference/sglrReferenceContext.cpp
framework/opengl/simplereference/sglrReferenceContext.hpp
framework/opengl/wrapper/glwApi.inl
framework/opengl/wrapper/glwEnums.inl
framework/opengl/wrapper/glwFunctionTypes.inl
framework/opengl/wrapper/glwFunctions.inl
framework/opengl/wrapper/glwImpl.inl
framework/opengl/wrapper/glwInitES20.inl
framework/opengl/wrapper/glwInitES20Direct.inl
framework/opengl/wrapper/glwInitES30.inl
framework/opengl/wrapper/glwInitES30Direct.inl
framework/opengl/wrapper/glwInitES31.inl
framework/opengl/wrapper/glwInitES31Direct.inl
framework/opengl/wrapper/glwInitExtES.inl
framework/opengl/wrapper/glwInitExtGL.inl
framework/opengl/wrapper/glwInitGL30.inl
framework/opengl/wrapper/glwInitGL31.inl
framework/opengl/wrapper/glwInitGL32.inl
framework/opengl/wrapper/glwInitGL33.inl
framework/opengl/wrapper/glwInitGL40.inl
framework/opengl/wrapper/glwInitGL41.inl
framework/opengl/wrapper/glwInitGL42.inl
framework/opengl/wrapper/glwInitGL43.inl
framework/opengl/wrapper/glwInitGL44.inl
framework/opengl/wrapper/glwInitGL45.inl
framework/platform/null/tcuNullRenderContextFuncs.inl
framework/platform/null/tcuNullRenderContextInitFuncs.inl
modules/egl/teglApiCase.cpp
modules/egl/teglNegativeApiTests.cpp
modules/gles3/functional/es3fFragmentOutputTests.cpp
modules/gles3/performance/es3pBufferDataUploadTests.cpp
modules/gles31/functional/es31fCopyImageTests.cpp
modules/gles31/functional/es31fDrawBuffersIndexedTests.cpp
modules/gles31/functional/es31fProgramInterfaceQueryTests.cpp
modules/gles31/functional/es31fShaderCommonFunctionTests.cpp
modules/gles31/functional/es31fShaderSharedVarTests.cpp
modules/glshared/glsBufferTestUtil.cpp
modules/glshared/glsBuiltinPrecisionTests.cpp
modules/glshared/glsDrawTest.cpp
modules/glshared/glsFboCompletenessTests.cpp
modules/glshared/glsShaderLibrary.cpp
modules/glshared/glsShaderLibraryCase.cpp
modules/glshared/glsShaderLibraryCase.hpp
modules/glshared/glsVertexArrayTests.cpp
modules/internal/ditFrameworkTests.cpp
scripts/opengl/gen_enums.py
scripts/opengl/gen_str_util.py
scripts/opengl/src_util.py

index e1235d4..2868a95 100644 (file)
@@ -79,6 +79,7 @@ LOCAL_SRC_FILES := \
        framework/delibs/debase/deRandom.c \
        framework/delibs/debase/deString.c \
        framework/delibs/decpp/deArrayBuffer.cpp \
+       framework/delibs/decpp/deArrayUtil.cpp \
        framework/delibs/decpp/deBlockBuffer.cpp \
        framework/delibs/decpp/deCommandLine.cpp \
        framework/delibs/decpp/deDefs.cpp \
@@ -86,6 +87,7 @@ LOCAL_SRC_FILES := \
        framework/delibs/decpp/deDynamicLibrary.cpp \
        framework/delibs/decpp/deFilePath.cpp \
        framework/delibs/decpp/deMemPool.cpp \
+       framework/delibs/decpp/deMeta.cpp \
        framework/delibs/decpp/deMutex.cpp \
        framework/delibs/decpp/dePoolArray.cpp \
        framework/delibs/decpp/dePoolString.cpp \
diff --git a/MODULE_LICENSE_APACHE2 b/MODULE_LICENSE_APACHE2
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/NOTICE b/NOTICE
new file mode 100644 (file)
index 0000000..0a93ef7
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright 2014 The Android Open Source Project
+
+   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.
index a622fe5..ce88674 100644 (file)
 <TestCase name="random">
 <Test name="1" />
 <Test name="2" />
-<Test name="3" />
 <Test name="4" />
 <Test name="5" />
 <Test name="6" />
 <Test name="25" />
 <Test name="26" />
 <Test name="27" />
-<Test name="28" />
 <Test name="30" />
 <Test name="31" />
 <Test name="32" />
 <Test name="45" />
 <Test name="46" />
 <Test name="47" />
-<Test name="48" />
 <Test name="49" />
 <Test name="51" />
 <Test name="52" />
 <Test name="68" />
 <Test name="69" />
 <Test name="70" />
-<Test name="71" />
 <Test name="72" />
-<Test name="73" />
 <Test name="74" />
 <Test name="76" />
 <Test name="77" />
index f4ba082..b19ae39 100644 (file)
@@ -33281,7 +33281,6 @@ dEQP-GLES3.functional.fragment_out.array.uint.r8ui_highp_uvec3
 dEQP-GLES3.functional.fragment_out.array.uint.r8ui_highp_uvec4
 dEQP-GLES3.functional.fragment_out.random.1
 dEQP-GLES3.functional.fragment_out.random.2
-dEQP-GLES3.functional.fragment_out.random.3
 dEQP-GLES3.functional.fragment_out.random.4
 dEQP-GLES3.functional.fragment_out.random.5
 dEQP-GLES3.functional.fragment_out.random.6
@@ -33306,7 +33305,6 @@ dEQP-GLES3.functional.fragment_out.random.24
 dEQP-GLES3.functional.fragment_out.random.25
 dEQP-GLES3.functional.fragment_out.random.26
 dEQP-GLES3.functional.fragment_out.random.27
-dEQP-GLES3.functional.fragment_out.random.28
 dEQP-GLES3.functional.fragment_out.random.30
 dEQP-GLES3.functional.fragment_out.random.31
 dEQP-GLES3.functional.fragment_out.random.32
@@ -33325,7 +33323,6 @@ dEQP-GLES3.functional.fragment_out.random.44
 dEQP-GLES3.functional.fragment_out.random.45
 dEQP-GLES3.functional.fragment_out.random.46
 dEQP-GLES3.functional.fragment_out.random.47
-dEQP-GLES3.functional.fragment_out.random.48
 dEQP-GLES3.functional.fragment_out.random.49
 dEQP-GLES3.functional.fragment_out.random.51
 dEQP-GLES3.functional.fragment_out.random.52
@@ -33346,9 +33343,7 @@ dEQP-GLES3.functional.fragment_out.random.67
 dEQP-GLES3.functional.fragment_out.random.68
 dEQP-GLES3.functional.fragment_out.random.69
 dEQP-GLES3.functional.fragment_out.random.70
-dEQP-GLES3.functional.fragment_out.random.71
 dEQP-GLES3.functional.fragment_out.random.72
-dEQP-GLES3.functional.fragment_out.random.73
 dEQP-GLES3.functional.fragment_out.random.74
 dEQP-GLES3.functional.fragment_out.random.76
 dEQP-GLES3.functional.fragment_out.random.77
index c707c4b..9e05804 100644 (file)
@@ -33203,7 +33203,6 @@ dEQP-GLES3.functional.fragment_out.array.uint.r8ui_highp_uvec3
 dEQP-GLES3.functional.fragment_out.array.uint.r8ui_highp_uvec4
 dEQP-GLES3.functional.fragment_out.random.1
 dEQP-GLES3.functional.fragment_out.random.2
-dEQP-GLES3.functional.fragment_out.random.3
 dEQP-GLES3.functional.fragment_out.random.4
 dEQP-GLES3.functional.fragment_out.random.5
 dEQP-GLES3.functional.fragment_out.random.6
@@ -33228,7 +33227,6 @@ dEQP-GLES3.functional.fragment_out.random.24
 dEQP-GLES3.functional.fragment_out.random.25
 dEQP-GLES3.functional.fragment_out.random.26
 dEQP-GLES3.functional.fragment_out.random.27
-dEQP-GLES3.functional.fragment_out.random.28
 dEQP-GLES3.functional.fragment_out.random.30
 dEQP-GLES3.functional.fragment_out.random.31
 dEQP-GLES3.functional.fragment_out.random.32
@@ -33247,7 +33245,6 @@ dEQP-GLES3.functional.fragment_out.random.44
 dEQP-GLES3.functional.fragment_out.random.45
 dEQP-GLES3.functional.fragment_out.random.46
 dEQP-GLES3.functional.fragment_out.random.47
-dEQP-GLES3.functional.fragment_out.random.48
 dEQP-GLES3.functional.fragment_out.random.49
 dEQP-GLES3.functional.fragment_out.random.51
 dEQP-GLES3.functional.fragment_out.random.52
@@ -33268,9 +33265,7 @@ dEQP-GLES3.functional.fragment_out.random.67
 dEQP-GLES3.functional.fragment_out.random.68
 dEQP-GLES3.functional.fragment_out.random.69
 dEQP-GLES3.functional.fragment_out.random.70
-dEQP-GLES3.functional.fragment_out.random.71
 dEQP-GLES3.functional.fragment_out.random.72
-dEQP-GLES3.functional.fragment_out.random.73
 dEQP-GLES3.functional.fragment_out.random.74
 dEQP-GLES3.functional.fragment_out.random.76
 dEQP-GLES3.functional.fragment_out.random.77
index 981ba81..b16e4be 100644 (file)
 package com.drawelements.deqp.execserver;
 
 import android.app.Activity;
-import android.content.Context;
 import android.content.Intent;
-import android.content.pm.ActivityInfo;
 import android.widget.TextView;
 import android.os.Bundle;
 
 import com.drawelements.deqp.testercore.Log;
-import com.drawelements.deqp.execserver.ExecService;
 import com.drawelements.deqp.R;
 
 public class ExecServerActivity extends Activity {
index 6976fa8..d091bad 100644 (file)
@@ -27,11 +27,8 @@ import android.app.Service;
 import android.app.Notification;
 import android.app.PendingIntent;
 import android.content.Intent;
-import android.content.Context;
-import android.content.ComponentName;
 import android.os.Binder;
 import android.os.IBinder;
-import android.os.Build;
 
 import com.drawelements.deqp.execserver.ExecServerActivity;
 import com.drawelements.deqp.R;
index 817f435..8bcefd8 100644 (file)
@@ -27,7 +27,6 @@ import android.app.Activity;
 import android.os.Bundle;
 import com.drawelements.deqp.testercore.Log;
 import android.content.Intent;
-import com.drawelements.deqp.execserver.ExecService;
 
 public class ServiceStarter extends Activity
 {
index c12d7f6..466c6fd 100644 (file)
 
 package com.drawelements.deqp.testercore;
 
-import android.app.ActivityManager;
 import android.app.Instrumentation;
-import android.app.Activity;
-import android.app.NativeActivity;
-
-import android.content.Context;
-import android.content.Intent;
-import android.content.ComponentName;
-
 import android.os.Bundle;
 
-import java.util.List;
 import java.lang.Thread;
 import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
 
 public class DeqpInstrumentation extends Instrumentation
 {
index b130153..dbed170 100644 (file)
 
 package com.drawelements.deqp.testercore;
 
-import javax.microedition.khronos.egl.*;
-
 public class Log {
 
-       private static final boolean    LOG_VERBOSE             = android.util.Log.isLoggable("dEQP", android.util.Log.VERBOSE);
        private static final boolean    LOG_DEBUG               = android.util.Log.isLoggable("dEQP", android.util.Log.DEBUG);
        private static final boolean    LOG_INFO                = true;
        private static final boolean    LOG_WARNING             = true;
index 10b85cc..3c7fd7a 100644 (file)
@@ -27,11 +27,7 @@ import android.app.ActivityManager;
 import android.content.Context;
 import android.content.ComponentName;
 import android.content.Intent;
-import android.content.pm.PackageManager;
 import android.os.Process;
-import android.os.Build;
-import android.text.TextUtils;
-import java.lang.System;
 
 import java.util.List;
 
index 05ee665..842ad00 100644 (file)
@@ -23,8 +23,6 @@
 
 package com.drawelements.deqp.testercore;
 
-import android.os.Build;
-
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.IOException;
index 93f33f5..cfee003 100644 (file)
@@ -94,7 +94,7 @@ def buildNative (buildRoot, libTargetDir, nativeLib, buildType):
        else:
                assert not os.path.exists(os.path.join(libsDir, "gdbserver"))
 
-def buildApp (buildRoot, isRelease, javaApi):
+def buildApp (buildRoot, androidBuildType, javaApi):
        appDir  = os.path.join(buildRoot, "package")
 
        # Set up app
@@ -118,7 +118,7 @@ def buildApp (buildRoot, isRelease, javaApi):
        # Build
        common.execArgs([
                        common.ANT_BIN,
-                       "release" if isRelease else "debug",
+                       androidBuildType,
                        "-Dsource.dir=" + os.path.join(common.ANDROID_DIR, "package", "src"),
                        "-Dresource.absolute.dir=" + os.path.join(common.ANDROID_DIR, "package", "res")
                ])
@@ -144,7 +144,7 @@ def signApp (keystore, keyname, storepass, keypass):
                        'bin/dEQP-release.apk'
                ])
 
-def build (buildRoot=common.ANDROID_DIR, isRelease=False, nativeBuildType="Release", javaApi=common.ANDROID_JAVA_API, doParallelBuild=False):
+def build (buildRoot=common.ANDROID_DIR, androidBuildType='debug', nativeBuildType="Release", javaApi=common.ANDROID_JAVA_API, doParallelBuild=False):
        curDir = os.getcwd()
 
        try:
@@ -176,7 +176,7 @@ def build (buildRoot=common.ANDROID_DIR, isRelease=False, nativeBuildType="Relea
                        shutil.copytree(assetsSrcDir, assetsDstDir)
 
                # Build java code and .apk
-               buildApp(buildRoot, isRelease, javaApi)
+               buildApp(buildRoot, androidBuildType, javaApi)
 
        finally:
                # Restore working dir
@@ -189,9 +189,12 @@ def dumpConfig ():
        print " "
 
 if __name__ == "__main__":
+       nativeBuildTypes = ['Release', 'Debug', 'MinSizeRel', 'RelWithAsserts', 'RelWithDebInfo']
+       androidBuildTypes = ['debug', 'release']
+
        parser = argparse.ArgumentParser()
-       parser.add_argument('--is-release', dest='isRelease', type=bool, default=False, help="Build android project in release mode.")
-       parser.add_argument('--native-build-type', dest='nativeBuildType', default="Release", help="Build type passed cmake when building native code.")
+       parser.add_argument('--android-build-type', dest='androidBuildType', choices=androidBuildTypes, default='debug', help="Build type for android project..")
+       parser.add_argument('--native-build-type', dest='nativeBuildType', default="RelWithAsserts", choices=nativeBuildTypes, help="Build type passed to cmake when building native code.")
        parser.add_argument('--build-root', dest='buildRoot', default=common.ANDROID_DIR, help="Root directory for storing build results.")
        parser.add_argument('--dump-config', dest='dumpConfig', action='store_true', help="Print out all configurations variables")
        parser.add_argument('--java-api', dest='javaApi', default=common.ANDROID_JAVA_API, help="Set the API signature for the java build.")
@@ -202,4 +205,4 @@ if __name__ == "__main__":
        if args.dumpConfig:
                dumpConfig()
 
-       build(buildRoot=os.path.abspath(args.buildRoot), isRelease=args.isRelease, nativeBuildType=args.nativeBuildType, javaApi=args.javaApi, doParallelBuild=args.parallelBuild)
+       build(buildRoot=os.path.abspath(args.buildRoot), androidBuildType=args.androidBuildType, nativeBuildType=args.nativeBuildType, javaApi=args.javaApi, doParallelBuild=args.parallelBuild)
index cc66dce..241cecf 100644 (file)
@@ -110,10 +110,20 @@ def execArgs (args):
        if retcode != 0:
                raise Exception("Failed to execute '%s', got %d" % (str(args), retcode))
 
-def execArgsInDirectory (args, cwd):
-       # Make sure previous stdout prints have been written out.
-       sys.stdout.flush()
-       process = subprocess.Popen(args, cwd=cwd)
+def execArgsInDirectory (args, cwd, linePrefix=""):
+
+       def readApplyPrefixAndPrint (source, prefix, sink):
+               while True:
+                       line = source.readline()
+                       if len(line) == 0: # EOF
+                               break;
+                       sink.write(prefix + line)
+
+       process = subprocess.Popen(args, cwd=cwd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+       stdoutJob = threading.Thread(target=readApplyPrefixAndPrint, args=(process.stdout, linePrefix, sys.stdout))
+       stderrJob = threading.Thread(target=readApplyPrefixAndPrint, args=(process.stdout, linePrefix, sys.stderr))
+       stdoutJob.start()
+       stderrJob.start()
        retcode = process.wait()
        if retcode != 0:
                raise Exception("Failed to execute '%s', got %d" % (str(args), retcode))
index 89e60f5..1bf63fd 100644 (file)
@@ -32,7 +32,7 @@ def install (extraArgs = [], printPrefix=""):
        common.execArgsInDirectory([common.ADB_BIN] + extraArgs + [
                        'uninstall',
                        'com.drawelements.deqp'
-               ], common.ANDROID_DIR)
+               ], common.ANDROID_DIR, printPrefix)
        print printPrefix + "Remove complete\n",
 
        print printPrefix + "Installing dEQP Package...\n",
@@ -40,11 +40,15 @@ def install (extraArgs = [], printPrefix=""):
                        'install',
                        '-r',
                        'package/bin/dEQP-debug.apk'
-               ], common.ANDROID_DIR)
+               ], common.ANDROID_DIR, printPrefix)
        print printPrefix + "Install complete\n",
 
 def installToDevice (device, printPrefix=""):
-       print printPrefix + "Installing to %s (%s)...\n" % (device.serial, device.model),
+       if len(printPrefix) == 0:
+               print "Installing to %s (%s)...\n" % (device.serial, device.model),
+       else:
+               print printPrefix + "Installing to %s\n" % device.serial,
+
        install(['-s', device.serial], printPrefix)
 
 def installToAllDevices (doParallel):
index 3f03112..6469b98 100644 (file)
@@ -2355,6 +2355,8 @@ group control_flow "Control Flow In Functions"
        end
 
        case return_after_loop_sequence
+               require full_glsl_es_100_support
+
                values
                {
                        input float in0         = [ -0.5 | 1.5 ];
index 5408704..23e274b 100644 (file)
@@ -106,6 +106,7 @@ group valid "Valid scoping and name redeclaration cases"
 
        case while_condition_variable_hides_local_variable
                version 100 es
+               require full_glsl_es_100_support
                values
                {
                        input int in0 = [ 1 | 2 | 3 ];
@@ -160,6 +161,7 @@ group valid "Valid scoping and name redeclaration cases"
 
        case while_condition_variable_hides_global_variable
                version 100 es
+               require full_glsl_es_100_support
                values
                {
                        input int in0 = [ 1 | 2 | 3 ];
index ed11674..4ec9291 100644 (file)
@@ -31,6 +31,7 @@
 #include "tcuFloat.hpp"
 #include "tcuTextureUtil.hpp"
 #include "deStringUtil.hpp"
+#include "deArrayUtil.hpp"
 
 #include <limits>
 
@@ -84,6 +85,32 @@ inline void writeRGB888Float (deUint8* ptr, const Vec4& val)
        ptr[2] = floatToU8(val[2]);
 }
 
+inline void writeUint24 (deUint8* dst, deUint32 val)
+{
+#if (DE_ENDIANNESS == DE_LITTLE_ENDIAN)
+       dst[0] = (deUint8)((val & 0x0000FFu) >>  0u);
+       dst[1] = (deUint8)((val & 0x00FF00u) >>  8u);
+       dst[2] = (deUint8)((val & 0xFF0000u) >> 16u);
+#else
+       dst[0] = (deUint8)((val & 0xFF0000u) >> 16u);
+       dst[1] = (deUint8)((val & 0x00FF00u) >>  8u);
+       dst[2] = (deUint8)((val & 0x0000FFu) >>  0u);
+#endif
+}
+
+inline deUint32 readUint24 (const deUint8* src)
+{
+#if (DE_ENDIANNESS == DE_LITTLE_ENDIAN)
+       return  (((deUint32)src[0]) <<  0u) |
+                       (((deUint32)src[1]) <<  8u) |
+                       (((deUint32)src[2]) << 16u);
+#else
+       return  (((deUint32)src[0]) << 16u) |
+                       (((deUint32)src[1]) <<  8u) |
+                       (((deUint32)src[2]) <<  0u);
+#endif
+}
+
 // \todo [2011-09-21 pyry] Move to tcutil?
 template <typename T>
 inline T convertSatRte (float f)
@@ -113,8 +140,18 @@ inline T convertSatRte (float f)
        return (T)intVal;
 }
 
+inline deUint32 convertSatRteUint24 (float f)
+{
+       const deUint32 rounded          = convertSatRte<deUint32>(f);
+       const deUint32 maxUint24        = 0xFFFFFFu;
+       return de::min(rounded, maxUint24);
+}
+
 int getChannelSize (TextureFormat::ChannelType type)
 {
+       // make sure this table is updated if format table is updated
+       DE_STATIC_ASSERT(TextureFormat::CHANNELTYPE_LAST == 26);
+
        switch (type)
        {
                case TextureFormat::SNORM_INT8:                 return 1;
@@ -122,6 +159,7 @@ int getChannelSize (TextureFormat::ChannelType type)
                case TextureFormat::SNORM_INT32:                return 4;
                case TextureFormat::UNORM_INT8:                 return 1;
                case TextureFormat::UNORM_INT16:                return 2;
+               case TextureFormat::UNORM_INT24:                return 3;
                case TextureFormat::UNORM_INT32:                return 4;
                case TextureFormat::SIGNED_INT8:                return 1;
                case TextureFormat::SIGNED_INT16:               return 2;
@@ -139,6 +177,9 @@ int getChannelSize (TextureFormat::ChannelType type)
 
 int getNumUsedChannels (TextureFormat::ChannelOrder order)
 {
+       // make sure this table is updated if type table is updated
+       DE_STATIC_ASSERT(TextureFormat::CHANNELORDER_LAST == 18);
+
        switch (order)
        {
                case TextureFormat::R:                  return 1;
@@ -152,6 +193,8 @@ int getNumUsedChannels (TextureFormat::ChannelOrder order)
                case TextureFormat::RGBA:               return 4;
                case TextureFormat::ARGB:               return 4;
                case TextureFormat::BGRA:               return 4;
+               case TextureFormat::sR:                 return 1;
+               case TextureFormat::sRG:                return 2;
                case TextureFormat::sRGB:               return 3;
                case TextureFormat::sRGBA:              return 4;
                case TextureFormat::D:                  return 1;
@@ -165,6 +208,9 @@ int getNumUsedChannels (TextureFormat::ChannelOrder order)
 
 inline float channelToFloat (const deUint8* value, TextureFormat::ChannelType type)
 {
+       // make sure this table is updated if format table is updated
+       DE_STATIC_ASSERT(TextureFormat::CHANNELTYPE_LAST == 26);
+
        switch (type)
        {
                case TextureFormat::SNORM_INT8:                 return de::max(-1.0f, (float)*((const deInt8*)value) / 127.0f);
@@ -172,6 +218,7 @@ inline float channelToFloat (const deUint8* value, TextureFormat::ChannelType ty
                case TextureFormat::SNORM_INT32:                return de::max(-1.0f, (float)*((const deInt32*)value) / 2147483647.0f);
                case TextureFormat::UNORM_INT8:                 return (float)*((const deUint8*)value) / 255.0f;
                case TextureFormat::UNORM_INT16:                return (float)*((const deUint16*)value) / 65535.0f;
+               case TextureFormat::UNORM_INT24:                return (float)readUint24(value) / 16777215.0f;
                case TextureFormat::UNORM_INT32:                return (float)*((const deUint32*)value) / 4294967295.0f;
                case TextureFormat::SIGNED_INT8:                return (float)*((const deInt8*)value);
                case TextureFormat::SIGNED_INT16:               return (float)*((const deInt16*)value);
@@ -189,6 +236,9 @@ inline float channelToFloat (const deUint8* value, TextureFormat::ChannelType ty
 
 inline int channelToInt (const deUint8* value, TextureFormat::ChannelType type)
 {
+       // make sure this table is updated if format table is updated
+       DE_STATIC_ASSERT(TextureFormat::CHANNELTYPE_LAST == 26);
+
        switch (type)
        {
                case TextureFormat::SNORM_INT8:                 return (int)*((const deInt8*)value);
@@ -196,6 +246,7 @@ inline int channelToInt (const deUint8* value, TextureFormat::ChannelType type)
                case TextureFormat::SNORM_INT32:                return (int)*((const deInt32*)value);
                case TextureFormat::UNORM_INT8:                 return (int)*((const deUint8*)value);
                case TextureFormat::UNORM_INT16:                return (int)*((const deUint16*)value);
+               case TextureFormat::UNORM_INT24:                return (int)readUint24(value);
                case TextureFormat::UNORM_INT32:                return (int)*((const deUint32*)value);
                case TextureFormat::SIGNED_INT8:                return (int)*((const deInt8*)value);
                case TextureFormat::SIGNED_INT16:               return (int)*((const deInt16*)value);
@@ -213,6 +264,9 @@ inline int channelToInt (const deUint8* value, TextureFormat::ChannelType type)
 
 void floatToChannel (deUint8* dst, float src, TextureFormat::ChannelType type)
 {
+       // make sure this table is updated if format table is updated
+       DE_STATIC_ASSERT(TextureFormat::CHANNELTYPE_LAST == 26);
+
        switch (type)
        {
                case TextureFormat::SNORM_INT8:                 *((deInt8*)dst)                 = convertSatRte<deInt8>         (src * 127.0f);                 break;
@@ -220,6 +274,7 @@ void floatToChannel (deUint8* dst, float src, TextureFormat::ChannelType type)
                case TextureFormat::SNORM_INT32:                *((deInt32*)dst)                = convertSatRte<deInt32>        (src * 2147483647.0f);  break;
                case TextureFormat::UNORM_INT8:                 *((deUint8*)dst)                = convertSatRte<deUint8>        (src * 255.0f);                 break;
                case TextureFormat::UNORM_INT16:                *((deUint16*)dst)               = convertSatRte<deUint16>       (src * 65535.0f);               break;
+               case TextureFormat::UNORM_INT24:                writeUint24(dst, convertSatRteUint24(src * 16777215.0f));                                               break;
                case TextureFormat::UNORM_INT32:                *((deUint32*)dst)               = convertSatRte<deUint32>       (src * 4294967295.0f);  break;
                case TextureFormat::SIGNED_INT8:                *((deInt8*)dst)                 = convertSatRte<deInt8>         (src);                                  break;
                case TextureFormat::SIGNED_INT16:               *((deInt16*)dst)                = convertSatRte<deInt16>        (src);                                  break;
@@ -248,14 +303,32 @@ static inline T convertSat (S src)
                return (T)src;
 }
 
+template <typename S>
+static inline deUint32 convertSatUint24 (S src)
+{
+       S min = (S)0u;
+       S max = (S)0xFFFFFFu;
+
+       if (src < min)
+               return (deUint32)min;
+       else if (src > max)
+               return (deUint32)max;
+       else
+               return (deUint32)src;
+}
+
 void intToChannel (deUint8* dst, int src, TextureFormat::ChannelType type)
 {
+       // make sure this table is updated if format table is updated
+       DE_STATIC_ASSERT(TextureFormat::CHANNELTYPE_LAST == 26);
+
        switch (type)
        {
                case TextureFormat::SNORM_INT8:                 *((deInt8*)dst)                 = convertSat<deInt8>    (src);                          break;
                case TextureFormat::SNORM_INT16:                *((deInt16*)dst)                = convertSat<deInt16>   (src);                          break;
                case TextureFormat::UNORM_INT8:                 *((deUint8*)dst)                = convertSat<deUint8>   (src);                          break;
                case TextureFormat::UNORM_INT16:                *((deUint16*)dst)               = convertSat<deUint16>  (src);                          break;
+               case TextureFormat::UNORM_INT24:                writeUint24(dst, convertSatUint24(src));                                                        break;
                case TextureFormat::SIGNED_INT8:                *((deInt8*)dst)                 = convertSat<deInt8>    (src);                          break;
                case TextureFormat::SIGNED_INT16:               *((deInt16*)dst)                = convertSat<deInt16>   (src);                          break;
                case TextureFormat::SIGNED_INT32:               *((deInt32*)dst)                = convertSat<deInt32>   (src);                          break;
@@ -311,7 +384,7 @@ tcu::Vec4 unpackRGB999E5 (deUint32 color)
 const TextureSwizzle& getChannelReadSwizzle (TextureFormat::ChannelOrder order)
 {
        // make sure to update these tables when channel orders are updated
-       DE_STATIC_ASSERT(TextureFormat::CHANNELORDER_LAST == 16);
+       DE_STATIC_ASSERT(TextureFormat::CHANNELORDER_LAST == 18);
 
        static const TextureSwizzle INV         = {{ TextureSwizzle::CHANNEL_ZERO,      TextureSwizzle::CHANNEL_ZERO,   TextureSwizzle::CHANNEL_ZERO,   TextureSwizzle::CHANNEL_ONE     }};
        static const TextureSwizzle R           = {{ TextureSwizzle::CHANNEL_0,         TextureSwizzle::CHANNEL_ZERO,   TextureSwizzle::CHANNEL_ZERO,   TextureSwizzle::CHANNEL_ONE     }};
@@ -342,6 +415,8 @@ const TextureSwizzle& getChannelReadSwizzle (TextureFormat::ChannelOrder order)
                case TextureFormat::RGBA:               return RGBA;
                case TextureFormat::ARGB:               return ARGB;
                case TextureFormat::BGRA:               return BGRA;
+               case TextureFormat::sR:                 return R;
+               case TextureFormat::sRG:                return RG;
                case TextureFormat::sRGB:               return RGB;
                case TextureFormat::sRGBA:              return RGBA;
                case TextureFormat::D:                  return D;
@@ -356,7 +431,7 @@ const TextureSwizzle& getChannelReadSwizzle (TextureFormat::ChannelOrder order)
 const TextureSwizzle& getChannelWriteSwizzle (TextureFormat::ChannelOrder order)
 {
        // make sure to update these tables when channel orders are updated
-       DE_STATIC_ASSERT(TextureFormat::CHANNELORDER_LAST == 16);
+       DE_STATIC_ASSERT(TextureFormat::CHANNELORDER_LAST == 18);
 
        static const TextureSwizzle INV         = {{ TextureSwizzle::CHANNEL_LAST,      TextureSwizzle::CHANNEL_LAST,   TextureSwizzle::CHANNEL_LAST,   TextureSwizzle::CHANNEL_LAST    }};
        static const TextureSwizzle R           = {{ TextureSwizzle::CHANNEL_0,         TextureSwizzle::CHANNEL_LAST,   TextureSwizzle::CHANNEL_LAST,   TextureSwizzle::CHANNEL_LAST    }};
@@ -387,6 +462,8 @@ const TextureSwizzle& getChannelWriteSwizzle (TextureFormat::ChannelOrder order)
                case TextureFormat::RGBA:               return RGBA;
                case TextureFormat::ARGB:               return ARGB;
                case TextureFormat::BGRA:               return BGRA;
+               case TextureFormat::sR:                 return R;
+               case TextureFormat::sRG:                return RG;
                case TextureFormat::sRGB:               return RGB;
                case TextureFormat::sRGBA:              return RGBA;
                case TextureFormat::D:                  return D;
@@ -447,52 +524,7 @@ int TextureFormat::getPixelSize (void) const
                return 8;
        }
        else
-       {
-               int numChannels = 0;
-               int channelSize = 0;
-
-               switch (order)
-               {
-                       case R:                 numChannels = 1;        break;
-                       case A:                 numChannels = 1;        break;
-                       case I:                 numChannels = 1;        break;
-                       case L:                 numChannels = 1;        break;
-                       case LA:                numChannels = 2;        break;
-                       case RG:                numChannels = 2;        break;
-                       case RA:                numChannels = 2;        break;
-                       case RGB:               numChannels = 3;        break;
-                       case RGBA:              numChannels = 4;        break;
-                       case ARGB:              numChannels = 4;        break;
-                       case BGRA:              numChannels = 4;        break;
-                       case sRGB:              numChannels = 3;        break;
-                       case sRGBA:             numChannels = 4;        break;
-                       case D:                 numChannels = 1;        break;
-                       case S:                 numChannels = 1;        break;
-                       case DS:                numChannels = 2;        break;
-                       default:                DE_ASSERT(DE_FALSE);
-               }
-
-               switch (type)
-               {
-                       case SNORM_INT8:                channelSize = 1;        break;
-                       case SNORM_INT16:               channelSize = 2;        break;
-                       case SNORM_INT32:               channelSize = 4;        break;
-                       case UNORM_INT8:                channelSize = 1;        break;
-                       case UNORM_INT16:               channelSize = 2;        break;
-                       case UNORM_INT32:               channelSize = 4;        break;
-                       case SIGNED_INT8:               channelSize = 1;        break;
-                       case SIGNED_INT16:              channelSize = 2;        break;
-                       case SIGNED_INT32:              channelSize = 4;        break;
-                       case UNSIGNED_INT8:             channelSize = 1;        break;
-                       case UNSIGNED_INT16:    channelSize = 2;        break;
-                       case UNSIGNED_INT32:    channelSize = 4;        break;
-                       case HALF_FLOAT:                channelSize = 2;        break;
-                       case FLOAT:                             channelSize = 4;        break;
-                       default:                                DE_ASSERT(DE_FALSE);
-               }
-
-               return numChannels*channelSize;
-       }
+               return getNumUsedChannels(order) * getChannelSize(type);
 }
 
 ConstPixelBufferAccess::ConstPixelBufferAccess (void)
@@ -677,8 +709,8 @@ IVec4 ConstPixelBufferAccess::getPixelInt (int x, int y, int z) const
        DE_ASSERT(de::inBounds(y, 0, m_size.y()));
        DE_ASSERT(de::inBounds(z, 0, m_size.z()));
 
-       const deUint8*  pixelPtr = (const deUint8*)getDataPtr() + z*m_pitch.z() + y*m_pitch.y() + x*m_pitch.x();
-       IVec4                   result;
+       const deUint8* const    pixelPtr = (const deUint8*)getDataPtr() + z*m_pitch.z() + y*m_pitch.y() + x*m_pitch.x();
+       IVec4                                   result;
 
        // Optimized fomats.
        if (m_format.type == TextureFormat::UNORM_INT8)
@@ -781,7 +813,7 @@ float ConstPixelBufferAccess::getPixDepth (int x, int y, int z) const
        DE_ASSERT(de::inBounds(y, 0, getHeight()));
        DE_ASSERT(de::inBounds(z, 0, getDepth()));
 
-       deUint8* pixelPtr = (deUint8*)getDataPtr() + z*m_pitch.z() + y*m_pitch.y() + x*m_pitch.x();
+       const deUint8* const pixelPtr = (const deUint8*)getDataPtr() + z*m_pitch.z() + y*m_pitch.y() + x*m_pitch.x();
 
 #define UB32(OFFS, COUNT) ((*((const deUint32*)pixelPtr) >> (OFFS)) & ((1<<(COUNT))-1))
 #define NB32(OFFS, COUNT) channelToNormFloat(UB32(OFFS, COUNT), (COUNT))
@@ -820,7 +852,7 @@ int ConstPixelBufferAccess::getPixStencil (int x, int y, int z) const
        DE_ASSERT(de::inBounds(y, 0, getHeight()));
        DE_ASSERT(de::inBounds(z, 0, getDepth()));
 
-       deUint8* pixelPtr = (deUint8*)getDataPtr() + z*m_pitch.z() + y*m_pitch.y() + x*m_pitch.x();
+       const deUint8* const pixelPtr = (const deUint8*)getDataPtr() + z*m_pitch.z() + y*m_pitch.y() + x*m_pitch.x();
 
        switch (m_format.type)
        {
@@ -954,7 +986,7 @@ void PixelBufferAccess::setPixel (const IVec4& color, int x, int y, int z) const
        DE_ASSERT(de::inBounds(y, 0, getHeight()));
        DE_ASSERT(de::inBounds(z, 0, getDepth()));
 
-       deUint8* pixelPtr = (deUint8*)getDataPtr() + z*m_pitch.z() + y*m_pitch.y() + x*m_pitch.x();
+       deUint8* const pixelPtr = (deUint8*)getDataPtr() + z*m_pitch.z() + y*m_pitch.y() + x*m_pitch.x();
 
        // Optimized fomats.
        if (m_format.type == TextureFormat::UNORM_INT8)
@@ -1017,7 +1049,7 @@ void PixelBufferAccess::setPixDepth (float depth, int x, int y, int z) const
        DE_ASSERT(de::inBounds(y, 0, getHeight()));
        DE_ASSERT(de::inBounds(z, 0, getDepth()));
 
-       deUint8* pixelPtr = (deUint8*)getDataPtr() + z*m_pitch.z() + y*m_pitch.y() + x*m_pitch.x();
+       deUint8* const pixelPtr = (deUint8*)getDataPtr() + z*m_pitch.z() + y*m_pitch.y() + x*m_pitch.x();
 
 #define PN(VAL, OFFS, BITS) (normFloatToChannel((VAL), (BITS)) << (OFFS))
 
@@ -1053,7 +1085,7 @@ void PixelBufferAccess::setPixStencil (int stencil, int x, int y, int z) const
        DE_ASSERT(de::inBounds(y, 0, getHeight()));
        DE_ASSERT(de::inBounds(z, 0, getDepth()));
 
-       deUint8* pixelPtr = (deUint8*)getDataPtr() + z*m_pitch.z() + y*m_pitch.y() + x*m_pitch.x();
+       deUint8* const pixelPtr = (deUint8*)getDataPtr() + z*m_pitch.z() + y*m_pitch.y() + x*m_pitch.x();
 
 #define PU(VAL, OFFS, BITS) (uintToChannel((deUint32)(VAL), (BITS)) << (OFFS))
 
@@ -3389,6 +3421,8 @@ std::ostream& operator<< (std::ostream& str, TextureFormat::ChannelOrder order)
                "ARGB",
                "BGRA",
 
+               "sR",
+               "sRG",
                "sRGB",
                "sRGBA",
 
@@ -3409,6 +3443,7 @@ std::ostream& operator<< (std::ostream& str, TextureFormat::ChannelType type)
                "SNORM_INT32",
                "UNORM_INT8",
                "UNORM_INT16",
+               "UNORM_INT24",
                "UNORM_INT32",
                "UNORM_SHORT_565",
                "UNORM_SHORT_555",
index a0e2bb7..8b788c9 100644 (file)
@@ -53,6 +53,8 @@ public:
                ARGB,
                BGRA,
 
+               sR,
+               sRG,
                sRGB,
                sRGBA,
 
@@ -70,6 +72,7 @@ public:
                SNORM_INT32,
                UNORM_INT8,
                UNORM_INT16,
+               UNORM_INT24,
                UNORM_INT32,
                UNORM_SHORT_565,
                UNORM_SHORT_555,
index abc4deb..cf5475f 100644 (file)
@@ -72,18 +72,27 @@ Vec4 linearToSRGB (const Vec4& cl)
 
 bool isSRGB (TextureFormat format)
 {
-       return format.order == TextureFormat::sRGB || format.order == TextureFormat::sRGBA;
+       return  format.order == TextureFormat::sR       ||
+                       format.order == TextureFormat::sRG      ||
+                       format.order == TextureFormat::sRGB     ||
+                       format.order == TextureFormat::sRGBA;
 }
 
 //! Get texture channel class for format
 TextureChannelClass getTextureChannelClass (TextureFormat::ChannelType channelType)
 {
+       // make sure this table is updated if format table is updated
+       DE_STATIC_ASSERT(TextureFormat::CHANNELTYPE_LAST == 26);
+
        switch (channelType)
        {
                case TextureFormat::SNORM_INT8:                                         return TEXTURECHANNELCLASS_SIGNED_FIXED_POINT;
                case TextureFormat::SNORM_INT16:                                        return TEXTURECHANNELCLASS_SIGNED_FIXED_POINT;
+               case TextureFormat::SNORM_INT32:                                        return TEXTURECHANNELCLASS_SIGNED_FIXED_POINT;
                case TextureFormat::UNORM_INT8:                                         return TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT;
                case TextureFormat::UNORM_INT16:                                        return TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT;
+               case TextureFormat::UNORM_INT24:                                        return TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT;
+               case TextureFormat::UNORM_INT32:                                        return TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT;
                case TextureFormat::UNORM_SHORT_565:                            return TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT;
                case TextureFormat::UNORM_SHORT_555:                            return TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT;
                case TextureFormat::UNORM_SHORT_4444:                           return TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT;
@@ -93,6 +102,7 @@ TextureChannelClass getTextureChannelClass (TextureFormat::ChannelType channelTy
                case TextureFormat::UNSIGNED_INT_1010102_REV:           return TEXTURECHANNELCLASS_UNSIGNED_INTEGER;
                case TextureFormat::UNSIGNED_INT_11F_11F_10F_REV:       return TEXTURECHANNELCLASS_FLOATING_POINT;
                case TextureFormat::UNSIGNED_INT_999_E5_REV:            return TEXTURECHANNELCLASS_FLOATING_POINT;
+               case TextureFormat::UNSIGNED_INT_24_8:                          return TEXTURECHANNELCLASS_LAST;                                        //!< packed unorm24-uint8
                case TextureFormat::SIGNED_INT8:                                        return TEXTURECHANNELCLASS_SIGNED_INTEGER;
                case TextureFormat::SIGNED_INT16:                                       return TEXTURECHANNELCLASS_SIGNED_INTEGER;
                case TextureFormat::SIGNED_INT32:                                       return TEXTURECHANNELCLASS_SIGNED_INTEGER;
@@ -101,6 +111,7 @@ TextureChannelClass getTextureChannelClass (TextureFormat::ChannelType channelTy
                case TextureFormat::UNSIGNED_INT32:                                     return TEXTURECHANNELCLASS_UNSIGNED_INTEGER;
                case TextureFormat::HALF_FLOAT:                                         return TEXTURECHANNELCLASS_FLOATING_POINT;
                case TextureFormat::FLOAT:                                                      return TEXTURECHANNELCLASS_FLOATING_POINT;
+               case TextureFormat::FLOAT_UNSIGNED_INT_24_8_REV:        return TEXTURECHANNELCLASS_LAST;                                        //!< packed float32-pad24-uint8
                default:                                                                                        return TEXTURECHANNELCLASS_LAST;
        }
 }
@@ -215,6 +226,9 @@ ConstPixelBufferAccess flipYAccess (const ConstPixelBufferAccess& access)
 
 static Vec2 getChannelValueRange (TextureFormat::ChannelType channelType)
 {
+       // make sure this table is updated if format table is updated
+       DE_STATIC_ASSERT(TextureFormat::CHANNELTYPE_LAST == 26);
+
        float cMin = 0.0f;
        float cMax = 0.0f;
 
@@ -222,11 +236,14 @@ static Vec2 getChannelValueRange (TextureFormat::ChannelType channelType)
        {
                // Signed normalized formats.
                case TextureFormat::SNORM_INT8:
-               case TextureFormat::SNORM_INT16:                                        cMin = -1.0f;                   cMax = 1.0f;                    break;
+               case TextureFormat::SNORM_INT16:
+               case TextureFormat::SNORM_INT32:                                        cMin = -1.0f;                   cMax = 1.0f;                    break;
 
                // Unsigned normalized formats.
                case TextureFormat::UNORM_INT8:
                case TextureFormat::UNORM_INT16:
+               case TextureFormat::UNORM_INT24:
+               case TextureFormat::UNORM_INT32:
                case TextureFormat::UNORM_SHORT_565:
                case TextureFormat::UNORM_SHORT_4444:
                case TextureFormat::UNORM_INT_101010:
@@ -295,6 +312,9 @@ TextureFormatInfo getTextureFormatInfo (const TextureFormat& format)
 
 static IVec4 getChannelBitDepth (TextureFormat::ChannelType channelType)
 {
+       // make sure this table is updated if format table is updated
+       DE_STATIC_ASSERT(TextureFormat::CHANNELTYPE_LAST == 26);
+
        switch (channelType)
        {
                case TextureFormat::SNORM_INT8:                                         return IVec4(8);
@@ -302,6 +322,7 @@ static IVec4 getChannelBitDepth (TextureFormat::ChannelType channelType)
                case TextureFormat::SNORM_INT32:                                        return IVec4(32);
                case TextureFormat::UNORM_INT8:                                         return IVec4(8);
                case TextureFormat::UNORM_INT16:                                        return IVec4(16);
+               case TextureFormat::UNORM_INT24:                                        return IVec4(24);
                case TextureFormat::UNORM_INT32:                                        return IVec4(32);
                case TextureFormat::UNORM_SHORT_565:                            return IVec4(5,6,5,0);
                case TextureFormat::UNORM_SHORT_4444:                           return IVec4(4);
@@ -316,12 +337,12 @@ static IVec4 getChannelBitDepth (TextureFormat::ChannelType channelType)
                case TextureFormat::UNSIGNED_INT16:                                     return IVec4(16);
                case TextureFormat::UNSIGNED_INT32:                                     return IVec4(32);
                case TextureFormat::UNSIGNED_INT_1010102_REV:           return IVec4(10,10,10,2);
-               case TextureFormat::UNSIGNED_INT_24_8:                          return IVec4(24,0,0,8);
+               case TextureFormat::UNSIGNED_INT_24_8:                          return IVec4(24,8,0,0);
                case TextureFormat::HALF_FLOAT:                                         return IVec4(16);
                case TextureFormat::FLOAT:                                                      return IVec4(32);
                case TextureFormat::UNSIGNED_INT_11F_11F_10F_REV:       return IVec4(11,11,10,0);
                case TextureFormat::UNSIGNED_INT_999_E5_REV:            return IVec4(9,9,9,0);
-               case TextureFormat::FLOAT_UNSIGNED_INT_24_8_REV:        return IVec4(32,0,0,8);
+               case TextureFormat::FLOAT_UNSIGNED_INT_24_8_REV:        return IVec4(32,8,0,0);
                default:
                        DE_ASSERT(false);
                        return IVec4(0);
@@ -346,6 +367,9 @@ IVec4 getTextureFormatBitDepth (const TextureFormat& format)
 
 static IVec4 getChannelMantissaBitDepth (TextureFormat::ChannelType channelType)
 {
+       // make sure this table is updated if format table is updated
+       DE_STATIC_ASSERT(TextureFormat::CHANNELTYPE_LAST == 26);
+
        switch (channelType)
        {
                case TextureFormat::SNORM_INT8:
@@ -353,6 +377,7 @@ static IVec4 getChannelMantissaBitDepth (TextureFormat::ChannelType channelType)
                case TextureFormat::SNORM_INT32:
                case TextureFormat::UNORM_INT8:
                case TextureFormat::UNORM_INT16:
+               case TextureFormat::UNORM_INT24:
                case TextureFormat::UNORM_INT32:
                case TextureFormat::UNORM_SHORT_565:
                case TextureFormat::UNORM_SHORT_4444:
@@ -374,7 +399,7 @@ static IVec4 getChannelMantissaBitDepth (TextureFormat::ChannelType channelType)
                case TextureFormat::HALF_FLOAT:                                         return IVec4(10);
                case TextureFormat::FLOAT:                                                      return IVec4(23);
                case TextureFormat::UNSIGNED_INT_11F_11F_10F_REV:       return IVec4(6,6,5,0);
-               case TextureFormat::FLOAT_UNSIGNED_INT_24_8_REV:        return IVec4(23,0,0,8);
+               case TextureFormat::FLOAT_UNSIGNED_INT_24_8_REV:        return IVec4(23,8,0,0);
                default:
                        DE_ASSERT(false);
                        return IVec4(0);
index f34bba5..d40bd73 100644 (file)
@@ -39,6 +39,12 @@ macro (DE_MAKE_ENV_BOOL BASE VALUE)
        endif ()
 endmacro ()
 
+# Add build type RelWithAsserts
+set(CMAKE_CXX_FLAGS_RELWITHASSERTS ${CMAKE_CXX_FLAGS_RELEASE})
+set(CMAKE_C_FLAGS_RELWITHASSERTS ${CMAKE_C_FLAGS_RELEASE})
+set(CMAKE_EXE_LINKER_FLAGS_RELWITHASSERTS ${CMAKE_EXE_LINKER_FLAGS_RELEASE})
+set(CMAKE_SHARED_LINKER_FLAGS_RELWITHASSERTS ${CMAKE_SHARED_LINKER_FLAGS_RELEASE})
+
 # Os detection
 if (NOT DEFINED DE_OS)
        if (WIN32)
@@ -133,7 +139,7 @@ endif ()
 
 # Debug definitions
 if (NOT DEFINED DE_DEBUG)
-       if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+       if (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithAsserts")
                set(DE_DEBUG 1)
        else ()
                set(DE_DEBUG 0)
index efc729c..f5120ef 100644 (file)
@@ -5,6 +5,10 @@ if (NOT DE_DEFS)
 endif ()
 
 set(DECPP_SRCS
+       deArrayBuffer.cpp
+       deArrayBuffer.hpp
+       deArrayUtil.cpp
+       deArrayUtil.hpp
        deBlockBuffer.cpp
        deBlockBuffer.hpp
        deCommandLine.cpp
@@ -19,6 +23,8 @@ set(DECPP_SRCS
        deFilePath.hpp
        deMemPool.cpp
        deMemPool.hpp
+       deMeta.cpp
+       deMeta.hpp
        deMutex.cpp
        deMutex.hpp
        dePoolArray.cpp
@@ -49,8 +55,6 @@ set(DECPP_SRCS
        deThreadSafeRingBuffer.hpp
        deUniquePtr.cpp
        deUniquePtr.hpp
-       deArrayBuffer.cpp
-       deArrayBuffer.hpp
        )
 
 add_library(decpp STATIC ${DECPP_SRCS})
diff --git a/framework/delibs/decpp/deArrayUtil.cpp b/framework/delibs/decpp/deArrayUtil.cpp
new file mode 100644 (file)
index 0000000..fc5f0e7
--- /dev/null
@@ -0,0 +1,26 @@
+/*-------------------------------------------------------------------------
+ * drawElements C++ Base Library
+ * -----------------------------
+ *
+ * Copyright 2015 The Android Open Source Project
+ *
+ * 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.
+ *
+ *//*!
+ * \file
+ * \brief Array utils
+ *//*--------------------------------------------------------------------*/
+
+#include "deArrayUtil.hpp"
+
+DE_EMPTY_CPP_FILE
diff --git a/framework/delibs/decpp/deArrayUtil.hpp b/framework/delibs/decpp/deArrayUtil.hpp
new file mode 100644 (file)
index 0000000..4526c4a
--- /dev/null
@@ -0,0 +1,50 @@
+#ifndef _DEARRAYUTIL_HPP
+#define _DEARRAYUTIL_HPP
+/*-------------------------------------------------------------------------
+ * drawElements C++ Base Library
+ * -----------------------------
+ *
+ * Copyright 2015 The Android Open Source Project
+ *
+ * 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.
+ *
+ *//*!
+ * \file
+ * \brief Array utils
+ *//*--------------------------------------------------------------------*/
+
+#include "deDefs.hpp"
+#include "deMeta.hpp"
+
+namespace de
+{
+
+//! Get an element of an array with a specified size.
+template <int LastElementIndex, int Size, typename Elem>
+const Elem& getSizedArrayElement (const Elem (&array)[Size], typename de::meta::EnableIf<int, LastElementIndex==Size>::Type offset)
+{
+       DE_ASSERT(inBounds(offset, 0, Size));
+       return array[offset];
+}
+
+//! Get an element of an array with a compile-time constant size.
+template <int Size, typename Elem>
+const Elem& getArrayElement (const Elem (&array)[Size], int offset)
+{
+       DE_ASSERT(inBounds(offset, 0, Size));
+       return array[offset];
+}
+
+} // de
+
+#endif // _DEARRAYUTIL_HPP
index 6daa835..73b84fb 100644 (file)
@@ -71,34 +71,6 @@ template<typename T> struct ArrayDeleter
        inline void operator() (T* ptr) const { delete[] ptr; }
 };
 
-template <typename T, bool Cond>
-struct EnableIf
-{
-};
-
-
-template <typename T>
-struct EnableIf<T, true>
-{
-       typedef T Type;
-};
-
-//! Get an element of an array with a specified size.
-template <int LastElementIndex, int Size, typename Elem>
-const Elem& getSizedArrayElement (const Elem (&array)[Size], typename de::EnableIf<int, LastElementIndex==Size>::Type offset)
-{
-       DE_ASSERT(inBounds(offset, 0, Size));
-       return array[offset];
-}
-
-//! Get an element of an array with a compile-time constant size.
-template <int Size, typename Elem>
-const Elem& getArrayElement (const Elem (&array)[Size], int offset)
-{
-       DE_ASSERT(inBounds(offset, 0, Size));
-       return array[offset];
-}
-
 } // de
 
 /*--------------------------------------------------------------------*//*!
diff --git a/framework/delibs/decpp/deMeta.cpp b/framework/delibs/decpp/deMeta.cpp
new file mode 100644 (file)
index 0000000..aad64a3
--- /dev/null
@@ -0,0 +1,26 @@
+/*-------------------------------------------------------------------------
+ * drawElements C++ Base Library
+ * -----------------------------
+ *
+ * Copyright 2015 The Android Open Source Project
+ *
+ * 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.
+ *
+ *//*!
+ * \file
+ * \brief Metaprogramming tools
+ *//*--------------------------------------------------------------------*/
+
+#include "deMeta.hpp"
+
+DE_EMPTY_CPP_FILE
diff --git a/framework/delibs/decpp/deMeta.hpp b/framework/delibs/decpp/deMeta.hpp
new file mode 100644 (file)
index 0000000..231aac0
--- /dev/null
@@ -0,0 +1,54 @@
+#ifndef _DEMETA_HPP
+#define _DEMETA_HPP
+/*-------------------------------------------------------------------------
+ * drawElements C++ Base Library
+ * -----------------------------
+ *
+ * Copyright 2015 The Android Open Source Project
+ *
+ * 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.
+ *
+ *//*!
+ * \file
+ * \brief Metaprogramming tools
+ *//*--------------------------------------------------------------------*/
+
+#include "deDefs.hpp"
+
+namespace de
+{
+namespace meta
+{
+
+template <typename T, bool Cond>
+struct EnableIf { };
+
+template <typename T>
+struct EnableIf<T, true>
+{
+       typedef T Type;
+};
+
+template <bool Cond>
+struct Not
+{
+       enum
+       {
+               Value = !Cond
+       };
+};
+
+} // meta
+} // de
+
+#endif // _DEMETA_HPP
index 1259dc6..ae96920 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
        { "glActiveTexture",                                            (deFunctionPtr)glActiveTexture },
        { "glAttachShader",                                                     (deFunctionPtr)glAttachShader },
index 0c33ffd..cd625bb 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
        { "glActiveTexture",                                            (deFunctionPtr)glActiveTexture },
        { "glAttachShader",                                                     (deFunctionPtr)glAttachShader },
index 40e2848..f5e75ca 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 
 int getTextureParamNumArgs (int pname)
index 0367474..c056cab 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 
 void CallLogWrapper::glActiveShaderProgram (glw::GLuint pipeline, glw::GLuint program)
index 3d13744..c18ffaa 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 void                                   glActiveShaderProgram                                                   (glw::GLuint pipeline, glw::GLuint program);
 void                                   glActiveTexture                                                                 (glw::GLenum texture);
index 853071a..7952be7 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 dst->activeShaderProgram                                       = src.activeShaderProgram;
 dst->activeTexture                                                     = src.activeTexture;
index 45444d9..70fee4e 100644 (file)
@@ -26,6 +26,7 @@
 #include "gluStrUtil.hpp"
 #include "glwFunctions.hpp"
 #include "glwEnums.hpp"
+#include "deArrayUtil.hpp"
 
 #include <sstream>
 
index 13eb620..fa16aa6 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 
 int getBasicQueryNumArgsOut (int pname)
index 99dd112..ef9233c 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "gluShaderUtil.hpp"
 #include "glwEnums.hpp"
+#include "deArrayUtil.hpp"
 
 namespace glu
 {
index e7381de..cc402f9 100644 (file)
@@ -94,6 +94,17 @@ detail::EnumPointerFmt                                                               getInvalidateAttachmentStr      (const deUint32* attach
 std::ostream&                                                                          operator<<                                      (std::ostream& str, ApiType apiType);
 std::ostream&                                                                          operator<<                                      (std::ostream& str, ContextType contextType);
 
+// prevent implicit conversions from bool to int.
+//
+// While it is well-defined that (int)true == GL_TRUE and (int)false == GL_FALSE,
+// using these functions to convert non-GL-types suggests a that the calling code is
+// mixing and matching GLboolean and bool types which may not be safe.
+//
+// \note return value is void to prevent compilation. Otherwise this would only break linking.
+void   getBooleanPointerStr    (const bool* value, deInt32 size);      // delete
+void   getBooleanStr                   (bool);                                                         // delete
+void   getBooleanName                  (bool);                                                         // delete
+
 #include "gluStrUtilPrototypes.inl"
 
 } // glu
index 583b27a..45aa215 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 
 const char* getErrorName (int value)
@@ -884,6 +884,8 @@ const char* getPixelFormatName (int value)
                case GL_DEPTH_COMPONENT32:      return "GL_DEPTH_COMPONENT32";
                case GL_SRGB:                           return "GL_SRGB";
                case GL_SRGB_ALPHA:                     return "GL_SRGB_ALPHA";
+               case GL_SR8_EXT:                        return "GL_SR8_EXT";
+               case GL_SRG8_EXT:                       return "GL_SRG8_EXT";
                default:                                        return DE_NULL;
        }
 }
index 4c888b8..8bab4ca 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 const char*                                                    getErrorName                                                    (int value);
 const char*                                                    getTypeName                                                             (int value);
index de77b72..45de10c 100644 (file)
@@ -29,6 +29,7 @@
 #include "tcuResource.hpp"
 #include "gluRenderContext.hpp"
 #include "gluContextInfo.hpp"
+#include "deArrayBuffer.hpp"
 
 #include <vector>
 #include <string>
index 777f7b3..2333487 100644 (file)
@@ -76,6 +76,8 @@ TransferFormat getTransferFormat (tcu::TextureFormat texFormat)
                case TextureFormat::RG:         format = isInt ? GL_RG_INTEGER          : GL_RG;        break;
                case TextureFormat::RGB:        format = isInt ? GL_RGB_INTEGER         : GL_RGB;       break;
                case TextureFormat::RGBA:       format = isInt ? GL_RGBA_INTEGER        : GL_RGBA;      break;
+               case TextureFormat::sR:         format = GL_RED;                                                                break;
+               case TextureFormat::sRG:        format = GL_RG;                                                                 break;
                case TextureFormat::sRGB:       format = GL_RGB;                                                                break;
                case TextureFormat::sRGBA:      format = GL_RGBA;                                                               break;
                case TextureFormat::D:          format = GL_DEPTH_COMPONENT;                                    break;
@@ -190,6 +192,7 @@ deUint32 getInternalFormat (tcu::TextureFormat texFormat)
                case FMT_CASE(RG,               SIGNED_INT8):                                   return GL_RG8I;
                case FMT_CASE(RG,               UNSIGNED_INT8):                                 return GL_RG8UI;
                case FMT_CASE(RG,               SNORM_INT8):                                    return GL_RG8_SNORM;
+               case FMT_CASE(sRG,              UNORM_INT8):                                    return GL_SRG8_EXT;
 
                case FMT_CASE(R,                FLOAT):                                                 return GL_R32F;
                case FMT_CASE(R,                SIGNED_INT32):                                  return GL_R32I;
@@ -203,6 +206,7 @@ deUint32 getInternalFormat (tcu::TextureFormat texFormat)
                case FMT_CASE(R,                SIGNED_INT8):                                   return GL_R8I;
                case FMT_CASE(R,                UNSIGNED_INT8):                                 return GL_R8UI;
                case FMT_CASE(R,                SNORM_INT8):                                    return GL_R8_SNORM;
+               case FMT_CASE(sR,               UNORM_INT8):                                    return GL_SR8_EXT;
 
                case FMT_CASE(D,                FLOAT):                                                 return GL_DEPTH_COMPONENT32F;
                case FMT_CASE(D,                UNSIGNED_INT_24_8):                             return GL_DEPTH_COMPONENT24;
@@ -512,6 +516,7 @@ tcu::TextureFormat mapGLInternalFormat (deUint32 internalFormat)
                case GL_RG8I:                           return TextureFormat(TextureFormat::RG,         TextureFormat::SIGNED_INT8);
                case GL_RG8UI:                          return TextureFormat(TextureFormat::RG,         TextureFormat::UNSIGNED_INT8);
                case GL_RG8_SNORM:                      return TextureFormat(TextureFormat::RG,         TextureFormat::SNORM_INT8);
+               case GL_SRG8_EXT:                       return TextureFormat(TextureFormat::sRG,        TextureFormat::UNORM_INT8);
 
                case GL_R32F:                           return TextureFormat(TextureFormat::R,          TextureFormat::FLOAT);
                case GL_R32I:                           return TextureFormat(TextureFormat::R,          TextureFormat::SIGNED_INT32);
@@ -525,6 +530,7 @@ tcu::TextureFormat mapGLInternalFormat (deUint32 internalFormat)
                case GL_R8I:                            return TextureFormat(TextureFormat::R,          TextureFormat::SIGNED_INT8);
                case GL_R8UI:                           return TextureFormat(TextureFormat::R,          TextureFormat::UNSIGNED_INT8);
                case GL_R8_SNORM:                       return TextureFormat(TextureFormat::R,          TextureFormat::SNORM_INT8);
+               case GL_SR8_EXT:                        return TextureFormat(TextureFormat::sR,         TextureFormat::UNORM_INT8);
 
                case GL_DEPTH_COMPONENT32F:     return TextureFormat(TextureFormat::D,          TextureFormat::FLOAT);
                case GL_DEPTH_COMPONENT24:      return TextureFormat(TextureFormat::D,          TextureFormat::UNSIGNED_INT_24_8);
@@ -553,6 +559,8 @@ bool isGLInternalColorFormatFilterable (deUint32 format)
                case GL_RGBA8:
                case GL_RGBA8_SNORM:
                case GL_RGB10_A2:
+               case GL_SR8_EXT:
+               case GL_SRG8_EXT:
                case GL_SRGB8:
                case GL_SRGB8_ALPHA8:
                case GL_R16F:
index 25a27c2..9e516a9 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "gluVarType.hpp"
 #include "deStringUtil.hpp"
+#include "deArrayUtil.hpp"
 
 namespace glu
 {
index 57a10c7..c923e6f 100644 (file)
@@ -4679,7 +4679,6 @@ namespace rc
 
 TextureLevelArray::TextureLevelArray (void)
 {
-       deMemset(&m_data[0], 0, sizeof(m_data));
 }
 
 TextureLevelArray::~TextureLevelArray (void)
@@ -4693,34 +4692,30 @@ void TextureLevelArray::clear (void)
 
        for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(m_data); ndx++)
        {
-               delete[] m_data[ndx];
-
-               m_data[ndx]             = DE_NULL;
-               m_access[ndx]   = PixelBufferAccess();
+               m_data[ndx].clear();
+               m_access[ndx] = PixelBufferAccess();
        }
 }
 
 void TextureLevelArray::allocLevel (int level, const tcu::TextureFormat& format, int width, int height, int depth)
 {
-       const int       dataSize        = format.getPixelSize()*width*height*depth;
+       const int dataSize = format.getPixelSize()*width*height*depth;
 
-       DE_ASSERT(level < DE_LENGTH_OF_ARRAY(m_data));
+       DE_ASSERT(deInBounds32(level, 0, DE_LENGTH_OF_ARRAY(m_data)));
 
        if (hasLevel(level))
                clearLevel(level);
 
-       m_data[level]   = new deUint8[dataSize];
-       m_access[level] = PixelBufferAccess(format, width, height, depth, m_data[level]);
+       m_data[level].setStorage(dataSize);
+       m_access[level] = PixelBufferAccess(format, width, height, depth, m_data[level].getPtr());
 }
 
 void TextureLevelArray::clearLevel (int level)
 {
-       DE_ASSERT(level < DE_LENGTH_OF_ARRAY(m_data));
-
-       delete[] m_data[level];
+       DE_ASSERT(deInBounds32(level, 0, DE_LENGTH_OF_ARRAY(m_data)));
 
-       m_data[level]   = DE_NULL;
-       m_access[level] = PixelBufferAccess();
+       m_data[level].clear();
+       m_access[level] = PixelBufferAccess();
 }
 
 Texture::Texture (deUint32 name, Type type)
index 76de272..a0ce306 100644 (file)
 #include "tcuSurface.hpp"
 #include "tcuTexture.hpp"
 #include "tcuVector.hpp"
-#include "gluRenderContext.hpp"
 #include "rrFragmentOperations.hpp"
 #include "rrRenderState.hpp"
 #include "rrRenderer.hpp"
 #include "rrMultisamplePixelBufferAccess.hpp"
+#include "gluRenderContext.hpp"
 #include "gluShaderUtil.hpp"
+#include "deArrayBuffer.hpp"
 
 #include <map>
 #include <vector>
@@ -117,11 +118,11 @@ public:
                                                                                TextureLevelArray       (void);
                                                                                ~TextureLevelArray      (void);
 
-       bool                                                            hasLevel                        (int level) const       { return level < DE_LENGTH_OF_ARRAY(m_data) && m_data[level];   }
-       const tcu::PixelBufferAccess&           getLevel                        (int level)                     { DE_ASSERT(hasLevel(level)); return m_access[level];                   }
-       const tcu::ConstPixelBufferAccess&      getLevel                        (int level) const       { DE_ASSERT(hasLevel(level)); return m_access[level];                   }
+       bool                                                            hasLevel                        (int level) const       { return deInBounds32(level, 0, DE_LENGTH_OF_ARRAY(m_data)) && !m_data[level].empty();  }
+       const tcu::PixelBufferAccess&           getLevel                        (int level)                     { DE_ASSERT(hasLevel(level)); return m_access[level];                                                                   }
+       const tcu::ConstPixelBufferAccess&      getLevel                        (int level) const       { DE_ASSERT(hasLevel(level)); return m_access[level];                                                                   }
 
-       const tcu::ConstPixelBufferAccess*      getLevels                       (void) const            { return &m_access[0];                                                                                  }
+       const tcu::ConstPixelBufferAccess*      getLevels                       (void) const            { return &m_access[0];                                                                                                                                  }
 
        void                                                            allocLevel                      (int level, const tcu::TextureFormat& format, int width, int height, int depth);
        void                                                            clearLevel                      (int level);
@@ -129,7 +130,7 @@ public:
        void                                                            clear                           (void);
 
 private:
-       deUint8*                                                        m_data[MAX_TEXTURE_SIZE_LOG2];
+       de::ArrayBuffer<deUint8>                        m_data[MAX_TEXTURE_SIZE_LOG2];
        tcu::PixelBufferAccess                          m_access[MAX_TEXTURE_SIZE_LOG2];
 };
 
index d10906d..ef33442 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 #define                        glActiveShaderProgram                                                   glwActiveShaderProgram
 #define                        glActiveTexture                                                                 glwActiveTexture
index 24a05be..deb27b3 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 #define GL_DEPTH_BUFFER_BIT                                                                                            0x00000100
 #define GL_STENCIL_BUFFER_BIT                                                                                  0x00000400
 #define GL_QUERY                                                                                                               0x82E3
 #define GL_QUERY_KHR                                                                                                   0x82E3
 #define GL_PROGRAM_PIPELINE                                                                                            0x82E4
+#define GL_PROGRAM_PIPELINE_KHR                                                                                        0x82E4
 #define GL_MAX_VERTEX_ATTRIB_STRIDE                                                                            0x82E5
 #define GL_SAMPLER                                                                                                             0x82E6
 #define GL_SAMPLER_KHR                                                                                                 0x82E6
 #define GL_MAX_LABEL_LENGTH_KHR                                                                                        0x82E8
 #define GL_NUM_SHADING_LANGUAGE_VERSIONS                                                               0x82E9
 #define GL_QUERY_TARGET                                                                                                        0x82EA
-#define GL_TEXTURE_BINDING                                                                                             0x82EB
 #define GL_MAX_CULL_DISTANCES                                                                                  0x82F9
 #define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES                                                        0x82FA
 #define GL_CONTEXT_RELEASE_BEHAVIOR                                                                            0x82FB
 #define GL_SIGNED_NORMALIZED                                                                                   0x8F9C
 #define GL_PRIMITIVE_RESTART                                                                                   0x8F9D
 #define GL_PRIMITIVE_RESTART_INDEX                                                                             0x8F9E
+#define GL_SR8_EXT                                                                                                             0x8FBD
+#define GL_SRG8_EXT                                                                                                            0x8FBE
 #define GL_DOUBLE_VEC2                                                                                                 0x8FFC
 #define GL_DOUBLE_VEC3                                                                                                 0x8FFD
 #define GL_DOUBLE_VEC4                                                                                                 0x8FFE
index 24c90f2..707a13a 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 typedef GLW_APICALL void                       (GLW_APIENTRY* glActiveShaderProgramFunc)                                                       (GLuint pipeline, GLuint program);
 typedef GLW_APICALL void                       (GLW_APIENTRY* glActiveTextureFunc)                                                                     (GLenum texture);
index 074bea2..7717c89 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 glActiveShaderProgramFunc                                                      activeShaderProgram;
 glActiveTextureFunc                                                                    activeTexture;
index b701a3f..52cf3aa 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 
 void glwActiveShaderProgram (GLuint pipeline, GLuint program)
index d775cc9..f20f0c5 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 gl->activeTexture                                              = (glActiveTextureFunc)                                                 loader->get("glActiveTexture");
 gl->attachShader                                               = (glAttachShaderFunc)                                                  loader->get("glAttachShader");
index 4cf5cb2..f65603a 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 gl->activeTexture                                              = &glActiveTexture;
 gl->attachShader                                               = &glAttachShader;
index cefaf87..328df68 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 gl->activeTexture                                              = (glActiveTextureFunc)                                                 loader->get("glActiveTexture");
 gl->attachShader                                               = (glAttachShaderFunc)                                                  loader->get("glAttachShader");
index a4c5398..09a19ae 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 gl->activeTexture                                              = &glActiveTexture;
 gl->attachShader                                               = &glAttachShader;
index 66e7ed5..0a09285 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 gl->activeShaderProgram                                        = (glActiveShaderProgramFunc)                                   loader->get("glActiveShaderProgram");
 gl->activeTexture                                              = (glActiveTextureFunc)                                                 loader->get("glActiveTexture");
index 1bcb67b..ada95da 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 gl->activeShaderProgram                                        = &glActiveShaderProgram;
 gl->activeTexture                                              = &glActiveTexture;
index 96d48de..61026e5 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 
 if (de::contains(extSet, "GL_KHR_blend_equation_advanced"))
index 7bee310..06e7f7c 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 
 if (de::contains(extSet, "GL_KHR_debug"))
index 84bd9ab..f355789 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 gl->activeTexture                                              = (glActiveTextureFunc)                                                 loader->get("glActiveTexture");
 gl->attachShader                                               = (glAttachShaderFunc)                                                  loader->get("glAttachShader");
index 90b1c36..38c5b2e 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 gl->activeTexture                                              = (glActiveTextureFunc)                                                 loader->get("glActiveTexture");
 gl->attachShader                                               = (glAttachShaderFunc)                                                  loader->get("glAttachShader");
index 3012862..31e60e8 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 gl->activeTexture                                              = (glActiveTextureFunc)                                                 loader->get("glActiveTexture");
 gl->attachShader                                               = (glAttachShaderFunc)                                                  loader->get("glAttachShader");
index bbb27cd..06c3bcf 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 gl->activeTexture                                              = (glActiveTextureFunc)                                                 loader->get("glActiveTexture");
 gl->attachShader                                               = (glAttachShaderFunc)                                                  loader->get("glAttachShader");
index ede9dae..3c7328f 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 gl->activeTexture                                              = (glActiveTextureFunc)                                                 loader->get("glActiveTexture");
 gl->attachShader                                               = (glAttachShaderFunc)                                                  loader->get("glAttachShader");
index 9763f39..6a62ecd 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 gl->activeShaderProgram                                        = (glActiveShaderProgramFunc)                                   loader->get("glActiveShaderProgram");
 gl->activeTexture                                              = (glActiveTextureFunc)                                                 loader->get("glActiveTexture");
index 4bb80c3..39c310b 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 gl->activeShaderProgram                                                        = (glActiveShaderProgramFunc)                                                   loader->get("glActiveShaderProgram");
 gl->activeTexture                                                              = (glActiveTextureFunc)                                                                 loader->get("glActiveTexture");
index 7c4b488..d3a66cb 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 gl->activeShaderProgram                                                        = (glActiveShaderProgramFunc)                                                   loader->get("glActiveShaderProgram");
 gl->activeTexture                                                              = (glActiveTextureFunc)                                                                 loader->get("glActiveTexture");
index 3de7735..e896700 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 gl->activeShaderProgram                                                        = (glActiveShaderProgramFunc)                                                   loader->get("glActiveShaderProgram");
 gl->activeTexture                                                              = (glActiveTextureFunc)                                                                 loader->get("glActiveTexture");
index de1dbbf..45af5f3 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 gl->activeShaderProgram                                                        = (glActiveShaderProgramFunc)                                                   loader->get("glActiveShaderProgram");
 gl->activeTexture                                                              = (glActiveTextureFunc)                                                                 loader->get("glActiveTexture");
index 7580966..60c4a71 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 
 GLW_APICALL void GLW_APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program)
index b5cf05b..cba6f59 100644 (file)
@@ -1,7 +1,7 @@
 /* WARNING: This is auto-generated file. Do not modify, since changes will
  * be lost! Modify the generating script instead.
  *
- * Generated from Khronos GL API description (gl.xml) revision 29570.
+ * Generated from Khronos GL API description (gl.xml) revision 30159.
  */
 gl->activeShaderProgram                                                        = glActiveShaderProgram;
 gl->activeTexture                                                              = glActiveTexture;
index 3e34e56..e0710bc 100644 (file)
@@ -87,7 +87,7 @@ void ApiCase::expectError (EGLenum expected)
        EGLenum err = m_eglTestCtx.getLibrary().getError();
        if (err != expected)
        {
-               m_testCtx.getLog() << TestLog::Message << "// ERROR: expected " << eglu::getErrorStr(expected) << TestLog::EndMessage;
+               m_testCtx.getLog() << TestLog::Message << "// ERROR expected: " << eglu::getErrorStr(expected) << ", Got: " << eglu::getErrorStr(err) << TestLog::EndMessage;
                if (m_testCtx.getTestResult() == QP_TEST_RESULT_PASS)
                        m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Got invalid error");
        }
@@ -97,7 +97,7 @@ void ApiCase::expectBoolean (EGLBoolean expected, EGLBoolean got)
 {
        if (expected != got)
        {
-               m_testCtx.getLog() << TestLog::Message << "// ERROR: expected " << (expected ? "EGL_TRUE" : "EGL_FALSE") << TestLog::EndMessage;
+               m_testCtx.getLog() << TestLog::Message << "// ERROR expected: " << eglu::getBooleanStr(expected) <<  ", Got: " << eglu::getBooleanStr(got) << TestLog::EndMessage;
                if (m_testCtx.getTestResult() == QP_TEST_RESULT_PASS)
                        m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Got invalid value");
        }
@@ -107,7 +107,7 @@ void ApiCase::expectNoContext (EGLContext got)
 {
        if (got != EGL_NO_CONTEXT)
        {
-               m_testCtx.getLog() << TestLog::Message << "// ERROR: expected EGL_NO_CONTEXT" << TestLog::EndMessage;
+               m_testCtx.getLog() << TestLog::Message << "// ERROR expected: EGL_NO_CONTEXT" << TestLog::EndMessage;
                if (m_testCtx.getTestResult() == QP_TEST_RESULT_PASS)
                        m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Got invalid value");
                eglDestroyContext(getDisplay(), got);
@@ -118,7 +118,7 @@ void ApiCase::expectNoSurface (EGLSurface got)
 {
        if (got != EGL_NO_CONTEXT)
        {
-               m_testCtx.getLog() << TestLog::Message << "// ERROR: expected EGL_NO_SURFACE" << TestLog::EndMessage;
+               m_testCtx.getLog() << TestLog::Message << "// ERROR expected: EGL_NO_SURFACE" << TestLog::EndMessage;
                if (m_testCtx.getTestResult() == QP_TEST_RESULT_PASS)
                        m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Got invalid value");
                eglDestroySurface(getDisplay(), got);
@@ -129,7 +129,7 @@ void ApiCase::expectNoDisplay (EGLDisplay got)
 {
        if (got != EGL_NO_CONTEXT)
        {
-               m_testCtx.getLog() << TestLog::Message << "// ERROR: expected EGL_NO_DISPLAY" << TestLog::EndMessage;
+               m_testCtx.getLog() << TestLog::Message << "// ERROR expected: EGL_NO_DISPLAY" << TestLog::EndMessage;
                if (m_testCtx.getTestResult() == QP_TEST_RESULT_PASS)
                        m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Got invalid value");
        }
@@ -139,7 +139,7 @@ void ApiCase::expectNull (const void* got)
 {
        if (got != EGL_NO_CONTEXT)
        {
-               m_testCtx.getLog() << TestLog::Message << "// ERROR: expected NULL" << TestLog::EndMessage;
+               m_testCtx.getLog() << TestLog::Message << "// ERROR expected: NULL" << TestLog::EndMessage;
                if (m_testCtx.getTestResult() == QP_TEST_RESULT_PASS)
                        m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Got invalid value");
        }
index 3e5a5bc..c585468 100755 (executable)
@@ -475,14 +475,13 @@ void NegativeApiTests::init (void)
 
        static const EGLint s_invalidGenericPbufferAttrib0[] = { 0, EGL_NONE };
        static const EGLint s_invalidGenericPbufferAttrib1[] = { (EGLint)0xffffffff };
-       static const EGLint s_invalidGenericPbufferAttrib2[] = { EGL_WIDTH, 64, EGL_HEIGHT, -1, EGL_NONE };
-       static const EGLint s_invalidGenericPbufferAttrib3[] = { EGL_WIDTH, -1, EGL_HEIGHT, 64, EGL_NONE };
+       static const EGLint s_negativeWidthPbufferAttrib[] = { EGL_WIDTH, -1, EGL_HEIGHT, 64, EGL_NONE };
+       static const EGLint s_negativeHeightPbufferAttrib[] = { EGL_WIDTH, 64, EGL_HEIGHT, -1, EGL_NONE };
+       static const EGLint s_negativeWidthAndHeightPbufferAttrib[] = { EGL_WIDTH, -1, EGL_HEIGHT, -1, EGL_NONE };
        static const EGLint* s_invalidGenericPbufferAttribs[] =
        {
                s_invalidGenericPbufferAttrib0,
                s_invalidGenericPbufferAttrib1,
-               s_invalidGenericPbufferAttrib2,
-               s_invalidGenericPbufferAttrib3
        };
 
        static const EGLint s_invalidNoEsPbufferAttrib0[] = { EGL_MIPMAP_TEXTURE, EGL_TRUE, EGL_WIDTH, 64, EGL_HEIGHT, 64, EGL_NONE };
@@ -602,6 +601,23 @@ void NegativeApiTests::init (void)
                        }
 
                        log << TestLog::EndSection;
+
+                       log << TestLog::Section("Test8", "EGL_BAD_PARAMETER is generated if EGL_WIDTH or EGL_HEIGHT is negative");
+
+                       if (getConfig(&genericConfig, FilterList() << surfaceBits<EGL_PBUFFER_BIT>))
+                       {
+                               expectNoSurface(eglCreatePbufferSurface(display, genericConfig, s_negativeWidthPbufferAttrib));
+                               expectError(EGL_BAD_PARAMETER);
+
+                               expectNoSurface(eglCreatePbufferSurface(display, genericConfig, s_negativeHeightPbufferAttrib));
+                               expectError(EGL_BAD_PARAMETER);
+
+                               expectNoSurface(eglCreatePbufferSurface(display, genericConfig, s_negativeWidthAndHeightPbufferAttrib));
+                               expectError(EGL_BAD_PARAMETER);
+                       }
+
+                       log << TestLog::EndSection;
+
                });
 
        TEGL_ADD_API_CASE(create_pixmap_surface, "eglCreatePixmapSurface() negative tests",
@@ -634,9 +650,6 @@ void NegativeApiTests::init (void)
                        {
                                expectNoSurface(eglCreatePixmapSurface(display, pixmapConfig, DE_NULL, s_emptyAttribList));
                                expectError(EGL_BAD_NATIVE_PIXMAP);
-
-                               expectNoSurface(eglCreatePixmapSurface(display, pixmapConfig, (EGLNativePixmapType)-1, s_emptyAttribList));
-                               expectError(EGL_BAD_NATIVE_PIXMAP);
                        }
 
                        log << TestLog::EndSection;
@@ -672,9 +685,6 @@ void NegativeApiTests::init (void)
                        {
                                expectNoSurface(eglCreateWindowSurface(display, windowConfig, DE_NULL, s_emptyAttribList));
                                expectError(EGL_BAD_NATIVE_WINDOW);
-
-                               expectNoSurface(eglCreateWindowSurface(display, windowConfig, (EGLNativeWindowType)-1, s_emptyAttribList));
-                               expectError(EGL_BAD_NATIVE_WINDOW);
                        }
 
                        log << TestLog::EndSection;
index 71f8422..1dc1415 100644 (file)
@@ -181,26 +181,27 @@ static glu::ShaderProgram* createProgram (const glu::RenderContext& context, con
                const FragmentOutput&   output          = outputs[outNdx];
                bool                                    isArray         = output.arrayLength > 0;
                const char*                             typeName        = glu::getDataTypeName(output.type);
-               const char*                             precName        = glu::getPrecisionName(output.precision);
+               const char*                             outputPrec      = glu::getPrecisionName(output.precision);
                bool                                    isFloat         = glu::isDataTypeFloatOrVec(output.type);
                const char*                             interp          = isFloat ? "smooth" : "flat";
+               const char*                             interpPrec      = isFloat ? "highp" : outputPrec;
 
                if (isArray)
                {
                        for (int elemNdx = 0; elemNdx < output.arrayLength; elemNdx++)
                        {
-                               vtx << "in " << precName << " " << typeName << " in" << outNdx << "_" << elemNdx << ";\n"
-                                       << interp << " out " << precName << " " << typeName << " var" << outNdx << "_" << elemNdx << ";\n";
-                               frag << interp << " in " << precName << " " << typeName << " var" << outNdx << "_" << elemNdx << ";\n";
+                               vtx << "in " << interpPrec << " " << typeName << " in" << outNdx << "_" << elemNdx << ";\n"
+                                       << interp << " out " << interpPrec << " " << typeName << " var" << outNdx << "_" << elemNdx << ";\n";
+                               frag << interp << " in " << interpPrec << " " << typeName << " var" << outNdx << "_" << elemNdx << ";\n";
                        }
-                       frag << "layout(location = " << output.location << ") out " << precName << " " << typeName << " out" << outNdx << "[" << output.arrayLength << "];\n";
+                       frag << "layout(location = " << output.location << ") out " << outputPrec << " " << typeName << " out" << outNdx << "[" << output.arrayLength << "];\n";
                }
                else
                {
-                       vtx << "in " << precName << " " << typeName << " in" << outNdx << ";\n"
-                               << interp << " out " << precName << " " << typeName << " var" << outNdx << ";\n";
-                       frag << interp << " in " << precName << " " << typeName << " var" << outNdx << ";\n"
-                                << "layout(location = " << output.location << ") out " << precName << " " << typeName << " out" << outNdx << ";\n";
+                       vtx << "in " << interpPrec << " " << typeName << " in" << outNdx << ";\n"
+                               << interp << " out " << interpPrec << " " << typeName << " var" << outNdx << ";\n";
+                       frag << interp << " in " << interpPrec << " " << typeName << " var" << outNdx << ";\n"
+                                << "layout(location = " << output.location << ") out " << outputPrec << " " << typeName << " out" << outNdx << ";\n";
                }
        }
 
@@ -891,9 +892,10 @@ FragmentOutputCase::IterateResult FragmentOutputCase::iterate (void)
                {
                        case tcu::TEXTURECHANNELCLASS_FLOATING_POINT:
                        {
-                               UVec4           formatThreshold;                //!< Threshold computed based on format.
-                               deUint32        precThreshold   = 0;    //!< Threshold computed based on output type precision
-                               UVec4           finalThreshold;
+                               const deUint32  interpThreshold         = 4;    //!< 4 ULP interpolation threshold (interpolation always in highp)
+                               deUint32                outTypeThreshold        = 0;    //!< Threshold based on output type
+                               UVec4                   formatThreshold;                        //!< Threshold computed based on format.
+                               UVec4                   finalThreshold;
 
                                // 1 ULP rounding error is allowed for smaller floating-point formats
                                switch (format.type)
@@ -906,17 +908,17 @@ FragmentOutputCase::IterateResult FragmentOutputCase::iterate (void)
                                                break;
                                }
 
-                               // 4 ULP interpolation
+                               // 1 ULP rounding error for highp -> output precision cast
                                switch (outPrecision)
                                {
-                                       case glu::PRECISION_LOWP:               precThreshold   = (4<<(23-8));  break;
-                                       case glu::PRECISION_MEDIUMP:    precThreshold   = (4<<(23-10)); break;
-                                       case glu::PRECISION_HIGHP:              precThreshold   = 4;                    break;
+                                       case glu::PRECISION_LOWP:               outTypeThreshold        = (1<<(23-8));  break;
+                                       case glu::PRECISION_MEDIUMP:    outTypeThreshold        = (1<<(23-10)); break;
+                                       case glu::PRECISION_HIGHP:              outTypeThreshold        = 0;                    break;
                                        default:
                                                DE_ASSERT(false);
                                }
 
-                               finalThreshold = select(max(formatThreshold, UVec4(precThreshold)), UVec4(~0u), cmpMask);
+                               finalThreshold = select(max(formatThreshold, UVec4(deMax32(interpThreshold, outTypeThreshold))), UVec4(~0u), cmpMask);
 
                                isOk = tcu::floatUlpThresholdCompare(log, name.c_str(), desc.c_str(), reference, rendered, finalThreshold, tcu::COMPARE_LOG_RESULT);
                                break;
index 556f22c..d4dfa16 100644 (file)
@@ -41,6 +41,7 @@
 #include "deRandom.hpp"
 #include "deMemory.h"
 #include "deThread.h"
+#include "deMeta.hpp"
 
 #include <algorithm>
 #include <iomanip>
@@ -57,6 +58,8 @@ namespace
 
 using gls::theilSenSiegelLinearRegression;
 using gls::LineParametersWithConfidence;
+using de::meta::EnableIf;
+using de::meta::Not;
 
 static const char* const s_dummyVertexShader =         "#version 300 es\n"
                                                                                                        "in highp vec4 a_position;\n"
@@ -90,28 +93,6 @@ static const char* const s_colorFragmentShader =     "#version 300 es\n"
                                                                                                        "       dEQP_FragColor = v_color;\n"
                                                                                                        "}\n";
 
-template <typename TrueType, int cond>
-struct EnableIf
-{
-       typedef TrueType Type;
-};
-
-template <typename TrueType>
-struct EnableIf<TrueType, 0>
-{
-};
-
-template <typename TrueType, int cond>
-struct EnableIfNot
-{
-};
-
-template <typename TrueType>
-struct EnableIfNot<TrueType, 0>
-{
-       typedef TrueType Type;
-};
-
 struct SingleOperationDuration
 {
        deUint64 totalDuration;
@@ -1159,35 +1140,35 @@ static typename EnableIf<void, SampleTypeTraits<SampleType>::HAS_ALLOC_STATS>::T
 }
 
 template <typename SampleType>
-static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_MAP_STATS>::Type logMapRangeStats (tcu::TestLog& log, const typename SampleTypeTraits<SampleType>::StatsType& stats)
+static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_MAP_STATS>::Value>::Type logMapRangeStats (tcu::TestLog& log, const typename SampleTypeTraits<SampleType>::StatsType& stats)
 {
        DE_UNREF(log);
        DE_UNREF(stats);
 }
 
 template <typename SampleType>
-static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_UNMAP_STATS>::Type logUnmapStats (tcu::TestLog& log, const typename SampleTypeTraits<SampleType>::StatsType& stats)
+static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_UNMAP_STATS>::Value>::Type logUnmapStats (tcu::TestLog& log, const typename SampleTypeTraits<SampleType>::StatsType& stats)
 {
        DE_UNREF(log);
        DE_UNREF(stats);
 }
 
 template <typename SampleType>
-static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_WRITE_STATS>::Type logWriteStats (tcu::TestLog& log, const typename SampleTypeTraits<SampleType>::StatsType& stats)
+static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_WRITE_STATS>::Value>::Type logWriteStats (tcu::TestLog& log, const typename SampleTypeTraits<SampleType>::StatsType& stats)
 {
        DE_UNREF(log);
        DE_UNREF(stats);
 }
 
 template <typename SampleType>
-static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_FLUSH_STATS>::Type logFlushStats (tcu::TestLog& log, const typename SampleTypeTraits<SampleType>::StatsType& stats)
+static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_FLUSH_STATS>::Value>::Type logFlushStats (tcu::TestLog& log, const typename SampleTypeTraits<SampleType>::StatsType& stats)
 {
        DE_UNREF(log);
        DE_UNREF(stats);
 }
 
 template <typename SampleType>
-static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_ALLOC_STATS>::Type logAllocStats (tcu::TestLog& log, const typename SampleTypeTraits<SampleType>::StatsType& stats)
+static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_ALLOC_STATS>::Value>::Type logAllocStats (tcu::TestLog& log, const typename SampleTypeTraits<SampleType>::StatsType& stats)
 {
        DE_UNREF(log);
        DE_UNREF(stats);
@@ -1293,7 +1274,7 @@ static typename EnableIf<void, SampleTypeTraits<SampleType>::HAS_SECOND_RENDER_S
 }
 
 template <typename SampleType>
-static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_MAP_STATS>::Type logMapContribution (tcu::TestLog& log, const std::vector<UploadSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
+static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_MAP_STATS>::Value>::Type logMapContribution (tcu::TestLog& log, const std::vector<UploadSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
 {
        DE_UNREF(log);
        DE_UNREF(samples);
@@ -1301,7 +1282,7 @@ static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_MAP_STATS>::
 }
 
 template <typename SampleType>
-static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_UNMAP_STATS>::Type logUnmapContribution (tcu::TestLog& log, const std::vector<UploadSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
+static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_UNMAP_STATS>::Value>::Type logUnmapContribution (tcu::TestLog& log, const std::vector<UploadSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
 {
        DE_UNREF(log);
        DE_UNREF(samples);
@@ -1309,7 +1290,7 @@ static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_UNMAP_STATS>
 }
 
 template <typename SampleType>
-static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_WRITE_STATS>::Type logWriteContribution (tcu::TestLog& log, const std::vector<UploadSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
+static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_WRITE_STATS>::Value>::Type logWriteContribution (tcu::TestLog& log, const std::vector<UploadSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
 {
        DE_UNREF(log);
        DE_UNREF(samples);
@@ -1317,7 +1298,7 @@ static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_WRITE_STATS>
 }
 
 template <typename SampleType>
-static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_FLUSH_STATS>::Type logFlushContribution (tcu::TestLog& log, const std::vector<UploadSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
+static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_FLUSH_STATS>::Value>::Type logFlushContribution (tcu::TestLog& log, const std::vector<UploadSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
 {
        DE_UNREF(log);
        DE_UNREF(samples);
@@ -1325,7 +1306,7 @@ static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_FLUSH_STATS>
 }
 
 template <typename SampleType>
-static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_ALLOC_STATS>::Type logAllocContribution (tcu::TestLog& log, const std::vector<UploadSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
+static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_ALLOC_STATS>::Value>::Type logAllocContribution (tcu::TestLog& log, const std::vector<UploadSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
 {
        DE_UNREF(log);
        DE_UNREF(samples);
@@ -1333,7 +1314,7 @@ static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_ALLOC_STATS>
 }
 
 template <typename SampleType>
-static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_RENDER_STATS>::Type logRenderContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
+static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_RENDER_STATS>::Value>::Type logRenderContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
 {
        DE_UNREF(log);
        DE_UNREF(samples);
@@ -1341,7 +1322,7 @@ static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_RENDER_STATS
 }
 
 template <typename SampleType>
-static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_READ_STATS>::Type logReadContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
+static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_READ_STATS>::Value>::Type logReadContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
 {
        DE_UNREF(log);
        DE_UNREF(samples);
@@ -1349,7 +1330,7 @@ static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_READ_STATS>:
 }
 
 template <typename SampleType>
-static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_UPLOAD_STATS>::Type logUploadContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
+static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_UPLOAD_STATS>::Value>::Type logUploadContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
 {
        DE_UNREF(log);
        DE_UNREF(samples);
@@ -1357,7 +1338,7 @@ static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_UPLOAD_STATS
 }
 
 template <typename SampleType>
-static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_TOTAL_STATS>::Type logTotalContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
+static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_TOTAL_STATS>::Value>::Type logTotalContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
 {
        DE_UNREF(log);
        DE_UNREF(samples);
@@ -1365,7 +1346,7 @@ static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_TOTAL_STATS>
 }
 
 template <typename SampleType>
-static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_FIRST_RENDER_STATS>::Type logFirstRenderContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
+static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_FIRST_RENDER_STATS>::Value>::Type logFirstRenderContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
 {
        DE_UNREF(log);
        DE_UNREF(samples);
@@ -1373,7 +1354,7 @@ static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_FIRST_RENDER
 }
 
 template <typename SampleType>
-static typename EnableIfNot<void, SampleTypeTraits<SampleType>::HAS_SECOND_RENDER_STATS>::Type logSecondRenderContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
+static typename EnableIf<void, Not<SampleTypeTraits<SampleType>::HAS_SECOND_RENDER_STATS>::Value>::Type logSecondRenderContribution (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples, const typename SampleTypeTraits<SampleType>::StatsType& stats)
 {
        DE_UNREF(log);
        DE_UNREF(samples);
index cc23bf1..55df903 100644 (file)
@@ -53,6 +53,7 @@
 #include "deRandom.hpp"
 #include "deStringUtil.hpp"
 #include "deUniquePtr.hpp"
+#include "deArrayUtil.hpp"
 
 #include <map>
 #include <string>
index aecbe46..55942e8 100644 (file)
@@ -50,6 +50,7 @@
 #include "tcuVectorUtil.hpp"
 
 #include "deRandom.hpp"
+#include "deArrayUtil.hpp"
 #include "deStringUtil.hpp"
 #include "deUniquePtr.hpp"
 
index 83fa13c..0bc1efc 100644 (file)
@@ -38,6 +38,7 @@
 #include "deSharedPtr.hpp"
 #include "deUniquePtr.hpp"
 #include "deSTLUtil.hpp"
+#include "deArrayUtil.hpp"
 
 #include <set>
 #include <map>
index 00ad997..22f3b57 100644 (file)
@@ -32,6 +32,7 @@
 #include "deRandom.hpp"
 #include "deMath.h"
 #include "deString.h"
+#include "deArrayUtil.hpp"
 
 namespace deqp
 {
index d8f79ce..d8e6cc3 100644 (file)
@@ -33,6 +33,7 @@
 #include "tcuVectorUtil.hpp"
 #include "tcuFormatUtil.hpp"
 #include "deRandom.hpp"
+#include "deArrayUtil.hpp"
 #include "glwFunctions.hpp"
 #include "glwEnums.hpp"
 
index 5ea1bd2..b00ff84 100644 (file)
@@ -36,6 +36,7 @@
 #include "gluShaderProgram.hpp"
 #include "deMemory.h"
 #include "deStringUtil.hpp"
+#include "deArrayUtil.hpp"
 
 #include <algorithm>
 
index eeef119..c7f103b 100644 (file)
@@ -32,6 +32,7 @@
 #include "deStringUtil.hpp"
 #include "deUniquePtr.hpp"
 #include "deSharedPtr.hpp"
+#include "deArrayUtil.hpp"
 
 #include "tcuCommandLine.hpp"
 #include "tcuFloatFormat.hpp"
index 05689db..e5f3fbc 100644 (file)
@@ -29,6 +29,7 @@
 #include "deStringUtil.hpp"
 #include "deFloat16.h"
 #include "deUniquePtr.hpp"
+#include "deArrayUtil.hpp"
 
 #include "tcuTestLog.hpp"
 #include "tcuPixelFormat.hpp"
index 6033acf..fc93f49 100644 (file)
@@ -207,6 +207,16 @@ static const FormatKey s_oesRgb8Rgba8TexFormats[] =
        GLS_UNSIZED_FORMATKEY(GL_RGBA,          GL_UNSIGNED_BYTE),
 };
 
+static const FormatKey s_extTextureSRGBR8Formats[] =
+{
+       GL_SR8_EXT,
+};
+
+static const FormatKey s_extTextureSRGBRG8Formats[] =
+{
+       GL_SRG8_EXT,
+};
+
 static const FormatExtEntry s_esExtFormats[] =
 {
        {
@@ -378,6 +388,17 @@ static const FormatExtEntry s_esExtFormats[] =
                TEXTURE_VALID, // explicitly unrenderable
                GLS_ARRAY_RANGE(s_oesRequiredInternalFormat10bitColorFormats)
        },
+
+       {
+               "GL_EXT_texture_sRGB_R8",
+               TEXTURE_VALID,
+               GLS_ARRAY_RANGE(s_extTextureSRGBR8Formats)
+       },
+       {
+               "GL_EXT_texture_sRGB_RG8",
+               TEXTURE_VALID,
+               GLS_ARRAY_RANGE(s_extTextureSRGBRG8Formats)
+       },
 };
 
 Context::Context (TestContext& testCtx,
index a263a44..a97823c 100644 (file)
@@ -997,6 +997,12 @@ void ShaderParser::parseRequirement (ShaderCase::CaseRequirement& valueBlock)
 
                valueBlock = ShaderCase::CaseRequirement::createLimitRequirement(limitEnum, limitValue);
        }
+       else if (m_curTokenStr == "full_glsl_es_100_support")
+       {
+               advanceToken();
+
+               valueBlock = ShaderCase::CaseRequirement::createFullGLSLES100SpecificationRequirement();
+       }
        else
                parseError(string("invalid requirement value: " + m_curTokenStr));
 }
index af30141..089d7a6 100644 (file)
@@ -121,6 +121,15 @@ ShaderCase::CaseRequirement ShaderCase::CaseRequirement::createLimitRequirement
        return retVal;
 }
 
+ShaderCase::CaseRequirement ShaderCase::CaseRequirement::createFullGLSLES100SpecificationRequirement (void)
+{
+       CaseRequirement retVal;
+
+       retVal.m_type = REQUIREMENTTYPE_FULL_GLSL_ES_100_SPEC;
+
+       return retVal;
+}
+
 void ShaderCase::CaseRequirement::checkRequirements (glu::RenderContext& renderCtx, const glu::ContextInfo& contextInfo)
 {
        DE_UNREF(renderCtx);
@@ -176,6 +185,12 @@ void ShaderCase::CaseRequirement::checkRequirements (glu::RenderContext& renderC
                        return;
                }
 
+               case REQUIREMENTTYPE_FULL_GLSL_ES_100_SPEC:
+               {
+                       // cannot be queried
+                       return;
+               }
+
                default:
                        DE_ASSERT(false);
        }
@@ -495,6 +510,19 @@ void ShaderCase::init (void)
                        DE_ASSERT(false);
                        break;
        }
+
+       // sanity of arguments
+
+       if (anyProgramRequiresFullGLSLES100Specification())
+       {
+               // makes only sense in tests where shader compiles
+               DE_ASSERT(m_expectResult == EXPECT_PASS                         ||
+                                 m_expectResult == EXPECT_VALIDATION_FAIL      ||
+                                 m_expectResult == EXPECT_BUILD_SUCCESSFUL);
+
+               // only makes sense for ES 100 programs
+               DE_ASSERT(m_targetVersion == glu::GLSL_VERSION_100_ES);
+       }
 }
 
 static void setUniformValue (const glw::Functions& gl, const std::vector<deUint32>& pipelinePrograms, const std::string& name, const ShaderCase::Value& val, int arrayNdx, tcu::TestLog& log)
@@ -576,6 +604,17 @@ bool ShaderCase::isTessellationPresent (void) const
                                !m_programs[0].programSources.sources[glu::SHADERTYPE_TESSELLATION_EVALUATION].empty();
 }
 
+bool ShaderCase::anyProgramRequiresFullGLSLES100Specification (void) const
+{
+       for (int programNdx = 0; programNdx < (int)m_programs.size(); ++programNdx)
+       for (int requirementNdx = 0; requirementNdx < (int)m_programs[programNdx].spec.requirements.size(); ++requirementNdx)
+       {
+               if (m_programs[programNdx].spec.requirements[requirementNdx].getType() == CaseRequirement::REQUIREMENTTYPE_FULL_GLSL_ES_100_SPEC)
+                       return true;
+       }
+       return false;
+}
+
 bool ShaderCase::checkPixels (Surface& surface, int minX, int maxX, int minY, int maxY)
 {
        TestLog&        log                             = m_testCtx.getLog();
@@ -615,8 +654,8 @@ bool ShaderCase::checkPixels (Surface& surface, int minX, int maxX, int minY, in
 
 bool ShaderCase::execute (void)
 {
-       const float                                                                             quadSize                        = 1.0f;
-       static const float                                                              s_positions[4*4]        =
+       const float                                                                             quadSize                                = 1.0f;
+       static const float                                                              s_positions[4*4]                =
        {
                -quadSize, -quadSize, 0.0f, 1.0f,
                -quadSize, +quadSize, 0.0f, 1.0f,
@@ -624,30 +663,31 @@ bool ShaderCase::execute (void)
                +quadSize, +quadSize, 0.0f, 1.0f
        };
 
-       static const deUint16                                                   s_indices[2*3]          =
+       static const deUint16                                                   s_indices[2*3]                  =
        {
                0, 1, 2,
                1, 3, 2
        };
 
-       TestLog&                                                                                log                                     = m_testCtx.getLog();
-       const glw::Functions&                                                   gl                                      = m_renderCtx.getFunctions();
+       TestLog&                                                                                log                                             = m_testCtx.getLog();
+       const glw::Functions&                                                   gl                                              = m_renderCtx.getFunctions();
 
        // Compute viewport.
-       const tcu::RenderTarget&                                                renderTarget            = m_renderCtx.getRenderTarget();
-       de::Random                                                                              rnd                                     (deStringHash(getName()));
-       const int                                                                               width                           = deMin32(renderTarget.getWidth(),      VIEWPORT_WIDTH);
-       const int                                                                               height                          = deMin32(renderTarget.getHeight(),     VIEWPORT_HEIGHT);
-       const int                                                                               viewportX                       = rnd.getInt(0, renderTarget.getWidth()  - width);
-       const int                                                                               viewportY                       = rnd.getInt(0, renderTarget.getHeight() - height);
-       const int                                                                               numVerticesPerDraw      = 4;
-       const bool                                                                              tessellationPresent     = isTessellationPresent();
-
-       bool                                                                                    allCompilesOk           = true;
-       bool                                                                                    allLinksOk                      = true;
-       const char*                                                                             failReason                      = DE_NULL;
-
-       deUint32                                                                                vertexProgramID         = -1;
+       const tcu::RenderTarget&                                                renderTarget                    = m_renderCtx.getRenderTarget();
+       de::Random                                                                              rnd                                             (deStringHash(getName()));
+       const int                                                                               width                                   = deMin32(renderTarget.getWidth(),      VIEWPORT_WIDTH);
+       const int                                                                               height                                  = deMin32(renderTarget.getHeight(),     VIEWPORT_HEIGHT);
+       const int                                                                               viewportX                               = rnd.getInt(0, renderTarget.getWidth()  - width);
+       const int                                                                               viewportY                               = rnd.getInt(0, renderTarget.getHeight() - height);
+       const int                                                                               numVerticesPerDraw              = 4;
+       const bool                                                                              tessellationPresent             = isTessellationPresent();
+       const bool                                                                              requiresFullGLSLES100   = anyProgramRequiresFullGLSLES100Specification();
+
+       bool                                                                                    allCompilesOk                   = true;
+       bool                                                                                    allLinksOk                              = true;
+       const char*                                                                             failReason                              = DE_NULL;
+
+       deUint32                                                                                vertexProgramID                 = -1;
        std::vector<deUint32>                                                   pipelineProgramIDs;
        std::vector<de::SharedPtr<glu::ShaderProgram> > programs;
        de::SharedPtr<glu::ProgramPipeline>                             programPipeline;
@@ -761,9 +801,26 @@ bool ShaderCase::execute (void)
                // \todo [2010-06-07 petri] These should be handled in the test case?
                log << TestLog::Message << "ERROR: " << failReason << TestLog::EndMessage;
 
-               // If implementation parses shader at link time, report it as quality warning.
-               if (m_expectResult == EXPECT_COMPILE_FAIL && allCompilesOk && !allLinksOk)
+               if (requiresFullGLSLES100)
+               {
+                       log     << TestLog::Message
+                               << "Assuming build failure is caused by implementation not supporting full GLSL ES 100 specification, which is not required."
+                               << TestLog::EndMessage;
+
+                       if (allCompilesOk && !allLinksOk)
+                       {
+                               // Used features are detectable at compile time. If implementation parses shader
+                               // at link time, report it as quality warning.
+                               m_testCtx.setTestResult(QP_TEST_RESULT_QUALITY_WARNING, failReason);
+                       }
+                       else
+                               m_testCtx.setTestResult(QP_TEST_RESULT_NOT_SUPPORTED, "Full GLSL ES 100 is not supported");
+               }
+               else if (m_expectResult == EXPECT_COMPILE_FAIL && allCompilesOk && !allLinksOk)
+               {
+                       // If implementation parses shader at link time, report it as quality warning.
                        m_testCtx.setTestResult(QP_TEST_RESULT_QUALITY_WARNING, failReason);
+               }
                else
                        m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, failReason);
                return false;
@@ -774,7 +831,7 @@ bool ShaderCase::execute (void)
                m_expectResult == EXPECT_COMPILE_LINK_FAIL      ||
                m_expectResult == EXPECT_LINK_FAIL                      ||
                m_expectResult == EXPECT_BUILD_SUCCESSFUL)
-               return (failReason == DE_NULL);
+               return true;
 
        // Setup viewport.
        gl.viewport(viewportX, viewportY, width, height);
index 8934c98..162ea0f 100644 (file)
@@ -107,19 +107,21 @@ public:
                {
                        REQUIREMENTTYPE_EXTENSION = 0,
                        REQUIREMENTTYPE_IMPLEMENTATION_LIMIT,
+                       REQUIREMENTTYPE_FULL_GLSL_ES_100_SPEC,  //!< Full support (as opposed to limited as specified for GLES 2.0 (See GLSL Appendix A)) cannot be queried
 
                        REQUIREMENTTYPE_LAST
                };
 
-                                                                       CaseRequirement                                 (void);
+                                                                       CaseRequirement                                                         (void);
 
-               static CaseRequirement          createAnyExtensionRequirement   (const std::vector<std::string>& requirements, deUint32 effectiveShaderStageFlags);
-               static CaseRequirement          createLimitRequirement                  (deUint32 enumName, int ref);
-               void                                            checkRequirements                               (glu::RenderContext& renderCtx, const glu::ContextInfo& contextInfo);
+               static CaseRequirement          createAnyExtensionRequirement                           (const std::vector<std::string>& requirements, deUint32 effectiveShaderStageFlags);
+               static CaseRequirement          createLimitRequirement                                          (deUint32 enumName, int ref);
+               static CaseRequirement          createFullGLSLES100SpecificationRequirement     (void);
+               void                                            checkRequirements                                                       (glu::RenderContext& renderCtx, const glu::ContextInfo& contextInfo);
 
-               RequirementType                         getType                                                 (void) const { return m_type; };
-               std::string                                     getSupportedExtension                   (void) const { DE_ASSERT(m_type == REQUIREMENTTYPE_EXTENSION); DE_ASSERT(m_supportedExtensionNdx >= 0); return m_extensions[m_supportedExtensionNdx]; }
-               deUint32                                        getAffectedExtensionStageFlags  (void) const { DE_ASSERT(m_type == REQUIREMENTTYPE_EXTENSION); return m_effectiveShaderStageFlags; }
+               RequirementType                         getType                                                                         (void) const { return m_type; };
+               std::string                                     getSupportedExtension                                           (void) const { DE_ASSERT(m_type == REQUIREMENTTYPE_EXTENSION); DE_ASSERT(m_supportedExtensionNdx >= 0); return m_extensions[m_supportedExtensionNdx]; }
+               deUint32                                        getAffectedExtensionStageFlags                          (void) const { DE_ASSERT(m_type == REQUIREMENTTYPE_EXTENSION); return m_effectiveShaderStageFlags; }
 
        private:
                RequirementType                         m_type;
@@ -174,42 +176,43 @@ public:
        };
 
        // Methods.
-                                                                       ShaderCase                                              (tcu::TestContext&                              testCtx,
-                                                                                                                                        glu::RenderContext&                    renderCtx,
-                                                                                                                                        const glu::ContextInfo&                contextInfo,
-                                                                                                                                        const char*                                    caseName,
-                                                                                                                                        const char*                                    description,
-                                                                                                                                        const ShaderCaseSpecification& specification);
-                                                                       ShaderCase                                              (tcu::TestContext&                                      testCtx,
-                                                                                                                                        glu::RenderContext&                            renderCtx,
-                                                                                                                                        const glu::ContextInfo&                        contextInfo,
-                                                                                                                                        const char*                                            caseName,
-                                                                                                                                        const char*                                            description,
-                                                                                                                                        const PipelineCaseSpecification&       specification);
-       virtual                                                 ~ShaderCase                                             (void);
+                                                                       ShaderCase                                                                              (tcu::TestContext&                              testCtx,
+                                                                                                                                                                        glu::RenderContext&                    renderCtx,
+                                                                                                                                                                        const glu::ContextInfo&                contextInfo,
+                                                                                                                                                                        const char*                                    caseName,
+                                                                                                                                                                        const char*                                    description,
+                                                                                                                                                                        const ShaderCaseSpecification& specification);
+                                                                       ShaderCase                                                                              (tcu::TestContext&                                      testCtx,
+                                                                                                                                                                        glu::RenderContext&                            renderCtx,
+                                                                                                                                                                        const glu::ContextInfo&                        contextInfo,
+                                                                                                                                                                        const char*                                            caseName,
+                                                                                                                                                                        const char*                                            description,
+                                                                                                                                                                        const PipelineCaseSpecification&       specification);
+       virtual                                                 ~ShaderCase                                                                             (void);
 
 private:
-       void                                                    init                                                    (void);
-       bool                                                    execute                                                 (void);
-       IterateResult                                   iterate                                                 (void);
-
-                                                                       ShaderCase                                              (const ShaderCase&);            // not allowed!
-       ShaderCase&                                             operator=                                               (const ShaderCase&);            // not allowed!
-
-       std::string                                             genVertexShader                                 (const ValueBlock& valueBlock) const;
-       std::string                                             genFragmentShader                               (const ValueBlock& valueBlock) const;
-       std::string                                             specializeVertexShader                  (const char* src, const ValueBlock& valueBlock) const;
-       std::string                                             specializeFragmentShader                (const char* src, const ValueBlock& valueBlock) const;
-       void                                                    specializeVertexShaders                 (glu::ProgramSources& dst, const std::vector<std::string>& sources, const ValueBlock& valueBlock, const std::vector<ShaderCase::CaseRequirement>& requirements) const;
-       void                                                    specializeFragmentShaders               (glu::ProgramSources& dst, const std::vector<std::string>& sources, const ValueBlock& valueBlock, const std::vector<ShaderCase::CaseRequirement>& requirements) const;
-       void                                                    specializeGeometryShaders               (glu::ProgramSources& dst, const std::vector<std::string>& sources, const ValueBlock& valueBlock, const std::vector<ShaderCase::CaseRequirement>& requirements) const;
-       void                                                    specializeTessControlShaders    (glu::ProgramSources& dst, const std::vector<std::string>& sources, const ValueBlock& valueBlock, const std::vector<ShaderCase::CaseRequirement>& requirements) const;
-       void                                                    specializeTessEvalShaders               (glu::ProgramSources& dst, const std::vector<std::string>& sources, const ValueBlock& valueBlock, const std::vector<ShaderCase::CaseRequirement>& requirements) const;
-       bool                                                    isTessellationPresent                   (void) const;
-
-       void                                                    dumpValues                                              (const ValueBlock& valueBlock, int arrayNdx);
-
-       bool                                                    checkPixels                                             (tcu::Surface& surface, int minX, int maxX, int minY, int maxY);
+       void                                                    init                                                                                    (void);
+       bool                                                    execute                                                                                 (void);
+       IterateResult                                   iterate                                                                                 (void);
+
+                                                                       ShaderCase                                                                              (const ShaderCase&);            // not allowed!
+       ShaderCase&                                             operator=                                                                               (const ShaderCase&);            // not allowed!
+
+       std::string                                             genVertexShader                                                                 (const ValueBlock& valueBlock) const;
+       std::string                                             genFragmentShader                                                               (const ValueBlock& valueBlock) const;
+       std::string                                             specializeVertexShader                                                  (const char* src, const ValueBlock& valueBlock) const;
+       std::string                                             specializeFragmentShader                                                (const char* src, const ValueBlock& valueBlock) const;
+       void                                                    specializeVertexShaders                                                 (glu::ProgramSources& dst, const std::vector<std::string>& sources, const ValueBlock& valueBlock, const std::vector<ShaderCase::CaseRequirement>& requirements) const;
+       void                                                    specializeFragmentShaders                                               (glu::ProgramSources& dst, const std::vector<std::string>& sources, const ValueBlock& valueBlock, const std::vector<ShaderCase::CaseRequirement>& requirements) const;
+       void                                                    specializeGeometryShaders                                               (glu::ProgramSources& dst, const std::vector<std::string>& sources, const ValueBlock& valueBlock, const std::vector<ShaderCase::CaseRequirement>& requirements) const;
+       void                                                    specializeTessControlShaders                                    (glu::ProgramSources& dst, const std::vector<std::string>& sources, const ValueBlock& valueBlock, const std::vector<ShaderCase::CaseRequirement>& requirements) const;
+       void                                                    specializeTessEvalShaders                                               (glu::ProgramSources& dst, const std::vector<std::string>& sources, const ValueBlock& valueBlock, const std::vector<ShaderCase::CaseRequirement>& requirements) const;
+       bool                                                    isTessellationPresent                                                   (void) const;
+       bool                                                    anyProgramRequiresFullGLSLES100Specification    (void) const;
+
+       void                                                    dumpValues                                                                              (const ValueBlock& valueBlock, int arrayNdx);
+
+       bool                                                    checkPixels                                                                             (tcu::Surface& surface, int minX, int maxX, int minY, int maxY);
 
        struct ProgramObject
        {
index 8b6fcff..e5ec808 100644 (file)
@@ -44,6 +44,7 @@
 
 #include "deMath.h"
 #include "deStringUtil.hpp"
+#include "deArrayUtil.hpp"
 
 #include <cstring>
 #include <cmath>
index d9f17d6..fdf23dc 100644 (file)
 #include "rrRenderer.hpp"
 #include "tcuTextureUtil.hpp"
 #include "tcuVectorUtil.hpp"
-#include "deRandom.hpp"
 #include "tcuFloat.hpp"
 
+#include "deRandom.hpp"
+#include "deArrayUtil.hpp"
+
 namespace dit
 {
 
index 5e2c359..140c9bf 100644 (file)
@@ -35,4 +35,4 @@ def genEnums (iface):
 if __name__ == "__main__":
        import logging, sys
        logging.basicConfig(stream=sys.stderr, level=logging.INFO)
-       genEnums(getGLInterface())
+       genEnums(getHybridInterface())
index c6b1517..3c1e410 100644 (file)
@@ -554,6 +554,10 @@ ENUM_GROUPS = [
                # EXT_sRGB
                "SRGB",
                "SRGB_ALPHA",
+
+               # GL_EXT_texture_sRGB_R8 & RG8
+               "SR8_EXT",
+               "SRG8_EXT",
                ]),
 
        ("CompressedTexFormat", [
index c36538f..7d960b2 100644 (file)
@@ -37,8 +37,8 @@ OPENGL_INC_DIR                = os.path.join(OPENGL_DIR, "wrapper")
 
 GL_SOURCE                      = khr_util.registry_cache.RegistrySource(
                                                "gl.xml",
-                                               29570,
-                                               "cc358ff7b5fd27863518b80fe4578e021ef5a3d4e3397f323b44433a9b31f60f")
+                                               30159,
+                                               "0af7e185d0db15e9f44a1b6ff6c72102f67509a8590f19a289b983d652008070")
 
 EXTENSIONS                     = [
        'GL_KHR_texture_compression_astc_ldr',
@@ -62,6 +62,8 @@ EXTENSIONS                    = [
        'GL_EXT_draw_buffers_indexed',
        'GL_EXT_texture_sRGB_decode',
        'GL_EXT_texture_border_clamp',
+       'GL_EXT_texture_sRGB_R8',
+       'GL_EXT_texture_sRGB_RG8',
 ]
 
 def getGLRegistry ():