Fix T76925: Cycles OpenCL compile error with some drivers on Linux
authorBrecht Van Lommel <brecht@blender.org>
Fri, 22 May 2020 17:02:49 +0000 (19:02 +0200)
committerBrecht Van Lommel <brecht@blender.org>
Fri, 22 May 2020 19:50:24 +0000 (21:50 +0200)
intern/cycles/kernel/kernel_film.h

index 3829426f2612f0a325b9412f52c2dad56009dc8b..8344f4b4f47146156e86df3740afed97ffcd7f77 100644 (file)
@@ -28,13 +28,13 @@ ccl_device float4 film_get_pass_result(KernelGlobals *kg,
   int display_pass_components = kernel_data.film.display_pass_components;
 
   if (display_pass_components == 4) {
-    ccl_global float4 *in = (ccl_global float4 *)(buffer + display_pass_stride +
-                                                  index * kernel_data.film.pass_stride);
+    float4 in = *(ccl_global float4 *)(buffer + display_pass_stride +
+                                       index * kernel_data.film.pass_stride);
     float alpha = use_display_sample_scale ?
-                      (kernel_data.film.use_display_pass_alpha ? in->w : 1.0f / sample_scale) :
+                      (kernel_data.film.use_display_pass_alpha ? in.w : 1.0f / sample_scale) :
                       1.0f;
 
-    pass_result = make_float4(in->x, in->y, in->z, alpha);
+    pass_result = make_float4(in.x, in.y, in.z, alpha);
 
     int display_divide_pass_stride = kernel_data.film.display_divide_pass_stride;
     if (display_divide_pass_stride != -1) {