Devsh-Graphics-Programming / Nabla

Vulkan, OptiX and CUDA Interoperation Modular Rendering Library and Framework for PC/Linux/Android
http://devsh.eu
Apache License 2.0
493 stars 59 forks source link

update getRegions() to return std::span<> instead of core::SRange<> #720

Closed tad1 closed 4 months ago

tad1 commented 4 months ago

Description

shallowly updates getRegions() in ICPUImage.h (and methods explicit usages) to use std::span<>

to obtain raw pointers (required by some methods) <span>.data() and <span>.data() + <span>.size() is used, since it's the only method to access raw pointers without dereferencing iterators

dereferencing .end() iterator may cause address violation segfault

Testing

passes 24_ColorSpaceTest (requires a patch - see 0aa4c5)

TODO list:

devshgraphicsprogrammingjenkins commented 4 months ago

[CI]: Can one of the admins verify this patch?

devshgraphicsprogramming commented 4 months ago

Maybe make the executePerRegion take a span as well?

tad1 commented 4 months ago

Maybe make the executePerRegion take a span as well?

done in 42c1f12