Incorrect image reading with CLK_FILTER_LINEAR|CLK_NORMALIZED_COORDS_FALSE sampler

Incorrect image reading with CLK_FILTER_LINEAR|CLK_NORMALIZED_COORDS_FALSE sampler

The simple test (see attached source):

- create 3*1 image from byte array (image format is {CL_INTENSITY,CL_UNORM_INT8})

- assign 0 to 1st pixel, 10 to 2nd and 20 to 3rd one

- read 30 samples in the row (from 0.0f to 2.9f) with linear interpolation from the image with 0.1 step and round the result

Expected output is like this: 

"0 0 0 0 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 20 20 20 20" and it works as expected with AMD graphics card.

There're some simplifications in case of CPU device and AMD APP SDK:

"0 0 0 0 0 0 1 1 3 3 5 6 7 7 9 10 11 12 12 14 15 15 17 17 19 20 20 20 20 20"

and with NVidia cards:

"0 0 0 0 0 0 1 1 3 3 5 6 6 8 8 10 11 11 13 13 15 16 16 18 18 20 20 20 20 20"

but on HD4000 interpolation just not working at all:

"0 0 0 0 0 0 0 0 0 0 5 5 5 5 5 5 5 5 5 5 15 15 15 15 15 15 15 15 15 15"

Tested with both 2761 driver and 2013 beta SDK. 

AnexoTamanho
Download inteltst.cpp4.71 KB
4 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

Thanks for the test code. I am investigating and will let you know of my findings.

Raghu

After further investigation, it appears the behavior you are seeing is correct. According to the spec "For all other sampler combinations of normalized or unnormalized coordinates, filter and addressing modes, the relative error or precision of the addressing mode calculations and the
image filter operation are not defined by this revision of the OpenCL specification." Please look at section 8.2 - the NOTE at the end of that section mentions how developers can ensure minimum precision across OpenCL devices.

The result you get with OpenCL is consistent with what you would get using other APIs on Intel platforms.

Thanks,
Raghu

Hi Konstantin,

I heard for the runtime team that this was indeed a bug in our implementation and will be fixed in the next release. Please monitor for the forum for the release anouncement.

Thanks,

Raghu

Deixar um comentário

Faça login para adicionar um comentário. Não é membro? Inscreva-se hoje mesmo!