From 5b7c254d24653fd1c19157e8d5ef68a7e787ff58 Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Mon, 10 Jul 2017 09:29:11 -0700 Subject: Start handling system-value semantics during lowering I hadn't been lowering `SV_Position` outputs to `gl_Position`, and had somehow been relying on hidden driver behavior that I guess made things Just Work. This change adds some infrastructure to handle `SV_` semantics during lowering of an entry point (currently only covering `SV_Position` and `SV_Target`, FWIW). As a byproduct, this also means that a `VarLayout` stores semantic info, which could conceivably be exposed through reflection data now. --- source/slang/type-layout.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/slang/type-layout.h') diff --git a/source/slang/type-layout.h b/source/slang/type-layout.h index 3ee12656c..262a8c3b1 100644 --- a/source/slang/type-layout.h +++ b/source/slang/type-layout.h @@ -237,6 +237,10 @@ public: // Additional flags VarLayoutFlags flags = 0; + // System-value semantic (and index) if this is a system value + String systemValueSemantic; + int systemValueSemanticIndex; + // The start register(s) for any resources struct ResourceInfo { -- cgit v1.2.3