platform/upstream/VK-GL-CTS.git
2 years agoWire up support for maintenance4 validation
Graeme Leese [Mon, 9 Aug 2021 16:31:31 +0000 (17:31 +0100)]
Wire up support for maintenance4 validation

Pass the appropriate option to spirv-val if VK_KHR_maintenance4 is
supported.

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

Change-Id: I554bac9160dc55a017e1358a579b59249ed81079

2 years agoAdd ClearAttachments test to KHR_dynamic_rendering
Arkadiusz Sarwa [Thu, 17 Jun 2021 15:30:59 +0000 (17:30 +0200)]
Add ClearAttachments test to KHR_dynamic_rendering

VK-GL-CTS Issue: 2858

Components: Vulkan

Affects: dEQP-VK.dynamic_rendering.*

Change-Id: I2ce363d66c806c3369c50fc9710dc5245fd6546d

2 years agoTest dynamic rendering with FSR tests
Piotr Byszewski [Tue, 1 Jun 2021 15:17:24 +0000 (17:17 +0200)]
Test dynamic rendering with FSR tests

This CL generalizes fragment_shading_rate tests to also
test functionality added with VK_KHR_dynamic_rendering extension.

Components: Vulkan

VK-GL-CTS issue: 2858

Affets:
dEQP-VK.fragment_shading_rate*

Change-Id: I769cf608344df04f38cc46e3978511e548124a82

2 years agoAdd additional tests for VK_KHR_dynamic_rendering
Arkadiusz Sarwa [Wed, 2 Jun 2021 11:38:53 +0000 (13:38 +0200)]
Add additional tests for VK_KHR_dynamic_rendering

Change testing:

In one primary command buffer, record two render pass instances,
with the second resuming the first. In the first, draw one triangle
directly in the primary command buffer. For the second,
use CONTENTS_SECONDARY_COMMAND_BUFFER_BIT_KHR, draw the second
triangle in a secondary command buffer, and execute it in that
second render pass instance.

In one primary command buffer, record two render pass instances,
with the second resuming the first. In the first,
use CONTENTS_SECONDARY_COMMAND_BUFFER_BIT_KHR, draw the first triangle
in a secondary command buffer, and execute it in that first render pass
instance. In second, draw one triangle directly in primary command buffer.

In two primary command buffers, record two render pass instances,
with the second resuming the first. In the first, draw one triangle
directly in the primary command buffer. For the second,
use CONTENTS_SECONDARY_COMMAND_BUFFER_BIT_KHR, draw the second triangle
in a secondary command buffer, and execute it in that second render pass.

In two primary command buffers, record two render pass instances,
with the second resuming the first. In the first,
use CONTENTS_SECONDARY_COMMAND_BUFFER_BIT_KHR, draw the first triangle
in a secondary command buffer, and execute it in that first render pass.
In the second, draw one triangle directly in the primary command buffer.

New tests:
dEQP-VK.dynamic_rendering.contents_*secondary*cmdbuffers_resuming

Components: Vulkan
VK-GL-CTS issue: 2858

Change-Id: I0560c4bd1e2b3d8a3d9bcff8c72ab79e3c260cfe

2 years agoAdd new tests for VK_KHR_dynamic_rendering
Arkadiusz Sarwa [Thu, 15 Apr 2021 15:31:15 +0000 (17:31 +0200)]
Add new tests for VK_KHR_dynamic_rendering

Change testing:

Draw two triangles in a single primary command buffer,
beginning and ending the render pass instance

Draw two triangles in a single primary command buffer,
but across two render pass instances, with the second RESUMING first.

Draw two triangles in two primary command buffers,
across two render pass instances, with the second RESUMING the first.

Draw two triangles in two secondary command buffers,
across two render pass instances, with the second RESUMING the first,
both executed in the same primary command buffer.

Draw two triangles in two secondary command buffers,
across two render pass instances, with the second RESUMING the first,
executed in two primary command buffers.

Using CONTENTS_SECONDARY_COMMAND_BUFFER_BIT_KHR, draw two triangles in
one secondary command buffer, and execute it inside single render pass
instance in one primary command buffer.

Using CONTENTS_SECONDARY_COMMAND_BUFFER_BIT_KHR, draw two triangles in
two secondary command buffers, execute them inside a single render pass
instance in one primary command buffer.

Using CONTENTS_SECONDARY_COMMAND_BUFFER_BIT_KHR, draw two triangles in
two secondary command buffers, and execute them inside two render pass
instances, with the second RESUMING the first, both recorded in
the same primary command buffer.

Using CONTENTS_SECONDARY_COMMAND_BUFFER_BIT_KHR, draw two triangles in
two secondary command buffers, and execute them inside two render pass
instances, with second RESUMINGfirst, recorded into two primary
cmdbuffers.

New tests:
dEQP-VK.dynamic_rendering*

Components: Vulkan
VK-GL-CTS issue: 2858

Change-Id: I511b04022eaae8b0876a3733f3405eddba7309b1

2 years agoTest dynamic rendering with renderpass tests
Piotr Byszewski [Thu, 27 May 2021 11:58:42 +0000 (13:58 +0200)]
Test dynamic rendering with renderpass tests

This CL generalizes aplicable renderpass tests to also test
functionality added with VK_KHR_dynamic_rendering extension.

Components: Vulkan

VK-GL-CTS issue: 2858

Affets:
dEQP-VK.renderpass*

Change-Id: I3a8e25ba3dced9c92f3ca96bd98bd56f677d9bca

2 years agoTest dynamic rendering with draw tests
Piotr Byszewski [Sat, 15 May 2021 09:06:29 +0000 (11:06 +0200)]
Test dynamic rendering with draw tests

This CL generalizes most of draw tests to also test
functionality added with VK_KHR_dynamic_rendering extension.

Components: Vulkan

VK-GL-CTS issue: 2858

Affets:
dEQP-VK.draw*
dEQP-VK.conditional_rendering.draw.*
dEQP-VK.conditional_rendering.clear_attachments.*

Change-Id: Ie7898714ed16056d4ac94b4165f637c867eadfb0

2 years agomaintenance4: Add push-constant test
Piotr Byszewski [Thu, 15 Jul 2021 17:46:24 +0000 (19:46 +0200)]
maintenance4: Add push-constant test

Test creates a pipeline with a push-constant, but not initialize
that push constant. The test runs without crashing when reading
that undefined value.

Components: Vulkan

VK-GL-CTS issue: 2996

Affets:
dEQP-VK.pipeline.push_constant.compute_pipeline.*

Change-Id: I0ca1d4082daccd628e26936b4b0b17550c698a1e

2 years agomaintenance4: Add pipeline layout tests
Piotr Byszewski [Mon, 12 Jul 2021 19:00:36 +0000 (21:00 +0200)]
maintenance4: Add pipeline layout tests

Test destroying pipeline layout after creating
compute and graphics pipeline.

Components: Vulkan

VK-GL-CTS issue: 2996

Affets:
dEQP-VK.api.pipeline.*

Change-Id: I1a70c67f870ef6cb2341cf9a1236c6d9f127dc54

2 years agomaintenance4: Add maxBufferSize limit tests
Piotr Byszewski [Wed, 14 Jul 2021 07:52:10 +0000 (09:52 +0200)]
maintenance4: Add maxBufferSize limit tests

Verify that VkBuffer with maxBufferSize can be created
for both normal and sparse buffers.

Components: Vulkan

VK-GL-CTS issue: 2996

Affets:
dEQP-VK.api.buffer.basic.*

Change-Id: I439a4f9ab0d809367054e711dc128a3c2aabecf9

2 years agoFramework for VK_KHR_maintenance4
Piers Daniell [Thu, 8 Jul 2021 19:58:03 +0000 (13:58 -0600)]
Framework for VK_KHR_maintenance4

This is just the vulkan_core.h and generated framework
for VK_KHR_maintenance4. Other CLs can be chained off
this one.

Affects: nothing

Components: Framework, Vulkan

VK-GL-CTS issue: 2996

Change-Id: I9390991586dcd24c3e07fd39e0a9e2053c291324

2 years agoChange RobustnessExt tests to use format_features2
Graeme Leese [Wed, 14 Jul 2021 13:45:17 +0000 (14:45 +0100)]
Change RobustnessExt tests to use format_features2

The no_fmt_qual variants of these tests can run on any format that
exposes the feature flag. This means that we get somewhat more coverage
on implementations that don't support both reading and writing without
format qualifiers.

Components: Vulkan
Affects: dEQP-VK.robustness.robustness2.*
         dEQP-VK.robustness.image_robustness.*

Change-Id: I8564fcd9d1c4eefc28239657b61536a0b8ecdfb5

2 years agoTests for VK_KHR_format_feature_flags2 extension
michal_jakubek [Wed, 5 May 2021 13:28:16 +0000 (15:28 +0200)]
Tests for VK_KHR_format_feature_flags2 extension

This CL also add tests for shadow sampling of R textures.

New tests:
dEQP-VK.api.format_feature_flags2.*

Affects:
dEQP-VK.image.store.*
dEQP-VK.image.load_store.*
dEQP-VK.texture.shadow.*

Components: Vulkan
VK-GL-CTS issue: 2826

Change-Id: I8f4ad7504b4f198f508b307346c4daa9ace72664

2 years agoExtend decoration mismatch tests
Piotr Byszewski [Mon, 7 Jun 2021 11:49:31 +0000 (13:49 +0200)]
Extend decoration mismatch tests

Recent changes to specification changed interface matching
rules and this CL adds tests that check decoration
mismatch in structures.

Components: Vulkan

VK-GL-CTS issue: 2554

Affects:
dEQP-VK.pipeline.interface_matching.decoration_mismatch.*

Change-Id: I25930e6a4b02456acbcb6584f3308435898f475e

2 years agoAdd tests for relaxed vector matching
Piotr Byszewski [Fri, 28 May 2021 11:25:24 +0000 (13:25 +0200)]
Add tests for relaxed vector matching

VK_KHR_maintenance4 relaxed vector matching rules
in interface matching section.

Components: Vulkan

VK-GL-CTS issue: 2553

Affects:
dEQP-VK.pipeline.interface_matching.*

Change-Id: I79c96b88e41dba13570d518b07b8d5ef9a599d41

2 years agoAdd tests for vector matching
Piotr Byszewski [Thu, 21 Jan 2021 15:53:23 +0000 (16:53 +0100)]
Add tests for vector matching

Components: Vulkan

VK-GL-CTS issue: 2553

New tests:
dEQP-VK.pipeline.interface_matching.*

Change-Id: I1354266e11ed7293c6b44526b2aa24427b0e86d5

2 years agoAdd decoration mismatch tests
Piotr Byszewski [Thu, 21 Jan 2021 15:53:23 +0000 (16:53 +0100)]
Add decoration mismatch tests

Components: Vulkan

VK-GL-CTS issue: 2554

New tests:
dEQP-VK.pipeline.interface_matching.decoration_mismatch.*

Change-Id: I4f98d36b0568234d303e3234d78c2023f866b775

2 years agoMerge branch 'vulkan-cts-1.2.7'
Peter Kohaut [Fri, 3 Sep 2021 12:11:08 +0000 (14:11 +0200)]
Merge branch 'vulkan-cts-1.2.7'

Change-Id: I0034a268b5c4dd313953bf4cd8b6511fd3b5635e

2 years agoRemove unreachable breaks
Mika Väinölä [Tue, 24 Aug 2021 10:51:42 +0000 (13:51 +0300)]
Remove unreachable breaks

Fix warnings for Clang builds with -Wunreachable-code-break.

Components: Framework, OpenGL, OpenGL ES, Vulkan

VK-GL-CTS issue: 3074

Change-Id: Ib658e631bad3d06d787c6151f744e8db3e850fb4

2 years agoAdd a batch of GraphicsFuzz coverage tests
Antto Mäkinen [Fri, 4 Jun 2021 12:15:17 +0000 (15:15 +0300)]
Add a batch of GraphicsFuzz coverage tests

This commit adds a batch of GraphicsFuzz coverage tests.

The tests have been separated by a request.

Components: Vulkan

New Tests:

dEQP-VK.graphicsfuzz.cov-dfdx-dfdy-after-nested-loops
dEQP-VK.graphicsfuzz.cov-nested-loops-float-array-select-by-fragcoord
dEQP-VK.graphicsfuzz.cov-nested-loops-set-struct-data-verify-in-function

Change-Id: I33b01c2f14318fb65b1f895eea89433828c82d51

2 years agoMerge branch 'vulkan-cts-1.2.6' into vulkan-cts-1.2.7
Peter Kohaut [Fri, 3 Sep 2021 11:11:48 +0000 (13:11 +0200)]
Merge branch 'vulkan-cts-1.2.6' into vulkan-cts-1.2.7

Change-Id: I5d1960f36c445e344a36442d03b7a71a50732038

2 years agoFix GLES3 Clang UBSan errors
Mika Väinölä [Tue, 10 Aug 2021 05:55:03 +0000 (08:55 +0300)]
Fix GLES3 Clang UBSan errors

Fix or avoid runtime errors detected by Clang's undefined behavior
sanitizer in the GLES3 module.

Affected tests:
dEQP-GLES3.functional.shaders.operator.unary_operator.minus.*
dEQP-GLES3.functional.fragment_out.basic.*
dEQP-GLES3.functional.texture.filtering.2d.formats.*

Components: OpenGL ES, Framework

VK-GL-CTS issue: 3018

Change-Id: Ic10ae433deb2f835ceb2fe3ab9664b05f72cd3d0

2 years agoMerge branch 'vulkan-cts-1.2.5' into vulkan-cts-1.2.6
Peter Kohaut [Fri, 3 Sep 2021 10:20:36 +0000 (12:20 +0200)]
Merge branch 'vulkan-cts-1.2.5' into vulkan-cts-1.2.6

Change-Id: Ia705e141206a3751d4abc2d6eccd958d7e3f2f0e

2 years agoMerge branch 'vulkan-cts-1.2.4' into vulkan-cts-1.2.5
Peter Kohaut [Fri, 3 Sep 2021 07:33:02 +0000 (09:33 +0200)]
Merge branch 'vulkan-cts-1.2.4' into vulkan-cts-1.2.5

Change-Id: I952af5b744206c52b4161d8c1102b6a8c2a53f58

2 years agoMerge branch 'vulkan-cts-1.2.3' into vulkan-cts-1.2.4
Peter Kohaut [Thu, 2 Sep 2021 20:22:53 +0000 (22:22 +0200)]
Merge branch 'vulkan-cts-1.2.3' into vulkan-cts-1.2.4

Change-Id: Ica9ea69514cd36415ad89f4b34e8384b0523181c

2 years agoMerge remote-tracking branch 'origin/vulkan-cts-1.2.2' into vulkan-cts-1.2.3
Peter Kohaut [Thu, 2 Sep 2021 17:05:54 +0000 (19:05 +0200)]
Merge remote-tracking branch 'origin/vulkan-cts-1.2.2' into vulkan-cts-1.2.3

Change-Id: I3c5b289149d9f2601b5d5ab8986d41b3f33f8bab

2 years agoAdd a batch of GraphicsFuzz coverage tests
Antto Mäkinen [Mon, 30 Aug 2021 09:55:27 +0000 (12:55 +0300)]
Add a batch of GraphicsFuzz coverage tests

This commit adds a batch of GraphicsFuzz coverage tests.

Components: Vulkan

New Tests:

dEQP-VK.graphicsfuzz.cov-condition-bitfield-extract-integer
dEQP-VK.graphicsfuzz.cov-condition-matrix-determinant-uniform
dEQP-VK.graphicsfuzz.cov-descending-loop-index-temporary-array
dEQP-VK.graphicsfuzz.cov-do-while-switch-case-bitcount-findmsb
dEQP-VK.graphicsfuzz.cov-dummy-function-loop-array-element-increment-never-read
dEQP-VK.graphicsfuzz.cov-fragcood-multiple-conditions-function-loop-global-counter
dEQP-VK.graphicsfuzz.cov-fragcoord-multiple-conditions-function-global-loop-counter-simplified
dEQP-VK.graphicsfuzz.cov-function-nested-do-whiles-looped-once
dEQP-VK.graphicsfuzz.cov-int-initialize-from-multiple-large-arrays
dEQP-VK.graphicsfuzz.cov-loop-break-after-first-iteration-set-array-element
dEQP-VK.graphicsfuzz.cov-loop-condition-bitfield-extract-set-array-elements
dEQP-VK.graphicsfuzz.cov-loop-condition-logical-or-never-iterated
dEQP-VK.graphicsfuzz.cov-loop-fragcoord-identical-condition
dEQP-VK.graphicsfuzz.cov-loop-set-vector-components-pow-two
dEQP-VK.graphicsfuzz.cov-multiple-fragcoord-conditions-false-never-return-sample-texture
dEQP-VK.graphicsfuzz.cov-multiple-fragcoord-conditions-never-return-color-uninitialized
dEQP-VK.graphicsfuzz.cov-nested-loop-continue-inner-copy-array-element
dEQP-VK.graphicsfuzz.cov-nested-loop-not-greater-than-increment-array-element
dEQP-VK.graphicsfuzz.cov-nested-loops-float-bits-to-int-increment-array
dEQP-VK.graphicsfuzz.cov-nested-loops-global-counter-increment-single-element
dEQP-VK.graphicsfuzz.cov-nested-loops-sample-opposite-corners
dEQP-VK.graphicsfuzz.cov-two-nested-loops-switch-case-matrix-array-increment

Change-Id: Ia02cb23ec103be95184ad65da475d8b95a8d8504

2 years agoAdd test for finding unknown memory property flag sets
Juha Heiskanen [Fri, 27 Aug 2021 09:58:24 +0000 (12:58 +0300)]
Add test for finding unknown memory property flag sets

This test retrieves all the found propertyFlags from available memory
types, and then it makes a comparison between the found memory
propertyFlags and the acceptable propertyFlag sets. If an unknown
combination of memory propertyFlags is found, the test will fail.

Components: Vulkan

VK-GL-CTS Issue: 2704

New tests: dEQP-VK.memory.requirements.memory_property_flags.check_all

Change-Id: I9c456076bb7364572183ca4976f56775ffd5e286

2 years agoFix loop over cube map faces in GL4
Mika Väinölä [Tue, 31 Aug 2021 11:56:16 +0000 (14:56 +0300)]
Fix loop over cube map faces in GL4

Found when building with Clang with -Wunreachable-code-loop-increment
enabled. TextureViewUtilities::initTextureStorage is supposed to call
glTexImage2D for all cube map faces but stops after the first one
(GL_TEXTURE_CUBE_MAP_POSITIVE_X).

Affects:
KHR-GL4*.texture_view.gettexparameter
KHR-GL4*.texture_view.errors

Components: OpenGL

VK-GL-CTS issue: 3085

Change-Id: I3d85351ab50ad0bd8b779537b1a8b3bef162f80f

2 years agoFix fragment shading rate validation layer warning
Lionel Landwerlin [Thu, 26 Aug 2021 11:42:53 +0000 (14:42 +0300)]
Fix fragment shading rate validation layer warning

We passing a number of layer > 1 for an image view type of
VK_IMAGE_VIEW_TYPE_2D.

Also if we're not using ATTACHMENT_MODE_2DARRAY, then there is only
one layer for the fragment rate shading attachment, so we should check
against layer 0.

Components: Vulkan

Affects:
dEQP-VK.fragment_shading_rate.srlayered.*

VK-GL-CTS issue: 3079

Change-Id: I351f880a9bdd934f773e517713839c67ad453766

2 years agoAdd run mode that verifies amber requirements
Jari Komppa [Fri, 13 Aug 2021 10:10:49 +0000 (13:10 +0300)]
Add run mode that verifies amber requirements

This change adds a new run mode that verifies that .amber file
requirements match the ones defined in CTS.

Running CTS with --deqp-runmode=amber-verify goes through all
amber test cases and outputs any mismatches in the log file.
If any mismatches are found, the run ends with internal_error.

This change also contains fixes for all of the mismatches
that exist in CTS today. A couple required update in Amber,
and thus this change also updates it.

Affects:
dEQP-VK.compute.workgroup_memory_explicit_layout.copy_memory.variable_pointers
dEQP-VK.spirv_assembly.instruction.spirv1p4.*
dEQP-VK.spirv_assembly.instruction.terminate_invocation.*

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

Change-Id: Ic30b5d555d9cdf293a2ece8a690a4a2a943b1b80

2 years agoRemove extra semicolons
Mika Väinölä [Thu, 26 Aug 2021 14:10:28 +0000 (17:10 +0300)]
Remove extra semicolons

Fix warnings for Clang builds with -Wextra-semi, -Wextra-semi-stmt and
-Wc++98-compat-extra-semi.

Components: Framework, OpenGL, OpenGL ES, Vulkan

VK-GL-CTS issue: 3080

Change-Id: I1caa81b65415a1e94797c6df48fc8a4539e9635a

2 years agoFix warning in gcc-8
Graeme Leese [Fri, 23 Jul 2021 18:00:11 +0000 (19:00 +0100)]
Fix warning in gcc-8

The code for setting up the output buffer was duplicated into each of
the cases for different input types, and the compiler doesn't understand
that DE_ASSERT marks an unreachable path. Changing to using standard
assert fixes the warning:

vktShaderFConvertTests.cpp:541:19: error: ‘outputBufferSizeInfo::memorySizeBytes’
may be used uninitialized in this function [-Werror=maybe-uninitialized]
   541 |  BufferSizeInfo   outputBufferSizeInfo;
       |                   ^~~~~~~~~~~~~~~~~~~~

Component: Vulkan
Affects: dEQP-VK.glsl.builtin.precision_fconvert.*

Change-Id: Icf6302166d8bce7c3ae1447973c895c34465a726

2 years agoEnable Vulkan matrix determinant and inverse precision tests
Juha Heiskanen [Fri, 30 Jul 2021 09:10:16 +0000 (12:10 +0300)]
Enable Vulkan matrix determinant and inverse precision tests

A set of new matrix3x3/matrix4x4 determinant and inverse precision
tests for Amber.

Components: Vulkan

VK-GL-CTS Issue: 2878

New tests:
dEQP-VK.glsl.builtin.precision.determinant.highp.mat3
dEQP-VK.glsl.builtin.precision.inverse.highp.mat3
dEQP-VK.glsl.builtin.precision_fp16_storage16b.determinant.compute.mat3
dEQP-VK.glsl.builtin.precision_fp16_storage16b.inverse.compute.mat3
dEQP-VK.glsl.builtin.precision_fp16_storage32b.determinant.compute.mat3
dEQP-VK.glsl.builtin.precision_fp16_storage32b.inverse.compute.mat3
dEQP-VK.glsl.builtin.precision_double.determinant.compute.mat3
dEQP-VK.glsl.builtin.precision_double.inverse.compute.mat3
dEQP-VK.glsl.builtin.precision.determinant.highp.mat4
dEQP-VK.glsl.builtin.precision.inverse.highp.mat4
dEQP-VK.glsl.builtin.precision_fp16_storage16b.determinant.compute.mat4
dEQP-VK.glsl.builtin.precision_fp16_storage16b.inverse.compute.mat4
dEQP-VK.glsl.builtin.precision_fp16_storage32b.determinant.compute.mat4
dEQP-VK.glsl.builtin.precision_fp16_storage32b.inverse.compute.mat4
dEQP-VK.glsl.builtin.precision_double.determinant.compute.mat4
dEQP-VK.glsl.builtin.precision_double.inverse.compute.mat4

Change-Id: I5d748c1ecbaf4e8444a2d09eac8da60bfa54271c

2 years agoCorrect Vulkan multiview 'tesellation' test names
Alex Walters [Thu, 12 Aug 2021 13:12:55 +0000 (14:12 +0100)]
Correct Vulkan multiview 'tesellation' test names

Tests are renamed from 'tesellation' to 'tessellation' but are otherwise
unchanged.

Affects:

dEQP-VK.multiview*tessellation*

Components: Vulkan
Change-Id: I1686bb6fb8a0e85e201853602f840e03e847169d

2 years agoDo not overflow when copy data
Juan A. Suarez Romero [Wed, 18 Aug 2021 11:01:15 +0000 (13:01 +0200)]
Do not overflow when copy data

As `vertexDataSize` is aligned with `nonCoherentAtomSize`, it could be
bigger than the actual size of m_data.

This is actually causing a heap-buffer overflow when executing in our
Rpi4 Vulkan driver.

Affected tests:
dEQP-VK.spirv_assembly.instruction.graphics.cross_stage.basic_type.flat

Components: Vulkan

VK-GL-CTS issue: 3062

Change-Id: I6b1f449e9f0a42740adb051ed037ff911dac763a

2 years agoFix protected memory ssbo pipeline barrier use
Mike Byrne [Mon, 9 Aug 2021 11:40:07 +0000 (12:40 +0100)]
Fix protected memory ssbo pipeline barrier use

Incorrect stage flags are passed to vkCmdPipelineBarrier in the copy
buffer operation in the dEQP-VK.protected_memory.ssbo.ssbo_read.*

These tests were introduced in origin/vulkan-cts-1.1.0

Components: Vulkan

Affects:
dEQP-VK.protected_memory.ssbo.*

VK-GL-CTS Issue: 3041

Change-Id: Iccdb96fee30e32bf26dec1e26d65ea8d5600c384

2 years agoDon't alias image views in separate_channels subpass dependency tests
Connor Abbott [Fri, 13 Aug 2021 15:37:54 +0000 (17:37 +0200)]
Don't alias image views in separate_channels subpass dependency tests

This is not allowed by the Vulkan spec:

> Multiple attachments that alias the same memory must not be used in a
> single subpass.

Instead we should have the input attachment and color attachment point
to the same attachment, which is allowed.

Components: Vulkan

Affects:
dEQP-VK.renderpass.suballocation.subpass_dependencies.separate_channels.*
dEQP-VK.renderpass2.suballocation.subpass_dependencies.separate_channels.*

VK-GL-CTS Issue: 3052

Change-Id: Iddb1111be5147f9816104fa879e023a9a3445555

2 years agoIssue in serial storage address computation
Neslisah Torosdagli [Thu, 29 Jul 2021 16:20:51 +0000 (12:20 -0400)]
Issue in serial storage address computation

When serial storage and src/dst buildTypes are different, serial storage address computation is not correct. In the beginning of the test case, serial storage buildType is either set to host or device according to test case being run (cpu-built or gpu-built).
In the 2nd phase of this test case (deserialize all from the previous step to a new top-level AS) VkCopyMemoryToAccelerationStructureInfoKHR is filled with srcAddress according to testCase buildType, and dst acceleration structure is device.
In this stage, if testCase builtType is device, the serialStorage address computation is correct. However, if testCase buildType is host then the issue arises. The address is computed according to host, although device address is needed.

That is, for serial storage address computation: buildType of the acceleration structure (src or dst) should be used rather than serial storage buildType which is initially set according to test case being run.

Affects:
dEQP-VK.ray_tracing_pipeline.acceleration_structures.header_bottom_address.*

Components: Vulkan
VK-GL-CTS issue: 3028

Change-Id: If8c0387862ce6f1db00fc61016dd0e602ff72ba8

2 years agoAdd coverage for sampling a cubemap that has been rendered to
Antto Mäkinen [Wed, 12 May 2021 07:47:10 +0000 (10:47 +0300)]
Add coverage for sampling a cubemap that has been rendered to

This test checks that a cubemap will be sampled correctly if its
contents have been modified by a draw call.

VK-GL-CTS issue: 2506

New Tests:
dEQP-VK.image.sample_cubemap.write_face_0

Components: Vulkan

Change-Id: I1ee62842d6c952b5628822fe49ee6a91c26ead04

2 years agoMerge vk-gl-cts/vulkan-cts-1.2.7 into vk-gl-cts/master
Alexander Galazin [Fri, 20 Aug 2021 12:20:33 +0000 (14:20 +0200)]
Merge vk-gl-cts/vulkan-cts-1.2.7 into vk-gl-cts/master

Change-Id: Ieb90dde42cb20ab43cebd0f2b5d3ad4091c3b57a

2 years agoMerge vk-gl-cts/vulkan-cts-1.2.6 into vk-gl-cts/vulkan-cts-1.2.7
Alexander Galazin [Fri, 20 Aug 2021 10:14:58 +0000 (12:14 +0200)]
Merge vk-gl-cts/vulkan-cts-1.2.6 into vk-gl-cts/vulkan-cts-1.2.7

Change-Id: Ieaff21c7c6228a4507325afe13ec2a3807b345cb

2 years agoAdd missing vertexPipelineStoresAndAtomics checks in ray query tests
John Anthony [Wed, 18 Aug 2021 20:16:53 +0000 (22:16 +0200)]
Add missing vertexPipelineStoresAndAtomics checks in ray query tests

Affected tests:
dEQP-VK.ray_query.acceleration_structures.*.vertex_shader.*
dEQP-VK.ray_query.acceleration_structures.*.tess_control_shader.*
dEQP-VK.ray_query.acceleration_structures.*.tess_evaluation_shader.*
dEQP-VK.ray_query.acceleration_structures.*.geometry_shader.*
dEQP-VK.ray_query.ray_flags.vertex_shader.*
dEQP-VK.ray_query.ray_flags.tess_control_shader.*
dEQP-VK.ray_query.ray_flags.tess_evaluation_shader.*
dEQP-VK.ray_query.ray_flags.geometry_shader.*
dEQP-VK.ray_query.traversal_control.vertex_shader.*
dEQP-VK.ray_query.traversal_control.tess_control_shader.*
dEQP-VK.ray_query.traversal_control.tess_evaluation_shader.*
dEQP-VK.ray_query.traversal_control.geometry_shader.*

Components: Vulkan

VK-GL-CTS Issue: 3069

Change-Id: I49c37d292380fda47b113bf4fa14a6395f8e81a5

2 years agoCheck support in synchronization operation tests
Vihanakangas [Tue, 17 Aug 2021 11:14:46 +0000 (14:14 +0300)]
Check support in synchronization operation tests

Synchronization tests were creating pipelines before checking for support,
causing unnecessary use of CPU time when encountering an operation
later on that was not supported.

Affects:

dEQP-VK.synchronization.op.*

Components: Vulkan

VK-GL-CTS issue: 2731

Change-Id: Ia83afde4767ced1549a1b0573cdc9e8af8526870

2 years agoRead stencil aspect from image in DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL layout
Slawomir Cygan [Mon, 16 Aug 2021 16:04:21 +0000 (18:04 +0200)]
Read stencil aspect from image in DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL  layout

The test was using sampler to read depth aspect from image in
combined depth+stencil format and in
VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
layout - what is invalid.

Instead, the test now reads (and tests) stencil aspect of this
image. As the test code already supported testing stencil formats,
just a few conditions are changed/added to follow the stencil path
if VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
is used.

VK-GL-CTS Issue: 3048

Components: Vulkan

Affects: dEQP-VK.synchronization2.none_stage.*

Change-Id: I918a5cdad83bcd25b2f8b6cee642b56218c2b7fe

2 years agoOptimize image clearing tests
Ilkka Saarelainen [Wed, 11 Aug 2021 12:00:37 +0000 (15:00 +0300)]
Optimize image clearing tests

This CL optimizes image clearing tests.
The tests did a lot redundant calculation for each pixel in the verify stage.
This CL moves those calculations to outside of the pixel verify function.

Affects:

dEQP-VK.api.image_clearing.*

Components: Vulkan

VK-GL-CTS issue: 2933

Change-Id: Ie3403c591c9f084115a13cc78e0a66c54c48817c

2 years agoEnsure that destroying old swapchain has no effect
Vihanakangas [Thu, 5 Aug 2021 06:52:05 +0000 (09:52 +0300)]
Ensure that destroying old swapchain has no effect

There should be no crash when recreating Vulkan swapchain with
old swapchain and later calling vkDestroySwapchainKHR on old swapchain.

New tests:

dEQP-VK.wsi.*.swapchain.destroy.old_swapchain

Components: Vulkan

VK-GL-CTS issue: 2935

Change-Id: I7f03e55767ececec8a6a70ef553f0676d3a3c616

2 years agoConservative rasterization with SampleMask
marz [Sun, 6 Jun 2021 20:46:56 +0000 (22:46 +0200)]
Conservative rasterization with SampleMask

Additional test coverage for conservative rasterization Conservative
rasterization used in conjunction with various multisampling setup
including FullyCoveredEXT built-in, minSampleShading, postDepthCoverage
and SampleMask.

Components: Vulkan

VK-GL-CTS issue: 2868

Affects:
dEQP-VK.pipeline.multisample.conservative_with_full_coverage.*

Change-Id: I8c2858b81cfdf27e622acf74e273db9014499c9c

2 years agoUpdate Vulkan headers
Alexander Galazin [Wed, 18 Aug 2021 09:46:04 +0000 (11:46 +0200)]
Update Vulkan headers

Components: Vulkan

Change-Id: Iefdf1bc052c5f9c63bdf9062c01c96a4c11a92c6

2 years agoImplement getProcAddress for surfaceless platform
Italo Nicola [Tue, 27 Jul 2021 08:26:47 +0000 (05:26 -0300)]
Implement getProcAddress for surfaceless platform

Currently this virtual function is not overridden, causing a crash
whenever a test calls getProcAddress in a surfaceless context.

Affects:
KHR-GL3{0,1,2}.transform_feedback.draw_xfb_instanced_test
KHR-GL3{0,1,2}.transform_feedback.draw_xfb_stream_instanced_test

Components: Framework

VK-GL-CTS issue: 3021

Change-Id: Idb29b5ca9d70c5f3be6a32fdf2c827d5d7591050

2 years agoFix for the various multisample tests with GL 4.5
Tapani Pälli [Fri, 30 Jul 2021 11:54:09 +0000 (14:54 +0300)]
Fix for the various multisample tests with GL 4.5

Affects:
dEQP-GLES31.functional.shaders.sample_variables.*
dEQP-GLES31.functional.sample_shading.*
dEQP-GLES31.functional.shaders.multisample_interpolation.*
dEQP-GL45.functional.shaders.sample_variables.*
dEQP-GL45.functional.sample_shading.*
dEQP-GL45.functional.shaders.multisample_interpolation.*

Components: AOSP
VK-GL-CTS issue: 3014

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Change-Id: I6e4297a0558a31a1dc2258da7434d3fcc1900b73

2 years agoFix to multisample texture test shaders with GL 4.5
Tapani Pälli [Thu, 29 Jul 2021 17:46:56 +0000 (20:46 +0300)]
Fix to multisample texture test shaders with GL 4.5

Affects:
dEQP-GL45.functional.texture.multisample.*

Components: AOSP
Issue: 3016

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Change-Id: Icf29df0c1b8cb5306ebf4a9444c63d8e1afa2d7c

2 years agoFix for the common function tests with GL 4.5
Tapani Pälli [Thu, 29 Jul 2021 17:30:04 +0000 (20:30 +0300)]
Fix for the common function tests with GL 4.5

Affects:
dEQP-GL45.functional.shaders.builtin_functions.common.*

Components: AOSP
VK-GL-CTS issue: 3015

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Change-Id: Icf1343225a2dab84f70e2bc986f556c247454b4c

2 years agoFix error in build_apk.py
Ilkka Saarelainen [Thu, 12 Aug 2021 07:22:22 +0000 (10:22 +0300)]
Fix error in build_apk.py

A typo caused build_apk.py to fail if required Android build
tools were missing.

Components: framework

Change-Id: Ia55b95a9057a37152e5a4c91773b1eaa3abc0156

2 years agoFix partial_image_npot_diff_format_clear fail
Lowry Li (Arm Technology China) [Wed, 11 Aug 2021 10:14:41 +0000 (18:14 +0800)]
Fix partial_image_npot_diff_format_clear fail

The tests added in fffc9484834599de9eb5559205cec7cf0105379b /
VK-GL-CTS Issue: 2678 are missing a pipeline barrier between
the new clearing operation the following transfer operation
targeting the same resource.

Components: Vulkan

Affects:
dEQP-VK.api.copy_and_blit.*.image_to_image.simple_tests.
partial_image_npot_diff_format_clear

VK-GL-CTS issue: 3056

Change-Id: I3edf4d98e697e97c4b7934238cdbfc86f2d48632

2 years agoRemove shaders.arrays from the Khronos mustpass
Alexander Galazin [Thu, 5 Aug 2021 08:27:20 +0000 (10:27 +0200)]
Remove shaders.arrays from the Khronos mustpass

Components: OpenGL

VK-GL-CTS issue: 2540

Affects: KHR-GLES3.shaders.arrays.*

Change-Id: I291c26f1105bd72ca16e4057f23bb2188aed6dc4

2 years agoFix Android system memory requirements
Ilkka Saarelainen [Tue, 27 Jul 2021 11:31:06 +0000 (14:31 +0300)]
Fix Android system memory requirements

This CL changes how the available system memory is defined in Android.
The actual available system memory size is now used instead of
determining the available system memory by the CDD.

Affects:

dEQP-VK.api.buffer.suballocation.*
dEQP-VK.api.buffer.dedicated_alloc.*
dEQP-VK.api.object_management.*
dEQP-VK.memory.allocation.*
dEQP-VK.memory.device_group_allocation.*
dEQP-VK.pipeline.render_to_image.*.small.*
dEQP-VK.pipeline.render_to_image.*.huge.*

Components: Framework, Vulkan

VK-GL-CTS issue: 2621

Change-Id: I92fd157ec3928313ac92c29e6cbb3413c64a5096

2 years agoTest multiViewport with different depth ranges
Piotr Byszewski [Tue, 16 Feb 2021 14:57:44 +0000 (15:57 +0100)]
Test multiViewport with different depth ranges

This change extends existing tests to also cover creation of
viewports with different depth ranges, and make sure that
depth clipping/clamping works correctly across the different
viewports.

Components: Vulkan

VK-GL-CTS issue: 2500

Affects:
dEQP-VK.draw.depth_clamp.*

Change-Id: Ifa76daa1b53f04e48871a5efe07f5d3863066ca1

2 years agoTest OpImageQueryLod when fwidth(UV) == 0
Piotr Byszewski [Thu, 22 Jul 2021 13:36:51 +0000 (15:36 +0200)]
Test OpImageQueryLod when fwidth(UV) == 0

Tests verify that lambda returned by OpImageQueryLod
is -22 or lower when fwidth(UV) == 0.

Components: Vulkan

VK-GL-CTS issue: 3027

Affets:
dEQP-VK.glsl.texture_functions.query.texturequerylod.*

Change-Id: I879024646c7a62d6cef7cb4b46a154b5e4750f36

2 years agoMerge vk-gl-cts/github-master into vk-gl-cts/master
Alexander Galazin [Fri, 13 Aug 2021 07:31:42 +0000 (09:31 +0200)]
Merge vk-gl-cts/github-master into vk-gl-cts/master

Change-Id: I9bf5cb55d51036216ffb8aafde67062b6c860c1f

2 years agoMerge pull request #276 from Ella-0/master
Alexander Galazin [Fri, 13 Aug 2021 07:30:29 +0000 (09:30 +0200)]
Merge pull request #276 from Ella-0/master

Test behaviour of color write enable with colorWriteMask

2 years agoAllow Vulkan CTS 1.2.7.1
Alexander Galazin [Thu, 12 Aug 2021 15:23:45 +0000 (17:23 +0200)]
Allow Vulkan CTS 1.2.7.1

Affects: dEQP-VK.api.driver_properties.properties

Components: Vulkan

Change-Id: Ic313a2b15d7c2be5c5b1f95aa189dc6bf1adbf70

2 years agoAdd tests for VK_EXT_shader_atomic_float2
Jason Ekstrand [Wed, 26 Aug 2020 22:47:24 +0000 (17:47 -0500)]
Add tests for VK_EXT_shader_atomic_float2

New tests:
dEQP-VK.glsl.atomic_operations.*float16*
dEQP-VK.glsl.atomic_operations.min_float*
dEQP-VK.glsl.atomic_operations.max_float*
dEQP-VK.image.atomic_operations.min*r32f*
dEQP-VK.image.atomic_operations.max*r32f*

Affects:

dEQP-VK.glsl.atomic_operations.*float*
dEQP-VK.image.atomic_operations.add*r32f*
dEQP-VK.image.atomic_operations.exchange*r32f*

Components: Vulkan

VK-GL-CTS issue: 2566

Change-Id: I7462cc74e799c2245407220fa9db7e5b659f86f4
(cherry picked from commit ca4e5aff66bccbbe88935c10e2c55a3147c1fc03)
(cherry picked from commit 218eb73c4f30e720bd19a61704f5ad6ebcd73d48)

2 years agoTests for VK_KHR_present_id and VK_KHR_present_wait
Ricardo Garcia [Mon, 19 Apr 2021 13:56:11 +0000 (15:56 +0200)]
Tests for VK_KHR_present_id and VK_KHR_present_wait

Add tests for VK_KHR_present_id and VK_KHR_present_wait. This commit
also refactors some code so it can be reused in several places, hence
marking all WSI tests as affected.

Affected tests:
dEQP-VK.info.device_mandatory_features
dEQP-VK.wsi.*

New tests:
dEQP-VK.wsi.*.present_id_wait.*

Components: Vulkan
VK-GL-CTS issue: 2098
VK-GL-CTS issue: 2099

Change-Id: I1c95fbf031d651773a9fff1c10a23038d73f6e53
(cherry picked from commit 8bf210fd592883b3adebb57c3d6cc49188d1758e)
(cherry picked from commit b7a8721e2ffb9153283b434658463daac7ed1313)

2 years agoUpdate glslang, SPIR-V Tools, headers
Alexander Galazin [Tue, 27 Jul 2021 18:59:06 +0000 (20:59 +0200)]
Update glslang, SPIR-V Tools, headers

Components: Framework

Change-Id: Ie259277466b22ba816843c362da272a4284fcb93
(cherry picked from commit c1e67a6d8689bdaad205ee0287ea4b490141c4d3)

2 years agoUpdate Vulkan headers
Alexander Galazin [Tue, 27 Jul 2021 10:57:27 +0000 (12:57 +0200)]
Update Vulkan headers

Components: Vulkan

Change-Id: Id59fb9125cac9068d68a8e5f219c3dc53a093ad0
(cherry picked from commit ab44aa0a0a3a2c1ec5937a71c4cb8936f22fb247)

2 years agoUpdate Vulkan headers
Alexander Galazin [Mon, 5 Jul 2021 14:18:18 +0000 (16:18 +0200)]
Update Vulkan headers

Components: Vulkan

Change-Id: I6000ca21cc306130dd546887e68d1cecd4dc0e1f
(cherry picked from commit 9aa91388484350028ff7c7c4c063ee87146070b6)

2 years agoMerge vk-gl-cts/vulkan-cts-1.2.6 into vk-gl-cts/vulkan-cts-1.2.7
Alexander Galazin [Thu, 12 Aug 2021 20:25:23 +0000 (22:25 +0200)]
Merge vk-gl-cts/vulkan-cts-1.2.6 into vk-gl-cts/vulkan-cts-1.2.7

Change-Id: I34e25155c4d2fc3a37f8699507a1330f86ef78a9

2 years agoMerge vk-gl-cts/vulkan-cts-1.2.5 into vk-gl-cts/vulkan-cts-1.2.6
Alexander Galazin [Thu, 12 Aug 2021 19:53:13 +0000 (21:53 +0200)]
Merge vk-gl-cts/vulkan-cts-1.2.5 into vk-gl-cts/vulkan-cts-1.2.6

Change-Id: I8d78e920b4007ea7f47e66d64852693dfed22003

2 years agoMerge vk-gl-cts/vulkan-cts-1.2.4 into vk-gl-cts/vulkan-cts-1.2.5
Alexander Galazin [Thu, 12 Aug 2021 18:56:51 +0000 (20:56 +0200)]
Merge vk-gl-cts/vulkan-cts-1.2.4 into vk-gl-cts/vulkan-cts-1.2.5

Change-Id: Id1af44b78cbe4ba82cc76c656e0a22421ac20073

2 years agoMerge vk-gl-cts/vulkan-cts-1.2.3 into vk-gl-cts/vulkan-cts-1.2.4
Alexander Galazin [Thu, 12 Aug 2021 18:03:29 +0000 (20:03 +0200)]
Merge vk-gl-cts/vulkan-cts-1.2.3 into vk-gl-cts/vulkan-cts-1.2.4

Change-Id: I13ff1ac57c064dc46bbc7c555ba1fed07e04080c

2 years agoMerge vk-gl-cts/vulkan-cts-1.2.2 into vk-gl-cts/vulkan-cts-1.2.3
Alexander Galazin [Thu, 12 Aug 2021 18:02:19 +0000 (20:02 +0200)]
Merge vk-gl-cts/vulkan-cts-1.2.2 into vk-gl-cts/vulkan-cts-1.2.3

Change-Id: Iab13500b9aaa9b6da0e99ea9d93fe9cabc66da33

2 years agoDo proper checking for the presence of Xorg/XCB
Maniraj D [Fri, 30 Jul 2021 11:32:04 +0000 (11:32 +0000)]
Do proper checking for the presence of Xorg/XCB

In XcbDisplay::hasDisplay() API, hasthe incorrect
assumption that the xcb_connection_t is always valid,
if its value isn't NULL. XcbDisplay::hasDisplay() must
ensure that there are no connection errors by
using the xcb_connection_has_error() API.
Failure to do so would result in incorrectly trying
to exercise the XCB related test cases against
other than XCB WSIs, such as Wayland, for example.

Components: Vulkan
Affected tests: dEQP-VK.wsi.*
                dEQP-VK.image.swapchain_mutable.*
VK-GL-CTS issue: 3037

Change-Id: Id722b3a3b3d82161ff00096518a026701b291751

2 years agoThe existence of a DRM device is not mandatory
Tony Zlatinski [Wed, 28 Jul 2021 21:41:09 +0000 (16:41 -0500)]
The existence of a DRM device is not mandatory

The VK_EXT_physical_device_drm spec states:
DRM defines multiple device node types. Each physical device may
have one primary node and one render node associated.
Physical devices may have no primary node (e.g. if the device does
not have a display subsystem), may have no render node (e.g. if it is
a software rendering engine), or may have neither (e.g. if it is a
software rendering engine without a display subsystem).

According to the above statement, a DRM device does not have to
always be present for a device to be compliant with the
VK_EXT_physical_device_drm spec.

Components: Vulkan

VK-GL-CTS Issue: 3029

Affects: dEQP-VK.api.device_drm_properties.drm_files_exist

Change-Id: I6d48b15d142650ee0db2dafd5e1b7f3c30e7a837

2 years agoAdd missing items to android cts mustpass list
Ilkka Saarelainen [Thu, 12 Aug 2021 05:06:20 +0000 (08:06 +0300)]
Add missing items to android cts mustpass list

Some tests were missing from Android vk-master-2021-03-01 test list.
This CL adds those tests to the list.

Components: Vulkan

VK-GL-CTS issue: 3050

Change-Id: I973508a169e70d203dd465e9f22c41405c1c24a7

2 years agoFix bug in compressed PixelStorageModes tests
SoroushIMG [Mon, 26 Jul 2021 13:36:56 +0000 (14:36 +0100)]
Fix bug in compressed PixelStorageModes tests

Compressed pixel storage modes are tested by using the extension
ARB_compressed_texture_pixel_storage.
ARB_compressed_texture_pixel_storage is a core extension since
OpenGL 4.2. Therefore, the cases testing this behaviour need to
check for its support in GL context versions before 4.2.
Without this check drivers that do not provide this extension,
will fail this test instead of being marked as not supported.
This CL adds the mentioned extension checking.

Affects:
KHR-GL33.pixelstoragemodes.compressedteximage2d.*
KHR-GL33.pixelstoragemodes.compressedteximage3d.*

Components: OpenGL

VK-GL-CTS issue: 3020

Change-Id: Ib9a4edeb57995582c07aa11c7db11c6e7bbe1984

2 years agoWork around bogus GCC 9 warnings
David Emett [Mon, 26 Jul 2021 16:33:03 +0000 (16:33 +0000)]
Work around bogus GCC 9 warnings

Bogus warning can be seen with this example:

   #include <stddef.h>

   long broken()
   {
      struct
      {
         long a, b;
      } value;
      for (size_t i = 0; i < sizeof(long); ++i)
      {
         ((char *)&value.a)[i] = (char)0xde;
         ((char *)&value.b)[i] = (char)0xde;
      }
      return value.b;
   }

Compiled with -O3 -Warray-bounds GCC 9 warns:

   In function 'long int broken()':
   cc1plus: warning: 'void* __builtin_memset(void*, int, long unsigned int)' offset [9, 16] from the object at 'value' is out of the bounds of referenced subobject 'broken()::<unnamed struct>::a' with type 'long int' at offset 0 [-Warray-bounds]

It looks like GCC is recognising the loop as two memsets, merging them,
then forgetting that it has done this.

It seems this can be worked around by just using memset rather than
implementing it manually, which is also simpler and produces better
code.

The example compiles without warning on GCC 10+ (you can try on
https://godbolt.org/), so presumably this bug has been fixed in later
versions of gcc.

Change-Id: I09799d6dd833b1fba8608cddaa36a32e555cf861

2 years agoFix a GraphicsFuzz coverage test
Antto Mäkinen [Mon, 2 Aug 2021 12:00:27 +0000 (15:00 +0300)]
Fix a GraphicsFuzz coverage test

This commit simplifies the result verification at the end of cov-apfloat-module-small-number.

Affects: dEQP-VK.graphicsfuzz.cov-apfloat-module-small-number

Components: Vulkan

VK-GL-CTS issue: 3035

Change-Id: Ia0e0347880cbddc2433cd3867c96a09645c5a35d

2 years agoIncrease error threshold for some geometry shader tests
Iago Toral Quiroga [Mon, 2 Aug 2021 09:31:14 +0000 (11:31 +0200)]
Increase error threshold for some geometry shader tests

Components: Vulkan
VK-GL-CTS issue: 3034

Affected tests:
dEQP-VK.geometry.*

Change-Id: I5ed440019ab45f6f31787d199695630d06bb2a51

2 years agoFix variable pointer tests for geometry stages on tilers
Iago Toral Quiroga [Mon, 2 Aug 2021 07:33:49 +0000 (09:33 +0200)]
Fix variable pointer tests for geometry stages on tilers

On tilers we may execute any geometry stage more than once, not just
the vertex shader.

Components: Vulkan
VK-GL-CTS issue: 3033

Affected tests:
dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_single_buffer_*

Change-Id: I3ee5db4aa8176d09b10720d7683338ef8e8a8098

2 years agoFix DRM modifier list tests
Ricardo Garcia [Thu, 29 Jul 2021 15:13:51 +0000 (17:13 +0200)]
Fix DRM modifier list tests

* dEQP-VK.drm_format_modifiers.list_modifiers.* tests now check every
  supported modifier instead of returning prematurely if any of the
  modifiers was not supported for the image usage flags the tests uses.

* dEQP-VK.drm_format_modifiers.create_list_modifiers.* tests check
  modifier compatibility first before attempting to use compatible
  modifier lists of different lengths. Test results no longer depend on
  the order of modifiers returned by the implementation and do not
  return NotSupported prematurely.

* dEQP-VK.drm_format_modifiers.export_import.* tests suffered from
  similar issues. They tried to detect which of the supported modifiers
  for a format met a list of requirements and returned early with
  NotSupported if any of them failed to match those requirements,
  instead of running the tests in all possible modifiers.

Affected tests:
dEQP-VK.drm_format_modifiers.*

Components: Vulkan
VK-GL-CTS issue: 3026

Change-Id: I4c6600b87f3c2b4b9b165fdc17988efe2e0cf670

2 years agoRelax protected heap allocation tests
Ari Suonpaa [Fri, 6 Aug 2021 12:08:21 +0000 (15:08 +0300)]
Relax protected heap allocation tests

Some implementations have limitations on protected heap
allocations, and these limitations cannot be queried
using the Vulkan API. This change allows an out-of-memory
to happen after a certain number of allocations to
compensate that.

VK-GL-CTS Issue: 3038

Affects:

dEQP-VK.memory.*allocation.*

Components: Vulkan
Change-Id: I3a34637c8c15eb8670613dce9b6e394a622a4c71

2 years agoAdded layered AHB EGL tests
Ari Suonpaa [Tue, 23 Mar 2021 05:45:48 +0000 (07:45 +0200)]
Added layered AHB EGL tests

Added new EGL image format tests for using Android Native
Hardware buffers with layers. They are mapped as 2D texture
arrays using EGL image API.

EGL internal test filter was also removed as the EGL AHB
tests are now using public Android API.

VK-GL-CTS Issue: 2671

New tests:

dEQP-EGL.functional.image.*android_native*

Components: EGL, Framework
Change-Id: I34a7560703bb06b75be276dc8ba5247c3763877a

2 years agoImprove buffer to buffer copy tests
Ricardo Garcia [Wed, 21 Jul 2021 10:33:51 +0000 (12:33 +0200)]
Improve buffer to buffer copy tests

Buffer to buffer copy tests were filling the source and destination
buffers with the same contents, using functions that were both used for
images and buffers.

When filling source buffers, a linear memory allocation of R32_UINT
elements was filled with color red, which resulted in all bytes
containing value 255.

When filling destination buffers, the same procedure was followed using
color white. However, due to R32_UINT only having one component, this
also resulted in every buffer byte containing value 255.

The copy operation that followed could fail (e.g. with the
implementation not doing anything) and the test could still pass. This
commit makes the destination buffer be filled with zeros so as to verify
regions are being interpreted correctly.

Affected tests:
dEQP-VK.api.copy_and_blit.*buffer_to_buffer*

Components: Vulkan
VK-GL-CTS issue: 3008

Change-Id: I49e5ea5a4843540e57be22c67107db82b7903da2

2 years agoMerge vk-gl-cts/vulkan-cts-1.2.7 into vk-gl-cts/master
Alexander Galazin [Thu, 5 Aug 2021 08:29:18 +0000 (10:29 +0200)]
Merge vk-gl-cts/vulkan-cts-1.2.7 into vk-gl-cts/master

Change-Id: Ie8036c780cda38f67032afa000852326c57b7860

2 years agoMerge vk-gl-cts/vulkan-cts-1.2.6 into vk-gl-cts/vulkan-cts-1.2.7
Alexander Galazin [Thu, 5 Aug 2021 07:23:15 +0000 (09:23 +0200)]
Merge vk-gl-cts/vulkan-cts-1.2.6 into vk-gl-cts/vulkan-cts-1.2.7

Change-Id: I2ac7dec5e1cd15b13dec902ceeff581992d2678c

2 years agoTest multiview with VK_EXT_multi_draw
Ricardo Garcia [Thu, 15 Jul 2021 10:19:46 +0000 (12:19 +0200)]
Test multiview with VK_EXT_multi_draw

Add new VK_EXT_multi_draw test variants that check multi_draws together
with multiview.

New, affected and removed tests:
dEQP-VK.draw.multi_draw.*

Components: Vulkan
VK-GL-CTS issue: 2985

Change-Id: I0e2b36efa912629b3f6457913f3c3b6d9eeebfe8

2 years agoAdd sample mask test for FSR
Piotr Byszewski [Thu, 8 Jul 2021 15:37:09 +0000 (17:37 +0200)]
Add sample mask test for FSR

This change adds single test that uses pipelineFragmentShadingRate
with fragmentSize {2,2}, 4xMSAA and a sample mask of 0x9.
After drawing random triangles there is a check that samples are
written only to samples present in the sample mask.

VK-GL-CTS issue: 2397

Components: Vulkan

Affects:
dEQP-VK.fragment_shading_rate.misc_tests.*

Change-Id: I38bbddeb2f8d7e8aac1c3803b171ec5be2f0c21a

2 years agoFix transform_feedback.simple.multiquery* tests
Daniel Koch [Tue, 27 Jul 2021 21:14:02 +0000 (17:14 -0400)]
Fix transform_feedback.simple.multiquery* tests

Tests were using host query reset which may not be present pre-VK 1.2.
Change tests to use device query reset (there are other dedicated tests which test HOST_QUERY_RESET).

Components: Vulkan
VK-GL-CTS Issue: 2866

Affects:
dEQP-VK.transform_feedback.simple.multiquery*

Change-Id: Ib8c943a53542f4e21167f6afb0005200043477c6

2 years agoFix depth/stencil subpass dependencies in renderpass allocation tests
Connor Abbott [Mon, 26 Jul 2021 13:48:27 +0000 (15:48 +0200)]
Fix depth/stencil subpass dependencies in renderpass allocation tests

This seems like a copy/paste error, but the last subpass should have
VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT and the current subpass
should have VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT, analagous to
the color attachment case.

Affects:

dEQP-VK.renderpass.dedicated_allocation.attachment_allocation.input_output.*

Components: Vulkan

VK-GL-CTS Issue: 3019

Change-Id: I0f46316f9c5147d2391c6f0f2a37fb1e56420078

2 years agoRemove fallback and unify testing for image clearing tests
Vihanakangas [Fri, 28 May 2021 11:01:39 +0000 (14:01 +0300)]
Remove fallback and unify testing for image clearing tests

Image clearing tests were previously using render pass
to pre-clear an image. This commit removes the use of
render pass as a clearing method and instead uses a buffer
to clear the image.

Affects:

dEQP-VK.api.image_clearing.core.*

Components: Vulkan

VK-GL-CTS issue: 2604

Change-Id: I82b6ac6cb6f8a2d79e4f7ffa12abc636bc5a961a

2 years agoPortability: fix osx target
Piotr Byszewski [Tue, 3 Aug 2021 10:22:10 +0000 (12:22 +0200)]
Portability: fix osx target

Currently cts can be be build on MacOS using default target
this CL adds missing libraries also to osx target.

Components: Framework

VK-GL-CTS public issue: 277

Affects:
*

Change-Id: Ic890bea33bd90240e84dd71b985cf146a1a4df0c

2 years agoTest behaviour of color write enable with colorWriteMask
Ella Stanforth [Thu, 22 Jul 2021 11:35:39 +0000 (11:35 +0000)]
Test behaviour of color write enable with colorWriteMask

This commit adds new tests to test the interaction of color write enable and
color write mask.

New and affected tests:
dEQP-VK.pipeline.color_write_enable.*

Components: Vulkan
Reviewed-by: Ricardo Garcia <rgarcia@igalia.com>
2 years agoAdd more tests for YCbCr plane compatibility
Graeme Leese [Wed, 16 Jun 2021 15:47:04 +0000 (16:47 +0100)]
Add more tests for YCbCr plane compatibility

The only existing tests are using other UNORM formats, and a validation
layer change to allow compatible formats here has shown that this isn't
working properly on some drivers. This extends the tests that were added
as part of #1630 (CL 7356).

Components: Vulkan
VK-GL-CTS issue: 1630
New tests: dEQP-VK.ycbcr.plane_view.*_compatible_format_*int
Affects: dEQP-VK.ycbcr.plane_view.*_compatible_format_*

Change-Id: Ia14357fc8873566333ea888ef18a2155ffa6ef51

2 years agoRemove invalid reserved keywords tests
Graeme Leese [Wed, 7 Jul 2021 10:15:41 +0000 (11:15 +0100)]
Remove invalid reserved keywords tests

These identifiers are not listed as reserved in any spec that I can
find.

Components: OpenGLES
Removed Tests: dEQP-GLES3.functional.shaders.keywords.reserved_keywords.image*Shadow_*

Change-Id: I444d9a8a49d3dda7402faa50b79859aaef0ee690

2 years agoTest line stipple factor is ignored if not used
Ricardo Garcia [Tue, 20 Jul 2021 10:36:05 +0000 (12:36 +0200)]
Test line stipple factor is ignored if not used

This commit adds a few extra line test variants that check
lineStippleFactor in VkPipelineRasterizationLineStateCreateInfoEXT is
ignored when stippledLineEnable is false. The new tests use both zero
and a large number to check everything continues to work.

New tests:
dEQP-VK.rasterization.primitives.no_stipple.*factor_0
dEQP-VK.rasterization.primitives.no_stipple.*factor_large

Affected tests:
dEQP-VK.rasterization.primitives*

Components: Vulkan
VK-GL-CTS issue: 3009

Change-Id: I6e329e8572cb0bae043119553bd4ea8d5682f660

2 years agoTest zero-size unused specialization constants
Ricardo Garcia [Tue, 20 Jul 2021 14:20:50 +0000 (16:20 +0200)]
Test zero-size unused specialization constants

According to the spec for VkSpecializationMapEntry

> If a constantID value is not a specialization constant ID used in the
> shader, that map entry does not affect the behavior of the pipeline.

So it should be legal to use VkSpecializationMapEntry structures
indicating size zero for a given constant as long as the constant is not
used in the shaders.

This commits adds new test variants that verify implementations handle
such cases.

New tests:
dEQP-VK.pipeline.spec_constant.*.basic.*unused_*

Affected tests:
dEQP-VK.pipeline.spec_constant.*

Components: Vulkan
VK-GL-CTS issue: 3011

Change-Id: I2a8439368722e6caaa828fd91e061cfd5e2be61d

2 years agoFix build on CLang failing due to -Wunused-private-field
Sławomir Cygan [Thu, 22 Jul 2021 14:51:11 +0000 (16:51 +0200)]
Fix build on CLang failing due to -Wunused-private-field

Dereference a member uses only in Debug builds.

VK-GL-CTS Issue: 3013
Components: Vulkan

Change-Id: I7a607328bf033b24c1bba877f78c3fa4fd24e9e1

2 years agoSwiftShader script improvements
Vihanakangas [Thu, 10 Jun 2021 12:39:02 +0000 (15:39 +0300)]
SwiftShader script improvements

This commit applies varying fixes proposed in the issue.

VK-GL-CTS issue: 2956

Change-Id: I6f73bea9f5ab875b8d40990649fb1f9d9a2d603d

2 years agoMerge vk-gl-cts/vulkan-cts-1.2.7 into vk-gl-cts/master
Alexander Galazin [Wed, 28 Jul 2021 06:54:34 +0000 (08:54 +0200)]
Merge vk-gl-cts/vulkan-cts-1.2.7 into vk-gl-cts/master

Change-Id: I4bf831e86123de179132f435a7c7bf838d0c89d3