mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix #154892: Cycles CUDA error when disabling light tree
The check assumed that only enabling a feature could require extra state,
but with 4b34743b4e disabling the light tree actually requires more
state. So just check for equality. I can't find a good reason it didn't
do that before, this should not have significant overhead.
Pull Request: https://projects.blender.org/blender/blender/pulls/154926
This commit is contained in:
parent
ffc8d818e4
commit
3a1ffd512f
1 changed files with 4 additions and 2 deletions
|
|
@ -110,10 +110,12 @@ void PathTraceWorkGPU::alloc_integrator_soa()
|
|||
{
|
||||
/* IntegrateState allocated as structure of arrays. */
|
||||
|
||||
/* Check if we already allocated memory for the required features. */
|
||||
/* Check if we already allocated memory for the required features.
|
||||
* Note that both disabling and enabling features may require memory
|
||||
* allocations, so we check for equality. */
|
||||
const int requested_volume_stack_size = device_scene_->data.volume_stack_size;
|
||||
const uint kernel_features = device_scene_->data.kernel_features;
|
||||
if ((integrator_state_soa_kernel_features_ & kernel_features) == kernel_features &&
|
||||
if (integrator_state_soa_kernel_features_ == kernel_features &&
|
||||
integrator_state_soa_volume_stack_size_ >= requested_volume_stack_size)
|
||||
{
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue