<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 11, 2016 at 4:40 AM, Topi Pohjolainen <span dir="ltr"><<a href="mailto:topi.pohjolainen@intel.com" target="_blank">topi.pohjolainen@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The logic iterates over param[] which contains pointers to<br>
uniform storage set during linking (see<br>
link_assign_uniform_locations()).<br>
<br>
The pointers are unique and it should be impossible to find<br>
matching entries.<br>
<br>
I couldn't find any regressions with test system. In addition<br>
I tried several benchmarks on HSW and none hit this.<br>
<br>
I'm hoping to remove this optimization attempt. This is the only<br>
bit that depends on knowing about the actual storage during<br>
compilation. All the rest deal with just relative push and pull<br>
locations once the actual filling of pull_param[] is moved<br>
outside the compiler just as param[]. (Filling pull_param is<br>
based on the pull locations and doesn't need to be inside the<br>
compiler).<br>
<br>
Any thoughts?<br></blockquote><div><br></div><div>I'm not 100% sure what you're trying to do, but I have a branch that may be of interest:<br><br><a href="https://cgit.freedesktop.org/~jekstrand/mesa/log/?h=wip/i965-uniforms">https://cgit.freedesktop.org/~jekstrand/mesa/log/?h=wip/i965-uniforms</a><br><br></div><div>The branch enables support for pushing small uniform arrays.  Among other things, it redoes the way we do push constants and gets rid of some of the data tracking in the backend compiler.  The big reason why I haven't tried too hard to get it merged is because it regresses Sandy Bridge just a bit.  I know I've seen and fixed the bug before in an alternate attempt, but I don't remember how.<br><br>I'm going to be refreshing it soon because we need indirect push constants for the Vulkan driver.  (The branch is already merged into the Vulkan branch.)<br><br></div><div>--Jason<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Signed-off-by: Topi Pohjolainen <<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>><br>
CC: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
CC: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
CC: Eric Anholt <<a href="mailto:eric@anholt.net">eric@anholt.net</a>><br>
---<br>
 src/mesa/drivers/dri/i965/brw_vec4.cpp | 2 ++<br>
 1 file changed, 2 insertions(+)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp<br>
index cf62ed9..bb62fef 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp<br>
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp<br>
@@ -774,6 +774,8 @@ vec4_visitor::move_push_constants_to_pull_constants()<br>
            }<br>
<br>
            if (matches == 4) {<br>
+               unreachable("Values in param[] are unique, match is impossible");<br>
+               exit(1);<br>
               pull_constant_loc[i / 4] = j / 4;<br>
               break;<br>
            }<br>
<span class=""><font color="#888888">--<br>
2.5.0<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>