[Mesa-dev] [PATCH 4/5] i965/fs: Use correct spill offsets

Matt Turner mattst88 at gmail.com
Fri Oct 24 12:58:19 PDT 2014


On Fri, Oct 24, 2014 at 12:25 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:

Without some more information -- like what was actually wrong, I have
no idea how to review this.

Looks like mostly some changes reg_size -> REG_SIZE.

> ---
>  src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
> index d4b72d8..49b50ee 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
> @@ -651,7 +651,7 @@ fs_visitor::emit_unspill(bblock_t *block, fs_inst *inst, fs_reg dst,
>        inst->insert_before(block, unspill_inst);
>
>        dst.reg_offset += reg_size;
> -      spill_offset += reg_size * 8 * sizeof(float);
> +      spill_offset += reg_size * REG_SIZE;

But this is just cosmetic since REG_SIZE is #defined to (8*4). Okay.

>     }
>  }
>
> @@ -671,7 +671,7 @@ fs_visitor::emit_spill(bblock_t *block, fs_inst *inst, fs_reg src,
>           new(mem_ctx) fs_inst(SHADER_OPCODE_GEN4_SCRATCH_WRITE,
>                                reg_null_f, src);
>        src.reg_offset += reg_size;
> -      spill_inst->offset = spill_offset + i * reg_size;
> +      spill_inst->offset = spill_offset + i * reg_size * REG_SIZE;

But here. What's going on here?


More information about the mesa-dev mailing list