<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 5, 2016 at 6:39 AM, Michael Schellenberger Costa <span dir="ltr"><<a href="mailto:mschellenbergercosta@googlemail.com" target="_blank">mschellenbergercosta@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jason,<br></blockquote><div><br></div><div>Hi Michael,<br><br></div><div>FYI, please remember CC the mailing list when you send review feedback. :-)<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
tiny nitpick (therefore not on list)<br>
<div><div class="h5"><br>
Am 05.04.2016 um 00:51 schrieb Jason Ekstrand:<br>
> In the Vulkan driver we use a single flat input instead of a uniform<br>
> because setting up push constants is more disruptive to the pipeline than<br>
> setting up another vertex input. This uses the number of uniforms as a key<br>
> to keep it working for the GL driver.<br>
> ---<br>
> src/mesa/drivers/dri/i965/brw_fs.cpp | 25 ++++++++++++++++++++-----<br>
> 1 file changed, 20 insertions(+), 5 deletions(-)<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp<br>
> index 1a6a229..b138c15 100644<br>
> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp<br>
> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp<br>
> @@ -2787,10 +2787,23 @@ fs_visitor::emit_repclear_shader()<br>
> brw_wm_prog_key *key = (brw_wm_prog_key*) this->key;<br>
> int base_mrf = 1;<br>
> int color_mrf = base_mrf + 2;<br>
> + fs_inst *mov;<br>
><br>
> - fs_inst *mov = bld.exec_all().group(4, 0)<br>
> - .MOV(brw_message_reg(color_mrf),<br>
> - fs_reg(UNIFORM, 0, BRW_REGISTER_TYPE_F));<br>
> + if (uniforms > 0) {<br>
> + mov = bld.exec_all().group(4, 0)<br>
> + .MOV(brw_message_reg(color_mrf),<br>
> + fs_reg(UNIFORM, 0, BRW_REGISTER_TYPE_F));<br>
> + } else {<br>
> + struct brw_reg reg =<br>
> + brw_reg(BRW_GENERAL_REGISTER_FILE,<br>
> + 2, 3, 0, 0, BRW_REGISTER_TYPE_F,<br>
> + BRW_VERTICAL_STRIDE_8,<br>
> + BRW_WIDTH_2,<br>
> + BRW_HORIZONTAL_STRIDE_4, BRW_SWIZZLE_XYZW, WRITEMASK_XYZW);<br>
</div></div>The linebreaks above seem strange. Can you either put BRW_WIDTH_2 one<br>
line up or every BRW_* on its own?<br></blockquote><div><br></div><div>Sure, I'll move BRW_WIDTH_2 up.<br></div><div>--Jason<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888">-- Michael<br>
</font></span><div class="HOEnZb"><div class="h5">> +<br>
> + mov = bld.exec_all().group(4, 0)<br>
> + .MOV(vec4(brw_message_reg(color_mrf)), fs_reg(reg));<br>
> + }<br>
><br>
> fs_inst *write;<br>
> if (key->nr_color_regions == 1) {<br>
> @@ -2819,8 +2832,10 @@ fs_visitor::emit_repclear_shader()<br>
> assign_curb_setup();<br>
><br>
> /* Now that we have the uniform assigned, go ahead and force it to a vec4. */<br>
> - assert(mov->src[0].file == FIXED_GRF);<br>
> - mov->src[0] = brw_vec4_grf(mov->src[0].nr, 0);<br>
> + if (uniforms == 1) {<br>
> + assert(mov->src[0].file == FIXED_GRF);<br>
> + mov->src[0] = brw_vec4_grf(mov->src[0].nr, 0);<br>
> + }<br>
> }<br>
><br>
> /**<br>
<br>
</div></div></blockquote></div><br></div></div>