Skip to content

Commit 2bf952a

Browse files
committed
Further simplifying device scanning via IECoreCycles::devices()
1 parent 5fd83d4 commit 2bf952a

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/GafferCycles/IECoreCyclesPreview/Renderer.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3829,13 +3829,8 @@ class CyclesRenderer final : public IECoreScenePreview::Renderer
38293829
ccl::DeviceType device_type_fallback = ccl::DEVICE_CPU;
38303830
ccl::DeviceInfo device_fallback;
38313831

3832-
ccl::vector<ccl::DeviceInfo> devices = ccl::Device::available_devices( ccl::DEVICE_MASK_CPU | ccl::DEVICE_MASK_OPENCL | ccl::DEVICE_MASK_CUDA
3833-
#ifdef WITH_OPTIX
3834-
| ccl::DEVICE_MASK_OPTIX
3835-
#endif
3836-
);
38373832
bool device_available = false;
3838-
for( ccl::DeviceInfo& device : devices )
3833+
for( const ccl::DeviceInfo& device : IECoreCycles::devices() )
38393834
{
38403835
if( device_type_fallback == device.type )
38413836
{
@@ -3852,7 +3847,7 @@ class CyclesRenderer final : public IECoreScenePreview::Renderer
38523847
}
38533848
else
38543849
{
3855-
for( ccl::DeviceInfo& device : devices )
3850+
for( const ccl::DeviceInfo& device : IECoreCycles::devices() )
38563851
{
38573852
if( m_deviceName == device.id )
38583853
{

0 commit comments

Comments
 (0)