Skip to content

Commit 34e58fe

Browse files
authored
add additional clarification for num_mip_levels (#1272)
1 parent 6b3fc1d commit 34e58fe

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

api/footnotes.asciidoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ This feature is provided for identifying memory leaks. \
120120
Implementations are encouraged to favor this option as it makes it more likely that errors will be managed by applications. \
121121
]
122122

123+
:fn-single-mipmap-level: pass:n[ \
124+
Therefore, specifying _num_mip_levels_ equal to either `0` or `1` creates an image with a single mipmap level. \
125+
]
126+
127+
123128
:fn-srgb-image-requirements: pass:n[ \
124129
Support for reading from the {CL_sRGBA} image channel order is optional for 1D image buffers. \
125130
Support for writing to the {CL_sRGBA} image channel order is optional for all image types. \

api/opencl_runtime_layer.asciidoc

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2665,14 +2665,17 @@ endif::cl_khr_external_memory[]
26652665
_image_height_ for a 2D image array or a 3D image, must be {geq} the
26662666
image row pitch for a 1D image array, and must be a multiple of the
26672667
image row pitch.
2668-
* _num_mip_levels_ must be
2669-
ifndef::cl_khr_mipmap_image[0.]
2668+
* _num_mip_levels_ must be `0`, indicating that the image has a single
2669+
ifndef::cl_khr_mipmap_image[]
2670+
mipmap level.
2671+
endif::cl_khr_mipmap_image[]
26702672
ifdef::cl_khr_mipmap_image[]
2671-
0 unless the {cl_khr_mipmap_image_EXT} extension is supported, in which
2672-
case it may be a nonzero value specifying the number of mipmap
2673-
levels in the image.
2673+
mipmap level, unless the {cl_khr_mipmap_image_EXT} extension is supported.
2674+
When the {cl_khr_mipmap_image_EXT} extension is supported, _num_mip_levels_
2675+
may additionally specify the total number of mipmap levels in the image,
2676+
including the base level footnote:[{fn-single-mipmap-level}].
26742677
endif::cl_khr_mipmap_image[]
2675-
* _num_samples_ must be 0.
2678+
* _num_samples_ must be `0`.
26762679
* _mem_object_ may refer to a valid buffer or image memory object.
26772680
`mem_object` can be a buffer memory object if `image_type` is
26782681
{CL_MEM_OBJECT_IMAGE1D_BUFFER} or

0 commit comments

Comments
 (0)