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

Author: Ilia Mirkin <[email protected]>
Date:   Sat Feb  6 17:08:29 2016 -0500

glsl: return cloned signature, not the builtin one

The builtin data can get released with a glReleaseShaderCompiler call.
We're careful everywhere to clone everything that comes out of builtins
except here, where we accidentally return the signature belonging to the
builtin version, rather than the locally-cloned one.

Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Tested-by: Rob Herring <[email protected]>
Cc: [email protected]

---

 src/compiler/glsl/ast_function.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/compiler/glsl/ast_function.cpp 
b/src/compiler/glsl/ast_function.cpp
index 0eb456a..c7fdcb2 100644
--- a/src/compiler/glsl/ast_function.cpp
+++ b/src/compiler/glsl/ast_function.cpp
@@ -560,7 +560,8 @@ done:
            state->symbols->add_global_function(f);
            emit_function(state, f);
         }
-        f->add_signature(sig->clone_prototype(f, NULL));
+        sig = sig->clone_prototype(f, NULL);
+        f->add_signature(sig);
       }
    }
    return sig;

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

Reply via email to