HLSL: allow length() on scalars
This commit is contained in:
@@ -359,7 +359,7 @@ inline bool IsValid(const char* cname, char retOrder, char retType, char argOrde
|
||||
const std::string name(cname);
|
||||
|
||||
// these do not have vec1 versions
|
||||
if (dim0 == 1 && (name == "length" || name == "normalize" || name == "reflect" || name == "refract"))
|
||||
if (dim0 == 1 && (name == "normalize" || name == "reflect" || name == "refract"))
|
||||
return false;
|
||||
|
||||
if (!IsTextureType(argOrder) && (isVec && dim0 == 1)) // avoid vec1
|
||||
@@ -625,7 +625,7 @@ void TBuiltInParseablesHlsl::initialize(int /*version*/, EProfile /*profile*/, c
|
||||
{ "isinf", nullptr, "B" , "SVM", "F", EShLangAll, false },
|
||||
{ "isnan", nullptr, "B" , "SVM", "F", EShLangAll, false },
|
||||
{ "ldexp", nullptr, nullptr, "SVM,", "F,", EShLangAll, false },
|
||||
{ "length", "S", "F", "V", "F", EShLangAll, false },
|
||||
{ "length", "S", "F", "SV", "F", EShLangAll, false },
|
||||
{ "lerp", nullptr, nullptr, "VM,,", "F,,", EShLangAll, false },
|
||||
{ "lerp", nullptr, nullptr, "SVM,,S", "F,,", EShLangAll, false },
|
||||
{ "lit", "V4", "F", "S,,", "F,,", EShLangAll, false },
|
||||
|
||||
Reference in New Issue
Block a user