Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-02-26 22:07:36 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-02-26 22:07:36 +0300
commit4d9697a5a90de08d30de373cf6dc83f8130fffdc (patch)
tree8c4d4b7d2a06f4a9aad42f767035161b20f74518
parent2977eb5a0e7e53531a156136e7c7df6022b6d684 (diff)
parent6b6d1e424c5b85d685d4aa8fa65cd22cd92939be (diff)
Merge branch 'blender2.7'
-rw-r--r--intern/cycles/device/opencl/opencl_split.cpp2
-rw-r--r--source/blender/blenloader/intern/readfile.c25
-rw-r--r--source/blender/makesdna/DNA_ID.h14
3 files changed, 19 insertions, 22 deletions
diff --git a/intern/cycles/device/opencl/opencl_split.cpp b/intern/cycles/device/opencl/opencl_split.cpp
index 06eba52cec8..2e2eb775fdc 100644
--- a/intern/cycles/device/opencl/opencl_split.cpp
+++ b/intern/cycles/device/opencl/opencl_split.cpp
@@ -1724,11 +1724,9 @@ void OpenCLDevice::shader(DeviceTask& task)
kernel = bake_program(ustring("bake"));
}
else if(task.shader_eval_type == SHADER_EVAL_DISPLACE) {
- assert(displace_program());
kernel = displace_program(ustring("displace"));
}
else {
- assert(background_program());
kernel = background_program(ustring("background"));
}
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index df653359fad..e269993460d 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -8913,7 +8913,7 @@ static BHead *read_data_into_oldnewmap(FileData *fd, BHead *bhead, const char *a
return bhead;
}
-static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, const short tag, ID **r_id)
+static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, const int tag, ID **r_id)
{
/* this routine reads a libblock and its direct data. Use link functions to connect it all
*/
@@ -9523,7 +9523,7 @@ BlendFileData *blo_read_file_internal(FileData *fd, const char *filepath)
bhead = blo_bhead_next(fd, bhead);
}
else {
- bhead = read_libblock(fd, mainlist.last, bhead, LIB_TAG_READ | LIB_TAG_EXTERN, NULL);
+ bhead = read_libblock(fd, mainlist.last, bhead, LIB_TAG_ID_ID | LIB_TAG_EXTERN, NULL);
}
break;
/* in 2.50+ files, the file identifier for screens is patched, forward compatibility */
@@ -9752,7 +9752,7 @@ static void expand_doit_library(void *fdhandle, Main *mainvar, void *old)
id = is_yet_read(fd, ptr, bhead);
if (id == NULL) {
- read_libblock(fd, ptr, bhead, LIB_TAG_READ | LIB_TAG_INDIRECT, NULL);
+ read_libblock(fd, ptr, bhead, LIB_TAG_ID_ID | LIB_TAG_INDIRECT, NULL);
// commented because this can print way too much
// if (G.debug & G_DEBUG) printf("expand_doit: other lib %s\n", lib->name);
@@ -9795,7 +9795,7 @@ static void expand_doit_library(void *fdhandle, Main *mainvar, void *old)
id = is_yet_read(fd, mainvar, bhead);
if (id == NULL) {
- read_libblock(fd, mainvar, bhead, LIB_TAG_TESTIND, NULL);
+ read_libblock(fd, mainvar, bhead, LIB_TAG_NEED_EXPAND | LIB_TAG_INDIRECT, NULL);
}
else {
/* this is actually only needed on UI call? when ID was already read before, and another append
@@ -10914,7 +10914,7 @@ static void add_collections_to_scene(
}
}
-static ID *create_placeholder(Main *mainvar, const short idcode, const char *idname, const short tag)
+static ID *create_placeholder(Main *mainvar, const short idcode, const char *idname, const int tag)
{
ListBase *lb = which_libbase(mainvar, idcode);
ID *ph_id = BKE_libblock_alloc_notest(idcode);
@@ -10950,7 +10950,8 @@ static ID *link_named_part(
id = is_yet_read(fd, mainl, bhead);
if (id == NULL) {
/* not read yet */
- read_libblock(fd, mainl, bhead, force_indirect ? LIB_TAG_TESTIND : LIB_TAG_TESTEXT, &id);
+ const int tag = force_indirect ? LIB_TAG_INDIRECT : LIB_TAG_EXTERN;
+ read_libblock(fd, mainl, bhead, tag | LIB_TAG_NEED_EXPAND , &id);
if (id) {
/* sort by name in list */
@@ -10997,7 +10998,7 @@ void BLO_library_link_copypaste(Main *mainl, BlendHandle *bh)
if (bhead->code == ENDB)
break;
if (ELEM(bhead->code, ID_OB, ID_GR)) {
- read_libblock(fd, mainl, bhead, LIB_TAG_TESTIND, &id);
+ read_libblock(fd, mainl, bhead, LIB_TAG_NEED_EXPAND | LIB_TAG_INDIRECT, &id);
}
@@ -11080,7 +11081,7 @@ static void link_id_part(ReportList *reports, FileData *fd, Main *mainvar, ID *i
bhead = find_bhead_from_idname(fd, id->name);
}
- id->tag &= ~LIB_TAG_READ;
+ id->tag &= ~LIB_TAG_ID_ID;
if (!is_valid) {
blo_reportf_wrap(
@@ -11292,7 +11293,7 @@ void *BLO_library_read_struct(FileData *fd, BHead *bh, const char *blockname)
/** \name Library Reading
* \{ */
-static int mainvar_id_tag_any_check(Main *mainvar, const short tag)
+static int mainvar_id_tag_any_check(Main *mainvar, const int tag)
{
ListBase *lbarray[MAX_LIBARRAY];
int a;
@@ -11328,8 +11329,8 @@ static void read_libraries(FileData *basefd, ListBase *mainlist)
/* test 1: read libdata */
mainptr = mainl->next;
while (mainptr) {
- if (mainvar_id_tag_any_check(mainptr, LIB_TAG_READ)) {
- // printf("found LIB_TAG_READ %s (%s)\n", mainptr->curlib->id.name, mainptr->curlib->name);
+ if (mainvar_id_tag_any_check(mainptr, LIB_TAG_ID_ID)) {
+ // printf("found LIB_TAG_ID_ID %s (%s)\n", mainptr->curlib->id.name, mainptr->curlib->name);
FileData *fd = mainptr->curlib->filedata;
@@ -11405,7 +11406,7 @@ static void read_libraries(FileData *basefd, ListBase *mainlist)
while (id) {
ID *idn = id->next;
- if (id->tag & LIB_TAG_READ) {
+ if (id->tag & LIB_TAG_ID_ID) {
BLI_remlink(lbarray[a], id);
/* When playing with lib renaming and such, you may end with cases where you have
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index ed063910dd6..5815a913d3b 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -479,14 +479,12 @@ enum {
* and is only used (linked) inderectly through other libraries. */
LIB_TAG_INDIRECT = 1 << 1,
- /* RESET_AFTER_USE Three flags used internally in readfile.c,
- * to mark IDs needing to be read (only done once). */
- LIB_TAG_NEED_EXPAND = 1 << 3,
- LIB_TAG_TESTEXT = (LIB_TAG_NEED_EXPAND | LIB_TAG_EXTERN),
- LIB_TAG_TESTIND = (LIB_TAG_NEED_EXPAND | LIB_TAG_INDIRECT),
/* RESET_AFTER_USE Flag used internally in readfile.c,
- * to mark IDs needing to be linked from a library. */
- LIB_TAG_READ = 1 << 4,
+ * to mark IDs needing to be expanded (only done once). */
+ LIB_TAG_NEED_EXPAND = 1 << 3,
+ /* RESET_AFTER_USE Flag used internally in readfile.c to mark ID
+ * placeholders for linked datablocks needing to be read. */
+ LIB_TAG_ID_ID = 1 << 4,
/* RESET_AFTER_USE */
LIB_TAG_NEED_LINK = 1 << 5,
@@ -524,7 +522,7 @@ enum {
LIB_TAG_NO_USER_REFCOUNT = 1 << 16, /* Datablock does not refcount usages of other IDs. */
/* Datablock was not allocated by standard system (BKE_libblock_alloc), do not free its memory
* (usual type-specific freeing is called though). */
- LIB_TAG_NOT_ALLOCATED = 1 << 17,
+ LIB_TAG_NOT_ALLOCATED = 1 << 18,
};
/* Tag given ID for an update in all the dependency graphs. */