On Dec 2, 2014 9:19 PM, "Matt Turner" <[email protected]> wrote: > > Half gives you the second half of a SIMD16 register, but if the register > is a uniform it would incorrectly give you the next register.
I'm curious as to where this came up. To my knowledge, the only time that's used, we know it's not a uniform. Am I missing something? In any case, that seems like the right way to handle uniforms. We could also do that for immediates. Assuming it has a point, Reviewed-by: Jason Ekstrand <[email protected]> > --- > src/mesa/drivers/dri/i965/brw_fs.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h > index 6a7fbe4..71b82ae 100644 > --- a/src/mesa/drivers/dri/i965/brw_fs.h > +++ b/src/mesa/drivers/dri/i965/brw_fs.h > @@ -210,6 +210,10 @@ static inline fs_reg > half(fs_reg reg, unsigned idx) > { > assert(idx < 2); > + > + if (reg.file == UNIFORM) > + return reg; > + > assert(idx == 0 || (reg.file != HW_REG && reg.file != IMM)); > assert(reg.width == 16); > reg.width = 8; > -- > 2.0.4 > > _______________________________________________ > mesa-dev mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
