Merge aosp/master into gerrit/vulkan-cts-1.0-dev
authorPyry Haulos <phaulos@google.com>
Thu, 5 Jan 2017 18:04:19 +0000 (10:04 -0800)
committerPyry Haulos <phaulos@google.com>
Thu, 5 Jan 2017 18:04:19 +0000 (10:04 -0800)
Change-Id: I6d61156e336937d8c2f534a410b6f2a92987f037

44 files changed:
Android.mk
android/cts/master/egl-master.txt
android/cts/master/gles31-master.txt
android/cts/master/src/gles31-test-issues.txt
android/cts/runner/src/com/drawelements/deqp/runner/DeqpTestRunner.java
android/scripts/common.py
android/scripts/install.py
external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp
framework/egl/egluCallLogWrapper.inl
framework/egl/egluCallLogWrapperApi.inl
framework/egl/egluConfigFilter.cpp
framework/egl/egluConfigFilter.hpp
framework/egl/egluConfigInfo.cpp
framework/egl/egluConfigInfo.hpp
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
modules/egl/teglChooseConfigReference.cpp
modules/egl/teglGetProcAddressTests.inl
modules/egl/teglRenderCase.cpp
modules/egl/teglSimpleConfigCase.cpp
modules/gles3/performance/es3pBufferDataUploadTests.cpp
modules/gles31/functional/CMakeLists.txt
modules/gles31/functional/es31fCopyImageTests.cpp
modules/gles31/functional/es31fDebugTests.cpp
modules/gles31/functional/es31fNegativeBufferApiTests.cpp
modules/gles31/functional/es31fNegativeShaderApiTests.cpp
modules/gles31/functional/es31fNegativeShaderDirectiveTests.cpp
modules/gles31/functional/es31fNegativeShaderStorageTests.cpp [new file with mode: 0644]
modules/gles31/functional/es31fNegativeShaderStorageTests.hpp [new file with mode: 0644]
modules/gles31/functional/es31fNegativeStateApiTests.cpp
modules/gles31/functional/es31fTessellationTests.cpp
modules/glshared/glsFboCompletenessTests.cpp
scripts/egl/common.py
scripts/egl/str_util.py

index 253f085..52c027d 100644 (file)
@@ -589,6 +589,7 @@ LOCAL_SRC_FILES := \
        modules/gles31/functional/es31fNegativeShaderDirectiveTests.cpp \
        modules/gles31/functional/es31fNegativeShaderFunctionTests.cpp \
        modules/gles31/functional/es31fNegativeShaderImageLoadStoreTests.cpp \
+       modules/gles31/functional/es31fNegativeShaderStorageTests.cpp \
        modules/gles31/functional/es31fNegativeStateApiTests.cpp \
        modules/gles31/functional/es31fNegativeTestShared.cpp \
        modules/gles31/functional/es31fNegativeTextureApiTests.cpp \
index 74f28a9..60e5a14 100644 (file)
@@ -2364,11 +2364,14 @@ dEQP-EGL.functional.multithread.pbuffer_context
 dEQP-EGL.functional.multithread.single_window_context
 dEQP-EGL.functional.multithread.pbuffer_single_window_context
 dEQP-EGL.functional.get_proc_address.extension.egl_android_blob_cache
+dEQP-EGL.functional.get_proc_address.extension.egl_android_create_native_client_buffer
 dEQP-EGL.functional.get_proc_address.extension.egl_android_native_fence_sync
+dEQP-EGL.functional.get_proc_address.extension.egl_android_presentation_time
 dEQP-EGL.functional.get_proc_address.extension.egl_angle_query_surface_pointer
 dEQP-EGL.functional.get_proc_address.extension.egl_ext_device_base
 dEQP-EGL.functional.get_proc_address.extension.egl_ext_device_enumeration
 dEQP-EGL.functional.get_proc_address.extension.egl_ext_device_query
+dEQP-EGL.functional.get_proc_address.extension.egl_ext_image_dma_buf_import_modifiers
 dEQP-EGL.functional.get_proc_address.extension.egl_ext_output_base
 dEQP-EGL.functional.get_proc_address.extension.egl_ext_platform_base
 dEQP-EGL.functional.get_proc_address.extension.egl_ext_stream_consumer_egloutput
@@ -2384,6 +2387,7 @@ dEQP-EGL.functional.get_proc_address.extension.egl_khr_lock_surface3
 dEQP-EGL.functional.get_proc_address.extension.egl_khr_partial_update
 dEQP-EGL.functional.get_proc_address.extension.egl_khr_reusable_sync
 dEQP-EGL.functional.get_proc_address.extension.egl_khr_stream
+dEQP-EGL.functional.get_proc_address.extension.egl_khr_stream_attrib
 dEQP-EGL.functional.get_proc_address.extension.egl_khr_stream_consumer_gltexture
 dEQP-EGL.functional.get_proc_address.extension.egl_khr_stream_cross_process_fd
 dEQP-EGL.functional.get_proc_address.extension.egl_khr_stream_fifo
@@ -2398,6 +2402,7 @@ 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_reset
 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
index 8204cb8..7671af2 100644 (file)
@@ -15875,7 +15875,6 @@ dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_explicit_loca
 dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_implicit_explicit_location_1
 dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_implicit_explicit_location_2
 dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_implicit_explicit_location_3
-dEQP-GLES31.functional.separate_shader.validation.varying.match_different_struct_names
 dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_struct_member_name
 dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_struct_member_type
 dEQP-GLES31.functional.separate_shader.validation.varying.mismatch_struct_member_precision
@@ -15897,7 +15896,6 @@ dEQP-GLES31.functional.separate_shader.validation.io_blocks.mismatch_member_name
 dEQP-GLES31.functional.separate_shader.validation.io_blocks.mismatch_member_precision
 dEQP-GLES31.functional.separate_shader.validation.io_blocks.mismatch_different_member_interpolation
 dEQP-GLES31.functional.separate_shader.validation.io_blocks.mismatch_member_array_size
-dEQP-GLES31.functional.separate_shader.validation.io_blocks.match_different_member_struct_names
 dEQP-GLES31.functional.separate_shader.validation.io_blocks.mismatch_member_struct_member_name
 dEQP-GLES31.functional.separate_shader.validation.io_blocks.mismatch_member_struct_member_type
 dEQP-GLES31.functional.separate_shader.validation.io_blocks.mismatch_member_struct_member_precision
@@ -16763,6 +16761,8 @@ dEQP-GLES31.functional.debug.negative_coverage.callbacks.precise.precise_as_func
 dEQP-GLES31.functional.debug.negative_coverage.callbacks.precise.precise_as_function_argument
 dEQP-GLES31.functional.debug.negative_coverage.callbacks.advanced_blend.blend_qualifier_mismatch
 dEQP-GLES31.functional.debug.negative_coverage.callbacks.advanced_blend.attachment_advanced_equation
+dEQP-GLES31.functional.debug.negative_coverage.callbacks.shader_storage.block_number_limits
+dEQP-GLES31.functional.debug.negative_coverage.callbacks.shader_storage.max_combined_block_number_limit
 dEQP-GLES31.functional.debug.negative_coverage.log.buffer.bind_buffer
 dEQP-GLES31.functional.debug.negative_coverage.log.buffer.delete_buffers
 dEQP-GLES31.functional.debug.negative_coverage.log.buffer.gen_buffers
@@ -17209,6 +17209,8 @@ dEQP-GLES31.functional.debug.negative_coverage.log.precise.precise_as_function_n
 dEQP-GLES31.functional.debug.negative_coverage.log.precise.precise_as_function_argument
 dEQP-GLES31.functional.debug.negative_coverage.log.advanced_blend.blend_qualifier_mismatch
 dEQP-GLES31.functional.debug.negative_coverage.log.advanced_blend.attachment_advanced_equation
+dEQP-GLES31.functional.debug.negative_coverage.log.shader_storage.block_number_limits
+dEQP-GLES31.functional.debug.negative_coverage.log.shader_storage.max_combined_block_number_limit
 dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.bind_buffer
 dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.delete_buffers
 dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.gen_buffers
@@ -17653,6 +17655,8 @@ dEQP-GLES31.functional.debug.negative_coverage.get_error.precise.precise_as_func
 dEQP-GLES31.functional.debug.negative_coverage.get_error.precise.precise_as_function_argument
 dEQP-GLES31.functional.debug.negative_coverage.get_error.advanced_blend.blend_qualifier_mismatch
 dEQP-GLES31.functional.debug.negative_coverage.get_error.advanced_blend.attachment_advanced_equation
+dEQP-GLES31.functional.debug.negative_coverage.get_error.shader_storage.block_number_limits
+dEQP-GLES31.functional.debug.negative_coverage.get_error.shader_storage.max_combined_block_number_limit
 dEQP-GLES31.functional.debug.externally_generated.application_messages
 dEQP-GLES31.functional.debug.externally_generated.third_party_messages
 dEQP-GLES31.functional.debug.externally_generated.push_pop_stack
index 545ba85..f391068 100644 (file)
@@ -49,3 +49,7 @@ dEQP-GLES31.functional.shaders.builtin_functions.precision.reflect.lowp_compute.
 dEQP-GLES31.functional.shaders.builtin_functions.precision.reflect.mediump_compute.vec3
 dEQP-GLES31.functional.shaders.builtin_functions.precision.reflect.mediump_compute.vec4
 dEQP-GLES31.functional.shaders.builtin_functions.precision.reflect.highp_compute.vec3
+
+# Bug 33457655
+dEQP-GLES31.functional.separate_shader.validation.varying.match_different_struct_names
+dEQP-GLES31.functional.separate_shader.validation.io_blocks.match_different_member_struct_names
index cbcec16..465d2da 100644 (file)
@@ -2116,6 +2116,7 @@ public class DeqpTestRunner implements IBuildReceiver, IDeviceTest,
         destination.mExcludeFilters = new ArrayList<>(source.mExcludeFilters);
         destination.mAbi = source.mAbi;
         destination.mLogData = source.mLogData;
+        destination.mCollectTestsOnly = source.mCollectTestsOnly;
     }
 
     /**
index 16b5276..87aad8a 100644 (file)
@@ -110,7 +110,7 @@ def execArgs (args):
        if retcode != 0:
                raise Exception("Failed to execute '%s', got %d" % (str(args), retcode))
 
-def execArgsInDirectory (args, cwd, linePrefix=""):
+def execArgsInDirectory (args, cwd, linePrefix="", failOnNonZeroExit=True):
 
        def readApplyPrefixAndPrint (source, prefix, sink):
                while True:
@@ -125,7 +125,7 @@ def execArgsInDirectory (args, cwd, linePrefix=""):
        stdoutJob.start()
        stderrJob.start()
        retcode = process.wait()
-       if retcode != 0:
+       if failOnNonZeroExit and retcode != 0:
                raise Exception("Failed to execute '%s', got %d" % (str(args), retcode))
 
 def serialApply(f, argsList):
@@ -173,7 +173,7 @@ def getDevices (adb):
        if proc.returncode != 0:
                raise Exception("adb devices -l failed, got %d" % proc.returncode)
 
-       ptrn = re.compile(r'^([a-zA-Z0-9:]+)\s+.*product:([^\s]+)\s+model:([^\s]+)\s+device:([^\s]+)')
+       ptrn = re.compile(r'^([a-zA-Z0-9\.:]+)\s+.*product:([^\s]+)\s+model:([^\s]+)\s+device:([^\s]+)')
        devices = []
        for line in stdout.splitlines()[1:]:
                if len(line.strip()) == 0:
index 6c9ff0f..5545cbb 100644 (file)
@@ -33,7 +33,7 @@ def install (buildRoot, extraArgs = [], printPrefix=""):
        common.execArgsInDirectory([common.ADB_BIN] + extraArgs + [
                        'uninstall',
                        'com.drawelements.deqp'
-               ], buildRoot, printPrefix)
+               ], buildRoot, printPrefix, failOnNonZeroExit=False)
        print printPrefix + "Remove complete\n",
 
        print printPrefix + "Installing dEQP Package from %s...\n" %(buildRoot),
index 1d91d11..6b89474 100644 (file)
@@ -2022,12 +2022,28 @@ tcu::TestStatus imageFormatProperties (Context& context, ImageFormatPropertyCase
                                results.check(imageType != VK_IMAGE_TYPE_3D || (properties.maxExtent.width >= 1 && properties.maxExtent.height >= 1 && properties.maxExtent.depth >= 1), "Invalid dimensions for 3D image");
                                results.check(imageType != VK_IMAGE_TYPE_3D || properties.maxArrayLayers == 1, "Invalid maxArrayLayers for 3D image");
 
-                               if (tiling == VK_IMAGE_TILING_OPTIMAL && imageType == VK_IMAGE_TYPE_2D && !(curCreateFlags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT) &&
-                                        ((supportedFeatures & (VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT)) ||
-                                        ((supportedFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT) && deviceFeatures.shaderStorageImageMultisample)))
+                               if (tiling == VK_IMAGE_TILING_OPTIMAL)
                                {
-                                       const VkSampleCountFlags        requiredSampleCounts    = getRequiredOptimalTilingSampleCounts(deviceLimits, format, curUsageFlags);
-                                       results.check((properties.sampleCounts & requiredSampleCounts) == requiredSampleCounts, "Required sample counts not supported");
+                                       // Vulkan API specification has changed since initial Android Nougat release.
+                                       // For NYC CTS we need to tolerate old behavior as well and issue compatibility
+                                       // warning instead.
+                                       //
+                                       // See spec issues 272, 282, 302, 445 and CTS issues 369, 440.
+                                       const bool      requiredByNewSpec       = (imageType == VK_IMAGE_TYPE_2D && !(curCreateFlags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT) &&
+                                                                                                         ((supportedFeatures & (VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT)) ||
+                                                                                                         ((supportedFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT) && deviceFeatures.shaderStorageImageMultisample)));
+
+                                       if (requiredByNewSpec)
+                                       {
+                                               const VkSampleCountFlags        requiredSampleCounts    = getRequiredOptimalTilingSampleCounts(deviceLimits, format, curUsageFlags);
+
+                                               results.check((properties.sampleCounts & requiredSampleCounts) == requiredSampleCounts, "Required sample counts not supported");
+                                       }
+                                       else if (properties.sampleCounts != VK_SAMPLE_COUNT_1_BIT)
+                                       {
+                                               results.addResult(QP_TEST_RESULT_COMPATIBILITY_WARNING,
+                                                                             "Implementation supports more sample counts than allowed by the spec");
+                                       }
                                }
                                else
                                        results.check(properties.sampleCounts == VK_SAMPLE_COUNT_1_BIT, "sampleCounts != VK_SAMPLE_COUNT_1_BIT");
index 57041bd..ee49459 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 32725.
+ * Generated from Khronos EGL API description (egl.xml) revision 33315.
  */
 
 eglw::EGLBoolean CallLogWrapper::eglBindAPI (eglw::EGLenum api)
index 69be6e9..99df24b 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 32725.
+ * Generated from Khronos EGL API description (egl.xml) revision 33315.
  */
 eglw::EGLBoolean                                                               eglBindAPI                                                      (eglw::EGLenum api);
 eglw::EGLBoolean                                                               eglBindTexImage                                         (eglw::EGLDisplay dpy, eglw::EGLSurface surface, eglw::EGLint buffer);
index c6d06ad..bd1a5c7 100644 (file)
@@ -25,6 +25,7 @@
 #include "egluUtil.hpp"
 #include "egluConfigInfo.hpp"
 #include "eglwEnums.hpp"
+#include "deSTLUtil.hpp"
 
 #include <algorithm>
 
@@ -55,19 +56,32 @@ int CandidateConfig::get (deUint32 attrib) const
        if (m_type == TYPE_CONFIG_INFO)
                return m_cfg.configInfo->getAttribute(attrib);
        else
-               return getConfigAttribInt(*m_cfg.object.egl, m_cfg.object.display, m_cfg.object.config, attrib);
+       {
+               if (attrib == EGL_COLOR_COMPONENT_TYPE_EXT)
+               {
+                       const std::vector<std::string>  extensions      = getDisplayExtensions(*m_cfg.object.egl, m_cfg.object.display);
+
+                       if (de::contains(extensions.begin(), extensions.end(), "EGL_EXT_pixel_format_float"))
+                               return getConfigAttribInt(*m_cfg.object.egl, m_cfg.object.display, m_cfg.object.config, attrib);
+                       else
+                               return EGL_COLOR_COMPONENT_TYPE_FIXED_EXT;
+               }
+               else
+                       return getConfigAttribInt(*m_cfg.object.egl, m_cfg.object.display, m_cfg.object.config, attrib);
+       }
 }
 
-int                    CandidateConfig::id                             (void) const { return get(EGL_CONFIG_ID);                                       }
-int                    CandidateConfig::redSize                (void) const { return get(EGL_RED_SIZE);                                        }
-int                    CandidateConfig::greenSize              (void) const { return get(EGL_GREEN_SIZE);                                      }
-int                    CandidateConfig::blueSize               (void) const { return get(EGL_BLUE_SIZE);                                       }
-int                    CandidateConfig::alphaSize              (void) const { return get(EGL_ALPHA_SIZE);                                      }
-int                    CandidateConfig::depthSize              (void) const { return get(EGL_DEPTH_SIZE);                                      }
-int                    CandidateConfig::stencilSize    (void) const { return get(EGL_STENCIL_SIZE);                            }
-int                    CandidateConfig::samples                (void) const { return get(EGL_SAMPLES);                                         }
-deUint32       CandidateConfig::renderableType (void) const { return (deUint32)get(EGL_RENDERABLE_TYPE);       }
-deUint32       CandidateConfig::surfaceType    (void) const { return (deUint32)get(EGL_SURFACE_TYPE);          }
+int                    CandidateConfig::id                                     (void) const { return get(EGL_CONFIG_ID);                                                       }
+int                    CandidateConfig::redSize                        (void) const { return get(EGL_RED_SIZE);                                                        }
+int                    CandidateConfig::greenSize                      (void) const { return get(EGL_GREEN_SIZE);                                                      }
+int                    CandidateConfig::blueSize                       (void) const { return get(EGL_BLUE_SIZE);                                                       }
+int                    CandidateConfig::alphaSize                      (void) const { return get(EGL_ALPHA_SIZE);                                                      }
+int                    CandidateConfig::depthSize                      (void) const { return get(EGL_DEPTH_SIZE);                                                      }
+int                    CandidateConfig::stencilSize            (void) const { return get(EGL_STENCIL_SIZE);                                            }
+int                    CandidateConfig::samples                        (void) const { return get(EGL_SAMPLES);                                                         }
+deUint32       CandidateConfig::renderableType         (void) const { return (deUint32)get(EGL_RENDERABLE_TYPE);                       }
+deUint32       CandidateConfig::surfaceType            (void) const { return (deUint32)get(EGL_SURFACE_TYPE);                          }
+deUint32       CandidateConfig::colorComponentType     (void) const { return (deUint32)get(EGL_COLOR_COMPONENT_TYPE_EXT);      }
 
 FilterList& FilterList::operator<< (ConfigFilter filter)
 {
index 2f316fe..baddad5 100644 (file)
@@ -59,6 +59,7 @@ public:
 
        deUint32                renderableType          (void) const;
        deUint32                surfaceType                     (void) const;
+       deUint32                colorComponentType      (void) const;
 
        tcu::RGBA               colorBits                       (void) const { return tcu::RGBA(redSize(), greenSize(), blueSize(), alphaSize());       }
 
index aed08f3..ab6081c 100644 (file)
@@ -77,6 +77,9 @@ deInt32 ConfigInfo::getAttribute (deUint32 attribute) const
                case EGL_YUV_CSC_STANDARD_EXT:          return yuvCscStandard;
                case EGL_YUV_PLANE_BPP_EXT:                     return yuvPlaneBpp;
 
+               // EGL_EXT_pixel_format_float
+               case EGL_COLOR_COMPONENT_TYPE_EXT:      return colorComponentType;
+
                default:                                                        TCU_THROW(InternalError, "Unknown attribute");
        }
 }
@@ -132,6 +135,15 @@ void queryExtConfigInfo (const eglw::Library& egl, eglw::EGLDisplay display, egl
 
                EGLU_CHECK_MSG(egl, "Failed to query EGL_EXT_yuv_surface config attribs");
        }
+
+       if (de::contains(extensions.begin(), extensions.end(), "EGL_EXT_pixel_format_float"))
+       {
+               egl.getConfigAttrib(display, config, EGL_COLOR_COMPONENT_TYPE_EXT,      (EGLint*)&dst->colorComponentType);
+
+               EGLU_CHECK_MSG(egl, "Failed to query EGL_EXT_pixel_format_float config attribs");
+       }
+       else
+               dst->colorComponentType = EGL_COLOR_COMPONENT_TYPE_FIXED_EXT;
 }
 
 } // eglu
index 356c50a..2c0ae24 100644 (file)
@@ -81,6 +81,9 @@ public:
        deUint32                yuvCscStandard;
        deInt32                 yuvPlaneBpp;
 
+       // EGL_EXT_pixel_format_float
+       deUint32                colorComponentType;
+
        ConfigInfo (void)
                : bufferSize                    (0)
                , redSize                               (0)
@@ -119,6 +122,7 @@ public:
                , yuvDepthRange                 (EGL_NONE)
                , yuvCscStandard                (EGL_NONE)
                , yuvPlaneBpp                   (EGL_YUV_PLANE_BPP_0_EXT)
+               , colorComponentType    (EGL_NONE)
        {
        }
 
index 297a00c..d01e55b 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 32725.
+ * Generated from Khronos EGL API description (egl.xml) revision 33315.
  */
 
 const char* getBooleanName (int value)
@@ -159,6 +159,16 @@ const char* getYuvPlaneBppName (int value)
        }
 }
 
+const char* getColorComponentTypeName (int value)
+{
+       switch (value)
+       {
+               case EGL_COLOR_COMPONENT_TYPE_FIXED_EXT:        return "EGL_COLOR_COMPONENT_TYPE_FIXED_EXT";
+               case EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT:        return "EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT";
+               default:                                                                        return DE_NULL;
+       }
+}
+
 const char* getSurfaceTargetName (int value)
 {
        switch (value)
index fc2093f..839837f 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 32725.
+ * Generated from Khronos EGL API description (egl.xml) revision 33315.
  */
 const char*                                                    getBooleanName                          (int value);
 const char*                                                    getBoolDontCareName                     (int value);
@@ -12,6 +12,7 @@ const char*                                                   getConfigAttribName                     (int value);
 const char*                                                    getSurfaceAttribName            (int value);
 const char*                                                    getYuvOrderName                         (int value);
 const char*                                                    getYuvPlaneBppName                      (int value);
+const char*                                                    getColorComponentTypeName       (int value);
 const char*                                                    getSurfaceTargetName            (int value);
 const char*                                                    getColorBufferTypeName          (int value);
 const char*                                                    getConfigCaveatName                     (int value);
@@ -34,6 +35,7 @@ inline tcu::Format::Enum<int, 2>      getConfigAttribStr                      (int value)             { return tcu:
 inline tcu::Format::Enum<int, 2>       getSurfaceAttribStr                     (int value)             { return tcu::Format::Enum<int, 2>(getSurfaceAttribName, value); }
 inline tcu::Format::Enum<int, 2>       getYuvOrderStr                          (int value)             { return tcu::Format::Enum<int, 2>(getYuvOrderName, value); }
 inline tcu::Format::Enum<int, 2>       getYuvPlaneBppStr                       (int value)             { return tcu::Format::Enum<int, 2>(getYuvPlaneBppName, value); }
+inline tcu::Format::Enum<int, 2>       getColorComponentTypeStr        (int value)             { return tcu::Format::Enum<int, 2>(getColorComponentTypeName, value); }
 inline tcu::Format::Enum<int, 2>       getSurfaceTargetStr                     (int value)             { return tcu::Format::Enum<int, 2>(getSurfaceTargetName, value); }
 inline tcu::Format::Enum<int, 2>       getColorBufferTypeStr           (int value)             { return tcu::Format::Enum<int, 2>(getColorBufferTypeName, value); }
 inline tcu::Format::Enum<int, 2>       getConfigCaveatStr                      (int value)             { return tcu::Format::Enum<int, 2>(getConfigCaveatName, value); }
index bfa267d..edb58c5 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 32725.
+ * Generated from Khronos EGL API description (egl.xml) revision 33315.
  */
 #define EGL_PBUFFER_BIT                                                                                0x0001
 #define EGL_PIXMAP_BIT                                                                         0x0002
 #define EGL_YUV_PLANE_BPP_0_EXT                                                                0x331B
 #define EGL_YUV_PLANE_BPP_8_EXT                                                                0x331C
 #define EGL_YUV_PLANE_BPP_10_EXT                                                       0x331D
+#define EGL_COLOR_COMPONENT_TYPE_EXT                                           0x3339
+#define EGL_COLOR_COMPONENT_TYPE_FIXED_EXT                                     0x333A
+#define EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT                                     0x333B
index 353b6b2..e7d1327 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 32725.
+ * Generated from Khronos EGL API description (egl.xml) revision 33315.
  */
 EGLBoolean                                                                     bindAPI                                                 (EGLenum api) const;
 EGLBoolean                                                                     bindTexImage                                    (EGLDisplay dpy, EGLSurface surface, EGLint buffer) const;
index c1140a7..1678c71 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 32725.
+ * Generated from Khronos EGL API description (egl.xml) revision 33315.
  */
 
 EGLBoolean FuncPtrLibrary::bindAPI (EGLenum api) const
index b66bdfd..d57105e 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 32725.
+ * Generated from Khronos EGL API description (egl.xml) revision 33315.
  */
 typedef EGLW_APICALL EGLBoolean                                                                        (EGLW_APIENTRY* eglBindAPIFunc)                                                 (EGLenum api);
 typedef EGLW_APICALL EGLBoolean                                                                        (EGLW_APIENTRY* eglBindTexImageFunc)                                    (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
index 3f0ce29..af0d1b2 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 32725.
+ * Generated from Khronos EGL API description (egl.xml) revision 33315.
  */
 eglBindAPIFunc                                                 bindAPI;
 eglBindTexImageFunc                                            bindTexImage;
index b09f990..15f941d 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 32725.
+ * Generated from Khronos EGL API description (egl.xml) revision 33315.
  */
 dst->bindAPI                                           = (eglBindAPIFunc)                                                      loader->get("eglBindAPI");
 dst->bindTexImage                                      = (eglBindTexImageFunc)                                         loader->get("eglBindTexImage");
index 7ea82e4..90d00a1 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 32725.
+ * Generated from Khronos EGL API description (egl.xml) revision 33315.
  */
 dst->clientWaitSyncKHR                         = (eglClientWaitSyncKHRFunc)                            loader->get("eglClientWaitSyncKHR");
 dst->createImageKHR                                    = (eglCreateImageKHRFunc)                                       loader->get("eglCreateImageKHR");
index a9a42c8..a3d617d 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 32725.
+ * Generated from Khronos EGL API description (egl.xml) revision 33315.
  */
 virtual EGLBoolean                                                                     bindAPI                                                 (EGLenum api) const                                                                                                                                                                                             = 0;
 virtual EGLBoolean                                                                     bindTexImage                                    (EGLDisplay dpy, EGLSurface surface, EGLint buffer) const                                                                                                               = 0;
index d2d5ca0..22a2c5c 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 32725.
+ * Generated from Khronos EGL API description (egl.xml) revision 33315.
  */
        { "eglBindAPI",                                                 (deFunctionPtr)eglBindAPI },
        { "eglBindTexImage",                                    (deFunctionPtr)eglBindTexImage },
index c9fafeb..a44c589 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 32725.
+ * Generated from Khronos EGL API description (egl.xml) revision 33315.
  */
        { "eglBindAPI",                                                 (deFunctionPtr)eglBindAPI },
        { "eglBindTexImage",                                    (deFunctionPtr)eglBindTexImage },
index 50a2769..aab0156 100644 (file)
@@ -142,6 +142,17 @@ private:
                }
        }
 
+       static int getColorComponentTypeRank (EGLenum compType)
+       {
+               switch (compType)
+               {
+                       case EGL_COLOR_COMPONENT_TYPE_FIXED_EXT:        return 0;
+                       case EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT:        return 1;
+                       default:
+                               TCU_THROW(TestError, (std::string("Unknown color component type: ") + eglu::getColorComponentTypeStr(compType).toString()).c_str());
+               }
+       }
+
        typedef bool (*CompareFunc) (const SurfaceConfig& a, const SurfaceConfig& b);
 
        static bool compareCaveat (const SurfaceConfig& a, const SurfaceConfig& b)
@@ -159,6 +170,11 @@ private:
                return getYuvOrderRank((EGLenum)a.m_info.yuvOrder) < getYuvOrderRank((EGLenum)b.m_info.yuvOrder);
        }
 
+       static bool compareColorComponentType (const SurfaceConfig& a, const SurfaceConfig& b)
+       {
+               return getColorComponentTypeRank((EGLenum)a.m_info.colorComponentType) < getColorComponentTypeRank((EGLenum)b.m_info.colorComponentType);
+       }
+
        static bool compareColorBufferBits (const SurfaceConfig& a, const SurfaceConfig& b, const tcu::BVec4& specifiedRGBColors, const tcu::BVec2& specifiedLuminanceColors, bool yuvPlaneBppSpecified)
        {
                DE_ASSERT(a.m_info.colorBufferType == b.m_info.colorBufferType);
@@ -229,6 +245,7 @@ public:
                {
                        SurfaceConfig::compareCaveat,
                        SurfaceConfig::compareColorBufferType,
+                       SurfaceConfig::compareColorComponentType,
                        DE_NULL, // SurfaceConfig::compareColorBufferBits,
                        SurfaceConfig::compareAttributeSmaller<EGL_BUFFER_SIZE>,
                        SurfaceConfig::compareAttributeSmaller<EGL_SAMPLE_BUFFERS>,
@@ -307,6 +324,9 @@ public:
                rules[EGL_YUV_CSC_STANDARD_EXT]         = AttribRule(EGL_YUV_CSC_STANDARD_EXT,          EGL_DONT_CARE,          CRITERIA_EXACT,         SORTORDER_NONE);
                rules[EGL_YUV_PLANE_BPP_EXT]            = AttribRule(EGL_YUV_PLANE_BPP_EXT,                     EGL_DONT_CARE,          CRITERIA_AT_LEAST,      SORTORDER_SPECIAL);     //      3
 
+               // EGL_EXT_pixel_format_float
+               rules[EGL_COLOR_COMPONENT_TYPE_EXT]     = AttribRule(EGL_COLOR_COMPONENT_TYPE_EXT,      EGL_COLOR_COMPONENT_TYPE_FIXED_EXT,             CRITERIA_EXACT,         SORTORDER_SPECIAL);     //      2
+
                return rules;
        }
 private:
index 087ec0e..33fde9b 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 32725.
+ * Generated from Khronos EGL API description (egl.xml) revision 33315.
  */
 
 static const char* s_EGL14[] =
@@ -449,11 +449,21 @@ static const char* s_EGL_ANDROID_blob_cache[] =
        "eglSetBlobCacheFuncsANDROID",
 };
 
