Fix a few OpenCL compiler warnings.

This commit is contained in:
Brecht Van Lommel 2016-09-03 23:06:12 +02:00 committed by Sergey Sharybin
parent 91705ad477
commit 184c781657
4 changed files with 4 additions and 4 deletions

View File

@ -69,7 +69,7 @@ ccl_device float volume_attribute_float(KernelGlobals *kg, const ShaderData *sd,
# if __CUDA_ARCH__ >= 300
CUtexObject tex = kernel_tex_fetch(__bindless_mapping, desc.offset);
float f = kernel_tex_image_interp_3d_float(tex, P.x, P.y, P.z);
float4 r = make_float4(f, f, f, 1.0);
float4 r = make_float4(f, f, f, 1.0f);
# else
float4 r = volume_image_texture_3d(desc.offset, P.x, P.y, P.z);
# endif

View File

@ -112,7 +112,7 @@ template<typename T> struct texture_image {
ccl_always_inline float4 read(uchar r)
{
float f = r*(1.0f/255.0f);
return make_float4(f, f, f, 1.0);
return make_float4(f, f, f, 1.0f);
}
ccl_always_inline float4 read(float r)

View File

@ -296,7 +296,7 @@ ccl_device float4 svm_image_texture(KernelGlobals *kg, int id, float x, float y,
/* float, byte and half */
else {
float f = kernel_tex_image_interp_float(tex, x, y);
r = make_float4(f, f, f, 1.0);
r = make_float4(f, f, f, 1.0f);
}
# endif
#endif

View File

@ -50,7 +50,7 @@ ccl_device void svm_node_tex_voxel(KernelGlobals *kg,
r = kernel_tex_image_interp_3d_float4(tex, co.x, co.y, co.z);
else {
float f = kernel_tex_image_interp_3d_float(tex, co.x, co.y, co.z);
r = make_float4(f, f, f, 1.0);
r = make_float4(f, f, f, 1.0f);
}
# else /* __CUDA_ARCH__ >= 300 */
r = volume_image_texture_3d(id, co.x, co.y, co.z);