4.2LTS: Fix #141171: oneAPI: Rendering artifacts in barbershop scene
max_shaders was not updated when Embree was disabled. Backported from: 7691e6520b213e3b685cf1d6130ad0d0de0c7cf6 Pull Request: https://projects.blender.org/blender/blender/pulls/141230
This commit is contained in:
committed by
Philipp Oeser
parent
45d60bd1c7
commit
495f4ee1e5
@@ -529,18 +529,21 @@ void OneapiDevice::const_copy_to(const char *name, void *host, size_t size)
|
||||
<< string_human_readable_number(size) << " bytes. ("
|
||||
<< string_human_readable_size(size) << ")";
|
||||
|
||||
# ifdef WITH_EMBREE_GPU
|
||||
if (embree_scene != nullptr && strcmp(name, "data") == 0) {
|
||||
if (strcmp(name, "data") == 0) {
|
||||
assert(size <= sizeof(KernelData));
|
||||
KernelData *const data = static_cast<KernelData *>(host);
|
||||
|
||||
/* Update scene handle(since it is different for each device on multi devices) */
|
||||
KernelData *const data = (KernelData *)host;
|
||||
data->device_bvh = embree_scene;
|
||||
|
||||
/* We need this number later for proper local memory allocation. */
|
||||
/* We need this value when allocating local memory for integrator_sort_bucket_pass
|
||||
* and integrator_sort_write_pass kernels. */
|
||||
scene_max_shaders_ = data->max_shaders;
|
||||
}
|
||||
|
||||
# ifdef WITH_EMBREE_GPU
|
||||
if (embree_scene != nullptr) {
|
||||
/* Update scene handle(since it is different for each device on multi devices) */
|
||||
data->device_bvh = embree_scene;
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
||||
ConstMemMap::iterator i = const_mem_map_.find(name);
|
||||
device_vector<uchar> *data;
|
||||
|
||||
Reference in New Issue
Block a user