HLSL: enable #line extension by default for HLSL source.
This commit is contained in:
parent
b8d2a006d1
commit
6256146ef3
6 changed files with 160 additions and 2 deletions
24
Test/hlsl.pp.line.frag
Normal file
24
Test/hlsl.pp.line.frag
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
#line 1
|
||||
|
||||
struct PS_OUTPUT
|
||||
{
|
||||
float4 Color : SV_Target0;
|
||||
float Depth : SV_Depth;
|
||||
};
|
||||
|
||||
#line 2
|
||||
|
||||
PS_OUTPUT main()
|
||||
{
|
||||
PS_OUTPUT psout;
|
||||
|
||||
#line 123 "SomeFile.frag"
|
||||
|
||||
int thisLineIs = __LINE__; // gets 124
|
||||
|
||||
psout.Color = float4(thisLineIs, 0, 0, 1);
|
||||
psout.Depth = 1.0;
|
||||
|
||||
return psout;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue