[Mesa-dev] [PATCH 17/26] glsl: add pack varying to resource list for vertex input / fragment output

Timothy Arceri timothy.arceri at collabora.com
Mon Feb 29 01:17:57 UTC 2016


This is needed now that we pack these type of varyings when they have a
component layout qualifier.

Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
---
 src/compiler/glsl/linker.cpp | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 8568eb8..f4708fa 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -3842,14 +3842,14 @@ build_program_resource_list(struct gl_shader_program *shProg)
    if (input_stage == MESA_SHADER_STAGES && output_stage == 0)
       return;
 
-   /* Program interface needs to expose varyings in case of SSO. */
-   if (shProg->SeparateShader) {
-      if (!add_packed_varyings(shProg, input_stage, GL_PROGRAM_INPUT))
-         return;
-
-      if (!add_packed_varyings(shProg, output_stage, GL_PROGRAM_OUTPUT))
-         return;
-   }
+   /* Program interface needs to expose varyings in case of SSO, or in case of
+    * vertex inputs/fragment outputs that are packed using the component
+    * layout qualifier.
+    */
+   if (!add_packed_varyings(shProg, input_stage, GL_PROGRAM_INPUT))
+      return;
+   if (!add_packed_varyings(shProg, output_stage, GL_PROGRAM_OUTPUT))
+      return;
 
    if (!add_fragdata_arrays(shProg))
       return;
-- 
2.5.0



More information about the mesa-dev mailing list