Fix set but unused variables in Cycles
This commit is contained in:
committed by
Sergey Sharybin
parent
7982d86117
commit
daaed83a32
@@ -606,7 +606,7 @@ void BVH2::pack_instances(size_t nodes_size, size_t leaf_nodes_size)
|
||||
int4 *bvh_nodes = &bvh->pack.nodes[0];
|
||||
size_t bvh_nodes_size = bvh->pack.nodes.size();
|
||||
|
||||
for (size_t i = 0, j = 0; i < bvh_nodes_size; j++) {
|
||||
for (size_t i = 0; i < bvh_nodes_size;) {
|
||||
size_t nsize, nsize_bbox;
|
||||
if (bvh_nodes[i].x & PATH_RAY_NODE_UNALIGNED) {
|
||||
nsize = BVH_UNALIGNED_NODE_SIZE;
|
||||
|
||||
@@ -28,6 +28,7 @@ static size_t estimate_single_state_size(const uint kernel_features)
|
||||
#define KERNEL_STRUCT_ARRAY_MEMBER(parent_struct, type, name, feature) \
|
||||
state_size += (kernel_features & (feature)) ? sizeof(type) : 0;
|
||||
#define KERNEL_STRUCT_END(name) \
|
||||
(void)array_index; \
|
||||
break; \
|
||||
}
|
||||
#define KERNEL_STRUCT_END_ARRAY(name, cpu_array_size, gpu_array_size) \
|
||||
@@ -139,6 +140,7 @@ void PathTraceWorkGPU::alloc_integrator_soa()
|
||||
integrator_state_gpu_.parent_struct[array_index].name = (type *)array->device_pointer; \
|
||||
}
|
||||
#define KERNEL_STRUCT_END(name) \
|
||||
(void)array_index; \
|
||||
break; \
|
||||
}
|
||||
#define KERNEL_STRUCT_END_ARRAY(name, cpu_array_size, gpu_array_size) \
|
||||
|
||||
@@ -51,8 +51,6 @@ ccl_device_inline
|
||||
int object = OBJECT_NONE;
|
||||
float isect_t = ray->tmax;
|
||||
|
||||
int num_hits_in_instance = 0;
|
||||
|
||||
uint num_hits = 0;
|
||||
isect_array->t = ray->tmax;
|
||||
|
||||
@@ -152,7 +150,6 @@ ccl_device_inline
|
||||
/* Move on to next entry in intersections array. */
|
||||
isect_array++;
|
||||
num_hits++;
|
||||
num_hits_in_instance++;
|
||||
isect_array->t = isect_t;
|
||||
if (num_hits == max_hits) {
|
||||
return num_hits;
|
||||
@@ -193,7 +190,6 @@ ccl_device_inline
|
||||
/* Move on to next entry in intersections array. */
|
||||
isect_array++;
|
||||
num_hits++;
|
||||
num_hits_in_instance++;
|
||||
isect_array->t = isect_t;
|
||||
if (num_hits == max_hits) {
|
||||
return num_hits;
|
||||
@@ -219,7 +215,6 @@ ccl_device_inline
|
||||
bvh_instance_push(kg, object, ray, &P, &dir, &idir);
|
||||
#endif
|
||||
|
||||
num_hits_in_instance = 0;
|
||||
isect_array->t = isect_t;
|
||||
|
||||
++stack_ptr;
|
||||
|
||||
@@ -809,7 +809,7 @@ static string path_source_replace_includes_recursive(const string &_source,
|
||||
const size_t source_length = source.length();
|
||||
size_t index = 0;
|
||||
/* Information about where we are in the source. */
|
||||
size_t line_number = 0, column_number = 1;
|
||||
size_t column_number = 1;
|
||||
/* Currently gathered non-preprocessor token.
|
||||
* Store as start/length rather than token itself to avoid overhead of
|
||||
* memory re-allocations on each character concatenation.
|
||||
@@ -842,7 +842,6 @@ static string path_source_replace_includes_recursive(const string &_source,
|
||||
preprocessor_line = "";
|
||||
}
|
||||
column_number = 0;
|
||||
++line_number;
|
||||
}
|
||||
else if (ch == '#' && column_number == 1 && !inside_preprocessor) {
|
||||
/* Append all possible non-preprocessor token to the result. */
|
||||
|
||||
Reference in New Issue
Block a user