[Mesa-dev] [PATCH 27/59] i965/fs: add a stride helper

Kenneth Graunke kenneth at whitecape.org
Tue May 3 18:17:29 UTC 2016


On Monday, May 2, 2016 6:48:18 PM PDT Francisco Jerez wrote:
> This only works if reg.stride == 0 or 1, we need to honour the stride of
> the original register (e.g. by doing reg.stride *= stride) or you'll end
> up taking components not part of the region given as argument.  It gets
> messy with ARF and HW registers because they represent the stride
> differently...  I suggest that instead of fixing this you take the
> following patch from my SIMD32 branch that introduces a somewhat easier
> to use helper: Instead of doing 'stride(horiz_offset(retype(reg, t), i),
> type_sz(reg.type) / type_sz(t))' to take the i-th subcomponent of type t
> of the original register you would just do 'subscript(reg, t, i)'.  I
> think I've looked through all the uses of stride() in your branch and
> they are all sort of an open-coded version of subscript().  This will
> also address the issue Ken pointed out in patch 29 related to the use of
> horiz_offset() on uniforms (or anything with stride other than one,
> really) -- See the attached patch (yes, correct ARF/HW reg handling will
> be required for SIMD32...).

Curro, your patch is
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

It does seem like the right thing to use for most of the fp64 stuff.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160503/37ba06bd/attachment.sig>


More information about the mesa-dev mailing list