Vulkan CTS

New Tests:
 * Add tests for maintenance5
 * Test support for VK_COMPONENT_SWIZZLE_ONE.
 * Test round-to-zero behaviour of OpConvertFToU
 * Add xfb query copy tests with availablity
 * Add test cases for EXT_shader_tile_image extension
 * Test partial binding of depth/stencil images
 * Test support for VK_REMAINING_ARRAY_LAYERS.
 * Test commands on transfer-only queue
 * Disable depth clamp + clip extended dynamic state tests
 * Test VkDescriptorSetVariableDescriptorCountLayoutSupport
 * Test GPL with null VkPipelineRenderingCreateInfo contents
 * Test PGQ with the availability bit
 * Acceleration structures update test cases: dEQP-VK.ray_tracing_pipeline.acceleration_structures.update.*
 * Test EDS3 null pipeline state pointers
 * Test drawing outside XFB section with no state change
 * Test rendering polygons as large points
 * Test queries with multiview and availability bit
 * vk-build-programs executors limiter
 * Add more primitives generated query tests
 * Test clearing images with 64-bit formats
 * Tests for VK_EXT_dynamic_rendering_unused_attachments
 * Test large values when converting from float to 64-bit ints
 * Use baseArrayLayer in renderpass resolve tests
 * Apply 'depthStencilSwizzleOneSupport' property to swizzle tests
 * Skip* if not Android
 * Increase precision of 'degrees', 'radians' tests
 * Restore depth bias control EDS test using float representation
 * Vertex input attribute offset tests
 * Tests for VK_EXT_depth_bias_control
 * Test default point size for polygons rendered as points
 * Test multi-value sample mask with dynamic rasterization samples
 * Change normalize precision to reduce needless inaccuracy
 * Test RGBA expansion in vertex inputs
 * Test tessellation state switches
 * Test RT interaction with flags added by GPL
 * Test VK_EXT_attachment_feedback_loop_dynamic_state
 * Test default point size when not written in shader
 * Test that the number of GS invocations is 0 for VS and TES
 * Test dynamic depth clamp and static depth clip
 * Tests for VK_KHR_cooperative_matrix
 * Test not storing every location component in the XFB buffer
 * Add GPL variants to fragment shader barycentric tests
 * Test default point size when not written in mesh shader
 * Prepare for automated clean up
 * More dynamic rasterization sample count tests
 * Test sample shading with dynamic sample counts
 * Add testing for VK_KHR_ray_tracing_position_fetch
 * Add tests for VK_EXT_shader_object
 * Test occlusion and frag shader inv counts with flat shading
 * cts: add deviceName to SessionInfo
 * Vk Video: Upgrade the NVIDIA parser interface to version 0.9.9
 * Add tests for view mask iteration.
 * Test strides smaller than vertex attribute sizes
 * Add tests filling buffer before copying query pool results
 * Test FSR in a pipeline without fragment shader
 * Test multiple queries in PGQ tests
 * Test copies between any image types.
 * Test enabling and disabling VRS statically
 * Add xfb test drawing outside of xfb begin
 * Add VkFormat to AHB Format cases to dEQP
 * Treat DeviceIndex like ViewIndex.
 * Added indirect trace version of builtin test cases: dEQP-VK.ray_tracing_pipeline.builtin.indirect.*
 * Check acceleration structure creation does not touch buffers
 * Add pipeline variation of shader object misc tests
 * Remove early-outs that break objectreservation counts in VulkanSC
 * Add more tests for FSR with depth/stencil attachments on various cases.
 * Check Vulkan version before getting device function pointers
 * Enabling storage image write support
 * Test maxSamplerLodBias
 * Fix attachment usage in VK_EXT_dynamic_rendering_unused_attachments
 * Callable shader test cases: dEQP-VK.ray_tracing_pipeline.callable_shader.callable_shader*
 * Test pipeline statistics when blitting
 * Fix a couple validation failures
 * Add depth bias constant and slope tests
 * Test gl_SampleMaskIn with sample shading
 * Remove the "Error:" prefix with NotSupported results
 * Test negative vertex offset indices with indexed draws
 * Update externals and fix mesh_shader tests with fragment_shading_rate
 * Test access to buffer based on view.
 * Add tests for VK_EXT_host_image_copy
 * Add tests for 128b multisample color attachments
 * Test XFB draws preceded by other indirect draws
 * Alpha to coverage with depth buffer
 * Test allocation and binding offsets with index buffers
 * Test round-to-zero behaviour of OpConvertFToS
 * Add vkCmdCopyQueryPoolResults tests with multiview
 * Test GPL with pipeline robustness
 * Add coverage for specific synchronization2 access flags
 * Dynamic state line width tests.
 * Avoid waiting for fences in primitives generated query tests
 * Add dynamic state stencil op tests with multiple pipelines
 * Test in-bounds attribute in out-of-bounds stride

 * Add missing check for VK_EXT_shader_object
 * Fix api version check in entry_points test
 * VK_FORMAT_FEATURE_TRANSFER_{SRC,DST}_BIT are implied on Vulkan 1.0 without VK_KHR_maintenance1
 * Enable shader objects features when used in maintenance5 tests
 * Set missing dynamic states in shader object tests
 * Don't attempt pipeline library tests without VK_KHR_pipeline_library
 * Fix VertexInputStateCreateInfo scope in extended dynamic state tests
 * Removal of copying protected image to host visible buffer
 * Reenable copy_commands2 tests for VulkanSC
 * Fix validation error in shader object tests
 * Round ray query T value in descriptor buffer tests
 * Add VPS handling for h265 tests
 * Fix index buffer bind size in maint5 indexed draw tests
 * Fix triangle strip with adjacency PGQ tests
 * Add pre-VK_KHR_maintenance1 implied features to compressed formats
 * Disable device robustBufferAccess in pipeline robustness tests
 * Fix enabling sample shading in multisample tests
 * Fix extended_dynamic_state tests to run in VulkanSC
 * Fix misspelling of OID_LENGTH
 * Making DE_FENV_ACCESS_ON working for Android CTS
 * Remove invalid vkCmdBindVertexBuffers2 robustness tests
 * VK_KHR_cooperative_matrix - fix subgroup size
 * Set missing dynamic states in null_color_blend_att_ptr tests
 * Fix test dropping pNext pointer and getting unexpected output
 * Fix invalid memory index used in AHB import tests
 * Enable VK_KHR_get_physical_device_properties2 for Vulkan 1.0
 * Fix compile warning about missing return
 * Add missing check in image_block_shapes tests
 * Fix fence status check in VK_EXT_swapchain_maintenance1 test
 * Update handling of field flags for improved compatibility.
 * Fix skipping when synchronization2 is unsupported on Windows
 * Remove 64-bit test code for builtins which don't support it
 * Fix initializing glsl tests
 * Fix ray query position fetch tests
 * Enable descriptor buffer tests on implementation without compute only queues
 * Fix image layouts for storage image descriptor and barrier stages
 * Remove ESO + shader_fragment_mask illegal variants
 * Add missing nextStages bit in shader object linked test
 * Fix maint5 robustness device creation to include GPL if needed
 * Check tiling features for non-buffer images and buffer features for buffer images
 * Fix timeout issue in RayTracing MAXRTInvocations tests
 * Fix tessellation shaders support check in shader object linked tests
 * Fix nextStage in shader object linked tests
 * Fix validation errors in shader object tests
 * Set ignored samplers to null
 * Fix validation errors in pipeline variation of shader object tests
 * Add logs for vkCmdBindVertexBuffers2 tests
 * Fix regression in all statistic_query tessellation tests
 * Add missing check for shader objects support in compute tests
 * Enable missing dynamicRendering feature in shader object tests
 * Fix shaderexecutor and subgroup supported stage checks
 * Do not use image create flags from unsupported extension
 * Use 0.0 for minDepthBounds in dynamic state ds tests
 * Fix next stages in shader object linked tests
 * Fix validation errors in ext_shader_tile_image CTS
 * Add missing check in renderpass max attachments tests
 * Fix fillMode for cube to array layers copy cases
 * Use the correct imageSize() component for "width"
 * Fix tessellation evaluation shader nextStage in shaderObject tests
 * Fix reference values for double precision degrees and radians
 * Fix shader object dynamic depth clamp/clip tests
 * Add missing shader_object checkSupport logic
 * Fix primitives generated query tests with secondary cmd buffers
 * Fix including host query reset features struct
 * Add sleep before createswapchainKHR for min image count test
 * Fix depth bias constant factor test
 * Only use DRM modifier list when tiling is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT

 * Don't include windows.h in the vk namespace
 * Run vk-build-programs tests in chunks
 * Enforce Android SDK33/34 build for SDK33/34 devices
 * Fix using unsupported extensions
 * Optimize tests initialization when using deqp-case
 * Create case list filter only once
 * Add mesh and task shader to s_resultItemMap for result parsing
 * Handle multidimensional arrays in gen_framework
 * Allow Vulkan CTS
 * Fix build: DeviceDriver needs the API version now as a 4th parameter
 * Split image.txt and shader-object.txt mustpass into multiple files
 * Update dependencies for VK_EXT_shader_tile_image
 * Disallow direct linking of GLES libraries by default
 * Update vulkan-docs to current version
 * Increase Vulkan CTS fractions to 16 in the README
 * Allow selecting a subset of targets at configuration time
 * Notice of withdrawal of Vulkan CTS 1.3.2.x
 * Add extra checks for FENV_ACCESS support on 32-bit ARM
 * vulkan-video: update ESExtractor to v0.3.3
 * Query device features/properties for promoted extensions

 * Update vulkan-docs to current version
 * Fix generation of knownConformanceVersions
 * Add option to skip build post checks
 * Vulkan video capabilities tests for 1.3.253
 * Split pipeline.txt mustpass into multiple files
 * Notice of withdrawal of Vulkan CTS 1.3.3.x
