Merge "Merge "PipelineCache: track buffer allocation" into nyc-dev am: 0eae982184...
authorPyry Haulos <phaulos@google.com>
Tue, 17 May 2016 16:16:18 +0000 (16:16 +0000)
committerandroid-build-merger <android-build-merger@google.com>
Tue, 17 May 2016 16:16:18 +0000 (16:16 +0000)
am: a5bd7e6bdd

* commit 'a5bd7e6bddd8f08ca97b4564ff610fcc2df89cc9':

Change-Id: I55e4645f97a671ba82962f4b377ff3572f5fd191

29 files changed:
Android.mk
android/cts/master/com.drawelements.deqp.egl.xml
android/cts/master/egl-master.txt
android/cts/master/src/egl-new-tests.txt [new file with mode: 0644]
framework/egl/egluCallLogWrapper.inl
framework/egl/egluCallLogWrapperApi.inl
framework/egl/egluStrUtil.inl
framework/egl/egluStrUtilPrototypes.inl
framework/egl/wrapper/eglwEnums.inl
framework/egl/wrapper/eglwFuncPtrLibraryDecl.inl
framework/egl/wrapper/eglwFuncPtrLibraryImpl.inl
framework/egl/wrapper/eglwFunctionTypes.inl
framework/egl/wrapper/eglwFunctions.inl
framework/egl/wrapper/eglwInitCore.inl
framework/egl/wrapper/eglwInitExtensions.inl
framework/egl/wrapper/eglwLibrary.inl
framework/egl/wrapper/eglwStaticLibrary14.inl
framework/egl/wrapper/eglwStaticLibrary15.inl
framework/opengl/gluStateReset.cpp
modules/egl/CMakeLists.txt
modules/egl/teglGetProcAddressTests.inl
modules/egl/teglMutableRenderBufferTests.cpp [new file with mode: 0644]
modules/egl/teglMutableRenderBufferTests.hpp [new file with mode: 0644]
modules/egl/teglTestPackage.cpp
modules/egl/teglThreadCleanUpTests.cpp [new file with mode: 0644]
modules/egl/teglThreadCleanUpTests.hpp [new file with mode: 0644]
modules/gles3/functional/es3fNegativeVertexArrayApiTests.cpp
scripts/build_android_mustpass.py
scripts/egl/common.py

index 7356d16..ea0e7db 100644 (file)
@@ -273,6 +273,7 @@ LOCAL_SRC_FILES := \
        modules/egl/teglMakeCurrentPerfTests.cpp \
        modules/egl/teglMemoryStressTests.cpp \
        modules/egl/teglMultiThreadTests.cpp \
+       modules/egl/teglMutableRenderBufferTests.cpp \
        modules/egl/teglNativeColorMappingTests.cpp \
        modules/egl/teglNativeCoordMappingTests.cpp \
        modules/egl/teglNegativeApiTests.cpp \
@@ -295,6 +296,7 @@ LOCAL_SRC_FILES := \
        modules/egl/teglTestPackageEntry.cpp \
        modules/egl/teglVGRenderUtil.cpp \
        modules/egl/teglMultiContextTests.cpp \
+       modules/egl/teglThreadCleanUpTests.cpp \
     modules/gles2/tes2CapabilityTests.cpp \
        modules/gles2/tes2Context.cpp \
        modules/gles2/tes2InfoTests.cpp \
@@ -787,7 +789,7 @@ LOCAL_SRC_FILES := \
        external/vulkancts/modules/vulkan/pipeline/vktPipelineImageSamplingInstance.cpp \
        external/vulkancts/modules/vulkan/pipeline/vktPipelineBlendTests.cpp \
        external/vulkancts/modules/vulkan/pipeline/vktPipelineStencilTests.cpp \
-       external/vulkancts/modules/vulkan/pipeline/vktPipelineTests.cpp \ \
+       external/vulkancts/modules/vulkan/pipeline/vktPipelineTests.cpp \
        external/vulkancts/modules/vulkan/sparse_resources/vktSparseResourcesBase.cpp \
        external/vulkancts/modules/vulkan/sparse_resources/vktSparseResourcesBufferMemoryAliasing.cpp \
        external/vulkancts/modules/vulkan/sparse_resources/vktSparseResourcesBufferSparseBinding.cpp \
index aacee95..380703e 100644 (file)
                                        <Test name="egl_khr_cl_event2">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
+                                       <Test name="egl_khr_debug">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
                                        <Test name="egl_khr_fence_sync">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
                                        <Test name="egl_nv_post_sub_buffer">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
+                                       <Test name="egl_nv_stream_consumer_gltexture_yuv">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
+                                       <Test name="egl_nv_stream_metadata">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
                                        <Test name="egl_nv_stream_sync">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
                                        <Test name="gl_ext_base_instance">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
+                                       <Test name="gl_ext_blend_func_extended">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
+                                       <Test name="gl_ext_buffer_storage">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
                                        <Test name="gl_ext_copy_image">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
                                        <Test name="gl_ext_primitive_bounding_box">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
+                                       <Test name="gl_ext_raster_multisample">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
                                        <Test name="gl_ext_separate_shader_objects">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
+                                       <Test name="gl_ext_sparse_texture">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
                                        <Test name="gl_ext_tessellation_shader">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
                                        <Test name="gl_ext_texture_buffer">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
+                                       <Test name="gl_ext_texture_filter_minmax">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
                                        <Test name="gl_ext_texture_view">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
+                                       <Test name="gl_intel_framebuffer_cmaa">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
                                        <Test name="gl_intel_performance_query">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
                                        <Test name="gl_nv_conditional_render">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
+                                       <Test name="gl_nv_conservative_raster">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
                                        <Test name="gl_nv_copy_buffer">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
                                        <Test name="gl_nv_draw_instanced">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
+                                       <Test name="gl_nv_fragment_coverage_to_color">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
                                        <Test name="gl_nv_framebuffer_blit">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
+                                       <Test name="gl_nv_framebuffer_mixed_samples">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
                                        <Test name="gl_nv_framebuffer_multisample">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
                                        <Test name="gl_nv_path_rendering">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
+                                       <Test name="gl_nv_polygon_mode">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
                                        <Test name="gl_nv_read_buffer">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
+                                       <Test name="gl_nv_sample_locations">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
                                        <Test name="gl_nv_viewport_array">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
                                        <Test name="gl_oes_texture_view">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
+                                       <Test name="gl_ovr_multiview">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
                                        <Test name="gl_qcom_alpha_test">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
index 7c2154e..6080651 100644 (file)
@@ -2398,6 +2398,7 @@ dEQP-EGL.functional.get_proc_address.extension.egl_ext_stream_consumer_egloutput
 dEQP-EGL.functional.get_proc_address.extension.egl_ext_swap_buffers_with_damage
 dEQP-EGL.functional.get_proc_address.extension.egl_hi_clientpixmap
 dEQP-EGL.functional.get_proc_address.extension.egl_khr_cl_event2
+dEQP-EGL.functional.get_proc_address.extension.egl_khr_debug
 dEQP-EGL.functional.get_proc_address.extension.egl_khr_fence_sync
 dEQP-EGL.functional.get_proc_address.extension.egl_khr_image
 dEQP-EGL.functional.get_proc_address.extension.egl_khr_image_base
@@ -2418,6 +2419,8 @@ dEQP-EGL.functional.get_proc_address.extension.egl_nok_swap_region
 dEQP-EGL.functional.get_proc_address.extension.egl_nok_swap_region2
 dEQP-EGL.functional.get_proc_address.extension.egl_nv_native_query
 dEQP-EGL.functional.get_proc_address.extension.egl_nv_post_sub_buffer
+dEQP-EGL.functional.get_proc_address.extension.egl_nv_stream_consumer_gltexture_yuv
+dEQP-EGL.functional.get_proc_address.extension.egl_nv_stream_metadata
 dEQP-EGL.functional.get_proc_address.extension.egl_nv_stream_sync
 dEQP-EGL.functional.get_proc_address.extension.egl_nv_sync
 dEQP-EGL.functional.get_proc_address.extension.egl_nv_system_time
@@ -2457,6 +2460,8 @@ dEQP-EGL.functional.get_proc_address.extension.gl_angle_framebuffer_multisample
 dEQP-EGL.functional.get_proc_address.extension.gl_angle_instanced_arrays
 dEQP-EGL.functional.get_proc_address.extension.gl_angle_translated_shader_source
 dEQP-EGL.functional.get_proc_address.extension.gl_ext_base_instance
+dEQP-EGL.functional.get_proc_address.extension.gl_ext_blend_func_extended
+dEQP-EGL.functional.get_proc_address.extension.gl_ext_buffer_storage
 dEQP-EGL.functional.get_proc_address.extension.gl_ext_copy_image
 dEQP-EGL.functional.get_proc_address.extension.gl_ext_debug_label
 dEQP-EGL.functional.get_proc_address.extension.gl_ext_debug_marker
@@ -2471,11 +2476,15 @@ dEQP-EGL.functional.get_proc_address.extension.gl_ext_multi_draw_indirect
 dEQP-EGL.functional.get_proc_address.extension.gl_ext_multiview_draw_buffers
 dEQP-EGL.functional.get_proc_address.extension.gl_ext_occlusion_query_boolean
 dEQP-EGL.functional.get_proc_address.extension.gl_ext_primitive_bounding_box
+dEQP-EGL.functional.get_proc_address.extension.gl_ext_raster_multisample
 dEQP-EGL.functional.get_proc_address.extension.gl_ext_separate_shader_objects
+dEQP-EGL.functional.get_proc_address.extension.gl_ext_sparse_texture
 dEQP-EGL.functional.get_proc_address.extension.gl_ext_tessellation_shader
 dEQP-EGL.functional.get_proc_address.extension.gl_ext_texture_border_clamp
 dEQP-EGL.functional.get_proc_address.extension.gl_ext_texture_buffer
+dEQP-EGL.functional.get_proc_address.extension.gl_ext_texture_filter_minmax
 dEQP-EGL.functional.get_proc_address.extension.gl_ext_texture_view
+dEQP-EGL.functional.get_proc_address.extension.gl_intel_framebuffer_cmaa
 dEQP-EGL.functional.get_proc_address.extension.gl_intel_performance_query
 dEQP-EGL.functional.get_proc_address.extension.gl_khr_blend_equation_advanced
 dEQP-EGL.functional.get_proc_address.extension.gl_khr_debug
@@ -2483,17 +2492,22 @@ dEQP-EGL.functional.get_proc_address.extension.gl_khr_robustness
 dEQP-EGL.functional.get_proc_address.extension.gl_nv_bindless_texture
 dEQP-EGL.functional.get_proc_address.extension.gl_nv_blend_equation_advanced
 dEQP-EGL.functional.get_proc_address.extension.gl_nv_conditional_render
+dEQP-EGL.functional.get_proc_address.extension.gl_nv_conservative_raster
 dEQP-EGL.functional.get_proc_address.extension.gl_nv_copy_buffer
 dEQP-EGL.functional.get_proc_address.extension.gl_nv_coverage_sample
 dEQP-EGL.functional.get_proc_address.extension.gl_nv_draw_buffers
 dEQP-EGL.functional.get_proc_address.extension.gl_nv_draw_instanced
+dEQP-EGL.functional.get_proc_address.extension.gl_nv_fragment_coverage_to_color
 dEQP-EGL.functional.get_proc_address.extension.gl_nv_framebuffer_blit
+dEQP-EGL.functional.get_proc_address.extension.gl_nv_framebuffer_mixed_samples
 dEQP-EGL.functional.get_proc_address.extension.gl_nv_framebuffer_multisample
 dEQP-EGL.functional.get_proc_address.extension.gl_nv_instanced_arrays
 dEQP-EGL.functional.get_proc_address.extension.gl_nv_internalformat_sample_query
 dEQP-EGL.functional.get_proc_address.extension.gl_nv_non_square_matrices
 dEQP-EGL.functional.get_proc_address.extension.gl_nv_path_rendering
+dEQP-EGL.functional.get_proc_address.extension.gl_nv_polygon_mode
 dEQP-EGL.functional.get_proc_address.extension.gl_nv_read_buffer
+dEQP-EGL.functional.get_proc_address.extension.gl_nv_sample_locations
 dEQP-EGL.functional.get_proc_address.extension.gl_nv_viewport_array
 dEQP-EGL.functional.get_proc_address.extension.gl_oes_copy_image
 dEQP-EGL.functional.get_proc_address.extension.gl_oes_draw_buffers_indexed
@@ -2508,6 +2522,7 @@ dEQP-EGL.functional.get_proc_address.extension.gl_oes_texture_border_clamp
 dEQP-EGL.functional.get_proc_address.extension.gl_oes_texture_buffer
 dEQP-EGL.functional.get_proc_address.extension.gl_oes_texture_storage_multisample_2d_array
 dEQP-EGL.functional.get_proc_address.extension.gl_oes_texture_view
+dEQP-EGL.functional.get_proc_address.extension.gl_ovr_multiview
 dEQP-EGL.functional.get_proc_address.extension.gl_qcom_alpha_test
 dEQP-EGL.functional.get_proc_address.core.egl
 dEQP-EGL.functional.get_proc_address.core.gles
diff --git a/android/cts/master/src/egl-new-tests.txt b/android/cts/master/src/egl-new-tests.txt
new file mode 100644 (file)
index 0000000..6afa07c
--- /dev/null
@@ -0,0 +1,3 @@
+# EGL thread clean up tests
+dEQP-EGL.functional.thread_cleanup.*
+dEQP-EGL.functional.mutable_render_buffer.*
index fa4f5e7..57041bd 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 EGL API description (egl.xml) revision 31042.
+ * Generated from Khronos EGL API description (egl.xml) revision 32725.
  */
 
 eglw::EGLBoolean CallLogWrapper::eglBindAPI (eglw::EGLenum api)
index ba90ce8..69be6e9 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 EGL API description (egl.xml) revision 31042.
+ * Generated from Khronos EGL API description (egl.xml) revision 32725.
  */
 eglw::EGLBoolean                                                               eglBindAPI                                                      (eglw::EGLenum api);
 eglw::EGLBoolean                                                               eglBindTexImage                                         (eglw::EGLDisplay dpy, eglw::EGLSurface surface, eglw::EGLint buffer);
index 4000783..51d8a54 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 EGL API description (egl.xml) revision 31042.
+ * Generated from Khronos EGL API description (egl.xml) revision 32725.
  */
 
 const char* getBooleanName (int value)
index a5bda20..f8620ec 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 EGL API description (egl.xml) revision 31042.
+ * Generated from Khronos EGL API description (egl.xml) revision 32725.
  */
 const char*                                                    getBooleanName                          (int value);
 const char*                                                    getBoolDontCareName                     (int value);
index 2e8a460..86b8cdb 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 EGL API description (egl.xml) revision 31042.
+ * Generated from Khronos EGL API description (egl.xml) revision 32725.
  */
 #define EGL_PBUFFER_BIT                                                                                0x0001
 #define EGL_PIXMAP_BIT                                                                         0x0002
@@ -12,6 +12,7 @@
 #define EGL_OPTIMAL_FORMAT_BIT_KHR                                                     0x0100
 #define EGL_MULTISAMPLE_RESOLVE_BOX_BIT                                                0x0200
 #define EGL_SWAP_BEHAVIOR_PRESERVED_BIT                                                0x0400
+#define EGL_MUTABLE_RENDER_BUFFER_BIT_KHR                                      0x1000
 #define EGL_OPENGL_ES_BIT                                                                      0x0001
 #define EGL_OPENVG_BIT                                                                         0x0002
 #define EGL_OPENGL_ES2_BIT                                                                     0x0004
 #define EGL_GL_TEXTURE_ZOFFSET                                                         0x30BD
 #define EGL_GL_TEXTURE_ZOFFSET_KHR                                                     0x30BD
 #define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT                           0x30BF
-#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT                           0x30BF
 #define EGL_FORMAT_RGB_565_EXACT_KHR                                           0x30C0
 #define EGL_FORMAT_RGB_565_KHR                                                         0x30C1
 #define EGL_FORMAT_RGBA_8888_EXACT_KHR                                         0x30C2
 #define EGL_NATIVE_BUFFER_ANDROID                                                      0x3140
 #define EGL_CONTEXT_OPENGL_DEBUG                                                       0x31B0
 #define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE                          0x31B1
+#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS                                       0x31B2
 #define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR     0x31BD
 #define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR     0x31BD
 #define EGL_NO_RESET_NOTIFICATION                                                      0x31BE
index b65985c..353b6b2 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 EGL API description (egl.xml) revision 31042.
+ * Generated from Khronos EGL API description (egl.xml) revision 32725.
  */
 EGLBoolean                                                                     bindAPI                                                 (EGLenum api) const;
 EGLBoolean                                                                     bindTexImage                                    (EGLDisplay dpy, EGLSurface surface, EGLint buffer) const;
index 007b950..c1140a7 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 EGL API description (egl.xml) revision 31042.
+ * Generated from Khronos EGL API description (egl.xml) revision 32725.
  */
 
 EGLBoolean FuncPtrLibrary::bindAPI (EGLenum api) const
index e02039a..b66bdfd 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 EGL API description (egl.xml) revision 31042.
+ * Generated from Khronos EGL API description (egl.xml) revision 32725.
  */
 typedef EGLW_APICALL EGLBoolean                                                                        (EGLW_APIENTRY* eglBindAPIFunc)                                                 (EGLenum api);
 typedef EGLW_APICALL EGLBoolean                                                                        (EGLW_APIENTRY* eglBindTexImageFunc)                                    (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
index 3ea39ba..3f0ce29 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 EGL API description (egl.xml) revision 31042.
+ * Generated from Khronos EGL API description (egl.xml) revision 32725.
  */
 eglBindAPIFunc                                                 bindAPI;
 eglBindTexImageFunc                                            bindTexImage;
index 563cfbd..b09f990 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 EGL API description (egl.xml) revision 31042.
+ * Generated from Khronos EGL API description (egl.xml) revision 32725.
  */
 dst->bindAPI                                           = (eglBindAPIFunc)                                                      loader->get("eglBindAPI");
 dst->bindTexImage                                      = (eglBindTexImageFunc)                                         loader->get("eglBindTexImage");
index 9488633..7ea82e4 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 EGL API description (egl.xml) revision 31042.
+ * Generated from Khronos EGL API description (egl.xml) revision 32725.
  */
 dst->clientWaitSyncKHR                         = (eglClientWaitSyncKHRFunc)                            loader->get("eglClientWaitSyncKHR");
 dst->createImageKHR                                    = (eglCreateImageKHRFunc)                                       loader->get("eglCreateImageKHR");
index d46e459..a9a42c8 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 EGL API description (egl.xml) revision 31042.
+ * Generated from Khronos EGL API description (egl.xml) revision 32725.
  */
 virtual EGLBoolean                                                                     bindAPI                                                 (EGLenum api) const                                                                                                                                                                                             = 0;
 virtual EGLBoolean                                                                     bindTexImage                                    (EGLDisplay dpy, EGLSurface surface, EGLint buffer) const                                                                                                               = 0;
index 0a02afc..d2d5ca0 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 EGL API description (egl.xml) revision 31042.
+ * Generated from Khronos EGL API description (egl.xml) revision 32725.
  */
        { "eglBindAPI",                                                 (deFunctionPtr)eglBindAPI },
        { "eglBindTexImage",                                    (deFunctionPtr)eglBindTexImage },
index 4ffe3e6..c9fafeb 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 EGL API description (egl.xml) revision 31042.
+ * Generated from Khronos EGL API description (egl.xml) revision 32725.
  */
        { "eglBindAPI",                                                 (deFunctionPtr)eglBindAPI },
        { "eglBindTexImage",                                    (deFunctionPtr)eglBindTexImage },
index efa904f..f91b921 100644 (file)
@@ -144,8 +144,10 @@ void resetStateES (const RenderContext& renderCtx, const ContextInfo& ctxInfo)
        // Texture state.
        // \todo [2013-04-08 pyry] Reset all levels?
        {
-               const float     borderColor[]   = { 0.0f, 0.0f, 0.0f, 0.0f };
-               int                     numTexUnits             = 0;
+               const float     borderColor[]           = { 0.0f, 0.0f, 0.0f, 0.0f };
+               int                     numTexUnits                     = 0;
+               const bool      supportsBorderClamp     = ctxInfo.isExtensionSupported("GL_EXT_texture_border_clamp") || contextSupports(type, ApiType::es(3,2));
+
                gl.getIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &numTexUnits);
 
                for (int ndx = 0; ndx < numTexUnits; ndx++)
@@ -177,7 +179,7 @@ void resetStateES (const RenderContext& renderCtx, const ContextInfo& ctxInfo)
                        if (contextSupports(type, ApiType::es(3,1)))
                                gl.texParameteri(GL_TEXTURE_2D, GL_DEPTH_STENCIL_TEXTURE_MODE, GL_DEPTH_COMPONENT);
 
-                       if (ctxInfo.isExtensionSupported("GL_EXT_texture_border_clamp"))
+                       if (supportsBorderClamp)
                                gl.texParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, &borderColor[0]);
 
                        // Reset cube map texture.
@@ -210,7 +212,7 @@ void resetStateES (const RenderContext& renderCtx, const ContextInfo& ctxInfo)
                        if (contextSupports(type, ApiType::es(3,1)))
                                gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_DEPTH_STENCIL_TEXTURE_MODE, GL_DEPTH_COMPONENT);
 
-                       if (ctxInfo.isExtensionSupported("GL_EXT_texture_border_clamp"))
+                       if (supportsBorderClamp)
                                gl.texParameterfv(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_BORDER_COLOR, &borderColor[0]);
 
                        if (contextSupports(type, ApiType::es(3,0)))
@@ -233,7 +235,7 @@ void resetStateES (const RenderContext& renderCtx, const ContextInfo& ctxInfo)
                                gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_COMPARE_MODE,  GL_NONE);
                                gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_COMPARE_FUNC,  GL_LEQUAL);
 
-                               if (ctxInfo.isExtensionSupported("GL_EXT_texture_border_clamp"))
+                               if (supportsBorderClamp)
                                        gl.texParameterfv(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_BORDER_COLOR, &borderColor[0]);
                        }
 
@@ -261,7 +263,7 @@ void resetStateES (const RenderContext& renderCtx, const ContextInfo& ctxInfo)
                                gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_COMPARE_MODE,        GL_NONE);
                                gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_COMPARE_FUNC,        GL_LEQUAL);
 
-                               if (ctxInfo.isExtensionSupported("GL_EXT_texture_border_clamp"))
+                               if (supportsBorderClamp)
                                        gl.texParameterfv(GL_TEXTURE_3D, GL_TEXTURE_BORDER_COLOR, &borderColor[0]);
                        }
 
@@ -310,7 +312,7 @@ void resetStateES (const RenderContext& renderCtx, const ContextInfo& ctxInfo)
                                gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_COMPARE_MODE,    GL_NONE);
                                gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_COMPARE_FUNC,    GL_LEQUAL);
 
-                               if (ctxInfo.isExtensionSupported("GL_EXT_texture_border_clamp"))
+                               if (supportsBorderClamp)
                                        gl.texParameterfv(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_BORDER_COLOR, &borderColor[0]);
                        }
                }
index 4f80477..52e9fd9 100644 (file)
@@ -39,6 +39,8 @@ set(DEQP_EGL_SRCS
        teglImageTests.hpp
        teglInfoTests.cpp
        teglInfoTests.hpp
+       teglMutableRenderBufferTests.cpp
+       teglMutableRenderBufferTests.hpp
        teglNegativeApiTests.cpp
        teglNegativeApiTests.hpp
        teglPartialUpdateTests.cpp
@@ -93,6 +95,8 @@ set(DEQP_EGL_SRCS
        teglSwapBuffersWithDamageTests.cpp
        teglMultiContextTests.hpp
        teglMultiContextTests.cpp
+       teglThreadCleanUpTests.hpp
+       teglThreadCleanUpTests.cpp
        )
 
 set(DEQP_EGL_LIBS
index 23c88c4..087ec0e 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 EGL API description (egl.xml) revision 31042.
+ * Generated from Khronos EGL API description (egl.xml) revision 32725.
  */
 
 static const char* s_EGL14[] =
@@ -518,6 +518,13 @@ static const char* s_EGL_KHR_cl_event2[] =
        "eglCreateSync64KHR",
 };
 
+static const char* s_EGL_KHR_debug[] =
+{
+       "eglDebugMessageControlKHR",
+       "eglLabelObjectKHR",
+       "eglQueryDebugKHR",
+};
+
 static const char* s_EGL_KHR_fence_sync[] =
 {
        "eglClientWaitSyncKHR",
@@ -641,6 +648,18 @@ static const char* s_EGL_NV_post_sub_buffer[] =
        "eglPostSubBufferNV",
 };
 
+static const char* s_EGL_NV_stream_consumer_gltexture_yuv[] =
+{
+       "eglStreamConsumerGLTextureExternalAttribsNV",
+};
+
+static const char* s_EGL_NV_stream_metadata[] =
+{
+       "eglQueryDisplayAttribNV",
+       "eglQueryStreamMetadataNV",
+       "eglSetStreamMetadataNV",
+};
+
 static const char* s_EGL_NV_stream_sync[] =
 {
        "eglCreateStreamSyncNV",
@@ -815,7 +834,6 @@ static const char* s_GL_OES_fixed_point[] =
        "glPointSizexOES",
        "glPolygonOffsetxOES",
        "glRotatexOES",
-       "glSampleCoverageOES",
        "glSampleCoveragexOES",
        "glScalexOES",
        "glTexEnvxOES",
@@ -978,6 +996,19 @@ static const char* s_GL_EXT_base_instance[] =
        "glDrawElementsInstancedBaseVertexBaseInstanceEXT",
 };
 
+static const char* s_GL_EXT_blend_func_extended[] =
+{
+       "glBindFragDataLocationEXT",
+       "glBindFragDataLocationIndexedEXT",
+       "glGetFragDataIndexEXT",
+       "glGetProgramResourceLocationIndexEXT",
+};
+
+static const char* s_GL_EXT_buffer_storage[] =
+{
+       "glBufferStorageEXT",
+};
+
 static const char* s_GL_EXT_copy_image[] =
 {
        "glCopyImageSubDataEXT",
@@ -1083,6 +1114,11 @@ static const char* s_GL_EXT_primitive_bounding_box[] =
        "glPrimitiveBoundingBoxEXT",
 };
 
+static const char* s_GL_EXT_raster_multisample[] =
+{
+       "glRasterSamplesEXT",
+};
+
 static const char* s_GL_EXT_separate_shader_objects[] =
 {
        "glActiveShaderProgramEXT",
@@ -1131,6 +1167,11 @@ static const char* s_GL_EXT_separate_shader_objects[] =
        "glValidateProgramPipelineEXT",
 };
 
+static const char* s_GL_EXT_sparse_texture[] =
+{
+       "glTexPageCommitmentEXT",
+};
+
 static const char* s_GL_EXT_tessellation_shader[] =
 {
        "glPatchParameteriEXT",
@@ -1154,11 +1195,21 @@ static const char* s_GL_EXT_texture_buffer[] =
        "glTexBufferRangeEXT",
 };
 
+static const char* s_GL_EXT_texture_filter_minmax[] =
+{
+       "glRasterSamplesEXT",
+};
+
 static const char* s_GL_EXT_texture_view[] =
 {
        "glTextureViewEXT",
 };
 
+static const char* s_GL_INTEL_framebuffer_CMAA[] =
+{
+       "glApplyFramebufferAttachmentCMAAINTEL",
+};
+
 static const char* s_GL_INTEL_performance_query[] =
 {
        "glBeginPerfQueryINTEL",
@@ -1231,6 +1282,11 @@ static const char* s_GL_NV_conditional_render[] =
        "glEndConditionalRenderNV",
 };
 
+static const char* s_GL_NV_conservative_raster[] =
+{
+       "glSubpixelPrecisionBiasNV",
+};
+
 static const char* s_GL_NV_copy_buffer[] =
 {
        "glCopyBufferSubDataNV",
@@ -1253,11 +1309,24 @@ static const char* s_GL_NV_draw_instanced[] =
        "glDrawElementsInstancedNV",
 };
 
+static const char* s_GL_NV_fragment_coverage_to_color[] =
+{
+       "glFragmentCoverageColorNV",
+};
+
 static const char* s_GL_NV_framebuffer_blit[] =
 {
        "glBlitFramebufferNV",
 };
 
+static const char* s_GL_NV_framebuffer_mixed_samples[] =
+{
+       "glCoverageModulationNV",
+       "glCoverageModulationTableNV",
+       "glGetCoverageModulationTableNV",
+       "glRasterSamplesEXT",
+};
+
 static const char* s_GL_NV_framebuffer_multisample[] =
 {
        "glRenderbufferStorageMultisampleNV",
@@ -1344,11 +1413,23 @@ static const char* s_GL_NV_path_rendering[] =
        "glWeightPathsNV",
 };
 
+static const char* s_GL_NV_polygon_mode[] =
+{
+       "glPolygonModeNV",
+};
+
 static const char* s_GL_NV_read_buffer[] =
 {
        "glReadBufferNV",
 };
 
+static const char* s_GL_NV_sample_locations[] =
+{
+       "glFramebufferSampleLocationsfvNV",
+       "glNamedFramebufferSampleLocationsfvNV",
+       "glResolveDepthValuesNV",
+};
+
 static const char* s_GL_NV_viewport_array[] =
 {
        "glDepthRangeArrayfvNV",
@@ -1454,6 +1535,11 @@ static const char* s_GL_OES_texture_view[] =
        "glTextureViewOES",
 };
 
+static const char* s_GL_OVR_multiview[] =
+{
+       "glFramebufferTextureMultiviewOVR",
+};
+
 static const char* s_GL_QCOM_alpha_test[] =
 {
        "glAlphaFuncQCOM",
@@ -1478,6 +1564,7 @@ static const struct
        { "EGL_EXT_swap_buffers_with_damage",                           DE_LENGTH_OF_ARRAY(s_EGL_EXT_swap_buffers_with_damage),                         s_EGL_EXT_swap_buffers_with_damage                              },
        { "EGL_HI_clientpixmap",                                                        DE_LENGTH_OF_ARRAY(s_EGL_HI_clientpixmap),                                                      s_EGL_HI_clientpixmap                                                   },
        { "EGL_KHR_cl_event2",                                                          DE_LENGTH_OF_ARRAY(s_EGL_KHR_cl_event2),                                                        s_EGL_KHR_cl_event2                                                             },
+       { "EGL_KHR_debug",                                                                      DE_LENGTH_OF_ARRAY(s_EGL_KHR_debug),                                                            s_EGL_KHR_debug                                                                 },
        { "EGL_KHR_fence_sync",                                                         DE_LENGTH_OF_ARRAY(s_EGL_KHR_fence_sync),                                                       s_EGL_KHR_fence_sync                                                    },
        { "EGL_KHR_image",                                                                      DE_LENGTH_OF_ARRAY(s_EGL_KHR_image),                                                            s_EGL_KHR_image                                                                 },
        { "EGL_KHR_image_base",                                                         DE_LENGTH_OF_ARRAY(s_EGL_KHR_image_base),                                                       s_EGL_KHR_image_base                                                    },
@@ -1498,6 +1585,8 @@ static const struct
        { "EGL_NOK_swap_region2",                                                       DE_LENGTH_OF_ARRAY(s_EGL_NOK_swap_region2),                                                     s_EGL_NOK_swap_region2                                                  },
        { "EGL_NV_native_query",                                                        DE_LENGTH_OF_ARRAY(s_EGL_NV_native_query),                                                      s_EGL_NV_native_query                                                   },
        { "EGL_NV_post_sub_buffer",                                                     DE_LENGTH_OF_ARRAY(s_EGL_NV_post_sub_buffer),                                           s_EGL_NV_post_sub_buffer                                                },
+       { "EGL_NV_stream_consumer_gltexture_yuv",                       DE_LENGTH_OF_ARRAY(s_EGL_NV_stream_consumer_gltexture_yuv),                     s_EGL_NV_stream_consumer_gltexture_yuv                  },
+       { "EGL_NV_stream_metadata",                                                     DE_LENGTH_OF_ARRAY(s_EGL_NV_stream_metadata),                                           s_EGL_NV_stream_metadata                                                },
        { "EGL_NV_stream_sync",                                                         DE_LENGTH_OF_ARRAY(s_EGL_NV_stream_sync),                                                       s_EGL_NV_stream_sync                                                    },
        { "EGL_NV_sync",                                                                        DE_LENGTH_OF_ARRAY(s_EGL_NV_sync),                                                                      s_EGL_NV_sync                                                                   },
        { "EGL_NV_system_time",                                                         DE_LENGTH_OF_ARRAY(s_EGL_NV_system_time),                                                       s_EGL_NV_system_time                                                    },
@@ -1537,6 +1626,8 @@ static const struct
        { "GL_ANGLE_instanced_arrays",                                          DE_LENGTH_OF_ARRAY(s_GL_ANGLE_instanced_arrays),                                        s_GL_ANGLE_instanced_arrays                                             },
        { "GL_ANGLE_translated_shader_source",                          DE_LENGTH_OF_ARRAY(s_GL_ANGLE_translated_shader_source),                        s_GL_ANGLE_translated_shader_source                             },
        { "GL_EXT_base_instance",                                                       DE_LENGTH_OF_ARRAY(s_GL_EXT_base_instance),                                                     s_GL_EXT_base_instance                                                  },
+       { "GL_EXT_blend_func_extended",                                         DE_LENGTH_OF_ARRAY(s_GL_EXT_blend_func_extended),                                       s_GL_EXT_blend_func_extended                                    },
+       { "GL_EXT_buffer_storage",                                                      DE_LENGTH_OF_ARRAY(s_GL_EXT_buffer_storage),                                            s_GL_EXT_buffer_storage                                                 },
        { "GL_EXT_copy_image",                                                          DE_LENGTH_OF_ARRAY(s_GL_EXT_copy_image),                                                        s_GL_EXT_copy_image                                                             },
        { "GL_EXT_debug_label",                                                         DE_LENGTH_OF_ARRAY(s_GL_EXT_debug_label),                                                       s_GL_EXT_debug_label                                                    },
        { "GL_EXT_debug_marker",                                                        DE_LENGTH_OF_ARRAY(s_GL_EXT_debug_marker),                                                      s_GL_EXT_debug_marker                                                   },
@@ -1551,11 +1642,15 @@ static const struct
        { "GL_EXT_multiview_draw_buffers",                                      DE_LENGTH_OF_ARRAY(s_GL_EXT_multiview_draw_buffers),                            s_GL_EXT_multiview_draw_buffers                                 },
        { "GL_EXT_occlusion_query_boolean",                                     DE_LENGTH_OF_ARRAY(s_GL_EXT_occlusion_query_boolean),                           s_GL_EXT_occlusion_query_boolean                                },
        { "GL_EXT_primitive_bounding_box",                                      DE_LENGTH_OF_ARRAY(s_GL_EXT_primitive_bounding_box),                            s_GL_EXT_primitive_bounding_box                                 },
+       { "GL_EXT_raster_multisample",                                          DE_LENGTH_OF_ARRAY(s_GL_EXT_raster_multisample),                                        s_GL_EXT_raster_multisample                                             },
        { "GL_EXT_separate_shader_objects",                                     DE_LENGTH_OF_ARRAY(s_GL_EXT_separate_shader_objects),                           s_GL_EXT_separate_shader_objects                                },
+       { "GL_EXT_sparse_texture",                                                      DE_LENGTH_OF_ARRAY(s_GL_EXT_sparse_texture),                                            s_GL_EXT_sparse_texture                                                 },
        { "GL_EXT_tessellation_shader",                                         DE_LENGTH_OF_ARRAY(s_GL_EXT_tessellation_shader),                                       s_GL_EXT_tessellation_shader                                    },
        { "GL_EXT_texture_border_clamp",                                        DE_LENGTH_OF_ARRAY(s_GL_EXT_texture_border_clamp),                                      s_GL_EXT_texture_border_clamp                                   },
        { "GL_EXT_texture_buffer",                                                      DE_LENGTH_OF_ARRAY(s_GL_EXT_texture_buffer),                                            s_GL_EXT_texture_buffer                                                 },
+       { "GL_EXT_texture_filter_minmax",                                       DE_LENGTH_OF_ARRAY(s_GL_EXT_texture_filter_minmax),                                     s_GL_EXT_texture_filter_minmax                                  },
        { "GL_EXT_texture_view",                                                        DE_LENGTH_OF_ARRAY(s_GL_EXT_texture_view),                                                      s_GL_EXT_texture_view                                                   },
+       { "GL_INTEL_framebuffer_CMAA",                                          DE_LENGTH_OF_ARRAY(s_GL_INTEL_framebuffer_CMAA),                                        s_GL_INTEL_framebuffer_CMAA                                             },
        { "GL_INTEL_performance_query",                                         DE_LENGTH_OF_ARRAY(s_GL_INTEL_performance_query),                                       s_GL_INTEL_performance_query                                    },
        { "GL_KHR_blend_equation_advanced",                                     DE_LENGTH_OF_ARRAY(s_GL_KHR_blend_equation_advanced),                           s_GL_KHR_blend_equation_advanced                                },
        { "GL_KHR_debug",                                                                       DE_LENGTH_OF_ARRAY(s_GL_KHR_debug),                                                                     s_GL_KHR_debug                                                                  },
@@ -1563,17 +1658,22 @@ static const struct
        { "GL_NV_bindless_texture",                                                     DE_LENGTH_OF_ARRAY(s_GL_NV_bindless_texture),                                           s_GL_NV_bindless_texture                                                },
        { "GL_NV_blend_equation_advanced",                                      DE_LENGTH_OF_ARRAY(s_GL_NV_blend_equation_advanced),                            s_GL_NV_blend_equation_advanced                                 },
        { "GL_NV_conditional_render",                                           DE_LENGTH_OF_ARRAY(s_GL_NV_conditional_render),                                         s_GL_NV_conditional_render                                              },
+       { "GL_NV_conservative_raster",                                          DE_LENGTH_OF_ARRAY(s_GL_NV_conservative_raster),                                        s_GL_NV_conservative_raster                                             },
        { "GL_NV_copy_buffer",                                                          DE_LENGTH_OF_ARRAY(s_GL_NV_copy_buffer),                                                        s_GL_NV_copy_buffer                                                             },
        { "GL_NV_coverage_sample",                                                      DE_LENGTH_OF_ARRAY(s_GL_NV_coverage_sample),                                            s_GL_NV_coverage_sample                                                 },
        { "GL_NV_draw_buffers",                                                         DE_LENGTH_OF_ARRAY(s_GL_NV_draw_buffers),                                                       s_GL_NV_draw_buffers                                                    },
        { "GL_NV_draw_instanced",                                                       DE_LENGTH_OF_ARRAY(s_GL_NV_draw_instanced),                                                     s_GL_NV_draw_instanced                                                  },
+       { "GL_NV_fragment_coverage_to_color",                           DE_LENGTH_OF_ARRAY(s_GL_NV_fragment_coverage_to_color),                         s_GL_NV_fragment_coverage_to_color                              },
        { "GL_NV_framebuffer_blit",                                                     DE_LENGTH_OF_ARRAY(s_GL_NV_framebuffer_blit),                                           s_GL_NV_framebuffer_blit                                                },
+       { "GL_NV_framebuffer_mixed_samples",                            DE_LENGTH_OF_ARRAY(s_GL_NV_framebuffer_mixed_samples),                          s_GL_NV_framebuffer_mixed_samples                               },
        { "GL_NV_framebuffer_multisample",                                      DE_LENGTH_OF_ARRAY(s_GL_NV_framebuffer_multisample),                            s_GL_NV_framebuffer_multisample                                 },
        { "GL_NV_instanced_arrays",                                                     DE_LENGTH_OF_ARRAY(s_GL_NV_instanced_arrays),                                           s_GL_NV_instanced_arrays                                                },
        { "GL_NV_internalformat_sample_query",                          DE_LENGTH_OF_ARRAY(s_GL_NV_internalformat_sample_query),                        s_GL_NV_internalformat_sample_query                             },
        { "GL_NV_non_square_matrices",                                          DE_LENGTH_OF_ARRAY(s_GL_NV_non_square_matrices),                                        s_GL_NV_non_square_matrices                                             },
        { "GL_NV_path_rendering",                                                       DE_LENGTH_OF_ARRAY(s_GL_NV_path_rendering),                                                     s_GL_NV_path_rendering                                                  },
+       { "GL_NV_polygon_mode",                                                         DE_LENGTH_OF_ARRAY(s_GL_NV_polygon_mode),                                                       s_GL_NV_polygon_mode                                                    },
        { "GL_NV_read_buffer",                                                          DE_LENGTH_OF_ARRAY(s_GL_NV_read_buffer),                                                        s_GL_NV_read_buffer                                                             },
+       { "GL_NV_sample_locations",                                                     DE_LENGTH_OF_ARRAY(s_GL_NV_sample_locations),                                           s_GL_NV_sample_locations                                                },
        { "GL_NV_viewport_array",                                                       DE_LENGTH_OF_ARRAY(s_GL_NV_viewport_array),                                                     s_GL_NV_viewport_array                                                  },
        { "GL_OES_copy_image",                                                          DE_LENGTH_OF_ARRAY(s_GL_OES_copy_image),                                                        s_GL_OES_copy_image                                                             },
        { "GL_OES_draw_buffers_indexed",                                        DE_LENGTH_OF_ARRAY(s_GL_OES_draw_buffers_indexed),                                      s_GL_OES_draw_buffers_indexed                                   },
@@ -1588,5 +1688,6 @@ static const struct
        { "GL_OES_texture_buffer",                                                      DE_LENGTH_OF_ARRAY(s_GL_OES_texture_buffer),                                            s_GL_OES_texture_buffer                                                 },
        { "GL_OES_texture_storage_multisample_2d_array",        DE_LENGTH_OF_ARRAY(s_GL_OES_texture_storage_multisample_2d_array),      s_GL_OES_texture_storage_multisample_2d_array   },
        { "GL_OES_texture_view",                                                        DE_LENGTH_OF_ARRAY(s_GL_OES_texture_view),                                                      s_GL_OES_texture_view                                                   },
+       { "GL_OVR_multiview",                                                           DE_LENGTH_OF_ARRAY(s_GL_OVR_multiview),                                                         s_GL_OVR_multiview                                                              },
        { "GL_QCOM_alpha_test",                                                         DE_LENGTH_OF_ARRAY(s_GL_QCOM_alpha_test),                                                       s_GL_QCOM_alpha_test                                                    },
 };
diff --git a/modules/egl/teglMutableRenderBufferTests.cpp b/modules/egl/teglMutableRenderBufferTests.cpp
new file mode 100644 (file)
index 0000000..2fd036b
--- /dev/null
@@ -0,0 +1,390 @@
+/*-------------------------------------------------------------------------
+ * drawElements Quality Program EGL Module
+ * ---------------------------------------
+ *
+ * Copyright 2016 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 Test KHR_mutable_render_buffer
+ *//*--------------------------------------------------------------------*/
+
+#include "teglMutableRenderBufferTests.hpp"
+
+#include "egluUtil.hpp"
+
+#include "eglwLibrary.hpp"
+#include "eglwEnums.hpp"
+
+#include "gluDefs.hpp"
+#include "gluRenderContext.hpp"
+
+#include "glwFunctions.hpp"
+#include "glwEnums.hpp"
+
+using namespace eglw;
+
+namespace deqp
+{
+namespace egl
+{
+namespace
+{
+
+class MutableRenderBufferTest : public TestCase
+{
+public:
+                                               MutableRenderBufferTest         (EglTestContext&        eglTestCtx,
+                                                                                                        const char*            name,
+                                                                                                        const char*            description,
+                                                                                                        bool                           enableConfigBit);
+                                               ~MutableRenderBufferTest        (void);
+       void                            init                                            (void);
+       void                            deinit                                          (void);
+       IterateResult           iterate                                         (void);
+
+protected:
+       deUint32                        drawAndSwap                                     (const Library&         egl,
+                                                                                                        deUint32                       color,
+                                                                                                        bool                           flush);
+       bool                            m_enableConfigBit;
+       EGLDisplay                      m_eglDisplay;
+       EGLSurface                      m_eglSurface;
+       EGLConfig                       m_eglConfig;
+       eglu::NativeWindow*     m_window;
+       EGLContext                      m_eglContext;
+       glw::Functions          m_gl;
+};
+
+MutableRenderBufferTest::MutableRenderBufferTest (EglTestContext& eglTestCtx,
+                                                                                                 const char* name, const char* description,
+                                                                                                 bool enableConfigBit)
+       : TestCase                      (eglTestCtx, name, description)
+       , m_enableConfigBit     (enableConfigBit)
+       , m_eglDisplay          (EGL_NO_DISPLAY)
+       , m_eglSurface          (EGL_NO_SURFACE)
+       , m_eglConfig           (DE_NULL)
+       , m_window                      (DE_NULL)
+       , m_eglContext          (EGL_NO_CONTEXT)
+{
+}
+
+MutableRenderBufferTest::~MutableRenderBufferTest (void)
+{
+       deinit();
+}
+
+void MutableRenderBufferTest::init (void)
+{
+       const Library&  egl     = m_eglTestCtx.getLibrary();
+
+       // create display
+       m_eglDisplay            = eglu::getAndInitDisplay(m_eglTestCtx.getNativeDisplay());
+
+       if (!eglu::hasExtension(egl, m_eglDisplay, "EGL_KHR_mutable_render_buffer"))
+       {
+               TCU_THROW(NotSupportedError, "EGL_KHR_mutable_render_buffer is not supported");
+       }
+
+       // get mutable render buffer config
+       const EGLint    attribs[]       =
+       {
+        EGL_RED_SIZE,                  8,
+        EGL_GREEN_SIZE,                8,
+        EGL_BLUE_SIZE,                         8,
+               EGL_ALPHA_SIZE,                 8,
+               EGL_SURFACE_TYPE,               EGL_WINDOW_BIT | EGL_MUTABLE_RENDER_BUFFER_BIT_KHR,
+               EGL_RENDERABLE_TYPE,    EGL_OPENGL_ES2_BIT,
+               EGL_NONE
+       };
+       const EGLint    attribsNoBit[]  =
+       {
+        EGL_RED_SIZE,                  8,
+        EGL_GREEN_SIZE,                8,
+        EGL_BLUE_SIZE,                         8,
+               EGL_ALPHA_SIZE,                 8,
+               EGL_SURFACE_TYPE,               EGL_WINDOW_BIT,
+               EGL_RENDERABLE_TYPE,    EGL_OPENGL_ES2_BIT,
+               EGL_NONE
+       };
+       m_eglConfig                     = m_enableConfigBit ?
+                                                               eglu::chooseSingleConfig(egl, m_eglDisplay, attribs) :
+                                                               eglu::chooseSingleConfig(egl, m_eglDisplay, attribsNoBit);
+
+       // create surface
+       const eglu::NativeWindowFactory& factory = eglu::selectNativeWindowFactory(m_eglTestCtx.getNativeDisplayFactory(), m_testCtx.getCommandLine());
+       m_window = factory.createWindow(&m_eglTestCtx.getNativeDisplay(), m_eglDisplay, m_eglConfig, DE_NULL,
+                                                                       eglu::WindowParams(480, 480, eglu::parseWindowVisibility(m_testCtx.getCommandLine())));
+       m_eglSurface = eglu::createWindowSurface(m_eglTestCtx.getNativeDisplay(), *m_window, m_eglDisplay, m_eglConfig, DE_NULL);
+
+       // create context and make current
+       const EGLint    contextAttribList[]     =
+       {
+               EGL_CONTEXT_CLIENT_VERSION, 2,
+               EGL_NONE
+       };
+
+       egl.bindAPI(EGL_OPENGL_ES_API);
+       m_eglContext = egl.createContext(m_eglDisplay, m_eglConfig, EGL_NO_CONTEXT, contextAttribList);
+       EGLU_CHECK_MSG(egl, "eglCreateContext");
+       TCU_CHECK(m_eglSurface != EGL_NO_SURFACE);
+       egl.makeCurrent(m_eglDisplay, m_eglSurface, m_eglSurface, m_eglContext);
+       EGLU_CHECK_MSG(egl, "eglMakeCurrent");
+
+       m_eglTestCtx.initGLFunctions(&m_gl, glu::ApiType::es(2,0));
+}
+
+void MutableRenderBufferTest::deinit (void)
+{
+       const Library&  egl     = m_eglTestCtx.getLibrary();
+
+       if (m_eglContext != EGL_NO_CONTEXT)
+       {
+               egl.makeCurrent(m_eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
+               egl.destroyContext(m_eglDisplay, m_eglContext);
+               m_eglContext = EGL_NO_CONTEXT;
+       }
+
+       if (m_eglSurface != EGL_NO_SURFACE)
+       {
+               egl.destroySurface(m_eglDisplay, m_eglSurface);
+               m_eglSurface = EGL_NO_SURFACE;
+       }
+
+       if (m_eglDisplay != EGL_NO_DISPLAY)
+       {
+               egl.terminate(m_eglDisplay);
+               m_eglDisplay = EGL_NO_DISPLAY;
+       }
+
+       if (m_window != DE_NULL)
+       {
+               delete m_window;
+               m_window = DE_NULL;
+       }
+}
+
+deUint32 MutableRenderBufferTest::drawAndSwap (const Library& egl, deUint32 color, bool flush)
+{
+       DE_ASSERT(color < 256);
+       m_gl.clearColor(color/255.f, color/255.f, color/255.f, color/255.f);
+       m_gl.clear(GL_COLOR_BUFFER_BIT);
+       if (flush)
+       {
+               m_gl.flush();
+       }
+       else
+       {
+               EGLU_CHECK_CALL(egl, swapBuffers(m_eglDisplay, m_eglSurface));
+       }
+       return (color | color << 8 | color << 16 | color << 24);
+}
+
+TestCase::IterateResult MutableRenderBufferTest::iterate (void)
+{
+       const Library&  egl     = m_eglTestCtx.getLibrary();
+
+       int frameNumber = 1;
+
+       // test a few back-buffered frames
+       for(; frameNumber < 5; frameNumber++)
+       {
+               deUint32 backBufferPixel = 0xFFFFFFFF;
+               deUint32 frontBufferPixel = drawAndSwap(egl, frameNumber, false);
+               m_gl.readPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &backBufferPixel);
+
+               // the front-buffer and the back-buffer should have different contents
+               if (backBufferPixel == frontBufferPixel)
+               {
+                       m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Surface isn't being back-buffered");
+                       return STOP;
+               }
+       }
+
+       // switch to single-buffer rendering
+       EGLU_CHECK_CALL(egl, surfaceAttrib(m_eglDisplay, m_eglSurface, EGL_RENDER_BUFFER, EGL_SINGLE_BUFFER));
+
+       // test a few single-buffered frames
+       for (; frameNumber < 10; frameNumber++)
+       {
+               deUint32 backBufferPixel = 0xFFFFFFFF;
+               deUint32 frontBufferPixel = drawAndSwap(egl, frameNumber, frameNumber > 5); // only the first frame should eglSwapBuffers
+               m_gl.readPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &backBufferPixel);
+
+               // when single buffered, front-buffer == back-buffer
+               if (backBufferPixel != frontBufferPixel)
+               {
+                       m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Surface didn't switch to being single-buffered");
+                       return STOP;
+               }
+       }
+
+       // switch back to back-buffer rendering
+       EGLU_CHECK_CALL(egl, surfaceAttrib(m_eglDisplay, m_eglSurface, EGL_RENDER_BUFFER, EGL_BACK_BUFFER));
+
+       // test a few back-buffered frames
+       for (; frameNumber < 15; frameNumber++)
+       {
+               deUint32 backBufferPixel = 0xFFFFFFFF;
+               deUint32 frontBufferPixel = drawAndSwap(egl, frameNumber, false);
+               m_gl.readPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &backBufferPixel);
+
+               // the front-buffer and the back-buffer should have different contents
+               if (backBufferPixel == frontBufferPixel)
+               {
+                       m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Surface didn't switch back to being back-buffered");
+                       return STOP;
+               }
+       }
+
+       m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
+       return STOP;
+}
+
+class MutableRenderBufferQueryTest : public MutableRenderBufferTest
+{
+public:
+                                               MutableRenderBufferQueryTest    (EglTestContext&        eglTestCtx,
+                                                                                                                const char*            name,
+                                                                                                                const char*            description);
+                                               ~MutableRenderBufferQueryTest   (void);
+       IterateResult           iterate                                                 (void);
+};
+
+MutableRenderBufferQueryTest::MutableRenderBufferQueryTest (EglTestContext& eglTestCtx,
+                                                                                                                       const char* name, const char* description)
+       : MutableRenderBufferTest       (eglTestCtx, name, description, true)
+{
+}
+
+MutableRenderBufferQueryTest::~MutableRenderBufferQueryTest (void)
+{
+       deinit();
+}
+
+TestCase::IterateResult MutableRenderBufferQueryTest::iterate (void)
+{
+       const Library&  egl     = m_eglTestCtx.getLibrary();
+
+       // check that by default the query returns back buffered
+       EGLint curRenderBuffer = -1;
+       EGLU_CHECK_CALL(egl, querySurface(m_eglDisplay, m_eglSurface, EGL_RENDER_BUFFER, &curRenderBuffer));
+       if (curRenderBuffer != EGL_BACK_BUFFER)
+       {
+               m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Surface didn't default to back-buffered rendering");
+               return STOP;
+       }
+
+       // switch to single-buffer rendering and check that the query output changed
+       EGLU_CHECK_CALL(egl, surfaceAttrib(m_eglDisplay, m_eglSurface, EGL_RENDER_BUFFER, EGL_SINGLE_BUFFER));
+       EGLU_CHECK_CALL(egl, querySurface(m_eglDisplay, m_eglSurface, EGL_RENDER_BUFFER, &curRenderBuffer));
+       if (curRenderBuffer != EGL_SINGLE_BUFFER)
+       {
+               m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Surface didn't switch to single-buffer rendering");
+               return STOP;
+       }
+
+       // switch back to back-buffer rendering and check the query again
+       EGLU_CHECK_CALL(egl, surfaceAttrib(m_eglDisplay, m_eglSurface, EGL_RENDER_BUFFER, EGL_BACK_BUFFER));
+       EGLU_CHECK_CALL(egl, querySurface(m_eglDisplay, m_eglSurface, EGL_RENDER_BUFFER, &curRenderBuffer));
+       if (curRenderBuffer != EGL_BACK_BUFFER)
+       {
+               m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Surface didn't switch back to back-buffer rendering");
+               return STOP;
+       }
+       m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
+       return STOP;
+}
+
+class MutableRenderBufferQueryNegativeTest : public MutableRenderBufferTest
+{
+public:
+                                               MutableRenderBufferQueryNegativeTest    (EglTestContext&        eglTestCtx,
+                                                                                                                                const char*            name,
+                                                                                                                                const char*            description);
+                                               ~MutableRenderBufferQueryNegativeTest   (void);
+       IterateResult           iterate                                                                 (void);
+};
+
+MutableRenderBufferQueryNegativeTest::MutableRenderBufferQueryNegativeTest (EglTestContext& eglTestCtx,
+                                                                                                                       const char* name, const char* description)
+       : MutableRenderBufferTest       (eglTestCtx, name, description, false)
+{
+}
+
+MutableRenderBufferQueryNegativeTest::~MutableRenderBufferQueryNegativeTest (void)
+{
+       deinit();
+}
+
+TestCase::IterateResult MutableRenderBufferQueryNegativeTest::iterate (void)
+{
+       const Library&  egl     = m_eglTestCtx.getLibrary();
+
+       // check that by default the query returns back buffered
+       EGLint curRenderBuffer = -1;
+       EGLU_CHECK_CALL(egl, querySurface(m_eglDisplay, m_eglSurface, EGL_RENDER_BUFFER, &curRenderBuffer));
+       if (curRenderBuffer != EGL_BACK_BUFFER)
+       {
+               m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Surface didn't default to back-buffered rendering");
+               return STOP;
+       }
+
+       // check that trying to switch to single-buffer rendering fails when the config bit is not set
+       EGLBoolean ret = egl.surfaceAttrib(m_eglDisplay, m_eglSurface, EGL_RENDER_BUFFER, EGL_SINGLE_BUFFER);
+       EGLint err = egl.getError();
+       if (ret != EGL_FALSE)
+       {
+               m_testCtx.setTestResult(QP_TEST_RESULT_FAIL,
+                       "eglSurfaceAttrib didn't return false when trying to enable single-buffering on a context without the mutable render buffer bit set");
+               return STOP;
+       }
+       if (err != EGL_BAD_MATCH)
+       {
+               m_testCtx.setTestResult(QP_TEST_RESULT_FAIL,
+                       "eglSurfaceAttrib didn't set the EGL_BAD_MATCH error when trying to enable single-buffering on a context without the mutable render buffer bit set");
+               return STOP;
+       }
+
+    EGLU_CHECK_CALL(egl, querySurface(m_eglDisplay, m_eglSurface, EGL_RENDER_BUFFER, &curRenderBuffer));
+    if (curRenderBuffer != EGL_BACK_BUFFER)
+    {
+        m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Surface didn't stay in back-buffered rendering after error");
+        return STOP;
+    }
+
+       m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
+       return STOP;
+}
+
+} // anonymous
+
+MutableRenderBufferTests::MutableRenderBufferTests (EglTestContext& eglTestCtx)
+       : TestCaseGroup(eglTestCtx, "mutable_render_buffer", "Mutable render buffer tests")
+{
+}
+
+void MutableRenderBufferTests::init (void)
+{
+       addChild(new MutableRenderBufferQueryTest(m_eglTestCtx, "querySurface",
+               "Tests if querySurface returns the correct value after surfaceAttrib is called"));
+       addChild(new MutableRenderBufferQueryNegativeTest(m_eglTestCtx, "negativeConfigBit",
+               "Tests trying to enable single-buffering on a context without the mutable render buffer bit set"));
+       addChild(new MutableRenderBufferTest(m_eglTestCtx, "basic",
+               "Tests enabling/disabling single-buffer rendering and checks the buffering behavior", true));
+}
+
+} // egl
+} // deqp
diff --git a/modules/egl/teglMutableRenderBufferTests.hpp b/modules/egl/teglMutableRenderBufferTests.hpp
new file mode 100644 (file)
index 0000000..611673a
--- /dev/null
@@ -0,0 +1,48 @@
+#ifndef _TEGLMUTABLERENDERBUFFERTESTS_HPP
+#define _TEGLMUTABLERENDERBUFFERTESTS_HPP
+/*-------------------------------------------------------------------------
+ * drawElements Quality Program EGL Module
+ * ---------------------------------------
+ *
+ * Copyright 2016 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 Test KHR_mutable_render_buffer
+ *//*--------------------------------------------------------------------*/
+
+#include "tcuDefs.hpp"
+#include "teglTestCase.hpp"
+
+namespace deqp
+{
+namespace egl
+{
+
+class MutableRenderBufferTests : public TestCaseGroup
+{
+public:
+                                                               MutableRenderBufferTests        (EglTestContext& eglTestCtx);
+       void                                            init                                            (void);
+
+private:
+                                                               MutableRenderBufferTests        (const MutableRenderBufferTests&);
+       MutableRenderBufferTests&       operator=                                       (const MutableRenderBufferTests&);
+};
+
+} // egl
+} // deqp
+
+#endif // _TEGLMUTABLERENDERBUFFERTESTS_HPP
index 10627b8..443fad6 100644 (file)
@@ -61,6 +61,8 @@
 #include "teglNegativePartialUpdateTests.hpp"
 #include "teglSwapBuffersWithDamageTests.hpp"
 #include "teglMultiContextTests.hpp"
+#include "teglThreadCleanUpTests.hpp"
+#include "teglMutableRenderBufferTests.hpp"
 
 namespace deqp
 {
@@ -134,6 +136,8 @@ public:
                addChild(new NegativePartialUpdateTests (m_eglTestCtx));
                addChild(new SwapBuffersWithDamageTests (m_eglTestCtx));
                addChild(createMultiContextTests                (m_eglTestCtx));
+               addChild(createThreadCleanUpTest                (m_eglTestCtx));
+               addChild(new MutableRenderBufferTests   (m_eglTestCtx));
        }
 };
 
diff --git a/modules/egl/teglThreadCleanUpTests.cpp b/modules/egl/teglThreadCleanUpTests.cpp
new file mode 100644 (file)
index 0000000..17b1eb2
--- /dev/null
@@ -0,0 +1,302 @@
+/*-------------------------------------------------------------------------
+ * drawElements Quality Program EGL Module
+ * ---------------------------------------
+ *
+ * Copyright 2016 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 EGL thread clean up tests
+ *//*--------------------------------------------------------------------*/
+
+#include "teglThreadCleanUpTests.hpp"
+
+#include "egluUtil.hpp"
+#include "egluUnique.hpp"
+#include "egluConfigFilter.hpp"
+
+#include "eglwLibrary.hpp"
+#include "eglwEnums.hpp"
+
+#include "tcuMaybe.hpp"
+#include "tcuTestLog.hpp"
+
+#include "deThread.hpp"
+
+namespace deqp
+{
+namespace egl
+{
+namespace
+{
+
+using namespace eglw;
+using tcu::TestLog;
+
+bool isES2Renderable (const eglu::CandidateConfig& c)
+{
+       return (c.get(EGL_RENDERABLE_TYPE) & EGL_OPENGL_ES2_BIT) == EGL_OPENGL_ES2_BIT;
+}
+
+bool isPBuffer (const eglu::CandidateConfig& c)
+{
+       return (c.surfaceType() & EGL_PBUFFER_BIT) == EGL_PBUFFER_BIT;
+}
+
+class Thread : public de::Thread
+{
+public:
+       Thread (const Library& egl, EGLDisplay display, EGLSurface surface, EGLContext context, EGLConfig config, tcu::Maybe<eglu::Error>& error)
+               : m_egl         (egl)
+               , m_display     (display)
+               , m_surface     (surface)
+               , m_context     (context)
+               , m_config      (config)
+               , m_error       (error)
+       {
+       }
+
+       void testContext (EGLContext context)
+       {
+               if (m_surface != EGL_NO_SURFACE)
+               {
+                       EGLU_CHECK_MSG(m_egl, "eglCreateContext");
+                       m_egl.makeCurrent(m_display, m_surface, m_surface, context);
+                       EGLU_CHECK_MSG(m_egl, "eglMakeCurrent");
+               }
+               else
+               {
+                       const EGLint attribs[] =
+                       {
+                               EGL_WIDTH, 32,
+                               EGL_HEIGHT, 32,
+                               EGL_NONE
+                       };
+                       const eglu::UniqueSurface surface (m_egl, m_display, m_egl.createPbufferSurface(m_display, m_config, attribs));
+
+                       EGLU_CHECK_MSG(m_egl, "eglCreateContext");
+                       m_egl.makeCurrent(m_display, *surface, *surface, context);
+                       EGLU_CHECK_MSG(m_egl, "eglMakeCurrent");
+               }
+       }
+
+       void run (void)
+       {
+               try
+               {
+                       const EGLint    attribList[] =
+                       {
+                               EGL_CONTEXT_CLIENT_VERSION, 2,
+                               EGL_NONE
+                       };
+
+                       m_egl.bindAPI(EGL_OPENGL_ES_API);
+
+                       if (m_context == EGL_NO_CONTEXT)
+                       {
+                               const eglu::UniqueContext context (m_egl, m_display, m_egl.createContext(m_display, m_config, EGL_NO_CONTEXT, attribList));
+
+                               testContext(*context);
+                       }
+                       else
+                       {
+                               testContext(m_context);
+                       }
+
+               }
+               catch (const eglu::Error& error)
+               {
+                       m_error = error;
+               }
+       }
+
+private:
+       const Library&                          m_egl;
+       const EGLDisplay                        m_display;
+       const EGLSurface                        m_surface;
+       const EGLContext                        m_context;
+       const EGLConfig                         m_config;
+       tcu::Maybe<eglu::Error>&        m_error;
+};
+
+class ThreadCleanUpTest : public TestCase
+{
+public:
+       enum ContextType
+       {
+               CONTEXTTYPE_SINGLE = 0,
+               CONTEXTTYPE_MULTI
+       };
+
+       enum SurfaceType
+       {
+               SURFACETYPE_SINGLE = 0,
+               SURFACETYPE_MULTI
+       };
+
+       static std::string testCaseName (ContextType contextType, SurfaceType surfaceType)
+       {
+               std::string name;
+
+               if (contextType == CONTEXTTYPE_SINGLE)
+                       name += "single_context_";
+               else
+                       name += "multi_context_";
+
+               if (surfaceType ==SURFACETYPE_SINGLE)
+                       name += "single_surface";
+               else
+                       name += "multi_surface";
+
+               return name;
+       }
+
+
+       ThreadCleanUpTest (EglTestContext& eglTestCtx, ContextType contextType, SurfaceType surfaceType)
+               : TestCase                      (eglTestCtx, testCaseName(contextType, surfaceType).c_str(), "Simple thread context clean up test")
+               , m_contextType         (contextType)
+               , m_surfaceType         (surfaceType)
+               , m_iterCount           (250)
+               , m_iterNdx                     (0)
+               , m_display                     (EGL_NO_DISPLAY)
+               , m_config                      (0)
+               , m_surface                     (EGL_NO_SURFACE)
+       {
+       }
+
+       ~ThreadCleanUpTest (void)
+       {
+               deinit();
+       }
+
+       void init (void)
+       {
+               const Library&  egl     = m_eglTestCtx.getLibrary();
+
+               m_display = eglu::getAndInitDisplay(m_eglTestCtx.getNativeDisplay());
+
+               {
+                       eglu::FilterList filters;
+                       filters << isES2Renderable << isPBuffer;
+                       m_config = eglu::chooseSingleConfig(egl, m_display, filters);
+               }
+
+               if (m_contextType == CONTEXTTYPE_SINGLE)
+               {
+                       const EGLint    attribList[] =
+                       {
+                               EGL_CONTEXT_CLIENT_VERSION, 2,
+                               EGL_NONE
+                       };
+
+                       egl.bindAPI(EGL_OPENGL_ES_API);
+
+                       m_context = egl.createContext(m_display, m_config, EGL_NO_CONTEXT, attribList);
+                       EGLU_CHECK_MSG(egl, "Failed to create context");
+               }
+
+               if (m_surfaceType == SURFACETYPE_SINGLE)
+               {
+                       const EGLint attribs[] =
+                       {
+                               EGL_WIDTH, 32,
+                               EGL_HEIGHT, 32,
+                               EGL_NONE
+                       };
+
+                       m_surface = egl.createPbufferSurface(m_display, m_config, attribs);
+                       EGLU_CHECK_MSG(egl, "Failed to create surface");
+               }
+       }
+
+       void deinit (void)
+       {
+               const Library& egl = m_eglTestCtx.getLibrary();
+
+               if (m_surface != EGL_NO_SURFACE)
+               {
+                       egl.destroySurface(m_display, m_surface);
+                       m_surface = EGL_NO_SURFACE;
+               }
+
+               if (m_context != EGL_NO_CONTEXT)
+               {
+                       egl.destroyContext(m_display, m_context);
+                       m_context = EGL_NO_CONTEXT;
+               }
+
+               if (m_display != EGL_NO_DISPLAY)
+               {
+                       egl.terminate(m_display);
+                       m_display = EGL_NO_DISPLAY;
+               }
+       }
+
+       IterateResult iterate (void)
+       {
+               if (m_iterNdx < m_iterCount)
+               {
+                       tcu::Maybe<eglu::Error> error;
+
+                       Thread thread (m_eglTestCtx.getLibrary(), m_display, m_surface, m_context, m_config, error);
+
+                       thread.start();
+                       thread.join();
+
+                       if (error)
+                       {
+                               m_testCtx.getLog() << TestLog::Message << "Failed. Got error: " << error->getMessage() << TestLog::EndMessage;
+                               m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, error->getMessage());
+                               return STOP;
+                       }
+
+                       m_iterNdx++;
+                       return CONTINUE;
+               }
+               else
+               {
+                       m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
+                       return STOP;
+               }
+       }
+
+private:
+       const ContextType       m_contextType;
+       const SurfaceType       m_surfaceType;
+       const size_t            m_iterCount;
+       size_t                          m_iterNdx;
+       EGLDisplay                      m_display;
+       EGLConfig                       m_config;
+       EGLSurface                      m_surface;
+       EGLContext                      m_context;
+};
+
+} // anonymous
+
+TestCaseGroup* createThreadCleanUpTest (EglTestContext& eglTestCtx)
+{
+       de::MovePtr<TestCaseGroup> group (new TestCaseGroup(eglTestCtx, "thread_cleanup", "Thread cleanup tests"));
+
+       group->addChild(new ThreadCleanUpTest(eglTestCtx, ThreadCleanUpTest::CONTEXTTYPE_SINGLE,        ThreadCleanUpTest::SURFACETYPE_SINGLE));
+       group->addChild(new ThreadCleanUpTest(eglTestCtx, ThreadCleanUpTest::CONTEXTTYPE_MULTI,         ThreadCleanUpTest::SURFACETYPE_SINGLE));
+
+       group->addChild(new ThreadCleanUpTest(eglTestCtx, ThreadCleanUpTest::CONTEXTTYPE_SINGLE,        ThreadCleanUpTest::SURFACETYPE_MULTI));
+       group->addChild(new ThreadCleanUpTest(eglTestCtx, ThreadCleanUpTest::CONTEXTTYPE_MULTI,         ThreadCleanUpTest::SURFACETYPE_MULTI));
+
+       return group.release();
+}
+
+} // egl
+} // deqp
diff --git a/modules/egl/teglThreadCleanUpTests.hpp b/modules/egl/teglThreadCleanUpTests.hpp
new file mode 100644 (file)
index 0000000..2175735
--- /dev/null
@@ -0,0 +1,39 @@
+#ifndef _TEGLTHREADCLEANUPTESTS_HPP
+#define _TEGLTHREADCLEANUPTESTS_HPP
+/*-------------------------------------------------------------------------
+ * drawElements Quality Program EGL Module
+ * ---------------------------------------
+ *
+ * Copyright 2016 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 EGL thread clean up tests
+ *//*--------------------------------------------------------------------*/
+
+#include "tcuDefs.hpp"
+#include "teglTestCase.hpp"
+
+namespace deqp
+{
+namespace egl
+{
+
+TestCaseGroup* createThreadCleanUpTest (EglTestContext& eglTestCtx);
+
+} // egl
+} // deqp
+
+#endif // _TEGLTHREADCLEANUPTESTS_HPP
index 738d67b..34714ba 100644 (file)
@@ -798,7 +798,8 @@ void NegativeVertexArrayApiTests::init (void)
                        GLuint fbo;
                        GLuint buf;
                        GLuint tfID;
-                       GLfloat vertices[1];
+                       deUint32 vertices[1];
+                       vertices[0] = 0xffffffffu;
 
                        m_log << tcu::TestLog::Section("", "GL_INVALID_ENUM is generated if mode is not an accepted value.");
                        glDrawRangeElements(-1, 0, 1, 1, GL_UNSIGNED_BYTE, vertices);
@@ -836,6 +837,8 @@ void NegativeVertexArrayApiTests::init (void)
                        {
                                m_log << tcu::TestLog::Section("", "GL_INVALID_OPERATION is generated if transform feedback is active and not paused.");
                                const char* tfVarying           = "gl_Position";
+                               deUint32 verticesInRange[1];
+                               verticesInRange[0]                      = 0;
 
                                glGenBuffers                            (1, &buf);
                                glGenTransformFeedbacks         (1, &tfID);
@@ -854,7 +857,7 @@ void NegativeVertexArrayApiTests::init (void)
                                expectError                                     (GL_INVALID_OPERATION);
 
                                glPauseTransformFeedback();
-                               glDrawRangeElements                     (GL_POINTS, 0, 1, 1, GL_UNSIGNED_BYTE, vertices);
+                               glDrawRangeElements                     (GL_POINTS, 0, 1, 1, GL_UNSIGNED_BYTE, verticesInRange);
                                expectError                                     (GL_NO_ERROR);
 
                                glEndTransformFeedback          ();
@@ -870,7 +873,8 @@ void NegativeVertexArrayApiTests::init (void)
                {
                        glUseProgram(0);
                        GLuint fbo;
-                       GLfloat vertices[1];
+                       deUint32 vertices[1];
+                       vertices[0] = 0xffffffffu;
 
                        m_log << tcu::TestLog::Section("", "GL_INVALID_ENUM is generated if mode is not an accepted value.");
                        glDrawRangeElements(-1, 0, 1, 1, GL_UNSIGNED_BYTE, vertices);
@@ -911,7 +915,8 @@ void NegativeVertexArrayApiTests::init (void)
                        GLuint fbo;
                        GLuint buf;
                        GLuint tfID;
-                       GLfloat vertices[1];
+                       deUint32 vertices[1];
+                       vertices[0] = 0xffffffffu;
 
                        m_log << tcu::TestLog::Section("", "GL_INVALID_ENUM is generated if mode is not an accepted value.");
                        glDrawRangeElements(-1, 0, 1, 1, GL_UNSIGNED_BYTE, vertices);
@@ -949,6 +954,8 @@ void NegativeVertexArrayApiTests::init (void)
                        {
                                m_log << tcu::TestLog::Section("", "GL_INVALID_OPERATION is generated if transform feedback is active and not paused.");
                                const char* tfVarying           = "gl_Position";
+                               deUint32 verticesInRange[1];
+                               verticesInRange[0]                      = 0;
 
                                glGenBuffers                            (1, &buf);
                                glGenTransformFeedbacks         (1, &tfID);
@@ -967,7 +974,7 @@ void NegativeVertexArrayApiTests::init (void)
                                expectError                                     (GL_INVALID_OPERATION);
 
                                glPauseTransformFeedback();
-                               glDrawRangeElements                     (GL_TRIANGLES, 0, 1, 1, GL_UNSIGNED_BYTE, vertices);
+                               glDrawRangeElements                     (GL_TRIANGLES, 0, 1, 1, GL_UNSIGNED_BYTE, verticesInRange);
                                expectError                                     (GL_NO_ERROR);
 
                                glEndTransformFeedback          ();
index a20da2c..3fae7b5 100644 (file)
@@ -201,7 +201,8 @@ MNC_GLES31_PKG                                      = Package(module = GLES31_MODULE, configurations = [
 
 MASTER_EGL_COMMON_FILTERS              = [include("egl-master.txt"),
                                                                   exclude("egl-test-issues.txt"),
-                                                                  exclude("egl-internal-api-tests.txt")]
+                                                                  exclude("egl-internal-api-tests.txt"),
+                                                                  exclude("egl-new-tests.txt")]
 MASTER_EGL_PKG                                 = Package(module = EGL_MODULE, configurations = [
                # Master
                Configuration(name                      = "master",
index 64690dd..a4e7b67 100644 (file)
@@ -39,8 +39,8 @@ EGL_WRAPPER_DIR               = os.path.normpath(os.path.join(EGL_DIR, "wrapper"))
 
 EGL_SOURCE                     = khr_util.registry_cache.RegistrySource(
                                                "egl.xml",
-                                               31042,
-                                               "f5a731f46958a7cb6a5a96c811086fbaede9cc078541a26de009228eb089ae2c")
+                                               32725,
+                                               "3464385212ae9b816d121c77bc4191ed3dfb32ce7bfca1a02b42fcefa3ec2354")
 
 VERSION                                = '1.5'
 
@@ -63,7 +63,8 @@ EXTENSIONS                    = [
        "EGL_EXT_yuv_surface",
        "EGL_EXT_buffer_age",
        "EGL_KHR_partial_update",
-       "EGL_KHR_swap_buffers_with_damage"
+       "EGL_KHR_swap_buffers_with_damage",
+       "EGL_KHR_mutable_render_buffer"
 ]
 PROTECTS                       = [
        "KHRONOS_SUPPORT_INT64"