glslang/Test/hlsl.namespace.frag
John Kessenich 8f9fdc986a HLSL: Add namespace grammar and some basic semantics.
Unknown how extensive the semantics need to be yet. Need real
feedback from workloads. This is just done as part of unifying it
with the class/struct namespaces and grammar productions.
2017-03-30 16:30:17 -06:00

24 lines
455 B
GLSL
Executable File

static float4 v1;
static float4 v2;
namespace N1 {
float4 getVec() { return v1; }
}
namespace N2 {
static float gf;
float4 getVec() { return v2; }
namespace N3 {
float4 getVec() { return v2; }
class C1 {
float4 getVec() { return v2; }
};
}
}
float4 main() : SV_Target0
{
return N1::getVec() + N2::getVec() + N2::N3::getVec() + N2::N3::C1::getVec() * N2::gf;
}