From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/
Date: Fri, 27 Oct 2023 02:34:46 +0000 (UTC) [thread overview]
Message-ID: <1698373912.824eb57e50e0f5039d42f39e0caa5461d8d73468.sam@gentoo> (raw)
commit: 824eb57e50e0f5039d42f39e0caa5461d8d73468
Author: Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Wed Oct 11 21:23:32 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Oct 27 02:31:52 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=824eb57e
media-gfx/blender: add 3.6.5, update 9999
* add 3.6.5 LTS
* upstream fixed
https://projects.blender.org/blender/blender/pulls/113163 in
https://projects.blender.org/blender/blender/issues/112917
* add it to 3.6.5
* drop blockers for 3.6.5 and 9999
Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-gfx/blender/Manifest | 1 +
.../{blender-9999.ebuild => blender-3.6.5.ebuild} | 12 ++-
media-gfx/blender/blender-9999.ebuild | 4 +-
.../blender/files/blender-4.0.0-ocio-2.3.0.patch | 110 +++++++++++++++++++++
4 files changed, 119 insertions(+), 8 deletions(-)
diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest
index b3c42c94fb98..7c56592c6b76 100644
--- a/media-gfx/blender/Manifest
+++ b/media-gfx/blender/Manifest
@@ -3,3 +3,4 @@ DIST blender-3.3.8.tar.xz 41915180 BLAKE2B 7fb24afe2151bba53d8c25160bd697145aced
DIST blender-3.4.1.tar.xz 53666296 BLAKE2B ec5b2771c1b55ecdf3c2c86a413ae5599545800fc072eff45cf212b32c74af60fc3d650ad931fff221c1073adb2b447df3287a965f884a4760a5d972c9877aee SHA512 d6de3ec9cd1a1e4d4e4a838af0cfc113c91c3c1b66703027e0ed61bd818dafc4e4304fd041738ddea32fc76b1ad9b7737cbdcf74d56a0406a87c457375d907ab
DIST blender-3.5.1.tar.xz 69780800 BLAKE2B 6961280b9d5fb606a35137ce355bf07b4dc16908d5d52cfd3a914907721da16108b8780b1894413a69ab69d455f5d1575697079a24c2bdcecb17174cf7a7c7c7 SHA512 7c9c03de8532884f8ab39fecf1450f8be4bc937a018bd14240ace81a89e422625aba9c4865f6efbb8371f5f01e930932fa5cf03c9d14d44c5312db33e3c56131
DIST blender-3.6.0.tar.xz 70428872 BLAKE2B a43f2c0a2db6fa624b1bd96264462312d31f2e3983c463da9d17b0c793d0d344dfbbc13acfb8bab53cc37f5b5b3479d60b8046475aa6c977074ef35414640eaf SHA512 5fbb7a48d1f18e5cc6430bdefb4d7d9e8a52d387cf92a319c7fbc8836a3f5a6f90fab13f152be49c3558a8f70ed9f0d1f7aeddb264a938496a2f93254bb569cb
+DIST blender-3.6.5.tar.xz 70447868 BLAKE2B efa366b8aff5c8870c9ed060063eba1115a9ae50b0345c56fbaaab228976afad6f4c6b9c374f22d146fe88db6e0e7aab3d61b1797e71f30f6adfc594599ea2be SHA512 d07e53c708a1e6df18853eb5f0dc032459c74ef43f9559880720170f98ac8729064edb143835f8cec411ab6de42619bed3f0ef1143b288f2a2eb6f05fdfc32ae
diff --git a/media-gfx/blender/blender-9999.ebuild b/media-gfx/blender/blender-3.6.5.ebuild
similarity index 97%
copy from media-gfx/blender/blender-9999.ebuild
copy to media-gfx/blender/blender-3.6.5.ebuild
index a637534483c4..1f87c0fac6ef 100644
--- a/media-gfx/blender/blender-9999.ebuild
+++ b/media-gfx/blender/blender-3.6.5.ebuild
@@ -19,7 +19,7 @@ else
SRC_URI="https://download.blender.org/source/${P}.tar.xz"
# Update these between major releases.
TEST_TARBALL_VERSION="$(ver_cut 1-2).0"
- SRC_URI+=" test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-${TEST_TARBALL_VERSION}-tests.tar.xz )"
+ # SRC_URI+=" test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-${TEST_TARBALL_VERSION}-tests.tar.xz )"
KEYWORDS="~amd64 ~arm ~arm64"
fi
@@ -45,8 +45,6 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
# Library versions for official builds can be found in the blender source directory in:
# build_files/build_environment/install_deps.sh
-#
-# <OpenColorIO-2.3.0 for https://projects.blender.org/blender/blender/issues/112917.
RDEPEND="${PYTHON_DEPS}
dev-libs/boost:=[nls?]
dev-libs/lzo:2=
@@ -68,7 +66,7 @@ RDEPEND="${PYTHON_DEPS}
virtual/opengl
alembic? ( >=media-gfx/alembic-1.8.3-r2[boost(+),hdf(+)] )
collada? ( >=media-libs/opencollada-1.6.68 )
- color-management? ( <media-libs/OpenColorIO-2.3.0:= )
+ color-management? ( media-libs/OpenColorIO:= )
cuda? ( dev-util/nvidia-cuda-toolkit:= )
embree? ( >=media-libs/embree-3.10.0[raymask] )
ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] )
@@ -140,6 +138,10 @@ BDEPEND="
)
"
+PATCHES=(
+ "${FILESDIR}/${PN}-4.0.0-ocio-2.3.0.patch"
+)
+
blender_check_requirements() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
@@ -174,7 +176,7 @@ src_unpack() {
git-r3_src_unpack
git-r3_fetch "${ADDONS_EGIT_REPO_URI}"
- git-r3_checkout "${ADDONS_EGIT_REPO_URI} ${S}/scripts/addons"
+ git-r3_checkout "${ADDONS_EGIT_REPO_URI}" "${S}/scripts/addons"
if use test; then
TESTS_SVN_URL=https://svn.blender.org/svnroot/bf-blender/trunk/lib/tests
diff --git a/media-gfx/blender/blender-9999.ebuild b/media-gfx/blender/blender-9999.ebuild
index a637534483c4..d32731e15fef 100644
--- a/media-gfx/blender/blender-9999.ebuild
+++ b/media-gfx/blender/blender-9999.ebuild
@@ -45,8 +45,6 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
# Library versions for official builds can be found in the blender source directory in:
# build_files/build_environment/install_deps.sh
-#
-# <OpenColorIO-2.3.0 for https://projects.blender.org/blender/blender/issues/112917.
RDEPEND="${PYTHON_DEPS}
dev-libs/boost:=[nls?]
dev-libs/lzo:2=
@@ -68,7 +66,7 @@ RDEPEND="${PYTHON_DEPS}
virtual/opengl
alembic? ( >=media-gfx/alembic-1.8.3-r2[boost(+),hdf(+)] )
collada? ( >=media-libs/opencollada-1.6.68 )
- color-management? ( <media-libs/OpenColorIO-2.3.0:= )
+ color-management? ( media-libs/OpenColorIO:= )
cuda? ( dev-util/nvidia-cuda-toolkit:= )
embree? ( >=media-libs/embree-3.10.0[raymask] )
ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] )
diff --git a/media-gfx/blender/files/blender-4.0.0-ocio-2.3.0.patch b/media-gfx/blender/files/blender-4.0.0-ocio-2.3.0.patch
new file mode 100644
index 000000000000..e6cc4a6fa026
--- /dev/null
+++ b/media-gfx/blender/files/blender-4.0.0-ocio-2.3.0.patch
@@ -0,0 +1,110 @@
+From 458917773afb4cdf8e1189c0bf5aff7feda6a664 Mon Sep 17 00:00:00 2001
+From: Brecht Van Lommel <brecht@blender.org>
+Date: Mon, 2 Oct 2023 17:31:08 +0200
+Subject: [PATCH] Build: changes to build with OpenColorIO 2.3
+
+Ref #113157
+---
+ intern/opencolorio/ocio_impl_glsl.cc | 12 +++++++++-
+ .../ocio_color_space_conversion_shader.cc | 24 +++++++++++++++++++
+ 2 files changed, 35 insertions(+), 1 deletion(-)
+
+diff --git a/intern/opencolorio/ocio_impl_glsl.cc b/intern/opencolorio/ocio_impl_glsl.cc
+index 8d46a2f0773..35e4d0b7a90 100644
+--- a/intern/opencolorio/ocio_impl_glsl.cc
++++ b/intern/opencolorio/ocio_impl_glsl.cc
+@@ -343,8 +343,15 @@ static bool addGPULut1D2D(OCIO_GPUTextures &textures,
+ unsigned int height = 0;
+ GpuShaderCreator::TextureType channel = GpuShaderCreator::TEXTURE_RGB_CHANNEL;
+ Interpolation interpolation = INTERP_LINEAR;
++#if OCIO_VERSION_HEX >= 0x02030000
++ /* Always use 2D textures in OpenColorIO 2.3, simpler and same performance. */
++ GpuShaderDesc::TextureDimensions dimensions = GpuShaderDesc::TEXTURE_2D;
++ shader_desc->getTexture(
++ index, texture_name, sampler_name, width, height, channel, dimensions, interpolation);
++#else
+ shader_desc->getTexture(
+ index, texture_name, sampler_name, width, height, channel, interpolation);
++#endif
+
+ const float *values;
+ shader_desc->getTextureValues(index, values);
+@@ -358,6 +365,7 @@ static bool addGPULut1D2D(OCIO_GPUTextures &textures,
+ GPU_R16F;
+
+ OCIO_GPULutTexture lut;
++#if OCIO_VERSION_HEX < 0x02030000
+ /* There does not appear to be an explicit way to check if a texture is 1D or 2D.
+ * It depends on more than height. So check instead by looking at the source. */
+ std::string sampler1D_name = std::string("sampler1D ") + sampler_name;
+@@ -365,7 +373,9 @@ static bool addGPULut1D2D(OCIO_GPUTextures &textures,
+ lut.texture = GPU_texture_create_1d(
+ texture_name, width, 1, format, GPU_TEXTURE_USAGE_SHADER_READ, values);
+ }
+- else {
++ else
++#endif
++ {
+ lut.texture = GPU_texture_create_2d(
+ texture_name, width, height, 1, format, GPU_TEXTURE_USAGE_SHADER_READ, values);
+ }
+diff --git a/source/blender/compositor/realtime_compositor/cached_resources/intern/ocio_color_space_conversion_shader.cc b/source/blender/compositor/realtime_compositor/cached_resources/intern/ocio_color_space_conversion_shader.cc
+index 4cdbb52a6ba..52492754c0f 100644
+--- a/source/blender/compositor/realtime_compositor/cached_resources/intern/ocio_color_space_conversion_shader.cc
++++ b/source/blender/compositor/realtime_compositor/cached_resources/intern/ocio_color_space_conversion_shader.cc
+@@ -95,6 +95,18 @@ class GPUShaderCreator : public OCIO::GpuShaderCreator {
+ return GPU_max_texture_size();
+ }
+
++# if OCIO_VERSION_HEX >= 0x02030000
++ void setAllowTexture1D(bool allowed) override
++ {
++ allow_texture_1D_ = allowed;
++ }
++
++ bool getAllowTexture1D() const override
++ {
++ return allow_texture_1D_;
++ }
++# endif
++
+ bool addUniform(const char *name, const DoubleGetter &get_double) override
+ {
+ /* Check if a resource exists with the same name and assert if it is the case, returning false
+@@ -201,6 +213,9 @@ class GPUShaderCreator : public OCIO::GpuShaderCreator {
+ uint width,
+ uint height,
+ TextureType channel,
++# if OCIO_VERSION_HEX >= 0x02030000
++ OCIO::GpuShaderDesc::TextureDimensions dimensions,
++# endif
+ OCIO::Interpolation interpolation,
+ const float *values) override
+ {
+@@ -216,7 +231,11 @@ class GPUShaderCreator : public OCIO::GpuShaderCreator {
+ GPUTexture *texture;
+ eGPUTextureFormat texture_format = (channel == TEXTURE_RGB_CHANNEL) ? GPU_RGB16F : GPU_R16F;
+ /* A height of 1 indicates a 1D texture according to the OCIO API. */
++# if OCIO_VERSION_HEX >= 0x02030000
++ if (dimensions == OCIO::GpuShaderDesc::TEXTURE_1D) {
++# else
+ if (height == 1) {
++# endif
+ texture = GPU_texture_create_1d(
+ texture_name, width, 1, texture_format, GPU_TEXTURE_USAGE_SHADER_READ, values);
+ shader_create_info_.sampler(textures_.size() + 1, ImageType::FLOAT_1D, resource_name);
+@@ -398,6 +417,11 @@ class GPUShaderCreator : public OCIO::GpuShaderCreator {
+ /* A vectors that stores the created uniform buffers when bind_shader_and_resources() is called,
+ * so that they can be properly unbound and freed in the unbind_shader_and_resources() method. */
+ Vector<GPUUniformBuf *> uniform_buffers_;
++
++# if OCIO_VERSION_HEX >= 0x02030000
++ /* Allow creating 1D textures, or only use 2D textures. */
++ bool allow_texture_1D_ = true;
++# endif
+ };
+
+ #else
+--
+2.30.2
+
next reply other threads:[~2023-10-27 2:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-27 2:34 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/, media-gfx/blender/files/ Sam James
2024-09-05 2:12 Sam James
2024-01-21 11:21 Sam James
2023-10-27 3:20 Sam James
2023-10-03 16:23 Sam James
2022-09-25 12:29 Ionen Wolkens
2022-03-14 18:52 Sam James
2022-03-14 18:43 Sam James
2022-02-15 19:51 Sam James
2022-02-12 15:01 Sam James
2021-12-04 0:54 Sam James
2021-11-08 11:25 Michał Górny
2020-12-03 7:32 Joonas Niilola
2020-12-03 7:32 Joonas Niilola
2020-08-24 13:42 Sam James
2019-11-12 12:33 Miroslav Šulc
2018-08-15 20:08 Jonathan Scruggs
2018-01-30 18:44 Jonathan Scruggs
2017-12-25 16:09 David Seifert
2017-01-15 13:34 David Seifert
2016-06-16 20:02 Amy Winston
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=1698373912.824eb57e50e0f5039d42f39e0caa5461d8d73468.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