+static const char* s_EGL_ANDROID_create_native_client_buffer[] =
+{
+       "eglCreateNativeClientBufferANDROID",
+};
+
 static const char* s_EGL_ANDROID_native_fence_sync[] =
 {
        "eglDupNativeFenceFDANDROID",
 };
 
+static const char* s_EGL_ANDROID_presentation_time[] =
+{
+       "eglPresentationTimeANDROID",
+};
+
 static const char* s_EGL_ANGLE_query_surface_pointer[] =
 {
        "eglQuerySurfacePointerANGLE",
@@ -479,6 +489,12 @@ static const char* s_EGL_EXT_device_query[] =
        "eglQueryDisplayAttribEXT",
 };
 
+static const char* s_EGL_EXT_image_dma_buf_import_modifiers[] =
+{
+       "eglQueryDmaBufFormatsEXT",
+       "eglQueryDmaBufModifiersEXT",
+};
+
 static const char* s_EGL_EXT_output_base[] =
 {
        "eglGetOutputLayersEXT",
@@ -581,6 +597,15 @@ static const char* s_EGL_KHR_stream[] =
        "eglStreamAttribKHR",
 };
 
+static const char* s_EGL_KHR_stream_attrib[] =
+{
+       "eglCreateStreamAttribKHR",
+       "eglQueryStreamAttribKHR",
+       "eglSetStreamAttribKHR",
+       "eglStreamConsumerAcquireAttribKHR",
+       "eglStreamConsumerReleaseAttribKHR",
+};
+
 static const char* s_EGL_KHR_stream_consumer_gltexture[] =
 {
        "eglStreamConsumerAcquireKHR",
@@ -660,6 +685,11 @@ static const char* s_EGL_NV_stream_metadata[] =
        "eglSetStreamMetadataNV",
 };
 
+static const char* s_EGL_NV_stream_reset[] =
+{
+       "eglResetStreamNV",
+};
+
 static const char* s_EGL_NV_stream_sync[] =
 {
        "eglCreateStreamSyncNV",
@@ -1553,11 +1583,14 @@ static const struct
 } s_extensions[] =
 {
        { "EGL_ANDROID_blob_cache",                                                     DE_LENGTH_OF_ARRAY(s_EGL_ANDROID_blob_cache),                                           s_EGL_ANDROID_blob_cache                                                },
+       { "EGL_ANDROID_create_native_client_buffer",            DE_LENGTH_OF_ARRAY(s_EGL_ANDROID_create_native_client_buffer),          s_EGL_ANDROID_create_native_client_buffer               },
        { "EGL_ANDROID_native_fence_sync",                                      DE_LENGTH_OF_ARRAY(s_EGL_ANDROID_native_fence_sync),                            s_EGL_ANDROID_native_fence_sync                                 },
+       { "EGL_ANDROID_presentation_time",                                      DE_LENGTH_OF_ARRAY(s_EGL_ANDROID_presentation_time),                            s_EGL_ANDROID_presentation_time                                 },
        { "EGL_ANGLE_query_surface_pointer",                            DE_LENGTH_OF_ARRAY(s_EGL_ANGLE_query_surface_pointer),                          s_EGL_ANGLE_query_surface_pointer                               },
        { "EGL_EXT_device_base",                                                        DE_LENGTH_OF_ARRAY(s_EGL_EXT_device_base),                                                      s_EGL_EXT_device_base                                                   },
        { "EGL_EXT_device_enumeration",                                         DE_LENGTH_OF_ARRAY(s_EGL_EXT_device_enumeration),                                       s_EGL_EXT_device_enumeration                                    },
        { "EGL_EXT_device_query",                                                       DE_LENGTH_OF_ARRAY(s_EGL_EXT_device_query),                                                     s_EGL_EXT_device_query                                                  },
+       { "EGL_EXT_image_dma_buf_import_modifiers",                     DE_LENGTH_OF_ARRAY(s_EGL_EXT_image_dma_buf_import_modifiers),           s_EGL_EXT_image_dma_buf_import_modifiers                },
        { "EGL_EXT_output_base",                                                        DE_LENGTH_OF_ARRAY(s_EGL_EXT_output_base),                                                      s_EGL_EXT_output_base                                                   },
        { "EGL_EXT_platform_base",                                                      DE_LENGTH_OF_ARRAY(s_EGL_EXT_platform_base),                                            s_EGL_EXT_platform_base                                                 },
        { "EGL_EXT_stream_consumer_egloutput",                          DE_LENGTH_OF_ARRAY(s_EGL_EXT_stream_consumer_egloutput),                        s_EGL_EXT_stream_consumer_egloutput                             },
@@ -1573,6 +1606,7 @@ static const struct
        { "EGL_KHR_partial_update",                                                     DE_LENGTH_OF_ARRAY(s_EGL_KHR_partial_update),                                           s_EGL_KHR_partial_update                                                },
        { "EGL_KHR_reusable_sync",                                                      DE_LENGTH_OF_ARRAY(s_EGL_KHR_reusable_sync),                                            s_EGL_KHR_reusable_sync                                                 },
        { "EGL_KHR_stream",                                                                     DE_LENGTH_OF_ARRAY(s_EGL_KHR_stream),                                                           s_EGL_KHR_stream                                                                },
+       { "EGL_KHR_stream_attrib",                                                      DE_LENGTH_OF_ARRAY(s_EGL_KHR_stream_attrib),                                            s_EGL_KHR_stream_attrib                                                 },
        { "EGL_KHR_stream_consumer_gltexture",                          DE_LENGTH_OF_ARRAY(s_EGL_KHR_stream_consumer_gltexture),                        s_EGL_KHR_stream_consumer_gltexture                             },
        { "EGL_KHR_stream_cross_process_fd",                            DE_LENGTH_OF_ARRAY(s_EGL_KHR_stream_cross_process_fd),                          s_EGL_KHR_stream_cross_process_fd                               },
        { "EGL_KHR_stream_fifo",                                                        DE_LENGTH_OF_ARRAY(s_EGL_KHR_stream_fifo),                                                      s_EGL_KHR_stream_fifo                                                   },
@@ -1587,6 +1621,7 @@ static const struct
        { "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_reset",                                                        DE_LENGTH_OF_ARRAY(s_EGL_NV_stream_reset),                                                      s_EGL_NV_stream_reset                                                   },
        { "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                                                    },
index fc30091..a0ff8ae 100644 (file)
@@ -397,6 +397,11 @@ static bool isConformant (const eglu::CandidateConfig& c)
        return c.get(EGL_CONFIG_CAVEAT) != EGL_NON_CONFORMANT_CONFIG;
 }
 
+static bool notFloat (const eglu::CandidateConfig& c)
+{
+       return c.colorComponentType() != EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT;
+}
+
 void getDefaultRenderFilterLists (vector<RenderFilterList>& filterLists, const eglu::FilterList& baseFilters)
 {
        static const struct
@@ -450,7 +455,8 @@ void getDefaultRenderFilterLists (vector<RenderFilterList>& filterLists, const e
                                << notColorBits<4, 4, 4, 4>
                                << notColorBits<5, 5, 5, 1>
                                << notColorBits<8, 8, 8, 8>
-                               << isConformant;
+                               << isConformant
+                               << notFloat;
 
                filterLists.push_back(filters);
        }
index c528178..fc02455 100644 (file)
@@ -143,6 +143,11 @@ static bool isConformant (const eglu::CandidateConfig& c)
        return c.get(EGL_CONFIG_CAVEAT) != EGL_NON_CONFORMANT_CONFIG;
 }
 
+static bool notFloat (const eglu::CandidateConfig& c)
+{
+       return c.colorComponentType() != EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT;
+}
+
 void getDefaultFilterLists (vector<NamedFilterList>& lists, const FilterList& baseFilters)
 {
        static const struct
@@ -209,7 +214,8 @@ void getDefaultFilterLists (vector<NamedFilterList>& lists, const FilterList& ba
                                << notColorBits<4, 4, 4, 4>
                                << notColorBits<5, 5, 5, 1>
                                << notColorBits<8, 8, 8, 8>
-                               << isConformant;
+                               << isConformant
+                               << notFloat;
 
                lists.push_back(filters);
        }
index bcd79a5..b8de44d 100644 (file)
@@ -6018,7 +6018,7 @@ static float sumOfRanks (const std::vector<deUint64>& testSamples, const std::ve
 template <typename Comparer>
 static DistributionCompareResult distributionCompare (const std::vector<deUint64>& orderedObservationsA, const std::vector<deUint64>& orderedObservationsB, const Comparer& comparer)
 {
-       // Mann\96Whitney U test
+       // Mann-Whitney U test
 
        const int                               n1                      = (int)orderedObservationsA.size();
        const int                               n2                      = (int)orderedObservationsB.size();
index 1f57b59..db7a8b9 100644 (file)
@@ -173,6 +173,8 @@ set(DEQP_GLES31_FUNCTIONAL_SRCS
        es31fCopyImageTests.cpp
        es31fDrawBuffersIndexedTests.hpp
        es31fDrawBuffersIndexedTests.cpp
+       es31fNegativeShaderStorageTests.cpp
+       es31fNegativeShaderStorageTests.hpp
        )
 
 add_library(deqp-gles31-functional STATIC ${DEQP_GLES31_FUNCTIONAL_SRCS})
index b4e9642..fa66729 100644 (file)
@@ -2130,11 +2130,11 @@ void addCopyTests (TestCaseGroup* root, deUint32 srcFormat, deUint32 dstFormat)
 
                        const string    targetTestName  = string(targetToName(srcTarget)) + "_to_" + targetToName(dstTarget);
 
-                       const IVec3             targetSize2D    (128, 128, 1);
-                       const IVec3             targetSize3D    (128, 128, 16);
-
-                       const IVec3             srcSize                 = getTestedSize(srcTarget, srcFormat, (srcIs3D ? targetSize3D : targetSize2D));
-                       const IVec3             dstSize                 = getTestedSize(dstTarget, dstFormat, (dstIs3D ? targetSize3D : targetSize2D));
+                       // Compressed formats require more space to fit all block size combinations.
+                       const bool              isCompressedCase        = glu::isCompressedFormat(srcFormat) || glu::isCompressedFormat(dstFormat);
+                       const IVec3             targetSize                      = isCompressedCase ? IVec3(128, 128, 16) : IVec3(64, 64, 8);
+                       const IVec3             srcSize                         = getTestedSize(srcTarget, srcFormat, targetSize);
+                       const IVec3             dstSize                         = getTestedSize(dstTarget, dstFormat, targetSize);
 
                        group->addChild(new CopyImageTest(root->getContext(),
                                                                                        ImageInfo(srcFormat, srcTarget, srcSize),
index d6dde30..b44d7e5 100644 (file)
@@ -36,6 +36,7 @@
 #include "es31fNegativeShaderDirectiveTests.hpp"
 #include "es31fNegativePreciseTests.hpp"
 #include "es31fNegativeAdvancedBlendEquationTests.hpp"
+#include "es31fNegativeShaderStorageTests.hpp"
 
 #include "deUniquePtr.hpp"
 #include "deRandom.hpp"
@@ -2954,6 +2955,7 @@ void DebugTests::init (void)
        const vector<FunctionContainer> shaderDirectiveFuncs     = wrapCoreFunctions(NegativeTestShared::getNegativeShaderDirectiveTestFunctions());
        const vector<FunctionContainer> preciseFuncs                     = wrapCoreFunctions(NegativeTestShared::getNegativePreciseTestFunctions());
        const vector<FunctionContainer> advancedBlendFuncs               = wrapCoreFunctions(NegativeTestShared::getNegativeAdvancedBlendEquationTestFunctions());
+       const vector<FunctionContainer> shaderStorageFuncs               = wrapCoreFunctions(NegativeTestShared::getNegativeShaderStorageTestFunctions());
        const vector<FunctionContainer> externalFuncs                    = getUserMessageFuncs();
 
        {
@@ -3059,6 +3061,7 @@ void DebugTests::init (void)
                        host->addChild(createChildCases(CASETYPE_CALLBACK, m_context, "shader_directive",                       "Negative Shader Directive Cases",                                      shaderDirectiveFuncs));
                        host->addChild(createChildCases(CASETYPE_CALLBACK, m_context, "precise",                                        "Negative Precise Cases",                                                       preciseFuncs));
                        host->addChild(createChildCases(CASETYPE_CALLBACK, m_context, "advanced_blend",                         "Negative Advanced Blend Equation Cases",                       advancedBlendFuncs));
+                       host->addChild(createChildCases(CASETYPE_CALLBACK, m_context, "shader_storage",                         "Negative Shader Storage Cases",                                        shaderStorageFuncs));
                }
 
                {
@@ -3081,6 +3084,7 @@ void DebugTests::init (void)
                        host->addChild(createChildCases(CASETYPE_LOG, m_context, "shader_directive",            "Negative Shader Directive Cases",                                      shaderDirectiveFuncs));
                        host->addChild(createChildCases(CASETYPE_LOG, m_context, "precise",                                     "Negative Precise Cases",                                                       preciseFuncs));
                        host->addChild(createChildCases(CASETYPE_LOG, m_context, "advanced_blend",                      "Negative Advanced Blend Equation Cases",                       advancedBlendFuncs));
+                       host->addChild(createChildCases(CASETYPE_LOG, m_context, "shader_storage",                      "Negative Shader Storage Cases",                                        shaderStorageFuncs));
                }
 
                {
@@ -3103,6 +3107,7 @@ void DebugTests::init (void)
                        host->addChild(createChildCases(CASETYPE_GETERROR, m_context, "shader_directive",                       "Negative Shader Directive Cases",                                      shaderDirectiveFuncs));
                        host->addChild(createChildCases(CASETYPE_GETERROR, m_context, "precise",                                        "Negative Precise Cases",                                                       preciseFuncs));
                        host->addChild(createChildCases(CASETYPE_GETERROR, m_context, "advanced_blend",                         "Negative Advanced Blend Equation Cases",                       advancedBlendFuncs));
+                       host->addChild(createChildCases(CASETYPE_GETERROR, m_context, "shader_storage",                         "Negative Shader Storage Cases",                                        shaderStorageFuncs));
                }
        }
 
index e4b67cd..309a507 100644 (file)
@@ -446,15 +446,19 @@ void bind_buffer_range (NegativeTestContext& ctx)
                ctx.endSection();
 
                ctx.beginSection("GL_INVALID_VALUE is generated if target is GL_ATOMIC_COUNTER_BUFFER and offset is not multiples of 4.");
-               ctx.glBindBufferRange(GL_ATOMIC_COUNTER_BUFFER, 0, bufTF, 5, 0);
+               ctx.glBindBufferRange(GL_ATOMIC_COUNTER_BUFFER, 0, bufTF, 5, 4);
                ctx.expectError(GL_INVALID_VALUE);
                ctx.endSection();
 
-               ctx.beginSection("GL_INVALID_VALUE is generated if target is GL_SHADER_STORAGE_BUFFER and offset is not a multiple of the value of GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT.");
                ctx.glGetIntegerv(GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT, &ssAlignment);
-               ctx.glBindBufferRange(GL_ATOMIC_COUNTER_BUFFER, 0, bufTF, ssAlignment+1, 0);
-               ctx.expectError(GL_INVALID_VALUE);
-               ctx.endSection();
+
+               if (ssAlignment != 1)
+               {
+                       ctx.beginSection("GL_INVALID_VALUE is generated if target is GL_SHADER_STORAGE_BUFFER and offset is not a multiple of the value of GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT.");
+                       ctx.glBindBufferRange(GL_SHADER_STORAGE_BUFFER, 0, bufTF, ssAlignment+1, 4);
+                       ctx.expectError(GL_INVALID_VALUE);
+                       ctx.endSection();
+               }
        }
 
        ctx.glDeleteBuffers(1, &bufU);
@@ -497,24 +501,6 @@ void bind_buffer_base (NegativeTestContext& ctx)
        ctx.expectError(GL_INVALID_VALUE);
        ctx.endSection();
 
-       if (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)))
-       {
-               int maxACize = 0x1234;
-               int maxSSize = 0x1234;
-
-               ctx.beginSection("GL_INVALID_VALUE is generated if target is GL_ATOMIC_COUNTER_BUFFER and index is greater than or equal to GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS.");
-               ctx.glGetIntegerv(GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS, &maxACize);
-               ctx.glBindBufferRange(GL_ATOMIC_COUNTER_BUFFER, maxACize, bufU, 0, 4);
-               ctx.expectError(GL_INVALID_VALUE);
-               ctx.endSection();
-
-               ctx.beginSection("GL_INVALID_VALUE is generated if target is GL_SHADER_STORAGE_BUFFER and index is greater than or equal to GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS.");
-               ctx.glGetIntegerv(GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS, &maxSSize);
-               ctx.glBindBufferRange(GL_SHADER_STORAGE_BUFFER, maxSSize, bufU, 0, 4);
-               ctx.expectError(GL_INVALID_VALUE);
-               ctx.endSection();
-       }
-
        ctx.glDeleteBuffers(1, &bufU);
        ctx.glDeleteBuffers(1, &bufTF);
 }
index 7c3fc0f..a80d6ca 100644 (file)
@@ -2334,7 +2334,7 @@ void link_compute_shader (NegativeTestContext& ctx)
        }
 }
 
-void compile_compute_shader_helper (NegativeTestContext& ctx, const char** computeShaderSource, GLint* compileStatus)
+void compile_compute_shader_helper (NegativeTestContext& ctx, const char* const* computeShaderSource, GLint* compileStatus)
 {
        GLuint shader = ctx.glCreateShader(GL_COMPUTE_SHADER);
 
@@ -2351,68 +2351,155 @@ void compile_compute_shader (NegativeTestContext& ctx)
        ctx.beginSection("Compile Computer Shader");
 
        {
-               const char* computeShaderSource         =       "#version 300 es\n"
-                                                                                               "void main (void)\n"
-                                                                                               "{\n"
-                                                                                               "}\n\0";
+               const char* const computeShaderSource           =       "#version 300 es\n"
+                                                                                                               "void main (void)\n"
+                                                                                                               "{\n"
+                                                                                                               "}\n";
 
                compile_compute_shader_helper(ctx, &computeShaderSource, &compileStatus);
                if (compileStatus != GL_FALSE)
                        ctx.fail("Compute Shader should not have compiled with #version 300 es.");
        }
        {
-               const char* computeShaderSource         =       "#version 310 es\n"
-                                                                                               "buffer SSBO { vec4 data }"
-                                                                                               "void main (void)\n"
-                                                                                               "{\n"
-                                                                                               "}\n\0";
+               const char* const computeShaderSource           =       "#version 310 es\n"
+                                                                                                               "buffer SSBO { vec4 data }"
+                                                                                                               "void main (void)\n"
+                                                                                                               "{\n"
+                                                                                                               "}\n";
 
                compile_compute_shader_helper(ctx, &computeShaderSource, &compileStatus);
                if (compileStatus != GL_FALSE)
                        ctx.fail("Compute Shader should not have compiled: incorrect SSBO syntax.");
        }
        {
-               const char* computeShaderSource         =       "#version 310 es\n"
-                                                                                               "buffer SSBO { vec4 data;};"
-                                                                                               "uniform mat4 data;"
-                                                                                               "void main (void)\n"
-                                                                                               "{\n"
-                                                                                               "}\n\0";
+               const char* const computeShaderSource           =       "#version 310 es\n"
+                                                                                                               "buffer SSBO { vec4 data;};"
+                                                                                                               "uniform mat4 data;"
+                                                                                                               "void main (void)\n"
+                                                                                                               "{\n"
+                                                                                                               "}\n";
 
                compile_compute_shader_helper(ctx, &computeShaderSource, &compileStatus);
                if (compileStatus != GL_FALSE)
                        ctx.fail("Compute Shader should not have compiled: buffer variable redefinition.");
        }
        {
-               const char* computeShaderSource         =       "#version 310 es\n"
-                                                                                               "buffer SSBO { vec4 data[]; vec4 moreData;};"
-                                                                                               "void main (void)\n"
-                                                                                               "{\n"
-                                                                                               "}\n\0";
+               const char* const computeShaderSource           =       "#version 310 es\n"
+                                                                                                               "buffer SSBO { vec4 data[]; vec4 moreData;};"
+                                                                                                               "void main (void)\n"
+                                                                                                               "{\n"
+                                                                                                               "}\n";
 
                compile_compute_shader_helper(ctx, &computeShaderSource, &compileStatus);
                if (compileStatus != GL_FALSE)
                        ctx.fail("Compute Shader should not have compiled: unspecified length buffer member not at the end.");
        }
        {
-               const char* computeShaderSource         =       "#version 310 es\n"
-                                                                                               "in vec4 data;"
-                                                                                               "void main (void)\n"
-                                                                                               "{\n"
-                                                                                               "}\n\0";
+               const char* const computeShaderSource           =       "#version 310 es\n"
+                                                                                                               "in vec4 data;"
+                                                                                                               "void main (void)\n"
+                                                                                                               "{\n"
+                                                                                                               "}\n";
 
                compile_compute_shader_helper(ctx, &computeShaderSource, &compileStatus);
                if (compileStatus != GL_FALSE)
                        ctx.fail("Compute Shader should not have compiled: input qualifier used.");
        }
        {
-               const char* computeShaderSource         =       "#version 310 es\n"
-                                                                                               "shared uint data = 0;";
+               const char* const computeShaderSource           =       "#version 310 es\n"
+                                                                                                               "shared uint data = 0;";
 
                compile_compute_shader_helper(ctx, &computeShaderSource, &compileStatus);
                if (compileStatus != GL_FALSE)
                        ctx.fail("Compute Shader should not have compiled: shared-qualified variable initialized.");
        }
+       {
+               const char* const computeShaderSource           =       "#version 310 es\n"
+                                                                                                               "buffer SSBO { vec4 data; vec4 moreData[];} ssbo;"
+                                                                                                               "void test (vec4 data[10]) {}"
+                                                                                                               "void main (void)\n"
+                                                                                                               "{\n"
+                                                                                                               "    test(ssbo.moreData);"
+                                                                                                               "}\n";
+
+               compile_compute_shader_helper(ctx, &computeShaderSource, &compileStatus);
+               if (compileStatus != GL_FALSE)
+                       ctx.fail("Compute Shader should not have compiled: unspecified length buffer member passed as argument to function.");
+       }
+       {
+               const char* const computeShaderSource           =       "#version 310 es\n"
+                                                                                                               "buffer SSBO { vec4 data; vec4 moreData[];} ssbo;"
+                                                                                                               "void main (void)\n"
+                                                                                                               "{\n"
+                                                                                                               "    vec4 var = ssbo.moreData[-1];"
+                                                                                                               "}\n";
+
+               compile_compute_shader_helper(ctx, &computeShaderSource, &compileStatus);
+               if (compileStatus != GL_FALSE)
+                       ctx.fail("Compute Shader should not have compiled: unspecified length buffer member indexed with negative constant expression.");
+       }
+       {
+               const char* const computeShaderSource           =       "#version 310 es\n"
+                                                                                                               "layout(binding=-1) buffer SSBO { vec4 data;};"
+                                                                                                               "void main (void)\n"
+                                                                                                               "{\n"
+                                                                                                               "}\n";
+
+               compile_compute_shader_helper(ctx, &computeShaderSource, &compileStatus);
+               if (compileStatus != GL_FALSE)
+                       ctx.fail("Compute Shader should not have compiled: binding point less than zero.");
+       }
+       {
+               const char* const computeShaderSource           =       "#version 310 es\n"
+                                                                                                               "layout(binding=1) buffer;"
+                                                                                                               "layout(binding=2) buffer SSBO { vec4 data;};"
+                                                                                                               "void main (void)\n"
+                                                                                                               "{\n"
+                                                                                                               "}\n";
+
+               compile_compute_shader_helper(ctx, &computeShaderSource, &compileStatus);
+               if (compileStatus != GL_FALSE)
+                       ctx.fail("Compute Shader should not have compiled: binding point specified for global scope.");
+       }
+       {
+               const char* const computeShaderSource           =       "#version 310 es\n"
+                                                                                                               "buffer SSBO {"
+                                                                                                               "       layout(binding=1) vec4 data;"
+                                                                                                               "       layout(binding=2) vec4 moreData[];"
+                                                                                                               "} ssbo;"
+                                                                                                               "void main (void)\n"
+                                                                                                               "{\n"
+                                                                                                               "}\n";
+
+               compile_compute_shader_helper(ctx, &computeShaderSource, &compileStatus);
+               if (compileStatus != GL_FALSE)
+                       ctx.fail("Compute Shader should not have compiled: binding point specified for block member declarations.");
+       }
+       {
+               const char* const computeShaderSource           =       "#version 310 es\n"
+                                                                                                               "readonly buffer SSBO {vec4 data;} ssbo;"
+                                                                                                               "void main (void)\n"
+                                                                                                               "{\n"
+                                                                                                                       "ssbo.data = vec4(1, 1, 1, 1);"
+                                                                                                               "}\n";
+
+               compile_compute_shader_helper(ctx, &computeShaderSource, &compileStatus);
+               if (compileStatus != GL_FALSE)
+                       ctx.fail("Compute Shader should not have compiled: writing to buffer block qualified with readonly.");
+       }
+       {
+               const char* const computeShaderSource           =       "#version 310 es\n"
+                                                                                                               "writeonly buffer SSBO {vec4 data;} ssbo;"
+                                                                                                               "void main (void)\n"
+                                                                                                               "{\n"
+                                                                                                                       "vec4 var = ssbo.data;"
+                                                                                                               "}\n";
+
+               compile_compute_shader_helper(ctx, &computeShaderSource, &compileStatus);
+               if (compileStatus != GL_FALSE)
+                       ctx.fail("Compute Shader should not have compiled: reading from buffer block qualified with writeonly.");
+       }
+
        ctx.endSection();
 }
 
index 2b54462..f3b5ac4 100644 (file)
@@ -126,14 +126,42 @@ void primitive_bounding_box (NegativeTestContext& ctx)
        if (contextSupports(ctx.getRenderContext().getType() , glu::ApiType::es(3, 2)))
        {
                ctx.beginSection("gl_BoundingBox does not require the OES/EXT suffix in a 320 es shader.");
-               const std::string source =      "#version 320 es\n"
-                                                                       "layout(vertices = 3) out;\n"
-                                                                       "void main()\n"
-                                                                       "{\n"
-                                                                       "       gl_BoundingBox[0] = vec4(0.0, 0.0, 0.0, 0.0);\n"
-                                                                       "       gl_BoundingBox[1] = vec4(0.0, 0.0, 0.0, 0.0);\n"
-                                                                       "}\n";
-               verifyShader(ctx, glu::SHADERTYPE_TESSELLATION_CONTROL, source, EXPECT_RESULT_PASS);
+               {
+                       const std::string source =      "#version 320 es\n"
+                                                                               "layout(vertices = 3) out;\n"
+                                                                               "void main()\n"
+                                                                               "{\n"
+                                                                               "       gl_BoundingBox[0] = vec4(0.0, 0.0, 0.0, 0.0);\n"
+                                                                               "       gl_BoundingBox[1] = vec4(0.0, 0.0, 0.0, 0.0);\n"
+                                                                               "}\n";
+                       verifyShader(ctx, glu::SHADERTYPE_TESSELLATION_CONTROL, source, EXPECT_RESULT_PASS);
+               }
+               ctx.endSection();
+
+               ctx.beginSection("Invalid index used when assigning to gl_BoundingBox in 320 es shader.");
+               {
+                       const std::string source =      "#version 320 es\n"
+                                                                               "layout(vertices = 3) out;\n"
+                                                                               "void main()\n"
+                                                                               "{\n"
+                                                                               "       gl_BoundingBox[0] = vec4(0.0, 0.0, 0.0, 0.0);\n"
+                                                                               "       gl_BoundingBox[2] = vec4(0.0, 0.0, 0.0, 0.0);\n"
+                                                                               "}\n";
+                       verifyShader(ctx, glu::SHADERTYPE_TESSELLATION_CONTROL, source, EXPECT_RESULT_FAIL);
+               }
+               ctx.endSection();
+
+               ctx.beginSection("Invalid type assignment to per-patch output array in 320 es shader.");
+               {
+                       const std::string source =      "#version 320 es\n"
+                                                                               "layout(vertices = 3) out;\n"
+                                                                               "void main()\n"
+                                                                               "{\n"
+                                                                               "       gl_BoundingBox[0] = ivec4(0, 0, 0, 0);\n"
+                                                                               "       gl_BoundingBox[1] = ivec4(0, 0, 0, 0);\n"
+                                                                               "}\n";
+                       verifyShader(ctx, glu::SHADERTYPE_TESSELLATION_CONTROL, source, EXPECT_RESULT_FAIL);
+               }
                ctx.endSection();
        }
 }