Fix depth bias constant factor test

The affected test uses a D16_UNORM depth buffer and overwrites its
contents with an initial draw of a full screen quad in which the vertex
depth has values from 0.3 to 0.5. Once the depth buffer has been
"cleared" in this way, it uses a second pipeline to draw the same quad
again, but this time it applies a depth bias, with a depth bias constant
factor of 1.0. In theory, this should slightly increase the depth value
of each rasterization point compared to the previous draw, and the depth
test is configured such that the depth comparison op. is "greater than".
If everything goes right, the second draw should completely cover the
first one. Both draws use different geometry colors, so the expected
result is that the whole framebuffer contains the second color.

However, in practice the test can fail. A depth bias constant factor of
1.0 means that, at each sampling point, the depth value is increased by
the constant called "r" in the spec. Without the depth bias control
extension, the value of "r" depends on the depth attachment format.
Quoting the spec:

> ...
> Otherwise its value is implementation-dependent but must be at most
>    r = 2 × 2^(-n)
> where n is the number of bits used for the depth aspect when using a
> fixed-point attachment

It turns out that RADV is using r=2^(-n) for these cases. However,
increasing the depth value by adding r, with a depth bias constant
factor of 1.0, may not result in an increase of the depth buffer value,
which makes the "greater than" test fail. Take the following example:

