summaryrefslogtreecommitdiff
path: root/tests/bindings/multi-file-extra.hlsl
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2018-04-11 16:18:29 -0700
committerGitHub <noreply@github.com>2018-04-11 16:18:29 -0700
commitbaf194e7456ba4568dcf11249896af35b3ce18cc (patch)
treef75e20db450100d41bfa9c384a8bab0fdc28a749 /tests/bindings/multi-file-extra.hlsl
parent6322983fa4dc84ef1e9dd8fad54d4c1580436e67 (diff)
Introduce an IR-level type system (#481)
* Introduce an IR-level type system Up to this point, the Slang IR has used the front-end type system to represent types in the IR. As a result (but ultimately more importantly) the IR representation of generics and specialization has used AST-level concepts embedded in the IR. For example, to express the specialization of `vector<T,N>` to a concrete type `float` for `T`, we needed an IR operation that could represent the specialization, with operands that somehow represented the type argument `float`. The whole thing was very complicated. The big idea of this change is to introduce a new representation in which types in the IR are just ordinary instructions, so that using them as operands makes sense. The hierarchy of IR types closely mirrors the AST-side hierarchy for now, and that will probably be something we should maintain going forward. In order to make these changes work, though, I also had to do major overhauls of things like the way substitutions are performed, how we check interface conformances, the way lookup through interface types is done, etc. etc. This is a big change, and unfortunately any attempt to summarize it in the commit message wouldn't do it justice. * Fix 64-bit build warning * Fix up some clang warnings/errors
Diffstat (limited to 'tests/bindings/multi-file-extra.hlsl')
-rw-r--r--tests/bindings/multi-file-extra.hlsl32
1 files changed, 31 insertions, 1 deletions
diff --git a/tests/bindings/multi-file-extra.hlsl b/tests/bindings/multi-file-extra.hlsl
index 7852d7c48..8bf8be414 100644
--- a/tests/bindings/multi-file-extra.hlsl
+++ b/tests/bindings/multi-file-extra.hlsl
@@ -9,6 +9,36 @@
#define R(X) /**/
#else
#define R(X) X
+
+#define sharedC _SV028SLANG_parameterGroup_sharedC
+#define sharedCA _SV028SLANG_ParameterGroup_sharedC8sharedCA
+#define sharedCB _SV028SLANG_ParameterGroup_sharedC8sharedCB
+#define sharedCC _SV028SLANG_ParameterGroup_sharedC8sharedCC
+#define sharedCD _SV028SLANG_ParameterGroup_sharedC8sharedCD
+
+#define vertexC _SV028SLANG_parameterGroup_vertexC
+#define vertexCA _SV028SLANG_ParameterGroup_vertexC8vertexCA
+#define vertexCB _SV028SLANG_ParameterGroup_vertexC8vertexCB
+#define vertexCC _SV028SLANG_ParameterGroup_vertexC8vertexCC
+#define vertexCD _SV028SLANG_ParameterGroup_vertexC8vertexCD
+
+#define fragmentC _SV030SLANG_parameterGroup_fragmentC
+#define fragmentCA _SV030SLANG_ParameterGroup_fragmentC10fragmentCA
+#define fragmentCB _SV030SLANG_ParameterGroup_fragmentC10fragmentCB
+#define fragmentCC _SV030SLANG_ParameterGroup_fragmentC10fragmentCC
+#define fragmentCD _SV030SLANG_ParameterGroup_fragmentC10fragmentCD
+
+#define sharedS _SV07sharedS
+#define sharedT _SV07sharedT
+#define sharedTV _SV08sharedTV
+#define sharedTF _SV08sharedTF
+
+#define vertexS _SV07vertexS
+#define vertexT _SV07vertexT
+
+#define fragmentS _SV09fragmentS
+#define fragmentT _SV09fragmentT
+
#endif
float4 use(float val) { return val; };
@@ -48,7 +78,7 @@ Texture2D sharedTV R(: register(t2));
Texture2D sharedTF R(: register(t3));
-float4 main() : SV_Target
+float4 main() : SV_TARGET
{
// Go ahead and use everything here, just to make sure things got placed correctly
return use(sharedT, sharedS)