platform/upstream/VK-GL-CTS.git
7 years agoMerge deqp-dev into vk-gl-cts/master
Pyry Haulos [Fri, 17 Mar 2017 21:56:45 +0000 (14:56 -0700)]
Merge deqp-dev into vk-gl-cts/master

Change-Id: I8b14ed1eff819165824b6737c11128ae7f12cd5c

7 years agoAdd new compute negative coverage tests
John Richardson [Mon, 6 Feb 2017 11:28:21 +0000 (11:28 +0000)]
Add new compute negative coverage tests

Test groups added to:
- dEQP-GLES31.functional.debug.negative_coverage.*.compute (new)

New tests:
- program_not_active

- invalid_program_query
- invalid_dispatch_compute_indirect
- invalid_maximum_work_group_counts
- invalid_maximum_work_group_sizes
- invalid_layout_qualifiers
- invalid_write_built_in_constants

- exceed_uniform_block_limit
- exceed_shader_storage_block_limit
- exceed_texture_image_units_limit
- exceed_image_uniforms_limit
- exceed_shared_memory_size_limit
- exceed_uniform_components_limit
- exceed_atomic_counter_buffer_limit
- exceed_atomic_counters_limit

Change-Id: Ifd798652df3b138e174c1d9408b6ecdb003ce7f9

7 years agoAdd new draw elements base vertex tests
John Richardson [Tue, 14 Feb 2017 09:27:14 +0000 (09:27 +0000)]
Add new draw elements base vertex tests

New tests for EXT_draw_elements_base_vertex extension
exercising the following draw calls

- DrawElementsBaseVertex()
- DrawRangeElementsBaseVertex()
- DrawElementsInstancedBaserVertex()

New test groups:
- dEQP-GLES31.functional.draw_elements_base_vertex.*

New tests:
- indices.*
- base_vertex.*
- builtin_variable.*
- points.*
- triangles.*
- triangle_fan.*
- triangle_strip.*
- lines.*
- line_strip.*
- line_loop.*

Extend dEQP-GLES31.functional.debug.negative_coverage.callbacks.vertex_array.*
tests to include additional mapping and mismatched primitive mode
errors for base vertex draw calls.

New tests:
- *.primitive_mode_mismatch
- *.invalid_map

Change-Id: Iefc9bcddd3fe8831d2bb20f2e46d06f92daa6d6b

7 years agoAdd negative sRGB texture/sampler API tests
Michael Hadley [Wed, 7 Dec 2016 16:11:05 +0000 (16:11 +0000)]
Add negative sRGB texture/sampler API tests

Added sRGB tests to the following:
- dEQP-GLES31.functional.debug.negative_coverage.callbacks.texture.*
- dEQP-GLES31.functional.debug.negative_coverage.callbacks.shader.*

Change-Id: I1ebd5a95c8605a39e4bbb5b4516d0f7b8c11898e

7 years agoAdd shaderStorageImage{Read|Write}WithoutFormat tests
Iago Toral Quiroga [Wed, 1 Mar 2017 11:09:54 +0000 (12:09 +0100)]
Add shaderStorageImage{Read|Write}WithoutFormat tests

This adds new store tests that remove the format layout qualifier
from the writeonly image and new load_store tests that remove
the format layout qualifier from the readonly image.

Since we don't have access to the physical device properties
during shader program compilation, we follow the same approach
of other tests and write two variants of the shader, one that
declares the format qualifier and one that doesn't. We use a
test flag to track if a specific test case is intended to check
behavior with or without image format layout qualifiers declared,
and use that to decide the shader variant to use at run-time.

The original tests now live under
dEQP-VK.image.{load_}store.with_format.* and the new tests
are added under dEQP-VK.image.{load_}store.without_format.*

Components: Vulkan
VK-GL-CTS issue: 164

New tests:
dEQP-VK.image.store.without_format.*
dEQP-VK.image.load_store.without_format.*

Change-Id: I15d7b7e8dafd4e229ff23f61700580b60cb29cb0

7 years agoUpdate fetch_sources.py to get glslang with shader_image_load_formatted
Iago Toral Quiroga [Mon, 6 Mar 2017 08:35:34 +0000 (09:35 +0100)]
Update fetch_sources.py to get glslang with shader_image_load_formatted

This is needed for the
shaderStorageImage{Read|Write}WithoutFormat tests.

Components: Framework

Change-Id: I0edb92489f73db04779b93a21537d758757ddd2f

7 years agodEQP-VK: Add 64-bit versions of the SPIR-V SMod and SRem tests
Jason Ekstrand [Thu, 2 Mar 2017 00:48:20 +0000 (16:48 -0800)]
dEQP-VK: Add 64-bit versions of the SPIR-V SMod and SRem tests

This adds the following tests:

dEQP-VK.spirv_assembly.instruction.compute.opsrem64.positive
dEQP-VK.spirv_assembly.instruction.compute.opsrem64.all
dEQP-VK.spirv_assembly.instruction.compute.opsmod64.positive
dEQP-VK.spirv_assembly.instruction.compute.opsmod64.all

Components: Vulkan

Change-Id: Id2c78e94632637f110726c805fd287b63adbde68

7 years agoFix warning introduced in 2c9e3ec9 am: 521361d83d
Pyry Haulos [Fri, 17 Mar 2017 12:13:38 +0000 (12:13 +0000)]
Fix warning introduced in 2c9e3ec9 am: 521361d83d
am: 19bf995047

Change-Id: I15737bc9d84ca0c75026de084d77dbfe833d6539

7 years agoFix warning introduced in 2c9e3ec9
Pyry Haulos [Fri, 17 Mar 2017 12:09:41 +0000 (12:09 +0000)]
Fix warning introduced in 2c9e3ec9
am: 521361d83d

Change-Id: I82a9917cb875a166583a41e3d1bb7702ae2d3db8

7 years agodEQP-VK: Merge ConvertTestCase with SpvAsmComputeShaderCase
Jason Ekstrand [Tue, 14 Mar 2017 21:40:58 +0000 (14:40 -0700)]
dEQP-VK: Merge ConvertTestCase with SpvAsmComputeShaderCase

The only thing ConvertTestCase was providing over SpvAsmComputeShaderCase
was the ability to specify a set of features required by the test case.
However, this is something that's useful in general if we want to be
able to use int16, int64, or float64 in any of the other compute tests.

Change-Id: I870b8245de94afdb1067d2e538621d1b2230fc51

7 years agoMerge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master
Pyry Haulos [Thu, 16 Mar 2017 20:38:50 +0000 (13:38 -0700)]
Merge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master

Change-Id: Ie076d86b595698bdb431fa45536a72fa02cac333

7 years agoMerge vk-gl-cts/vulkan-cts-1.0.1 into vk-gl-cts/vulkan-cts-1.0.2
Pyry Haulos [Thu, 16 Mar 2017 20:26:40 +0000 (13:26 -0700)]
Merge vk-gl-cts/vulkan-cts-1.0.1 into vk-gl-cts/vulkan-cts-1.0.2

7 years agoAdd missing flushes for basic draws
Gary Sweet [Thu, 16 Mar 2017 13:17:39 +0000 (13:17 +0000)]
Add missing flushes for basic draws

Buffers were being mapped and written, but not flushed
before use. This affected the basic draw tests when running
with a non-coherent heap.

Affects:

dEQP-VK.draw.basic_draw.*

Components: Vulkan

VK-GL-CTS issue: 210

Change-Id: Ib0f9b77a3b0cd4488b9dc4cee6ebd6de4840262c

7 years agoEnable use of std::string in TCU_FAIL macro
Boris Zanin [Thu, 16 Mar 2017 12:08:20 +0000 (13:08 +0100)]
Enable use of std::string in TCU_FAIL macro

Extend TestError class with a constructor that accepts
std:string as a first parameter in 4-parameter constructor.
This enables to use statements like TCU_FAIL(std::string).

Components: Framework

VK-GL-CTS issue: 260

Change-Id: Ib7cf3eedd8eb22f3cdf9603e56e3fbcc69644d64

7 years agoAdd missing flushes for indirect draws
Gary Sweet [Thu, 16 Mar 2017 13:26:53 +0000 (13:26 +0000)]
Add missing flushes for indirect draws

Buffers were being mapped and written, but not flushed
before use. This affected the indirect draw tests when running
with a non-coherent heap.

Affects:

dEQP-VK.draw.indirect_draw.*

Components: Vulkan

VK-GL-CTS issue: 210

Change-Id: Ie8920bea727419a1da22b8e2d9babcca2c6593fe

7 years agoFix warning introduced in 2c9e3ec9
Pyry Haulos [Wed, 15 Mar 2017 19:23:06 +0000 (12:23 -0700)]
Fix warning introduced in 2c9e3ec9

Change-Id: I42bef21b2cc7274f107e5455dea1e382d8a419f4
(cherry picked from commit d8b452a7533c195b1328918bb696a819542ff044)

7 years agoProperly initialize minFilter/magFilter when setting up test cases
Jorg Wagner [Mon, 13 Feb 2017 06:49:27 +0000 (07:49 +0100)]
Properly initialize minFilter/magFilter when setting up test cases

Modified tests:

dEQP-VK.texture.compressed.*

Components: Vulkan
Vulkan CTS issue: 162

Change-Id: I5fde347c1ab24e01e1ac238fac82ec4071166993

7 years agoFix dynamicStateCount = 0 in tessellation tests
Pyry Haulos [Wed, 15 Mar 2017 19:48:21 +0000 (12:48 -0700)]
Fix dynamicStateCount = 0 in tessellation tests

Change-Id: Ic90bbcda9342e4b9dcbe8f254e855de4f4032d68

7 years agoFix warning introduced in 2c9e3ec9
Pyry Haulos [Wed, 15 Mar 2017 19:23:06 +0000 (12:23 -0700)]
Fix warning introduced in 2c9e3ec9

Change-Id: I42bef21b2cc7274f107e5455dea1e382d8a419f4

7 years agoMerge "Further relax line verification in primitive bbox tests" into nougat-cts-dev...
Alexander Galazin [Wed, 15 Mar 2017 18:40:38 +0000 (18:40 +0000)]
Merge "Further relax line verification in primitive bbox tests" into nougat-cts-dev am: 0532365740
am: 468843cf08

Change-Id: I9122ba56c736bdbb628dff8b5b8cc28c9979801f

7 years agoMerge "Further relax line verification in primitive bbox tests" into nougat-cts-dev
Alexander Galazin [Wed, 15 Mar 2017 18:35:35 +0000 (18:35 +0000)]
Merge "Further relax line verification in primitive bbox tests" into nougat-cts-dev
am: 0532365740

Change-Id: I12be73b76f9ae43955fbca0071f36b897e82f0d9

7 years agoMerge "Further relax line verification in primitive bbox tests" into nougat-cts-dev
Treehugger Robot [Wed, 15 Mar 2017 18:30:21 +0000 (18:30 +0000)]
Merge "Further relax line verification in primitive bbox tests" into nougat-cts-dev

7 years agoFix warnings in glcViewportArrayTests.cpp
Pyry Haulos [Wed, 15 Mar 2017 17:02:47 +0000 (10:02 -0700)]
Fix warnings in glcViewportArrayTests.cpp

Components: OpenGL
Change-Id: I62f951cb8056e7c9d00f5ddd3c110ccd302ac252

7 years agoFix warnings in new EGL tests
Pyry Haulos [Wed, 15 Mar 2017 17:06:30 +0000 (10:06 -0700)]
Fix warnings in new EGL tests

Change-Id: I6d87c0bf5a61dcbb0f292dd7efa6fcb101b7442d

7 years agoUse glReadnPixels only if KHR_robustness is supported am: d99ba132d9
Alexander Galazin [Wed, 15 Mar 2017 15:27:25 +0000 (15:27 +0000)]
Use glReadnPixels only if KHR_robustness is supported am: d99ba132d9
am: d01980d03d

Change-Id: If10695499f41c716416cb4277170529a1f325596

7 years agoUse glReadnPixels only if KHR_robustness is supported
Alexander Galazin [Wed, 15 Mar 2017 15:22:52 +0000 (15:22 +0000)]
Use glReadnPixels only if KHR_robustness is supported
am: d99ba132d9

Change-Id: Icd032ba51a9c2c6141b21083b300e8709ecd7b45

7 years agoChange extern globals into functions for SPIR-V assembly tests
Lei Zhang [Fri, 10 Mar 2017 17:19:01 +0000 (12:19 -0500)]
Change extern globals into functions for SPIR-V assembly tests

This is just refactoring work. No logic change.

Affects:

dEQP-VK.spirv_assembly.*

Component: Vulkan

Change-Id: Ia321f44ffbdb3deb2e9610a7c1d3acdded328a41
(cherry picked from commit ae6a57bec471534780f6a6d117fe77d0bfaf4340)

7 years agoMove graphics pipeline related code to their own files
Lei Zhang [Thu, 9 Mar 2017 14:59:22 +0000 (09:59 -0500)]
Move graphics pipeline related code to their own files

This is just refactoring work. No logic change.

Affects:

dEQP-VK.spirv_assembly.*

Component: Vulkan

Change-Id: If0585dc6e62c415fd04e3bd39f5e0ca9659a267d
(cherry picked from commit f7c283abbd4c94260bbeb2dfed0f709a0b48a509)

7 years agoAdd tests for VK_GOOGLE_display_timing
Ian Elliott [Sun, 15 Jan 2017 22:28:01 +0000 (14:28 -0800)]
Add tests for VK_GOOGLE_display_timing

New tests:

dEQP-VK.wsi.*.display_timing.*

Changed tests:

dEQP-VK.api.info.android.no_unknown_extensions

VK-GL-CTS issue: 227

Change-Id: I50ae75ee0301668e4ad255625f7098387365def8
(cherry picked from commit 4ca1b5ba618a69f9ab748417c9ac5247d182dff4)

