[Mesa-dev,06/95] i965/vec4/nir: fix nir_intrinsic_load_uniform for doubles

Submitted by Iago Toral Quiroga on July 19, 2016, 10:40 a.m.

Details

Message ID 1468924892-6910-7-git-send-email-itoral@igalia.com
State New
Headers show
Series "i965 Haswell ARB_gpu_shader_fp64 / OpenGL 4.0" ( rev: 2 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Iago Toral Quiroga July 19, 2016, 10:40 a.m.
From: Connor Abbott <connor.w.abbott@intel.com>

---
 src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
index 5a7ee0b..df927e7 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
@@ -712,6 +712,7 @@  vec4_visitor::nir_emit_intrinsic(nir_intrinsic_instr *instr)
          src.reg_offset = offset / 16;
          shift = (offset % 16) / 4;
          src.swizzle += BRW_SWIZZLE4(shift, shift, shift, shift);
+         src.type = dest.type;
 
          emit(MOV(dest, src));
       } else {

Comments

On Tue, 2016-07-19 at 12:40 +0200, Iago Toral Quiroga wrote:
> From: Connor Abbott <connor.w.abbott@intel.com>
> 
> ---
>  src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
> b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
> index 5a7ee0b..df927e7 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
> @@ -712,6 +712,7 @@
> vec4_visitor::nir_emit_intrinsic(nir_intrinsic_instr *instr)
>           src.reg_offset = offset / 16;
>           shift = (offset % 16) / 4;
>           src.swizzle += BRW_SWIZZLE4(shift, shift, shift, shift);
> +         src.type = dest.type;

This seems to already be set above:

      src = src_reg(dst_reg(UNIFORM, nir_intrinsic_base(instr) / 16));
      src.type = dest.type;

I'm I missing something?

>  
>           emit(MOV(dest, src));
>        } else {
On Thu, 2016-07-28 at 15:49 +1000, Timothy Arceri wrote:
> On Tue, 2016-07-19 at 12:40 +0200, Iago Toral Quiroga wrote:
> > 
> > From: Connor Abbott <connor.w.abbott@intel.com>
> > 
> > ---
> >  src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
> > b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
> > index 5a7ee0b..df927e7 100644
> > --- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
> > +++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
> > @@ -712,6 +712,7 @@
> > vec4_visitor::nir_emit_intrinsic(nir_intrinsic_instr *instr)
> >           src.reg_offset = offset / 16;
> >           shift = (offset % 16) / 4;
> >           src.swizzle += BRW_SWIZZLE4(shift, shift, shift, shift);
> > +         src.type = dest.type;
> This seems to already be set above:
> 
>       src = src_reg(dst_reg(UNIFORM, nir_intrinsic_base(instr) /
> 16));
>       src.type = dest.type;
> 
> I'm I missing something?

No, you're right. I think that might have been fixed in master after
Connor wrote this patch back in 2015, we should drop the patch then.
Thanks for finding this!

Iago

> > 
> >  
> >           emit(MOV(dest, src));
> >        } else {
On Thu, Jul 28, 2016 at 2:25 AM, Iago Toral <itoral@igalia.com> wrote:
> On Thu, 2016-07-28 at 15:49 +1000, Timothy Arceri wrote:
>> On Tue, 2016-07-19 at 12:40 +0200, Iago Toral Quiroga wrote:
>> >
>> > From: Connor Abbott <connor.w.abbott@intel.com>
>> >
>> > ---
>> >  src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 1 +
>> >  1 file changed, 1 insertion(+)
>> >
>> > diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
>> > b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
>> > index 5a7ee0b..df927e7 100644
>> > --- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
>> > +++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
>> > @@ -712,6 +712,7 @@
>> > vec4_visitor::nir_emit_intrinsic(nir_intrinsic_instr *instr)
>> >           src.reg_offset = offset / 16;
>> >           shift = (offset % 16) / 4;
>> >           src.swizzle += BRW_SWIZZLE4(shift, shift, shift, shift);
>> > +         src.type = dest.type;
>> This seems to already be set above:
>>
>>       src = src_reg(dst_reg(UNIFORM, nir_intrinsic_base(instr) /
>> 16));
>>       src.type = dest.type;
>>
>> I'm I missing something?
>
> No, you're right. I think that might have been fixed in master after
> Connor wrote this patch back in 2015, we should drop the patch then.
> Thanks for finding this!
>
> Iago

Indeed, I wouldn't be too surprised if that happened :)

>
>> >
>> >
>> >           emit(MOV(dest, src));
>> >        } else {
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev