@@ -505,16 +505,19 @@ namespace sycl::ext::oneapi::experimental {
505
505
/// Opaque unsampled image handle type.
506
506
struct unsampled_image_handle {
507
507
using raw_image_handle_type = /* Implementation defined */;
508
- raw_image_handle_type image_handle;
508
+
509
+ unsampled_image_handle(raw_image_handle_type raw_handle);
510
+
511
+ raw_image_handle_type raw_handle;
509
512
};
510
513
511
514
/// Opaque sampled image handle type.
512
515
struct sampled_image_handle {
513
516
using raw_image_handle_type = /* Implementation defined */;
514
- using raw_sampler_handle_type = /* Implementation defined */
515
517
516
- raw_image_handle_type image_handle;
517
- raw_sampler_handle_type sampler_handle;
518
+ sampled_image_handle(raw_image_handle_type raw_image_handle);
519
+
520
+ raw_image_handle_type raw_handle;
518
521
};
519
522
520
523
// Creating an unsampled image from an `image_mem_handle`
@@ -617,6 +620,9 @@ with error code `sycl::errc::runtime`.
617
620
The `unsampled_image_handle` and `sampled_image_handle` types shall be
618
621
default-constructible, copy-constructible, and device-copyable.
619
622
623
+ The `unsampled_image_handle` and `sampled_image_handle` types have a
624
+ constructor to allow creation of the types from a `raw_image_handle_type`
625
+
620
626
[NOTE]
621
627
====
622
628
In the DPC++ CUDA backend a sampled image will correspond to a CUDA texture,
@@ -973,9 +979,7 @@ Inside a kernel, it's possible to read an image via `read_image`, passing
973
979
the image handle. For the form that takes `unsampled_image_handle`, image data
974
980
will be fetched exactly as is in device memory. For the form that takes a
975
981
`sampled_image_handle`, the image will be sampled according to the
976
- `bindless_image_sampler` that was passed to the image upon construction. The
977
- sampler handle is included in the `sampled_image_handle` as
978
- `sampled_image_handle::raw_sampler_handle`.
982
+ `bindless_image_sampler` that was passed to the image upon construction.
979
983
980
984
The returned data will be of templated type `DataT`, which is specified by the
981
985
user, and should map to the type that the image was created with (a combination
@@ -2005,4 +2009,12 @@ These features still need to be handled:
2005
2009
`map_external_image_memory` to avoid CUDA terminology
2006
2010
|4.9|2023-11-13| - Add that the bindless sampler is default constructible
2007
2011
and follows by-value semantics
2012
+ |4.10|2023-11-15| - Added constructors for `sampled_image_handle` and
2013
+ `unsampled_image_handle` structs.
2014
+ - Removed `raw_sampler_handle` member from
2015
+ `sampled_image_handle` struct. Awaiting LevelZero
2016
+ and SPIR-V extensions to mature before before deciding
2017
+ whether a `raw_sampler_handle` member is necessary.
2018
+ - Renamed `image_handle` members in `sampled_image_handle` and
2019
+ `unsampled_image_handle` structs to `raw_handle`.
2008
2020
|======================
0 commit comments