[Bf-blender-cvs] [7913ac6b7c3] cycles-x: Cleanup: Remove unused pass accessor code
Sergey Sharybin
noreply at git.blender.org
Tue Jul 20 17:06:54 CEST 2021
Commit: 7913ac6b7c377e22e7ae56359f78acb5379bbe68
Author: Sergey Sharybin
Date: Tue Jul 20 17:06:09 2021 +0200
Branches: cycles-x
https://developer.blender.org/rB7913ac6b7c377e22e7ae56359f78acb5379bbe68
Cleanup: Remove unused pass accessor code
It got re-implemented using `set_render_tile_pixels()`.
===================================================================
M intern/cycles/integrator/pass_accessor.cpp
M intern/cycles/integrator/pass_accessor.h
===================================================================
diff --git a/intern/cycles/integrator/pass_accessor.cpp b/intern/cycles/integrator/pass_accessor.cpp
index cc767523b4f..c80e73a13c6 100644
--- a/intern/cycles/integrator/pass_accessor.cpp
+++ b/intern/cycles/integrator/pass_accessor.cpp
@@ -237,53 +237,6 @@ bool PassAccessor::get_render_tile_pixels(const RenderBuffers *render_buffers,
return true;
}
-#if 0
-/* TODO(sergey): Need to be converted to a kernel-based processing if it will be used. */
-bool PassAccessor::set_pass_rect(PassType type, int components, float *pixels, int samples)
-{
- if (buffer.data() == NULL) {
- return false;
- }
-
- int pass_offset = 0;
-
- for (size_t j = 0; j < params.passes.size(); j++) {
- Pass &pass = params.passes[j];
-
- if (pass.type != type) {
- pass_offset += pass.components;
- continue;
- }
-
- float *out = buffer.data() + pass_offset;
- const int pass_stride = params.passes_size;
- const int size = params.width * params.height;
-
- DCHECK_EQ(pass.components, components)
- << "Number of components mismatch for pass " << pass.name;
-
- for (int i = 0; i < size; i++, out += pass_stride, pixels += components) {
- if (pass.filter) {
- /* Scale by the number of samples, inverse of what we do in get_render_tile_pixels.
- * A better solution would be to remove the need for set_pass_rect entirely,
- * and change baking to bake multiple objects in a tile at once. */
- for (int j = 0; j < components; j++) {
- out[j] = pixels[j] * samples;
- }
- }
- else {
- /* For non-filtered passes just straight copy, these may contain non-float data. */
- memcpy(out, pixels, sizeof(float) * components);
- }
- }
-
- return true;
- }
-
- return false;
-}
-#endif
-
void PassAccessor::init_kernel_film_convert(KernelFilmConvert *kfilm_convert,
const BufferParams &buffer_params,
const Destination &destination) const
diff --git a/intern/cycles/integrator/pass_accessor.h b/intern/cycles/integrator/pass_accessor.h
index 9aa4d995c41..964a51016f2 100644
--- a/intern/cycles/integrator/pass_accessor.h
+++ b/intern/cycles/integrator/pass_accessor.h
@@ -111,10 +111,6 @@ class PassAccessor {
/* Set pass data for the given render buffers. Used for baking to read from passes. */
bool set_render_tile_pixels(RenderBuffers *render_buffers, const Source &source);
-#if 0
- bool set_pass_rect(PassType type, int components, float *pixels);
-#endif
-
protected:
virtual void init_kernel_film_convert(KernelFilmConvert *kfilm_convert,
const BufferParams &buffer_params,
More information about the Bf-blender-cvs
mailing list