Cycles:
* Code cleanup, remove unused "resolution" variable from the DeviceTask class, was never used.
This commit is contained in:
@@ -246,13 +246,13 @@ public:
|
||||
for(int y = task.y; y < task.y + task.h; y++)
|
||||
for(int x = task.x; x < task.x + task.w; x++)
|
||||
kernel_cpu_sse3_tonemap(&kernel_globals, (uchar4*)task.rgba, (float*)task.buffer,
|
||||
task.sample, task.resolution, x, y, task.offset, task.stride);
|
||||
task.sample, x, y, task.offset, task.stride);
|
||||
}
|
||||
else if(system_cpu_support_sse2()) {
|
||||
for(int y = task.y; y < task.y + task.h; y++)
|
||||
for(int x = task.x; x < task.x + task.w; x++)
|
||||
kernel_cpu_sse2_tonemap(&kernel_globals, (uchar4*)task.rgba, (float*)task.buffer,
|
||||
task.sample, task.resolution, x, y, task.offset, task.stride);
|
||||
task.sample, x, y, task.offset, task.stride);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
@@ -260,7 +260,7 @@ public:
|
||||
for(int y = task.y; y < task.y + task.h; y++)
|
||||
for(int x = task.x; x < task.x + task.w; x++)
|
||||
kernel_cpu_tonemap(&kernel_globals, (uchar4*)task.rgba, (float*)task.buffer,
|
||||
task.sample, task.resolution, x, y, task.offset, task.stride);
|
||||
task.sample, x, y, task.offset, task.stride);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -611,9 +611,6 @@ public:
|
||||
cuda_assert(cuParamSeti(cuFilmConvert, offset, task.sample))
|
||||
offset += sizeof(task.sample);
|
||||
|
||||
cuda_assert(cuParamSeti(cuFilmConvert, offset, task.resolution))
|
||||
offset += sizeof(task.resolution);
|
||||
|
||||
cuda_assert(cuParamSeti(cuFilmConvert, offset, task.x))
|
||||
offset += sizeof(task.x);
|
||||
|
||||
|
@@ -97,7 +97,7 @@ public:
|
||||
|
||||
archive & type & task.x & task.y & task.w & task.h;
|
||||
archive & task.rgba & task.buffer & task.sample & task.num_samples;
|
||||
archive & task.resolution & task.offset & task.stride;
|
||||
archive & task.offset & task.stride;
|
||||
archive & task.shader_input & task.shader_output & task.shader_eval_type;
|
||||
archive & task.shader_x & task.shader_w;
|
||||
}
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
{
|
||||
archive & tile.x & tile.y & tile.w & tile.h;
|
||||
archive & tile.start_sample & tile.num_samples & tile.sample;
|
||||
archive & tile.resolution & tile.offset & tile.stride;
|
||||
archive & tile.offset & tile.stride;
|
||||
archive & tile.buffer & tile.rng_state & tile.rgba;
|
||||
}
|
||||
|
||||
|
@@ -651,7 +651,6 @@ public:
|
||||
cl_int d_w = task.w;
|
||||
cl_int d_h = task.h;
|
||||
cl_int d_sample = task.sample;
|
||||
cl_int d_resolution = task.resolution;
|
||||
cl_int d_offset = task.offset;
|
||||
cl_int d_stride = task.stride;
|
||||
|
||||
@@ -668,7 +667,6 @@ public:
|
||||
#include "kernel_textures.h"
|
||||
|
||||
ciErr |= clSetKernelArg(ckFilmConvertKernel, narg++, sizeof(d_sample), (void*)&d_sample);
|
||||
ciErr |= clSetKernelArg(ckFilmConvertKernel, narg++, sizeof(d_resolution), (void*)&d_resolution);
|
||||
ciErr |= clSetKernelArg(ckFilmConvertKernel, narg++, sizeof(d_x), (void*)&d_x);
|
||||
ciErr |= clSetKernelArg(ckFilmConvertKernel, narg++, sizeof(d_y), (void*)&d_y);
|
||||
ciErr |= clSetKernelArg(ckFilmConvertKernel, narg++, sizeof(d_w), (void*)&d_w);
|
||||
|
@@ -30,7 +30,7 @@ CCL_NAMESPACE_BEGIN
|
||||
|
||||
DeviceTask::DeviceTask(Type type_)
|
||||
: type(type_), x(0), y(0), w(0), h(0), rgba(0), buffer(0),
|
||||
sample(0), num_samples(1), resolution(0),
|
||||
sample(0), num_samples(1),
|
||||
shader_input(0), shader_output(0),
|
||||
shader_eval_type(0), shader_x(0), shader_w(0)
|
||||
{
|
||||
|
@@ -44,7 +44,6 @@ public:
|
||||
device_ptr buffer;
|
||||
int sample;
|
||||
int num_samples;
|
||||
int resolution;
|
||||
int offset, stride;
|
||||
|
||||
device_ptr shader_input;
|
||||
|
@@ -62,7 +62,7 @@ __kernel void kernel_ocl_tonemap(
|
||||
__global type *name,
|
||||
#include "kernel_textures.h"
|
||||
|
||||
int sample, int resolution,
|
||||
int sample,
|
||||
int sx, int sy, int sw, int sh, int offset, int stride)
|
||||
{
|
||||
KernelGlobals kglobals, *kg = &kglobals;
|
||||
@@ -77,7 +77,7 @@ __kernel void kernel_ocl_tonemap(
|
||||
int y = sy + get_global_id(1);
|
||||
|
||||
if(x < sx + sw && y < sy + sh)
|
||||
kernel_film_tonemap(kg, rgba, buffer, sample, resolution, x, y, offset, stride);
|
||||
kernel_film_tonemap(kg, rgba, buffer, sample, x, y, offset, stride);
|
||||
}
|
||||
|
||||
/*__kernel void kernel_ocl_shader(__global uint4 *input, __global float *output, int type, int sx)
|
||||
|
@@ -95,9 +95,9 @@ void kernel_cpu_path_trace(KernelGlobals *kg, float *buffer, unsigned int *rng_s
|
||||
|
||||
/* Tonemapping */
|
||||
|
||||
void kernel_cpu_tonemap(KernelGlobals *kg, uchar4 *rgba, float *buffer, int sample, int resolution, int x, int y, int offset, int stride)
|
||||
void kernel_cpu_tonemap(KernelGlobals *kg, uchar4 *rgba, float *buffer, int sample, int x, int y, int offset, int stride)
|
||||
{
|
||||
kernel_film_tonemap(kg, rgba, buffer, sample, resolution, x, y, offset, stride);
|
||||
kernel_film_tonemap(kg, rgba, buffer, sample, x, y, offset, stride);
|
||||
}
|
||||
|
||||
/* Shader Evaluation */
|
||||
|
@@ -35,13 +35,13 @@ extern "C" __global__ void kernel_cuda_path_trace(float *buffer, uint *rng_state
|
||||
kernel_path_trace(NULL, buffer, rng_state, sample, x, y, offset, stride);
|
||||
}
|
||||
|
||||
extern "C" __global__ void kernel_cuda_tonemap(uchar4 *rgba, float *buffer, int sample, int resolution, int sx, int sy, int sw, int sh, int offset, int stride)
|
||||
extern "C" __global__ void kernel_cuda_tonemap(uchar4 *rgba, float *buffer, int sample, int sx, int sy, int sw, int sh, int offset, int stride)
|
||||
{
|
||||
int x = sx + blockDim.x*blockIdx.x + threadIdx.x;
|
||||
int y = sy + blockDim.y*blockIdx.y + threadIdx.y;
|
||||
|
||||
if(x < sx + sw && y < sy + sh)
|
||||
kernel_film_tonemap(NULL, rgba, buffer, sample, resolution, x, y, offset, stride);
|
||||
kernel_film_tonemap(NULL, rgba, buffer, sample, x, y, offset, stride);
|
||||
}
|
||||
|
||||
extern "C" __global__ void kernel_cuda_shader(uint4 *input, float4 *output, int type, int sx)
|
||||
|
@@ -39,7 +39,7 @@ void kernel_tex_copy(KernelGlobals *kg, const char *name, device_ptr mem, size_t
|
||||
void kernel_cpu_path_trace(KernelGlobals *kg, float *buffer, unsigned int *rng_state,
|
||||
int sample, int x, int y, int offset, int stride);
|
||||
void kernel_cpu_tonemap(KernelGlobals *kg, uchar4 *rgba, float *buffer,
|
||||
int sample, int resolution, int x, int y, int offset, int stride);
|
||||
int sample, int x, int y, int offset, int stride);
|
||||
void kernel_cpu_shader(KernelGlobals *kg, uint4 *input, float4 *output,
|
||||
int type, int i);
|
||||
|
||||
@@ -47,14 +47,14 @@ void kernel_cpu_shader(KernelGlobals *kg, uint4 *input, float4 *output,
|
||||
void kernel_cpu_sse2_path_trace(KernelGlobals *kg, float *buffer, unsigned int *rng_state,
|
||||
int sample, int x, int y, int offset, int stride);
|
||||
void kernel_cpu_sse2_tonemap(KernelGlobals *kg, uchar4 *rgba, float *buffer,
|
||||
int sample, int resolution, int x, int y, int offset, int stride);
|
||||
int sample, int x, int y, int offset, int stride);
|
||||
void kernel_cpu_sse2_shader(KernelGlobals *kg, uint4 *input, float4 *output,
|
||||
int type, int i);
|
||||
|
||||
void kernel_cpu_sse3_path_trace(KernelGlobals *kg, float *buffer, unsigned int *rng_state,
|
||||
int sample, int x, int y, int offset, int stride);
|
||||
void kernel_cpu_sse3_tonemap(KernelGlobals *kg, uchar4 *rgba, float *buffer,
|
||||
int sample, int resolution, int x, int y, int offset, int stride);
|
||||
int sample, int x, int y, int offset, int stride);
|
||||
void kernel_cpu_sse3_shader(KernelGlobals *kg, uint4 *input, float4 *output,
|
||||
int type, int i);
|
||||
#endif
|
||||
|
@@ -50,7 +50,7 @@ __device uchar4 film_float_to_byte(float4 color)
|
||||
|
||||
__device void kernel_film_tonemap(KernelGlobals *kg,
|
||||
__global uchar4 *rgba, __global float *buffer,
|
||||
int sample, int resolution, int x, int y, int offset, int stride)
|
||||
int sample, int x, int y, int offset, int stride)
|
||||
{
|
||||
/* buffer offset */
|
||||
int index = offset + x + y*stride;
|
||||
|
@@ -42,9 +42,9 @@ void kernel_cpu_sse2_path_trace(KernelGlobals *kg, float *buffer, unsigned int *
|
||||
|
||||
/* Tonemapping */
|
||||
|
||||
void kernel_cpu_sse2_tonemap(KernelGlobals *kg, uchar4 *rgba, float *buffer, int sample, int resolution, int x, int y, int offset, int stride)
|
||||
void kernel_cpu_sse2_tonemap(KernelGlobals *kg, uchar4 *rgba, float *buffer, int sample, int x, int y, int offset, int stride)
|
||||
{
|
||||
kernel_film_tonemap(kg, rgba, buffer, sample, resolution, x, y, offset, stride);
|
||||
kernel_film_tonemap(kg, rgba, buffer, sample, x, y, offset, stride);
|
||||
}
|
||||
|
||||
/* Shader Evaluate */
|
||||
|
@@ -42,9 +42,9 @@ void kernel_cpu_sse3_path_trace(KernelGlobals *kg, float *buffer, unsigned int *
|
||||
|
||||
/* Tonemapping */
|
||||
|
||||
void kernel_cpu_sse3_tonemap(KernelGlobals *kg, uchar4 *rgba, float *buffer, int sample, int resolution, int x, int y, int offset, int stride)
|
||||
void kernel_cpu_sse3_tonemap(KernelGlobals *kg, uchar4 *rgba, float *buffer, int sample, int x, int y, int offset, int stride)
|
||||
{
|
||||
kernel_film_tonemap(kg, rgba, buffer, sample, resolution, x, y, offset, stride);
|
||||
kernel_film_tonemap(kg, rgba, buffer, sample, x, y, offset, stride);
|
||||
}
|
||||
|
||||
/* Shader Evaluate */
|
||||
|
@@ -831,7 +831,6 @@ void Session::tonemap()
|
||||
task.rgba = display->rgba.device_pointer;
|
||||
task.buffer = buffers->buffer.device_pointer;
|
||||
task.sample = tile_manager.state.sample;
|
||||
task.resolution = tile_manager.state.resolution_divider;
|
||||
tile_manager.state.buffer.get_offset_stride(task.offset, task.stride);
|
||||
|
||||
if(task.w > 0 && task.h > 0) {
|
||||
|
Reference in New Issue
Block a user