Fix T76925: Cycles OpenCL compile error with some drivers on Linux

This commit is contained in:
Brecht Van Lommel 2020-05-22 19:02:49 +02:00
parent 98689f51c0
commit f27e122d95
Notes: blender-bot 2023-02-14 09:38:57 +01:00
Referenced by issue #76925, Wrong member access operator is used in Cycles
1 changed files with 4 additions and 4 deletions

View 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) {