HLSL: allow length() on scalars
This commit is contained in:
parent
93750bc0a4
commit
1ca04c2bbd
5 changed files with 123 additions and 8 deletions
|
|
@ -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 },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue