HLSL: Fix #902: Incorrect protection against zero arguments.
This commit is contained in:
25
Test/hlsl.function.frag
Normal file
25
Test/hlsl.function.frag
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user