7 years agoMerge "Fix stencil bits when creating reference image in depth stencil tests"
Treehugger Robot [Mon, 13 Mar 2017 19:56:27 +0000 (19:56 +0000)]
Merge "Fix stencil bits when creating reference image in depth stencil tests"

7 years agoMerge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master
Pyry Haulos [Mon, 13 Mar 2017 19:21:55 +0000 (12:21 -0700)]
Merge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master

Change-Id: I7d3af09e44cdeeb4d625a48d40699bbb04fc6157

7 years agoFix precision mismatch issues in dEQP-VK.glsl
Pyry Haulos [Thu, 9 Mar 2017 18:55:20 +0000 (10:55 -0800)]
Fix precision mismatch issues in dEQP-VK.glsl

Changed tests:

dEQP-VK.glsl.functions.*
dEQP-VK.glsl.linkage.*
dEQP-VK.glsl.scoping.*
dEQP-VK.glsl.swizzles.*

Removed tests:

dEQP-VK.glsl.linkage.varying.rules.differing_precision_1
dEQP-VK.glsl.linkage.varying.rules.differing_precision_2
dEQP-VK.glsl.linkage.varying.rules.differing_precision_3

VK-GL-CTS issue: 214
Components: Vulkan

Change-Id: I48c7a5573b485340daa5be9db6aab1fbc70a6fc5

7 years agoMerge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master
Pyry Haulos [Mon, 13 Mar 2017 19:20:50 +0000 (12:20 -0700)]
Merge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master

Change-Id: Idb98f6470101e761d8f35dfabdb9ca569fbe2975

7 years agoFix validation errors in dEQP-VK.tessellation
Pyry Haulos [Thu, 9 Mar 2017 21:39:17 +0000 (13:39 -0800)]
Fix validation errors in dEQP-VK.tessellation

This fixes several invalid VkExtent3D::depth values for 2D image
operations as well as couple of interface mismatches.

Changed tests: dEQP-VK.tessellation.*

VK-GL-CTS issue: 222
Components: Vulkan

Change-Id: I3da2de6fdf5df7cb89717e35bade73b43e9d3a7d

7 years agoFix precision mismatch in dEQP-VK.binding_model
Pyry Haulos [Thu, 9 Mar 2017 20:44:57 +0000 (12:44 -0800)]
Fix precision mismatch in dEQP-VK.binding_model

Changed tests:

dEQP-VK.binding_model.shader_access.*vertex*

VK-GL-CTS issue: 212
Components: Vulkan

Change-Id: I34b565329c6261f7a12d19f67451c13537dfd914

7 years agoMerge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master
Pyry Haulos [Mon, 13 Mar 2017 19:17:25 +0000 (12:17 -0700)]
Merge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master

Change-Id: Ibb96d8f1511a5e152b0460208f64c6610ba55e57

7 years agoFix stencil bits when creating reference image in depth stencil tests
Kenneth Graunke [Sat, 11 Mar 2017 17:26:19 +0000 (09:26 -0800)]
Fix stencil bits when creating reference image in depth stencil tests

renderReference expects the number of stencil bits, but we were passing
the number of depth bits.

Affects:
- dEQP-GLES2.functional.fragment_ops.depth_stencil.*
- dEQP-GLES3.functional.fragment_ops.depth_stencil.*

Patch authored by Iago Toral.  See also:
https://bugs.freedesktop.org/show_bug.cgi?id=94455

Change-Id: Id20a4a976c11d5dbe099e0acacc2f7c38dddeb17

7 years agoFix depth stencil aspect flag in render pass input tests
Mika Isojärvi [Thu, 9 Mar 2017 20:33:48 +0000 (12:33 -0800)]
Fix depth stencil aspect flag in render pass input tests

Affected tests:
dEQP-VK.renderpass.* -groups depth and stencil tests

VK-GL-CTS issue: 216
Components: Vulkan

Change-Id: Ib84e42d09e5fea9fbe2f1270c5369b14eb9d688b

7 years agoFix image layout in dEQP-VK.image
Pyry Haulos [Thu, 9 Mar 2017 20:51:24 +0000 (12:51 -0800)]
Fix image layout in dEQP-VK.image

Image load and store ops are only supported in VK_IMAGE_LAYOUT_GENERAL.

Changed tests:

dEQP-VK.image.load_store.*
dEQP-VK.image.format_reinterpret.*
dEQP-VK.image.qualifiers.restrict.*

VK-GL-CTS issue: 217
Components: Vulkan

Change-Id: I2b9048176ce0e79b3d1db8cb36d384c1b4c4c9d4

7 years agoFix validation errors in dEQP-VK.geometry
Pyry Haulos [Thu, 9 Mar 2017 21:45:30 +0000 (13:45 -0800)]
Fix validation errors in dEQP-VK.geometry

Fixes VkExtent3D::depth value as well as interface precision mismatch
issues.

VK-GL-CTS issue: 224
Components: Vulkan

Change-Id: Ida6f3ae2ba73cab3de22090a32a49e54b7af339c

7 years agoFix issues in pipeline.timestamp.transfer_tests
Pyry Haulos [Thu, 9 Mar 2017 17:46:29 +0000 (09:46 -0800)]
Fix issues in pipeline.timestamp.transfer_tests

This change fixes two issues:

 * Buffer overrun in vkCmdCopyBufferToImage and vkCmdCopyImageToBuffer
tests.

 * Validation error (srcStageMask must not be 0).

VK-GL-CTS issue: 185
Components: Vulkan

Change-Id: I9679566f08c4a914eb6066bab248abd6d51e0f7e

7 years agoFix build after CTS_ARB_sparse_texture_clamp tests
Alexander Galazin [Fri, 10 Mar 2017 19:19:09 +0000 (20:19 +0100)]
Fix build after CTS_ARB_sparse_texture_clamp tests

GL_EXT_direct_state_access was not added to the script
generating inline files. This caused sanity checks failures.

Component: Framework

Affects: inline file generation

Change-Id: I0a4c1e8dc6076f3a939f0adf474d9ae58ef38dba

7 years agoFurther relax line verification in primitive bbox tests
Alexander Galazin [Mon, 6 Mar 2017 18:44:38 +0000 (19:44 +0100)]
Further relax line verification in primitive bbox tests

The original relaxation patch
ba45591407d0207e8ba0634ea5636fd721ed781f
allowed lines to be 1 pixel thinner or thicker compared
to the expected width. Unfortunately it missed the case
of a line with the width of 1 pixel that has extra verification
in the framework. This change covers this gap.

Google bug: 35987764

Change-Id: I193d76ae13738702c9d7361d1957f15ea7600c4f

7 years agopreprocessor: Undefining __VERSION__ on GLSL 3.30 is not an error
Eduardo Lima Mitev [Wed, 8 Mar 2017 08:42:25 +0000 (09:42 +0100)]
preprocessor: Undefining __VERSION__ on GLSL 3.30 is not an error

OpenGL Shading Language 4.5 spec, section '3.3 Preprocessor',
page 12 states:

   "By convention, all macro names containing two consecutive
    underscores ( __ ) are reserved for use by underlying
    software layers. Defining such a name in a shader does not
    itself result in an error, but may result in unintended
    behaviors that stem from having multiple definitions of the
    same name."

There is no explicit mention to #undef, but the consensus is that
defining or undefining are both subject to the same restrictions
in this context.

Affects:
GL45-CTS.shaders.preprocessor.definitions.undefine_version_fragment
GL45-CTS.shaders.preprocessor.definitions.undefine_version_vertex

VK-GL-CTS issue: 206

Components: OpenGL

Change-Id: I36c9ada736d7704767e403b18f21d7343dff1aa2

7 years agoSkip FRAMEBUFFER_UNSUPPORTED subtests on DSA textures_buffer
Alejandro Piñeiro [Thu, 2 Mar 2017 17:49:50 +0000 (18:49 +0100)]
Skip FRAMEBUFFER_UNSUPPORTED subtests on DSA textures_buffer

From OpenGL 4.5 spec, section 9.4.2 "Whole Framebuffer Completeness":

   "Although the GL defines a wide variety of internal formats for
    framebuffer-attachable images, such as texture images and
    renderbuffer images, some implementations may not support
    rendering to particular combinations of internal formats. If the
    combination of formats of the images attached to a framebuffer
    object are not supported by the implementation, then the
    framebuffer is not complete under the clause labeled
    FRAMEBUFFER_UNSUPPORTED .

    Implementations are required to support certain combinations of
    framebuffer internal formats as described under “Required
    Framebuffer Formats” in sec- tion 9.4.3."

That means that if the combination being tested returns
FRAMEBUFFER_UNSUPPORTED, it is still allowed by OpenGL spec. For those
cases, the test should skip instead of fail.

Affects:
GL45-CTS.direct_state_access.textures_buffer

Components: OpenGL

VK-GL-CTS: 201

Change-Id: Ia272a975e8417837637cd47b621b91306d1aa567

7 years agoCullDistanceTests/coverage: Fix a couple issues in the shaders
Eduardo Lima Mitev [Mon, 6 Mar 2017 14:45:35 +0000 (15:45 +0100)]
CullDistanceTests/coverage: Fix a couple issues in the shaders

There are two specific problems in the shaders of this test, both
preventing the fragment shader from receiving any fragment (no geometry
is renderer), and thus the gl_maxCullDistances value read back from the
texture is always zero.

The first issue is in the geometry shader. The 4 emitted vertices have
a 0.0 normal, the quad is not visible.

The second issue is in the tessellation evaluation shader, where the
value of gl_Position is not explicitly set, so the point is rendered
at an undefined location.

Components: OpenGL

Affects:
GL45-CTS.cull_distance.coverage

VL-GL-CTS issue: 197

Change-Id: I145894192fe9504808666e2c2fcd6cf53dbb03df

7 years agoUse glReadnPixels only if KHR_robustness is supported
Alexander Galazin [Thu, 23 Feb 2017 12:01:18 +0000 (13:01 +0100)]
Use glReadnPixels only if KHR_robustness is supported

glReadnPixels is introduced in KHR_robustness/GLES 3.2.
Use of this function in GLES 3.1 tests will result in segfault
on implementations that don't support KHR_robustness.

Components: AOSP, Framework

Affects: dEQP-GLES31.functional.debug.negative_coverage.callbacks.buffer.read_pixels_format_mismatch

VK-GL-CTS issue: 166
Google bug: 36122027

Change-Id: Idbe8734f7d82882ea99c75a8b74d693ac6dd831f
(cherry picked from commit 219019495770c221e92f43df3e76a954c613210d)

7 years agoFix GL45-CTS.cull_distance.functional test
Juan A. Suarez Romero [Tue, 28 Feb 2017 10:05:46 +0000 (10:05 +0000)]
Fix GL45-CTS.cull_distance.functional test

This commit fixes several issues in this test:

- Coordinate X conversion from float in [0, 1] range to uint in range
[0, m_to_with] is wrong. Same for coordinate Y.

- Offset drawing point for primitive point is wrong.

- Generated vertex shader for the case of dynamic index writes with
culling but not clipping fails to compile, due "unsized array index must
be constant". This happens because we make reference in the code to the
clipdistance array, which is unsized. This problem also happens with
clipping but not culling.

- Program fails to link when using tessellation shaders, due
"definitions of interface block `gl_PerVertex' do not match". This
happens because tessellation control shader redefines gl_PerVertex, but
tessellation evaluation shader don't.

Components: OpenGL

VK-GL-CTS issue: 191

Affects:
GL45-CTS.cull_distance.functional

Change-Id: I5143b45caa5a0490f58628326b44c4373d5c8305

7 years agoAdd CTS_ARB_sparse_texture_clamp tests
Adam Czupryna [Mon, 30 Jan 2017 07:04:50 +0000 (08:04 +0100)]
Add CTS_ARB_sparse_texture_clamp tests

Added CTS_ARB_sparse_texture_clamp cases:
ShaderExtensionTestCase
SparseTextureClampLookupResidencyTestCase
SparseTextureClampLookupColorTestCase

affects:

GL45-CTS.sparse_texture_tests.*
GL45-CTS.sparse_texture2_tests.*

components: OpenGL, Framework

VK-GL-CTS issue: 60

Change-Id: I1d312fe7fd82d5de74926d189f1e6ec6ce910ce2

7 years agoFix typo in dEQP-GLES31.functional.srgb_texture_decode.skip_decode.*
Sunny Sun [Fri, 10 Mar 2017 06:46:23 +0000 (14:46 +0800)]
Fix typo in dEQP-GLES31.functional.srgb_texture_decode.skip_decode.*

Change-Id: I1432dbff1db24b0f1dd2c9a297822b4fbdb1aa76

7 years agoMerge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master
Pyry Haulos [Thu, 9 Mar 2017 23:41:19 +0000 (15:41 -0800)]
Merge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master

Change-Id: Ic82729c2a686a720ac8c2775b8a2dc92a25989b1

7 years agoRefactor vktShaderExecutor
Pyry Haulos [Wed, 8 Mar 2017 21:05:00 +0000 (13:05 -0800)]
Refactor vktShaderExecutor

ShaderExecutor Vulkan port had several issues:

 * Lifetime of ShaderExecutor was designed to extend from TestCase to
TestInstance. This was done in order to allow generating shader sources at
TestCase and later reuse same object to do actual execution when Vulkan
device was available. Result was total lifetime mess and leak of Vulkan
objects beyond TestInstance lifetime.

 * Whole UniformSetup system was badly designed mess that provided
functionality for just a few tests.

Following cleanups and fixes have been made:

 * ShaderExecutor objects are now expected to be live only when Vulkan
device is available, i.e. only within vkt::TestInstance. Shader source
generation part has been moved into a separate utility.

 * UniformSetup mess is removed and replaced with much leaner and
extensible way to supply additional resources. Descriptor set 1 is
reserved for test case specific resources and those can be provided by
supplying custom descriptor layout and descriptor set. Tests using old
UniformSetup system have been adjusted accordingly.

There is still room for additional improvements, such as moving much of
pipeline construction from ShaderExecutor::execute() into constructors,
but these can be done in follow-up CLs.

Affects following test groups:

dEQP-VK.glsl.builtin.*
dEQP-VK.glsl.opaque_type_indexing.
dEQP-VK.texture.explicit_lod.*

VK-GL-CTS issue: 182
Components: Vulkan

Change-Id: Icfc45a36cb4651f39f12608842ef347a55353d84

7 years agoImprove precision handling in texture.explicit_lod
Pyry Haulos [Mon, 13 Feb 2017 21:11:53 +0000 (13:11 -0800)]
Improve precision handling in texture.explicit_lod

This change improves precision requirement handling in
dEQP-VK.texture.explicit_lod test group by adding separate controls for
format conversion and filtering math.

Changed tests:
dEQP-VK.texture.explicit_lod.*

Components: Vulkan

Change-Id: Id64da1d63d87d02c73c757a3f2d5d50f2fbc19c0
(cherry picked from commit 4269dc0c1e513c550d3d45c16f2760450dfcef5c)

7 years agoMerge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master
Pyry Haulos [Thu, 9 Mar 2017 23:01:35 +0000 (15:01 -0800)]
Merge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master

Change-Id: I56bcaca8068dd1922af827f35253319b1106d5dd

7 years agoMerge vk-gl-cts/vulkan-cts-1.0.1 into vk-gl-cts/vulkan-cts-1.0.2
Pyry Haulos [Thu, 9 Mar 2017 23:01:33 +0000 (15:01 -0800)]
Merge vk-gl-cts/vulkan-cts-1.0.1 into vk-gl-cts/vulkan-cts-1.0.2

Change-Id: I14e2b7bbfe3940ace0e6ae9b661f2a56a49edf98

7 years agoMerge vk-gl-cts/vulkan-cts-1.0.0 into vk-gl-cts/vulkan-cts-1.0.1
Pyry Haulos [Thu, 9 Mar 2017 23:01:31 +0000 (15:01 -0800)]
Merge vk-gl-cts/vulkan-cts-1.0.0 into vk-gl-cts/vulkan-cts-1.0.1

Change-Id: Ica55df93dd12ea2c6460ec7c6fbb1383e6d38f4d

7 years agoAdd yflip versions of tessellation winding order tests
Jason Ekstrand [Thu, 26 Jan 2017 22:27:48 +0000 (14:27 -0800)]
Add yflip versions of tessellation winding order tests

Changed: dEQP-VK.tessellation.winding.triangles_*

Components: Vulkan

Change-Id: I3e0abc8d25132e129cb2979b1fce985ca4a60dc4

7 years agoImprove precision handling in tests with FragCoord
Arkadiusz Sarwa [Mon, 13 Feb 2017 09:24:26 +0000 (10:24 +0100)]
Improve precision handling in tests with FragCoord

The tests for gl_FragCoord are not accurate enough, these tests pass
event for invalid driver. The comparison is made on RGBA8 surfaces,
it is not accurate enough for the tests.

The fix makes comparison more precise for the tests.

Modified tests:
dEQP-VK.glsl.builtin_var.simple.fragcoord_xyz
dEQP-VK.glsl.builtin_var.simple.fragcoord_w

Components: Vulkan
VK-GL-CTS issue: 77

Change-Id: I34ba77e696524215468202ef3fe77d1284e3e3df

7 years agoAdd Khronos mustpass v3.2.3
Alexander Galazin [Wed, 8 Mar 2017 08:36:19 +0000 (09:36 +0100)]
Add Khronos mustpass v3.2.3

Change-Id: I7dafffd7928cee4653ac9073ecde18dba5a7a43a

7 years agoFix a compilation error on GCC 5.4
Maciej Jesionowski [Wed, 8 Mar 2017 13:15:55 +0000 (14:15 +0100)]
Fix a compilation error on GCC 5.4

Components: Vulkan
Change-Id: I6c6681d16613f18b2a3192368927f6d176f63a64

7 years agoTake snapshot of the AOSP master mustpass and use it in GL CTS
Alexander Galazin [Mon, 5 Dec 2016 09:25:27 +0000 (10:25 +0100)]
Take snapshot of the AOSP master mustpass and use it in GL CTS

Components: OpenGL
VK-GL-CTS issue: 23

Change-Id: I9ebb11fd8c69f1b697bb08ac7351033c9b06ef94

7 years agoMerge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master
Pyry Haulos [Wed, 8 Mar 2017 23:26:36 +0000 (15:26 -0800)]
Merge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master

Change-Id: Ice81ca8779a7f7cfea5d8fab0e4b48fe6e603ec2

7 years agoMerge vk-gl-cts/aosp-master into vk-gl-cts/master
Pyry Haulos [Wed, 8 Mar 2017 23:10:14 +0000 (15:10 -0800)]
Merge vk-gl-cts/aosp-master into vk-gl-cts/master

Components: AOSP, Framework

Change-Id: I0de6207abfc1c990a85fcf977d78ed1103c52a1b

7 years agoUse glReadnPixels only if KHR_robustness is supported
Alexander Galazin [Thu, 23 Feb 2017 12:01:18 +0000 (13:01 +0100)]
Use glReadnPixels only if KHR_robustness is supported

glReadnPixels is introduced in KHR_robustness/GLES 3.2.
Use of this function in GLES 3.1 tests will result in segfault
on implementations that don't support KHR_robustness.

Components: AOSP, Framework

Affects: dEQP-GLES31.functional.debug.negative_coverage.callbacks.buffer.read_pixels_format_mismatch

VK-GL-CTS issue: 166

Change-Id: Idbe8734f7d82882ea99c75a8b74d693ac6dd831f

7 years agoFix indirect draw line offset calculation
Graeme Leese [Thu, 2 Mar 2017 15:08:20 +0000 (15:08 +0000)]
Fix indirect draw line offset calculation

The GL_LINES test was correctly avoiding undefined rasterizer tie-break
conditions but other tests that draw lines were not. Include the fix in
the other tests.

Affects:
KHR-GLES31.core.draw_indirect.basic-mode-draw*-line*_adjacency

Components: OpenGL
VK-GL-CTS issue: 193

Change-Id: I58862469b0bae3b5f968bad8586adc7cad6ad7c7

7 years agoFix flakiness of compositeDeadline check of eglGetFrameTimestsmps
Brian Anderson [Tue, 7 Mar 2017 00:34:03 +0000 (16:34 -0800)]
Fix flakiness of compositeDeadline check of eglGetFrameTimestsmps

maxDeadline already has some slack built into the check.
This ensures proper slack for the mindDeadline too.

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

7 years agoMerge "Modify EGL robustness tests to use VBOs"
Treehugger Robot [Mon, 6 Mar 2017 19:54:49 +0000 (19:54 +0000)]
Merge "Modify EGL robustness tests to use VBOs"

7 years agoModify EGL robustness tests to use VBOs
John Richardson [Fri, 3 Mar 2017 12:01:08 +0000 (12:01 +0000)]
Modify EGL robustness tests to use VBOs

Remove use of client-side vertex arrays and use buffer objects instead.
Delete buffers on teardown and in destructor.
Move test description logs to start log file.

Affected tests:
- dEQP-EGL.functional.robustness.reset_context.*

Change-Id: I9432258f30d6c7e02362c0b2f6c36fc3694bd72d

7 years agoFix "null" ID in sRGB decode tests
Pyry Haulos [Fri, 3 Mar 2017 16:44:08 +0000 (08:44 -0800)]
Fix "null" ID in sRGB decode tests

Use 0 as "null" GL object ID as -1 is potentially valid ID.

Change-Id: I95f9f0c300d5b6e95c0c7c81e29fd28ac9ca3b82

7 years agoAdd CTS_ARB_fragment_shader_interlock specification proposal
Adam Czupryna [Wed, 1 Feb 2017 14:07:45 +0000 (15:07 +0100)]
Add CTS_ARB_fragment_shader_interlock specification proposal

This is CTS_ARB_fragment_shader_interlock specification proposal

components: OpenGL

VK-GL-CTS issue: 61

Change-Id: I0a7827e87c807d1044d7434ac1e9833530be3cde

7 years agoFix narrowing conversion warning
Pyry Haulos [Thu, 2 Mar 2017 20:40:08 +0000 (12:40 -0800)]
Fix narrowing conversion warning

Change-Id: I07b20837e5dac2f6a88504b582732a7db10cf5c8

7 years agoModify single_tessellation_stage to check for GL_NV_gpu_shader5
Mark Adams [Thu, 2 Mar 2017 15:19:49 +0000 (10:19 -0500)]
Modify single_tessellation_stage to check for GL_NV_gpu_shader5

That extension permits the use of a tessellation control shader
without a tessellation evaluation shader. Affected tests:

dEQP-GLES31.functional.debug.negative_coverage.*.tessellation.single_tessellation_stage

7 years agoFix a compilation error on MSVC12
Maciej Jesionowski [Thu, 2 Mar 2017 11:51:39 +0000 (12:51 +0100)]
Fix a compilation error on MSVC12

There's a problem with uint32_t, so better just use delib defines.

Components: Vulkan

Change-Id: I589ac7f220a7e651ed31910d16c643866314f681

7 years agoMerge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master
Pyry Haulos [Wed, 1 Mar 2017 15:53:48 +0000 (07:53 -0800)]
Merge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master

Change-Id: I453e9f9eedc6e07d785d054b69c6822c0a9e80b1

7 years agoMerge vk-gl-cts/vulkan-cts-1.0.1 into vk-gl-cts/vulkan-cts-1.0.2
Pyry Haulos [Wed, 1 Mar 2017 15:53:46 +0000 (07:53 -0800)]
Merge vk-gl-cts/vulkan-cts-1.0.1 into vk-gl-cts/vulkan-cts-1.0.2

Change-Id: I1a17ff8600abeab32614212bdab2e4646e50bc25

7 years agoMerge vk-gl-cts/vulkan-cts-1.0.0 into vk-gl-cts/vulkan-cts-1.0.1
Pyry Haulos [Wed, 1 Mar 2017 15:53:44 +0000 (07:53 -0800)]
Merge vk-gl-cts/vulkan-cts-1.0.0 into vk-gl-cts/vulkan-cts-1.0.1

Change-Id: I9eec4dd1fa88a85374eba8d0851b00a28c50b4ac

7 years agoAdd new robustness extension tests
John Richardson [Wed, 1 Feb 2017 15:00:53 +0000 (15:00 +0000)]
Add new robustness extension tests

New tests for KHR_robustness extension. Attempts to provoke context
reset scenarios and test GL state after a reset has occurred.

New test group:
- dEQP-EGL.functional.robustness.*

New tests:
- create_context.query_robust_access
- create_context.no_reset_notification
- create_context.lose_context_on_reset

- reset_context.shaders.infinite_loop.*   (various shaders)
- reset_context.shaders.out_of_bounds.*   (various resource types)
- reset_context.fixed_function_pipeline.* (index and vertex buffers)

- negative_context.invalid_robust_context_creation
- negative_context.invalid_robust_shared_context_creation

Note: Test groups ending in *_non_robust are for internal use only.

Change-Id: I91d7e3e95ec52f908dbaa1f49c56dcd94d60fd8f

7 years agoFix tessellation support checks in negative binding tests
Mika Isojärvi [Wed, 22 Feb 2017 21:25:59 +0000 (13:25 -0800)]
Fix tessellation support checks in negative binding tests

Bug: 35618877
Test: Run the tests on couple of devices supporting tessellation
Change-Id: Ieca6a28a57a278a07ff688f760eb7da807e66d49

7 years agoMerge Vulkan CTS 1.0.2.1 into AOSP
Pyry Haulos [Mon, 27 Feb 2017 19:26:45 +0000 (11:26 -0800)]
Merge Vulkan CTS 1.0.2.1 into AOSP

Change-Id: Ib0aaf12ec60902ebc31d00ad02291bd3d1cd7fae

7 years agoFix bug in reallocation callback validation
Pyry Haulos [Thu, 23 Feb 2017 22:11:27 +0000 (14:11 -0800)]
Fix bug in reallocation callback validation

vk::validateAllocationCallbacks() didn't correctly handle a case where
reallocate(NULL, size) returned previously seen pointer value.

VK-GL-CTS issue: 176
Components: Vulkan

Change-Id: I0822f8e4176d20d7bf296cd85f5c5223e189d250

7 years agoFix input attachment layout in renderpass tests
Igor Ostrowski [Mon, 27 Feb 2017 12:47:12 +0000 (13:47 +0100)]
Fix input attachment layout in renderpass tests

Input attachment layout was hardcoded for descriptor set update.
Added input attachment layout getter.

Affects:

dEQP-VK.renderpass.*

Components: Vulkan

VK-GL-CTS issue: 189

Change-Id: I2083c7b0cf4c68072f98d369f6c3089c6eb2b184

7 years agoMerge vk-gl-cts-public/master into vk-gl-cts/master
Pyry Haulos [Mon, 27 Feb 2017 06:12:52 +0000 (22:12 -0800)]
Merge vk-gl-cts-public/master into vk-gl-cts/master

7 years agoMerge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master
Pyry Haulos [Mon, 27 Feb 2017 05:36:38 +0000 (21:36 -0800)]
Merge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master

Change-Id: I9d823bd148d6767786e6ad28f19fc381070d149f

7 years agoFix extension support checks in negative api tests
Graeme Leese [Thu, 23 Feb 2017 16:56:10 +0000 (16:56 +0000)]
Fix extension support checks in negative api tests

Add checks for tessellation and geometry shader support for negative
shader storage and primitive bounding box tests.

Move all uses of cubemap array textures inside the extension checks in
the texture tests.

Bug: 29835218
Change-Id: I6051fff231285ed7d9c71015c2bb11a9fc7b909b
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
7 years agoFetch gl.xml, egl.xml from Github repos
Alexander Galazin [Fri, 24 Feb 2017 20:47:42 +0000 (21:47 +0100)]
Fetch gl.xml, egl.xml from Github repos

SVN repository containing gl.xml and egl.xml is no longer updated.
The new locations for these files are OpenGL-Registry and
EGL-Registry repositories on Github.
Adjust fetching scripts to use the new locations.

Components: Framework
Affects: headers generation

Change-Id: Ic091a46c636d446b6a4751bd3b797bcd19f90014

7 years agoFix [Named]FramebufferTextureLayer tests
Alejandro Piñeiro [Wed, 15 Feb 2017 12:48:19 +0000 (13:48 +0100)]
Fix [Named]FramebufferTextureLayer tests

The test was failing because it was reusing the texture ID used while
testing FramebufferTexture. But that is a GL_TEXTURE_2D, that is a
wrong target for [Named]FramebufferTextureLayer. So for the other
subtests, that were checking things like invalid attachment, etc,
there was two possible errors, and mesa driver raised first the one
related to a wrong target.

This patch reuses a texture ID with a valid target, being also used to
test [Named]FramebufferTextureLayer

For what it is worth, [Named]FramebufferTextureLayer with a wrong
target is also tested.

Affects:
GL45-CTS.direct_state_access.framebuffers_texture_attachment_errors

Components: OpenGL

VK-GL-CTS issue: 173

Change-Id: I388e1593e67d8708433d0f4763c716a4f3f03067

7 years agoMake vertex shader boilerplate to set gl_Position
Lionel Landwerlin [Fri, 16 Dec 2016 13:17:02 +0000 (13:17 +0000)]
Make vertex shader boilerplate to set gl_Position

If we don't generate any fragment from the previous stages, the
fragment shader might not be run. Hence invalid results for
GL45-CTS.shader_image_load_store.multiple-uniforms in the fragment
stage.

Components: OpenGL
Affects: GL45-CTS.shader_image_load_store.multiple-uniforms
VK-GL-CTS issue: 30

Change-Id: I6342e27ffd51725879fe1519d81122f41cb81eef

7 years agoMerge vk-gl-cts/opengl-es-cts-3.2.2 into vk-gl-cts/master
Alexander Galazin [Fri, 24 Feb 2017 17:12:13 +0000 (18:12 +0100)]
Merge vk-gl-cts/opengl-es-cts-3.2.2 into vk-gl-cts/master

Change-Id: I039aa2432d455394b254e0556a1ab63f02fba35a

7 years agoFix post-depth coverage shader test case
Iago Toral Quiroga [Tue, 21 Feb 2017 11:26:10 +0000 (12:26 +0100)]
Fix post-depth coverage shader test case

The tests uses 4 different versions of GLSL shader code for
the fragment shader that are supposed to be assigned to the
variables m_fragShader{1..4} that are then used in the 4
test cases implemented. However, the last shader code is not
assigned to m_fragShader4, instead it immediately overwrites
m_fragShader3. The test would then fail as it attempts to build
a shader program with an empty string for the fragment shader
when it uses m_fragShader4.

Components: OpenGL
VK-GL-CTS issue: 181

Affects:
GL45-CTS.post_depth_coverage_tests.PostDepthShader

Change-Id: I49474f04668de2037b4afc5570082bd4110f4fab

7 years agoDirectStateAccessTexturesTests: fix textures_parameters_errors
Alejandro Piñeiro [Mon, 20 Feb 2017 12:23:16 +0000 (13:23 +0100)]
DirectStateAccessTexturesTests: fix textures_parameters_errors

Right now GL45-CTS.direct_state_access.textures_parameter_errors
expects INVALID_OPERATION when using a wrong target.

From OpenGL 4.5 spec, section 8.11.2, Texture Parameter Queries:

   "An INVALID_ENUM error is generated if the effective target is not
    one of the texture targets described above."

The test even has a comment about expecting a INVALID_ENUM, so this
seems a typo when calling CheckErrorAndLog

Affects:
GL45-CTS.direct_state_access.textures_parameter_errors

Components: OpenGL

VK-GL-CTS issue: 180

Change-Id: Id82559090ccefa5713b0dd01d0ef26fdf4860ed3

7 years agoUse glInvalidateBuffer[Sub]Data correctly
Nicolai Hähnle [Fri, 17 Feb 2017 17:45:03 +0000 (18:45 +0100)]
Use glInvalidateBuffer[Sub]Data correctly

These function take a buffer name, not a bind point.

Modules: OpenGL
Affects:
GL45-CTS.sparse_buffer_tests.BufferStorageTest

VK-GL-CTS issue: 178

Change-Id: Iffdecfb5dd738ea82073ccb1b8771ca411f8f3b8

7 years agoFix shaders using reserved keywords incorrectly
Nicolai Hähnle [Fri, 17 Feb 2017 15:38:02 +0000 (16:38 +0100)]
Fix shaders using reserved keywords incorrectly

"input" is a reserved keyword in GLSL 1.40 (and other versions,
for that matter); this test should never have passed for any
correct implementation.

"unsigned int" should be "uint".

Affects:
GL45-CTS.sparse_buffer_tests.BufferStorageTest

Modules: OpenGL
VK-GL-CTS Issue: 177

Change-Id: I68bba7548225ada7949182a1239d423eff15fc35

7 years agoGetTextureSubImageTests: Remove m_texture_rectangle_compressed
Eduardo Lima Mitev [Wed, 15 Feb 2017 11:37:31 +0000 (12:37 +0100)]
GetTextureSubImageTests: Remove m_texture_rectangle_compressed

GetTextureSubImage::Errors test attempts to setup a compressed texture
using GL_TEXTURE_RECTANGLE as target, during test preparation. This is
explicitly forbidden by the spec.

From OpenGL 4.5 PDF, section "8.7. COMPRESSED TEXTURE IMAGES", page 214:

    "An INVALID_ENUM error is generated if the target parameter to any
     of the CompressedTexImagenD commands is TEXTURE_RECTANGLE or
     PROXY_TEXTURE_RECTANGLE ."

This patch removes the m_texture_rectangle_compressed texture from the
test, and all the associated test sub-cases.

Affects: GL45-CTS.get_texture_sub_image.errors_test
VK-GL-CTS issue: 169
Components: OpenGL

Change-Id: Ia3c2008cb948662f064dbc13fcd4d61c7d2caebf

7 years agoUnsized array of arrays in uniform block
Andres Gomez [Tue, 20 Dec 2016 17:25:46 +0000 (19:25 +0200)]
Unsized array of arrays in uniform block

From the GL_ARB_arrays_of_arrays spec:

   "For unsized arrays, only the outermost dimension can be lacking a
    size. A type that includes an unknown array size cannot be formed
    into an array until it gets an explicit size."

This is later further detailed as per OpenGL® Shading Language 4.40.

From page 3 (page 9 of the PDF) of the GLSL 4.00 v9 spec:

  "* Bug 11987: Allow array-of-array constructors and initialized
     variables to have any dimension unsized (not just the outer
     dimension) and get their size from the content of the constructor
     or initializer."

From page 37 (page 43 of the PDF) of the GLSL 4.00 v9 spec:

  " vec4 a[][] = { vec4[2](vec4(0.0), vec4(1.0)), // okay, size to
                   vec4[2](vec4(0.0), vec4(1.0)), //       a[3][2]
                   vec4[2](vec4(0.0), vec4(1.0)) };"

From page 38 (page 44 of the PDF) of the GLSL 4.00 v9 spec:

  "For implicitly-sized or run-time-sized arrays, only the outermost
   dimension can be lacking a size. A type that includes an unknown
   array size cannot be formed into an array until it gets an explicit
   size, except for shader storage blocks where the only unsized array
   member is the last member of the block."

Hence, in the absence of a constructor/initializer, unsized arrays are
only allowed for the outermost dimension of an AoA.

Affects:

GL43-CTS.arrays_of_arrays_gl.InteractionUniformBuffers3

Components: OpenGL
VK-GL-CTS issue: 146

Change-Id: Icbfe49c16e8ce7ffd55b92adede90405ac8e5f26

7 years agoMerge "Drop MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS to 2048"
Pyry Haulos [Fri, 24 Feb 2017 16:52:34 +0000 (16:52 +0000)]
Merge "Drop MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS to 2048"

7 years agoUnsized array of arrays in shader storage block
Andres Gomez [Tue, 20 Dec 2016 17:25:46 +0000 (19:25 +0200)]
Unsized array of arrays in shader storage block

From the GL_ARB_arrays_of_arrays spec:

   "For unsized arrays, only the outermost dimension can be lacking a
    size. A type that includes an unknown array size cannot be formed
    into an array until it gets an explicit size."

This is later further detailed as per OpenGL® Shading Language 4.40.

From page 3 (page 9 of the PDF) of the GLSL 4.00 v9 spec:

  "* Bug 11987: Allow array-of-array constructors and initialized
     variables to have any dimension unsized (not just the outer
     dimension) and get their size from the content of the constructor
     or initializer."

From page 37 (page 43 of the PDF) of the GLSL 4.00 v9 spec:

  " vec4 a[][] = { vec4[2](vec4(0.0), vec4(1.0)), // okay, size to
                   vec4[2](vec4(0.0), vec4(1.0)), //       a[3][2]
                   vec4[2](vec4(0.0), vec4(1.0)) };"

From page 38 (page 44 of the PDF) of the GLSL 4.00 v9 spec:

  "For implicitly-sized or run-time-sized arrays, only the outermost
   dimension can be lacking a size. A type that includes an unknown
   array size cannot be formed into an array until it gets an explicit
   size, except for shader storage blocks where the only unsized array
   member is the last member of the block."

Hence, in the absence of a constructor/initializer, unsized arrays are
only allowed for the outermost dimension of an AoA.

Affects:

GL43-CTS.arrays_of_arrays_gl.InteractionStorageBuffers3

Components: OpenGL
VK-GL-CTS issue: 145

Change-Id: Ic751b3ff52a84e3aee604552edf9441211890a11

7 years agoUnsized array of arrays in uniform variable
Andres Gomez [Tue, 20 Dec 2016 16:57:57 +0000 (18:57 +0200)]
Unsized array of arrays in uniform variable

From the GL_ARB_arrays_of_arrays spec:

   "For unsized arrays, only the outermost dimension can be lacking a
    size. A type that includes an unknown array size cannot be formed
    into an array until it gets an explicit size."

This is later further detailed as per OpenGL® Shading Language 4.40.

From page 3 (page 9 of the PDF) of the GLSL 4.00 v9 spec:

  "* Bug 11987: Allow array-of-array constructors and initialized
     variables to have any dimension unsized (not just the outer
     dimension) and get their size from the content of the constructor
     or initializer."

From page 37 (page 43 of the PDF) of the GLSL 4.00 v9 spec:

  " vec4 a[][] = { vec4[2](vec4(0.0), vec4(1.0)), // okay, size to
                   vec4[2](vec4(0.0), vec4(1.0)), //       a[3][2]
                   vec4[2](vec4(0.0), vec4(1.0)) };"

From page 38 (page 44 of the PDF) of the GLSL 4.00 v9 spec:

  "For implicitly-sized or run-time-sized arrays, only the outermost
   dimension can be lacking a size. A type that includes an unknown
   array size cannot be formed into an array until it gets an explicit
   size, except for shader storage blocks where the only unsized array
   member is the last member of the block."

Hence, in the absence of a constructor/initializer, unsized arrays are
only allowed for the outermost dimension of an AoA.

Affects:

GL43-CTS.arrays_of_arrays_gl.InteractionUniforms2

Components: OpenGL
VK-GL-CTS issue: 144

Change-Id: Icd3e710f1bb69b35355a5c4172dc8839b9f98c82

7 years agoBufferStorageTests: do not unmap with MapOwner if not needed
Alejandro Piñeiro [Fri, 3 Feb 2017 17:33:02 +0000 (18:33 +0100)]
BufferStorageTests: do not unmap with MapOwner if not needed

This test uses the following method to call MapRange on a buffer:

   Buffer::MapOwner Buffer::MapRange(glw::GLintptr offset,
                                     glw::GLsizeiptr length,
                                     glw::GLenum access)

It returns a MapOwner, that unmaps the buffer when it is destroyed.

For some tests, it is called like this:

{ /* start test */
   {
     buffer.MapRange(<params>);
   } /* freed here */

   /* Do stuff with the buffer. Assumes to be still mapped */

   /* Checks the buffer */

} /* end test */

The problem with this approach is that as the Mapowner returned by
MapRange is not used, it is destroyed (on the previous code snippet at
"freed here"), and the buffer is unmapped unintentionally.

This patch gets out the call to MapRange, so it is not unmapped until
the end (on the code snippet, at "end test").

Fixes the following tests (only Mesa Intel driver tested):
GL45-CTS.buffer_storage.get_buffer_parameter
GL45-CTS.buffer_storage.map_persistent_buffer_sub_data
GL45-CTS.buffer_storage.map_persistent_read_pixels

Components: OpenGL
VK-GL-CTS issue: 148

Change-Id: I676eeaf0808e9bb19617bde7d658c14859f1357d

7 years agoMerge pull request #30 from BigBigos/master
Piers Daniell [Fri, 24 Feb 2017 16:05:36 +0000 (09:05 -0700)]
Merge pull request #30 from BigBigos/master

Fix GL45-CTS.pipeline_statistics_query_tests_ARB.functional_default_qo_values

7 years agoDrop MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS to 2048
Pyry Haulos [Thu, 23 Feb 2017 20:50:22 +0000 (12:50 -0800)]
Drop MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS to 2048

GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS minmax has been changed to
2048 (from 4096) in OpenGL ES 3.2 spec in response to bug 12823.

Bug: 35619900
Change-Id: I59d75d23df02d339bf7094a8e73d3a24d2e785be