diff --git a/include/ur.py b/include/ur.py index 6860304683..a1f4f0fd2d 100644 --- a/include/ur.py +++ b/include/ur.py @@ -250,6 +250,7 @@ class ur_structure_type_v(IntEnum): EXP_FILE_DESCRIPTOR = 0x2003 ## ::ur_exp_file_descriptor_t EXP_WIN32_HANDLE = 0x2004 ## ::ur_exp_win32_handle_t EXP_LAYERED_IMAGE_PROPERTIES = 0x2005 ## ::ur_exp_layered_image_properties_t + EXP_SAMPLER_ADDR_MODES = 0x2006 ## ::ur_exp_sampler_addr_modes_t class ur_structure_type_t(c_int): def __str__(self): @@ -2216,6 +2217,22 @@ class ur_exp_sampler_mip_properties_t(Structure): ("mipFilterMode", ur_sampler_filter_mode_t) ## [in] mipmap filter mode used for filtering between mipmap levels ] +############################################################################### +## @brief Describes unique sampler addressing mode per dimension +## +## @details +## - Specify these properties in ::urSamplerCreate via ::ur_sampler_desc_t +## as part of a `pNext` chain. +class ur_exp_sampler_addr_modes_t(Structure): + _fields_ = [ + ("stype", ur_structure_type_t), ## [in] type of this structure, must be + ## ::UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES + ("pNext", c_void_p), ## [in,out][optional] pointer to extension-specific structure + ("addrModeX", ur_sampler_addressing_mode_t), ## [in] Specify the addressing mode of the x-dimension. + ("addrModeY", ur_sampler_addressing_mode_t), ## [in] Specify the addressing mode of the y-dimension. + ("addrModeZ", ur_sampler_addressing_mode_t) ## [in] Specify the addressing mode of the z-dimension. + ] + ############################################################################### ## @brief Describes an interop memory resource descriptor class ur_exp_interop_mem_desc_t(Structure): diff --git a/include/ur_api.h b/include/ur_api.h index 84d26d1c31..58b8454194 100644 --- a/include/ur_api.h +++ b/include/ur_api.h @@ -259,6 +259,7 @@ typedef enum ur_structure_type_t { UR_STRUCTURE_TYPE_EXP_FILE_DESCRIPTOR = 0x2003, ///< ::ur_exp_file_descriptor_t UR_STRUCTURE_TYPE_EXP_WIN32_HANDLE = 0x2004, ///< ::ur_exp_win32_handle_t UR_STRUCTURE_TYPE_EXP_LAYERED_IMAGE_PROPERTIES = 0x2005, ///< ::ur_exp_layered_image_properties_t + UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES = 0x2006, ///< ::ur_exp_sampler_addr_modes_t /// @cond UR_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff /// @endcond @@ -7037,6 +7038,22 @@ typedef struct ur_exp_sampler_mip_properties_t { } ur_exp_sampler_mip_properties_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Describes unique sampler addressing mode per dimension +/// +/// @details +/// - Specify these properties in ::urSamplerCreate via ::ur_sampler_desc_t +/// as part of a `pNext` chain. +typedef struct ur_exp_sampler_addr_modes_t { + ur_structure_type_t stype; ///< [in] type of this structure, must be + ///< ::UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES + void *pNext; ///< [in,out][optional] pointer to extension-specific structure + ur_sampler_addressing_mode_t addrModeX; ///< [in] Specify the addressing mode of the x-dimension. + ur_sampler_addressing_mode_t addrModeY; ///< [in] Specify the addressing mode of the y-dimension. + ur_sampler_addressing_mode_t addrModeZ; ///< [in] Specify the addressing mode of the z-dimension. + +} ur_exp_sampler_addr_modes_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Describes an interop memory resource descriptor typedef struct ur_exp_interop_mem_desc_t { diff --git a/scripts/core/EXP-BINDLESS-IMAGES.rst b/scripts/core/EXP-BINDLESS-IMAGES.rst index 03a31537f3..c794c199d9 100644 --- a/scripts/core/EXP-BINDLESS-IMAGES.rst +++ b/scripts/core/EXP-BINDLESS-IMAGES.rst @@ -69,6 +69,7 @@ Enums ${X}_STRUCTURE_TYPE_EXP_FILE_DESCRIPTOR ${X}_STRUCTURE_TYPE_EXP_WIN32_HANDLE ${X}_STRUCTURE_TYPE_EXP_LAYERED_IMAGE_PROPERTIES + ${X}_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES * ${x}_device_info_t * ${X}_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT_EXP @@ -129,6 +130,7 @@ Types * ${x}_exp_file_descriptor_t * ${x}_exp_win32_handle_t * ${x}_exp_layered_image_properties_t +* ${x}_exp_sampler_addr_modes_t Functions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -180,6 +182,8 @@ Changelog +----------+-------------------------------------------------------------+ | 7.0 | Add layered image properties struct. | +----------+-------------------------------------------------------------+ +| 8.0 | Added structure for sampler addressing modes per dimension. | ++------------------------------------------------------------------------+ Contributors -------------------------------------------------------------------------------- diff --git a/scripts/core/exp-bindless-images.yml b/scripts/core/exp-bindless-images.yml index ef18244a6d..fe74fb1c5c 100644 --- a/scripts/core/exp-bindless-images.yml +++ b/scripts/core/exp-bindless-images.yml @@ -110,6 +110,9 @@ etors: - name: EXP_LAYERED_IMAGE_PROPERTIES desc: $x_exp_layered_image_properties_t value: "0x2005" + - name: EXP_SAMPLER_ADDR_MODES + desc: $x_exp_sampler_addr_modes_t + value: "0x2006" --- #-------------------------------------------------------------------------- type: enum extend: true @@ -176,6 +179,25 @@ members: desc: "[in] mipmap filter mode used for filtering between mipmap levels" --- #-------------------------------------------------------------------------- type: struct +desc: "Describes unique sampler addressing mode per dimension" +details: + - Specify these properties in $xSamplerCreate via $x_sampler_desc_t as part + of a `pNext` chain. +class: $xBindlessImages +name: $x_exp_sampler_addr_modes_t +base: $x_base_properties_t +members: + - type: $x_sampler_addressing_mode_t + name: addrModeX + desc: "[in] Specify the addressing mode of the x-dimension." + - type: $x_sampler_addressing_mode_t + name: addrModeY + desc: "[in] Specify the addressing mode of the y-dimension." + - type: $x_sampler_addressing_mode_t + name: addrModeZ + desc: "[in] Specify the addressing mode of the z-dimension." +--- #-------------------------------------------------------------------------- +type: struct desc: "Describes an interop memory resource descriptor" class: $xBindlessImages name: $x_exp_interop_mem_desc_t diff --git a/source/common/ur_params.hpp b/source/common/ur_params.hpp index 4296606987..b852c72e7c 100644 --- a/source/common/ur_params.hpp +++ b/source/common/ur_params.hpp @@ -432,6 +432,8 @@ inline std::ostream &operator<<(std::ostream &os, inline std::ostream & operator<<(std::ostream &os, const struct ur_exp_sampler_mip_properties_t params); +inline std::ostream & +operator<<(std::ostream &os, const struct ur_exp_sampler_addr_modes_t params); inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_interop_mem_desc_t params); inline std::ostream & @@ -1333,6 +1335,10 @@ inline std::ostream &operator<<(std::ostream &os, case UR_STRUCTURE_TYPE_EXP_LAYERED_IMAGE_PROPERTIES: os << "UR_STRUCTURE_TYPE_EXP_LAYERED_IMAGE_PROPERTIES"; break; + + case UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES: + os << "UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES"; + break; default: os << "unknown enumerator"; break; @@ -1587,6 +1593,12 @@ inline void serializeStruct(std::ostream &os, const void *ptr) { (const ur_exp_layered_image_properties_t *)ptr; ur_params::serializePtr(os, pstruct); } break; + + case UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES: { + const ur_exp_sampler_addr_modes_t *pstruct = + (const ur_exp_sampler_addr_modes_t *)ptr; + ur_params::serializePtr(os, pstruct); + } break; default: os << "unknown enumerator"; break; @@ -9879,6 +9891,37 @@ operator<<(std::ostream &os, os << "}"; return os; } +inline std::ostream & +operator<<(std::ostream &os, const struct ur_exp_sampler_addr_modes_t params) { + os << "(struct ur_exp_sampler_addr_modes_t){"; + + os << ".stype = "; + + os << (params.stype); + + os << ", "; + os << ".pNext = "; + + ur_params::serializeStruct(os, (params.pNext)); + + os << ", "; + os << ".addrModeX = "; + + os << (params.addrModeX); + + os << ", "; + os << ".addrModeY = "; + + os << (params.addrModeY); + + os << ", "; + os << ".addrModeZ = "; + + os << (params.addrModeZ); + + os << "}"; + return os; +} inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_interop_mem_desc_t params) { os << "(struct ur_exp_interop_mem_desc_t){";