Fix Test/hlsl.namespace.frag test case
authorDavid Neto <dneto@google.com>
Wed, 16 Feb 2022 22:10:29 +0000 (17:10 -0500)
committerDavid Neto <dneto@google.com>
Wed, 16 Feb 2022 22:17:08 +0000 (17:17 -0500)
commit63dbacaa9431b48fb1a6fc83632095a3b4d7dfd7
tree766a8cb4bae7487717310b583eec6211ba8e76be
parent90d4bd05cd77ef5782a6779a0fe3d084440dc80d
Fix Test/hlsl.namespace.frag test case

Before this change, the example is rejected by DXC:

$ dxc -T ps_6_0 hlsl.namespace.frag
hlsl.namespace.frag:22:73: error: call to non-static member function
without an object argument
    return N1::getVec() + N2::getVec() + N2::N3::getVec() + N2::N3::C1::getVec() * N2::gf;
                                                                ~~~~~~~~~~~~^~~~~~

The call to the class member function requires an object, or we ned to
make the function static.  This update makes the function static.

This also fixes SPIR-V validation: without this change the call
to that getVec does not have enough arguments:

error: line 69: OpFunctionCall Function <id>'s parameter count does not
match the argument count.
  %43 = OpFunctionCall %v4float %N2__N3__C1__getVec_
Test/baseResults/hlsl.namespace.frag.out
Test/hlsl.namespace.frag