Skip to content

Commit 20b9a83

Browse files
authored
Merge pull request #980 from isaacault/iault/remove-layered-images
[Bindless][Exp] Layered Images Re-Work
2 parents 69a56ea + d39b4d0 commit 20b9a83

File tree

5 files changed

+46
-129
lines changed

5 files changed

+46
-129
lines changed

include/ur.py

+1-17
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,7 @@ class ur_structure_type_v(IntEnum):
256256
EXP_INTEROP_SEMAPHORE_DESC = 0x2002 ## ::ur_exp_interop_semaphore_desc_t
257257
EXP_FILE_DESCRIPTOR = 0x2003 ## ::ur_exp_file_descriptor_t
258258
EXP_WIN32_HANDLE = 0x2004 ## ::ur_exp_win32_handle_t
259-
EXP_LAYERED_IMAGE_PROPERTIES = 0x2005 ## ::ur_exp_layered_image_properties_t
260-
EXP_SAMPLER_ADDR_MODES = 0x2006 ## ::ur_exp_sampler_addr_modes_t
259+
EXP_SAMPLER_ADDR_MODES = 0x2005 ## ::ur_exp_sampler_addr_modes_t
261260

262261
class ur_structure_type_t(c_int):
263262
def __str__(self):
@@ -2294,21 +2293,6 @@ class ur_exp_interop_semaphore_desc_t(Structure):
22942293
("pNext", c_void_p) ## [in][optional] pointer to extension-specific structure
22952294
]
22962295

2297-
###############################################################################
2298-
## @brief Describes layered image properties
2299-
##
2300-
## @details
2301-
## - Specify these properties in ::urBindlessImagesUnsampledImageCreateExp
2302-
## or ::urBindlessImagesSampledImageCreateExp via ::ur_image_desc_t as
2303-
## part of a `pNext` chain.
2304-
class ur_exp_layered_image_properties_t(Structure):
2305-
_fields_ = [
2306-
("stype", ur_structure_type_t), ## [in] type of this structure, must be
2307-
## ::UR_STRUCTURE_TYPE_EXP_LAYERED_IMAGE_PROPERTIES
2308-
("pNext", c_void_p), ## [in,out][optional] pointer to extension-specific structure
2309-
("numLayers", c_ulong) ## [in] number of layers the image should have
2310-
]
2311-
23122296
###############################################################################
23132297
## @brief The extension string which defines support for command-buffers which
23142298
## is returned when querying device extensions.

include/ur_api.h

+42-58
Original file line numberDiff line numberDiff line change
@@ -224,49 +224,48 @@ typedef enum ur_function_t {
224224
///////////////////////////////////////////////////////////////////////////////
225225
/// @brief Defines structure types
226226
typedef enum ur_structure_type_t {
227-
UR_STRUCTURE_TYPE_CONTEXT_PROPERTIES = 0, ///< ::ur_context_properties_t
228-
UR_STRUCTURE_TYPE_IMAGE_DESC = 1, ///< ::ur_image_desc_t
229-
UR_STRUCTURE_TYPE_BUFFER_PROPERTIES = 2, ///< ::ur_buffer_properties_t
230-
UR_STRUCTURE_TYPE_BUFFER_REGION = 3, ///< ::ur_buffer_region_t
231-
UR_STRUCTURE_TYPE_BUFFER_CHANNEL_PROPERTIES = 4, ///< ::ur_buffer_channel_properties_t
232-
UR_STRUCTURE_TYPE_BUFFER_ALLOC_LOCATION_PROPERTIES = 5, ///< ::ur_buffer_alloc_location_properties_t
233-
UR_STRUCTURE_TYPE_PROGRAM_PROPERTIES = 6, ///< ::ur_program_properties_t
234-
UR_STRUCTURE_TYPE_USM_DESC = 7, ///< ::ur_usm_desc_t
235-
UR_STRUCTURE_TYPE_USM_HOST_DESC = 8, ///< ::ur_usm_host_desc_t
236-
UR_STRUCTURE_TYPE_USM_DEVICE_DESC = 9, ///< ::ur_usm_device_desc_t
237-
UR_STRUCTURE_TYPE_USM_POOL_DESC = 10, ///< ::ur_usm_pool_desc_t
238-
UR_STRUCTURE_TYPE_USM_POOL_LIMITS_DESC = 11, ///< ::ur_usm_pool_limits_desc_t
239-
UR_STRUCTURE_TYPE_DEVICE_BINARY = 12, ///< ::ur_device_binary_t
240-
UR_STRUCTURE_TYPE_SAMPLER_DESC = 13, ///< ::ur_sampler_desc_t
241-
UR_STRUCTURE_TYPE_QUEUE_PROPERTIES = 14, ///< ::ur_queue_properties_t
242-
UR_STRUCTURE_TYPE_QUEUE_INDEX_PROPERTIES = 15, ///< ::ur_queue_index_properties_t
243-
UR_STRUCTURE_TYPE_CONTEXT_NATIVE_PROPERTIES = 16, ///< ::ur_context_native_properties_t
244-
UR_STRUCTURE_TYPE_KERNEL_NATIVE_PROPERTIES = 17, ///< ::ur_kernel_native_properties_t
245-
UR_STRUCTURE_TYPE_QUEUE_NATIVE_PROPERTIES = 18, ///< ::ur_queue_native_properties_t
246-
UR_STRUCTURE_TYPE_MEM_NATIVE_PROPERTIES = 19, ///< ::ur_mem_native_properties_t
247-
UR_STRUCTURE_TYPE_EVENT_NATIVE_PROPERTIES = 20, ///< ::ur_event_native_properties_t
248-
UR_STRUCTURE_TYPE_PLATFORM_NATIVE_PROPERTIES = 21, ///< ::ur_platform_native_properties_t
249-
UR_STRUCTURE_TYPE_DEVICE_NATIVE_PROPERTIES = 22, ///< ::ur_device_native_properties_t
250-
UR_STRUCTURE_TYPE_PROGRAM_NATIVE_PROPERTIES = 23, ///< ::ur_program_native_properties_t
251-
UR_STRUCTURE_TYPE_SAMPLER_NATIVE_PROPERTIES = 24, ///< ::ur_sampler_native_properties_t
252-
UR_STRUCTURE_TYPE_QUEUE_NATIVE_DESC = 25, ///< ::ur_queue_native_desc_t
253-
UR_STRUCTURE_TYPE_DEVICE_PARTITION_PROPERTIES = 26, ///< ::ur_device_partition_properties_t
254-
UR_STRUCTURE_TYPE_KERNEL_ARG_MEM_OBJ_PROPERTIES = 27, ///< ::ur_kernel_arg_mem_obj_properties_t
255-
UR_STRUCTURE_TYPE_PHYSICAL_MEM_PROPERTIES = 28, ///< ::ur_physical_mem_properties_t
256-
UR_STRUCTURE_TYPE_KERNEL_ARG_POINTER_PROPERTIES = 29, ///< ::ur_kernel_arg_pointer_properties_t
257-
UR_STRUCTURE_TYPE_KERNEL_ARG_SAMPLER_PROPERTIES = 30, ///< ::ur_kernel_arg_sampler_properties_t
258-
UR_STRUCTURE_TYPE_KERNEL_EXEC_INFO_PROPERTIES = 31, ///< ::ur_kernel_exec_info_properties_t
259-
UR_STRUCTURE_TYPE_KERNEL_ARG_VALUE_PROPERTIES = 32, ///< ::ur_kernel_arg_value_properties_t
260-
UR_STRUCTURE_TYPE_KERNEL_ARG_LOCAL_PROPERTIES = 33, ///< ::ur_kernel_arg_local_properties_t
261-
UR_STRUCTURE_TYPE_USM_ALLOC_LOCATION_DESC = 35, ///< ::ur_usm_alloc_location_desc_t
262-
UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC = 0x1000, ///< ::ur_exp_command_buffer_desc_t
263-
UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES = 0x2000, ///< ::ur_exp_sampler_mip_properties_t
264-
UR_STRUCTURE_TYPE_EXP_INTEROP_MEM_DESC = 0x2001, ///< ::ur_exp_interop_mem_desc_t
265-
UR_STRUCTURE_TYPE_EXP_INTEROP_SEMAPHORE_DESC = 0x2002, ///< ::ur_exp_interop_semaphore_desc_t
266-
UR_STRUCTURE_TYPE_EXP_FILE_DESCRIPTOR = 0x2003, ///< ::ur_exp_file_descriptor_t
267-
UR_STRUCTURE_TYPE_EXP_WIN32_HANDLE = 0x2004, ///< ::ur_exp_win32_handle_t
268-
UR_STRUCTURE_TYPE_EXP_LAYERED_IMAGE_PROPERTIES = 0x2005, ///< ::ur_exp_layered_image_properties_t
269-
UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES = 0x2006, ///< ::ur_exp_sampler_addr_modes_t
227+
UR_STRUCTURE_TYPE_CONTEXT_PROPERTIES = 0, ///< ::ur_context_properties_t
228+
UR_STRUCTURE_TYPE_IMAGE_DESC = 1, ///< ::ur_image_desc_t
229+
UR_STRUCTURE_TYPE_BUFFER_PROPERTIES = 2, ///< ::ur_buffer_properties_t
230+
UR_STRUCTURE_TYPE_BUFFER_REGION = 3, ///< ::ur_buffer_region_t
231+
UR_STRUCTURE_TYPE_BUFFER_CHANNEL_PROPERTIES = 4, ///< ::ur_buffer_channel_properties_t
232+
UR_STRUCTURE_TYPE_BUFFER_ALLOC_LOCATION_PROPERTIES = 5, ///< ::ur_buffer_alloc_location_properties_t
233+
UR_STRUCTURE_TYPE_PROGRAM_PROPERTIES = 6, ///< ::ur_program_properties_t
234+
UR_STRUCTURE_TYPE_USM_DESC = 7, ///< ::ur_usm_desc_t
235+
UR_STRUCTURE_TYPE_USM_HOST_DESC = 8, ///< ::ur_usm_host_desc_t
236+
UR_STRUCTURE_TYPE_USM_DEVICE_DESC = 9, ///< ::ur_usm_device_desc_t
237+
UR_STRUCTURE_TYPE_USM_POOL_DESC = 10, ///< ::ur_usm_pool_desc_t
238+
UR_STRUCTURE_TYPE_USM_POOL_LIMITS_DESC = 11, ///< ::ur_usm_pool_limits_desc_t
239+
UR_STRUCTURE_TYPE_DEVICE_BINARY = 12, ///< ::ur_device_binary_t
240+
UR_STRUCTURE_TYPE_SAMPLER_DESC = 13, ///< ::ur_sampler_desc_t
241+
UR_STRUCTURE_TYPE_QUEUE_PROPERTIES = 14, ///< ::ur_queue_properties_t
242+
UR_STRUCTURE_TYPE_QUEUE_INDEX_PROPERTIES = 15, ///< ::ur_queue_index_properties_t
243+
UR_STRUCTURE_TYPE_CONTEXT_NATIVE_PROPERTIES = 16, ///< ::ur_context_native_properties_t
244+
UR_STRUCTURE_TYPE_KERNEL_NATIVE_PROPERTIES = 17, ///< ::ur_kernel_native_properties_t
245+
UR_STRUCTURE_TYPE_QUEUE_NATIVE_PROPERTIES = 18, ///< ::ur_queue_native_properties_t
246+
UR_STRUCTURE_TYPE_MEM_NATIVE_PROPERTIES = 19, ///< ::ur_mem_native_properties_t
247+
UR_STRUCTURE_TYPE_EVENT_NATIVE_PROPERTIES = 20, ///< ::ur_event_native_properties_t
248+
UR_STRUCTURE_TYPE_PLATFORM_NATIVE_PROPERTIES = 21, ///< ::ur_platform_native_properties_t
249+
UR_STRUCTURE_TYPE_DEVICE_NATIVE_PROPERTIES = 22, ///< ::ur_device_native_properties_t
250+
UR_STRUCTURE_TYPE_PROGRAM_NATIVE_PROPERTIES = 23, ///< ::ur_program_native_properties_t
251+
UR_STRUCTURE_TYPE_SAMPLER_NATIVE_PROPERTIES = 24, ///< ::ur_sampler_native_properties_t
252+
UR_STRUCTURE_TYPE_QUEUE_NATIVE_DESC = 25, ///< ::ur_queue_native_desc_t
253+
UR_STRUCTURE_TYPE_DEVICE_PARTITION_PROPERTIES = 26, ///< ::ur_device_partition_properties_t
254+
UR_STRUCTURE_TYPE_KERNEL_ARG_MEM_OBJ_PROPERTIES = 27, ///< ::ur_kernel_arg_mem_obj_properties_t
255+
UR_STRUCTURE_TYPE_PHYSICAL_MEM_PROPERTIES = 28, ///< ::ur_physical_mem_properties_t
256+
UR_STRUCTURE_TYPE_KERNEL_ARG_POINTER_PROPERTIES = 29, ///< ::ur_kernel_arg_pointer_properties_t
257+
UR_STRUCTURE_TYPE_KERNEL_ARG_SAMPLER_PROPERTIES = 30, ///< ::ur_kernel_arg_sampler_properties_t
258+
UR_STRUCTURE_TYPE_KERNEL_EXEC_INFO_PROPERTIES = 31, ///< ::ur_kernel_exec_info_properties_t
259+
UR_STRUCTURE_TYPE_KERNEL_ARG_VALUE_PROPERTIES = 32, ///< ::ur_kernel_arg_value_properties_t
260+
UR_STRUCTURE_TYPE_KERNEL_ARG_LOCAL_PROPERTIES = 33, ///< ::ur_kernel_arg_local_properties_t
261+
UR_STRUCTURE_TYPE_USM_ALLOC_LOCATION_DESC = 35, ///< ::ur_usm_alloc_location_desc_t
262+
UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC = 0x1000, ///< ::ur_exp_command_buffer_desc_t
263+
UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES = 0x2000, ///< ::ur_exp_sampler_mip_properties_t
264+
UR_STRUCTURE_TYPE_EXP_INTEROP_MEM_DESC = 0x2001, ///< ::ur_exp_interop_mem_desc_t
265+
UR_STRUCTURE_TYPE_EXP_INTEROP_SEMAPHORE_DESC = 0x2002, ///< ::ur_exp_interop_semaphore_desc_t
266+
UR_STRUCTURE_TYPE_EXP_FILE_DESCRIPTOR = 0x2003, ///< ::ur_exp_file_descriptor_t
267+
UR_STRUCTURE_TYPE_EXP_WIN32_HANDLE = 0x2004, ///< ::ur_exp_win32_handle_t
268+
UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES = 0x2005, ///< ::ur_exp_sampler_addr_modes_t
270269
/// @cond
271270
UR_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff
272271
/// @endcond
@@ -7152,21 +7151,6 @@ typedef struct ur_exp_interop_semaphore_desc_t {
71527151

71537152
} ur_exp_interop_semaphore_desc_t;
71547153

7155-
///////////////////////////////////////////////////////////////////////////////
7156-
/// @brief Describes layered image properties
7157-
///
7158-
/// @details
7159-
/// - Specify these properties in ::urBindlessImagesUnsampledImageCreateExp
7160-
/// or ::urBindlessImagesSampledImageCreateExp via ::ur_image_desc_t as
7161-
/// part of a `pNext` chain.
7162-
typedef struct ur_exp_layered_image_properties_t {
7163-
ur_structure_type_t stype; ///< [in] type of this structure, must be
7164-
///< ::UR_STRUCTURE_TYPE_EXP_LAYERED_IMAGE_PROPERTIES
7165-
void *pNext; ///< [in,out][optional] pointer to extension-specific structure
7166-
uint32_t numLayers; ///< [in] number of layers the image should have
7167-
7168-
} ur_exp_layered_image_properties_t;
7169-
71707154
///////////////////////////////////////////////////////////////////////////////
71717155
/// @brief USM allocate pitched memory
71727156
///

include/ur_print.hpp

-34
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct
318318
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_sampler_addr_modes_t params);
319319
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_interop_mem_desc_t params);
320320
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_interop_semaphore_desc_t params);
321-
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_layered_image_properties_t params);
322321
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_command_buffer_desc_t params);
323322
inline std::ostream &operator<<(std::ostream &os, ur_exp_peer_info_t value);
324323

