From 58f304defe804a6f01b0b961997ecfe61fe00d34 Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Mon, 9 May 2016 09:43:56 +0200 Subject: [PATCH] i965/tes/scalar: Fix load input for doubles Reviewed-by: Kenneth Graunke Reviewed-by: Francisco Jerez --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index 3253c291453..59a7a566307 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp @@ -2781,8 +2781,8 @@ fs_visitor::nir_emit_tes_intrinsic(const fs_builder &bld, if (imm_offset < max_push_slots) { fs_reg src = fs_reg(ATTR, imm_offset / 2, dest.type); for (int i = 0; i < instr->num_components; i++) { - bld.MOV(offset(dest, bld, i), - component(src, 4 * (imm_offset % 2) + i)); + unsigned comp = 16 / type_sz(dest.type) * (imm_offset % 2) + i; + bld.MOV(offset(dest, bld, i), component(src, comp)); } tes_prog_data->base.urb_read_length = MAX2(tes_prog_data->base.urb_read_length, -- 2.30.2