diff --git a/modules/gles31/functional/es31fNegativeShaderStorageTests.cpp b/modules/gles31/functional/es31fNegativeShaderStorageTests.cpp
new file mode 100644 (file)
index 0000000..773d728
--- /dev/null
@@ -0,0 +1,324 @@
+/*-------------------------------------------------------------------------
+ * drawElements Quality Program OpenGL ES 3.1 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 Negative Shader Storage Tests
+ *//*--------------------------------------------------------------------*/
+
+#include "es31fNegativeShaderStorageTests.hpp"
+
+#include "gluShaderProgram.hpp"
+#include "glwDefs.hpp"
+#include "glwEnums.hpp"
+
+namespace deqp
+{
+namespace gles31
+{
+namespace Functional
+{
+namespace NegativeTestShared
+{
+namespace
+{
+
+void verifyProgram(NegativeTestContext& ctx, glu::ProgramSources sources)
+{
+       tcu::TestLog&                           log                     = ctx.getLog();
+       const glu::ShaderProgram        program         (ctx.getRenderContext(), sources);
+       bool                                            testFailed      = false;
+
+       log << program;
+
+       testFailed = program.getProgramInfo().linkOk;
+
+       if (testFailed)
+       {
+               const char* const message("Program was not expected to link.");
+               log << tcu::TestLog::Message << message << tcu::TestLog::EndMessage;
+               ctx.fail(message);
+       }
+}
+
+const char* getShaderExtensionDeclaration (glw::GLenum glShaderType)
+{
+       switch (glShaderType)
+       {
+               case GL_TESS_CONTROL_SHADER:
+               case GL_TESS_EVALUATION_SHADER: return "#extension GL_EXT_tessellation_shader : require\n";
+               case GL_GEOMETRY_SHADER:                return "#extension GL_EXT_geometry_shader : require\n";
+               default:
+                       return "";
+       }
+}
+
+glu::ShaderType getGLUShaderType (glw::GLenum glShaderType)
+{
+       switch (glShaderType)
+       {
+               case GL_VERTEX_SHADER:                   return glu::SHADERTYPE_VERTEX;
+               case GL_FRAGMENT_SHADER:                 return glu::SHADERTYPE_FRAGMENT;
+               case GL_TESS_CONTROL_SHADER:     return glu::SHADERTYPE_TESSELLATION_CONTROL;
+               case GL_TESS_EVALUATION_SHADER:  return glu::SHADERTYPE_TESSELLATION_EVALUATION;
+               case GL_GEOMETRY_SHADER:                 return glu::SHADERTYPE_GEOMETRY;
+               case GL_COMPUTE_SHADER:                  return glu::SHADERTYPE_COMPUTE;
+               default:
+                       DE_FATAL("Unknown shader type");
+                       return glu::SHADERTYPE_LAST;
+       }
+}
+
+glw::GLenum getMaxSSBlockSizeEnum (glw::GLenum glShaderType)
+{
+       switch (glShaderType)
+       {
+               case GL_VERTEX_SHADER:                   return GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS;
+               case GL_FRAGMENT_SHADER:                 return GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS;
+               case GL_TESS_CONTROL_SHADER:     return GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS;
+               case GL_TESS_EVALUATION_SHADER:  return GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS;
+               case GL_GEOMETRY_SHADER:                 return GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS;
+               case GL_COMPUTE_SHADER:                  return GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS;
+               default:
+                        DE_FATAL("Unknown shader type");
+                        return -1;
+       }
+}
+
+int getMaxSSBlockSize (NegativeTestContext& ctx, glw::GLenum glShaderType)
+{
+       int maxSSBlocks = 0;
+       ctx.glGetIntegerv(getMaxSSBlockSizeEnum(glShaderType), &maxSSBlocks);
+
+       return maxSSBlocks;
+}
+
+std::string genBlockSource (NegativeTestContext& ctx, deInt64 numSSBlocks, glw::GLenum shaderType)
+{
+       const bool                              isES32          = contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
+       const glu::GLSLVersion  version         = isES32 ? glu::GLSL_VERSION_320_ES : glu::GLSL_VERSION_310_ES;
+       std::ostringstream              source;
+
+       source  << glu::getGLSLVersionDeclaration(version) << "\n"
+                       << ((isES32) ? "" : getShaderExtensionDeclaration(shaderType));
+
+       switch (shaderType)
+       {
+               case GL_VERTEX_SHADER:
+               case GL_FRAGMENT_SHADER:
+                       break;
+
+               case GL_COMPUTE_SHADER:
+                       source << "layout (local_size_x = 1) in;\n";
+                       break;
+
+               case GL_GEOMETRY_SHADER:
+                       source << "layout(points) in;\n"
+                                  << "layout(line_strip, max_vertices = 3) out;\n";
+                       break;
+
+               case GL_TESS_CONTROL_SHADER:
+                       source << "layout(vertices = 10) out;\n";
+                       break;
+
+               case GL_TESS_EVALUATION_SHADER:
+                       source << "layout(triangles) in;\n";
+                       break;
+
+               default:
+                       DE_FATAL("Unknown shader type");
+                       break;
+       }
+
+       source  << "\n"
+                       << "layout(std430, binding = 0) buffer Block {\n"
+                       << "    int value;\n"
+                       << "} sb_in[" << numSSBlocks << "];\n"
+                       << "void main(void) { sb_in[0].value = 1; }\n";
+
+       return source.str();
+}
+
+std::string genCommonSource (NegativeTestContext& ctx, glw::GLenum shaderType)
+{
+       const bool                              isES32          = contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
+       const glu::GLSLVersion  version         = isES32 ? glu::GLSL_VERSION_320_ES : glu::GLSL_VERSION_310_ES;
+       std::ostringstream              source;
+
+       source << glu::getGLSLVersionDeclaration(version) << "\n"
+                  << ((isES32) ? "" : getShaderExtensionDeclaration(shaderType));
+
+       switch (shaderType)
+       {
+               case GL_TESS_CONTROL_SHADER:
+                       source  << "layout(vertices = 3) out;\n"
+                                       << "void main() {}\n";
+                       break;
+
+               case GL_TESS_EVALUATION_SHADER:
+                       source  << "layout(triangles, equal_spacing, cw) in;\n"
+                                       << "void main() {}\n";
+                       break;
+
+               default:
+                       source  << "void main() {}\n";
+                       break;
+       }
+
+       return source.str();
+}
+
+int genMaxSSBlocksSource (NegativeTestContext& ctx, glw::GLenum glShaderType, glu::ProgramSources& sources)
+{
+       int             maxSSBlocks                             = getMaxSSBlockSize(ctx, glShaderType);
+       const   std::string shaderSrc   = genBlockSource(ctx, (maxSSBlocks), glShaderType);
+
+       sources.sources[getGLUShaderType(glShaderType)].push_back(shaderSrc);
+
+       return maxSSBlocks;
+}
+
+void block_number_limits (NegativeTestContext& ctx)
+{
+       const glw::GLenum glShaderTypes[] =
+       {
+               GL_VERTEX_SHADER,
+               GL_FRAGMENT_SHADER,
+               GL_TESS_CONTROL_SHADER,
+               GL_TESS_EVALUATION_SHADER,
+               GL_GEOMETRY_SHADER,
+               GL_COMPUTE_SHADER,
+       };
+
+       const std::string       vertSource                      = genCommonSource(ctx, GL_VERTEX_SHADER);
+       const std::string       fragSource                      = genCommonSource(ctx, GL_FRAGMENT_SHADER);
+       const std::string       tessControlSource       = genCommonSource(ctx, GL_TESS_CONTROL_SHADER);
+       const std::string       tessEvalSource          = genCommonSource(ctx, GL_TESS_EVALUATION_SHADER);
+
+       for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(glShaderTypes); ndx++)
+       {
+               ctx.beginSection("maxShaderStorageBlocks: Exceed limits");
+
+               int                                     maxSSBlocks                     = getMaxSSBlockSize(ctx, glShaderTypes[ndx]);
+               std::string                     source                          = genBlockSource(ctx, maxSSBlocks+1, glShaderTypes[ndx]);
+
+               glu::ProgramSources sources;
+
+               if (maxSSBlocks == 0 || !ctx.isShaderSupported(static_cast<glu::ShaderType>(getGLUShaderType(glShaderTypes[ndx]))))
+               {
+                       ctx.endSection();
+                       continue;
+               }
+
+               switch (glShaderTypes[ndx])
+               {
+                       case GL_VERTEX_SHADER:
+                               sources << glu::VertexSource(source)
+                                               << glu::FragmentSource(fragSource);
+                               break;
+
+                       case GL_FRAGMENT_SHADER:
+                               sources << glu::VertexSource(vertSource)
+                                               << glu::FragmentSource(source);
+                               break;
+
+                       case GL_TESS_CONTROL_SHADER:
+                               sources << glu::VertexSource(vertSource)
+                                               << glu::FragmentSource(fragSource)
+                                               << glu::TessellationControlSource(source)
+                                               << glu::TessellationEvaluationSource(tessEvalSource);
+                               break;
+
+                       case GL_TESS_EVALUATION_SHADER:
+                               sources << glu::VertexSource(vertSource)
+                                               << glu::FragmentSource(fragSource)
+                                               << glu::TessellationControlSource(tessControlSource)
+                                               << glu::TessellationEvaluationSource(source);
+                               break;
+
+                       case GL_GEOMETRY_SHADER:
+                               sources << glu::VertexSource(vertSource)
+                                               << glu::FragmentSource(fragSource)
+                                               << glu::GeometrySource(source);
+                               break;
+
+                       case GL_COMPUTE_SHADER:
+                               sources << glu::ComputeSource(source);
+                               break;
+
+                       default:
+                               DE_FATAL("Unknown shader type");
+                               break;
+               }
+
+               verifyProgram(ctx, sources);
+               ctx.endSection();
+       }
+}
+
+void max_combined_block_number_limit (NegativeTestContext& ctx)
+{
+       ctx.beginSection("maxCombinedShaderStorageBlocks: Exceed limits");
+
+       glu::ProgramSources sources;
+
+       int combinedSSBlocks    = 0;
+       int maxCombinedSSBlocks = 0;
+
+       combinedSSBlocks += genMaxSSBlocksSource(ctx, GL_VERTEX_SHADER, sources);
+       combinedSSBlocks += genMaxSSBlocksSource(ctx, GL_FRAGMENT_SHADER, sources);
+
+       if ((ctx.isShaderSupported(glu::SHADERTYPE_TESSELLATION_CONTROL)) && (ctx.isShaderSupported(glu::SHADERTYPE_TESSELLATION_EVALUATION)))
+       {
+               combinedSSBlocks += genMaxSSBlocksSource(ctx, GL_TESS_CONTROL_SHADER, sources);
+               combinedSSBlocks += genMaxSSBlocksSource(ctx, GL_TESS_EVALUATION_SHADER, sources);
+       }
+
+       if (ctx.isShaderSupported(glu::SHADERTYPE_GEOMETRY))
+               combinedSSBlocks += genMaxSSBlocksSource(ctx, GL_GEOMETRY_SHADER, sources);
+
+       ctx.glGetIntegerv(GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS, &maxCombinedSSBlocks);
+
+       ctx.getLog() << tcu::TestLog::Message << "GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS: " << maxCombinedSSBlocks << tcu::TestLog::EndMessage;
+       ctx.getLog() << tcu::TestLog::Message << "Combined shader storage blocks: " << combinedSSBlocks << tcu::TestLog::EndMessage;
+
+       if (combinedSSBlocks > maxCombinedSSBlocks)
+               verifyProgram(ctx, sources);
+       else
+               ctx.getLog() << tcu::TestLog::Message << "Test skipped: Combined shader storage blocks < GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS: " << tcu::TestLog::EndMessage;
+
+       ctx.endSection();
+}
+
+} // anonymous
+
+std::vector<FunctionContainer> getNegativeShaderStorageTestFunctions ()
+{
+       const FunctionContainer funcs[] =
+       {
+               { block_number_limits,                          "block_number_limits",                          "Invalid shader linkage" },
+               { max_combined_block_number_limit,      "max_combined_block_number_limit",      "Invalid shader linkage" },
+       };
+
+       return std::vector<FunctionContainer>(DE_ARRAY_BEGIN(funcs), DE_ARRAY_END(funcs));
+}
+
+} // NegativeTestShared
+} // Functional
+} // gles31
+} // deqp
diff --git a/modules/gles31/functional/es31fNegativeShaderStorageTests.hpp b/modules/gles31/functional/es31fNegativeShaderStorageTests.hpp
new file mode 100644 (file)
index 0000000..13cbd1f
--- /dev/null
@@ -0,0 +1,45 @@
+#ifndef _ES31FNEGATIVESHADERSTORAGETESTS_HPP
+#define _ES31FNEGATIVESHADERSTORAGETESTS_HPP
+/*-------------------------------------------------------------------------
+ * drawElements Quality Program OpenGL ES 3.1 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 Negative Shader Storage Tests
+ *//*--------------------------------------------------------------------*/
+
+#include "tcuDefs.hpp"
+#include "es31fNegativeTestShared.hpp"
+
+namespace deqp
+{
+namespace gles31
+{
+namespace Functional
+{
+namespace NegativeTestShared
+{
+
+std::vector<FunctionContainer> getNegativeShaderStorageTestFunctions (void);
+
+} // NegativeTestShared
+} // Functional
+} // gles31
+} // deqp
+
+#endif // _ES31FNEGATIVESHADERSTORAGETESTS_HPP
index 1f1cfeb..19184c6 100644 (file)
@@ -184,8 +184,9 @@ void get_integer64v (NegativeTestContext& ctx)
 
 void get_integeri_v (NegativeTestContext& ctx)
 {
-       GLint data                                              = -1;
-       GLint maxUniformBufferBindings  = 0;
+       GLint data                                                              = -1;
+       GLint maxUniformBufferBindings                  =  0;
+       GLint maxShaderStorageBufferBindings    =  0;
 
        ctx.beginSection("GL_INVALID_ENUM is generated if name is not an accepted value.");
        ctx.glGetIntegeri_v(-1, 0, &data);
@@ -198,12 +199,20 @@ void get_integeri_v (NegativeTestContext& ctx)
        ctx.glGetIntegeri_v(GL_UNIFORM_BUFFER_BINDING, maxUniformBufferBindings, &data);
        ctx.expectError(GL_INVALID_VALUE);
        ctx.endSection();
+
+       ctx.beginSection("GL_INVALID_VALUE is generated if index is outside of the valid range for the indexed state target.");
+       ctx.glGetIntegerv(GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS, &maxShaderStorageBufferBindings);
+       ctx.expectError(GL_NO_ERROR);
+       ctx.glGetIntegeri_v(GL_SHADER_STORAGE_BUFFER_BINDING, maxShaderStorageBufferBindings, &data);
+       ctx.expectError(GL_INVALID_VALUE);
+       ctx.endSection();
 }
 
 void get_integer64i_v (NegativeTestContext& ctx)
 {
-       GLint64 data                                            = (GLint64)-1;
-       GLint   maxUniformBufferBindings        = 0;
+       GLint64 data                                                    = (GLint64)-1;
+       GLint   maxUniformBufferBindings                = 0;
+       GLint   maxShaderStorageBufferBindings  = 0;
 
        ctx.beginSection("GL_INVALID_ENUM is generated if name is not an accepted value.");
        ctx.glGetInteger64i_v(-1, 0, &data);
@@ -216,6 +225,15 @@ void get_integer64i_v (NegativeTestContext& ctx)
        ctx.glGetInteger64i_v(GL_UNIFORM_BUFFER_START, maxUniformBufferBindings, &data);
        ctx.expectError(GL_INVALID_VALUE);
        ctx.endSection();
+
+       ctx.beginSection("GL_INVALID_VALUE is generated if index is outside of the valid range for the indexed state target.");
+       ctx.glGetIntegerv(GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS, &maxShaderStorageBufferBindings);
+       ctx.expectError(GL_NO_ERROR);
+       ctx.glGetInteger64i_v(GL_SHADER_STORAGE_BUFFER_START, maxShaderStorageBufferBindings, &data);
+       ctx.expectError(GL_INVALID_VALUE);
+       ctx.glGetInteger64i_v(GL_SHADER_STORAGE_BUFFER_SIZE, maxShaderStorageBufferBindings, &data);
+       ctx.expectError(GL_INVALID_VALUE);
+       ctx.endSection();
 }
 
 void get_string (NegativeTestContext& ctx)
index e367fd3..cabb96f 100644 (file)
@@ -7230,7 +7230,7 @@ void TessellationTests::init (void)
                queryGroup->addChild(new LimitQueryCase(m_context, "max_tess_evaluation_texture_image_units",                   "Test MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS",                 GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS,             16));
                queryGroup->addChild(new LimitQueryCase(m_context, "max_tess_control_output_components",                                "Test MAX_TESS_CONTROL_OUTPUT_COMPONENTS",                              GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS,                  64));
                queryGroup->addChild(new LimitQueryCase(m_context, "max_tess_patch_components",                                                 "Test MAX_TESS_PATCH_COMPONENTS",                                               GL_MAX_TESS_PATCH_COMPONENTS,                                   120));
-               queryGroup->addChild(new LimitQueryCase(m_context, "max_tess_control_total_output_components",                  "Test MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS",                GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS,    4096));
+               queryGroup->addChild(new LimitQueryCase(m_context, "max_tess_control_total_output_components",                  "Test MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS",                GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS,    2048));
                queryGroup->addChild(new LimitQueryCase(m_context, "max_tess_evaluation_output_components",                             "Test MAX_TESS_EVALUATION_OUTPUT_COMPONENTS",                   GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS,               64));
                queryGroup->addChild(new LimitQueryCase(m_context, "max_tess_control_uniform_blocks",                                   "Test MAX_TESS_CONTROL_UNIFORM_BLOCKS",                                 GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS,                             12));
                queryGroup->addChild(new LimitQueryCase(m_context, "max_tess_evaluation_uniform_blocks",                                "Test MAX_TESS_EVALUATION_UNIFORM_BLOCKS",                              GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS,                  12));
index 3901ec1..791d8c9 100644 (file)
@@ -232,6 +232,12 @@ static const FormatExtEntry s_esExtFormats[] =
                (deUint32)(DEPTH_RENDERABLE | STENCIL_RENDERABLE | TEXTURE_VALID),
                GLS_ARRAY_RANGE(s_oesPackedDepthStencilTexFormats)
        },
+       // The ANGLE extension incorporates GL_OES_depth_texture/GL_OES_packed_depth_stencil.
+       {
+               "GL_ANGLE_depth_texture",
+               (deUint32)(REQUIRED_RENDERABLE | DEPTH_RENDERABLE | TEXTURE_VALID),
+               GLS_ARRAY_RANGE(s_oesDepthTextureFormats),
+       },
        // \todo [2013-12-10 lauri] Find out if OES_texture_half_float is really a
        // requirement on ES3 also. Or is color_buffer_half_float applicatble at
        // all on ES3, since there's also EXT_color_buffer_float?
index 7554f2b..c8761ce 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",
-                                               32725,
-                                               "3464385212ae9b816d121c77bc4191ed3dfb32ce7bfca1a02b42fcefa3ec2354")
+                                               33315,
+                                               "19f3b517f0dede56a6a94b820d08149ef5e1726f58202f47d69fa27f6f483bd2")
 
 VERSION                                = '1.5'
 
@@ -65,7 +65,8 @@ EXTENSIONS                    = [
        "EGL_EXT_buffer_age",
        "EGL_KHR_partial_update",
        "EGL_KHR_swap_buffers_with_damage",
-       "EGL_KHR_mutable_render_buffer"
+       "EGL_KHR_mutable_render_buffer",
+       "EGL_EXT_pixel_format_float"
 ]
 PROTECTS                       = [
        "KHRONOS_SUPPORT_INT64"
index 4372932..b77e69b 100644 (file)
@@ -141,6 +141,7 @@ ENUM_GROUPS = [
                "YUV_PLANE_BPP_8_EXT",
                "YUV_PLANE_BPP_10_EXT",
                ]),
+       ("ColorComponentType",  ["COLOR_COMPONENT_TYPE_FIXED_EXT", "COLOR_COMPONENT_TYPE_FLOAT_EXT"]),
        ("SurfaceTarget",               ["READ", "DRAW"]),
 
        # ConfigAttrib values