Blender  V2.93
kernel_adaptive_stopping.h
Go to the documentation of this file.
1 /*
2  * Copyright 2019 Blender Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
18 
20 {
21  int pixel_index = ccl_global_id(1) * ccl_global_size(0) + ccl_global_id(0);
22  if (pixel_index < kernel_split_params.tile.w * kernel_split_params.tile.h &&
23  kernel_split_params.tile.start_sample + kernel_split_params.tile.num_samples >=
24  kernel_data.integrator.adaptive_min_samples) {
25  int x = kernel_split_params.tile.x + pixel_index % kernel_split_params.tile.w;
26  int y = kernel_split_params.tile.y + pixel_index / kernel_split_params.tile.w;
27  int buffer_offset = (kernel_split_params.tile.offset + x +
28  y * kernel_split_params.tile.stride) *
29  kernel_data.film.pass_stride;
30  ccl_global float *buffer = kernel_split_params.tile.buffer + buffer_offset;
32  buffer,
33  kernel_split_params.tile.start_sample +
34  kernel_split_params.tile.num_samples - 1);
35  }
36 }
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
CCL_NAMESPACE_BEGIN ccl_device void kernel_do_adaptive_stopping(KernelGlobals *kg, ccl_global float *buffer, int sample)
CCL_NAMESPACE_BEGIN ccl_device void kernel_adaptive_stopping(KernelGlobals *kg)
#define kernel_data
#define ccl_global_id(d)
#define ccl_global_size(d)
#define ccl_device
#define ccl_global
#define CCL_NAMESPACE_END
#define kernel_split_params
__kernel void ccl_constant KernelData ccl_global void ccl_global char ccl_global int ccl_global char ccl_global unsigned int ccl_global float * buffer