HLSL: fix preprocessor concatenation behaviour.

Fix #772.
This commit is contained in:
xavier
2017-08-24 08:28:57 +02:00
parent 82e95a3aa5
commit eb71cdd5bb
6 changed files with 580 additions and 0 deletions

24
Test/hlsl.semantic-1.vert Normal file
View File

@@ -0,0 +1,24 @@
#define DLAYER 3
#define DMACRO1 TEXCOORD1
#define DMACRO(num) TEXCOORD##num
struct S {
float4 pos : POSITION;
float2 UV0 : TEXCOORD0;
float2 UV1 : DMACRO1;
float2 UV2 : DMACRO(2);
float2 UV3 : DMACRO(DLAYER);
};
S main(float4 v : POSITION)
{
S s;
s.pos = v;
s.UV0 = float2(v.x,v.x);
s.UV1 = float2(v.y,v.y);
s.UV2 = float2(v.z,v.z);
s.UV3 = float2(v.w,v.w);
return s;
}