Fix T78930: Cycles OpenCL error on graphics cards that don't support half float

This commit is contained in:
Brecht Van Lommel 2020-07-15 13:37:13 +02:00
parent 44bb73e765
commit 87f8949f0e
Notes: blender-bot 2023-02-13 21:47:25 +01:00
Referenced by issue #78930, Cycles: Invalid usage of cl_khr_fp16 macro
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ ccl_device_inline float4 svm_image_texture_read(KernelGlobals *kg,
return make_float4(f, f, f, 1.0f);
}
/* Byte */
#ifdef cl_khr_fp16
#ifdef __KERNEL_CL_KHR_FP16__
/* half and half4 are optional in OpenCL */
else if (texture_type == IMAGE_DATA_TYPE_HALF) {
float f = tex_fetch(half, info, offset);