Skip to content

Commit

Permalink
Cycles: Fix a few type casting warnings
Browse files Browse the repository at this point in the history
Stumbled over the `integrate_surface_volume_only_bounce` kernel
function not returning the right type. The others too showed up as
warnings when building Cycles as a standalone which didn't have
those warnings disabled.

Differential Revision: https://developer.blender.org/D14558
  • Loading branch information
pmoursnv committed Apr 5, 2022
1 parent f60cffa commit e513687
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions intern/cycles/kernel/integrator/shade_surface.h
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ ccl_device_forceinline int integrate_surface_bsdf_bssrdf_bounce(
}

#ifdef __VOLUME__
ccl_device_forceinline bool integrate_surface_volume_only_bounce(IntegratorState state,
ccl_private ShaderData *sd)
ccl_device_forceinline int integrate_surface_volume_only_bounce(IntegratorState state,
ccl_private ShaderData *sd)
{
if (!path_state_volume_next(state)) {
return LABEL_NONE;
Expand Down
2 changes: 1 addition & 1 deletion intern/cycles/scene/geometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ bool Geometry::has_true_displacement() const
}

void Geometry::compute_bvh(
Device *device, DeviceScene *dscene, SceneParams *params, Progress *progress, int n, int total)
Device *device, DeviceScene *dscene, SceneParams *params, Progress *progress, size_t n, size_t total)
{
if (progress->get_cancel())
return;
Expand Down
4 changes: 2 additions & 2 deletions intern/cycles/scene/geometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ class Geometry : public Node {
DeviceScene *dscene,
SceneParams *params,
Progress *progress,
int n,
int total);
size_t n,
size_t total);

virtual PrimitiveType primitive_type() const = 0;

Expand Down
2 changes: 1 addition & 1 deletion intern/cycles/session/merge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ static void read_layer_samples(vector<MergeImage> &images,
current_layer_samples.total = 0;
current_layer_samples.per_pixel.resize(in_spec.width * in_spec.height);
std::fill(
current_layer_samples.per_pixel.begin(), current_layer_samples.per_pixel.end(), 0);
current_layer_samples.per_pixel.begin(), current_layer_samples.per_pixel.end(), 0.0f);
}

if (layer.has_sample_pass) {
Expand Down

0 comments on commit e513687

Please sign in to comment.