platform/upstream/VK-GL-CTS.git
6 years agoFix stageMask (0x1) usage in renderpass, image and texture tests
Paavo Pessi [Mon, 4 Dec 2017 08:57:40 +0000 (10:57 +0200)]
Fix stageMask (0x1) usage in renderpass, image and texture tests

Pipeline barriers using PIPELINE_STAGE_TOP_OF_PIPE_BIT with nonzero
access mask were modified to use proper pipeline stage flags.

Memory barrier structure members were renamed to match the current
specification.

Affects:

dEQP-VK.renderpass.suballocation.simple.*
dEQP-VK.renderpass.suballocation.formats.*
dEQP-VK.renderpass.suballocation.attachment.*
dEQP-VK.renderpass.suballocation.attachment_allocation.*
dEQP-VK.renderpass.dedicated_allocation.simple.*
dEQP-VK.renderpass.dedicated_allocation.formats.*
dEQP-VK.renderpass.dedicated_allocation.attachment.*
dEQP-VK.renderpass.dedicated_allocation.attachment_allocation.*
dEQP-VK.image.store.*
dEQP-VK.image.load_store.*
dEQP-VK.image.format_reinterpret.*
dEQP-VK.image.qualifiers.restrict.*
dEQP-VK.image.atomic_operations.*
dEQP-VK.image.texel_view_compatible.*
dEQP-VK.image.extended_usage_bit.attachment_write.*
dEQP-VK.image.extended_usage_bit.texture_write.*
dEQP-VK.texture.*

VK-GL-CTS issue: 806

Change-Id: Iab4699f095d4ea1206736cb0435863f17bd3bca3

6 years agoRelax precision for atan2 built-in precision tests
Jeff Leger [Sun, 22 Oct 2017 15:54:31 +0000 (11:54 -0400)]
Relax precision for atan2 built-in precision tests

The precision of atan2 is relaxed to 5 ULPs.

Affects:

 dEQP-VK.glsl.builtin.precision.atan2.*

Components:  Vulkan

VK_GL_CTS issue: 749

Change-Id: I146226019f77910d1401903f6e89292ff94c089d

6 years agoDon't assume rendering complete before buffer latch
Mark Adams [Mon, 4 Dec 2017 22:26:54 +0000 (17:26 -0500)]
Don't assume rendering complete before buffer latch

It's valid for the buffer to latch before rendering is completed, and
this is causing intermittent failures.

Bug: b/69981429

Test: --deqp-case=dEQP-EGL*get_frame_timestamps*

(cherry picked from commit 9e0214cf61df1109927f8f23dd5749735057eb30)

Change-Id: Ia9f1d0e4ffa7f3e16a46fc4566157a651d1b0601

6 years agoBlock/non-block uniforms match
Piotr Byszewski [Fri, 3 Nov 2017 09:11:09 +0000 (10:11 +0100)]
Block/non-block uniforms match

Test if uniforms in anonymous blocks do not match loose uniforms with
the same name in a different stage.

Components: OpenGL

VK-GL-CTS issue: 707

Affects:
KHR-GLES3.shaders.uniform_block.common.name_matching
KHR-GL33.shaders.uniform_block.common.name_matching

Change-Id: Ib1ea850ffbea7eb62ddbd6008463c8855f764c7e

6 years agoAdded tests for different shader varying vec width
Jari Komppa [Tue, 21 Nov 2017 12:52:23 +0000 (14:52 +0200)]
Added tests for different shader varying vec width

Vulkan specification (1.0.8, 14.1.3) states that vertex and fragment
shader varyings may differ as long as they are of the same type and the
vertex shader outputs at least as wide vectors as the fragment shader
inputs.

This set of tests link various varying vector types, all of which
are legal even though they do not match.

Affects:

dEQP-VK.glsl.linkage.varying.rules.legal_mismatch_vec4_vec3
dEQP-VK.glsl.linkage.varying.rules.legal_mismatch_vec4_vec2
dEQP-VK.glsl.linkage.varying.rules.legal_mismatch_vec4_float
dEQP-VK.glsl.linkage.varying.rules.legal_mismatch_vec3_vec2
dEQP-VK.glsl.linkage.varying.rules.legal_mismatch_vec3_float
dEQP-VK.glsl.linkage.varying.rules.legal_mismatch_vec2_float
dEQP-VK.glsl.linkage.varying.rules.legal_mismatch_ivec4_ivec3
dEQP-VK.glsl.linkage.varying.rules.legal_mismatch_ivec4_ivec2
dEQP-VK.glsl.linkage.varying.rules.legal_mismatch_ivec4_int
dEQP-VK.glsl.linkage.varying.rules.legal_mismatch_ivec3_ivec2
dEQP-VK.glsl.linkage.varying.rules.legal_mismatch_ivec3_int
dEQP-VK.glsl.linkage.varying.rules.legal_mismatch_ivec2_int

Components: Vulkan

VK-Gl-CTS issue: 821

Change-Id: I4afc3edb77fd6f421cafce20d09bbdd948f16dcf

6 years agoTest binding model with multiple descriptor sets
Paavo Pessi [Tue, 10 Oct 2017 08:24:39 +0000 (11:24 +0300)]
Test binding model with multiple descriptor sets

Tests were added to verify that multiple descriptor sets can be used
and accessed in all possible shader stages with all possible descriptor
types.

Multiple descriptor sets are updated using
- vkUpdateDescriptorSets
- vkUpdateDescriptorSetWithTemplateKHR

DescriptorSetUpdateBuilder utility class was modified slightly to
work better with multiple descriptor sets.

New tests:

dEQP-VK.binding_model.shader_access.*.*.*.multiple_descriptor_sets.*

Components: Vulkan, Framework

VK-GL-CTS issue: 91

Change-Id: I6c1a719a7a2af74c3f1eb2a620af1ec73c113411

6 years agoFix OpCopyObject from U32 to S32
Andrey Tuganov [Tue, 28 Nov 2017 23:28:18 +0000 (18:28 -0500)]
Fix OpCopyObject from U32 to S32

Conversion from U32 to S32 can use neither OpCopyObject (different types),
nor OpSConvert (same bit width). Changed to OpBitcast.

Affects:

dEQP-VK.spirv_assembly.instruction.compute.indexing

Components: Vulkan

VK-GL-CTS issue: 874

Change-Id: I298c2687f3f6f08f28f928623a1002ec72a5a8f8

6 years agoFix build when .git is a gitlink file
Chad Versace [Fri, 3 Nov 2017 16:36:30 +0000 (09:36 -0700)]
Fix build when .git is a gitlink file

If ${CMAKE_SOURCE_DIR}/.git exists, then
framework/qphelper/CMakeLists.txt uses the git revision as the dEQP
revision. The CMake rules update the revision when the files
${CMAKE_SOURCE_DIR}/.git/HEAD and ${CMAKE_SOURCE_DIR}/.git/index
change.

However, Git does not require that .git be a directory. If
git-submodules or git-worktrees are used, then .git may be a gitlink
file instead and the real git directory is elsewhere.

Fix the build by using `git rev-parse --git-dir` to find the real git dir
and `git rev-parse HEAD` to query the commit sha1.

This bumps the CMake requirement from 2.8 to 2.8.2. But that should be
safe since 2.8.2 was released in 2010.

Components: Framework
Change-Id: I811630e5afada8e6aed611b0ef6c51e39be2200b

6 years agoTest required_internalformat
Piotr Byszewski [Thu, 12 Oct 2017 08:24:48 +0000 (10:24 +0200)]
Test required_internalformat

GTFExtensionTestRequiredInternalformat was ported to glcts and
highly modified to resolve found issues and enable possibility
to also test core GL.

Components: OpenGL

VK-GL-CTS issue: 718

Affects:
KHR-GL40.internalformat.*
KHR-GLES2.core.internalformat.*
KHR-GLES3.core.internalformat.*
KHR-GLES31.core.internalformat.*
KHR-GLES32.core.internalformat.*

Change-Id: Iaf559e7c3fe955e314402c5190523b2c57c7041e

6 years agoVulkan: Add wide-color tests
Courtney Goeltzenleuchter [Tue, 27 Jun 2017 20:09:01 +0000 (14:09 -0600)]
Vulkan: Add wide-color tests

Affects:
dEQP-VK.wsi.*.colorspace.*

Components: Vulkan

Change-Id: I6813afa38e320ce91642802dfd0c5b6f2d5543b9

6 years agoMerge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master
Alexander Galazin [Thu, 30 Nov 2017 13:39:21 +0000 (14:39 +0100)]
Merge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master

Change-Id: If36eca15c35d7c5b473b0bcd6af6c40ef0e68322

6 years agoFix stageMask (0x1) usage in binding_model and glsl tests
Paavo Pessi [Fri, 24 Nov 2017 09:03:06 +0000 (11:03 +0200)]
Fix stageMask (0x1) usage in binding_model and glsl tests

Pipeline barriers using PIPELINE_STAGE_TOP_OF_PIPE_BIT with nonzero
access mask were modified to use proper pipeline stage flags.

Memory barrier structure members were renamed to match the current
specification.

Affects:

dEQP-VK.binding_model.*
dEQP-VK.glsl.derivate.*.texture.*
dEQP-VK.glsl.discard.*_texture
dEQP-VK.glsl.texture_functions.*
dEQP-VK.glsl.texture_gather.*
dEQP-VK.glsl.builtin_var.fragdepth.*
dEQP-VK.glsl.builtin.*
dEQP-VK.glsl.opaque_type_indexing.*
dEQP-VK.glsl.atomic_operations.*

VK-GL-CTS issue: 806

Change-Id: Ia223039abed5c4b15ae004fbaa9fba1ebe92056e

6 years agoAdd new tests for OpSConvert and OpFConvert
Mikael Tuomisalo [Fri, 17 Nov 2017 13:54:41 +0000 (15:54 +0200)]
Add new tests for OpSConvert and OpFConvert

Added missing tests for OpSConvert and OpFConvert for compute and
graphics shaders.
Edited SPIR-V templates for OpSpecConstantOp-tests to support data types
other than int32 on tests where other types are required.

New tests:

dEQP-VK.spirv_assembly.instruction.compute.opspecconstantop.sconvert
dEQP-VK.spirv_assembly.instruction.compute.opspecconstantop.fconvert
dEQP-VK.spirv_assembly.instruction.graphics.opspecconstantop.sconvert*
dEQP-VK.spirv_assembly.instruction.graphics.opspecconstantop.fconvert*

Components: Vulkan

VK-GL-CTS issue: 711

Change-Id: Ia3cc3bc3f70f5216e364a2da4fb8fe78079fa445

6 years agoRemoved duplicate fvec3 declaration
Jari Komppa [Wed, 8 Nov 2017 11:05:44 +0000 (13:05 +0200)]
Removed duplicate fvec3 declaration

A couple of tests had duplicate declarations that resolved into
a vector of three floats.

Affects:

dEQP-VK.spirv_assembly.instruction.compute.opphi.vartype_vec3
dEQP-VK.spirv_assembly.instruction.compute.opphi.vartype_struct

Components: Vulkan

VK-GL-CTS issue: 808

Change-Id: I2b2c865f138ebf0fe67fd3b72d413c040c335170

6 years agoFix PIPELINE_STAGE_TOP_OF_PIPE_BIT usage in api tests
Paavo Pessi [Tue, 14 Nov 2017 12:56:41 +0000 (14:56 +0200)]
Fix PIPELINE_STAGE_TOP_OF_PIPE_BIT usage in api tests

Test cases using PIPELINE_STAGE_TOP_OF_PIPE_BIT with nonzero access
mask were modified to use proper pipeline stage flags.

The dstAccessMask mask of a buffer memory barrier created by
ComputeInstanceResultBuffer class was changed from
VK_ACCESS_SHADER_WRITE_BIT to VK_ACCESS_HOST_READ_BIT to better
represent its usage.

Memory barrier structure members were renamed to match the current
specification.

Affects:

dEQP-VK.api.buffer_view.access.*
dEQP-VK.api.command_buffers.render_pass_continue
dEQP-VK.api.command_buffers.order_bind_pipeline
dEQP-VK.api.copy_and_blit.core.image_to_buffer.*
dEQP-VK.api.copy_and_blit.core.buffer_to_buffer.*
dEQP-VK.api.copy_and_blit.dedicated_allocation.image_to_buffer.*
dEQP-VK.api.copy_and_blit.dedicated_allocation.buffer_to_buffer.*

VK-GL-CTS issue: 806

Change-Id: Ifaff60b1cd615889fa4b1fc175a78bdbc00be50c

6 years agoTest if mediump optimizations are not to aggressive
Piotr Byszewski [Thu, 9 Nov 2017 09:49:25 +0000 (10:49 +0100)]
Test if mediump optimizations are not to aggressive

GTF sin and cos tests were ported to glcts as they can also
be used to detect overly optimized set of mediump operations.

Components: OpenGL

VK-GL-CTS issue: 706

Affects:
KHR-GL43.aggressive_optimizations.*
KHR-GLES2.shaders.aggressive_optimizations.*
KHR-GLES3.shaders.aggressive_optimizations.*
KHR-GLES31.shaders.aggressive_optimizations.*
KHR-GLES32.shaders.aggressive_optimizations.*

Change-Id: Idd2ea75ea552b9106792775570d64b347db32276

6 years agoTest component qualifier in shaders
Paavo Pessi [Mon, 30 Oct 2017 13:25:49 +0000 (15:25 +0200)]
Test component qualifier in shaders

Tests were added to verify that various combinations of component
qualifiers can be used with different data types (vec2, vec3, vec4,
ivec2 and ivec4) in following scenarios:

- in vertex shader input
- in fragment shader output
- when passing data from vertex shader to fragment shader

New tests:

dEQP-VK.glsl.440.linkage.varying.component.*

Components: Vulkan

VK-GL-CTS issue: 741

Change-Id: Ie18c420b9d3ba8bd082b98f4618d7fc595b8baba

6 years agoDelete GTF mustpass files
Alexander Galazin [Thu, 23 Nov 2017 11:27:18 +0000 (12:27 +0100)]
Delete GTF mustpass files

OpenGL ES CTS no longer uses GTF module,
time to delete the source files for mustpass

Components: OpenGL

Change-Id: Ib234e47612e48b50e6c34544cebbaba11a2f08c3

6 years agoCorrect robust buffer access behavior tests
Piotr Byszewski [Tue, 31 Oct 2017 16:57:52 +0000 (17:57 +0100)]
Correct robust buffer access behavior tests

Robust buffer access behavior tests vere moved to contexless module.
In addition common version of those test was generalized so that it
can test both es and core GL.

Components: OpenGL

VK-GL-CTS issue: 793

Affects:
KHR-NoContext.es32.robust_buffer_access_behavior.*
KHR-NoContext.gl43.robust_buffer_access_behavior.*

Change-Id: Idd967d00635faff4ec41d57abf203f22286bc145

6 years agoAdded constraints for random access flags
Jari Komppa [Tue, 14 Nov 2017 12:21:06 +0000 (14:21 +0200)]
Added constraints for random access flags

The pipeline barrier tests randomize access flags and stages, sometimes
resulting in access flags being enabled for stages that do not support
said accesses. This fix removes the illegal access flags while leaving
the random flag generation intact.

Affects:

dEQP-VK.memory.pipeline_barrier.*

Components: Vulkan

VK-GL-CTS issue: 814

Change-Id: I135ea8a9e41b5d8428ef77fe6ecbdf2380d80c7d

6 years agoDo not use depthClampEnable unconditionally.
Juan A. Suarez Romero [Fri, 10 Nov 2017 11:20:36 +0000 (11:20 +0000)]
Do not use depthClampEnable unconditionally.

Depth clamping is not needed by these tests, so
do not rely on the optional feature when creating
the pipeline object.

Affects:
dEQP-VK.spirv_assembly.*

Components: Vulkan

VK-GL-CTS issue: 846

Change-Id: I248759e6ac209ccbd7661068c3ef5f1dfb8ca501

6 years agoRemove duplicated definitions in spirv_assembly tests
Juan A. Suarez Romero [Fri, 10 Nov 2017 09:50:10 +0000 (09:50 +0000)]
Remove duplicated definitions in spirv_assembly tests

Duplicated definitions are now allowed.

Affects:
dEQP-VK.spirv_assembly.instruction.compute.opphi.vartype_*
dEQP-VK.spirv_assembly.instruction.compute.opspecconstantop.vector_related
dEQP-VK.spirv_assembly.instruction.graphics.opspecconstantop.vector_related_*

Components: Vulkan

VK-GL-CTS issue: 847

Change-Id: Ie09293ece03eeb25893aa66e7cb23e7ad8fa5e95

6 years agoTest with depth range greater than 1.0 should require extension
Slawomir Cygan [Fri, 27 Oct 2017 10:54:54 +0000 (12:54 +0200)]
Test with depth range greater than 1.0 should require extension

"_deltalarge" variant of tests was using minDepth/maxDepth
outside of valid usage from unextended spec.

Added requirement for VK_EXT_depth_range_unrestricted.

Affects:
dEQP-VK.draw.inverted_depth_ranges.*

Components: Vulkan

VK-GL-CTS issue: 795

Change-Id: I18f1c73d7250865aaba5ed64e6b8da955fec0aea

6 years agoMerge vk-gl-cts/opengl-cts-4.6.0 into vk-gl-cts/master
Alexander Galazin [Wed, 15 Nov 2017 14:46:11 +0000 (15:46 +0100)]
Merge vk-gl-cts/opengl-cts-4.6.0 into vk-gl-cts/master

Change-Id: I6b148f6e9948675fbe51b5e7ee04ec4cca24df2c

6 years agoAdd testing for sparse D/S/DS images.
Ari Suonpaa [Fri, 1 Sep 2017 10:40:33 +0000 (13:40 +0300)]
Add testing for sparse D/S/DS images.

Add sparse binding support for shadow texture tests by supporting sparse
binding in texture test util class. Removed unnecessary image aspect
check which prevented shadow sampler testing with sparse images.

Affects:

dEQP-VK.glsl.texture_functions.texture.sparse*shadow*
dEQP-VK.glsl.texture_gather.*depth32f*sparse*
dEQP-VK.texture.shadow.*sparse*

Components: Vulkan

VK-GL-CTS issue: 79

Change-Id: I265f09817493d96b91450f71822b00434bcf6cf3

6 years agoNotice of withdrawal of Vulkan CTS 1.0.0.x and 1.0.1.x
Alexander Galazin [Wed, 8 Nov 2017 08:53:26 +0000 (09:53 +0100)]
Notice of withdrawal of Vulkan CTS 1.0.0.x and 1.0.1.x

Components: Vulkan

Change-Id: I87ec80e470e72e9a51760fdb1f441099b9c4d3a8

6 years agoRemove mod from GL mustpass
Alexander Galazin [Fri, 10 Nov 2017 15:13:33 +0000 (16:13 +0100)]
Remove mod from GL mustpass

Components: OpenGL

VK-GL-CTS public issue: 51

Affects:
KHR-GL*.gpu_shader_fp64.builtin.mod_*

Change-Id: Idac62351b9ca926cdcb411990c33e7332e8a9db7

6 years agoUpdate KC CTS reference
Alexander Galazin [Fri, 10 Nov 2017 12:11:07 +0000 (13:11 +0100)]
Update KC CTS reference

Components: OpenGL

Change-Id: I241503a713fc4a15cdcf359c40e2b119b5b5fd4f

6 years agoChange Built-in Functions test case proposal
Adam Czupryna [Thu, 26 Oct 2017 09:56:11 +0000 (11:56 +0200)]
Change Built-in Functions test case proposal

Remove build-in noise* functions testing as tey are deprecated.
Section GLSL to SPIR-V Features Tests / Built-in Functions

Components: OpenGL

VK-GL-CTS issue: 554

Change-Id: I0f3d19bd6fd70c54a32610e68250f4f39f14a708

6 years agoUse proper name for array-of-array varyings.
Juan A. Suarez Romero [Mon, 30 Oct 2017 12:50:23 +0000 (12:50 +0000)]
Use proper name for array-of-array varyings.

varying_structure_location tests have the piece of shader code:

```
struct Data {
    dvec2 single;
    dvec2 array[1];
};

layout (location = 0) flat in Data tes_gs_output[][1];
```

When test tries to verify "single" variable, it tries to access through
"tes_gs_output[0].single", which is not correct. Rather it must use
"tes_gs_output[0][0].single"

Affects:
* KHR-GL46.enhanced_layouts.varying_structure_locations

Components: OpenGL

VK-GL-CTS issue: 796

Change-Id: Ib1c2ac6877f46f0be8530156a184b8fa41349c40

6 years agoAdd depth bounds tests
Igor Ostrowski [Thu, 19 Oct 2017 16:41:40 +0000 (18:41 +0200)]
Add depth bounds tests

New tests:
dEQP-VK.pipeline.depth.format.*_depth_bounds_test
dEQP-VK.dynamic_state.ds_state.depth_bounds_2

Rename:
dEQP-VK.dynamic_state.ds_state.depth_bounds -> depth_bounds_1

Components: Framework, Vulkan
VK-GL-CTS issue: 724

Change-Id: Ia3efb59c0d295f96687d4e63e34f882286cb41f6

6 years agoGL_ARB_compute_shader required for OpenGL < 4.3
Juan A. Suarez Romero [Mon, 6 Nov 2017 18:50:28 +0000 (19:50 +0100)]
GL_ARB_compute_shader required for OpenGL < 4.3

GL_ARB_compute_shader is part of OpenGL 4.3 and above.

For older versions, it is required to enable it explicitly.

Fixes:
KHR-GL31.CommonBugs.CommonBug_ParenthesisInLayoutQualifierIntegerValue
KHR-GL32.CommonBugs.CommonBug_ParenthesisInLayoutQualifierIntegerValue
KHR-GL33.CommonBugs.CommonBug_ParenthesisInLayoutQualifierIntegerValue
KHR-GL40.CommonBugs.CommonBug_ParenthesisInLayoutQualifierIntegerValue
KHR-GL41.CommonBugs.CommonBug_ParenthesisInLayoutQualifierIntegerValue
KHR-GL42.CommonBugs.CommonBug_ParenthesisInLayoutQualifierIntegerValue

Components: OpenGL

VK-GL-CTS issue: 818

Change-Id: I8e7ab78e29861547f0379feebce0375e1dabf47c

6 years agoMerge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master
Alexander Galazin [Fri, 10 Nov 2017 10:24:21 +0000 (11:24 +0100)]
Merge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master

Change-Id: Ib7a8d1973b881cb59b750ac9e2c291bc2602f559

6 years agoTest local workgroup size
Arkadiusz Sarwa [Tue, 10 Oct 2017 15:35:42 +0000 (17:35 +0200)]
Test local workgroup size

Add tests:
dEQP-VK.spirv_assembly.instruction.compute.localsize*

VK-GL-CTS issue: 629

Compoonents: Vulkan

Change-Id: Ibf3a4db7058c99c2dfa498a7c3ddd8794c0af294

6 years agoFix issues reported by validation layers
Igor Ostrowski [Thu, 26 Oct 2017 13:21:18 +0000 (15:21 +0200)]
Fix issues reported by validation layers

Affects:
dEQP-VK.draw.*
dEQP-VK.query_pool.*
dEQP-VK.dynamic_state.*

Components: Vulkan
VK-GL-CTS issue: 809

Change-Id: I6d8d227612e9cf30ad08921e922d756e0fa5c78d

6 years agoDo not use depthClampEnable unconditionally.
Jorg Wagner [Mon, 6 Nov 2017 13:56:49 +0000 (14:56 +0100)]
Do not use depthClampEnable unconditionally.

Depth clamping is not needed by this test, so
do not rely on the optional feature when creating
the pipeline object.

Affects:
dEQP-VK.api.smoke.*

Components: Vulkan

VK-GL-CTS issue: 817

Change-Id: I6794f7f5d17d7610ff43dcb4080a6a30e12ed95b

6 years agoPipeline used in second subpass should set subpass index to 1
Slawomir Cygan [Tue, 31 Oct 2017 10:42:20 +0000 (11:42 +0100)]
Pipeline used in second subpass should set subpass index to 1

Affects:
dEQP-VK.renderpass.sampleread

Components: Vulkan

VK-GL-CTS issue: 800

Change-Id: If387b43ac8469544f9270d747742cbcec66a1f5c

6 years agoLoad functions from ARB_uniform_buffer_object
Juan A. Suarez Romero [Tue, 7 Nov 2017 12:24:25 +0000 (12:24 +0000)]
Load functions from ARB_uniform_buffer_object

While this extension is part of OpenGL 3.1 and above, it is not part of
OpenGL 3.0.

As we need to run the tests for OpenGL 3.0 too, and we need to use some
functions exposed by this extension, let's load them from the extension
itself, instead of relying in the core functions.

Affects:
* KHR-GL30.transform_feedback.draw_xfb_instanced_test
* KHR-GL30.transform_feedback.draw_xfb_stream_instanced_test

Components: OpenGL

VK-GL-CTS issue: 819

Change-Id: I2cd1652b4c2d3b55e009c44b85b451d207387b96

6 years agoAdd tests for verifying standard image block shape usage.
Ari Suonpaa [Fri, 29 Sep 2017 07:41:00 +0000 (10:41 +0300)]
Add tests for verifying standard image block shape usage.

Added tests that verify the sparse image block shape
requirements match with standard block shapes in case
the use of standard block shapes is advertised.

Affects:

dEQP-VK.sparse_resources.image_block_shapes.*

Components: Vulkan

VK-GL-CTS issue 101

Change-Id: Icb0d15c15d437ae36a6c5e92e8d454ded06f662e

6 years agoCatch BAD_MATCH from createWindowSurface
Courtney Goeltzenleuchter [Tue, 12 Sep 2017 23:11:21 +0000 (17:11 -0600)]
Catch BAD_MATCH from createWindowSurface

On some platforms, it's possible to fail createWindowSurface
for some attribute combinations. Catch that case and return
NotSupported rather than a test failure.
Test: adb -d shell am start \
        -n com.drawelements.deqp/android.app.NativeActivity \
        -e cmdLine '"deqp --deqp-case=dEQP-EGL.functional.wide_color.* \
        --deqp-log-filename=/sdcard/dEQP-Log.qpa"'
Bug: 65376495

(cherry picked from commit 7df6c12492c6baf9fdf9a3ea0b7f51e33722a4e8)
Change-Id: I6546cbdfc011c7d26cfa3cdad7cc6f0df1b67122

6 years agoMultiple draw buffers in blend_equation_advanced
Mark Adams [Fri, 20 Oct 2017 13:49:08 +0000 (09:49 -0400)]
Multiple draw buffers in blend_equation_advanced

GL_NVX_blend_equation_advanced_multi_draw_buffers adds support for
multiple draw buffers with advanced blend equations. This change
modifies the below test to check for this extension and to expect
GL_NO_ERROR if it is present.

Components: AOSP

VK-GL-CTS issue: 770

Affects:
dEQP-GLES31.functional.debug.negative_coverage.get_error.advanced_blend.attachment_advanced_equation

(cherry picked from commit 2cb35a235c1a7bd3c63b296c37e186eec34e08e2)

Change-Id: I70ba495d96b4a17bed589e3affa693f572fde446

6 years agoRelax XFB begin check to match recent spec edit
James Helferty [Thu, 19 Oct 2017 18:24:35 +0000 (14:24 -0400)]
Relax XFB begin check to match recent spec edit

Update tests to reflect a recent change to the GL 4.6 specification.
Previously, if a shader layout qualifier specified that xfb_stride was
non-zero for a given xfb_buffer, then a buffer object was required to
be bound at that transform feedback buffer binding point. After the
spec change, it is now legal to not have a buffer bound, provided no
outputs are associated with the buffer.

Components: OpenGL

VK-GL-CTS issue: 785

Affects:
* KHR-GL44/45/46.enhanced_layouts.xfb_stride_of_empty_list
* KHR-GL44/45/46.enhanced_layouts.xfb_stride_of_empty_list_and_api

Change-Id: I38622bad1af3bc8a2a4c683eadc184e6231f7c85

6 years agoAdd CTS_ARB_gl_spirv test implementation
Adam Czupryna [Fri, 7 Jul 2017 09:42:37 +0000 (11:42 +0200)]
Add CTS_ARB_gl_spirv test implementation

Add CTS_ARB_gl_spirv test implementation that contains:
SpirvModulesPositiveTest,
SpirvModulesShaderBinaryMultipleShaderObjectsTest,
SpirvModulesStateQueriesTest,
SpirvModulesErrorVerificationTest,
SpirvGlslToSpirVEnableTest,
SpirvGlslToSpirVBuiltInFunctionsTest,
SpirvGlslToSpirVSpecializationConstantsTest,
SpirvValidationBuiltInVariableDecorationsTest

Affects:

KHR-GL45.gl_spirv.*

Components: Framework, OpenGL

VK-GL-CTS issue: 554

Change-Id: I0d54c70df619dbbd80b28350d2ac5e31aca08927
(cherry picked from commit a24448cdd72ffdbd8f7f571886625b8a53100979)

6 years agoAdd CTS_ARB_gl_spirv test implementation
Adam Czupryna [Fri, 7 Jul 2017 09:42:37 +0000 (11:42 +0200)]
Add CTS_ARB_gl_spirv test implementation

Add CTS_ARB_gl_spirv test implementation that contains:
SpirvModulesPositiveTest,
SpirvModulesShaderBinaryMultipleShaderObjectsTest,
SpirvModulesStateQueriesTest,
SpirvModulesErrorVerificationTest,
SpirvGlslToSpirVEnableTest,
SpirvGlslToSpirVBuiltInFunctionsTest,
SpirvGlslToSpirVSpecializationConstantsTest,
SpirvValidationBuiltInVariableDecorationsTest

Affects:

KHR-GL45.gl_spirv.*

Components: Framework, OpenGL

VK-GL-CTS issue: 554

Change-Id: I0d54c70df619dbbd80b28350d2ac5e31aca08927

6 years agoKHR_swapchain: Trigger the fence off vkQueueSubmit
Chris Forbes [Mon, 23 Oct 2017 22:13:38 +0000 (15:13 -0700)]
KHR_swapchain: Trigger the fence off vkQueueSubmit

Another instance of 438ea0888e8ccae.

VK-GL-CTS issue: 756

Component: Vulkan

Affects:
dEQP-VK.wsi.*.swapchain.*

Change-Id: I87da6800e0c8402c2c50ca88eb3360b31c3a515d

6 years agoGOOGLE_display_timing: Trigger the fence off vkQueueSubmit
Chris Forbes [Mon, 23 Oct 2017 22:09:56 +0000 (15:09 -0700)]
GOOGLE_display_timing: Trigger the fence off vkQueueSubmit

Another instance of 438ea0888e8ccae.

VK-GL-CTS issue: 756

Component: Vulkan

Affects:
dEQP-VK.wsi.*.display_timing.*

Change-Id: If94644402579ba1f46347d155313f6ef52d125a0

6 years agoAdd tests for aligned mip size in sparse images.
Ari Suonpaa [Wed, 4 Oct 2017 12:10:29 +0000 (15:10 +0300)]
Add tests for aligned mip size in sparse images.

Added tests that verify the mip tail starts at the correct LOD
in case aligned mip size is enabled.

Affects:

dEQP-VK.sparse_resources.aligned_mip_size.*

Components: Vulkan

VK-GL-CTS issue 101

Change-Id: I07f1723359dc20ad2edb18ac668ea5b0fd6785be

6 years agoMerge vk-gl-cts/opengl-cts-4.6.0 into vk-gl-cts/master
Alexander Galazin [Tue, 31 Oct 2017 14:19:33 +0000 (15:19 +0100)]
Merge vk-gl-cts/opengl-cts-4.6.0 into vk-gl-cts/master

Change-Id: I92cf294d57f1ea0f22d8d65a0a246984612952ae

6 years agoMerge vk-gl-cts/opengl-es-cts-3.2.4 into vk-gl-cts/master
Alexander Galazin [Tue, 31 Oct 2017 14:19:33 +0000 (15:19 +0100)]
Merge vk-gl-cts/opengl-es-cts-3.2.4 into vk-gl-cts/master

Change-Id: I6875bda7e1c94df9873486233180d1ce158f302a

6 years agoMerge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master
Alexander Galazin [Tue, 31 Oct 2017 11:42:31 +0000 (12:42 +0100)]
Merge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master

Change-Id: I74b2938bb1e09131e2e3e2c22515e18ed3970138

6 years agoVK_KHR_variable_pointers: Don't use OpPtrAccessChain on a bare SSBO
Jason Ekstrand [Thu, 19 Oct 2017 16:07:52 +0000 (09:07 -0700)]
VK_KHR_variable_pointers: Don't use OpPtrAccessChain on a bare SSBO

You can't use OpPtrAccessChain on the direct result of an OpVariable
because it's not the element of any array.  Instead, we need to do our
OpPtrAccessChain on a pointer to an actual array element and that
pointer needs to be properly decorated with a stride.

Component: Vulkan

VK-GL-CTS issue: https://gitlab.khronos.org/Tracker/vk-gl-cts/issues/686

Affects:
dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.multi_buffer_*

Change-Id: I9c45fb1320099e404672ee169a6a8e5c41eb13f7

6 years agoVK_KHR_variable_pointers: Delete an unused and invalid variable
Jason Ekstrand [Thu, 19 Oct 2017 15:43:36 +0000 (08:43 -0700)]
VK_KHR_variable_pointers: Delete an unused and invalid variable

The %float_var variable was not being used in any way by the test.  It
was also invalid because it had the StorageBuffer storage class (so it's
in external memory) but also had a constant initializer.  The real
variable being tested in these tests is %f32_ptr_var which has the
Function storage class so a constant initializer is fine.

Component: Vulkan

VK-GL-CTS issue: https://gitlab.khronos.org/Tracker/vk-gl-cts/issues/686

Affects:
dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.nullptr_graphics.opvariable_initialized_null_*
dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.nullptr_graphics.opselect_null_or_valid_ptr_*

Change-Id: I9e2f118b1c774a84c0b6900ef0db081cb5256c2f

6 years agoFix attribute mapping in enhanced layouts tests for input arrays
Iago Toral Quiroga [Mon, 2 Oct 2017 11:10:20 +0000 (13:10 +0200)]
Fix attribute mapping in enhanced layouts tests for input arrays

Some tests in KHR-GL45.enhanced_layouts.varying_* (specifically
KHR-GL45.enhanced_layouts.varying_array_{locations,components})
use input arrays on the vertex shader, however, the code
that uploads vertex data for these (and other test cases) doesn't
account for arrays at all.

Also, the tests in this category that call
TextureTestBase::prepareAttributes to do the VAO setup seem to
provide inconsistent values for variable.m_descriptor.m_offset,
which also leads to incorrect vertex attribute mappings.
Specifically, in the 'component' variants of these tests
(such as varying_array_components), two different input variables
have m_offset = 0, which has the consequence that we end up
computing a vertex buffer with a size that's only big enough to
fit one of the inputs and we overwrite the data for the first
input with the data for the second input when we setup the VAO,
however, the 'location' variants (such as varying_array_locations),
see different offsets for different input variables, which leads to
a different VAO setup.

Components: OpenGL
VK-GL-CTS issue: 739

Affects:
KHR-GL45.enhanced_layouts.varying_*
KHR-GL46.enhanced_layouts.varying_*

Change-Id: Icec238a970e2cd67d6109a25fba980f756abb71b

6 years agoSeveral fixes for texture_size_promotion
Juan A. Suarez Romero [Wed, 18 Oct 2017 09:37:27 +0000 (09:37 +0000)]
Several fixes for texture_size_promotion

Specifically, this changeset fixes:

- Check for unsupported framebuffer configurations
- Setup data for depth/stencil textures
- Explicitly set minification/magnification filters
- Deal with the corner cases in precision when using fixed-point
textures.

Affects:

KHR-GL45.texture_size_promotion.functional
KHR-GL46.texture_size_promotion.functional

Components: OpenGL

VK-GL-CTS issue: 783

Change-Id: I3f191084b2a604f1a743759905d641d2b13db2ad

6 years agoRespect GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS
Iago Toral Quiroga [Tue, 17 Oct 2017 07:58:57 +0000 (09:58 +0200)]
Respect GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS

KHR-GL45.enhanced_layouts.xfb_override_qualifiers_with_api
generates shaders that capture XFB for varyings of all types.
For the cases of dmat4x3, dmat3x4 and dmat4, this requires
over 64 transform feedback components in total, which is larger
than the minimum value that implementations are required to
support for GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS,
which the OpenGL 4.6 spec sets in 64. For implementations that
support this minimum, the generated shaders are invalid and
expected to fail to link.

Check the required component size of the XFB for the generated
shaders and skip them if they exceed the implementation limit.
At worse, for implementations that only support the minimum
number of transform feedback components required by the spec
it would only skip the 3 largest types (out of 34 being tested).

Components: OpenGL
VK-GL-CTS issue: 776

Affects:
KHR-GL45.enhanced_layouts.xfb_override_qualifiers_with_api

Change-Id: I51c9da494f96a0746f74116f817d99afd070a9ee

6 years agoComponent aliasing on vertex inputs is allowed
Iago Toral Quiroga [Wed, 18 Oct 2017 10:08:54 +0000 (12:08 +0200)]
Component aliasing on vertex inputs is allowed

From the OpenGL 4.6 spec, section 11.1 Vertex shaders,
page 384:

"It is possible for an application to bind more than one
 attribute name to the same location. This is referred
 to as aliasing. This will only work if only one of the
 aliased attributes is active in the executable program,
 or if no path through the shader consumes more than one
 attribute of a set of attributes aliased to the same
 location. A link error can occur if the linker determines
 that every path through the shader consumes multiple
 aliased attributes, but implementations are not required
 to generate an error in this case."

The varying_location_aliasing_with_mixed_types enhanced
layouts test generates negative tests to check that
component aliasing produces linker errors for all shader
stages, including vertex shaders when the aliasing occurs
on the vertex inputs. By the citation above, the spec
doesn't mandate implementations to produce an error in
this case, so these particular tests are invalid.

This change removes the test cases that expect an error
to be generated for shaders with component aliasing on
vertex shader inputs.

Components: OpenGL
VK-GL-CTS issue: 781

Affects:
KHR-GL45.enhanced_layouts.varying_location_aliasing_with_mixed_types
KHR-GL46.enhanced_layouts.varying_location_aliasing_with_mixed_types

Change-Id: Ie1cafc92c4b7023c3d911ec5fe883dad297029d5

6 years agoOnline compression for ETC2 compressed formats is not required
Eleni Maria Stea [Tue, 13 Jun 2017 07:08:08 +0000 (09:08 +0200)]
Online compression for ETC2 compressed formats is not required

The DSA compressed texture tests currently require online compression for
ETC2 formats but drivers are not required to support this. Since the purpose
of the test is not to test the compression, when a compression format is not
supported we use already compressed data.

Components: OpenGL
VK-GL-CTS issue: 497

Affects:
KHR-GL45.direct_state_access.textures_compressed_subimage

Change-Id: Icff52745e9cf7a2acb39aea71d31f4ff827ea01c

6 years agoDelete incorrect invalid map transform feedback subtest.
Kenneth Graunke [Thu, 12 Oct 2017 04:39:05 +0000 (21:39 -0700)]
Delete incorrect invalid map transform feedback subtest.

The citation given in this test comes from the OpenGL man pages, which
are not authoritative.  The ES 3.2 and GL 4.x specifications say:

   "Effects of Mapping Buffers on Other GL Commands

    Any GL command which attempts to read from, write to, or change the
    state of a buffer object may generate an INVALID_OPERATION error if
    all or part of the buffer object is mapped. However, only commands
    which explicitly describe this error are required to do so. If an
    error is not generated, using such commands to perform invalid
    reads, writes, or state changes will have undefined results and may
    result in GL interruption or termination."

Importantly, it says "_may_ generate an INVALID_OPERATION error".  Some
drivers choose not to implement this to avoid the CPU overhead required
to enforce this optional restriction.

Affects:
- KHR-*.transform_feedback.api_errors_test

VK-GL-CTS issue: 765

Change-Id: I34ca78926fe0f311db096de98b71e0981ee91d53
Components: OpenGL

6 years agoTest separate and combined images and samplers in SPIR-V
Paavo Pessi [Fri, 15 Sep 2017 07:05:52 +0000 (10:05 +0300)]
Test separate and combined images and samplers in SPIR-V

Tests were added to verify that the following Image Instructions
work with related descriptor types in all possible shader stages:

OpImageRead
- Storage image

OpImageFetch
- Sampled image with separate sampler
- Combined image sampler

OpImageSampleExplicitLod
- Sampled image with separate sampler
- Combined image sampler

The following scenarios are covered to verify that images and samplers
work as function parameters and that you can combine an image and a
sampler both before and after passing it into a function.

- Use image and sampler as local variables
- Pass image to function
- Pass sampler to function
- Pass image and sampler to function

New tests:

dEQP-VK.spirv_assembly.instruction.graphics.image_sampler.*
dEQP-VK.spirv_assembly.instruction.compute.image_sampler.*

Components: Vulkan

VK-GL-CTS issue: 104

Change-Id: I1de35fc0099881b3242f6e953a5c9624004e0f3e

6 years agoCopy the gles3/graphicsfuzz data to the output dir
Piers Daniell [Tue, 3 Oct 2017 22:08:51 +0000 (16:08 -0600)]
Copy the gles3/graphicsfuzz data to the output dir

Without this there is no gles3/graphicsfuzz data and
the tests fail.

Affects:

dEQP-GLES3.functional.shaders.metamorphic.synthetic.*

VK-GL-CTS issue: 792

Components: OpenGL

Change-Id: Ibb9627afd83d35ab4ae1b02235eb4a65f4cd7722

6 years agoSkip non accelerated pixel format
Jeannot Breton [Fri, 6 Oct 2017 13:56:17 +0000 (08:56 -0500)]
Skip non accelerated pixel format

They were previously skipped in older CTS version,
but when we reorganized the code to merge all CTS together the
related code got remove

We also fix the way we detect hardware acceleration

Affects:

pixel formats selected by cts-runner on Windows

Components: OpenGL

VK-GL-CTS issue: 692

Change-Id: I9968d85b555fe41aea8e64b885f182407e1ce95e

6 years agoCopyImageSubData with integer textures
Piotr Byszewski [Fri, 8 Sep 2017 12:51:58 +0000 (14:51 +0200)]
CopyImageSubData with integer textures

Make sure that glCopyImageSubData does not generate
GL_INVALID_OPERATION during copying from a single level integer
texture, with BASE_LEVEL and MAX_LEVEL set to 0 and with the
mipmap filters at the default of GL_NEAREST_MIPMAP_LINEAR and
GL_LINEAR.

Components: OpenGL

VK-GL-CTS issue: 607

Affects:
KHR-GL43.copy_image.integer_tex
KHR-GLES32.core.copy_image.*

Change-Id: Ia160481547fed4266cb51ad0fbec89db4407bf8b

6 years agoMerge vk-gl-cts/opengl-cts-4.6.0 into vk-gl-cts/master
Alexander Galazin [Fri, 20 Oct 2017 10:49:07 +0000 (12:49 +0200)]
Merge vk-gl-cts/opengl-cts-4.6.0 into vk-gl-cts/master

Change-Id: I5a9a2484a8f7e7a70466db2ebd6af4f402279021

6 years agoAdd tests to use OpPhi with various variable types
Jari Komppa [Tue, 12 Sep 2017 12:00:59 +0000 (15:00 +0300)]
Add tests to use OpPhi with various variable types

Based on the spec, OpPhi should be able to handle any variable type.
These tests use various variable types (int, float, vec3, mat4, array
and struct) with the OpPhi instruction.

All of the tests are of the form:

    testtype r

    if (indata > 0)
        r = 1
    else
        r = -1

    return (float)r

Affects:

dEQP-VK.spirv_assembly.instruction.compute.opphi.vartype_int
dEQP-VK.spirv_assembly.instruction.compute.opphi.vartype_float
dEQP-VK.spirv_assembly.instruction.compute.opphi.vartype_vec3
dEQP-VK.spirv_assembly.instruction.compute.opphi.vartype_mat4
dEQP-VK.spirv_assembly.instruction.compute.opphi.vartype_array
dEQP-VK.spirv_assembly.instruction.compute.opphi.vartype_struct

Components: Vulkan

VK-GL-CTS issue: 259

Change-Id: I2d090d06c52c904d66b35f8cee5f2895a2087069

6 years agoAvoid watchdog timeout in Vulkan builtin precision tests
Chris Forbes [Mon, 16 Oct 2017 19:42:35 +0000 (12:42 -0700)]
Avoid watchdog timeout in Vulkan builtin precision tests

Calculating the reference intervals can take a substantial amount of
time. On some very slow targets, this can cause us to trip the watchdog
in the verification loop.

Same approach and limit as in modules/glshared/glsBuiltinPrecisionTests.cpp

Affected tests:
dEQP-VK.glsl.builtin.precision.*

Component: Vulkan

Bug: 67854695
Test: run on google devices
Change-Id: I492b656e7e2a9aa724bb3785bdf1416a4c22ec04

6 years agoAdd test for reading samples from previous subpass.
Ari Suonpaa [Mon, 18 Sep 2017 13:09:52 +0000 (16:09 +0300)]
Add test for reading samples from previous subpass.

Added new test under renderpass group where two subpasses are run
and the second one reads samples from the first. This verifies any
of the samples from an input attachment can be read.

Affects: dEQP-VK.renderpass.sampleread.*

Components: Vulkan

VK-GL-CTS issue: 636

Change-Id: I8863a31cbfade75581e0874c936f87e8b23a1619

6 years agoMake 420pack 'binding' layout qualifier tests check MAX_*_IMAGE_UNIFORMS
Kenneth Graunke [Mon, 25 Sep 2017 04:18:11 +0000 (21:18 -0700)]
Make 420pack 'binding' layout qualifier tests check MAX_*_IMAGE_UNIFORMS

Image uniform support is not mandatory for the VS/TCS/TES/GS stages,
so GL_MAX_*_IMAGE_UNIFORMS can report 0.  On such an implementation,
these tests would fail.

This patch skips image testing in any such stages, making them
essentially passthrough shaders.

In BindingImageSingleTest, we also put the binding qualifier in the
fragment shader stage if the stage where we'd normally put it doesn't
support images.  This way, it's guaranteed to exist in at least one
shader stage.

Components: OpenGL

VK-GL-CTS issue: 712

Affects:
* KHR-GL45.shading_language_420pack.binding_images
* KHR-GL45.shading_language_420pack.binding_image_api_override
* KHR-GL45.shading_language_420pack.binding_image_array
* KHR-GL45.shading_language_420pack.binding_image_single
* KHR-GL45.shading_language_420pack.binding_image_default

Change-Id: Ic9eceb4472edff87d5de54ec6318cdb856b0bb8d

6 years agoSkip impossible shader stages in image load store max uniforms test.
Kenneth Graunke [Sun, 24 Sep 2017 23:18:11 +0000 (16:18 -0700)]
Skip impossible shader stages in image load store max uniforms test.

Implementations not required to support images in the geometry stages,
and are allowed to advertise 0 for:

    * GL_MAX_VERTEX_IMAGE_UNIFORMS
    * GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS
    * GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS
    * GL_MAX_GEOMETRY_IMAGE_UNIFORMS

This means that gl_Max*ImageUniforms may be 0, which means that

    #define N_UNIFORMS gl_MaxVertexImageUniforms
    layout(r32i) uniform iimage2D u_image[N_UNIFORMS];

will define a zero sized array, which is illegal.  To work around this,
simply skip stages that have zero supported image uniforms - there's
nothing to test there, anyway.

Components: OpenGL

VK-GL-CTS issue: 712

Affects:
* KHR-GL45.shader_image_load_store.uniform-limits

Change-Id: I14116ff8b4714e04b35ce0929ed68ed0f38e7d52

6 years agoBroadcom Waiver Request for #757
Graeme Leese [Mon, 9 Oct 2017 10:17:28 +0000 (11:17 +0100)]
Broadcom Waiver Request for #757

VK-GL-CTS issue: 757
Affected tests:
dEQP-VK.draw.inverted_depth_ranges.nodepthclamp_deltazero

Component: Vulkan

Change-Id: I22500562b83716697be98605a2b44de83e3132a0

6 years agoAdd tests for inverted depth ranges.
Ari Suonpaa [Thu, 14 Sep 2017 08:02:24 +0000 (11:02 +0300)]
Add tests for inverted depth ranges.

Added a new test under draw group that draws a triangle with
interpolated depth values. Viewport minDepth and maxDepth is
configured so that minDepth >= maxDepth. Test is run with both
depth clamp enabled and disabled.

Affects: dEQP-VK.draw.inverted_depth_ranges.*

Components: Vulkan

VK-GL-CTS issue: 616

Change-Id: I68ff5ea420831600a7cfcc0741820802bb745bdc

6 years agoTest if GL_FRAGMENT_PRECISION_HIGH is exposed
Piotr Byszewski [Thu, 14 Sep 2017 09:34:18 +0000 (11:34 +0200)]
Test if GL_FRAGMENT_PRECISION_HIGH is exposed

GL_FRAGMENT_PRECISION_HIGH macro should be exposed in all ES shaders
from version 300 es onwards, as well as in version 100.

Components: OpenGL

VK-GL-CTS issue: 11

Affects:
KHR-GLES3.core.shader_macros.*
KHR-GLES31.core.shader_macros.*
KHR-GLES32.core.shader_macros.*

Change-Id: I8612a5ebe2c565405ae27319d821a0d6cae4fa52

6 years agoAdd Shader Binary Multiple Shader Objects test case proposal
Adam Czupryna [Wed, 4 Oct 2017 12:44:03 +0000 (14:44 +0200)]
Add Shader Binary Multiple Shader Objects test case proposal

This is Shader Binary Multiple Shader Objects test case proposal to
CTS_ARB_gl_spirv specification.

Components: OpenGL

VK-GL-CTS issue: 554

Change-Id: I05817ca5e8daf5f1e08a849a67de3784376f317a

6 years agoMerge vk-gl-cts/opengl-cts-4.6.0 into vk-gl-cts/master
Alexander Galazin [Fri, 13 Oct 2017 07:24:43 +0000 (09:24 +0200)]
Merge vk-gl-cts/opengl-cts-4.6.0 into vk-gl-cts/master

Change-Id: Ief4d74bb43002c377e9bcfa941dd80bc627b68b1

6 years agoDelete incorrect invalid map CTS tests.
Kenneth Graunke [Fri, 8 Sep 2017 23:18:49 +0000 (16:18 -0700)]
Delete incorrect invalid map CTS tests.

The citation given in these tests comes from the OpenGL man pages, which
are not authoritative.  The ES 3.2 and GL 4.x specifications say:

   "Effects of Mapping Buffers on Other GL Commands

    Any GL command which attempts to read from, write to, or change the
    state of a buffer object may generate an INVALID_OPERATION error if
    all or part of the buffer object is mapped. However, only commands
    which explicitly describe this error are required to do so. If an
    error is not generated, using such commands to perform invalid
    reads, writes, or state changes will have undefined results and may
    result in GL interruption or termination."

Importantly, it says "_may_ generate an INVALID_OPERATION error".  Some
drivers choose not to implement this to avoid the CPU overhead required
to enforce this optional restriction.

Affects:
- KHR-*.draw_elements_base_vertex_tests.invalid_mapped_bos

VK-GL-CTS issue: 682

Components: OpenGL

Change-Id: I4c0f7785ca7a747145591d071dda6e5231c787d4
(cherry picked from commit 6a50dd2a2cd0a3f867fe6bdabbf8dc9fb678fb99)

6 years agoMerge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master
Alexander Galazin [Wed, 11 Oct 2017 10:43:53 +0000 (12:43 +0200)]
Merge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master

Change-Id: I630355a8c937c0fcd2ea102e5b1dcce81eb58753

6 years agoAdd multiple contexts tests
Piotr Byszewski [Fri, 25 Aug 2017 11:39:58 +0000 (13:39 +0200)]
Add multiple contexts tests

