Fix T76925: more Cycles OpenCL compile errors with some drivers on Linux

This commit is contained in:
Brecht Van Lommel 2020-05-25 16:48:11 +02:00
parent f53ae843b3
commit 9f1f7ba2bb
Notes: blender-bot 2023-02-14 12:01:57 +01:00
Referenced by issue #76925, Wrong member access operator is used in Cycles
4 changed files with 9 additions and 9 deletions

View File

@ -185,19 +185,19 @@ ccl_device bool kernel_do_adaptive_filter_x(KernelGlobals *kg, int y, ccl_global
ccl_global float *buffer = tile->buffer + index * kernel_data.film.pass_stride;
ccl_global float4 *aux = (ccl_global float4 *)(buffer +
kernel_data.film.pass_adaptive_aux_buffer);
if (aux->w == 0.0f) {
if ((*aux).w == 0.0f) {
any = true;
if (x > tile->x && !prev) {
index = index - 1;
buffer = tile->buffer + index * kernel_data.film.pass_stride;
aux = (ccl_global float4 *)(buffer + kernel_data.film.pass_adaptive_aux_buffer);
aux->w = 0.0f;
(*aux).w = 0.0f;
}
prev = true;
}
else {
if (prev) {
aux->w = 0.0f;
(*aux).w = 0.0f;
}
prev = false;
}
@ -214,19 +214,19 @@ ccl_device bool kernel_do_adaptive_filter_y(KernelGlobals *kg, int x, ccl_global
ccl_global float *buffer = tile->buffer + index * kernel_data.film.pass_stride;
ccl_global float4 *aux = (ccl_global float4 *)(buffer +
kernel_data.film.pass_adaptive_aux_buffer);
if (aux->w == 0.0f) {
if ((*aux).w == 0.0f) {
any = true;
if (y > tile->y && !prev) {
index = index - tile->stride;
buffer = tile->buffer + index * kernel_data.film.pass_stride;
aux = (ccl_global float4 *)(buffer + kernel_data.film.pass_adaptive_aux_buffer);
aux->w = 0.0f;
(*aux).w = 0.0f;
}
prev = true;
}
else {
if (prev) {
aux->w = 0.0f;
(*aux).w = 0.0f;
}
prev = false;
}

View File

@ -662,7 +662,7 @@ ccl_device void kernel_path_trace(
if (kernel_data.film.pass_adaptive_aux_buffer) {
ccl_global float4 *aux = (ccl_global float4 *)(buffer +
kernel_data.film.pass_adaptive_aux_buffer);
if (aux->w > 0.0f) {
if ((*aux).w > 0.0f) {
return;
}
}

View File

@ -526,7 +526,7 @@ ccl_device void kernel_branched_path_trace(
if (kernel_data.film.pass_adaptive_aux_buffer) {
ccl_global float4 *aux = (ccl_global float4 *)(buffer +
kernel_data.film.pass_adaptive_aux_buffer);
if (aux->w > 0.0f) {
if ((*aux).w > 0.0f) {
return;
}
}

View File

@ -99,7 +99,7 @@ ccl_device bool get_next_work(KernelGlobals *kg,
ccl_global float *buffer = kernel_split_params.tile.buffer + buffer_offset;
ccl_global float4 *aux = (ccl_global float4 *)(buffer +
kernel_data.film.pass_adaptive_aux_buffer);
if (aux->w == 0.0f) {
if ((*aux).w == 0.0f) {
break;
}
}