DPC++ Runtime
Runtime libraries for oneAPI DPC++
bindless_images.hpp File Reference
#include <sycl/context.hpp>
#include <sycl/detail/export.hpp>
#include <sycl/detail/pi.h>
#include <sycl/device.hpp>
#include <sycl/ext/oneapi/bindless_images_descriptor.hpp>
#include <sycl/ext/oneapi/bindless_images_interop.hpp>
#include <sycl/ext/oneapi/bindless_images_memory.hpp>
#include <sycl/ext/oneapi/bindless_images_sampler.hpp>
#include <sycl/image.hpp>
#include <sycl/queue.hpp>
#include <sycl/range.hpp>
#include <assert.h>
#include <stddef.h>
#include <type_traits>
Include dependency graph for bindless_images.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sycl::_V1::ext::oneapi::experimental::unsampled_image_handle
 Opaque unsampled image handle type. More...
 
struct  sycl::_V1::ext::oneapi::experimental::sampled_image_handle
 Opaque sampled image handle type. More...
 
struct  sycl::_V1::ext::oneapi::experimental::detail::is_vec< T >
 
struct  sycl::_V1::ext::oneapi::experimental::detail::is_vec< sycl::vec< T, N > >
 

Namespaces

 sycl
 
 sycl::_V1
 
 sycl::_V1::ext
 
 sycl::_V1::ext::oneapi
 
 sycl::_V1::ext::oneapi::experimental
 
 sycl::_V1::ext::oneapi::experimental::detail
 

Functions

image_mem_handle sycl::_V1::ext::oneapi::experimental::alloc_image_mem (const image_descriptor &desc, const sycl::device &syclDevice, const sycl::context &syclContext)
 Allocate image memory based on image_descriptor. More...
 
image_mem_handle sycl::_V1::ext::oneapi::experimental::alloc_image_mem (const image_descriptor &desc, const sycl::queue &syclQueue)
 Allocate image memory based on image_descriptor. More...
 
void sycl::_V1::ext::oneapi::experimental::free_image_mem (image_mem_handle handle, const sycl::device &syclDevice, const sycl::context &syclContext)
 [Deprecated] Free image memory More...
 
void sycl::_V1::ext::oneapi::experimental::free_image_mem (image_mem_handle handle, const sycl::queue &syclQueue)
 [Deprecated] Free image memory More...
 
void sycl::_V1::ext::oneapi::experimental::free_image_mem (image_mem_handle handle, image_type imageType, const sycl::device &syclDevice, const sycl::context &syclContext)
 Free image memory. More...
 
void sycl::_V1::ext::oneapi::experimental::free_image_mem (image_mem_handle handle, image_type imageType, const sycl::queue &syclQueue)
 Free image memory. More...
 
image_mem_handle sycl::_V1::ext::oneapi::experimental::alloc_mipmap_mem (const image_descriptor &desc, const sycl::device &syclDevice, const sycl::context &syclContext)
 [Deprecated] Allocate mipmap memory based on image_descriptor More...
 
image_mem_handle sycl::_V1::ext::oneapi::experimental::alloc_mipmap_mem (const image_descriptor &desc, const sycl::device &syclQueue)
 [Deprecated] Allocate mipmap memory based on image_descriptor More...
 
void sycl::_V1::ext::oneapi::experimental::free_mipmap_mem (image_mem_handle handle, const sycl::device &syclDevice, const sycl::context &syclContext)
 [Deprecated] Free mipmap memory More...
 
void sycl::_V1::ext::oneapi::experimental::free_mipmap_mem (image_mem_handle handle, const sycl::queue &syclQueue)
 [Deprecated] Free mipmap memory More...
 
image_mem_handle sycl::_V1::ext::oneapi::experimental::get_mip_level_mem_handle (const image_mem_handle mipMem, const unsigned int level, const sycl::device &syclDevice, const sycl::context &syclContext)
 Retrieve the memory handle to an individual mipmap image. More...
 
image_mem_handle sycl::_V1::ext::oneapi::experimental::get_mip_level_mem_handle (const image_mem_handle mipMem, const unsigned int level, const sycl::queue &syclQueue)
 Retrieve the memory handle to an individual mipmap image. More...
 
template<typename ExternalMemHandleType >
interop_mem_handle sycl::_V1::ext::oneapi::experimental::import_external_memory (external_mem_descriptor< ExternalMemHandleType > externalMem, const sycl::device &syclDevice, const sycl::context &syclContext)
 Import external memory taking an external memory handle (the type of which is dependent on the OS & external API) and return an interop memory handle. More...
 
template<typename ExternalMemHandleType >
interop_mem_handle sycl::_V1::ext::oneapi::experimental::import_external_memory (external_mem_descriptor< ExternalMemHandleType > externalMem, const sycl::queue &syclQueue)
 Import external memory taking an external memory handle (the type of which is dependent on the OS & external API) and return an interop memory handle. More...
 
image_mem_handle sycl::_V1::ext::oneapi::experimental::map_external_memory_array (interop_mem_handle memHandle, const image_descriptor &desc, const sycl::device &syclDevice, const sycl::context &syclContext)
 [Deprecated] Maps an interop memory handle to an image memory handle (which may have a device optimized memory layout) More...
 
image_mem_handle sycl::_V1::ext::oneapi::experimental::map_external_memory_array (interop_mem_handle memHandle, const image_descriptor &desc, const sycl::queue &syclQueue)
 [Deprecated] Maps an interop memory handle to an image memory handle (which may have a device optimized memory layout) More...
 
image_mem_handle sycl::_V1::ext::oneapi::experimental::map_external_image_memory (interop_mem_handle memHandle, const image_descriptor &desc, const sycl::device &syclDevice, const sycl::context &syclContext)
 Maps an interop memory handle to an image memory handle (which may have a device optimized memory layout) More...
 
image_mem_handle sycl::_V1::ext::oneapi::experimental::map_external_image_memory (interop_mem_handle memHandle, const image_descriptor &desc, const sycl::queue &syclQueue)
 Maps an interop memory handle to an image memory handle (which may have a device optimized memory layout) More...
 
template<typename ExternalSemaphoreHandleType >
interop_semaphore_handle sycl::_V1::ext::oneapi::experimental::import_external_semaphore (external_semaphore_descriptor< ExternalSemaphoreHandleType > externalSemaphoreDesc, const sycl::device &syclDevice, const sycl::context &syclContext)
 Import external semaphore taking an external semaphore handle (the type of which is dependent on the OS & external API) More...
 
template<typename ExternalSemaphoreHandleType >
interop_semaphore_handle sycl::_V1::ext::oneapi::experimental::import_external_semaphore (external_semaphore_descriptor< ExternalSemaphoreHandleType > externalSemaphoreDesc, const sycl::queue &syclQueue)
 Import external semaphore taking an external semaphore handle (the type of which is dependent on the OS & external API) More...
 
void sycl::_V1::ext::oneapi::experimental::destroy_external_semaphore (interop_semaphore_handle semaphoreHandle, const sycl::device &syclDevice, const sycl::context &syclContext)
 Destroy the external semaphore handle. More...
 
void sycl::_V1::ext::oneapi::experimental::destroy_external_semaphore (interop_semaphore_handle semaphoreHandle, const sycl::queue &syclQueue)
 Destroy the external semaphore handle. More...
 
void sycl::_V1::ext::oneapi::experimental::release_external_memory (interop_mem_handle interopHandle, const sycl::device &syclDevice, const sycl::context &syclContext)
 Release external memory. More...
 
void sycl::_V1::ext::oneapi::experimental::release_external_memory (interop_mem_handle interopHandle, const sycl::queue &syclQueue)
 Release external memory. More...
 
unsampled_image_handle sycl::_V1::ext::oneapi::experimental::create_image (image_mem &memHandle, const image_descriptor &desc, const sycl::device &syclDevice, const sycl::context &syclContext)
 Create an image and return the device image handle. More...
 
unsampled_image_handle sycl::_V1::ext::oneapi::experimental::create_image (image_mem &memHandle, const image_descriptor &desc, const sycl::queue &syclQueue)
 Create an image and return the device image handle. More...
 
unsampled_image_handle sycl::_V1::ext::oneapi::experimental::create_image (image_mem_handle memHandle, const image_descriptor &desc, const sycl::device &syclDevice, const sycl::context &syclContext)
 Create an image and return the device image handle. More...
 
unsampled_image_handle sycl::_V1::ext::oneapi::experimental::create_image (image_mem_handle memHandle, const image_descriptor &desc, const sycl::queue &syclQueue)
 Create an image and return the device image handle. More...
 
sampled_image_handle sycl::_V1::ext::oneapi::experimental::create_image (void *imgMem, size_t pitch, const bindless_image_sampler &sampler, const image_descriptor &desc, const sycl::device &syclDevice, const sycl::context &syclContext)
 Create a sampled image and return the device image handle. More...
 
sampled_image_handle sycl::_V1::ext::oneapi::experimental::create_image (void *imgMem, size_t pitch, const bindless_image_sampler &sampler, const image_descriptor &desc, const sycl::queue &syclQueue)
 Create a sampled image and return the device image handle. More...
 
sampled_image_handle sycl::_V1::ext::oneapi::experimental::create_image (image_mem &memHandle, const bindless_image_sampler &sampler, const image_descriptor &desc, const sycl::device &syclDevice, const sycl::context &syclContext)
 Create a sampled image and return the device image handle. More...
 
sampled_image_handle sycl::_V1::ext::oneapi::experimental::create_image (image_mem &memHandle, const bindless_image_sampler &sampler, const image_descriptor &desc, const sycl::queue &syclQueue)
 Create a sampled image and return the device image handle. More...
 
sampled_image_handle sycl::_V1::ext::oneapi::experimental::create_image (image_mem_handle memHandle, const bindless_image_sampler &sampler, const image_descriptor &desc, const sycl::device &syclDevice, const sycl::context &syclContext)
 Create a sampled image and return the device image handle. More...
 
sampled_image_handle sycl::_V1::ext::oneapi::experimental::create_image (image_mem_handle memHandle, const bindless_image_sampler &sampler, const image_descriptor &desc, const sycl::queue &syclQueue)
 Create a sampled image and return the device image handle. More...
 
void sycl::_V1::ext::oneapi::experimental::destroy_image_handle (unsampled_image_handle &imageHandle, const sycl::device &syclDevice, const sycl::context &syclContext)
 Destroy an unsampled image handle. More...
 
void sycl::_V1::ext::oneapi::experimental::destroy_image_handle (unsampled_image_handle &imageHandle, const sycl::queue &syclQueue)
 Destroy an unsampled image handle. More...
 
void sycl::_V1::ext::oneapi::experimental::destroy_image_handle (sampled_image_handle &imageHandle, const sycl::device &syclDevice, const sycl::context &syclContext)
 Destroy a sampled image handle. More...
 
void sycl::_V1::ext::oneapi::experimental::destroy_image_handle (sampled_image_handle &imageHandle, const sycl::queue &syclQueue)
 Destroy a sampled image handle. More...
 
void * sycl::_V1::ext::oneapi::experimental::pitched_alloc_device (size_t *resultPitch, size_t widthInBytes, size_t height, unsigned int elementSizeBytes, const sycl::queue &syclQueue)
 Allocate pitched USM image memory. More...
 
void * sycl::_V1::ext::oneapi::experimental::pitched_alloc_device (size_t *resultPitch, size_t widthInBytes, size_t height, unsigned int elementSizeBytes, const sycl::device &syclDevice, const sycl::context &syclContext)
 Allocate pitched USM image memory. More...
 
void * sycl::_V1::ext::oneapi::experimental::pitched_alloc_device (size_t *resultPitch, const image_descriptor &desc, const sycl::queue &syclQueue)
 Allocate pitched USM image memory. More...
 
void * sycl::_V1::ext::oneapi::experimental::pitched_alloc_device (size_t *resultPitch, const image_descriptor &desc, const sycl::device &syclDevice, const sycl::context &syclContext)
 Allocate pitched USM image memory. More...
 
sycl::range< 3 > sycl::_V1::ext::oneapi::experimental::get_image_range (const image_mem_handle memHandle, const sycl::device &syclDevice, const sycl::context &syclContext)
 Get the range that describes the image's dimensions. More...
 
sycl::range< 3 > sycl::_V1::ext::oneapi::experimental::get_image_range (const image_mem_handle memHandle, const sycl::queue &syclQueue)
 Get the range that describes the image's dimensions. More...
 
sycl::image_channel_type sycl::_V1::ext::oneapi::experimental::get_image_channel_type (const image_mem_handle memHandle, const sycl::device &syclDevice, const sycl::context &syclContext)
 Get the channel type that describes the image memory. More...
 
sycl::image_channel_type sycl::_V1::ext::oneapi::experimental::get_image_channel_type (const image_mem_handle memHandle, const sycl::queue &syclQueue)
 Get the channel type that describes the image memory. More...
 
unsigned int sycl::_V1::ext::oneapi::experimental::get_image_num_channels (const image_mem_handle memHandle, const sycl::device &syclDevice, const sycl::context &syclContext)
 Get the number of channels that describes the image memory. More...
 
unsigned int sycl::_V1::ext::oneapi::experimental::get_image_num_channels (const image_mem_handle memHandle, const sycl::queue &syclQueue)
 Get the number of channels that describes the image memory. More...
 
template<typename CoordT >
constexpr size_t sycl::_V1::ext::oneapi::experimental::detail::coord_size ()
 
template<typename DataT >
constexpr auto sycl::_V1::ext::oneapi::experimental::detail::convert_color (DataT Color)
 
template<typename CoordT >
constexpr void sycl::_V1::ext::oneapi::experimental::detail::assert_unsampled_coords ()
 
template<typename CoordT >
constexpr bool sycl::_V1::ext::oneapi::experimental::detail::are_floating_coords ()
 
template<typename CoordT >
constexpr bool sycl::_V1::ext::oneapi::experimental::detail::are_integer_coords ()
 
template<typename CoordT >
constexpr void sycl::_V1::ext::oneapi::experimental::detail::assert_coords_type ()
 
template<typename CoordT >
constexpr void sycl::_V1::ext::oneapi::experimental::detail::assert_sample_coords ()
 
template<typename CoordT >
constexpr void sycl::_V1::ext::oneapi::experimental::detail::assert_fetch_coords ()
 
template<typename DataT >
constexpr bool sycl::_V1::ext::oneapi::experimental::detail::is_data_size_valid ()
 
template<typename DataT >
constexpr bool sycl::_V1::ext::oneapi::experimental::detail::is_recognized_standard_type ()
 
template<typename DataT , typename HintT = DataT, typename CoordT >
DataT sycl::_V1::ext::oneapi::experimental::fetch_image (const unsampled_image_handle &imageHandle[[maybe_unused]], const CoordT &coords[[maybe_unused]])
 Fetch data from an unsampled image using its handle. More...
 
template<typename DataT , typename HintT = DataT, typename CoordT >
 sycl::_V1::ext::oneapi::experimental::__SYCL_DEPRECATED ("read_image for standard unsampled images is deprecated. " "Instead use fetch_image.") DataT read_image(const unsampled_image_handle &imageHandle
 [Deprecated] Read an unsampled image using its handle More...
 
template<typename DataT , typename HintT = DataT, typename CoordT >
DataT sycl::_V1::ext::oneapi::experimental::fetch_image (const sampled_image_handle &imageHandle[[maybe_unused]], const CoordT &coords[[maybe_unused]])
 Fetch data from a sampled image using its handle. More...
 
template<typename DataT , typename HintT = DataT, typename CoordT >
DataT sycl::_V1::ext::oneapi::experimental::sample_image (const sampled_image_handle &imageHandle[[maybe_unused]], const CoordT &coords[[maybe_unused]])
 Sample data from a sampled image using its handle. More...
 
template<typename DataT , typename HintT = DataT, typename CoordT >
 sycl::_V1::ext::oneapi::experimental::__SYCL_DEPRECATED ("read_image for standard sampled images is deprecated. " "Instead use sample_image with floating point coordinates or " "fetch_image with integer coordinates.") DataT read_image(const sampled_image_handle &imageHandle
 [Deprecated] Read a sampled image using its handle More...
 
constexpr sycl::_V1::ext::oneapi::experimental::if (detail::are_floating_coords< CoordT >())
 
else constexpr sycl::_V1::ext::oneapi::experimental::if (detail::are_integer_coords< CoordT >())
 
template<typename DataT , typename HintT = DataT, typename CoordT >
DataT sycl::_V1::ext::oneapi::experimental::sample_mipmap (const sampled_image_handle &imageHandle[[maybe_unused]], const CoordT &coords[[maybe_unused]], const float level[[maybe_unused]])
 Sample a mipmap image using its handle with LOD filtering. More...
 
template<typename DataT , typename HintT = DataT, typename CoordT >
DataT sycl::_V1::ext::oneapi::experimental::sample_mipmap (const sampled_image_handle &imageHandle[[maybe_unused]], const CoordT &coords[[maybe_unused]], const CoordT &dX[[maybe_unused]], const CoordT &dY[[maybe_unused]])
 Sample a mipmap image using its handle with anisotropic filtering. More...
 
template<typename DataT , typename HintT = DataT, typename CoordT >
 sycl::_V1::ext::oneapi::experimental::__SYCL_DEPRECATED ("read_mipmap has been deprecated. " "Instead use sample_mipmap.") DataT read_mipmap(const sampled_image_handle &imageHandle
 [Deprecated] Read a mipmap image using its handle with LOD filtering More...
 
template<typename DataT , typename HintT = DataT, typename CoordT >
 sycl::_V1::ext::oneapi::experimental::__SYCL_DEPRECATED ("read_image for mipmaps is deprecated. " "Instead use sample_mipmap.") DataT read_image(const sampled_image_handle &imageHandle
 [Deprecated] Read a mipmap image using its handle with LOD filtering More...
 
template<typename DataT , typename HintT = DataT, typename CoordT >
DataT sycl::_V1::ext::oneapi::experimental::fetch_image_array (const unsampled_image_handle &imageHandle[[maybe_unused]], const CoordT &coords[[maybe_unused]], const int arrayLayer[[maybe_unused]])
 Fetch data from an unsampled image array using its handle. More...
 
template<typename DataT >
DataT sycl::_V1::ext::oneapi::experimental::fetch_cubemap (const unsampled_image_handle &imageHandle, const int2 &coords, const unsigned int face)
 Fetch data from an unsampled cubemap image using its handle. More...
 
template<typename DataT , typename HintT = DataT>
DataT sycl::_V1::ext::oneapi::experimental::sample_cubemap (const sampled_image_handle &imageHandle[[maybe_unused]], const sycl::float3 &dirVec[[maybe_unused]])
 Sample a cubemap image using its handle. More...
 
template<typename DataT , typename CoordT >
void sycl::_V1::ext::oneapi::experimental::write_image (unsampled_image_handle imageHandle[[maybe_unused]], const CoordT &coords[[maybe_unused]], const DataT &color[[maybe_unused]])
 Write to an unsampled image using its handle. More...
 
template<typename DataT , typename CoordT >
void sycl::_V1::ext::oneapi::experimental::write_image_array (unsampled_image_handle imageHandle[[maybe_unused]], const CoordT &coords[[maybe_unused]], const int arrayLayer[[maybe_unused]], const DataT &color[[maybe_unused]])
 Write to an unsampled image array using its handle. More...
 
template<typename DataT >
void sycl::_V1::ext::oneapi::experimental::write_cubemap (unsampled_image_handle imageHandle, const sycl::int2 &coords, const int face, const DataT &color)
 Write to an unsampled cubemap using its handle. More...
 

Variables

template<typename T >
constexpr bool sycl::_V1::ext::oneapi::experimental::detail::is_vec_v = is_vec<T>::value
 
const CoordT & sycl::_V1::ext::oneapi::experimental::coords
 
const CoordT const float sycl::_V1::ext::oneapi::experimental::level
 
const CoordT const CoordT & sycl::_V1::ext::oneapi::experimental::dX
 
const CoordT const CoordT const CoordT & sycl::_V1::ext::oneapi::experimental::dY