You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am converting a Direct X SDK Sample Code (June 2010 DX SDK Tutorial 7) to MSL, and the sampler ends up being declared as sampler samplersamLinear, and later used as samLinear.
I believe it is because of an incorrect order of ternary operator assignment in toMetalDecleration.cpp (line 1965):
// for some reason we have some samplers start with "sampler" and some not
const bool startsWithSampler = name.find("sampler") == 0;
Hi all,
I am converting a Direct X SDK Sample Code (June 2010 DX SDK Tutorial 7) to MSL, and the sampler ends up being declared as sampler samplersamLinear, and later used as samLinear.
I believe it is because of an incorrect order of ternary operator assignment in toMetalDecleration.cpp (line 1965):
// for some reason we have some samplers start with "sampler" and some not
const bool startsWithSampler = name.find("sampler") == 0;
std::ostringstream samplerOss;
samplerOss << (startsWithSampler ? "" : "sampler") << name;
std::string samplerName = samplerOss.str();
I believe it should be:
samplerOss << (startsWithSampler ? "sampler" : "" ) << name;
This fix ends up working correctly for me.
Thanks.
The text was updated successfully, but these errors were encountered: