Fix Cycles ASAN error with boolean kernel arguments
This commit is contained in:
@@ -60,7 +60,7 @@ class CPUKernels {
|
||||
int x,
|
||||
int y,
|
||||
float threshold,
|
||||
bool reset,
|
||||
int reset,
|
||||
int offset,
|
||||
int stride)>;
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ struct DeviceKernelArguments {
|
||||
POINTER,
|
||||
INT32,
|
||||
FLOAT32,
|
||||
BOOLEAN,
|
||||
KERNEL_FILM_CONVERT,
|
||||
};
|
||||
|
||||
@@ -66,10 +65,6 @@ struct DeviceKernelArguments {
|
||||
{
|
||||
add(FLOAT32, value, sizeof(float));
|
||||
}
|
||||
void add(const bool *value)
|
||||
{
|
||||
add(BOOLEAN, value, 4);
|
||||
}
|
||||
void add(const Type type, const void *value, size_t size)
|
||||
{
|
||||
assert(count < MAX_ARGS);
|
||||
|
||||
@@ -103,7 +103,7 @@ class DenoiserGPU : public Denoiser {
|
||||
int denoised_offset;
|
||||
|
||||
int num_components;
|
||||
bool use_compositing;
|
||||
int use_compositing;
|
||||
bool use_denoising_albedo;
|
||||
};
|
||||
|
||||
|
||||
@@ -1055,6 +1055,7 @@ int PathTraceWorkGPU::adaptive_sampling_convergence_check_count_active(float thr
|
||||
queue_->zero_to_device(num_active_pixels);
|
||||
|
||||
const int work_size = effective_buffer_params_.width * effective_buffer_params_.height;
|
||||
const int reset_int = reset; /* No bool kernel arguments. */
|
||||
|
||||
DeviceKernelArguments args(&buffers_->buffer.device_pointer,
|
||||
&effective_buffer_params_.full_x,
|
||||
@@ -1062,7 +1063,7 @@ int PathTraceWorkGPU::adaptive_sampling_convergence_check_count_active(float thr
|
||||
&effective_buffer_params_.width,
|
||||
&effective_buffer_params_.height,
|
||||
&threshold,
|
||||
&reset,
|
||||
&reset_int,
|
||||
&effective_buffer_params_.offset,
|
||||
&effective_buffer_params_.stride,
|
||||
&num_active_pixels.device_pointer);
|
||||
|
||||
@@ -101,7 +101,7 @@ bool KERNEL_FUNCTION_FULL_NAME(adaptive_sampling_convergence_check)(
|
||||
int x,
|
||||
int y,
|
||||
float threshold,
|
||||
bool reset,
|
||||
int reset,
|
||||
int offset,
|
||||
int stride);
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ bool KERNEL_FUNCTION_FULL_NAME(adaptive_sampling_convergence_check)(
|
||||
int x,
|
||||
int y,
|
||||
float threshold,
|
||||
bool reset,
|
||||
int reset,
|
||||
int offset,
|
||||
int stride)
|
||||
{
|
||||
|
||||
@@ -668,7 +668,7 @@ ccl_gpu_kernel(GPU_KERNEL_BLOCK_NUM_THREADS, GPU_KERNEL_MAX_REGISTERS)
|
||||
int sw,
|
||||
int sh,
|
||||
float threshold,
|
||||
bool reset,
|
||||
int reset,
|
||||
int offset,
|
||||
int stride,
|
||||
ccl_global uint *num_active_pixels)
|
||||
@@ -1104,7 +1104,7 @@ ccl_gpu_kernel(GPU_KERNEL_BLOCK_NUM_THREADS, GPU_KERNEL_MAX_REGISTERS)
|
||||
int pass_denoised,
|
||||
int pass_sample_count,
|
||||
int num_components,
|
||||
bool use_compositing)
|
||||
int use_compositing)
|
||||
{
|
||||
const int work_index = ccl_gpu_global_id_x();
|
||||
const int y = work_index / width;
|
||||
|
||||
@@ -34,7 +34,7 @@ ccl_device bool film_adaptive_sampling_convergence_check(KernelGlobals kg,
|
||||
int x,
|
||||
int y,
|
||||
float threshold,
|
||||
bool reset,
|
||||
int reset,
|
||||
int offset,
|
||||
int stride)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user