Results 1 to 3 of 3

Thread: Sampler 2D CLK_ADDRESS_REPEAT problem.

  1. #1

    Sampler 2D CLK_ADDRESS_REPEAT problem.

    Hi,
    It seems the CLK_ADDRESS_REPEAT will not work properly :

    Code :
    const sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE | CLK_FILTER_NEAREST | CLK_ADDRESS_REPEAT;

    With these sampler parameters, if I try to read out of the texture original domain, I will always get the edge color.

    The code to read the 2d float texture is :

    Code :
        //  kernel parameter
         __read_only image2d_t in_fTexture
     
        //  Code to read
    	int2 i2Coord;
    	i2Coord.x = get_global_id(0);
    	i2Coord.y = get_global_id(1);
    	float4 v4Pos = read_imagef( in_fTexure, sampler, i2Coord );

    Do you know what I am missing to have the CLK_ADDRESS_REPEAT to work?

    I am working with a GeForce GT 220 card with 285.62 Win 7 x64 drivers.

    Thanks

  2. #2
    Senior Member
    Join Date
    May 2010
    Location
    Toronto, Canada
    Posts
    845

    Re: Sampler 2D CLK_ADDRESS_REPEAT problem.

    From the specification:

    CLK_ADDRESS_REPEAT out-of-range image coordinates are wrapped to the valid range. This addressing mode can only be used with normalized coordinates. If normalized coordinates are not used, this addressing mode may generate image coordinates that are undefined.
    You should probably be seeing a compilation failure. If not, send a bug report to the hardware vendor.
    Disclaimer: Employee of Qualcomm Canada. Any opinions expressed here are personal and do not necessarily reflect the views of my employer. LinkedIn profile.

  3. #3

    Re: Sampler 2D CLK_ADDRESS_REPEAT problem.

    Yeah, I should not use only the quick reference card!

    Thanks.

Similar Threads

  1. Replies: 1
    Last Post: 10-19-2010, 03:34 PM
  2. Replies: 3
    Last Post: 11-22-2009, 03:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •