Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChip Davis <cdavis@codeweavers.com>2018-11-02 22:39:55 +0300
committerChip Davis <cdavis@codeweavers.com>2018-11-02 22:39:55 +0300
commitca4744ab728e3fe1a6585e07747aa6b7ec6a080f (patch)
tree22f54d58d32abf98203252e113b6ad6e044e96dd /shaders
parent117ccf407c6b2e49ee11550471ecd1edf29842f3 (diff)
Support constants of 16-bit integral type in GLSL and MSL.
Constants of 8-bit type aren't supported in GLSL, since there's no extension letting you use them.
Diffstat (limited to 'shaders')
-rw-r--r--shaders/frag/16bit-constants.frag14
1 files changed, 14 insertions, 0 deletions
diff --git a/shaders/frag/16bit-constants.frag b/shaders/frag/16bit-constants.frag
new file mode 100644
index 00000000..c53091b5
--- /dev/null
+++ b/shaders/frag/16bit-constants.frag
@@ -0,0 +1,14 @@
+#version 450 core
+
+#extension GL_AMD_gpu_shader_int16 : require
+#extension GL_AMD_gpu_shader_half_float : require
+
+layout(location = 0) out float16_t foo;
+layout(location = 1) out int16_t bar;
+layout(location = 2) out uint16_t baz;
+
+void main() {
+ foo = 1.0hf;
+ bar = 2s;
+ baz = 3us;
+}