Add constraints to texture fetch functions
Add constraints to texture fetch functions

When sampling a pixel the hw always returns a float4. The type in the texture reference controls the bitcast that we perform before returning the sampled pixel. Creating a texture with an unsupported will lead to potential UB.

This change makes it so that it's only possible to use textures with a type that makes sense. Using something like texture<int, hipTextureType1D, hipReadModeNormalizedFloat> will now lead to a compilation error with a message "Invalid channel type!".

Change-Id: I7fde44cb1d4b9737e0c48c28cb59c018c59ccaa2

ROCm-Developer-Tools/HIP,ROCm-Developer-Tools/HIP,ROCm-Developer-Tools/HIP,ROCm-Developer-Tools/HIP,ROCm-Developer-Tools/HIP