I was considering reusing other code where NaN gets taken into account,
but all the other places are a mess. The kernel read write tests are
just doing it within loops. Other places only compare raw values as
outside of kernel functions it seems to be fine to expect NaN to not
mess up results.
However the vulkan interop testing does run kernels and does operate on
NaN float values, so we need to special case this there.
Fixes#2155 according to issue description
Additional remark: The image size was previously calculated based on the
memory size, which seems unusual. Due to Vulkan's configuration
capabilities, the size of memory allocated for a specific texture may
differ from what would be expected based on the texture dimensions.
Thus, calculating the image dimensions back from the memory size of a
Vulkan texture can be challenging.
Remove the `CREATE_OPENCL_SEMAPHORE` macro and use derived class
instantiations of the `clExternalSemaphore` class, rather than base
pointers to derived class objects.
Remove the default argument for `queryParamName` in
`check_external_semaphore_handle_type()`.
Move `check_external_semaphore_handle_type()` checks to constructors of
`clExternalImportableSemaphore` and `clExternalExportableSemaphore`,
rather than manually making the check before creating an external
semaphore.
---------
Signed-off-by: Gorazd Sumkovski <gorazd.sumkovski@arm.com>
Co-authored-by: Kévin Petit <kpet@free.fr>
Co-authored-by: Kevin Petit <kevin.petit@arm.com>
Support for optimally-tiled images and tiling inference in general is
implementation-defined. It should not be relied upon in the CTS.
Also build the code base as C++17 for std::optional. Many Khronos
projects are now using C++17 and the transition in the CTS is IMO
overdue.
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Add coverage to import Vulkan resources (memory and semaphore) in
Windows via named NT handles.
If no name is given during resource creation, then use NT handles for
import.
If a name is given, have an option to either use that name or get the NT
handle and use that for import.
ResolvesKhronosGroup/OpenCL-Docs#943
When importing a Vulkan external image, query and
pass OpenCL a row pitch if OpenCL is assuming linear for the imported
external handle type. Additionally fix a bug where OpenCL is being told
to create mipmapped images at all times.
---------
Co-authored-by: dcrawley <dcrawley@qti.qualcomm.com>
Except for SYNC_FD, current implementation doesn't import exported
OpenCL semaphore in Vulkan and ends up doing signal and wait on
essentially two unrelated semaphores (one created in OpenCL and one in
Vulkan).
Since OpenCL exports the semaphore, import that in Vulkan to perform
signal/wait on the same underlying payload.
Only report an error (and include the error code), but don't throw an
exception as that would call `terminate`. Failure to release
resources is not fatal in other parts of the CTS.
This fixes `-Wterminate` warnings:
warning: ‘throw’ will always call ‘terminate’ [-Wterminate]
note: in C++11 destructors default to ‘noexcept’
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
* Updated semaphore tests to use clSemaphoreReImportSyncFdKHR.
Additionally updated common semaphore code to handle spec updates
that restrict simultaneous importing/exporting of handles.
* Fix build issues on CI
* gcc build issues
* Make clReImportSemaphoreSyncFdKHR a required API
call if cl_khr_external_semaphore_sync_fd is present.
* Implement signal and wait for all semaphore types.
* Added support for SYNC_FD and other handle types
* Fix consistency test
Deleted test cases that are no longer testable
according to the spec.
* Fix multi-import tests
-Delete obsolete code relating to offsets
-Propagate dedicated memory change
* Fix error handling
Some subtests did not fail on incorrect result.
Changes to macros to fail, so this does not occur
again.
* Delete invalid test cases
Test cases are not related to this extension.
* External memory test
Add support for any handle type supported by
the platform.
Change-Id: I6765fde5e7929988f49bfbf2df2f41d5263b6abc
* Update multi-import tests to use new semaphore types
* Fix formatting
* Addressed review comments. Deleted VULKAN_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_NT_KMT as it appears to be redundant.
* Vulkan: Fix descriptor sets
Use descriptor set arrays when programming
arrays for compute shader.
Change-Id: Idabab775a256a223660eb7a850e26f290453659e
* Vulkan: Fix queue propertyies
Transfer bit for queue family is not required
to be reported by the implementation, it is
implicit for compute.
Change-Id: I7424b00e25e35145433dd74b0b4dfe7eeeaf98c8
* Vulkan: Allow implementation to choose dedicated memory
Dedicated vs non-dedicated memory must be queried by
the app. Implementations are not required to support
exportable non-dedicated memory.
Change-Id: Idbc46ace1be20f61d1b58b34756f6d79a7745911
* Fix formatting
Auto-generated formatting fix
* Fix bug in dedicated memory.
* Add check for if OpenCL assumes linear tiling
Change-Id: Idd2e24d9d69e1fbc3ccb4a279067533104185332
* Changed macro name to reflect spec
CL_DEVICE_EXTERNAL_MEMORY_IMPORT_ASSUME_LINEAR_HANDLE_TYPES_KHR to
CL_DEVICE_EXTERNAL_MEMORY_IMPORT_ASSUME_LINEAR_IMAGES_HANDLE_TYPES_KHR
Also changed some functions to not use the KHR variants.
---------
Co-authored-by: Joshua Kelly <joshkell@qti.qualcomm.com>
Modify the external semaphore extension test
to use SYNC_FD, if available on the device.
Deleted tests that are not compatible with blocking
semaphores.
* Add external semaphore tests.
Added basic test to check the functionality of cl_ext_external_semaphore_test extension.
Tests rely on Vulkan API as the producer of the external semaphore functionality. The
Vulkan wrapper has been copied from the Vulkan CTS tests and minor changes have been
introduced. A separate copy of the Vulkan wrapper is for breaking any dependencies
between different CTS modules and thus make the build system simpler.
Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
* Fix clang-format
Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
* Move vulkan wrapper to a separate library.
Vulkan wrapper is extracted as a separate module and can be used in different
CTS tests as a shared library.
Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
* Add cl_ext_external_samaphore tests based on cl_khr_semaphore tests.
Added cl_khr_semaphore adjusted to creating semaphores in Vulkan context
and importing them through export semaphore functionality in OpenCL
(cl_ext_external_samaphore).
Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
* Cleanup.
Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
* Fix build issues.
* Add missing directories for build cl_ext_external_semaphore.
Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
* Set Vulkan lib directory.
Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
* Change extension directory name.
Changed extensions directory name from cl_ext_external_semaphore to cl_khr_external_semaphore.
Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
* Remove unneeded compile options.
Removed VK_USE_PLATFORM_WIN32_KHR option from cl_khr_external_semaphore
compilation arguments.
Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
---------
Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>