[Mesa-dev] [PATCH v4 0/1] i965: add opportunistic behaviour to opt_vector_float()

Juan A. Suarez Romero jasuarez at igalia.com
Tue Dec 15 07:02:24 PST 2015


While working on related issue, found out that previous patch (and original
version) were applying incorrectly opt_vector_float in some cases.

Specifically, for this piece of code:

cmp.nz.f0.0 null:F, vgrf6.xyzz:F, vgrf17.xyzz:F
mov vgrf2.0.x:D, 0D
(+f0.0.any4h) mov vgrf2.0.x:D, -1D
mov vgrf2.0.yzw:D, 0D

opt_vector_float was generating:

cmp.nz.f0.0 null:F, vgrf6.xyzz:F, vgrf17.xyzz:F
(+f0.0.any4h) mov vgrf2.0.x:D, -1D
mov vgrf2.0:F, [0F, 0F, 0F, 0F]
cmp.nz.f0.0 null:D, vgrf2.xyzw:D, 0D

As can be notice, in the former code vgrf2.x could be 0 or -1, depending on the
predicate, while in the result it is always 0. Problem is that when applying the
optimization, it was ignoring the predicate.

The next patch updates the previous version to fix this problem.


*** BLURB HERE ***

Juan A. Suarez Romero (1):
  i965: add opportunistic behaviour to opt_vector_float()

 src/mesa/drivers/dri/i965/brw_vec4.cpp | 62 ++++++++++++++++++++++------------
 src/mesa/drivers/dri/i965/brw_vec4.h   |  4 +++
 2 files changed, 44 insertions(+), 22 deletions(-)

-- 
2.5.0



More information about the mesa-dev mailing list