[Mesa-dev] [PATCH v3 2/4] i965/vec4: do not predicate scratch writes for BRW_OPCODE_SEL instructions
Francisco Jerez
currojerez at riseup.net
Thu Aug 6 07:34:51 PDT 2015
Iago Toral Quiroga <itoral at igalia.com> writes:
> The dst is always written, in this case the predicate is only used to select
> the value to write, so if we are spilling the dst we always want to write
> whatever value we selected to scratch.
> ---
> src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
> index c5c0d2c..ba352be 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
> @@ -3482,7 +3482,8 @@ vec4_visitor::emit_scratch_write(bblock_t *block, vec4_instruction *inst,
> dst_reg dst = dst_reg(brw_writemask(brw_vec8_grf(0, 0),
> inst->dst.writemask));
> vec4_instruction *write = SCRATCH_WRITE(dst, temp, index);
> - write->predicate = inst->predicate;
> + if (inst->opcode != BRW_OPCODE_SEL)
> + write->predicate = inst->predicate;
> write->ir = inst->ir;
> write->annotation = inst->annotation;
> inst->insert_after(block, write);
> --
> 1.9.1
Reviewed-by: Francisco Jerez <currojerez at riseup.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150806/f15f9d83/attachment.sig>
More information about the mesa-dev
mailing list