@@ -1015,9 +1014,6 @@ inline std::ostream &operator<<(std::ostream &os, ur_structure_type_t value) {
10151014
case UR_STRUCTURE_TYPE_EXP_WIN32_HANDLE:
10161015
os << "UR_STRUCTURE_TYPE_EXP_WIN32_HANDLE";
10171016
break;
1018-
case UR_STRUCTURE_TYPE_EXP_LAYERED_IMAGE_PROPERTIES:
1019-
os << "UR_STRUCTURE_TYPE_EXP_LAYERED_IMAGE_PROPERTIES";
1020-
break;
10211017
case UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES:
10221018
os << "UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES";
10231019
break;
@@ -1243,11 +1239,6 @@ inline ur_result_t printStruct(std::ostream &os, const void *ptr) {
12431239
printPtr(os, pstruct);
12441240
} break;
12451241

1246-
case UR_STRUCTURE_TYPE_EXP_LAYERED_IMAGE_PROPERTIES: {
1247-
const ur_exp_layered_image_properties_t *pstruct = (const ur_exp_layered_image_properties_t *)ptr;
1248-
printPtr(os, pstruct);
1249-
} break;
1250-
12511242
case UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES: {
12521243
const ur_exp_sampler_addr_modes_t *pstruct = (const ur_exp_sampler_addr_modes_t *)ptr;
12531244
printPtr(os, pstruct);
@@ -9130,31 +9121,6 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_interop_se
91309121
return os;
91319122
}
91329123
///////////////////////////////////////////////////////////////////////////////
9133-
/// @brief Print operator for the ur_exp_layered_image_properties_t type
9134-
/// @returns
9135-
/// std::ostream &
9136-
inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_layered_image_properties_t params) {
9137-
os << "(struct ur_exp_layered_image_properties_t){";
9138-
9139-
os << ".stype = ";
9140-
9141-
os << (params.stype);
9142-
9143-
os << ", ";
9144-
os << ".pNext = ";
9145-
9146-
ur::details::printStruct(os,
9147-
(params.pNext));
9148-
9149-
os << ", ";
9150-
os << ".numLayers = ";
9151-
9152-
os << (params.numLayers);
9153-
9154-
os << "}";
9155-
return os;
9156-
}
9157-
///////////////////////////////////////////////////////////////////////////////
91589124
/// @brief Print operator for the ur_exp_command_buffer_desc_t type
91599125
/// @returns
91609126
/// std::ostream &

scripts/core/EXP-BINDLESS-IMAGES.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ Enums
6868
${X}_STRUCTURE_TYPE_EXP_INTEROP_SEMAPHORE_DESC
6969
${X}_STRUCTURE_TYPE_EXP_FILE_DESCRIPTOR
7070
${X}_STRUCTURE_TYPE_EXP_WIN32_HANDLE
71-
${X}_STRUCTURE_TYPE_EXP_LAYERED_IMAGE_PROPERTIES
7271
${X}_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES
7372

7473
* ${x}_device_info_t
@@ -129,7 +128,6 @@ Types
129128
* ${x}_exp_interop_semaphore_desc_t
130129
* ${x}_exp_file_descriptor_t
131130
* ${x}_exp_win32_handle_t
132-
* ${x}_exp_layered_image_properties_t
133131
* ${x}_exp_sampler_addr_modes_t
134132

135133
Functions
@@ -184,6 +182,8 @@ Changelog
184182
+----------+-------------------------------------------------------------+
185183
| 8.0 | Added structure for sampler addressing modes per dimension. |
186184
+------------------------------------------------------------------------+
185+
| 9.0 | Remove layered image properties struct. |
186+
+------------------------------------------------------------------------+
187187

188188
Contributors
189189
--------------------------------------------------------------------------------

