[Mesa-dev] [PATCH v2 024/103] i965/vec4: fix base offset for nir_registers with doubles

Iago Toral Quiroga itoral at igalia.com
Tue Oct 11 09:01:28 UTC 2016


v2: do this inside dst_reg_for_nir_reg() instead of its callers
---
 src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
index 815082e..860ec51 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
@@ -259,6 +259,8 @@ dst_reg_for_nir_reg(vec4_visitor *v, nir_register *nir_reg,
    dst_reg reg;
 
    reg = v->nir_locals[nir_reg->index];
+   if (nir_reg->bit_size == 64)
+      base_offset *= 2;
    reg = offset(reg, base_offset);
    if (indirect) {
       reg.reladdr =
-- 
2.7.4



More information about the mesa-dev mailing list