Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Fixes
- Plug : Fixed bug which meant nodes would fail to update if a newly created plug was renamed before being parented to the node.
- Metadata : Fixed handling of exceptions thrown from value functions implemented in Python. These are now correctly translated into C++ exceptions.
- Cycles, OSLObject, OSLImage, Expression : Fixed crashes when using OSL on macOS.
- Cycles : Use ccl::DeviceInfo's 'num' entry instead of typeIndex for the index representation of the GPU device number.

1.6.16.0 (relative to 1.6.15.0)
========
Expand Down
4 changes: 2 additions & 2 deletions python/GafferCyclesUI/CyclesOptionsUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,10 @@ def __registerDevicePresets() :
typeIndices[device["type"]] += 1

presetNames.append( "{}/{}".format( device["type"], device["description"] ) )
presetValues.append( "{}:{:02}".format( device["type"], typeIndex ) )
presetValues.append( "{}:{:02}".format( device["type"], device["num"].value ) )

presetNames.append( "{}/{} + CPU".format( device["type"], device["description"] ) )
presetValues.append( "CPU {}:{:02}".format( device["type"], typeIndex ) )
presetValues.append( "CPU {}:{:02}".format( device["type"], device["num"].value ) )

for deviceType, count in typeIndices.items() :

Expand Down
2 changes: 1 addition & 1 deletion src/GafferCycles/IECoreCyclesPreview/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2358,7 +2358,7 @@ ccl::DeviceInfo matchingDevices( const std::string &pattern, int threads, bool b
{
const string typeString = ccl::Device::string_from_type( device.type );
const int typeIndex = typeIndices[device.type]++;
const string name = fmt::format( "{}:{:02}", typeString, typeIndex );
const string name = fmt::format( "{}:{:02}", typeString, device.num );
if(
// e.g. "CPU" matches the first CPU device.
( typeIndex == 0 && StringAlgo::matchMultiple( typeString, pattern ) ) ||
Expand Down
Loading