1 Reply Latest reply on Apr 9, 2012 6:00 PM by notzed

    Accessing single channel, int8 images?

    clamport

      I am trying to figure out how to access images that are of format CL_R and channel_type cl_uint8. As far as I can tell, the smallest read is read_imageh, does the read value get put in the low order bits of X?

       

      Thanks,

      Chris

        • Re: Accessing single channel, int8 images?
          notzed

          section 6.11.13.2 of the opencl (1.1) specification (page 245) states that cl_uint8 must be read with read_imageui().  It reads a full zero-extended 32-bit integer value.

           

          If it's real image data you're using, you probably want unorm_int8 and read/write_imagef as working with floats is a lot faster/simpler.