HLSL: Fix #902: Incorrect protection against zero arguments.

This commit is contained in:
John Kessenich
2017-05-24 16:02:56 -06:00
parent 2c6f48b1f6
commit 6e2295d340
4 changed files with 157 additions and 6 deletions

25
Test/hlsl.function.frag Normal file
View File

@@ -0,0 +1,25 @@
float4 fun0()
{
return 1.0f;
}
uint fun2(float4 col)
{
return 7;
}
float4 fun4(uint id1, uint id2)
{
return id1 * id2;
}
float4 fun1(int index)
{
uint entityId = fun2(fun0());
return fun4(entityId, entityId);
}
int main() : SV_TARGET
{
return fun1;
}