4 Replies Latest reply on Jun 2, 2010 5:21 PM by bubu

    no __global __read_only image2d_t?

    bubu

      Can I only pass images as function parameters?

      Can't I do this?

       

      __global __read_only image2d_t myImg;

      __constant sampler_t mySampler = CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_CLAMP_TO_EDGE | CLK_FILTER_NEAREST;

      float4 myFunc ()

      {

          int2 uv = ....;

          return read_imagef ( myImg, mySampler, uv ) + 0.1f;

      }

       

      ???