With this fix, AZSLc fails when undefined SRG variables or functions
are detected during code emission.
BEFORE:
The shader pipeline would rely on DXC to detect the error,
which would be a non-informative error like:
"""
shadersource:561:23: error: use of undeclared identifier 'MaterialSrg'"
"""
NOW:
AZSLc itself detects the error and the message looks like:
"""
StandardPBR_ForwardPass.azslin(1031,24) : Emitter error #267:
Undefined ShaderResourceGroup symbol 'MaterialSrg::m_specularF0Factor'
"""
Added a couple of test cases where the error is expected to occur.
With this fix, AZSLc fails when undefined SRG variables or functions are detected during code emission.
BEFORE: The shader pipeline would rely on DXC to detect the error, which would be a non-informative error like: """ shadersource:561:23: error: use of undeclared identifier 'MaterialSrg'" """
NOW: AZSLc itself detects the error and the message looks like: """ StandardPBR_ForwardPass.azslin(1031,24) : Emitter error #267: Undefined ShaderResourceGroup symbol 'MaterialSrg::m_specularF0Factor' """
Added a couple of test cases where the error is expected to occur.
Signed-off-by: garrieta garrieta@amazon.com