<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 27, 2014 at 10:36 AM, Kristian Høgsberg <span dir="ltr"><<a href="mailto:hoegsberg@gmail.com" target="_blank">hoegsberg@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, Oct 24, 2014 at 12:25:06PM -0700, Jason Ekstrand wrote:<br>
> ---<br>
> src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 11 +++++------<br>
> 1 file changed, 5 insertions(+), 6 deletions(-)<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp<br>
> index d4b72d8..49b50ee 100644<br>
> --- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp<br>
> +++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp<br>
> @@ -651,7 +651,7 @@ fs_visitor::emit_unspill(bblock_t *block, fs_inst *inst, fs_reg dst,<br>
> inst->insert_before(block, unspill_inst);<br>
><br>
> dst.reg_offset += reg_size;<br>
> - spill_offset += reg_size * 8 * sizeof(float);<br>
> + spill_offset += reg_size * REG_SIZE;<br>
> }<br>
> }<br>
><br>
> @@ -671,7 +671,7 @@ fs_visitor::emit_spill(bblock_t *block, fs_inst *inst, fs_reg src,<br>
> new(mem_ctx) fs_inst(SHADER_OPCODE_GEN4_SCRATCH_WRITE,<br>
> reg_null_f, src);<br>
> src.reg_offset += reg_size;<br>
> - spill_inst->offset = spill_offset + i * reg_size;<br>
> + spill_inst->offset = spill_offset + i * reg_size * REG_SIZE;<br>
<br>
</span>I would split this functional change into its own commit and leave all<br>
the s/reg_size/REG_SIZE/ type changes in a different commit.<br></blockquote><div><br></div><div>That change is also functinoal. Just a different function. I'll give it a better commit message.<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">
<br>
Other than that, series<br>
<br>
Reviewed-by: Kristian Høgsberg <<a href="mailto:krh@bitplanet.net">krh@bitplanet.net</a>><br>
<div><div class="h5"><br>
<br>
> spill_inst->ir = inst->ir;<br>
> spill_inst->annotation = inst->annotation;<br>
> spill_inst->mlen = 1 + reg_size; /* header, value */<br>
> @@ -759,7 +759,6 @@ fs_visitor::choose_spill_reg(struct ra_graph *g)<br>
> void<br>
> fs_visitor::spill_reg(int spill_reg)<br>
> {<br>
> - int reg_size = dispatch_width * sizeof(float);<br>
> int size = virtual_grf_sizes[spill_reg];<br>
> unsigned int spill_offset = last_scratch;<br>
> assert(ALIGN(spill_offset, 16) == spill_offset); /* oword read/write req. */<br>
> @@ -786,7 +785,7 @@ fs_visitor::spill_reg(int spill_reg)<br>
> spilled_any_registers = true;<br>
> }<br>
><br>
> - last_scratch += size * reg_size;<br>
> + last_scratch += size * REG_SIZE;<br>
><br>
> /* Generate spill/unspill instructions for the objects being<br>
> * spilled. Right now, we spill or unspill the whole thing to a<br>
> @@ -799,7 +798,7 @@ fs_visitor::spill_reg(int spill_reg)<br>
> inst->src[i].reg == spill_reg) {<br>
> int regs_read = inst->regs_read(this, i);<br>
> int subset_spill_offset = (spill_offset +<br>
> - reg_size * inst->src[i].reg_offset);<br>
> + REG_SIZE * inst->src[i].reg_offset);<br>
> fs_reg unspill_dst(GRF, virtual_grf_alloc(regs_read));<br>
><br>
> inst->src[i].reg = unspill_dst.reg;<br>
> @@ -813,7 +812,7 @@ fs_visitor::spill_reg(int spill_reg)<br>
> if (inst->dst.file == GRF &&<br>
> inst->dst.reg == spill_reg) {<br>
> int subset_spill_offset = (spill_offset +<br>
> - reg_size * inst->dst.reg_offset);<br>
> + REG_SIZE * inst->dst.reg_offset);<br>
> fs_reg spill_src(GRF, virtual_grf_alloc(inst->regs_written));<br>
><br>
> inst->dst.reg = spill_src.reg;<br>
> --<br>
> 2.1.0<br>
><br>
</div></div>> _______________________________________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org">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>
</blockquote></div><br></div></div>