Merge remote-tracking branch 'origin/blender-v3.1-release'
This commit is contained in:
commit
cfe18c3b94
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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. */
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ template<typename TextureMethod> 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);
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue