Merge branch 'blender-v4.4-release'
This commit is contained in:
@@ -651,7 +651,7 @@ Build Cycles kernels with address sanitizer when WITH_COMPILER_ASAN is on, even
|
||||
OFF
|
||||
)
|
||||
set(CYCLES_TEST_DEVICES CPU CACHE STRING "\
|
||||
Run regression tests on the specified device types (CPU CUDA OPTIX HIP)"
|
||||
Run regression tests on the specified device types (CPU CUDA OPTIX HIP HIP-RT METAL METAL-RT ONEAPI ONEAPI-RT)"
|
||||
)
|
||||
option(WITH_CYCLES_TEST_OSL "\
|
||||
Run additional Cycles test with OSL enabled"
|
||||
|
||||
@@ -2543,7 +2543,7 @@ enum {
|
||||
};
|
||||
|
||||
struct ImageNewData {
|
||||
PropertyPointerRNA pprop;
|
||||
PropertyPointerRNA pprop = {};
|
||||
};
|
||||
|
||||
static ImageNewData *image_new_init(bContext *C, wmOperator *op)
|
||||
@@ -2552,7 +2552,7 @@ static ImageNewData *image_new_init(bContext *C, wmOperator *op)
|
||||
return static_cast<ImageNewData *>(op->customdata);
|
||||
}
|
||||
|
||||
ImageNewData *data = static_cast<ImageNewData *>(MEM_callocN(sizeof(ImageNewData), __func__));
|
||||
ImageNewData *data = MEM_new<ImageNewData>(__func__);
|
||||
UI_context_active_but_prop_get_templateID(C, &data->pprop.ptr, &data->pprop.prop);
|
||||
op->customdata = data;
|
||||
return data;
|
||||
@@ -2560,7 +2560,9 @@ static ImageNewData *image_new_init(bContext *C, wmOperator *op)
|
||||
|
||||
static void image_new_free(wmOperator *op)
|
||||
{
|
||||
MEM_SAFE_FREE(op->customdata);
|
||||
if (op->customdata) {
|
||||
MEM_delete(static_cast<ImageNewData *>(op->customdata));
|
||||
}
|
||||
}
|
||||
|
||||
static int image_new_exec(bContext *C, wmOperator *op)
|
||||
@@ -2656,7 +2658,7 @@ static int image_new_invoke(bContext *C, wmOperator *op, const wmEvent * /*event
|
||||
{
|
||||
/* Get property in advance, it doesn't work after WM_operator_props_dialog_popup. */
|
||||
ImageNewData *data;
|
||||
op->customdata = data = static_cast<ImageNewData *>(MEM_callocN(sizeof(ImageNewData), __func__));
|
||||
op->customdata = data = MEM_new<ImageNewData>(__func__);
|
||||
UI_context_active_but_prop_get_templateID(C, &data->pprop.ptr, &data->pprop.prop);
|
||||
|
||||
/* Better for user feedback. */
|
||||
|
||||
@@ -331,9 +331,18 @@ GPUShader *GPU_shader_create_from_python(std::optional<StringRefNull> vertcode,
|
||||
std::optional<StringRefNull> fragcode,
|
||||
std::optional<StringRefNull> geomcode,
|
||||
std::optional<StringRefNull> libcode,
|
||||
const std::optional<StringRefNull> defines,
|
||||
std::optional<StringRefNull> defines,
|
||||
const std::optional<StringRefNull> name)
|
||||
{
|
||||
std::string defines_cat = "#define GPU_RAW_PYTHON_SHADER\n";
|
||||
if (defines) {
|
||||
defines_cat += defines.value();
|
||||
defines = defines_cat;
|
||||
}
|
||||
else {
|
||||
defines = defines_cat;
|
||||
}
|
||||
|
||||
std::string libcodecat;
|
||||
|
||||
if (!libcode) {
|
||||
|
||||
@@ -11,6 +11,13 @@ SHADER_LIBRARY_CREATE_INFO(gpu_srgb_to_framebuffer_space)
|
||||
/* Undefine the macro that avoids compilation errors. */
|
||||
#undef blender_srgb_to_framebuffer_space
|
||||
|
||||
/* Raw python shaders don't have create infos and thus don't generate the needed `srgbTarget`
|
||||
* uniform automatically. For API compatibility, we sill define this loose uniform, but it will
|
||||
* not be parsed by the Metal or Vulkan backend. */
|
||||
#ifdef GPU_RAW_PYTHON_SHADER
|
||||
uniform bool srgbTarget = false;
|
||||
#endif
|
||||
|
||||
vec4 blender_srgb_to_framebuffer_space(vec4 in_color)
|
||||
{
|
||||
if (srgbTarget) {
|
||||
|
||||
@@ -99,7 +99,7 @@ struct PointerRNA {
|
||||
extern const PointerRNA PointerRNA_NULL;
|
||||
|
||||
struct PropertyPointerRNA {
|
||||
PointerRNA ptr;
|
||||
PointerRNA ptr = {};
|
||||
PropertyRNA *prop = nullptr;
|
||||
};
|
||||
|
||||
@@ -107,10 +107,10 @@ struct PropertyPointerRNA {
|
||||
* Stored result of a RNA path lookup (as used by anim-system)
|
||||
*/
|
||||
struct PathResolvedRNA {
|
||||
PointerRNA ptr;
|
||||
PropertyRNA *prop;
|
||||
PointerRNA ptr = {};
|
||||
PropertyRNA *prop = nullptr;
|
||||
/** -1 for non-array access. */
|
||||
int prop_index;
|
||||
int prop_index = -1;
|
||||
};
|
||||
|
||||
/* Property */
|
||||
|
||||
@@ -613,6 +613,7 @@ if(WITH_CYCLES OR WITH_GPU_RENDER_TESTS)
|
||||
# Cycles
|
||||
if(WITH_CYCLES)
|
||||
set(_cycles_blocklist "")
|
||||
set(_cycles_known_test_devices CPU CUDA OPTIX HIP HIP-RT METAL METAL-RT ONEAPI ONEAPI-RT)
|
||||
if((NOT WITH_CYCLES_OSL) OR (WITH_CYCLES_TEST_OSL AND WITH_CYCLES_OSL))
|
||||
# Disable OSL tests if built without OSL or
|
||||
# Disable OSL tests during the "normal" test phase to avoid double
|
||||
@@ -620,6 +621,10 @@ if(WITH_CYCLES OR WITH_GPU_RENDER_TESTS)
|
||||
set(_cycles_blocklist OSL)
|
||||
endif()
|
||||
foreach(_cycles_device ${CYCLES_TEST_DEVICES})
|
||||
if(NOT ${_cycles_device} IN_LIST _cycles_known_test_devices)
|
||||
message(FATAL_ERROR "Unknown Cycles test device ${_cycles_device}."
|
||||
"Supported devices are: ${_cycles_known_test_devices}")
|
||||
endif()
|
||||
string(TOLOWER "${_cycles_device}" _cycles_device_lower)
|
||||
set(_cycles_render_tests bake;${render_tests};osl)
|
||||
|
||||
@@ -662,6 +667,7 @@ if(WITH_CYCLES OR WITH_GPU_RENDER_TESTS)
|
||||
endforeach()
|
||||
endforeach()
|
||||
unset(_cycles_blocklist)
|
||||
unset(_cycles_known_test_devices)
|
||||
endif()
|
||||
|
||||
if(WITH_GPU_RENDER_TESTS)
|
||||
|
||||
Reference in New Issue
Block a user