In a D16_UNORM attachment, value 0 represents 0.0 and value 65535
represents 1.0. Each unit increase in the depth attachment value
represents an increase of 1.5259021896696422e-05 in depth.

Value 0.5 cannot be represented exactly in this case. 32767 would
represent 0.49999237048905165 and 32768 would represent
0.5000076295109483. Both values are within 7.629510948348184e-06 of 0.5.
Lets suppose the implementation rounds up, or rounds to even, and
chooses 32768. Then, in the second draw 0.5 is increased by r=2-16,
resulting in a depth value of 0.5000152587890625. Which depth attachment
value represents most faithfully the increased depth value? 32768, with
an error of 2.2888300010848184e-05. 32769 would mean an error of
3.814732190754455e-05 (higher).

This shows that both the old depth value and the increased depth value
could be represented by 32768, failing the "greater than" test. To avoid
this issue, the depth bias constant factor is increased to 2.0.


Components: Vulkan
VK-GL-CTS issue: 4694

Change-Id: I901162e0144eebc9098fb30d9336e4eb0e8187c8
1 file changed
tree: 7bf1c911fd43b2386e7b438fab26d1a659c6ca24
  1. .github/
  2. android/
  3. data/
  4. doc/
  5. execserver/
  6. executor/
  7. external/
  8. framework/
  9. modules/
  10. scripts/
  11. targets/
  12. .editorconfig
  13. .gitattributes
  14. .gitignore
  17. CMakeLists.txt
  21. NOTICE
  22. OWNERS


This repository contains Khronos Conformance Testing Suite called VK-GL-CTS which originated from dEQP (drawElements Quality Program). VK-GL-CTS contains tests for several graphics APIs, including OpenGL, OpenGL ES, EGL, Vulkan, and Vulkan SC.


Up-to-date documentation for VK-GL-CTS is available at:

The .qpa logs generated by the conformance tests may contain embedded PNG images of the results. These can be viewed with scripts/qpa_image_viewer.html, by opening the file with a web browser and following its instructions, or using the Cherry tool.

Khronos Vulkan Conformance Tests

This repository includes Khronos Vulkan CTS under external/vulkancts directory. For more information see Vulkan CTS README.

Khronos OpenGL / OpenGL ES Conformance Tests

This repository includes Khronos OpenGL / OpenGL ES CTS under external/openglcts directory. For more information see OpenGL / OpenGL ES CTS README.

Selecting a subset of targets to build by default

When configuring the source code of VK-GL-CTS for running either Vulkan Conformance Tests or OpenGL(ES) Conformance Tests as described above, CMake will generate build files that, by default on desktop platforms, will build every possible project binary. This may be undesirable due the amount of time and disk space needed to perform the build.

One way of selecting only a subset of the targets to be built is using CMake's target selection mechanism. For example, the following command will only build deqp-vk, the main Vulkan Conformance Tests binary:

cmake --build BUILD_DIRECTORY --target deqp-vk

When building only a subset of targets is the preferred default behavior for a given working copy or build directory, there's a second target selection mechanism that can be used to avoid passing the --target option every time: the SELECTED_BUILD_TARGETS CMake option. If set to a non-empty value, only the targets listed in that configuration option, separated by spaces, will be built.

For example, passing -DSELECTED_BUILD_TARGETS="deqp-vk deqp-vksc" when configuring the project will make cmake --build BUILD_DIRECTORY act as if it had been passed --target deqp-vk --target deqp-vksc as additional arguments.

IMPORTANT: Target subset selection may not have been thoroughly tested in all enviroments and situations, and it does not replace the instructions given for the purposes of creating a conformance submission.

ANGLE for Android

ANGLE can be built for Android by following the instructions here.

The resulting ANGLE shared object libraries can be linked against and embedded into dEQP.apk with the --angle-path option. This will cause dEQP.apk to use the ANGLE libraries for OpenGL ES calls, rather than the native drivers.

An ABI must be specified and the directory structure containing the ANGLE shared objects must match it so the build system can find the correct *.so files.

Assuming ANGLE shared objects are generated into ~/chromium/src/out/Release/ and dEQP.apk will be generated with --abis arm64-v8a, issue the following commands:

cd ~/chromium/src/out/Release/
mkdir arm64-v8a && cd arm64-v8a
cp ../lib* .

The --angle-path ~/chromium/src/out/Release/ option can then be used to link against and embed the ANGLE shared object files. The full command would be:

python scripts/android/ --sdk <path to Android SDK> --ndk <path to Android NDK> --abis arm64-v8a --angle-path ~/chromium/src/out/Release/