Module: Mesa
Branch: master
Commit: 8b0f6de73d7bf5cc2b9bb189e5a3fe4d48dd1017
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8b0f6de73d7bf5cc2b9bb189e5a3fe4d48dd1017

Author: Kenneth Graunke <[email protected]>
Date:   Tue Feb  9 02:12:07 2016 -0800

glsl: Disallow transform feedback varyings with compute shaders.

If the only stage is MESA_SHADER_COMPUTE, we should complain that
there's nothing coming out of the geometry shader stage just as
we would if the first stage were MESA_SHADER_FRAGMENT.

Also, it's valid for tessellation shaders to be the stage producing
transform feedback varyings, so mention those in the compiler error.

Found by inspection.

Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>

---

 src/compiler/glsl/linker.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 9dbb926..bad1c17 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -4446,9 +4446,10 @@ link_shaders(struct gl_context *ctx, struct 
gl_shader_program *prog)
        *     non-zero, but the program object has no vertex or geometry
        *     shader;
        */
-      if (first == MESA_SHADER_FRAGMENT) {
+      if (first >= MESA_SHADER_FRAGMENT) {
          linker_error(prog, "Transform feedback varyings specified, but "
-                      "no vertex or geometry shader is present.\n");
+                      "no vertex, tessellation, or geometry shader is "
+                      "present.\n");
          goto done;
       }
 

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to