From 49b9b0251b77439b1ec6f6f1af92db131aca6d29 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Fri, 28 Jan 2022 10:47:52 +0100 Subject: Draw: Remove unused shader. tile images aren't a special case anymore for the image engine. --- .../draw/engines/image/image_drawing_mode.hh | 2 +- source/blender/draw/engines/image/image_private.hh | 2 +- source/blender/draw/engines/image/image_shader.cc | 22 ++++++++++------------ source/blender/draw/tests/shaders_test.cc | 3 +-- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/source/blender/draw/engines/image/image_drawing_mode.hh b/source/blender/draw/engines/image/image_drawing_mode.hh index 8762a02458f..8eb98b40492 100644 --- a/source/blender/draw/engines/image/image_drawing_mode.hh +++ b/source/blender/draw/engines/image/image_drawing_mode.hh @@ -90,7 +90,7 @@ template class ScreenSpaceDrawingMode : public AbstractD void add_shgroups(const IMAGE_InstanceData *instance_data) const { const ShaderParameters &sh_params = instance_data->sh_params; - GPUShader *shader = IMAGE_shader_image_get(false); + GPUShader *shader = IMAGE_shader_image_get(); DRWShadingGroup *shgrp = DRW_shgroup_create(shader, instance_data->passes.image_pass); DRW_shgroup_uniform_vec2_copy(shgrp, "farNearDistances", sh_params.far_near); diff --git a/source/blender/draw/engines/image/image_private.hh b/source/blender/draw/engines/image/image_private.hh index 05ed2881145..c8968ddf9c6 100644 --- a/source/blender/draw/engines/image/image_private.hh +++ b/source/blender/draw/engines/image/image_private.hh @@ -72,7 +72,7 @@ class AbstractDrawingMode { }; /* image_shader.c */ -GPUShader *IMAGE_shader_image_get(bool is_tiled_image); +GPUShader *IMAGE_shader_image_get(); void IMAGE_shader_library_ensure(); void IMAGE_shader_free(); diff --git a/source/blender/draw/engines/image/image_shader.cc b/source/blender/draw/engines/image/image_shader.cc index 1c6abf36505..77cbaeec5a4 100644 --- a/source/blender/draw/engines/image/image_shader.cc +++ b/source/blender/draw/engines/image/image_shader.cc @@ -41,13 +41,13 @@ extern char datatoc_engine_image_vert_glsl[]; namespace blender::draw::image_engine { struct IMAGE_Shaders { - GPUShader *image_sh[2]; + GPUShader *image_sh; }; static struct { IMAGE_Shaders shaders; DRWShaderLibrary *lib; -} e_data = {{{nullptr}}}; /* Engine data */ +} e_data = {{nullptr}}; /* Engine data */ void IMAGE_shader_library_ensure() { @@ -60,19 +60,17 @@ void IMAGE_shader_library_ensure() } } -GPUShader *IMAGE_shader_image_get(bool is_tiled_image) +GPUShader *IMAGE_shader_image_get() { - const int index = is_tiled_image ? 1 : 0; IMAGE_Shaders *sh_data = &e_data.shaders; - if (sh_data->image_sh[index] == nullptr) { - sh_data->image_sh[index] = DRW_shader_create_with_shaderlib( - datatoc_engine_image_vert_glsl, - nullptr, - datatoc_engine_image_frag_glsl, - e_data.lib, - is_tiled_image ? "#define TILED_IMAGE\n" : nullptr); + if (sh_data->image_sh == nullptr) { + sh_data->image_sh = DRW_shader_create_with_shaderlib(datatoc_engine_image_vert_glsl, + nullptr, + datatoc_engine_image_frag_glsl, + e_data.lib, + nullptr); } - return sh_data->image_sh[index]; + return sh_data->image_sh; } void IMAGE_shader_free() diff --git a/source/blender/draw/tests/shaders_test.cc b/source/blender/draw/tests/shaders_test.cc index 6f4dc226c84..b97298cbe95 100644 --- a/source/blender/draw/tests/shaders_test.cc +++ b/source/blender/draw/tests/shaders_test.cc @@ -185,8 +185,7 @@ static void test_image_glsl_shaders() { IMAGE_shader_library_ensure(); - EXPECT_NE(IMAGE_shader_image_get(false), nullptr); - EXPECT_NE(IMAGE_shader_image_get(true), nullptr); + EXPECT_NE(IMAGE_shader_image_get(), nullptr); IMAGE_shader_free(); } -- cgit v1.2.3 From c37b83724494c4a69db712a4d149a6b1ade61d51 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 28 Jan 2022 10:22:25 +0100 Subject: Fix T95060: Outliner: Broken 'make override hierarchy' in indirect linked casae. In Outliner, 'Make Override Hierarchy' on an indirectly linked data would fail in case some items higher up in the hierarchy also needed to be overridden was also indirectly linked. --- source/blender/editors/space_outliner/outliner_tools.cc | 5 +++-- source/blender/makesdna/DNA_ID.h | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc index fa31025b550..03fc4c20fe5 100644 --- a/source/blender/editors/space_outliner/outliner_tools.cc +++ b/source/blender/editors/space_outliner/outliner_tools.cc @@ -859,8 +859,9 @@ static void id_override_library_create_fn(bContext *C, if (!ID_IS_LINKED(te->store_elem->id)) { break; } - /* If we'd need to override that aren't ID, but it is not overridable, abort. */ - if (!ID_IS_OVERRIDABLE_LIBRARY(te->store_elem->id)) { + /* If some element in the tree needs to be overridden, but its ID is not overridable, + * abort. */ + if (!ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY(te->store_elem->id)) { BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false); BKE_reportf(reports, RPT_WARNING, diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 060b55ffe5c..fad24f4326c 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -534,12 +534,14 @@ typedef struct PreviewImage { #define ID_IS_LINKED(_id) (((const ID *)(_id))->lib != NULL) -/* Note that this is a fairly high-level check, should be used at user interaction level, not in +/* Note that these are fairly high-level checks, should be used at user interaction level, not in * BKE_library_override typically (especially due to the check on LIB_TAG_EXTERN). */ -#define ID_IS_OVERRIDABLE_LIBRARY(_id) \ - (ID_IS_LINKED(_id) && !ID_MISSING(_id) && (((const ID *)(_id))->tag & LIB_TAG_EXTERN) != 0 && \ +#define ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY(_id) \ + (ID_IS_LINKED(_id) && !ID_MISSING(_id) && \ (BKE_idtype_get_info_from_id((const ID *)(_id))->flags & IDTYPE_FLAGS_NO_LIBLINKING) == 0 && \ !ELEM(GS(((ID *)(_id))->name), ID_SCE)) +#define ID_IS_OVERRIDABLE_LIBRARY(_id) \ + (ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY((_id)) && (((const ID *)(_id))->tag & LIB_TAG_EXTERN) != 0) /* NOTE: The three checks below do not take into account whether given ID is linked or not (when * chaining overrides over several libraries). User must ensure the ID is not linked itself -- cgit v1.2.3 From d45098024ea5b533a406c2a2352b35e49a5e72af Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Fri, 28 Jan 2022 10:52:39 +0100 Subject: Blender 3.1 bcon3 (beta) --- source/blender/blenkernel/BKE_blender_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index d0ab8be9a29..573b4e33f8c 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -35,7 +35,7 @@ extern "C" { /* Blender patch version for bugfix releases. */ #define BLENDER_VERSION_PATCH 0 /** Blender release cycle stage: alpha/beta/rc/release. */ -#define BLENDER_VERSION_CYCLE alpha +#define BLENDER_VERSION_CYCLE beta /* Blender file format version. */ #define BLENDER_FILE_VERSION BLENDER_VERSION -- cgit v1.2.3 From 5d4583683b6d99f2561efa589076d67ee15662e0 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Fri, 28 Jan 2022 11:01:11 +0100 Subject: Update pipeline config and point to 3.1 branches. --- build_files/config/pipeline_config.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/build_files/config/pipeline_config.yaml b/build_files/config/pipeline_config.yaml index 8222f2ff0b9..5f85d232dce 100644 --- a/build_files/config/pipeline_config.yaml +++ b/build_files/config/pipeline_config.yaml @@ -5,38 +5,38 @@ update-code: git: submodules: - - branch: master + - branch: blender-v3.1-release commit_id: HEAD path: release/scripts/addons - - branch: master + - branch: blender-v3.1-release commit_id: HEAD path: release/scripts/addons_contrib - - branch: master + - branch: blender-v3.1-release commit_id: HEAD path: release/datafiles/locale - - branch: master + - branch: blender-v3.1-release commit_id: HEAD path: source/tools svn: libraries: darwin-arm64: - branch: trunk + branch: tags/blender-3.1-release commit_id: HEAD path: lib/darwin_arm64 darwin-x86_64: - branch: trunk + branch: tags/blender-3.1-release commit_id: HEAD path: lib/darwin linux-x86_64: - branch: trunk + branch: tags/blender-3.1-release commit_id: HEAD path: lib/linux_centos7_x86_64 windows-amd64: - branch: trunk + branch: tags/blender-3.1-release commit_id: HEAD path: lib/win64_vc15 tests: - branch: trunk + branch: tags/blender-3.1-release commit_id: HEAD path: lib/tests benchmarks: -- cgit v1.2.3 From f756dc4812f3852bba54ee46c21288540f066672 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Fri, 28 Jan 2022 11:11:11 +0100 Subject: Blender 3.1 Beta- subversion bump --- source/blender/blenkernel/BKE_blender_version.h | 2 +- source/blender/blenloader/intern/versioning_300.c | 54 ++++++++++++----------- 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index 573b4e33f8c..d1f31e0d2f5 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -39,7 +39,7 @@ extern "C" { /* Blender file format version. */ #define BLENDER_FILE_VERSION BLENDER_VERSION -#define BLENDER_FILE_SUBVERSION 5 +#define BLENDER_FILE_SUBVERSION 6 /* Minimum Blender version that supports reading file written with the current * version. Older Blender versions will test this and show a warning if the file diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index 81fc6086951..90730439c51 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -782,19 +782,7 @@ void do_versions_after_linking_300(Main *bmain, ReportList *UNUSED(reports)) } } - /** - * Versioning code until next subversion bump goes here. - * - * \note Be sure to check when bumping the version: - * - #blo_do_versions_300 in this file. - * - "versioning_userdef.c", #blo_do_versions_userdef - * - "versioning_userdef.c", #do_versions_theme - * - * \note Keep this message at the bottom of the function. - */ - { - /* Keep this block, even when empty. */ - + if (!MAIN_VERSION_ATLEAST(bmain, 301, 6)) { { /* Ensure driver variable names are unique within the driver. */ ID *id; FOREACH_MAIN_ID_BEGIN (bmain, id) { @@ -829,6 +817,20 @@ void do_versions_after_linking_300(Main *bmain, ReportList *UNUSED(reports)) } } } + + /** + * Versioning code until next subversion bump goes here. + * + * \note Be sure to check when bumping the version: + * - #blo_do_versions_300 in this file. + * - "versioning_userdef.c", #blo_do_versions_userdef + * - "versioning_userdef.c", #do_versions_theme + * + * \note Keep this message at the bottom of the function. + */ + { + /* Keep this block, even when empty. */ + } } static void version_switch_node_input_prefix(Main *bmain) @@ -2485,18 +2487,7 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - /** - * Versioning code until next subversion bump goes here. - * - * \note Be sure to check when bumping the version: - * - "versioning_userdef.c", #blo_do_versions_userdef - * - "versioning_userdef.c", #do_versions_theme - * - * \note Keep this message at the bottom of the function. - */ - { - /* Keep this block, even when empty. */ - + if (!MAIN_VERSION_ATLEAST(bmain, 301, 6)) { /* Add node storage for map range node. */ FOREACH_NODETREE_BEGIN (bmain, ntree, id) { LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { @@ -2557,4 +2548,17 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + + /** + * Versioning code until next subversion bump goes here. + * + * \note Be sure to check when bumping the version: + * - "versioning_userdef.c", #blo_do_versions_userdef + * - "versioning_userdef.c", #do_versions_theme + * + * \note Keep this message at the bottom of the function. + */ + { + /* Keep this block, even when empty. */ + } } -- cgit v1.2.3