Class IMGGenerateMipmap

java.lang.Object
org.lwjgl.opencl.IMGGenerateMipmap

public class IMGGenerateMipmap extends Object
Native bindings to the img_generate_mipmap extension.

This extension adds the functionality to generate mipmap images from a source image and thus avoid having to generate and import mipmapped images from the host or through the cl_khr_gl_sharing extension.

Requires khr_mipmap_image.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    New command types cl_command_type.
    static final int
    Values accepted with cl_mipmap_filter_mode_img.
    static final int
    Values accepted with cl_mipmap_filter_mode_img.
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    clEnqueueGenerateMipmapIMG(long command_queue, long src_image, long dst_image, int mipmap_filter_mode, @Nullable org.lwjgl.PointerBuffer array_region, @Nullable org.lwjgl.PointerBuffer mip_region, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event)
    Generates mipmap levels from a source image to a destination image.
    static int
    nclEnqueueGenerateMipmapIMG(long command_queue, long src_image, long dst_image, int mipmap_filter_mode, long array_region, long mip_region, int num_events_in_wait_list, long event_wait_list, long event)
    Unsafe version of: EnqueueGenerateMipmapIMG

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • CL_MIPMAP_FILTER_ANY_IMG

      public static final int CL_MIPMAP_FILTER_ANY_IMG
      Values accepted with cl_mipmap_filter_mode_img.
      See Also:
    • CL_MIPMAP_FILTER_BOX_IMG

      public static final int CL_MIPMAP_FILTER_BOX_IMG
      Values accepted with cl_mipmap_filter_mode_img.
      See Also:
    • CL_COMMAND_GENERATE_MIPMAP_IMG

      public static final int CL_COMMAND_GENERATE_MIPMAP_IMG
      New command types cl_command_type.
      See Also:
  • Method Details

    • nclEnqueueGenerateMipmapIMG

      public static int nclEnqueueGenerateMipmapIMG(long command_queue, long src_image, long dst_image, int mipmap_filter_mode, long array_region, long mip_region, int num_events_in_wait_list, long event_wait_list, long event)
      Unsafe version of: EnqueueGenerateMipmapIMG
      Parameters:
      num_events_in_wait_list - the number of events in event_wait_list
    • clEnqueueGenerateMipmapIMG

      public static int clEnqueueGenerateMipmapIMG(long command_queue, long src_image, long dst_image, int mipmap_filter_mode, @Nullable org.lwjgl.PointerBuffer array_region, @Nullable org.lwjgl.PointerBuffer mip_region, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event)
      Generates mipmap levels from a source image to a destination image.

      This allows for seamless mipmap level generation without involving the host to generate them, as that would involve reading back the image, generate its mipmap levels and then upload it to the device again. This reduces bandwidth cost of generating mipmap levels as no host copy is needed and may improve the speed of generating mipmap levels. The source image and destination image can be the same image in order to reduce programming and memory overhead. As with the extension for mipmaps, the size of the image must be a power of 2.

      Parameters:
      command_queue - a valid command-queue
      src_image - a valid 1D, 2D, 3D image or a 1D image array, 2D image array object
      dst_image - a valid 1D, 2D, 3D image or a 1D image array, 2D image array object
      mipmap_filter_mode - the filter mode to generate the mipmap levels with
      array_region - the (n,m) image range in a 1D and 2D image array to generate
      mip_region - the (n,m) region of mipmap levels to generate in dst_image
      event_wait_list - a list of events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same.
      event - Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array.