diff options
author | Francisco Jerez <[email protected]> | 2016-04-30 21:54:47 -0700 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2016-05-27 23:29:06 -0700 |
commit | 1d5bf46ad1533ffdb30b5dc0f9244f60b0539285 (patch) | |
tree | 7c44c3e603f773057c0b575ed211203d5c4ee09f /src/util/register_allocate.c | |
parent | ad8f66ed33172ab40d4679063780a501b6f80740 (diff) |
i965/fs: Don't mutate multi-component arguments in sampler payload set-up.
The Gen5+ sampler message payload construction code steps through the
coordinate and derivative components by induction like 'coordinate =
offset(coordinate, bld, 1)', the problem is that while doing that it
may step one past the end of the coordinate vector causing an
assertion failure in offset() if it happens to be a (single component)
immediate. Right now coordinates and derivatives are typically passed
as actual registers but that will no longer be the case when we start
propagating constants into logical messages.
Instead express coordinate components in closed form like
'offset(coordinate, bld, i)' -- The end result seems slightly more
readable that way and it allows passing the coordinate and derivative
registers by const reference instead of by value, so it seems like a
clean-up in its own right.
v2: Fold a few post-increment operators into the last MOV
statement. (Jason)
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/util/register_allocate.c')
0 files changed, 0 insertions, 0 deletions