multiple_contexts test (one of shader_subroutine tests) was modified
and moved to contextless module. Shared contexts functionality was
restored in framework.

Components: Framework, OpenGL

VK-GL-CTS issue: 612

Affects:
KHR-NoContext.gl40.multiple_contexts.uniform_preservation
KHR-GL40.shader_subroutine.multiple_contexts

Change-Id: Id170ef37c2e3c488095663c91788978223d356ec
(cherry picked from commit 1b91247d4ad206cbdbef731a2bac9151d6ddda70)

6 years agoRemove ES3PlusWrapperContext
Piotr Byszewski [Thu, 7 Sep 2017 13:35:02 +0000 (15:35 +0200)]
Remove ES3PlusWrapperContext

ES3PlusWrapperContext is not maintained anymore.

Components: Framework

Change-Id: I4327c219d6fd0362da89449884be48c1109a9b62
(cherry picked from commit bda54aaefe2ce0c6bf05b1fc58b98721b9a9f1a2)

6 years agoAlways apply flat qualifier to double inputs, same as int/uint
Ilia Mirkin [Sat, 9 Sep 2017 22:27:30 +0000 (18:27 -0400)]
Always apply flat qualifier to double inputs, same as int/uint

Affects:

KHR-GL45.enhanced_layouts.varying_structure_locations

Components: OpenGL

GitHub Issue: #53

(cherry picked from commit 878a6a5a8343b710ff7a7fcff0c219a25d0c4368)

Change-Id: I84de1d9b42695034a7b2f60c3fc5a19213733085

6 years agoTest EXT_shader_group_vote using variables
Piotr Byszewski [Tue, 19 Sep 2017 14:53:49 +0000 (16:53 +0200)]
Test EXT_shader_group_vote using variables

Current tests call shader group functions passing directly True/False
values. This change adds test that verifies new functions using
variables.
This change also reduces workgroup size for ES as all tests were
previously using workgroup size that was greater than the minimum
required.

Components: OpenGL

VK-GL-CTS issue: 693

Affects:
KHR-GL45.shader_group_vote.*
KHR-GLES31.core.shader_group_vote.*

Change-Id: Icbb5c278c65edd04fe339e31934df7624834c439

6 years agoVK_KHR_incremental_present: Trigger the fence off vkQueueSubmit
Jason Ekstrand [Fri, 6 Oct 2017 23:10:26 +0000 (16:10 -0700)]
VK_KHR_incremental_present: Trigger the fence off vkQueueSubmit

Previously, the tests were using AcquireNextImage to trigger the fence
and using it to guard the vkFreeCommandBuffers call.  However, the
acquire fence tells you when the PE is done with an image and when you
can start rendering to it.  This meant that the test was waiting for the
start of the previous frame's rendering not the end before deleting the
previous frame's command buffer.  This meant that the previous frame's
rendering could still be active on the GPU when the command buffer was
freed.  By triggering the fence off of the vkQueueSubmit, we wait for
the end of the previous frame's rendering before freeing its command
buffer.

VK-GL-CTS issue: 756

Component: Vulkan

Affects:
dEQP-VK.wsi.*.incremental_present.*

Change-Id: I87b25eb2a25e4ae48c8c527d5d63c45d89a31a30
(cherry picked from commit db916576a76a17c02c14390fc5d5b3db1488d1d2)

6 years agoDrawUtil: Fix depthBounds check
Igor Ostrowski [Mon, 9 Oct 2017 14:41:31 +0000 (16:41 +0200)]
DrawUtil: Fix depthBounds check

Affects:
dEQP-VK.glsl.builtin_var.fragdepth*

Components: Vulkan

VK-GL-CTS issue: 758

Change-Id: I4da79b236921e64f11566fe386b144497249123b

6 years agoFix KHR-GL45/46.enhanced_layouts.varying_block_member_locations
Eleni Maria Stea [Wed, 20 Sep 2017 11:28:40 +0000 (14:28 +0300)]
Fix KHR-GL45/46.enhanced_layouts.varying_block_member_locations

The stages of the same program used in/out blocks that didn't match
(see section 4.7.1 in OpenGL 4.5 spec: qualification mismatch) and as a
result a linker error was produced. With this change all stages use the
same block definition which is either the 1st or the 2nd depending on
the iteration but not both at the same time:

Goku {
    vec4 gohan;
    vec4 goten;
    vec4 chichi;
} gokuARRAY;

Goku {
    layout (location = 2) vec4 gohan;
    layout (location = 4) vec4 goten;
    layout (location = 6) vec4 chichi;
} gokuARRAY;

Affects:

KHR-GL46.enhanced_layouts.varying_block_member_locations
KHR-GL45.enhanced_layouts.varying_block_member_locations

Components: OpenGL

VK-GL-CTS issue: 703

Change-Id: I03a6a90929e28489a2507838003c62475a8a58b8
(cherry picked from commit 4b6462e469359ac7ddec9c63d042e43ead6031fc)

6 years agoIncrease negative GLSL coverage
Piotr Byszewski [Thu, 14 Sep 2017 14:06:49 +0000 (16:06 +0200)]
Increase negative GLSL coverage

GLSL and ESSL specify that the following are legal declarations:
  int;
  int ,a;
while the following are not:
  struct foo { int; };
  struct bar { int ,a; };
  int a,;

Components: OpenGL

VK-GL-CTS issue: 7

Affects:
KHR-GL33.shaders.declarations.*
KHR-GLES3.shaders.declarations.*

Change-Id: Ib1735ca96e4ce7be60fa0ca91c64f7392b237605

6 years agoIncrease coverage for robustness
Piotr Byszewski [Mon, 7 Aug 2017 12:12:55 +0000 (14:12 +0200)]
Increase coverage for robustness

Out-of-range fetching tests verify fetches 4K, 1MB and 10MB past
the end of the object.

Components: OpenGL

VK-GL-CTS issue: 16

Affects:
KHR-GL43.robust_buffer_access_behavior.*
KHR-GLES32.robust.robust_buffer_access_behavior.*

Change-Id: Ibad4eb3e30f3dc48b2d5ecb4781014a4374e4dc5

6 years agoTests mixing UB/SSB with and without instance names
Piotr Byszewski [Fri, 15 Sep 2017 13:36:25 +0000 (15:36 +0200)]
Tests mixing UB/SSB with and without instance names

Matched uniform or shader storage block names (but not input or
output block names) must also either all be lacking an instance
name or all having an instance name.

Components: OpenGL

VK-GL-CTS issue: 3

Affects:
KHR-GL43.shader_storage_buffer_object.basic-name-match
KHR-GLES31.core.shader_storage_buffer_object.basic-name-match
KHR-GL33.shaders.uniform_block.common.name_matching
KHR-GLES3.shaders.uniform_block.common.name_matching

Change-Id: I7dc3476272d6f3fca3faa7e6bc57a008bce0e17f

6 years agoFix non-unique type declarations in tests
Andrey Tuganov [Wed, 20 Sep 2017 20:42:35 +0000 (16:42 -0400)]
Fix non-unique type declarations in tests

Multiple test code generators were generating incorrect SPIR-V code
(non-unique type declarations of non-aggregate types).

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

VK-GL-CTS issue: 195

Change-Id: I55200a2b78c84c298db05f34892aa4cffbfff74c

6 years agoCorrect image usage flags for YCbCr copy tests
Jorg Wagner [Thu, 28 Sep 2017 11:59:51 +0000 (13:59 +0200)]
Correct image usage flags for YCbCr copy tests

The images are used as copy source and destination,
hence TRANSFER_SRC | TRANSFER_DST must be present
in the usage flags.

Images are not sampled from - remove SAMPLED flag.

Affects:
dEQP-VK.ycbcr.copy.*

Components: Vulkan

VK-GL-CTS issue: 715

Change-Id: Ie53d3e2fb18aa834af12938cd822aa6c50f75986
(cherry picked from commit f2a5b768c81760bef727f1d72741e74274968518)

6 years agoSerialize region copies for YCbCr copy tests
Panagiotis Apostolou [Thu, 7 Sep 2017 11:54:51 +0000 (13:54 +0200)]
Serialize region copies for YCbCr copy tests

As the generated regions can overlap - force all calls
of vkCmdCopyImage() to be executed sequentially by adding
a pipeline barrier between each call to avoid producing
undefined results.

Affects:
dEQP-VK.ycbcr.copy.*

Components: Vulkan

VK-GL-CTS issue: 716

Change-Id: Ifed67cdc077a8c03630b36f8aa59bd6dae0578a3
(cherry picked from commit 9fe7d4753721d10235cbf38194cf7c8cf2eb7d19)

6 years agoFix KHR-GL45/46.enhanced_layouts.varying_block_member_locations
Eleni Maria Stea [Wed, 20 Sep 2017 11:28:40 +0000 (14:28 +0300)]
Fix KHR-GL45/46.enhanced_layouts.varying_block_member_locations

The stages of the same program used in/out blocks that didn't match
(see section 4.7.1 in OpenGL 4.5 spec: qualification mismatch) and as a
result a linker error was produced. With this change all stages use the
same block definition which is either the 1st or the 2nd depending on
the iteration but not both at the same time:

Goku {
    vec4 gohan;
    vec4 goten;
    vec4 chichi;
} gokuARRAY;

Goku {
    layout (location = 2) vec4 gohan;
    layout (location = 4) vec4 goten;
    layout (location = 6) vec4 chichi;
} gokuARRAY;

Affects:

KHR-GL46.enhanced_layouts.varying_block_member_locations
KHR-GL45.enhanced_layouts.varying_block_member_locations

Components: OpenGL

VK-GL-CTS issue: 703

Change-Id: I03a6a90929e28489a2507838003c62475a8a58b8

6 years agoTest struct names hiding other struct names
Piotr Byszewski [Mon, 11 Sep 2017 16:31:16 +0000 (18:31 +0200)]
Test struct names hiding other struct names

Test if names are correctly hidden when a level of nesting is
involved.

Components: OpenGL

VK-GL-CTS issue: 14

Affects:
KHR-GLES3.shaders.name_hiding.*

Change-Id: I3eb83bfcf6d10fcb15abaa6c086ecd5f9c3d0b36

6 years agoFix locations in enhanced layouts tests
Iago Toral Quiroga [Fri, 22 Sep 2017 09:06:50 +0000 (11:06 +0200)]
Fix locations in enhanced layouts tests

Some of the tests query the last output location in
each shader stage and write an output to them that is
then read in the next shader stage, but they do not
consider if that location exists in the next shader
stage.

Fix this by selecting the maximum output location to
use as the minimum between the stage's maximum output
location and the next stage's maximum input location.

The same issue applies to the maximum input location
available in each shader stage.

Components: OpenGL
VK-GL-CTS issue: 708

Affects:
KHR-GL45.enhanced_layouts.varying_components
KHR-GL45.enhanced_layouts.varying_locations
KHR-GL45.enhanced_layouts.varying_location_limit
KHR-GL46.enhanced_layouts.varying_components
KHR-GL46.enhanced_layouts.varying_locations
KHR-GL46.enhanced_layouts.varying_location_limit

Change-Id: Iacf84bd3eeb33eadaf5a9a816f7ebb7205492af5

6 years agoFixed invalid OpPtrAccessChain usage in access chain tests.
Ari Suonpaa [Thu, 21 Sep 2017 06:13:33 +0000 (09:13 +0300)]
Fixed invalid OpPtrAccessChain usage in access chain tests.

Modified  dEQP-VK.spirv_assembly.instruction.*.indexing.* tests to
use an array of structs as input to have a meaningful usage of
OpPtrAccessChain.

Affects:

dEQP-VK.spirv_assembly.instruction.*.indexing.*

Components: Vulkan

VK-GL-CTS issue 686

Change-Id: Ia1604d5a24712c522f51cbd0692d85b1baa2d27c

6 years agoTest BLOCK_INDEX of uniform inside block array
Piotr Byszewski [Wed, 13 Sep 2017 07:56:42 +0000 (09:56 +0200)]
Test BLOCK_INDEX of uniform inside block array

Uniform blocks declared in an array are considered active
if any member of the array would otherwise be considered
active.

Components: OpenGL

VK-GL-CTS issue: 13

Affects:
KHR-GL43.program_interface_query.uniform-block-array
KHR-GLES31.core.program_interface_query.uniform-block-array

Change-Id: Iaa67be6f23f168e35e5ddc3965342756dc2c59ed

6 years agoAllow min/max/clamp to flush subnormals only during comparison
Nicolai Hähnle [Wed, 20 Sep 2017 20:26:44 +0000 (22:26 +0200)]
Allow min/max/clamp to flush subnormals only during comparison

An implementation may follow the rule that subnormals are flushed
to zero for all arithmetic operations (including comparisons), but
never for mere copies.

In this case, if the input to min/max/clamp contains more than one
subnormal number (including +/-0.0), the returned value may be any
of the subnormal numbers and not really the true minimum/maximum/
clamped value.

This does not hurt real applications, since any subsequent use of
the result will flush it to zero anyway, and it does seem to be
implicitly allowed by the GLSL ES spec.

Change the implementation of min/max/clamp to explicitly handle
the subnormal case in the comparison.

Components: AOSP

VK-GL-CTS issue: 705

Affects:
dEQP-GLES3.functional.shaders.builtin_functions.precision.clamp.*
dEQP-GLES3.functional.shaders.builtin_functions.precision.max.*
dEQP-GLES3.functional.shaders.builtin_functions.precision.min.*
dEQP-GLES31.functional.shaders.builtin_functions.precision.clamp.*
dEQP-GLES31.functional.shaders.builtin_functions.precision.max.*
dEQP-GLES31.functional.shaders.builtin_functions.precision.min.*

Change-Id: I9a5bed9d78e311f96fe03b689299d777050ea063

6 years agoAdd CTS_ARB_gl_spirv test specification proposal
Adam Czupryna [Thu, 29 Jun 2017 14:50:53 +0000 (16:50 +0200)]
Add CTS_ARB_gl_spirv test specification proposal

This is CTS_ARB_gl_spirv test specification proposal.

Components: OpenGL

VK-GL-CTS issue: 554

Change-Id: I95478228f66c27ed5ff78a9e17a0381512abbf21

6 years agoTest vkCmdBlitImage for cubemaps with layerCount=6
Paavo Pessi [Thu, 21 Sep 2017 10:08:13 +0000 (13:08 +0300)]
Test vkCmdBlitImage for cubemaps with layerCount=6

Tests were added to verify that the typical use-case of generating
mipmap levels for cubemaps with vkCmdBlitImage() works with all supported
formats.

Tests in 'from_base_level' group use the base image as a source for all
mip levels and generate all mip levels for all six image layers with a
single blit command.

Tests in 'from_previous_level' group use the previous mip level as a
source for the next mip level and generate each mip level for all
six image layers with a separate blit command with barriers between
each blit.

Existing mipmap tests cases in the
dEQP-VK.api.copy_and_blit.*.blit_image.all_formats.generate_mipmaps.*
test group were moved to
dEQP-VK.api.copy_and_blit.*.blit_image.all_formats.generate_mipmaps.*.layercount_1.*

New tests:

dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.generate_mipmaps.*.layercount_6.*
dEQP-VK.api.copy_and_blit.dedicated_allocation.blit_image.all_formats.generate_mipmaps.*.layercount_6.*

Components: Vulkan

VK-GL-CTS issue: 615
VK-GL-CTS public issue: 50

Change-Id: I512484434dda155b668a600c8303650d42417e0a

6 years agoMerge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master
Alexander Galazin [Thu, 28 Sep 2017 10:55:33 +0000 (12:55 +0200)]
Merge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master

Change-Id: Ic02c027d4172d581d782eec10ba3bf8955c2c356

6 years agoValidate empty render pass
Paavo Pessi [Fri, 22 Sep 2017 09:00:16 +0000 (12:00 +0300)]
Validate empty render pass

The test creates a render pass and a subpass with no input, color,
resolve or depth/stencil attachments and executes a single draw
command.

New tests:

dEQP-VK.renderpass.suballocation.simple.no_attachments
dEQP-VK.renderpass.dedicated_allocation.simple.no_attachments

Components: Vulkan

VK-GL-CTS issue: 620
VK-GL-CTS public issue: 10

Change-Id: I0da8a6850898979e65d39f323b14694968d9d6c5

6 years agoTest reading compute shader builtin vars by component
David Neto [Thu, 14 Sep 2017 22:03:37 +0000 (18:03 -0400)]
Test reading compute shader builtin vars by component

- Adds a test of reading compute shader builtin variables by component.
  These get test case name suffix of "_component".
- Previous behaviour, reading the whole builtin variable, is preserved
  in cases but without an extra suffix.
- WorkgroupSize builtin is made specializable to prevent Glslang
  from constant folding its value.

Affects:
Components: Vulkan

dEQP-VK.compute.builtin_var.*

VK-GL-CTS issue: 694

Change-Id: Ia783babf4ba5e24fc58bc9d19594bb7d921de7c9

6 years agoRemove YCbCr from the instance extensions
Alexander Galazin [Wed, 27 Sep 2017 12:13:30 +0000 (14:13 +0200)]
Remove YCbCr from the instance extensions

VK_KHR_sampler_ycbcr_conversion is a device extension.
It must not be listed as an allowed instance extension.

Components: Vulkan

VK-GL-CTS issue: 698

Affects:
dEQP-VK.api.info.instance.extensions

Change-Id: I1ee1448535df75016a0214ebfe800a476daf32c4