OSDN Git Service

i965/emit: Do the sampler index adjustment directly in header.0.3
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 22 Jan 2015 21:46:44 +0000 (13:46 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 22 Jan 2015 23:19:13 +0000 (15:19 -0800)
commit7de8a3e13efe1c3eede531737f6780d388152355
tree10bf1dacc17708cadbe6dc3999ee585775a0f860
parent8751734613d3476f46ef1efe119a6892b3ecfa02
i965/emit: Do the sampler index adjustment directly in header.0.3

Prior to this commit, the adjust_sampler_state_pointer function took an
extra register that it could use as scratch space.  The usual candidate was
the destination of the sampler instruction.  However, if that register ever
aliased anything important such as the sampler index, this would scratch
all over important data.  Fortunately, the calculation is such that we can
just do it in place and we don't need the scratch space at all.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
src/mesa/drivers/dri/i965/brw_eu.h
src/mesa/drivers/dri/i965/brw_eu_emit.c
src/mesa/drivers/dri/i965/brw_fs_generator.cpp
src/mesa/drivers/dri/i965/brw_vec4_generator.cpp