Please, can we get this patch committed? (along with the other patches this one depends on)<br><br>We need this to enable full loop unrolling for r3xx->r4xx fragment shaders, which don't support loops. It's needed for the blur shader in KWin to work. This is a regression since the GLSL compiler merge, because the previous compiler did unroll loops automatically. I'd like to get this fixed for 7.9.<br>
<br>Thanks.<br><br>Reported as a bug:<br><a href="https://bugs.freedesktop.org/show_bug.cgi?id=30007" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=30007</a><br><br>Marek<br><br><div class="gmail_quote">On Mon, Sep 6, 2010 at 3:30 AM, Luca Barbieri <span dir="ltr"><<a href="mailto:luca@luca-barbieri.com" target="_blank">luca@luca-barbieri.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">This turns on if conversion and unlimited loop unrolling if control<br>
flow is not supported.<br>
<br>
Also, programs whose control flow cannot be emulated will now<br>
fail GLSL linkage.<br>
---<br>
src/mesa/state_tracker/st_extensions.c | 9 +++++++++<br>
1 files changed, 9 insertions(+), 0 deletions(-)<br>
<br>
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c<br>
index e505f26..6780126 100644<br>
--- a/src/mesa/state_tracker/st_extensions.c<br>
+++ b/src/mesa/state_tracker/st_extensions.c<br>
@@ -168,7 +168,16 @@ void st_init_limits(struct st_context *st)<br>
pc->MaxNativeAddressRegs = screen->get_shader_param(screen, i, PIPE_SHADER_CAP_MAX_ADDRS);<br>
pc->MaxNativeParameters = screen->get_shader_param(screen, i, PIPE_SHADER_CAP_MAX_CONSTS);<br>
<br>
+ /* TODO: make these more fine-grained if anyone needs it */<br>
+ options->EmitNoIfs = !screen->get_shader_param(screen, i, PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH);<br>
+ options->EmitNoFunctions = !screen->get_shader_param(screen, i, PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH);<br>
+ options->EmitNoLoops = !screen->get_shader_param(screen, i, PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH);<br>
+ options->EmitNoMainReturn = !screen->get_shader_param(screen, i, PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH);<br>
+<br>
options->EmitNoCont = !screen->get_shader_param(screen, i, PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED);<br>
+<br>
+ if(options->EmitNoLoops)<br>
+ options->MaxUnrollIterations = MIN2(screen->get_shader_param(screen, i, PIPE_SHADER_CAP_MAX_INSTRUCTIONS), 65536);<br>
}<br>
<br>
/* PIPE_CAP_MAX_FS_INPUTS specifies the number of COLORn + GENERICn inputs<br>
<font color="#888888">--<br>
1.7.0.4<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></blockquote></div><br>