[Mesa-dev] [PATCH 09/10] i965/fs: Calculate delta_x and delta_y together.
Matt Turner
mattst88 at gmail.com
Fri Apr 17 12:02:04 PDT 2015
On Fri, Apr 17, 2015 at 11:58 AM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> On Fri, Apr 17, 2015 at 11:56 AM, Matt Turner <mattst88 at gmail.com> wrote:
>> static inline struct brw_reg
>> offset(struct brw_reg reg, unsigned delta)
>> {
>> reg.nr += delta;
>> return reg;
>> }
>>
>> Presumably you're thinking of offset(fs_reg, unsigned).
>>
>> The delta_y variable is only used explicitly on original Gen4 where we
>> have to use line+mac. The delta values are in consecutive registers
>> (x0, x1), (y0, y1), and extending it to SIMD16 you add an extra two
>> registers, giving you (x0, x1), (x2, x3), (y0, y1), (y2, y3). So you
>> offset 1 register in SIMD8 and two registers in SIMD16.
>>
>> Does that warrant a comment?
>
> Nope, it's fine.
Okay, but to be clear that wasn't a just rhetorical question. Comments
are for other people (or the author, once the author has forgotten :)
so it's sometimes hard to know whether it'll be useful. :)
delta_xy is actually in a different format on original Gen4 than it is
on other platforms. Other platforms do (x0, x1), (y0, y1), (x2, x3),
(y2, y3).
More information about the mesa-dev
mailing list