Compositor: Assert for invalid pixel access
This commit is contained in:
@@ -833,6 +833,9 @@ inline float4 Result::sample_ewa_zero(const float2 &coordinates,
|
||||
|
||||
inline int64_t Result::get_pixel_index(const int2 &texel) const
|
||||
{
|
||||
BLI_assert(!is_single_value_);
|
||||
BLI_assert(this->is_allocated());
|
||||
BLI_assert(texel.x >= 0 && texel.y >= 0 && texel.x < domain_.size.x && texel.y < domain_.size.y);
|
||||
return (int64_t(texel.y) * domain_.size.x + texel.x) * this->channels_count();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user