Mesa (7.9): glsl: Don't inline function prototypes.
Ian Romanick
idr at kemper.freedesktop.org
Wed Dec 15 23:15:09 UTC 2010
Module: Mesa
Branch: 7.9
Commit: 50ec3c74e3f479eb755aecb20aaa417a57197719
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=50ec3c74e3f479eb755aecb20aaa417a57197719
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Thu Nov 25 00:09:43 2010 -0800
glsl: Don't inline function prototypes.
Currently, the standalone compiler tries to do function inlining before
linking shaders (including linking against the built-in functions).
This resulted in the built-in function _prototypes_ being inlined rather
than the actual function definition.
This is only known to fix a bug in the standalone compiler; most
programs should be unaffected. Still, it seems like a good idea.
NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit e8a24c65bc06a2a098c05728df0da1e5ed61b1de)
---
src/glsl/ir_function_can_inline.cpp | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/glsl/ir_function_can_inline.cpp b/src/glsl/ir_function_can_inline.cpp
index f29f277..c367c30 100644
--- a/src/glsl/ir_function_can_inline.cpp
+++ b/src/glsl/ir_function_can_inline.cpp
@@ -60,6 +60,8 @@ can_inline(ir_call *call)
{
ir_function_can_inline_visitor v;
const ir_function_signature *callee = call->get_callee();
+ if (!callee->is_defined)
+ return false;
v.run((exec_list *) &callee->body);
More information about the mesa-commit
mailing list