[Mesa-dev] [PATCH 03/23] i965/fs: Fix copy propagation of load payload for double operands

Jordan Justen jordan.l.justen at intel.com
Tue May 3 22:51:19 UTC 2016


On 2016-05-03 05:21:52, Samuel Iglesias Gonsálvez wrote:
> From: Iago Toral Quiroga <itoral at igalia.com>
> 
> Specifically, consider the size of the data type of the operand to compute
> the number of registers written.
> ---
>  src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
> index 9147e60..abc68c8 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
> @@ -775,7 +775,7 @@ fs_visitor::opt_copy_propagate_local(void *copy_prop_ctx, bblock_t *block,
>           int offset = 0;
>           for (int i = 0; i < inst->sources; i++) {
>              int effective_width = i < inst->header_size ? 8 : inst->exec_size;
> -            int regs_written = effective_width / 8;
> +            int regs_written = effective_width / 8 * type_sz(inst->src[i].type) / 4;

Line length.

Should this be based on inst->dst?

type_sz(foo.type) will only ever be 4 or 8?

-Jordan

>              if (inst->src[i].file == VGRF) {
>                 acp_entry *entry = ralloc(copy_prop_ctx, acp_entry);
>                 entry->dst = inst->dst;
> -- 
> 2.5.0
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list