scripts/core/exp-bindless-images.yml

+1-18
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,9 @@ etors:
107107
- name: EXP_WIN32_HANDLE
108108
desc: $x_exp_win32_handle_t
109109
value: "0x2004"
110-
- name: EXP_LAYERED_IMAGE_PROPERTIES
111-
desc: $x_exp_layered_image_properties_t
112-
value: "0x2005"
113110
- name: EXP_SAMPLER_ADDR_MODES
114111
desc: $x_exp_sampler_addr_modes_t
115-
value: "0x2006"
112+
value: "0x2005"
116113
--- #--------------------------------------------------------------------------
117114
type: enum
118115
extend: true
@@ -205,20 +202,6 @@ name: $x_exp_interop_semaphore_desc_t
205202
base: $x_base_desc_t
206203
members: []
207204
--- #--------------------------------------------------------------------------
208-
type: struct
209-
desc: "Describes layered image properties"
210-
details:
211-
- Specify these properties in $xBindlessImagesUnsampledImageCreateExp or
212-
$xBindlessImagesSampledImageCreateExp via $x_image_desc_t as part of a
213-
`pNext` chain.
214-
class: $xBindlessImages
215-
name: $x_exp_layered_image_properties_t
216-
base: $x_base_properties_t
217-
members:
218-
- type: uint32_t
219-
name: numLayers
220-
desc: "[in] number of layers the image should have"
221-
--- #--------------------------------------------------------------------------
222205
type: function
223206
desc: "USM allocate pitched memory"
224207
class: $xUSM

0 commit comments

Comments
 (0)