blender-v3.6-release backports #112290

Merged
Philipp Oeser merged 9 commits from lichtwerk/blender:blender-v3.6-release into blender-v3.6-release 2023-09-12 17:37:19 +02:00
12 changed files with 45 additions and 42 deletions

View File

@ -1703,7 +1703,7 @@ class CyclesPreferences(bpy.types.AddonPreferences):
elif device_type == 'ONEAPI':
import sys
if sys.platform.startswith("win"):
driver_version = "101.4314"
driver_version = "XX.X.101.4644"
col.label(text="Requires Intel GPU with Xe-HPG architecture", icon='BLANK1')
col.label(text=iface_("and Windows driver version %s or newer") % driver_version,
icon='BLANK1', translate=False)

View File

@ -758,10 +758,14 @@ bool OneapiDevice::enqueue_kernel(KernelContext *kernel_context,
/* Compute-runtime (ie. NEO) version is what gets returned by sycl/L0 on Windows
* since Windows driver 101.3268. */
/* The same min compute-runtime version is currently used across Windows and Linux.
* For Windows driver 101.4314, compute-runtime version is 25977. */
static const int lowest_supported_driver_version_win = 1014314;
static const int lowest_supported_driver_version_win = 1014644;
# ifdef _WIN32
/* For Windows driver 101.4644, compute-runtime version is 26771.
* This information is returned by `ocloc query OCL_DRIVER_VERSION`.*/
static const int lowest_supported_driver_version_neo = 26771;
# else
static const int lowest_supported_driver_version_neo = 25812;
# endif
int OneapiDevice::parse_driver_build_version(const sycl::device &device)
{

View File

@ -845,8 +845,13 @@ if(WITH_CYCLES_DEVICE_ONEAPI)
-fsycl-max-parallel-link-jobs=${SYCL_OFFLINE_COMPILER_PARALLEL_JOBS}
-shared
-DWITH_ONEAPI
-ffast-math
-O2
-fno-fast-math
-ffp-contract=fast
-fassociative-math
-freciprocal-math
-fno-signed-zeros
-ffinite-math-only
-D__KERNEL_LOCAL_ATOMIC_SORT__
-o"${cycles_kernel_oneapi_lib}"
-I"${CMAKE_CURRENT_SOURCE_DIR}/.."

View File

@ -2746,7 +2746,7 @@ class WM_OT_batch_rename(Operator):
'ARMATURE': ("armatures", iface_("Armature(s)"), bpy.types.Armature),
'LATTICE': ("lattices", iface_("Lattice(s)"), bpy.types.Lattice),
'LIGHT': ("lights", iface_("Light(s)"), bpy.types.Light),
'LIGHT_PROBE': ("light_probes", iface_("Light Probe(s)"), bpy.types.LightProbe),
'LIGHT_PROBE': ("lightprobes", iface_("Light Probe(s)"), bpy.types.LightProbe),
'CAMERA': ("cameras", iface_("Camera(s)"), bpy.types.Camera),
'SPEAKER': ("speakers", iface_("Speaker(s)"), bpy.types.Speaker),
}

View File

@ -264,8 +264,6 @@ class bNodeRuntime : NonCopyable, NonMovable {
/** Update flags. */
int update = 0;
/** Initial locx for insert offset animation. */
float anim_init_locx;
/** Offset that will be added to locx for insert offset animation. */
float anim_ofsx;

View File

@ -2238,7 +2238,9 @@ static bool customdata_merge_internal(const CustomData *source,
const int src_layer_flag = src_layer.flag;
if (type != last_type) {
current_type_layer_count = 0;
/* Dont exceed layer count on destination. */
const int layernum_dst = CustomData_number_of_layers(dest, type);
current_type_layer_count = layernum_dst;
max_current_type_layer_count = CustomData_layertype_layers_max(type);
last_active = src_layer.active;
last_render = src_layer.active_rnd;

View File

@ -1361,7 +1361,7 @@ NlaStrip *BKE_nlastrip_next_in_track(struct NlaStrip *strip, bool skip_transitio
{
NlaStrip *next = strip->next;
while (next != NULL) {
if (skip_transitions && (next->type & NLASTRIP_TYPE_TRANSITION)) {
if (skip_transitions && (next->type == NLASTRIP_TYPE_TRANSITION)) {
next = next->next;
}
else {
@ -1375,7 +1375,7 @@ NlaStrip *BKE_nlastrip_prev_in_track(struct NlaStrip *strip, bool skip_transitio
{
NlaStrip *prev = strip->prev;
while (prev != NULL) {
if (skip_transitions && (prev->type & NLASTRIP_TYPE_TRANSITION)) {
if (skip_transitions && (prev->type == NLASTRIP_TYPE_TRANSITION)) {
prev = prev->prev;
}
else {
@ -1959,10 +1959,10 @@ static void BKE_nlastrip_validate_autoblends(NlaTrack *nlt, NlaStrip *nls)
* Strip will be removed / freed if it doesn't fit (invalid).
* Return value indicates if passed strip is valid/fixed or invalid/removed.
*/
static bool nlastrip_validate_transition_start_end(NlaStrip *strip)
static bool nlastrip_validate_transition_start_end(ListBase *strips, NlaStrip *strip)
{
if (!(strip->type & NLASTRIP_TYPE_TRANSITION)) {
if (!(strip->type == NLASTRIP_TYPE_TRANSITION)) {
return true;
}
if (strip->prev) {
@ -1972,7 +1972,7 @@ static bool nlastrip_validate_transition_start_end(NlaStrip *strip)
strip->end = strip->next->start;
}
if (strip->start >= strip->end || strip->prev == NULL || strip->next == NULL) {
BKE_nlastrip_free(strip, true);
BKE_nlastrip_remove_and_free(strips, strip, true);
return false;
}
return true;
@ -1992,7 +1992,7 @@ void BKE_nla_validate_state(AnimData *adt)
for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next) {
LISTBASE_FOREACH_MUTABLE (NlaStrip *, strip, &nlt->strips) {
if (!nlastrip_validate_transition_start_end(strip)) {
if (!nlastrip_validate_transition_start_end(&nlt->strips, strip)) {
printf(
"While moving NLA strips, a transition strip could no longer be applied to the new "
"positions and was removed.\n");

View File

@ -4866,9 +4866,9 @@ static int ui_do_but_EXIT(bContext *C, uiBut *but, uiHandleButtonData *data, con
if (ELEM(event->type, LEFTMOUSE, EVT_PADENTER, EVT_RETKEY) && event->val == KM_PRESS) {
int ret = WM_UI_HANDLER_BREAK;
/* XXX: (a bit ugly) Special case handling for file-browser drag button. */
if (ui_but_drag_is_draggable(but) && but->imb &&
ui_but_contains_point_px_icon(but, data->region, event))
/* XXX: (a bit ugly) Special case handling for file-browser drag buttons (icon and filename
* label). */
if (ui_but_drag_is_draggable(but) && ui_but_contains_point_px_icon(but, data->region, event))
{
ret = WM_UI_HANDLER_CONTINUE;
}

View File

@ -3031,14 +3031,6 @@ static void calc_brush_local_mat(const float rotation,
/* Scale by brush radius. */
float radius = cache->radius;
/* Square tips should scale by square root of 2. */
if (BKE_brush_has_cube_tip(cache->brush, PAINT_MODE_SCULPT)) {
radius += (radius / M_SQRT2 - radius) * cache->brush->tip_roundness;
}
else {
radius /= M_SQRT2;
}
normalize_m4(mat);
scale_m4_fl(scale, radius);
mul_m4_m4m4(tmat, mat, scale);

View File

@ -2317,7 +2317,6 @@ static void node_offset_apply(bNode &node, const float offset_x)
{
/* NODE_TEST is used to flag nodes that shouldn't be offset (again) */
if ((node.flag & NODE_TEST) == 0) {
node.runtime->anim_init_locx = node.locx;
node.runtime->anim_ofsx = (offset_x / UI_SCALE_FAC);
node.flag |= NODE_TEST;
}
@ -2553,18 +2552,16 @@ static int node_insert_offset_modal(bContext *C, wmOperator *op, const wmEvent *
* main thread might be so busy that node hasn't reached final position yet */
for (bNode *node : snode->edittree->all_nodes()) {
if (UNLIKELY(node->runtime->anim_ofsx)) {
const float endval = node->runtime->anim_init_locx + node->runtime->anim_ofsx;
if (IS_EQF(node->locx, endval) == false) {
node->locx = BLI_easing_cubic_ease_in_out(duration,
node->runtime->anim_init_locx,
node->runtime->anim_ofsx,
NODE_INSOFS_ANIM_DURATION);
if (node->runtime->anim_ofsx < 0) {
CLAMP_MIN(node->locx, endval);
}
else {
CLAMP_MAX(node->locx, endval);
}
const float prev_duration = duration - float(iofsd->anim_timer->delta);
/* Clamp duration to not overshoot. */
const float clamped_duration = math::min(duration, NODE_INSOFS_ANIM_DURATION);
if (prev_duration < clamped_duration) {
const float offset_step = node->runtime->anim_ofsx *
(BLI_easing_cubic_ease_in_out(
clamped_duration, 0.0f, 1.0f, NODE_INSOFS_ANIM_DURATION) -
BLI_easing_cubic_ease_in_out(
prev_duration, 0.0f, 1.0f, NODE_INSOFS_ANIM_DURATION));
node->locx += offset_step;
redraw = true;
}
}
@ -2578,7 +2575,7 @@ static int node_insert_offset_modal(bContext *C, wmOperator *op, const wmEvent *
WM_event_remove_timer(CTX_wm_manager(C), nullptr, iofsd->anim_timer);
for (bNode *node : snode->edittree->all_nodes()) {
node->runtime->anim_init_locx = node->runtime->anim_ofsx = 0.0f;
node->runtime->anim_ofsx = 0.0f;
}
MEM_freeN(iofsd);

View File

@ -102,7 +102,7 @@ static float transdata_get_time_shuffle_offset_side(ListBase *trans_datas, const
}
/* Allow overlap with transitions. */
if (non_xformed_strip->type & NLASTRIP_TYPE_TRANSITION) {
if (non_xformed_strip->type == NLASTRIP_TYPE_TRANSITION) {
continue;
}

View File

@ -1980,6 +1980,12 @@ static void RVBlurBitmap2_float(float *map, int width, int height, float blur, i
return;
}
/* If result would be no blurring, early out. */
halfWidth = ((quality + 1) * blur);
if (halfWidth == 0) {
return;
}
/* Allocate memory for the tempmap and the blur filter matrix */
temp = MEM_mallocN(sizeof(float[4]) * width * height, "blurbitmaptemp");
if (!temp) {
@ -1987,7 +1993,6 @@ static void RVBlurBitmap2_float(float *map, int width, int height, float blur, i
}
/* Allocate memory for the filter elements */
halfWidth = ((quality + 1) * blur);
filter = (float *)MEM_mallocN(sizeof(float) * halfWidth * 2, "blurbitmapfilter");
if (!filter) {
MEM_freeN(temp);