From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/
Date: Fri, 17 Feb 2023 05:29:35 +0000 (UTC) [thread overview]
Message-ID: <1676611236.6598e6d9c4b5e4474e1c31b0603da99f0cfb5e2d.sam@gentoo> (raw)
commit: 6598e6d9c4b5e4474e1c31b0603da99f0cfb5e2d
Author: Sebastian Parborg <darkdefende <AT> gmail <DOT> com>
AuthorDate: Fri Feb 3 11:08:24 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 17 05:20:36 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6598e6d9
media-gfx/blender: Fix building 2.93 with openvdb-10
Closes: https://bugs.gentoo.org/892924
Signed-off-by: Sebastian Parborg <darkdefende <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-gfx/blender/blender-2.93.13.ebuild | 1 +
.../blender/files/blender-2.93.13-openvdb-10.patch | 107 +++++++++++++++++++++
2 files changed, 108 insertions(+)
diff --git a/media-gfx/blender/blender-2.93.13.ebuild b/media-gfx/blender/blender-2.93.13.ebuild
index 244f50a0e39f..60c8f2eacc38 100644
--- a/media-gfx/blender/blender-2.93.13.ebuild
+++ b/media-gfx/blender/blender-2.93.13.ebuild
@@ -126,6 +126,7 @@ BDEPEND="
"
PATCHES=(
+ "${FILESDIR}"/${PN}-2.93.13-openvdb-10.patch
"${FILESDIR}"/${PN}-3.0.0-intern-ghost-fix-typo-in-finding-XF86VMODE.patch
"${FILESDIR}"/${PN}-3.0.1-openexr.patch
"${FILESDIR}"/${PN}-3.0.1-openimageio-2.3.patch
diff --git a/media-gfx/blender/files/blender-2.93.13-openvdb-10.patch b/media-gfx/blender/files/blender-2.93.13-openvdb-10.patch
new file mode 100644
index 000000000000..42db25179cdc
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.93.13-openvdb-10.patch
@@ -0,0 +1,107 @@
+--- a/intern/cycles/render/volume.cpp
++++ b/intern/cycles/render/volume.cpp
+@@ -259,7 +259,8 @@ void VolumeMeshBuilder::add_grid(openvdb::GridBase::ConstPtr grid,
+ void VolumeMeshBuilder::add_padding(int pad_size)
+ {
+ #ifdef WITH_OPENVDB
+- openvdb::tools::dilateVoxels(topology_grid->tree(), pad_size);
++ openvdb::tools::dilateActiveValues(
++ topology_grid->tree(), pad_size, openvdb::tools::NN_FACE, openvdb::tools::IGNORE_TILES);
+ #else
+ (void)pad_size;
+ #endif
+diff --git a/source/blender/blenkernel/BKE_volume.h b/source/blender/blenkernel/BKE_volume.h
+index 8b42de7303d..068cdf87d16 100644
+--- a/source/blender/blenkernel/BKE_volume.h
++++ b/source/blender/blenkernel/BKE_volume.h
+@@ -104,7 +104,6 @@ typedef enum VolumeGridType {
+ VOLUME_GRID_INT,
+ VOLUME_GRID_INT64,
+ VOLUME_GRID_MASK,
+- VOLUME_GRID_STRING,
+ VOLUME_GRID_VECTOR_FLOAT,
+ VOLUME_GRID_VECTOR_DOUBLE,
+ VOLUME_GRID_VECTOR_INT,
+@@ -218,8 +217,6 @@ auto BKE_volume_grid_type_operation(const VolumeGridType grid_type, OpType &&op)
+ return op.template operator()<openvdb::Vec3IGrid>();
+ case VOLUME_GRID_VECTOR_DOUBLE:
+ return op.template operator()<openvdb::Vec3dGrid>();
+- case VOLUME_GRID_STRING:
+- return op.template operator()<openvdb::StringGrid>();
+ case VOLUME_GRID_MASK:
+ return op.template operator()<openvdb::MaskGrid>();
+ case VOLUME_GRID_POINTS:
+diff --git a/source/blender/blenkernel/intern/volume.cc b/source/blender/blenkernel/intern/volume.cc
+index 39a7725bfa3..a0e2d1a83cd 100644
+--- a/source/blender/blenkernel/intern/volume.cc
++++ b/source/blender/blenkernel/intern/volume.cc
+@@ -1345,9 +1345,6 @@ VolumeGridType BKE_volume_grid_type_openvdb(const openvdb::GridBase &grid)
+ if (grid.isType<openvdb::Vec3dGrid>()) {
+ return VOLUME_GRID_VECTOR_DOUBLE;
+ }
+- if (grid.isType<openvdb::StringGrid>()) {
+- return VOLUME_GRID_STRING;
+- }
+ if (grid.isType<openvdb::MaskGrid>()) {
+ return VOLUME_GRID_MASK;
+ }
+@@ -1383,7 +1380,6 @@ int BKE_volume_grid_channels(const VolumeGrid *grid)
+ case VOLUME_GRID_VECTOR_DOUBLE:
+ case VOLUME_GRID_VECTOR_INT:
+ return 3;
+- case VOLUME_GRID_STRING:
+ case VOLUME_GRID_POINTS:
+ case VOLUME_GRID_UNKNOWN:
+ return 0;
+@@ -1624,13 +1620,8 @@ struct CreateGridWithChangedResolutionOp {
+
+ template<typename GridType> typename openvdb::GridBase::Ptr operator()()
+ {
+- if constexpr (std::is_same_v<GridType, openvdb::StringGrid>) {
+- return {};
+- }
+- else {
+- return create_grid_with_changed_resolution(static_cast<const GridType &>(grid),
+- resolution_factor);
+- }
++ return create_grid_with_changed_resolution(static_cast<const GridType &>(grid),
++ resolution_factor);
+ }
+ };
+
+diff --git a/source/blender/blenkernel/intern/volume_render.cc b/source/blender/blenkernel/intern/volume_render.cc
+index c0a205b5673..7ccf04df941 100644
+--- a/source/blender/blenkernel/intern/volume_render.cc
++++ b/source/blender/blenkernel/intern/volume_render.cc
+@@ -77,7 +77,6 @@ static void extract_dense_float_voxels(const VolumeGridType grid_type,
+ case VOLUME_GRID_VECTOR_INT:
+ return extract_dense_voxels<openvdb::Vec3IGrid, openvdb::Vec3f>(
+ grid, bbox, reinterpret_cast<openvdb::Vec3f *>(r_voxels));
+- case VOLUME_GRID_STRING:
+ case VOLUME_GRID_POINTS:
+ case VOLUME_GRID_UNKNOWN:
+ /* Zero channels to copy. */
+diff --git a/source/blender/makesrna/intern/rna_volume.c b/source/blender/makesrna/intern/rna_volume.c
+index 3100c1195f4..2854f02a4d4 100644
+--- a/source/blender/makesrna/intern/rna_volume.c
++++ b/source/blender/makesrna/intern/rna_volume.c
+@@ -241,7 +241,6 @@
+ {VOLUME_GRID_INT, "INT", 0, "Integer", "32-bit integer"},
+ {VOLUME_GRID_INT64, "INT64", 0, "Integer 64-bit", "64-bit integer"},
+ {VOLUME_GRID_MASK, "MASK", 0, "Mask", "No data, boolean mask of active voxels"},
+- {VOLUME_GRID_STRING, "STRING", 0, "String", "Text string"},
+ {VOLUME_GRID_VECTOR_FLOAT, "VECTOR_FLOAT", 0, "Float Vector", "3D float vector"},
+ {VOLUME_GRID_VECTOR_DOUBLE, "VECTOR_DOUBLE", 0, "Double Vector", "3D double vector"},
+ {VOLUME_GRID_VECTOR_INT, "VECTOR_INT", 0, "Integer Vector", "3D integer vector"},
+diff --git a/source/blender/modifiers/intern/MOD_volume_displace.cc b/source/blender/modifiers/intern/MOD_volume_displace.cc
+index af3a502162d..e2d7f445731 100644
+--- a/source/blender/modifiers/intern/MOD_volume_displace.cc
++++ b/source/blender/modifiers/intern/MOD_volume_displace.cc
+@@ -201,7 +201,6 @@
+ template<typename GridType> void operator()()
+ {
+ if constexpr (std::is_same_v<GridType, openvdb::points::PointDataGrid> ||
+- std::is_same_v<GridType, openvdb::StringGrid> ||
+ std::is_same_v<GridType, openvdb::MaskGrid>) {
+ /* We don't support displacing these grid types yet. */
+ return;
next reply other threads:[~2023-02-17 5:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 5:29 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-12-01 8:34 [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/ Sam James
2023-10-27 2:59 Sam James
2023-05-01 15:15 Sam James
2022-12-20 10:53 Sam James
2022-09-01 2:06 Sam James
2022-02-12 3:55 Sam James
2021-06-10 0:51 Sam James
2020-11-08 10:42 Sam James
2020-08-24 13:42 Sam James
2020-08-24 13:42 Sam James
2019-06-06 21:22 Andreas Sturmlechner
2019-03-21 18:12 Michał Górny
2018-08-16 14:15 Jonathan Scruggs
2016-10-22 23:26 David Seifert
2016-09-29 15:12 Michael Palimaka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1676611236.6598e6d9c4b5e4474e1c31b0603da99f0cfb5e2d.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox