summaryrefslogtreecommitdiffstats
path: root/source/slang/type-system-shared.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2018-02-23 17:22:36 -0500
committerYong He <yonghe@outlook.com>2018-02-23 17:41:46 -0500
commit5ab20eb2d20d491e258047bd94d9d9d0ac5a5dbf (patch)
treebe054fb8e5767daa3cfe42c51e812f21b6fbdd72 /source/slang/type-system-shared.cpp
parent706675949e70b17860e9ca514c01461fdf9aa95d (diff)
Refactor IR type system, step 0
Pull BaseType, TextureFlavor and SamplerStateFlavor enums and helper functions into a shared file "type-system-shared.h".
Diffstat (limited to 'source/slang/type-system-shared.cpp')
-rw-r--r--source/slang/type-system-shared.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/slang/type-system-shared.cpp b/source/slang/type-system-shared.cpp
new file mode 100644
index 000000000..10ebaee24
--- /dev/null
+++ b/source/slang/type-system-shared.cpp
@@ -0,0 +1,11 @@
+#include "type-system-shared.h"
+
+namespace Slang
+{
+ TextureFlavor TextureFlavor::create(SlangResourceShape shape, SlangResourceAccess access)
+ {
+ TextureFlavor rs;
+ rs.flavor = uint16_t(shape | (access << 8));
+ return rs;
+ }
+}