https://github.com/shader-slang/slang
Raw File
Tip revision: 1b3887f462d01b83690200b9cbcb0dd902b2c0e9 authored by sriramm-nv on 05 April 2024, 23:47:47 UTC
Fix __init() functions that returns an existing value (#3866)
Tip revision: 1b3887f
obfuscated-loc-module.slang
//TEST_IGNORE_FILE:

// obfuscated-loc-module.slang


export int billy(int v)
{
    return v + 1;
}

// This function is designed to fail during IR passes/emit. 
export int silly(int a)
{
    int t = 0;
    [ForceUnroll(10)]
    while ( a > 0)
    {
        t = t + t + a;
    }
    return t;
}
back to top