summaryrefslogtreecommitdiffstats
path: root/tests/preprocessor/import.hlsl
blob: f0618a6679f9dc9005b9fc44649a9b26a7554d61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//TEST:SIMPLE:-target none -profile vs_5_0

// Confirm that `#import` interacts with preprocessor as expected

// Here is a macro that flows from parent to child file
#define FOO float

// Here we import the child file
#import "import.slang.h"

// Here we use a macro that flows the other way (child->parent)
BAR g( FOO x ) { return f(x); }

// Here we confirm that importing the file again is a no-op
#import "import.slang.h"

void main()
{}