aboutsummaryrefslogtreecommitdiffstats
path: root/src/vulkan/overlay-layer/overlay.vert
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2019-01-19 21:26:12 +0000
committerLionel Landwerlin <[email protected]>2019-02-21 18:06:05 +0000
commit20c370c6b16282424f3a2fc3166132c1ed82863a (patch)
tree29021496e3db605ce6dd4816f70794040598adb1 /src/vulkan/overlay-layer/overlay.vert
parent89f03d187251fa46264218ccedb90e2ae2ea1d93 (diff)
vulkan: add an overlay layer
Just a starting point to display frame timings & drawcalls/submissions per frame. Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Jason Ekstrand <[email protected]> +1-by: Mike Lothian <[email protected]> +1-by: Tapani Pälli <[email protected]> +1-by: Eric Engestrom <[email protected]> +1-by: Yurii Kolesnykov <[email protected]> +1-by: myfreeweb <[email protected]> +1-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/vulkan/overlay-layer/overlay.vert')
-rw-r--r--src/vulkan/overlay-layer/overlay.vert25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/vulkan/overlay-layer/overlay.vert b/src/vulkan/overlay-layer/overlay.vert
new file mode 100644
index 00000000000..20b29082780
--- /dev/null
+++ b/src/vulkan/overlay-layer/overlay.vert
@@ -0,0 +1,25 @@
+#version 450 core
+layout(location = 0) in vec2 aPos;
+layout(location = 1) in vec2 aUV;
+layout(location = 2) in vec4 aColor;
+
+layout(push_constant) uniform uPushConstant{
+ vec2 uScale;
+ vec2 uTranslate;
+} pc;
+
+out gl_PerVertex{
+ vec4 gl_Position;
+};
+
+layout(location = 0) out struct{
+ vec4 Color;
+ vec2 UV;
+} Out;
+
+void main()
+{
+ Out.Color = aColor;
+ Out.UV = aUV;
+ gl_Position = vec4(aPos*pc.uScale+pc.uTranslate, 0, 1);
+}