mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Vulkan interop coverage (#1887)
Added Code changes for 1D, 1DList, 3D, 3DList and test cases.
This commit is contained in:
@@ -268,6 +268,57 @@ VulkanBufferList::~VulkanBufferList()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// VulkanImage1DList implementation //
|
||||||
|
//////////////////////////////////////
|
||||||
|
|
||||||
|
VulkanImage1DList::VulkanImage1DList(const VulkanImage1DList &image1DList) {}
|
||||||
|
|
||||||
|
VulkanImage1DList::VulkanImage1DList(
|
||||||
|
size_t numImages, std::vector<VulkanDeviceMemory *> &deviceMemory,
|
||||||
|
uint64_t baseOffset, uint64_t interImageOffset, const VulkanDevice &device,
|
||||||
|
VulkanFormat format, uint32_t width, uint32_t mipLevels,
|
||||||
|
VulkanImageTiling vulkanImageTiling,
|
||||||
|
VulkanExternalMemoryHandleType externalMemoryHandleType,
|
||||||
|
VulkanImageCreateFlag imageCreateFlag, VulkanImageUsage imageUsage,
|
||||||
|
VulkanSharingMode sharingMode)
|
||||||
|
{
|
||||||
|
for (size_t i2DIdx = 0; i2DIdx < numImages; i2DIdx++)
|
||||||
|
{
|
||||||
|
VulkanImage1D *image2D = new VulkanImage1D(
|
||||||
|
device, format, width, vulkanImageTiling, mipLevels,
|
||||||
|
externalMemoryHandleType, imageCreateFlag, imageUsage, sharingMode);
|
||||||
|
add(*image2D);
|
||||||
|
deviceMemory[i2DIdx]->bindImage(
|
||||||
|
*image2D, baseOffset + (i2DIdx * interImageOffset));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VulkanImage1DList::VulkanImage1DList(
|
||||||
|
size_t numImages, const VulkanDevice &device, VulkanFormat format,
|
||||||
|
uint32_t width, VulkanImageTiling vulkanImageTiling, uint32_t mipLevels,
|
||||||
|
VulkanExternalMemoryHandleType externalMemoryHandleType,
|
||||||
|
VulkanImageCreateFlag imageCreateFlag, VulkanImageUsage imageUsage,
|
||||||
|
VulkanSharingMode sharingMode)
|
||||||
|
{
|
||||||
|
for (size_t bIdx = 0; bIdx < numImages; bIdx++)
|
||||||
|
{
|
||||||
|
VulkanImage1D *image2D = new VulkanImage1D(
|
||||||
|
device, format, width, vulkanImageTiling, mipLevels,
|
||||||
|
externalMemoryHandleType, imageCreateFlag, imageUsage, sharingMode);
|
||||||
|
add(*image2D);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VulkanImage1DList::~VulkanImage1DList()
|
||||||
|
{
|
||||||
|
for (size_t i2DIdx = 0; i2DIdx < m_wrapperList.size(); i2DIdx++)
|
||||||
|
{
|
||||||
|
VulkanImage1D &image2D = m_wrapperList[i2DIdx];
|
||||||
|
delete &image2D;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// VulkanImage2DList implementation //
|
// VulkanImage2DList implementation //
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
@@ -319,6 +370,57 @@ VulkanImage2DList::~VulkanImage2DList()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// VulkanImage3DList implementation //
|
||||||
|
//////////////////////////////////////
|
||||||
|
|
||||||
|
VulkanImage3DList::VulkanImage3DList(const VulkanImage3DList &image3DList) {}
|
||||||
|
|
||||||
|
VulkanImage3DList::VulkanImage3DList(
|
||||||
|
size_t numImages, std::vector<VulkanDeviceMemory *> &deviceMemory,
|
||||||
|
uint64_t baseOffset, uint64_t interImageOffset, const VulkanDevice &device,
|
||||||
|
VulkanFormat format, uint32_t width, uint32_t height, uint32_t depth,
|
||||||
|
uint32_t mipLevels, VulkanImageTiling vulkanImageTiling,
|
||||||
|
VulkanExternalMemoryHandleType externalMemoryHandleType,
|
||||||
|
VulkanImageCreateFlag imageCreateFlag, VulkanImageUsage imageUsage,
|
||||||
|
VulkanSharingMode sharingMode)
|
||||||
|
{
|
||||||
|
for (size_t i2DIdx = 0; i2DIdx < numImages; i2DIdx++)
|
||||||
|
{
|
||||||
|
VulkanImage3D *image3D = new VulkanImage3D(
|
||||||
|
device, format, width, height, depth, vulkanImageTiling, mipLevels,
|
||||||
|
externalMemoryHandleType, imageCreateFlag, imageUsage, sharingMode);
|
||||||
|
add(*image3D);
|
||||||
|
deviceMemory[i2DIdx]->bindImage(
|
||||||
|
*image3D, baseOffset + (i2DIdx * interImageOffset));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VulkanImage3DList::VulkanImage3DList(
|
||||||
|
size_t numImages, const VulkanDevice &device, VulkanFormat format,
|
||||||
|
uint32_t width, uint32_t height, uint32_t depth,
|
||||||
|
VulkanImageTiling vulkanImageTiling, uint32_t mipLevels,
|
||||||
|
VulkanExternalMemoryHandleType externalMemoryHandleType,
|
||||||
|
VulkanImageCreateFlag imageCreateFlag, VulkanImageUsage imageUsage,
|
||||||
|
VulkanSharingMode sharingMode)
|
||||||
|
{
|
||||||
|
for (size_t bIdx = 0; bIdx < numImages; bIdx++)
|
||||||
|
{
|
||||||
|
VulkanImage3D *image3D = new VulkanImage3D(
|
||||||
|
device, format, width, height, depth, vulkanImageTiling, mipLevels,
|
||||||
|
externalMemoryHandleType, imageCreateFlag, imageUsage, sharingMode);
|
||||||
|
add(*image3D);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VulkanImage3DList::~VulkanImage3DList()
|
||||||
|
{
|
||||||
|
for (size_t i2DIdx = 0; i2DIdx < m_wrapperList.size(); i2DIdx++)
|
||||||
|
{
|
||||||
|
VulkanImage3D &image3D = m_wrapperList[i2DIdx];
|
||||||
|
delete &image3D;
|
||||||
|
}
|
||||||
|
}
|
||||||
////////////////////////////////////////
|
////////////////////////////////////////
|
||||||
// VulkanImageViewList implementation //
|
// VulkanImageViewList implementation //
|
||||||
////////////////////////////////////////
|
////////////////////////////////////////
|
||||||
|
|||||||
@@ -202,6 +202,35 @@ public:
|
|||||||
virtual ~VulkanBufferList();
|
virtual ~VulkanBufferList();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class VulkanImage1DList : public VulkanList<VulkanImage1D, VkImage> {
|
||||||
|
protected:
|
||||||
|
VulkanImage1DList(const VulkanImage1DList &image1DList);
|
||||||
|
|
||||||
|
public:
|
||||||
|
VulkanImage1DList(
|
||||||
|
size_t numImages, std::vector<VulkanDeviceMemory *> &deviceMemory,
|
||||||
|
uint64_t baseOffset, uint64_t interImageOffset,
|
||||||
|
const VulkanDevice &device, VulkanFormat format, uint32_t width,
|
||||||
|
uint32_t mipLevels, VulkanImageTiling vulkanImageTiling,
|
||||||
|
VulkanExternalMemoryHandleType externalMemoryHandleType =
|
||||||
|
VULKAN_EXTERNAL_MEMORY_HANDLE_TYPE_NONE,
|
||||||
|
VulkanImageCreateFlag imageCreateFlag = VULKAN_IMAGE_CREATE_FLAG_NONE,
|
||||||
|
VulkanImageUsage imageUsage =
|
||||||
|
VULKAN_IMAGE_USAGE_SAMPLED_STORAGE_TRANSFER_SRC_DST,
|
||||||
|
VulkanSharingMode sharingMode = VULKAN_SHARING_MODE_EXCLUSIVE);
|
||||||
|
VulkanImage1DList(
|
||||||
|
size_t numImages, const VulkanDevice &device, VulkanFormat format,
|
||||||
|
uint32_t width, VulkanImageTiling vulkanImageTiling,
|
||||||
|
uint32_t mipLevels = 1,
|
||||||
|
VulkanExternalMemoryHandleType externalMemoryHandleType =
|
||||||
|
VULKAN_EXTERNAL_MEMORY_HANDLE_TYPE_NONE,
|
||||||
|
VulkanImageCreateFlag imageCreateFlag = VULKAN_IMAGE_CREATE_FLAG_NONE,
|
||||||
|
VulkanImageUsage imageUsage =
|
||||||
|
VULKAN_IMAGE_USAGE_SAMPLED_STORAGE_TRANSFER_SRC_DST,
|
||||||
|
VulkanSharingMode sharingMode = VULKAN_SHARING_MODE_EXCLUSIVE);
|
||||||
|
virtual ~VulkanImage1DList();
|
||||||
|
};
|
||||||
|
|
||||||
class VulkanImage2DList : public VulkanList<VulkanImage2D, VkImage> {
|
class VulkanImage2DList : public VulkanList<VulkanImage2D, VkImage> {
|
||||||
protected:
|
protected:
|
||||||
VulkanImage2DList(const VulkanImage2DList &image2DList);
|
VulkanImage2DList(const VulkanImage2DList &image2DList);
|
||||||
@@ -232,6 +261,36 @@ public:
|
|||||||
virtual ~VulkanImage2DList();
|
virtual ~VulkanImage2DList();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class VulkanImage3DList : public VulkanList<VulkanImage3D, VkImage> {
|
||||||
|
protected:
|
||||||
|
VulkanImage3DList(const VulkanImage3DList &image3DList);
|
||||||
|
|
||||||
|
public:
|
||||||
|
VulkanImage3DList(
|
||||||
|
size_t numImages, std::vector<VulkanDeviceMemory *> &deviceMemory,
|
||||||
|
uint64_t baseOffset, uint64_t interImageOffset,
|
||||||
|
const VulkanDevice &device, VulkanFormat format, uint32_t width,
|
||||||
|
uint32_t height, uint32_t depth, uint32_t mipLevels,
|
||||||
|
VulkanImageTiling vulkanImageTiling,
|
||||||
|
VulkanExternalMemoryHandleType externalMemoryHandleType =
|
||||||
|
VULKAN_EXTERNAL_MEMORY_HANDLE_TYPE_NONE,
|
||||||
|
VulkanImageCreateFlag imageCreateFlag = VULKAN_IMAGE_CREATE_FLAG_NONE,
|
||||||
|
VulkanImageUsage imageUsage =
|
||||||
|
VULKAN_IMAGE_USAGE_SAMPLED_STORAGE_TRANSFER_SRC_DST,
|
||||||
|
VulkanSharingMode sharingMode = VULKAN_SHARING_MODE_EXCLUSIVE);
|
||||||
|
VulkanImage3DList(
|
||||||
|
size_t numImages, const VulkanDevice &device, VulkanFormat format,
|
||||||
|
uint32_t width, uint32_t height, uint32_t depth,
|
||||||
|
VulkanImageTiling vulkanImageTiling, uint32_t mipLevels = 1,
|
||||||
|
VulkanExternalMemoryHandleType externalMemoryHandleType =
|
||||||
|
VULKAN_EXTERNAL_MEMORY_HANDLE_TYPE_NONE,
|
||||||
|
VulkanImageCreateFlag imageCreateFlag = VULKAN_IMAGE_CREATE_FLAG_NONE,
|
||||||
|
VulkanImageUsage imageUsage =
|
||||||
|
VULKAN_IMAGE_USAGE_SAMPLED_STORAGE_TRANSFER_SRC_DST,
|
||||||
|
VulkanSharingMode sharingMode = VULKAN_SHARING_MODE_EXCLUSIVE);
|
||||||
|
virtual ~VulkanImage3DList();
|
||||||
|
};
|
||||||
|
|
||||||
class VulkanImageViewList : public VulkanList<VulkanImageView, VkImageView> {
|
class VulkanImageViewList : public VulkanList<VulkanImageView, VkImageView> {
|
||||||
protected:
|
protected:
|
||||||
VulkanImageViewList(const VulkanImageViewList &imageViewList);
|
VulkanImageViewList(const VulkanImageViewList &imageViewList);
|
||||||
|
|||||||
@@ -1810,6 +1810,36 @@ const VulkanMemoryTypeList &VulkanImage::getMemoryTypeList() const
|
|||||||
|
|
||||||
VulkanImage::operator VkImage() const { return m_vkImage; }
|
VulkanImage::operator VkImage() const { return m_vkImage; }
|
||||||
|
|
||||||
|
//////////////////////////////////
|
||||||
|
// VulkanImage1D implementation //
|
||||||
|
//////////////////////////////////
|
||||||
|
|
||||||
|
VulkanImage1D::VulkanImage1D(const VulkanImage1D &image1D): VulkanImage(image1D)
|
||||||
|
{}
|
||||||
|
|
||||||
|
VulkanImage1D::VulkanImage1D(
|
||||||
|
const VulkanDevice &device, VulkanFormat format, uint32_t width,
|
||||||
|
VulkanImageTiling imageTiling, uint32_t numMipLevels,
|
||||||
|
VulkanExternalMemoryHandleType externalMemoryHandleType,
|
||||||
|
VulkanImageCreateFlag imageCreateFlag, VulkanImageUsage imageUsage,
|
||||||
|
VulkanSharingMode sharingMode)
|
||||||
|
: VulkanImage(device, VULKAN_IMAGE_TYPE_1D, format,
|
||||||
|
VulkanExtent3D(width, 1, 1), numMipLevels, 1,
|
||||||
|
externalMemoryHandleType, imageCreateFlag, imageTiling,
|
||||||
|
imageUsage, sharingMode)
|
||||||
|
{}
|
||||||
|
|
||||||
|
VulkanImage1D::~VulkanImage1D() {}
|
||||||
|
|
||||||
|
VulkanExtent3D VulkanImage1D::getExtent3D(uint32_t mipLevel) const
|
||||||
|
{
|
||||||
|
uint32_t width = std::max(m_extent3D.getWidth() >> mipLevel, uint32_t(1));
|
||||||
|
uint32_t height = 1;
|
||||||
|
uint32_t depth = 1;
|
||||||
|
|
||||||
|
return VulkanExtent3D(width, height, depth);
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////
|
//////////////////////////////////
|
||||||
// VulkanImage2D implementation //
|
// VulkanImage2D implementation //
|
||||||
//////////////////////////////////
|
//////////////////////////////////
|
||||||
@@ -1840,6 +1870,37 @@ VulkanExtent3D VulkanImage2D::getExtent3D(uint32_t mipLevel) const
|
|||||||
return VulkanExtent3D(width, height, depth);
|
return VulkanExtent3D(width, height, depth);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////
|
||||||
|
// VulkanImage3D implementation //
|
||||||
|
//////////////////////////////////
|
||||||
|
|
||||||
|
VulkanImage3D::VulkanImage3D(const VulkanImage3D &image3D): VulkanImage(image3D)
|
||||||
|
{}
|
||||||
|
|
||||||
|
VulkanImage3D::VulkanImage3D(
|
||||||
|
const VulkanDevice &device, VulkanFormat format, uint32_t width,
|
||||||
|
uint32_t height, uint32_t depth, VulkanImageTiling imageTiling,
|
||||||
|
uint32_t numMipLevels,
|
||||||
|
VulkanExternalMemoryHandleType externalMemoryHandleType,
|
||||||
|
VulkanImageCreateFlag imageCreateFlag, VulkanImageUsage imageUsage,
|
||||||
|
VulkanSharingMode sharingMode)
|
||||||
|
: VulkanImage(device, VULKAN_IMAGE_TYPE_3D, format,
|
||||||
|
VulkanExtent3D(width, height, depth), numMipLevels, 1,
|
||||||
|
externalMemoryHandleType, imageCreateFlag, imageTiling,
|
||||||
|
imageUsage, sharingMode)
|
||||||
|
{}
|
||||||
|
|
||||||
|
VulkanImage3D::~VulkanImage3D() {}
|
||||||
|
|
||||||
|
VulkanExtent3D VulkanImage3D::getExtent3D(uint32_t mipLevel) const
|
||||||
|
{
|
||||||
|
uint32_t width = std::max(m_extent3D.getWidth() >> mipLevel, uint32_t(1));
|
||||||
|
uint32_t height = std::max(m_extent3D.getHeight() >> mipLevel, uint32_t(1));
|
||||||
|
uint32_t depth = std::max(m_extent3D.getDepth() >> mipLevel, uint32_t(1));
|
||||||
|
|
||||||
|
return VulkanExtent3D(width, height, depth);
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
// VulkanImageView implementation //
|
// VulkanImageView implementation //
|
||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
|
|||||||
@@ -494,6 +494,47 @@ public:
|
|||||||
operator VkImage() const;
|
operator VkImage() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class VulkanImage1D : public VulkanImage {
|
||||||
|
protected:
|
||||||
|
VkImageView m_vkImageView;
|
||||||
|
|
||||||
|
public:
|
||||||
|
VulkanImage1D(
|
||||||
|
const VulkanDevice &device, VulkanFormat format, uint32_t width,
|
||||||
|
VulkanImageTiling imageTiling, uint32_t numMipLevels = 1,
|
||||||
|
VulkanExternalMemoryHandleType externalMemoryHandleType =
|
||||||
|
VULKAN_EXTERNAL_MEMORY_HANDLE_TYPE_NONE,
|
||||||
|
VulkanImageCreateFlag imageCreateFlag = VULKAN_IMAGE_CREATE_FLAG_NONE,
|
||||||
|
VulkanImageUsage imageUsage =
|
||||||
|
VULKAN_IMAGE_USAGE_SAMPLED_STORAGE_TRANSFER_SRC_DST,
|
||||||
|
VulkanSharingMode sharingMode = VULKAN_SHARING_MODE_EXCLUSIVE);
|
||||||
|
virtual ~VulkanImage1D();
|
||||||
|
virtual VulkanExtent3D getExtent3D(uint32_t mipLevel = 0) const;
|
||||||
|
|
||||||
|
VulkanImage1D(const VulkanImage1D &image1D);
|
||||||
|
};
|
||||||
|
|
||||||
|
class VulkanImage3D : public VulkanImage {
|
||||||
|
protected:
|
||||||
|
VkImageView m_vkImageView;
|
||||||
|
|
||||||
|
public:
|
||||||
|
VulkanImage3D(
|
||||||
|
const VulkanDevice &device, VulkanFormat format, uint32_t width,
|
||||||
|
uint32_t height, uint32_t depth, VulkanImageTiling imageTiling,
|
||||||
|
uint32_t numMipLevels = 1,
|
||||||
|
VulkanExternalMemoryHandleType externalMemoryHandleType =
|
||||||
|
VULKAN_EXTERNAL_MEMORY_HANDLE_TYPE_NONE,
|
||||||
|
VulkanImageCreateFlag imageCreateFlag = VULKAN_IMAGE_CREATE_FLAG_NONE,
|
||||||
|
VulkanImageUsage imageUsage =
|
||||||
|
VULKAN_IMAGE_USAGE_SAMPLED_STORAGE_TRANSFER_SRC_DST,
|
||||||
|
VulkanSharingMode sharingMode = VULKAN_SHARING_MODE_EXCLUSIVE);
|
||||||
|
virtual ~VulkanImage3D();
|
||||||
|
virtual VulkanExtent3D getExtent3D(uint32_t mipLevel = 0) const;
|
||||||
|
|
||||||
|
VulkanImage3D(const VulkanImage3D &image3D);
|
||||||
|
};
|
||||||
|
|
||||||
class VulkanImage2D : public VulkanImage {
|
class VulkanImage2D : public VulkanImage {
|
||||||
protected:
|
protected:
|
||||||
VkImageView m_vkImageView;
|
VkImageView m_vkImageView;
|
||||||
|
|||||||
@@ -44,7 +44,9 @@ class VulkanBuffer;
|
|||||||
class VulkanOffset3D;
|
class VulkanOffset3D;
|
||||||
class VulkanExtent3D;
|
class VulkanExtent3D;
|
||||||
class VulkanImage;
|
class VulkanImage;
|
||||||
|
class VulkanImage1D;
|
||||||
class VulkanImage2D;
|
class VulkanImage2D;
|
||||||
|
class VulkanImage3D;
|
||||||
class VulkanImageView;
|
class VulkanImageView;
|
||||||
class VulkanDeviceMemory;
|
class VulkanDeviceMemory;
|
||||||
class VulkanSemaphore;
|
class VulkanSemaphore;
|
||||||
@@ -59,7 +61,9 @@ class VulkanQueueList;
|
|||||||
class VulkanCommandBufferList;
|
class VulkanCommandBufferList;
|
||||||
class VulkanDescriptorSetLayoutList;
|
class VulkanDescriptorSetLayoutList;
|
||||||
class VulkanBufferList;
|
class VulkanBufferList;
|
||||||
|
class VulkanImage1DList;
|
||||||
class VulkanImage2DList;
|
class VulkanImage2DList;
|
||||||
|
class VulkanImage3DList;
|
||||||
class VulkanImageViewList;
|
class VulkanImageViewList;
|
||||||
class VulkanDeviceMemoryList;
|
class VulkanDeviceMemoryList;
|
||||||
class VulkanSemaphoreList;
|
class VulkanSemaphoreList;
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ set (${MODULE_NAME}_SOURCES
|
|||||||
test_vulkan_interop_buffer.cpp
|
test_vulkan_interop_buffer.cpp
|
||||||
test_vulkan_interop_image.cpp
|
test_vulkan_interop_image.cpp
|
||||||
test_vulkan_api_consistency.cpp
|
test_vulkan_api_consistency.cpp
|
||||||
|
test_vulkan_api_consistency_for_3dimages.cpp
|
||||||
|
test_vulkan_api_consistency_for_1dimages.cpp
|
||||||
test_vulkan_platform_device_info.cpp
|
test_vulkan_platform_device_info.cpp
|
||||||
vulkan_interop_common.cpp
|
vulkan_interop_common.cpp
|
||||||
../../test_common/harness/genericThread.cpp
|
../../test_common/harness/genericThread.cpp
|
||||||
|
|||||||
@@ -157,6 +157,8 @@ test_definition test_list[] = { ADD_TEST(buffer_single_queue),
|
|||||||
ADD_TEST(image_multiple_queue),
|
ADD_TEST(image_multiple_queue),
|
||||||
ADD_TEST(consistency_external_buffer),
|
ADD_TEST(consistency_external_buffer),
|
||||||
ADD_TEST(consistency_external_image),
|
ADD_TEST(consistency_external_image),
|
||||||
|
ADD_TEST(consistency_external_for_3dimage),
|
||||||
|
ADD_TEST(consistency_external_for_1dimage),
|
||||||
ADD_TEST(consistency_external_semaphore),
|
ADD_TEST(consistency_external_semaphore),
|
||||||
ADD_TEST(platform_info),
|
ADD_TEST(platform_info),
|
||||||
ADD_TEST(device_info) };
|
ADD_TEST(device_info) };
|
||||||
|
|||||||
@@ -28,6 +28,14 @@ extern int test_consistency_external_image(cl_device_id device,
|
|||||||
cl_context context,
|
cl_context context,
|
||||||
cl_command_queue queue,
|
cl_command_queue queue,
|
||||||
int num_elements);
|
int num_elements);
|
||||||
|
extern int test_consistency_external_for_3dimage(cl_device_id device,
|
||||||
|
cl_context context,
|
||||||
|
cl_command_queue queue,
|
||||||
|
int num_elements);
|
||||||
|
extern int test_consistency_external_for_1dimage(cl_device_id device,
|
||||||
|
cl_context context,
|
||||||
|
cl_command_queue queue,
|
||||||
|
int num_elements);
|
||||||
extern int test_consistency_external_semaphore(cl_device_id device,
|
extern int test_consistency_external_semaphore(cl_device_id device,
|
||||||
cl_context context,
|
cl_context context,
|
||||||
cl_command_queue queue,
|
cl_command_queue queue,
|
||||||
|
|||||||
@@ -0,0 +1,206 @@
|
|||||||
|
#include <vulkan_interop_common.hpp>
|
||||||
|
#include <opencl_vulkan_wrapper.hpp>
|
||||||
|
#include <vulkan_wrapper.hpp>
|
||||||
|
#if !defined(__APPLE__)
|
||||||
|
#include <CL/cl.h>
|
||||||
|
#include <CL/cl_ext.h>
|
||||||
|
#else
|
||||||
|
#include <OpenCL/cl.h>
|
||||||
|
#include <OpenCL/cl_ext.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
#include <vector>
|
||||||
|
#include <iostream>
|
||||||
|
#include <string.h>
|
||||||
|
#include "harness/testHarness.h"
|
||||||
|
#include "harness/typeWrappers.h"
|
||||||
|
#include "harness/deviceInfo.h"
|
||||||
|
|
||||||
|
int test_consistency_external_for_1dimage(cl_device_id deviceID,
|
||||||
|
cl_context _context,
|
||||||
|
cl_command_queue _queue,
|
||||||
|
int num_elements)
|
||||||
|
{
|
||||||
|
cl_int errNum;
|
||||||
|
VulkanDevice vkDevice;
|
||||||
|
|
||||||
|
// Context and command queue creation
|
||||||
|
cl_platform_id platform = NULL;
|
||||||
|
cl_context context = NULL;
|
||||||
|
cl_command_queue cmd_queue = NULL;
|
||||||
|
|
||||||
|
cl_context_properties contextProperties[] = { CL_CONTEXT_PLATFORM, 0, 0 };
|
||||||
|
errNum = clGetPlatformIDs(1, &platform, NULL);
|
||||||
|
test_error(errNum, "Failed to get platform id");
|
||||||
|
|
||||||
|
contextProperties[1] = (cl_context_properties)platform;
|
||||||
|
|
||||||
|
context = clCreateContextFromType(contextProperties, CL_DEVICE_TYPE_GPU,
|
||||||
|
NULL, NULL, &errNum);
|
||||||
|
test_error(errNum, "Unable to create context with properties");
|
||||||
|
|
||||||
|
cmd_queue = clCreateCommandQueue(context, deviceID, 0, &errNum);
|
||||||
|
test_error(errNum, "Unable to create command queue");
|
||||||
|
|
||||||
|
cl_device_id devList[] = { deviceID, NULL };
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
if (!is_extension_available(devList[0], "cl_khr_external_memory_win32"))
|
||||||
|
{
|
||||||
|
throw std::runtime_error("Device does not support"
|
||||||
|
"cl_khr_external_memory_win32 extension \n");
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
if (!is_extension_available(devList[0], "cl_khr_external_memory_opaque_fd"))
|
||||||
|
{
|
||||||
|
throw std::runtime_error(
|
||||||
|
"Device does not support cl_khr_external_memory_opaque_fd "
|
||||||
|
"extension \n");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
uint32_t width = 256;
|
||||||
|
cl_image_desc image_desc;
|
||||||
|
memset(&image_desc, 0x0, sizeof(cl_image_desc));
|
||||||
|
cl_image_format img_format = { 0 };
|
||||||
|
|
||||||
|
VulkanExternalMemoryHandleType vkExternalMemoryHandleType =
|
||||||
|
getSupportedVulkanExternalMemoryHandleTypeList()[0];
|
||||||
|
|
||||||
|
VulkanImageTiling vulkanImageTiling =
|
||||||
|
vkClExternalMemoryHandleTilingAssumption(
|
||||||
|
deviceID, vkExternalMemoryHandleType, &errNum);
|
||||||
|
ASSERT_SUCCESS(errNum, "Failed to query OpenCL tiling mode");
|
||||||
|
|
||||||
|
VulkanImage1D vkImage1D =
|
||||||
|
VulkanImage1D(vkDevice, VULKAN_FORMAT_R8G8B8A8_UNORM, width,
|
||||||
|
vulkanImageTiling, 1, vkExternalMemoryHandleType);
|
||||||
|
|
||||||
|
const VulkanMemoryTypeList& memoryTypeList = vkImage1D.getMemoryTypeList();
|
||||||
|
uint64_t totalImageMemSize = vkImage1D.getSize();
|
||||||
|
|
||||||
|
log_info("Memory type index: %u\n", (uint32_t)memoryTypeList[0]);
|
||||||
|
log_info("Memory type property: %d\n",
|
||||||
|
memoryTypeList[0].getMemoryTypeProperty());
|
||||||
|
log_info("Image size : %lu\n", totalImageMemSize);
|
||||||
|
|
||||||
|
VulkanDeviceMemory* vkDeviceMem = new VulkanDeviceMemory(
|
||||||
|
vkDevice, vkImage1D, memoryTypeList[0], vkExternalMemoryHandleType);
|
||||||
|
vkDeviceMem->bindImage(vkImage1D, 0);
|
||||||
|
|
||||||
|
void* handle = NULL;
|
||||||
|
int fd;
|
||||||
|
std::vector<cl_mem_properties> extMemProperties{
|
||||||
|
(cl_mem_properties)CL_MEM_DEVICE_HANDLE_LIST_KHR,
|
||||||
|
(cl_mem_properties)devList[0],
|
||||||
|
(cl_mem_properties)CL_MEM_DEVICE_HANDLE_LIST_END_KHR,
|
||||||
|
};
|
||||||
|
switch (vkExternalMemoryHandleType)
|
||||||
|
{
|
||||||
|
#ifdef _WIN32
|
||||||
|
case VULKAN_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_NT:
|
||||||
|
handle = vkDeviceMem->getHandle(vkExternalMemoryHandleType);
|
||||||
|
errNum = check_external_memory_handle_type(
|
||||||
|
devList[0], CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_WIN32_KHR);
|
||||||
|
extMemProperties.push_back(
|
||||||
|
(cl_mem_properties)CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_WIN32_KHR);
|
||||||
|
extMemProperties.push_back((cl_mem_properties)handle);
|
||||||
|
break;
|
||||||
|
case VULKAN_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT:
|
||||||
|
handle = vkDeviceMem->getHandle(vkExternalMemoryHandleType);
|
||||||
|
errNum = check_external_memory_handle_type(
|
||||||
|
devList[0], CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_WIN32_KMT_KHR);
|
||||||
|
extMemProperties.push_back(
|
||||||
|
(cl_mem_properties)
|
||||||
|
CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_WIN32_KMT_KHR);
|
||||||
|
extMemProperties.push_back((cl_mem_properties)handle);
|
||||||
|
break;
|
||||||
|
#else
|
||||||
|
case VULKAN_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD:
|
||||||
|
fd = (int)vkDeviceMem->getHandle(vkExternalMemoryHandleType);
|
||||||
|
errNum = check_external_memory_handle_type(
|
||||||
|
devList[0], CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_FD_KHR);
|
||||||
|
extMemProperties.push_back(
|
||||||
|
(cl_mem_properties)CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_FD_KHR);
|
||||||
|
extMemProperties.push_back((cl_mem_properties)fd);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
default:
|
||||||
|
errNum = TEST_FAIL;
|
||||||
|
log_error("Unsupported external memory handle type \n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (errNum != CL_SUCCESS)
|
||||||
|
{
|
||||||
|
log_error("Checks failed for "
|
||||||
|
"CL_DEVICE_EXTERNAL_MEMORY_IMPORT_HANDLE_TYPES_KHR\n");
|
||||||
|
return TEST_FAIL;
|
||||||
|
}
|
||||||
|
extMemProperties.push_back(0);
|
||||||
|
|
||||||
|
const VkImageCreateInfo VulkanImageCreateInfo =
|
||||||
|
vkImage1D.getVkImageCreateInfo();
|
||||||
|
|
||||||
|
errNum = getCLImageInfoFromVkImageInfo(
|
||||||
|
&VulkanImageCreateInfo, totalImageMemSize, &img_format, &image_desc);
|
||||||
|
if (errNum != CL_SUCCESS)
|
||||||
|
{
|
||||||
|
log_error("getCLImageInfoFromVkImageInfo failed!!!");
|
||||||
|
return TEST_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
clMemWrapper image;
|
||||||
|
|
||||||
|
// Pass valid properties, image_desc and image_format
|
||||||
|
image = clCreateImageWithProperties(
|
||||||
|
context, extMemProperties.data(), CL_MEM_READ_WRITE, &img_format,
|
||||||
|
&image_desc, NULL /* host_ptr */, &errNum);
|
||||||
|
test_error(errNum, "Unable to create Image with Properties");
|
||||||
|
image.reset();
|
||||||
|
|
||||||
|
// Passing properties, image_desc and image_format all as NULL
|
||||||
|
image = clCreateImageWithProperties(context, NULL, CL_MEM_READ_WRITE, NULL,
|
||||||
|
NULL, NULL, &errNum);
|
||||||
|
test_failure_error(
|
||||||
|
errNum, CL_INVALID_IMAGE_DESCRIPTOR,
|
||||||
|
"Image creation must fail with CL_INVALID_IMAGE_DESCRIPTOR "
|
||||||
|
"when all are passed as NULL");
|
||||||
|
|
||||||
|
image.reset();
|
||||||
|
|
||||||
|
// Passing NULL properties and a valid image_format and image_desc
|
||||||
|
image =
|
||||||
|
clCreateImageWithProperties(context, NULL, CL_MEM_READ_WRITE,
|
||||||
|
&img_format, &image_desc, NULL, &errNum);
|
||||||
|
test_error(errNum,
|
||||||
|
"Unable to create image with NULL properties "
|
||||||
|
"with valid image format and image desc");
|
||||||
|
|
||||||
|
image.reset();
|
||||||
|
|
||||||
|
// Passing image_format as NULL
|
||||||
|
image = clCreateImageWithProperties(context, extMemProperties.data(),
|
||||||
|
CL_MEM_READ_WRITE, NULL, &image_desc,
|
||||||
|
NULL, &errNum);
|
||||||
|
test_failure_error(errNum, CL_INVALID_IMAGE_FORMAT_DESCRIPTOR,
|
||||||
|
"Image creation must fail with "
|
||||||
|
"CL_INVALID_IMAGE_FORMAT_DESCRIPTOR"
|
||||||
|
"when image desc passed as NULL");
|
||||||
|
|
||||||
|
image.reset();
|
||||||
|
|
||||||
|
// Passing image_desc as NULL
|
||||||
|
image = clCreateImageWithProperties(context, extMemProperties.data(),
|
||||||
|
CL_MEM_READ_WRITE, &img_format, NULL,
|
||||||
|
NULL, &errNum);
|
||||||
|
test_failure_error(errNum, CL_INVALID_IMAGE_DESCRIPTOR,
|
||||||
|
"Image creation must fail with "
|
||||||
|
"CL_INVALID_IMAGE_DESCRIPTOR "
|
||||||
|
"when image desc passed as NULL");
|
||||||
|
image.reset();
|
||||||
|
|
||||||
|
if (cmd_queue) clReleaseCommandQueue(cmd_queue);
|
||||||
|
if (context) clReleaseContext(context);
|
||||||
|
|
||||||
|
return TEST_PASS;
|
||||||
|
}
|
||||||
@@ -0,0 +1,210 @@
|
|||||||
|
#include <vulkan_interop_common.hpp>
|
||||||
|
#include <opencl_vulkan_wrapper.hpp>
|
||||||
|
#include <vulkan_wrapper.hpp>
|
||||||
|
#if !defined(__APPLE__)
|
||||||
|
#include <CL/cl.h>
|
||||||
|
#include <CL/cl_ext.h>
|
||||||
|
#else
|
||||||
|
#include <OpenCL/cl.h>
|
||||||
|
#include <OpenCL/cl_ext.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
#include <vector>
|
||||||
|
#include <iostream>
|
||||||
|
#include <string.h>
|
||||||
|
#include "harness/testHarness.h"
|
||||||
|
#include "harness/typeWrappers.h"
|
||||||
|
#include "harness/deviceInfo.h"
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
|
||||||
|
int test_consistency_external_for_3dimage(cl_device_id deviceID,
|
||||||
|
cl_context _context,
|
||||||
|
cl_command_queue _queue,
|
||||||
|
int num_elements)
|
||||||
|
{
|
||||||
|
cl_int errNum;
|
||||||
|
VulkanDevice vkDevice;
|
||||||
|
|
||||||
|
// Context and command queue creation
|
||||||
|
cl_platform_id platform = NULL;
|
||||||
|
cl_context context = NULL;
|
||||||
|
cl_command_queue cmd_queue = NULL;
|
||||||
|
|
||||||
|
cl_context_properties contextProperties[] = { CL_CONTEXT_PLATFORM, 0, 0 };
|
||||||
|
errNum = clGetPlatformIDs(1, &platform, NULL);
|
||||||
|
test_error(errNum, "Failed to get platform id");
|
||||||
|
|
||||||
|
contextProperties[1] = (cl_context_properties)platform;
|
||||||
|
|
||||||
|
context = clCreateContextFromType(contextProperties, CL_DEVICE_TYPE_GPU,
|
||||||
|
NULL, NULL, &errNum);
|
||||||
|
test_error(errNum, "Unable to create context with properties");
|
||||||
|
|
||||||
|
cmd_queue = clCreateCommandQueue(context, deviceID, 0, &errNum);
|
||||||
|
test_error(errNum, "Unable to create command queue");
|
||||||
|
|
||||||
|
cl_device_id devList[] = { deviceID, NULL };
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
if (!is_extension_available(devList[0], "cl_khr_external_memory_win32"))
|
||||||
|
{
|
||||||
|
throw std::runtime_error("Device does not support"
|
||||||
|
"cl_khr_external_memory_win32 extension \n");
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
if (!is_extension_available(devList[0], "cl_khr_external_memory_opaque_fd"))
|
||||||
|
{
|
||||||
|
throw std::runtime_error(
|
||||||
|
"Device does not support cl_khr_external_memory_opaque_fd "
|
||||||
|
"extension \n");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
uint32_t width = 256;
|
||||||
|
uint32_t height = 16;
|
||||||
|
uint32_t depth = 10;
|
||||||
|
cl_image_desc image_desc;
|
||||||
|
memset(&image_desc, 0x0, sizeof(cl_image_desc));
|
||||||
|
cl_image_format img_format = { 0 };
|
||||||
|
|
||||||
|
VulkanExternalMemoryHandleType vkExternalMemoryHandleType =
|
||||||
|
getSupportedVulkanExternalMemoryHandleTypeList()[0];
|
||||||
|
|
||||||
|
VulkanImageTiling vulkanImageTiling =
|
||||||
|
vkClExternalMemoryHandleTilingAssumption(
|
||||||
|
deviceID, vkExternalMemoryHandleType, &errNum);
|
||||||
|
ASSERT_SUCCESS(errNum, "Failed to query OpenCL tiling mode");
|
||||||
|
|
||||||
|
VulkanImage3D vkImage3D =
|
||||||
|
VulkanImage3D(vkDevice, VULKAN_FORMAT_R8G8B8A8_UNORM, width, height,
|
||||||
|
depth, vulkanImageTiling, 1, vkExternalMemoryHandleType);
|
||||||
|
|
||||||
|
const VulkanMemoryTypeList& memoryTypeList = vkImage3D.getMemoryTypeList();
|
||||||
|
uint64_t totalImageMemSize = vkImage3D.getSize();
|
||||||
|
|
||||||
|
log_info("Memory type index: %u\n", (uint32_t)memoryTypeList[0]);
|
||||||
|
log_info("Memory type property: %d\n",
|
||||||
|
memoryTypeList[0].getMemoryTypeProperty());
|
||||||
|
log_info("Image size : %lu\n", totalImageMemSize);
|
||||||
|
|
||||||
|
VulkanDeviceMemory* vkDeviceMem = new VulkanDeviceMemory(
|
||||||
|
vkDevice, vkImage3D, memoryTypeList[0], vkExternalMemoryHandleType);
|
||||||
|
vkDeviceMem->bindImage(vkImage3D, 0);
|
||||||
|
|
||||||
|
void* handle = NULL;
|
||||||
|
int fd;
|
||||||
|
std::vector<cl_mem_properties> extMemProperties{
|
||||||
|
(cl_mem_properties)CL_MEM_DEVICE_HANDLE_LIST_KHR,
|
||||||
|
(cl_mem_properties)devList[0],
|
||||||
|
(cl_mem_properties)CL_MEM_DEVICE_HANDLE_LIST_END_KHR,
|
||||||
|
};
|
||||||
|
switch (vkExternalMemoryHandleType)
|
||||||
|
{
|
||||||
|
#ifdef _WIN32
|
||||||
|
case VULKAN_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_NT:
|
||||||
|
handle = vkDeviceMem->getHandle(vkExternalMemoryHandleType);
|
||||||
|
errNum = check_external_memory_handle_type(
|
||||||
|
devList[0], CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_WIN32_KHR);
|
||||||
|
extMemProperties.push_back(
|
||||||
|
(cl_mem_properties)CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_WIN32_KHR);
|
||||||
|
extMemProperties.push_back((cl_mem_properties)handle);
|
||||||
|
break;
|
||||||
|
case VULKAN_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT:
|
||||||
|
handle = vkDeviceMem->getHandle(vkExternalMemoryHandleType);
|
||||||
|
errNum = check_external_memory_handle_type(
|
||||||
|
devList[0], CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_WIN32_KMT_KHR);
|
||||||
|
extMemProperties.push_back(
|
||||||
|
(cl_mem_properties)
|
||||||
|
CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_WIN32_KMT_KHR);
|
||||||
|
extMemProperties.push_back((cl_mem_properties)handle);
|
||||||
|
break;
|
||||||
|
#else
|
||||||
|
case VULKAN_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD:
|
||||||
|
fd = (int)vkDeviceMem->getHandle(vkExternalMemoryHandleType);
|
||||||
|
errNum = check_external_memory_handle_type(
|
||||||
|
devList[0], CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_FD_KHR);
|
||||||
|
extMemProperties.push_back(
|
||||||
|
(cl_mem_properties)CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_FD_KHR);
|
||||||
|
extMemProperties.push_back((cl_mem_properties)fd);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
default:
|
||||||
|
errNum = TEST_FAIL;
|
||||||
|
log_error("Unsupported external memory handle type \n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (errNum != CL_SUCCESS)
|
||||||
|
{
|
||||||
|
log_error("Checks failed for "
|
||||||
|
"CL_DEVICE_EXTERNAL_MEMORY_IMPORT_HANDLE_TYPES_KHR\n");
|
||||||
|
return TEST_FAIL;
|
||||||
|
}
|
||||||
|
extMemProperties.push_back(0);
|
||||||
|
|
||||||
|
const VkImageCreateInfo VulkanImageCreateInfo =
|
||||||
|
vkImage3D.getVkImageCreateInfo();
|
||||||
|
|
||||||
|
errNum = getCLImageInfoFromVkImageInfo(
|
||||||
|
&VulkanImageCreateInfo, totalImageMemSize, &img_format, &image_desc);
|
||||||
|
if (errNum != CL_SUCCESS)
|
||||||
|
{
|
||||||
|
log_error("getCLImageInfoFromVkImageInfo failed!!!");
|
||||||
|
return TEST_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
clMemWrapper image;
|
||||||
|
|
||||||
|
// Pass valid properties, image_desc and image_format
|
||||||
|
image = clCreateImageWithProperties(
|
||||||
|
context, extMemProperties.data(), CL_MEM_READ_WRITE, &img_format,
|
||||||
|
&image_desc, NULL /* host_ptr */, &errNum);
|
||||||
|
test_error(errNum, "Unable to create Image with Properties");
|
||||||
|
image.reset();
|
||||||
|
|
||||||
|
// Passing properties, image_desc and image_format all as NULL
|
||||||
|
image = clCreateImageWithProperties(context, NULL, CL_MEM_READ_WRITE, NULL,
|
||||||
|
NULL, NULL, &errNum);
|
||||||
|
test_failure_error(
|
||||||
|
errNum, CL_INVALID_IMAGE_DESCRIPTOR,
|
||||||
|
"Image creation must fail with CL_INVALID_IMAGE_DESCRIPTOR "
|
||||||
|
"when all are passed as NULL");
|
||||||
|
|
||||||
|
image.reset();
|
||||||
|
|
||||||
|
// Passing NULL properties and a valid image_format and image_desc
|
||||||
|
image =
|
||||||
|
clCreateImageWithProperties(context, NULL, CL_MEM_READ_WRITE,
|
||||||
|
&img_format, &image_desc, NULL, &errNum);
|
||||||
|
test_error(errNum,
|
||||||
|
"Unable to create image with NULL properties "
|
||||||
|
"with valid image format and image desc");
|
||||||
|
|
||||||
|
image.reset();
|
||||||
|
|
||||||
|
// Passing image_format as NULL
|
||||||
|
image = clCreateImageWithProperties(context, extMemProperties.data(),
|
||||||
|
CL_MEM_READ_WRITE, NULL, &image_desc,
|
||||||
|
NULL, &errNum);
|
||||||
|
test_failure_error(errNum, CL_INVALID_IMAGE_FORMAT_DESCRIPTOR,
|
||||||
|
"Image creation must fail with "
|
||||||
|
"CL_INVALID_IMAGE_FORMAT_DESCRIPTOR"
|
||||||
|
"when image desc passed as NULL");
|
||||||
|
|
||||||
|
image.reset();
|
||||||
|
|
||||||
|
// Passing image_desc as NULL
|
||||||
|
image = clCreateImageWithProperties(context, extMemProperties.data(),
|
||||||
|
CL_MEM_READ_WRITE, &img_format, NULL,
|
||||||
|
NULL, &errNum);
|
||||||
|
test_failure_error(errNum, CL_INVALID_IMAGE_DESCRIPTOR,
|
||||||
|
"Image creation must fail with "
|
||||||
|
"CL_INVALID_IMAGE_DESCRIPTOR "
|
||||||
|
"when image desc passed as NULL");
|
||||||
|
image.reset();
|
||||||
|
|
||||||
|
if (cmd_queue) clReleaseCommandQueue(cmd_queue);
|
||||||
|
if (context) clReleaseContext(context);
|
||||||
|
|
||||||
|
return TEST_PASS;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user