bubu

no __global __read_only image2d_t?

Discussion created by bubu on Jun 1, 2010
Latest reply on Jun 2, 2010 by 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;

}

 

???

Outcomes