From 6c4b8727ef012039f895fe0598bbd11e305c6620 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Tue, 7 Jan 2020 18:27:13 -0800 Subject: [PATCH] Fix interface mismatch between VS and GS in deferredshadows GLSLang determines the content of the builtin block based on the shading language version. In the case of 420 vs 450, the difference is whether the gl_CullDistance member is present. Vulkan requires that the builtin interface block be the same on both sides of a shader interface not involving the fragment shader, so this leads to undefined behavior. This is caught by recent versions of the validation layers. Fix the issue by using GLSL 450 for both shaders in the pipeline. --- data/shaders/deferredshadows/shadow.geom | 4 ++-- data/shaders/deferredshadows/shadow.geom.spv | Bin 2196 -> 2300 bytes 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/shaders/deferredshadows/shadow.geom b/data/shaders/deferredshadows/shadow.geom index 5085e61a..2ca45c97 100644 --- a/data/shaders/deferredshadows/shadow.geom +++ b/data/shaders/deferredshadows/shadow.geom @@ -1,4 +1,4 @@ -#version 420 +#version 450 #define LIGHT_COUNT 3 @@ -24,4 +24,4 @@ void main() EmitVertex(); } EndPrimitive(); -} \ No newline at end of file +} diff --git a/data/shaders/deferredshadows/shadow.geom.spv b/data/shaders/deferredshadows/shadow.geom.spv index b4a030e234d1ef4f357fc6ab8ce9bfc49d27e515..3858414b01ecc8e6bbc8934d7c7a7102d1b544f9 100644 GIT binary patch delta 147 zcmbOt_(yQU3dTblR~j=4voWwU7%(s}FavRVPP}tzPR``ZjE!J%D^&5#-b|8=f*uU4 za1Go*1uT;jnZ3cHFy&y;%`2HtGV-&5m9hhsu>rCE