OpenCL Kernel Builder : Texture access warning when from usage of sampler.

OpenCL Kernel Builder : Texture access warning when from usage of sampler.

This is just an idea but it would be good to have a warning when :

- a sampler is defined in the kernel

- the read_image used is not valid with that sampler

Obviously there are cases where this depends on the texture format unfortunately so this cannot be checked at compile time.

But having that checked in the Analyze part and an error reported would be great.

Having kernel running but undefined behavior on the read_image is definitively something that no developer wants to see.

So any help to catch these is welcome.

Laurent.

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.