platform/upstream/VK-GL-CTS.git
3 years agoMerge vk-gl-cts/opengl-es-cts-3.2.4 into vk-gl-cts/opengl-es-cts-3.2.5
Alexander Galazin [Thu, 19 Nov 2020 08:05:02 +0000 (09:05 +0100)]
Merge vk-gl-cts/opengl-es-cts-3.2.4 into vk-gl-cts/opengl-es-cts-3.2.5

Change-Id: I4d5fd46d7f654ae13dcac771a16aca3683bfd735

3 years agoReset texture data to 0 after each 16 iterations to avoid overflow
Jianle Wang [Tue, 20 Oct 2020 02:31:48 +0000 (10:31 +0800)]
Reset texture data to 0 after each 16 iterations to avoid overflow

The default precision of int in the fragment shader is mediump. The fs_out_color
in GeometryShaderMaxCombinedTextureUnitsTest::m_fragment_shader_code_body will
overflow when the number of texture unit become large, since each texture data
is equal to index of the texture units.
So reset texture data to 0 after each 16 iterations to avoid the overflow.

Component: OpenGL

Affected tests: KHR-GLES31.core.geometry_shader.limits.max_combined_texture_units

VK-GL-CTS issue: 2622

Change-Id: Icc9f2ed77a5a1cf6f315605f5f1045a60a56396c
(cherry picked from commit ccb924af7b96ee3771ce25f6d31a0b243bbddee1)

4 years agoAmend OpenGL/ES Conformance Submission Package Requirements
Alexander Galazin [Thu, 22 Oct 2020 11:04:14 +0000 (13:04 +0200)]
Amend OpenGL/ES Conformance Submission Package Requirements

The current practice is that all bugfixes should be merged
into the CTS repo before being used in a submission.
This change promotes this practices to a requirement.

Components: OpenGL

Change-Id: Id5e5782c0418cbedb0ca23b0abd06051021b63ec

4 years agoFix the sorting order in eglChooseConfig test
Jianle Wang [Sat, 9 May 2020 08:00:43 +0000 (16:00 +0800)]
Fix the sorting order in eglChooseConfig test

EGL_COLOR_COMPONENT_TYPE_EXT should be before EGL_COLOR_BUFFER_TYPE
in sorting.

Components: AOSP

VK-GL-CTS issue: 2370

Affects:
dEQP-EGL.functional.choose_config.color_component_type_ext.dont_care

Change-Id: Ic502f17c800dac9f889931eb71971366a5cdb392
(cherry picked from commit 137766c7c9b4f7dac80b90ebf6f9a032188afe0f)

4 years agoAdd texture specification test for GL_OES_texture_half_float.
Nicolas Capens [Fri, 16 Mar 2018 13:51:47 +0000 (09:51 -0400)]
Add texture specification test for GL_OES_texture_half_float.

Google bug: b/74609191
Components: AOSP
Affects: dEQP-GLES2.functional.texture.specification.*

Change-Id: I85aec3469872f2733f528ef7902427e9e87935e7
(cherry picked from commit 19dd72470bdd1a772c08474535e40874624a93b1)

4 years agoFix uninitialized index array
Courtney Goeltzenleuchter [Thu, 21 Nov 2019 17:07:41 +0000 (10:07 -0700)]
Fix uninitialized index array

The test is doing a glDrawRangeElements using uninitialized data for
the element array. ANGLE validates that the indices fall within the
specified range. Data needs to be initialized to ensure that happens.

The spec says:
It is an error for index values (other than the primitive restart index,
when primitive restart is enabled) to lie outside the range [start, end], but
implementations are not required to check for this. Such indices will cause
implementation-dependent behavior.

Either the test needs to allow for an error or initialize the data so
as to be valid for the call.

Affected Test:
    dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_range_elements

Components: OpenGL ES
VK-GL-CTS issue: 2118

Change-Id: I51f8abb86f088b67990001454bb00d59313200c2
(cherry picked from commit bf7a86af5a959c3f4ad39deabe8b396d8581470a)

4 years agoGLES 3.1 negative framebuffer texture2D test fails
Courtney Goeltzenleuchter [Wed, 4 Dec 2019 21:01:39 +0000 (14:01 -0700)]
GLES 3.1 negative framebuffer texture2D test fails

Test is using wrong max size when checking cube map textures.

Affected Test:
   dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.framebuffer_texture2d

Components: OpenGL ES
VK-GL-CTS issue: 2141

Change-Id: I35bcdcfb8181a9eb062da10234f56267c56ac188
(cherry picked from commit 40d1312085353785186aae62ef098ae5c3a2a5c5)

4 years agoOpenGL ES: Use shader storage alignment
Courtney Goeltzenleuchter [Tue, 17 Dec 2019 14:40:46 +0000 (07:40 -0700)]
OpenGL ES: Use shader storage alignment

Affected Test:
  KHR-GLES31.core.shader_storage_buffer_object.advanced-switchBuffers-vs

Components: OpenGL ES
VK-GL-CTS issue: 2151

Change-Id: If427cad30ac36cc96a29f936e2ef7a0c4a301667
(cherry picked from commit 5fd95f6e03e1a0ece7052c6d9931cac825909204)

4 years agoRemove illegal parameter use in fbo.completeness
Courtney Goeltzenleuchter [Wed, 31 Jul 2019 15:59:40 +0000 (09:59 -0600)]
Remove illegal parameter use in fbo.completeness

dEQP.GLES2.functional.fbo.completeness.renderable.texture
was calling glTexImage2D with a internalformat of GL_SRGB8
which is not valid for GLES 2.0 even with GL_EXT_sRGB.

Affects:
dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.srgb8
dEQP-GLES2.functional.fbo.completeness.renderable.texture.stencil.srgb8
dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.srgb8

Components: AOSP

VK-GL-CTS issue: 1906

Change-Id: I97003eda10600a0a33e7212b6b5de34c5b2c8848
(cherry picked from commit 1de1dae629667dd79c896906540b1360e78d001a)

4 years agoFix use of invalid HALF_FLOAT enum
Courtney Goeltzenleuchter [Wed, 11 Sep 2019 15:01:22 +0000 (09:01 -0600)]
Fix use of invalid HALF_FLOAT enum

GLES 2.0 supports GL_HALF_FLOAT_OES via the OES_texture_half_float
extension. When the enum GL_HALF_FLOAT was added in GLES 3.0,
unfortunately it did not use the same enum value as GL_HALF_FLOAT_OES.
Technically, GL_HALF_FLOAT is not supported on a GLES 2.0 implementation
even with OES_texture_half_float. Fix GLES 2.0 tests to always use
GL_HALF_FLOAT_OES to avoid the issue.

Affects:

KHR-GLES2.core.internalformat.texture2d.*_half_float_*
KHR-GLES3*.core.internalformat.texture2d.*_half_float_*

Components: OpenGL

VK-GL-CTS issue: 1923

Change-Id: I9b43091382341798a0d62b9a4ec09153e915dc5c
(cherry picked from commit f7ede20a9805615a3c371b786fa7407708cf612c)

4 years agoFix invalid combinations for texture/copy on ES2 driver
Jim Hauxwell [Tue, 28 Aug 2018 16:33:48 +0000 (17:33 +0100)]
Fix invalid combinations for texture/copy on ES2 driver

OES_packed_depth_stencil describes the valid combinations available.
Texturing is only valid from it when OES_depth_texture is also present.
ES3 added depth texturing, but used different tokens than the initial
extension.

Affects:

KHR-GLES2.core.internalformat.texture2d.
  depth_stencil_unsigned_int_24_8_depth24_stencil8
KHR-GLES*.core.internalformat.texture2d.
  depth_stencil_unsigned_int_24_8_depth_stencil

Components: OpenGL
VK-GL-CTS issue: 1261

Change-Id: I91262c2c7eb71c9d3ff1eb59931227132b1828f9
(cherry picked from commit 33af336e530859e099df76b4c7d4acc5add3c2f7)

4 years agoUse unsized internal format in KHR-GLES2.texture_3d.[copy_sub_image|framebuffer_textu...
Tim Van Patten [Wed, 28 Aug 2019 18:15:23 +0000 (12:15 -0600)]
Use unsized internal format in KHR-GLES2.texture_3d.[copy_sub_image|framebuffer_texture].rgba8

These tests are using GL_RGBA8 as an internal format for TexImage2D.
Sized internal formats are not allowed for GLES 2.0.

Affects:
KHR-GLES2.texture_3d.copy_sub_image.rgba
KHR-GLES2.texture_3d.framebuffer_texture.rgba8

VK-GL-CTS issue: 1960

Change-Id: I8272e4ca0e2a9eda1161a5135e11f67b4ea5af6d
(cherry picked from commit eec82ceff77877bdad7fc94f8ae793db09ffff46)

4 years agoFix invalid parameter for GLES 2.0
Courtney Goeltzenleuchter [Tue, 30 Jul 2019 16:20:29 +0000 (10:20 -0600)]
Fix invalid parameter for GLES 2.0

Test was creating a texture with format of GL_DEPTH_STENCIL and
internalformat of GL_DEPTH24_STENCIL8_OES. In ES 2.0 the format and
internalformat must match.
Added an extra case when running 3.0 or better that does allow different
values for format and internalformat.

Affects:

KHR-GLES2.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth24_stencil

Components: OpenGL

VK-GL-CTS issue: 1903

Change-Id: I710975a0ea7c1d551f412590f887d9412be6f897
(cherry picked from commit 0c9f0c072d530bf378bc50265284fbc95c450e69)

4 years agoFix invalid combinations for texture/copy on ES2 driver
James Hauxwell [Fri, 13 Jul 2018 13:52:40 +0000 (14:52 +0100)]
Fix invalid combinations for texture/copy on ES2 driver

The OES_rgb8_rgba8 extension specification only specifies
RenderbufferStorageOES for additional GL_RGB8/GL_RGBA8 tokens.  ES3 spec
made these mandatory formats for texturing/copying.

Affects:

KHR-GLES2.core.internalformat.texture2d.rgb_unsigned_byte_rgb8
KHR-GLES2.core.internalformat.texture2d.rgba_unsigned_byte_rgb8
KHR-GLES2.core.internalformat.copy_tex_image.rgba8
KHR-GLES2.core.internalformat.copy_tex_image.rgb8

Components: OpenGL
VK-GL-CTS issue: 1260

Change-Id: Icbbd8882c5e623f5ac4725eebf977f535cfbfa31
(cherry picked from commit 5f7e621d6065f843651f7ca8f98989d05ca0bd65)

4 years agoMigrate deRoundUp32 to deInt32.h
Courtney Goeltzenleuchter [Fri, 20 Dec 2019 20:29:38 +0000 (13:29 -0700)]
Migrate deRoundUp32 to deInt32.h

deRoundUp32 is used in a number of places, promote to utility function.
back ported https://gerrit.khronos.org/#/c/5197 work at 3.2.5.1 tag.

Components: OpenGL ES
VK-GL-CTS issue: 2151

Change-Id: I3aaec51e0eec0e8e31e2082443d0d332bb8c3a56

4 years agoInitialize gl_PointSize if the test draws points
Amy Liu [Tue, 14 Jan 2020 08:34:30 +0000 (16:34 +0800)]
Initialize gl_PointSize if the test draws points

From GLSL specification: "If gl_PointSize is not written to,
its value is undefined in subsequent pipe stages"

Affects:

dEQP-GLES3.functional.primitive_restart.basic.points.*
dEQP-GLES3.functional.fragment_ops.scissor.partial_points

Components: AOSP

VK-GL-CTS issue: 2161

Change-Id: I3016287f7e55331522d6a7a8d562d8b57ab27e43
(cherry picked from commit 434240bf67d226947a3ccb73b10ea8e685f7aaaf)

4 years agoFix some bugs for EGL cases
Jian Li [Mon, 9 Dec 2019 05:24:05 +0000 (13:24 +0800)]
Fix some bugs for EGL cases

eglTerminate() wasn't called in proper sequence.
Resource wasn't released properly for not supported cases.

Affects:

dEQP-EGL.functional.image.*
dEQP-EGL.functional.resize.*
dEQP-EGL.functional.buffer_age.*
dEQP-EGL.functional.partial_update.*

Components: AOSP

VK-GL-CTS issue: 2153

Change-Id: Ic0a82aa176b9a8344f757916d61ea8f64c58eca5
(cherry picked from commit 53bfacd3d71753cda3448735e56ad249848c2460)

4 years agogl4cComputeShaderTests: correct conversion
Andres Gomez [Thu, 23 May 2019 16:34:13 +0000 (18:34 +0200)]
gl4cComputeShaderTests: correct conversion

Bug 13124 - gl45 conformance: Fix GL45-CTS.compute_shader.max to work with giant numbers
and
Bug 13582 - Checking values from glGet* incorrectly
didn't complete the job of avoiding conversion problems.

Now, we make sure that the comparison is done in the type that won't
cause a problem.

Components: OpenGL

VK-GL-CTS public issue: 149

Affects:

KHR-GLES31.core.compute_shader.dispatch-indirect
KHR-GLES31.core.compute_shader.max
KHR-GL43.compute_shader.dispatch-indirect
KHR-GL43.compute_shader.max

Change-Id: I69047d95ca4418a84f138ac9bfa7818fea45cc64

4 years agoFix compiler warning
Alexander Galazin [Mon, 3 Feb 2020 09:49:48 +0000 (10:49 +0100)]
Fix compiler warning

Components: OpenGL

Change-Id: Ie61463fcd7d5ad006e364a8b18505af0a23ebf73

4 years agoAllow tests to pass with a ES3+ context.
Emmanuel Tanguy [Mon, 7 Oct 2019 12:49:25 +0000 (13:49 +0100)]
Allow tests to pass with a ES3+ context.

Setting gl_MaxDrawBuffers ref value to GL_MAX_DRAW_BUFFERS for ES3 context.

Reduce code duplication where the same check exists in other tests.

Components: OpenGL ES

VK-GL-CTS issue: 2011

Affected tests:
dEQP-GLES2.functional.shaders.builtin_variable.max_draw_buffers_vertex
dEQP-GLES2.functional.shaders.builtin_variable.max_draw_buffers_fragment
dEQP-GLES2.functional.negative_api.buffer.framebuffer_texture2d
dEQP-GLES2.functional.texture.mipmap.cube.*

Change-Id: I6c5e522940256c98b54e5533f29fdafeac60a256
(cherry picked from commit 96d4f7bafa35a9567eef5c4d7658a316837b8a0b)

4 years agoRemove more tests due to GLSL ES 1.0/3.x differences
Alexander Galazin [Fri, 22 Nov 2019 12:49:30 +0000 (13:49 +0100)]
Remove more tests due to GLSL ES 1.0/3.x differences

Components: OpenGL

VK-GL-CTS issue: 2116

Removed tests:
dEQP-GLES2.functional.shaders.functions.invalid.attribute_argument_vertex
dEQP-GLES2.functional.shaders.functions.invalid.varying_argument_fragment
dEQP-GLES2.functional.shaders.functions.invalid.varying_argument_vertex

Change-Id: I628242739fade1310e36065da785b12be0912284

5 years agox11_egl: use correct cmake variable name for GLES1 include path
Tapani Pälli [Tue, 22 Jan 2019 12:00:23 +0000 (14:00 +0200)]
x11_egl: use correct cmake variable name for GLES1 include path

This commit reverts most of 7b4a66f99 that included a hack to search
for include directory next to the library path. This was invalid since
used variable name PKG_GLES1_INCLUDE_DIRS is false, correct name is
GLES1_INCLUDE_DIRS which is properly set by the PKG_CHECK_MODULES call.

This change has been succesfully tested on Fedora and Ubuntu distros by
setting up a custom PKG_CONFIG_PATH.

VK-GL-CTS issue: 1573

Change-Id: I158d816d28f5bbf30288f6226bd5c9e30cf85285
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
5 years agoSuppress Clang 7 self-assignment warnings
Mika Väinölä [Wed, 3 Oct 2018 13:03:46 +0000 (16:03 +0300)]
Suppress Clang 7 self-assignment warnings

Clang 7 warns on two intentional self-assignments. According to the
release notes "the warning can be suppressed by adding *& to the
right-hand side or casting it to the appropriate reference type."

Component: Framework

VK-GL-CTS issue: 1401

Change-Id: I3145b1965d46f617eb10ff8a60d038ce9bbb5cbf
(cherry picked from commit 3aa55b5b9bd903f279e234304a2affd409b18e8d)

5 years agoSeparate out debug information in Android build
Chris Forbes [Thu, 14 Jun 2018 06:23:02 +0000 (23:23 -0700)]
Separate out debug information in Android build

We don't want to place the debug information in the APK, but we should
keep it around on the host so that the debugger can work.

In a "normal" Android app packaging process this is done for us by
gradle, but we roll our own. Do it as a CMake post-build step instead.

Change-Id: I59b13659d66333a06ce60b6057db19b39c067f53
Components: Framework
VK-GL-CTS: 1194
VK-GL-CTS: 1533
(cherry picked from commit 651bd0d1bcfc3763521f16bfd3b9a40396998e8c)

5 years agoUse NDK's CMake toolchain for NDK r15+
Jesse Hall [Mon, 4 Dec 2017 21:49:31 +0000 (13:49 -0800)]
Use NDK's CMake toolchain for NDK r15+

The ndk-r11.cmake file is pretty complex because neither CMake nor the
NDK provided adequate support. Starting in NDK r15, the NDK provides
an officially supported CMake toolchain file. So dEQP's
ndk-modern.cmake, used for NDK r15 and later, can just delegate to that
for everything that isn't specific to dEQP, instead of duplicating
large parts of it. This will make future NDK versions easier to support.

Components: Framework, AOSP
VK-GL-CTS: 1533

VK-GL-CTS issue: 723
Google bug: 75980403

Change-Id: Icc6ec38601017d2fb6ca40defe2f8e73ba76ca96
(cherry picked from commit 627db59d4b6d74673eda4de10cbbcb934cb99c3f)

6 years agoUse sRGB encoded reference values for 8-bit Display P3 tests
Weiwan Liu [Wed, 26 Sep 2018 01:47:47 +0000 (18:47 -0700)]
Use sRGB encoded reference values for 8-bit Display P3 tests

Per EGL_EXT_gl_colorspace_display_p3 spec, Display P3 assumes
sRGB transfer function. So use the reference values computed
in sRGB space for 8-bit Display P3 tests, instead of linear ones.

Components: AOSP
VK-GL-CTS issue: 1384

Affects:
dEQP-EGL.functional.wide_color.pbuffer_8888_colorspace_p3
dEQP-EGL.functional.wide_color.window_8888_colorspace_p3

Change-Id: I77cf0f84b3189ce4e64f28a83d771b21eccd9214

6 years agoAdd screenLayout to AndroidManifest configChanges
Robert Tray [Fri, 14 Sep 2018 22:32:57 +0000 (16:32 -0600)]
Add screenLayout to AndroidManifest configChanges

Specify that dEQP will handle screenLayout config changes in the
manifest so the Android framework doesn't try to stop and restart dEQP.
dEQP can't handle a restart and just exits.

Update the minSdkVersion and targetSdkVersion to match what is
used for Khronos Vulkan dEQP manifest.  Android P will launch the
DeprecatedTargetSdkVersionDialog if the sdk version is not recent
enough.

Test: deqp

Cherry-pick from https://android-review.googlesource.com/c/platform/external/deqp/+/757202
VK-GL-CTS Issue: 1357
Affects: OpenGL/OpenGL ES Android build

Change-Id: Ia9befb1d65752ece3ea5778ba1301a134559334a
(cherry picked from commit 4e0cf955dd890944a035e52f6ae4eda7e7bd2ec2)

6 years agoReport NotSupported for GLES1 tests on non-ES1 run
Sandeep Shinde [Fri, 7 Sep 2018 05:59:45 +0000 (11:29 +0530)]
Report NotSupported for GLES1 tests on non-ES1 run

If conformance build does not enable DEQP_SUPPORT_GLES1 while building
binary for non-ES1.1 conformance run then OpenGL ES 1.1 specific tests
should return NotSupported error instead of InternalError.

The reason is because the specification does not enforce ES 1.1 support
if conformance is run for non ES1 version like for ES 3.x version.

Components: OpenGL ES

VK-GL-CTS issue: 1343

Change-Id: Id7218cc011b3ee139237130a7cb7d850b4431d50
(cherry picked from commit 4eb9918b81069484603f3226ce090e303ef27eb5)

6 years agoMerge vk-gl-cts/opengl-es-cts-3.2.4 into vk-gl-cts/opengl-es-cts-3.2.5
Alexander Galazin [Fri, 14 Sep 2018 17:36:46 +0000 (19:36 +0200)]
Merge vk-gl-cts/opengl-es-cts-3.2.4 into vk-gl-cts/opengl-es-cts-3.2.5

Change-Id: I162d821fa9df2cee46e91754c7ebf68595f4ee87

6 years agoMerge vk-gl-cts/opengl-es-cts-3.2.3 into vk-gl-cts/opengl-es-cts-3.2.4
Alexander Galazin [Fri, 14 Sep 2018 17:36:42 +0000 (19:36 +0200)]
Merge vk-gl-cts/opengl-es-cts-3.2.3 into vk-gl-cts/opengl-es-cts-3.2.4

Change-Id: I9105f8b1353709392afeab3163f1025ca4d3abcc

6 years agoMerge vk-gl-cts/opengl-es-cts-3.2.2 into vk-gl-cts/opengl-es-cts-3.2.3
Alexander Galazin [Fri, 14 Sep 2018 17:36:40 +0000 (19:36 +0200)]
Merge vk-gl-cts/opengl-es-cts-3.2.2 into vk-gl-cts/opengl-es-cts-3.2.3

Change-Id: I3216622efcb450b7bea13b54661955b479d68e99

6 years agoAllow reading GL_BYTE surfaces to GL_RGBA output.
Tapani Pälli [Mon, 3 Sep 2018 07:10:04 +0000 (10:10 +0300)]
Allow reading GL_BYTE surfaces to GL_RGBA output.

EXT_render_snorm specification:

   "For 8bit signed normalized fixed-point rendering surfaces, the
    combination format RGBA and type BYTE is accepted. For a 16bit signed
    normalized fixed point buffer, the combination RGBA and SHORT is
    accepted.

OpenGL ES 3.1 specification:
   "If G, B, or A values are not present in the internal format, they are
    taken to be zero, zero, and one respectively."

Components: OpenGL ES

VK-GL-CTS issue: 1338

Affects: KHR-GLES3.packed_pixels*snorm

Change-Id: I48df036fc3da80a06e1adef32bd59dac5b551cec
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
6 years agoFix the memory stomp running *core.internalformat.texture2d.depth_stencil*
Lujin Wang [Tue, 28 Aug 2018 00:08:42 +0000 (17:08 -0700)]
Fix the memory stomp running *core.internalformat.texture2d.depth_stencil*

On QNX, we hit "Malloc Check Failed" and crash running CTS 3.2.5.0 with,
Test case 'KHR-GLES*.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth24_stencil8'..
Malloc Check Failed: :/builds/workspace/sdp700/build_aarch64/lib/c/alloc/dlist.c:1134

In InternalformatCaseBase::convertUInt_24_8(), two unsigned int data were modified
instead of one, which led to memory stomp and crash during the returning of function
InternalformatCaseBase::generateTextureData(). Rewrite function convertUInt_24_8()
to properly convert float color vec to unsigned_int_24_8_depth24_stencil8.

Affects:
KHR-GLES*.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth24_stencil8

Compoments: OpenGL

VK-GL-CTS issue: 1329

Change-Id: I95dfa2be272136e7ecf71b4ef49b43b90813f077

6 years agoAdd specific RGB10A2 data for BlendHSLHue and BlendHSLSaturation
Yabin Zheng [Fri, 31 Aug 2018 07:35:16 +0000 (15:35 +0800)]
Add specific RGB10A2 data for BlendHSLHue and BlendHSLSaturation

Some original input test data will cause divide by 0 issue. This issue
is not handled by spec, but the test should assure the valid data.

Affects: KHR-GLES31.core.blend_equation_advanced.*

VK-GL-CTS issue: 919

Components: OpenGL

Change-Id: I6278ed77de0a38aede7d840bac7b7ec57e869110

6 years agoFix: rendering complete times not monotonic
Jiayuan Ren [Tue, 14 Aug 2018 19:09:01 +0000 (12:09 -0700)]
Fix: rendering complete times not monotonic

We run into an intermittent issue that two neighboring
frames have the same rendering complete timestamp.

The timers will always have finite granularity.
The timestamp is in nanosecond but the timer producing
these timestamps might not actually be able to produce
timestamps at 1ns resolution. When the timer used for
these events has not enough granularity, events that
happen very quickly right after one another will appear
as if they appear at the same point in time.

Two neighboring frames have the same timestamp is allowed.

Components: AOSP

VK-GL-CTS issue: 1311
Bug: b/112778381

Affects:
dEQP-EGL.functional.get_frame_timestamps.*

(cherry picked from commit 59b6ba9bb2b8a280a30e931fb9b69f492650d14d)

Change-Id: I10c9f7d50d079fcad000baee028a97fea5b69c3c

6 years agoCheck the bits of channel when calling glCopyTexImage2D
Yabin Zheng [Mon, 13 Aug 2018 09:25:29 +0000 (17:25 +0800)]
Check the bits of channel when calling glCopyTexImage2D

This test copies some data from render target to a texture by
glCopyTexImage2D command. According to the GLES3.2 spec, "An
INVALID_OPERATION error is generated if the component sizes of
internalformat do not exactly match the corresponding component sizes of
the source buffer's effective internal format." when executing the
glCopyTexImage2D command.

Because GLES3.2 spec does not force GL_RGB10 to be a renderable format,
so in a test case, if GL_RGB10 isn't renderable, then the render target
format will be GL_RGBA8, but the texture format is GL_RGB10. So this
behavior conflicts with the spec.

I think we can check the status whether the component sizes of format
will match before calling glCopyTexImage2D.

If the GL_RGB10 is renderable by some companies, then it will call the
gl.copyTexImage2D command directly(skip the checking logical because of
completed FBO). If GL_RGB10 isn't renderable by other companies, then it
will check the corresponding component sizes of buffer between source
and dest(because of incompleted FBO).

Components: OpenGL

VK-GL-CTS issue: 1307

Affects: KHR-GLES2.core.internalformat.copy_tex_image.*

Change-Id: I91e6b6674506f2709f97796a541e203bd052030b

6 years agoModify the negative test related to glShaderBinary
Yabin Zheng [Tue, 28 Aug 2018 09:09:24 +0000 (17:09 +0800)]
Modify the negative test related to glShaderBinary

Input 0 to binary parameter of glShaderBinary will lead to GL_INVALID_VALUE
accoridng to the GLES3.2 spec "An INVALID_VALUE error is generated if the
data pointed to by binary does not match the specified binaryformat."

The spec doesn't point out the order when we input more than one invalid
parameters. Add more conditions when checking the returned error messages.

Components: OpenGL

Affects: dEQP-GLES2.functional.negative_api.shader.shader_binary

VK-GL-CTS issue: 1331

Change-Id: I4c29a88175acf78f7a90262914890b9a53dbd3b5

6 years agoWrong statues effects KHR-GLES32.core.internalformat.* tests
Yabin Zheng [Wed, 16 May 2018 08:18:35 +0000 (16:18 +0800)]
Wrong statues effects KHR-GLES32.core.internalformat.* tests

glReadPixels() will report a GL_INVALID_OPERATION because of some wrong
status before.

Some tests(KHR-GLES32.core.geometry_shader) execute the commands on the
default FBO. If the geometry_shader tests remove the texture from color
attachment0 in the deinit() function, that will lead to an incomplete
default FBO. According to the GLES spec(May 14, 2018) 3.2(P406), When we
run some tests in the KHR-GLES32.core.internalformat.* suite, the
glReadPixels() will report a GL_INVALID_OPERATION because of "An
INVALID_OPERATION error is generated if the read framebuffer is
not framebuffer complete."

Taking into account the impact of different config ID on the tests, I
think creating a new FBO is not suitable for KHR-GLES32.core.internalformat.*

Components: OpenGL

Affects:
KHR-GLES32.core.internalformat.*
KHR-GLES32.core.geometry_shader.*

VK-GL-CTS issue: 1244

Change-Id: I0158df8bdea829048b8b35f151d16b7f47f057f8

6 years agoThrow NotSupported if MAX_FRAGMENT_IMAGE_UNIFORMS = 0
Yabin Zheng [Fri, 27 Jul 2018 06:29:20 +0000 (14:29 +0800)]
Throw NotSupported if MAX_FRAGMENT_IMAGE_UNIFORMS = 0

GLES 3.1 implementations may expose MAX_FRAGMENT_IMAGE_UNIFORMS = 0
which would prevent KHR-GLES31.shaders.layout_location.*image.* tests
from running.

Components: OpenGL

Affects:
KHR-GLES31.shaders.layout_location.*

VK-GL-CTS issue: 1284

Change-Id: I41299b58da0e7ec46587f2893dfb4a3859516669

6 years agoAllow glFramebufferTexture2D with level!=0 in ES2 tests with ES3
James Glanville [Wed, 4 Jul 2018 09:59:44 +0000 (10:59 +0100)]
Allow glFramebufferTexture2D with level!=0 in ES2 tests with ES3

These ES2 tests were expecting GL errors when attaching non-zero
levels to a framebuffer where GL_OES_fbo_render_mipmap is not
supported. This functionality is core in ES3 contexts, so the tests
much assume support for mippmapped rendering in this case.

Affects:
dEQP-GLES2.functional.negative_api.buffer.framebuffer_texture2d
dEQP-GLES2.functional.fbo.api.texture_levels

Components:
dEQP

VK-GL-CTS issue: 1263

Change-Id: I3dc7c8f1f2cc7efb5c227a0aec11983b185be03c
(cherry picked from commit ccd2cb41bc3813de087747a7f173cd2c8d8180c2)

6 years agoMerge vk-gl-cts/opengl-es-cts-3.2.4 into vk-gl-cts/opengl-es-cts-3.2.5
Alexander Galazin [Mon, 6 Aug 2018 06:55:21 +0000 (08:55 +0200)]
Merge vk-gl-cts/opengl-es-cts-3.2.4 into vk-gl-cts/opengl-es-cts-3.2.5

Change-Id: I02ed0b86e13f8210020fbfd8baaca74b60a1551f

6 years agoUpdate CTS version of gl.xml
Tate Hornbeck [Fri, 20 Jul 2018 16:20:50 +0000 (12:20 -0400)]
Update CTS version of gl.xml

Pulls in fix for getGraphicsResetStatusEXT

Components: OpenGL
VK-GL-CTS issue: 1247

Affects:
dEQP-EGL.functional.robustness.create_context.no_reset_notification

Change-Id: I3081d0b6dbfa4436e29cb7b4d52840575f9d40a0

6 years agoUpdate GLES mustpass
Alexander Galazin [Fri, 27 Jul 2018 10:54:39 +0000 (12:54 +0200)]
Update GLES mustpass

Components: OpenGL

Change-Id: Id6a3d2dd92e70b7b9729bda74f8caaa2b8e91527

6 years agoUpdate transform feedback tests
Yabin Zheng [Tue, 17 Jul 2018 06:41:57 +0000 (14:41 +0800)]
Update transform feedback tests

GLES3.2 spec made a change in 2018/5/14 version, that The
TRANSFORM_FEEDBACK_BUFFER_BINDING generic buffer binding point has now
been moved to context state, rather than per-object state, and should
be unaffected by glBindTransformFeedback command.

Some tests follow the old standard that they use glBindTransformFeedback
function to change the binding point status.

Components: OpenGL

Affects: KHR-GLES31.core.vertex_attrib_binding.advanced-iterations

VK-GL-CTS issue: 1275

Change-Id: I9a0296ef273321ef8b039986b92baf2353838a99

6 years agoCall eglSwapBuffers() to ensure wayland surface is attached
Juan A. Suarez Romero [Thu, 7 Jun 2018 10:22:18 +0000 (10:22 +0000)]
Call eglSwapBuffers() to ensure wayland surface is attached

Resize surface tests initially create a window and a surface, ensure
that both has the same size, then perform a window resize, and ensure
that both windows and the surface has the same size.

When using a Wayland target, checking the window size is done calling
wl_egl_window_get_attached_size(). This actually returns the size of the
attached buffer, which is done calling wl_surface_attach().

But wl_surface_attach() is only guaranteed to be done when calling
eglSwapBuffers(); if wl_egl_window_get_attached_size() is invoked
before, it can return 0, as no buffer is attached yet.

To avoid this problem, ensure a buffer is attached before getting the
window size.

Affects:
dEQP-EGL.functional.resize.surface_size.*

Components: OpenGL

VK-GL-CTS issue: 594

Change-Id: I74fb9a10b269ea1e1f7a63457fb0df76f8604547

6 years agoFix dEQP-GLES3.functional.fbo.multiview.*
Fei Yang [Mon, 2 Jul 2018 08:48:40 +0000 (16:48 +0800)]
Fix dEQP-GLES3.functional.fbo.multiview.*

When the width of render target is an odd value, these tests failed.

The reason is these tests set default sample parameters and sample from
a 512x512 surface, where the left/right views have different colors.
When the width of render target is an odd value, the color of central
line is undefined.

As these tests' purpose is mainly want to verify whether the left/right
views have the different color, but not exactly care what the central
line is, a simple solution is just skip the check of central line.

Components: OpenGL

VK-GL-CTS issue: 1256

Affects: dEQP-GLES3.functional.fbo.multiview.*

Change-Id: I62c86dc7269864a3919b11a331178bfc54d65ab0

6 years agoLoosen threshold in Texture3D tests
Yabin Zheng [Tue, 22 May 2018 03:02:27 +0000 (11:02 +0800)]
Loosen threshold in Texture3D tests

The verification function should consider both src and dst formats
when computing allowed error threshold.

Components: OpenGL

Affects:
KHR-GLES2.texture_3d.sub_image.*

VK-GL-CTS issue: 1243

Change-Id: Ie53aed63724aa75a0da697e30e7625a309acf76b

6 years agoSome glCopyTexSubImage3D related tests conflict with GLES3.2 spec
Yabin Zheng [Fri, 22 Jun 2018 01:50:06 +0000 (09:50 +0800)]
Some glCopyTexSubImage3D related tests conflict with GLES3.2 spec

According to the GLES3.2 spec,  An INVALID_OPERATION error is generated if the
component sizes of internalformat do not exactly match the corresponding
component sizes of the source buffer's effective internal format when call the
glCopyTExSubImage3D function.

The test format is GL_RGBA8, while different config ID will result in different
format in the render buffer. The number of channel bits of some format are not
equal to GL_RGBA8. So we should add a new FBO to restrict the test behavior.

Components: OpenGL

Affects: KHR-GLES2.texture_3d.copy_sub_image.*

VK-GL-CTS issue: 1240

Change-Id: I35c066fce990038e95da1e04197d659929fd8e86

6 years agoFix swap_buffers_with_damage.resize* hang on X11
Lujin Wang [Tue, 26 Jun 2018 18:47:39 +0000 (11:47 -0700)]
Fix swap_buffers_with_damage.resize* hang on X11

In SwapBuffersWithDamageTest, the second time setSurfaceSize() was
called, because the size values were the same as the first call, the
test would hang with XNextEvent() in XlibWindow::setDimensions() waiting
for a ConfigureNotify event that Xserver would not deliver in
ConfigureWindow() if size was not changed.

Changing the if conditions causes size values to change for neighboring
setSurfaceSize calls and resolves the hang.

Affects:
dEQP-EGL.functional.swap_buffers_with_damage.resize*

Components: egl

VK-GL-CTS issue: 1238

Change-Id: I78177ffbef4f7f380d850ad43d83317f82401c7b

6 years agoCorrect getProcAddress() handling in robustness tests
Oliver Wohlmuth [Fri, 6 Jul 2018 12:19:17 +0000 (14:19 +0200)]
Correct getProcAddress() handling in robustness tests

The below robustness tests don't use the OpenGL ES extension name when
calling getProcAddress() in an OpenGL ES environment. This change fixes
it by removing the getProcAddress() calls and use gl.XXX() to call these
functions. gl.XXX() takes care of the context it is running in.

Affects:
KHR-NoContext.*.robustness.no_reset_notification
KHR-NoContext.*.robustness.getnuniform
KHR-NoContext.*.robustness.readnpixels

Components: OpenGL
VK-GL-CTS issue: 1267

Change-Id: I4ed18990626f1dd744eebf6b99c18a60a29dad5f

6 years agoRemove shaders.negative.unused_uniform_precision_matching
Tate Hornbeck [Wed, 27 Jun 2018 16:53:11 +0000 (12:53 -0400)]
Remove shaders.negative.unused_uniform_precision_matching

The GLSL spec was updated to "the types, precisions and any location
specifiers of all statically used uniform variables with the same name
must match across shaders that are linked into a single program."

which makes the unused_uniform_precision_matching test invalid.

Updating this test to use statically used uniforms would be
redundant to used_uniform_precision_matching.

Components: OpenGL
VK-GL-CTS issue: 1249

Affects:
KHR-GLES32.shaders.negative.unused_uniform_precision_matching

Change-Id: I6a60c9355144f1d539a6463d913844129e6dfc8d

6 years agoShaders Derivate Tests: fix threshold
Juan A. Suarez Romero [Mon, 25 Jun 2018 15:22:48 +0000 (17:22 +0200)]
Shaders Derivate Tests: fix threshold

Derivate tests are calculating the threshold used for validating results
by taking in account a scale. Apparently this is incorrect, and is
causing some tests to fail.

A similar situation happened in Vulkan, and the proper fix was to do not
take in account the scale for the threshold calculation. Hence, applying
the same fix here fixes all the failing tests.

Affects:
dEQP-GLES3.functional.shaders.derivate.*
dEQP-GLES31.functional.shaders.derivate.*

Components: OpenGL

VK-GL-CTS issue: 1237

Change-Id: I106e36a708a6f75768c15ccdb4b064eb562cb28f

6 years agoExclude tests causing OOM
Alexander Galazin [Wed, 27 Jun 2018 07:59:49 +0000 (09:59 +0200)]
Exclude tests causing OOM

Components: OpenGL

Affects:
dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_separate_grid_1000x1000_drawcount_5000
dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_combined_grid_1000x1000_drawcount_5000
dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_separate_grid_1000x1000_drawcount_5000
dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_combined_grid_1000x1000_drawcount_5000

VK-GL-CTS issue: 1241

Change-Id: I3bc753391e2739387879ca117e9da29c98286cec

6 years agoAllow glReadPixels() differences due precision errors
Juan A. Suarez Romero [Tue, 19 Jun 2018 07:23:13 +0000 (07:23 +0000)]
Allow glReadPixels() differences due precision errors

When comparing the results from glReadPixels() passing user-space memory
and using a PBO, there could be differences due drivers implementation
following different paths, and thus generating differences because of
precision errors.

Like in dEQP-GLES3.functional.read_pixels.* tests, add a threshold under
which the differences are acceptable.

Affects:
dEQP-GLES3.functional.pbo.*

Components: OpenGL

VK-GL-CTS issue: 1228

Change-Id: I7c9ac5de359cff8deba039b010357eae0da3eaaf

6 years agoRobust_buffer_access_behavior.texel_fetch relies on undefined behavior
Yabin Zheng [Thu, 21 Jun 2018 01:41:20 +0000 (09:41 +0800)]
Robust_buffer_access_behavior.texel_fetch relies on undefined behavior

The failed test behavior is :
Create a mipmap texture as a dst texture and attach its level 1 texture
to the framebuffer colorattachment0 as render target. Create a mipmap
texture as a src texture and fill some data to its level 1 texture.
Use "texelFetch" in the fragment shader to sample level 1 source
texture(mipmap) and draw it to the dst texture.

According to the GLES3.2 spec:
The results of texelFetch builtins are undefined if the computed level
of detail is not the texture's base level and the texture's minification
filter is NEAREST or LINEAR.

Modify the test for the mipmap case.

Components: OpenGL

Affects:
KHR-NoContext.es32.robust_buffer_access_behavior.texel_fetch

VK-GL-CTS issue: 1236

Change-Id: Id67ea894a3dd423bba611ccc11a131b80d38fc64

6 years agoIncrease threshold GLES3 blend tests
Juan A. Suarez Romero [Wed, 20 Jun 2018 16:37:58 +0000 (18:37 +0200)]
Increase threshold GLES3 blend tests

The threshold used in dEQP-GLES3.functional.fragment_ops.blend.* is
computed using a non-scientific ad hoc formula.

As stated in a comment, when using few color bits, the blend operations
brings extra inaccuracy, which requires to increase the threshold.

Apparently, the current threshold value is not enough when using a RGB565
configuration, and it should be increased.

Moreover, the threshold used in GLES2 blend tests is a bit bigger, and
using this threshold for the GLES3 blend tests fixes the problems with
RGB565.

Thus this commit applies the GLES2 blend tests threshold to GLES3 tests.

Affects:
dEQP-GLES3.functional.fragment_ops.blend.default_framebuffer.*

Components: OpenGL

VK-GL-CTS issue: 1230

Change-Id: I7269768a9591fc70532312d8cc13481252a6f6e2

6 years agoDo not fail if no config is available
Juan A. Suarez Romero [Fri, 8 Jun 2018 08:27:33 +0000 (08:27 +0000)]
Do not fail if no config is available

If the backend does not support any EGL config with the required
attributes, make the test UnSupported rather than Fail.

Affects:
dEQP-EGL.functional.wide_color.*

Components: OpenGL

VK-GL-CTS issue: 1210

Change-Id: Ic3c37e68530b4ac0fac72e713023542645bd8288

6 years agoGet an EGLConfig supporting pbuffers
Juan A. Suarez Romero [Wed, 6 Jun 2018 14:29:37 +0000 (14:29 +0000)]
Get an EGLConfig supporting pbuffers

Several tests create pbuffer surfaces, but they are asking for EGL
configuration that supports windows, instead of pbuffers.

Affected tests:
dEQP-EGL.functional.multicontext.*
dEQP-EGL.functional.sharing.gles2.multithread.*

Components: OpenGL

VK-GL-CTS issue: 1204

Change-Id: Ifcee406eb37cbf5fb16ffba851247772909992b6

6 years agoMerge vk-gl-cts/opengl-es-cts-3.2.4 into vk-gl-cts/opengl-es-cts-3.2.5
Alexander Galazin [Sun, 8 Jul 2018 12:45:02 +0000 (14:45 +0200)]
Merge vk-gl-cts/opengl-es-cts-3.2.4 into vk-gl-cts/opengl-es-cts-3.2.5

Change-Id: I7c25701183541186be93af679e622f169f5d37e1

6 years agoMerge vk-gl-cts/opengl-es-cts-3.2.3 into vk-gl-cts/opengl-es-cts-3.2.4
Alexander Galazin [Sun, 8 Jul 2018 12:44:59 +0000 (14:44 +0200)]
Merge vk-gl-cts/opengl-es-cts-3.2.3 into vk-gl-cts/opengl-es-cts-3.2.4

Change-Id: Ice7c3e12cfbc1982ab7d9e363670d81c77c6e7e4

6 years agoRemove undefined EGL test cases
Alexander Galazin [Wed, 13 Jun 2018 12:33:29 +0000 (14:33 +0200)]
Remove undefined EGL test cases

Affects:
dEQP-EGL.functional.reusable_sync.invalid.wait_server_invalid_flag
dEQP-EGL.functional.reusable_sync.valid.wait_server

VK-GL-CTS issue: 1196

Change-Id: I5f2484242139a2589a47413076555fba9fc1fa30

6 years agoRemove undefined EGL test cases
Alexander Galazin [Wed, 13 Jun 2018 12:33:29 +0000 (14:33 +0200)]
Remove undefined EGL test cases

Affects:
dEQP-EGL.functional.reusable_sync.invalid.wait_server_invalid_flag
dEQP-EGL.functional.reusable_sync.valid.wait_server

VK-GL-CTS issue: 1196

Change-Id: I5f2484242139a2589a47413076555fba9fc1fa30

6 years agoRemove undefined EGL test cases
Alexander Galazin [Wed, 13 Jun 2018 12:33:29 +0000 (14:33 +0200)]
Remove undefined EGL test cases

Affects:
dEQP-EGL.functional.reusable_sync.invalid.wait_server_invalid_flag
dEQP-EGL.functional.reusable_sync.valid.wait_server

VK-GL-CTS issue: 1196

Change-Id: I5f2484242139a2589a47413076555fba9fc1fa30

6 years agowayland: search for GLESv1 toggle DEQP_SUPPORT_GLES1 on if found
Juan A. Suarez Romero [Tue, 29 May 2018 15:03:13 +0000 (15:03 +0000)]
wayland: search for GLESv1 toggle DEQP_SUPPORT_GLES1 on if found

Some tests require GLES1 support and report test failure if support
has not been built.

Search for GLES1 libraries and enable it.

Components: Framework

VK-GL-CTS issue: 1161

Change-Id: Iea0bb9f9362a4529cbf452efddd06b417cd74c76

6 years agogeneratemipmap_zero_level_array_compressed may reuse stale object
Yabin Zheng [Wed, 6 Jun 2018 03:09:25 +0000 (11:09 +0800)]
generatemipmap_zero_level_array_compressed may reuse stale object

The test should add a new individual texture object for this sub-test.

Components: OpenGL

Affects:
dEQP-GLES2.functional.negative_api.texture.generatemipmap_zero_level_array_compressed

VK-GL-CTS issue: 1206

Change-Id: I3af22e04c110f7e08a90596c198a9ae3da76fcdc

6 years agoMerge vk-gl-cts/opengl-es-cts-3.2.4 into vk-gl-cts/opengl-es-cts-3.2.5
Alexander Galazin [Fri, 1 Jun 2018 09:22:21 +0000 (11:22 +0200)]
Merge vk-gl-cts/opengl-es-cts-3.2.4 into vk-gl-cts/opengl-es-cts-3.2.5

Change-Id: Ie074683ba2b3818d0ceff54719c40e259deb3e71

6 years agoSkip BC/DXT formats in Texture3D tests
Juan A. Suarez Romero [Mon, 14 May 2018 15:24:04 +0000 (15:24 +0000)]
Skip BC/DXT formats in Texture3D tests

These formats only supports 2D images.

Affects:
KHR-GLES2.texture_3d.compressed_texture.negative_compressed_tex_image
KHR-GLES2.texture_3d.compressed_texture.negative_compressed_tex_sub_image

Components: OpenGL

VK-GL-CTS issue: 1163

Change-Id: I806dccfdbb2969b51c0ee9a1010c04107154733a
(cherry picked from commit a0b8363a7837546c73e4d30a6c6d37da21ea8645)

6 years agoGL_SRG8_ALPHA8 also supported in OpenGL ES 3.0+
Juan A. Suarez Romero [Wed, 16 May 2018 11:01:52 +0000 (11:01 +0000)]
GL_SRG8_ALPHA8 also supported in OpenGL ES 3.0+

dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.srgb8_alpha8
assumes that using GL_SRGB8_ALPHA8 in GLES2 should fail unless proper
extensions are supported.

But the OpenGL ES context created can be either 2.0 or an upper version,
and upper versions (3.0+) supports this format without extensions.

Thus, if OpenGL ES 3.0+ context is returned, this test should assume
that rendering is possible.

This is an extension of fix done in Change-ID
Ibb95736959ff9d5b0ff972ccf3983abc98795be3.

Affectd tests:
dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.srgb8_alpha8

Components: OpenGL

VK-GL-CTS issue: 1137

Change-Id: I733a8595b1eba7756787cde4a6bca2391dc345d7
(cherry picked from commit dd951adf61b3b6ad6cdab92b26b00c6931235681)

6 years agoFix gl_FragData[u_index] test in OpenGL ES 3.x context
Yabin Zheng [Wed, 21 Mar 2018 01:38:40 +0000 (09:38 +0800)]
Fix gl_FragData[u_index] test in OpenGL ES 3.x context

The test is valid if GL_EXT_draw_buffers or GL_NV_draw_buffers
is supported

Affects:
dEQP-GLES3.functional.shaders.fragdata.draw_buffers

Components: OpenGL

VK-GL-CTS issue: 1168

Change-Id: I44b41330ca37614920ed1cb0d6d021a8bc1e0fa3

6 years agoGL_SRG8_ALPHA8 also supported in OpenGL ES 3.0+
Juan A. Suarez Romero [Thu, 19 Apr 2018 15:35:40 +0000 (15:35 +0000)]
GL_SRG8_ALPHA8 also supported in OpenGL ES 3.0+

dEQP-GLES2.functional.fbo.completeness.renderable.renderbuffer.color0.srgb8_alpha8
assumes that using GL_SRGB8_ALPHA8 format in RenderBuffer should fail
for OpenGL ES 2.0 because it is not supported in the specification,
unless either EXT_sRGB or EXT_sRGB_write_control are implemented, as
they add this format as supported.

But when creating the OpenGL context, it can be either 2.0 or an upper
version. If 3.0+ is returned, this version supports this format without
those extensions, and thus the test should pass.

So this change ensures that if OpenGL ES 3.0+ context is returned, then
the use of GL_SRGB8_ALPHA8 in RenderBuffer should work.

Affected tests:
dEQP-GLES2.functional.fbo.completeness.renderable.renderbuffer.color0.srgb8_alpha8

Components: OpenGL

VK-GL-CTS issue: 1137

Change-Id: Ibb95736959ff9d5b0ff972ccf3983abc98795be3
(cherry picked from commit a72652c15bbb6bbeed3fdf357630166095c44d91)

6 years agoRemove some problematic texture_functions tests
James Glanville [Tue, 24 Apr 2018 21:26:17 +0000 (22:26 +0100)]
Remove some problematic texture_functions tests

Some of the tests in dEQP-GLES3.functional.shaders.texture_functions
are overly sensitive to rounding modes and precision of the CPU
reference implementation. For this reason they were removed from
AOSP. This change removes them from mustpass to match.

VK-GL-CTS issue: 1146
Components: OpenGL

Affects:
dEQP-GLES3.functional.shaders.texture_functions.texturelodoffset.usampler2darray_vertex
dEQP-GLES3.functional.shaders.texture_functions.textureprojlodoffset.isampler3d_vertex
dEQP-GLES3.functional.shaders.texture_functions.textureprojoffset.sampler3d_bias_fixed_fragment
dEQP-GLES3.functional.shaders.texture_functions.textureprojoffset.sampler3d_bias_float_fragment
dEQP-GLES3.functional.shaders.texture_functions.textureprojoffset.isampler3d_bias_fragment
dEQP-GLES3.functional.shaders.texture_functions.textureprojoffset.usampler3d_bias_fragment

Change-Id: Id6bfc025a350deb0914d27151e0bae88b42710b6

6 years agoMove unspecified-precision tests from ES2/ES3 to ES3.1
Chris Forbes [Wed, 2 May 2018 23:31:10 +0000 (16:31 -0700)]
Move unspecified-precision tests from ES2/ES3 to ES3.1

Got significant pushback from vendors about enforcing these tests on
ES2/ES3 -- ends up being a vendor choice between breaking shipping
content or failing CTS.

Moved all of these tests to ES3.1 only as a compromise.

Change-Id: I5a827064472f73908b01fa85e0097bda21038136
Components: AOSP
(cherry picked from commit 047891af31d1c8827a84e49e81b5b526ee5ee485)

6 years agoRemove line expression tests
Juan A. Suarez Romero [Thu, 10 May 2018 16:54:21 +0000 (16:54 +0000)]
Remove line expression tests

Using #line directive with an expression is considered as undefined
behaviour. Thus, remove these tests.

Removed:
dEQP-GLES2.functional.shaders.preprocessor.builtin.line_and_file_expression_fragment
dEQP-GLES2.functional.shaders.preprocessor.builtin.line_and_file_expression_vertex
dEQP-GLES2.functional.shaders.preprocessor.builtin.line_expression_fragment
dEQP-GLES2.functional.shaders.preprocessor.builtin.line_expression_vertex
dEQP-GLES3.functional.shaders.preprocessor.builtin.line_and_file_expression_fragment
dEQP-GLES3.functional.shaders.preprocessor.builtin.line_and_file_expression_vertex
dEQP-GLES3.functional.shaders.preprocessor.builtin.line_expression_fragment
dEQP-GLES3.functional.shaders.preprocessor.builtin.line_expression_vertex

Components: OpenGL

VK-GL-CTS issue: 1145

Change-Id: Ib8cb58a8e712397114eb33d8d36c1957b3f5e9b0

6 years agoFix window size issues in several new tests
Mark Adams [Mon, 16 Apr 2018 20:39:06 +0000 (16:39 -0400)]
Fix window size issues in several new tests

Some of the new tests added in the last 6 months fail when run with
non-default window sizes. In two cases, the tests were hardcoded to use
64x64 without checking the underlying size and thus could end up
with corruption if the window size was smaller.

In another case, the test changes the framebuffer to zero mid-test
instead of to the default framebuffer, resulting in invalid results
with deqp-surface-type=fbo.

Finally, the generated texture data's alpha is intended to always
be 1.0, but it can vary slightly due to numerical instability
depending on the window size. It is now hardcoded to ensure we
get the intended result.

VK-GL-CTS issue: 1126

Components: OpenGL

Affects:
KHR-GL*.internalformat.renderbuffer.*
KHR-GL*.internalformat.texture2d.*
KHR-GLES*.shaders.aggressive_optimizations.*

Change-Id: I3c1779cc7818ba5b1a798ec683af2780eeb9c9f4

6 years agoRe-remove negative ES2 tests
Mark Adams [Mon, 23 Apr 2018 16:27:14 +0000 (12:27 -0400)]
Re-remove negative ES2 tests

As per previous WG decision.

Components: OpenGL

Affects:
dEQP-GLES2.functional.shaders.texture_functions.invalid.texture2d_bias_in_vertex
dEQP-GLES2.functional.shaders.texture_functions.invalid.texturecube_bias_in_vertex
dEQP-GLES2.functional.shaders.texture_functions.invalid.texture2dlod_in_fragment
dEQP-GLES2.functional.shaders.constant_expressions.invalid.precision_specifier

Change-Id: I9c2640fd30b52c3d0aa7e957ea52249e213b2096

6 years agoGLES 2/3: Fix masked color clear tests.
Jamie Madill [Mon, 16 Apr 2018 17:26:06 +0000 (13:26 -0400)]
GLES 2/3: Fix masked color clear tests.

This corrects the generating truth table to use the proper flags
for using a non-scissored masked clear.

Components: OpenGL

Affects:
dEQP-GLES2.functional.color_clear.masked_rgb
dEQP-GLES2.functional.color_clear.masked_rgba
dEQP-GLES3.functional.color_clear.masked_rgb
dEQP-GLES3.functional.color_clear.masked_rgba

Google bug: b/78103598
VK-GL-CTS issue: 1125

Change-Id: I8b9e6db49ddfd76b887d1d7825caa005ab0bbb0c

6 years agoUse layered image bindings correctly
Graeme Leese [Mon, 16 Apr 2018 15:04:07 +0000 (16:04 +0100)]
Use layered image bindings correctly

Where the shader uses, for example, image3d the image binding in the API
must be layered, otherwise behaviour is undefined.

Components: OpenGL
Affects:    KHR-GLES31.shaders.layout_location.*
VK-GL-CTS Issue: 1123

Change-Id: I8267428d847d426945f1356bd654fb4f6c374881

6 years agoAdd OpenGL ES CTS 3.2.5.x mustpass
Alexander Galazin [Thu, 12 Apr 2018 10:21:17 +0000 (12:21 +0200)]
Add OpenGL ES CTS 3.2.5.x mustpass

Components: OpenGL

Change-Id: I860e4f6ee17c854066868f6b00e3cb0f41fb357b

6 years agoMerge vk-gl-cts/opengl-es-cts-3.2.4 into vk-gl-cts/master
Alexander Galazin [Thu, 12 Apr 2018 08:15:01 +0000 (10:15 +0200)]
Merge vk-gl-cts/opengl-es-cts-3.2.4 into vk-gl-cts/master

Change-Id: I312b8f9df9f294a1bd5a63a7d5bba8bd5ae6da22

6 years agoPrefer KHR entrypoints instead of EXT for robustness tests
Tapani Pälli [Thu, 5 Apr 2018 05:13:46 +0000 (08:13 +0300)]
Prefer KHR entrypoints instead of EXT for robustness tests

When resolving function entrypoints, framework resolves EXT
entrypoints after KHR to the same pointers. There are drivers that
implement only KHR entrypoints, prefer KHR over EXT so that KHR
entrypoints will be the ones used if both extensions are supported
by the driver.

Components: OpenGL ES
VK-GL-CTS issue: 1107

Affects:
KHR-NoContext.es32.robustness.getnuniform
KHR-NoContext.es32.robustness.readnpixels

Change-Id: Iec5f7cbdd53061e105b3445f7613ee41fccc4553
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
6 years agoFix GCC 7 implicit fallthrough warnings
Mika Väinölä [Tue, 20 Mar 2018 11:40:57 +0000 (13:40 +0200)]
Fix GCC 7 implicit fallthrough warnings

GCC 7 with -Wextra or -Wimplicit-fallthrough enabled warns when
a switch case falls through. For cases where this is intentional
the warning can be suppressed with a comment. Breaks and returns
were also added for cases which end in DE_FATAL.

Removing a fallthrough in vktSparseResourcesShaderIntrinsics.cpp
resulted in new test cases.

Affects: *

New tests:
dEQP-VK.sparse_resources.shader_intrinsics.3d_sparse_fetch.*

Components: Framework, Vulkan, OpenGL

VK-GL-CTS issue: 1067

Change-Id: I0306f96cf3a50e85144b4dd22a9a88cd908607d3

6 years agoRequire protectedMemory feature for non-zero queue create flags
Slawomir Cygan [Fri, 9 Mar 2018 17:53:43 +0000 (18:53 +0100)]
Require protectedMemory feature for non-zero queue create flags

Protected memory feature is required for using
VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT.

Components: Vulkan

VK-GL-CTS Issue: 1068

Affects:
dEQP-VK.api.device_init.create_device_queue2_unmatched_flags

Change-Id: I0a83fd3aaf2ab20836ab706adc9a62534ac56864

6 years agoMerge vk-gl-cts/aosp-deqp-dev into vk-gl-cts/master
Alexander Galazin [Wed, 11 Apr 2018 08:48:52 +0000 (10:48 +0200)]
Merge vk-gl-cts/aosp-deqp-dev into vk-gl-cts/master

Change-Id: I945204f314bc75c95e8b6c4056b01d24911bb92c

6 years agoFix resource buffers used for the Op?Convert graphics tests
Piers Daniell [Fri, 6 Apr 2018 17:16:47 +0000 (11:16 -0600)]
Fix resource buffers used for the Op?Convert graphics tests

I didn't catch this when reviewing CL 2240. The "graphics"
variants of the OpUConvert/OpSConvert/OpFConvert tests are
writing the shader results to a UBO instead of an SSBO. UBOs
are read-only and writing to one has undefined results.

This CL simply changes the resources to use SSBOs rather than
UBOs, which follows the same template of most of the other
dEQP-VK.spirv_assembly.instruction.graphics.* tests.

Affects:

dEQP-VK.spirv_assembly.instruction.graphics.sconvert.*
dEQP-VK.spirv_assembly.instruction.graphics.uconvert.*
dEQP-VK.spirv_assembly.instruction.graphics.fconvert.*

Change-Id: Iab4014e6ca5e1482f74ff6d8bec7f04793b0e69d
Components: Vulkan

6 years agoRelease info script without spir-v tools fix
Jari Komppa [Tue, 10 Apr 2018 09:59:55 +0000 (12:59 +0300)]
Release info script without spir-v tools fix

This fix (based on work by imirkin) checks whether the spir-v tools
source files are available before trying to use them to generate the
release info include file.

Affects:

None

Components: Framework

VK-GL-CTS issue: 1114

Change-Id: I6764a469738a8e6a7797746d963da197b8380301

6 years agoUse the subgroups 'supportedCheck' helpers
Graeme Leese [Wed, 21 Mar 2018 12:10:34 +0000 (12:10 +0000)]
Use the subgroups 'supportedCheck' helpers

This function exists in each test module but was only being used by one
out of the two places that the code is needed.

Components: Vulkan
Affects: dEQP-VK.subgroups.*

Change-Id: Idec5bf036b44b384c1c404d0a7d68805981a4ae4

6 years agoFix stack overflow on vkGetPhysicalDeviceSparseImageFormatProperties
Slawomir Cygan [Tue, 27 Mar 2018 14:41:33 +0000 (16:41 +0200)]
Fix stack overflow on vkGetPhysicalDeviceSparseImageFormatProperties

Function may return random number of structs overwriting
the sparseImageFormatProperties variable.

Components: Vulkan

VK-GL-CTS Issue: 1103

Affects: dEQP-VK.texture.*.sparse_*

Change-Id: I101b72360145c23cef14cfeb50c7f9cd02e62e2f

6 years agoTest using gl_ViewportIndex in tessellation shader
Caio Marcelo de Oliveira Filho [Mon, 5 Mar 2018 23:20:18 +0000 (15:20 -0800)]
Test using gl_ViewportIndex in tessellation shader

Needs VK_EXT_shader_viewport_index_layer extension. Test works by
setting up N viewports forming a grid and each pair of triangles is
assigned to one of the viewports. Colors are used to distinguish each
pair, and by consequence, each cell in the grid.

It reuses most of parts from the similar test for vertex shader.

New tests:
dEQP-VK.draw.shader_viewport_index.tessellation_shader_*

VK-GL-CTS issue: 1043

Components: Vulkan

Change-Id: Ie55be3e188f5ded3c8aafb90b97af8cf3af3f243

6 years agoUpdate Vulkan Readme
Alexander Galazin [Fri, 6 Apr 2018 08:16:25 +0000 (10:16 +0200)]
Update Vulkan Readme

Update Vulkan Readme with the new CTS version

Components: Vulkan

Change-Id: I4bbb541c3924efe32986e30051a4e82a2aaca50e

6 years agoMerge "Merge vk-gl-cts/vulkan-cts-1.1.1 into vk-gl-cts/master"
Alexander Galazin [Fri, 6 Apr 2018 08:15:15 +0000 (04:15 -0400)]
Merge "Merge vk-gl-cts/vulkan-cts-1.1.1 into vk-gl-cts/master"

6 years agoMerge vk-gl-cts/vulkan-cts-1.1.1 into vk-gl-cts/master
Alexander Galazin [Fri, 6 Apr 2018 07:47:50 +0000 (09:47 +0200)]
Merge vk-gl-cts/vulkan-cts-1.1.1 into vk-gl-cts/master

Change-Id: Iece73f9d69d002433e394ed5f9ed472ccad037e9

6 years agoUpdate spriv-tools
Alexander Galazin [Mon, 26 Mar 2018 12:34:28 +0000 (14:34 +0200)]
Update spriv-tools

Change-Id: I7d24e707b2e0ef8b9591db20897c3c813664b41d

6 years agoUpdate Vulkan Readme
Alexander Galazin [Thu, 5 Apr 2018 19:21:04 +0000 (21:21 +0200)]
Update Vulkan Readme

Update Vulkan Readme to reflect the current CTS version

Components: Vulkan

Change-Id: I1e69df3934e2d35a072823e7bf9e5d2d03b011fe

6 years agoMerge remote-tracking branch 'khronos/master' into deqp-dev
Chris Forbes [Thu, 5 Apr 2018 17:24:12 +0000 (10:24 -0700)]
Merge remote-tracking branch 'khronos/master' into deqp-dev

Change-Id: Ib9e725f708993d7561a5251d4d3d3e8aa982bc00

6 years agoMerge remote-tracking branch 'aosp/master' into deqp-dev
Chris Forbes [Thu, 5 Apr 2018 16:50:52 +0000 (09:50 -0700)]
Merge remote-tracking branch 'aosp/master' into deqp-dev

Change-Id: Ibfcf52370db2296033a396dce933808c325fe645

6 years agoMerge vk-gl-cts/vulkan-cts-1.1.1 into vk-gl-cts/master
Alexander Galazin [Thu, 5 Apr 2018 15:46:12 +0000 (17:46 +0200)]
Merge vk-gl-cts/vulkan-cts-1.1.1 into vk-gl-cts/master

Change-Id: Ie5c0fcea75496b342059629bb3c34c64c9f73226

6 years agoDo not fail display tests when there is no display
Damien Leone [Mon, 30 Oct 2017 23:15:25 +0000 (16:15 -0700)]
Do not fail display tests when there is no display

Instead, we should mark these tests as not supported. It is valid per the
Vulkan spec to have the extension report 0 displays connected.

Affects: dEQP-VK.wsi.display.*

Component: Vulkan

VK-GL-CTS issue: 1105

Change-Id: Idfe09ec588be7b4c6c782e306e7bf1506d78808f

6 years agoMerge vk-gl-cts/opengl-cts-4.6.0 into vk-gl-cts/master
Alexander Galazin [Thu, 5 Apr 2018 12:02:09 +0000 (14:02 +0200)]
Merge vk-gl-cts/opengl-cts-4.6.0 into vk-gl-cts/master

Change-Id: Ice19bfdd5c995157824851fa183611a84d9b4c0a

6 years agoMerge vk-gl-cts/opengl-es-cts-3.2.4 into vk-gl-cts/master
Alexander Galazin [Thu, 5 Apr 2018 12:02:08 +0000 (14:02 +0200)]
Merge vk-gl-cts/opengl-es-cts-3.2.4 into vk-gl-cts/master

Change-Id: Ie3f6aca2d39bc1c7c1600d3ba4d809c39ed91efa

6 years agoMerge vk-gl-cts/opengl-es-cts-3.2.3 into vk-gl-cts/opengl-es-cts-3.2.4
Alexander Galazin [Thu, 5 Apr 2018 12:02:04 +0000 (14:02 +0200)]
Merge vk-gl-cts/opengl-es-cts-3.2.3 into vk-gl-cts/opengl-es-cts-3.2.4

Change-Id: Id621f75848b554dc234d3b489a8a80773ac437bd