Skip to content

Commit

Permalink
add additional clarification for num_mip_levels (#1272)
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbaug authored Oct 22, 2024
1 parent 6b3fc1d commit 34e58fe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
5 changes: 5 additions & 0 deletions api/footnotes.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ This feature is provided for identifying memory leaks. \
Implementations are encouraged to favor this option as it makes it more likely that errors will be managed by applications. \
]

:fn-single-mipmap-level: pass:n[ \
Therefore, specifying _num_mip_levels_ equal to either `0` or `1` creates an image with a single mipmap level. \
]


:fn-srgb-image-requirements: pass:n[ \
Support for reading from the {CL_sRGBA} image channel order is optional for 1D image buffers. \
Support for writing to the {CL_sRGBA} image channel order is optional for all image types. \
Expand Down
15 changes: 9 additions & 6 deletions api/opencl_runtime_layer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2665,14 +2665,17 @@ endif::cl_khr_external_memory[]
_image_height_ for a 2D image array or a 3D image, must be {geq} the
image row pitch for a 1D image array, and must be a multiple of the
image row pitch.
* _num_mip_levels_ must be
ifndef::cl_khr_mipmap_image[0.]
* _num_mip_levels_ must be `0`, indicating that the image has a single
ifndef::cl_khr_mipmap_image[]
mipmap level.
endif::cl_khr_mipmap_image[]
ifdef::cl_khr_mipmap_image[]
0 unless the {cl_khr_mipmap_image_EXT} extension is supported, in which
case it may be a nonzero value specifying the number of mipmap
levels in the image.
mipmap level, unless the {cl_khr_mipmap_image_EXT} extension is supported.
When the {cl_khr_mipmap_image_EXT} extension is supported, _num_mip_levels_
may additionally specify the total number of mipmap levels in the image,
including the base level footnote:[{fn-single-mipmap-level}].
endif::cl_khr_mipmap_image[]
* _num_samples_ must be 0.
* _num_samples_ must be `0`.
* _mem_object_ may refer to a valid buffer or image memory object.
`mem_object` can be a buffer memory object if `image_type` is
{CL_MEM_OBJECT_IMAGE1D_BUFFER} or
Expand Down

0 comments on commit 34e58fe

Please sign in to comment.