OLD | NEW |
(Empty) | |
| 1 From e8a24c65bc06a2a098c05728df0da1e5ed61b1de Mon Sep 17 00:00:00 2001 |
| 2 From: Kenneth Graunke <kenneth@whitecape.org> |
| 3 Date: Thu, 25 Nov 2010 08:09:43 +0000 |
| 4 Subject: glsl: Don't inline function prototypes. |
| 5 |
| 6 Currently, the standalone compiler tries to do function inlining before |
| 7 linking shaders (including linking against the built-in functions). |
| 8 This resulted in the built-in function _prototypes_ being inlined rather |
| 9 than the actual function definition. |
| 10 |
| 11 This is only known to fix a bug in the standalone compiler; most |
| 12 programs should be unaffected. Still, it seems like a good idea. |
| 13 |
| 14 NOTE: This is a candidate for the 7.9 branch. |
| 15 --- |
| 16 diff --git a/src/glsl/ir_function_can_inline.cpp b/src/glsl/ir_function_can_inli
ne.cpp |
| 17 index f29f277..c367c30 100644 |
| 18 --- a/src/glsl/ir_function_can_inline.cpp |
| 19 +++ b/src/glsl/ir_function_can_inline.cpp |
| 20 @@ -60,6 +60,8 @@ can_inline(ir_call *call) |
| 21 { |
| 22 ir_function_can_inline_visitor v; |
| 23 const ir_function_signature *callee = call->get_callee(); |
| 24 + if (!callee->is_defined) |
| 25 + return false; |
| 26 |
| 27 v.run((exec_list *) &callee->body); |
| 28 |
| 29 -- |
| 30 cgit v0.8.3-6-g21f6 |
OLD | NEW |