Merge branch 'blender-v2.93-release'

This commit is contained in:
Antonio Vazquez
2021-05-18 15:43:06 +02:00
3 changed files with 18 additions and 14 deletions

View File

@@ -911,8 +911,12 @@ void BKE_ocean_init(struct Ocean *o,
for (i = 0; i < o->_M; i++) { for (i = 0; i < o->_M; i++) {
for (j = 0; j < o->_N; j++) { for (j = 0; j < o->_N; j++) {
/* This ensures we get a value tied to the surface location, avoiding dramatic surface /* This ensures we get a value tied to the surface location, avoiding dramatic surface
* change with changing resolution. */ * change with changing resolution.
int new_seed = seed + BLI_hash_int_2d(o->_kx[i] * 360.0f, o->_kz[j] * 360.0f); * Explicitly cast to signed int first to ensure consistent behavior on all processors,
* since behavior of float to unsigned int cast is undefined in C. */
const int hash_x = o->_kx[i] * 360.0f;
const int hash_z = o->_kz[j] * 360.0f;
int new_seed = seed + BLI_hash_int_2d(hash_x, hash_z);
BLI_rng_seed(rng, new_seed); BLI_rng_seed(rng, new_seed);
float r1 = gaussRand(rng); float r1 = gaussRand(rng);

View File

@@ -819,7 +819,10 @@ static void gpencil_draw_mask(GPENCIL_Data *vedata, GPENCIL_tObject *ob, GPENCIL
} }
GPENCIL_tLayer *mask_layer = gpencil_layer_cache_get(ob, i); GPENCIL_tLayer *mask_layer = gpencil_layer_cache_get(ob, i);
BLI_assert(mask_layer); /* When filtering by viewlayer, the mask could be null and must be ignored. */
if (mask_layer == NULL) {
continue;
}
DRW_draw_pass(mask_layer->geom_ps); DRW_draw_pass(mask_layer->geom_ps);
} }

View File

@@ -240,17 +240,14 @@ add_blender_test(
--run-all-tests --run-all-tests
) )
# disabled on macOS arm64 until updated & working if(WITH_MOD_OCEANSIM)
if(NOT (APPLE AND ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64"))) add_blender_test(
if(WITH_MOD_OCEANSIM) physics_ocean
add_blender_test( ${TEST_SRC_DIR}/physics/ocean_test.blend
physics_ocean --python ${TEST_PYTHON_DIR}/physics_ocean.py
${TEST_SRC_DIR}/physics/ocean_test.blend --
--python ${TEST_PYTHON_DIR}/physics_ocean.py --run-all-tests
-- )
--run-all-tests
)
endif()
endif() endif()