Commit 84e59203 by t.jung

updates overload handling to be more careful when allowing overloads over texture types

Change-Id: I60cf0b0e03da89b0e415125f1a9ffb1de7db71d4
parent aa6d5629
...@@ -4560,6 +4560,39 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, const TFu ...@@ -4560,6 +4560,39 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, const TFu
// but it is allowed to promote its other arguments. // but it is allowed to promote its other arguments.
if (arg == 0) if (arg == 0)
return false; return false;
break;
case EOpMethodSample:
case EOpMethodSampleBias:
case EOpMethodSampleCmp:
case EOpMethodSampleCmpLevelZero:
case EOpMethodSampleGrad:
case EOpMethodSampleLevel:
case EOpMethodLoad:
case EOpMethodGetDimensions:
case EOpMethodGetSamplePosition:
case EOpMethodGather:
case EOpMethodCalculateLevelOfDetail:
case EOpMethodCalculateLevelOfDetailUnclamped:
case EOpMethodGatherRed:
case EOpMethodGatherGreen:
case EOpMethodGatherBlue:
case EOpMethodGatherAlpha:
case EOpMethodGatherCmp:
case EOpMethodGatherCmpRed:
case EOpMethodGatherCmpGreen:
case EOpMethodGatherCmpBlue:
case EOpMethodGatherCmpAlpha:
case EOpMethodAppend:
case EOpMethodRestartStrip:
// those are method calls, the object type can not be changed
// they are equal if the dim and type match (is dim sufficient?)
if (arg == 0)
return from.getSampler().type == to.getSampler().type &&
from.getSampler().arrayed == to.getSampler().arrayed &&
from.getSampler().shadow == to.getSampler().shadow &&
from.getSampler().ms == to.getSampler().ms &&
from.getSampler().dim == to.getSampler().dim;
break;
default: default:
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment