OSDN Git Service

r600g: fix tgsi_op2_s with trans-only instructions
authorVadim Girlin <vadimgirlin@gmail.com>
Thu, 10 Oct 2013 04:09:37 +0000 (08:09 +0400)
committerVadim Girlin <vadimgirlin@gmail.com>
Sun, 13 Oct 2013 16:03:35 +0000 (20:03 +0400)
commit10ddeb910ba8386a6b46396d827aed4116091b0b
treeb8f864ed6affb84789f226be6f5305665a154d41
parent8958741e5a0c3cce95f0415ce8e6e8e840a5207d
r600g: fix tgsi_op2_s with trans-only instructions

This fixes the issue when dst and src is the same reg and operation on one
channel overwrites the source for other channels, e.g.:

UMUL TEMP[2].xyz, TEMP[0].xyzz, TEMP[2].xxxx

In this example the result of the operation on channel x is written in
TEMP[2].x and then used as a second source operand for channels y and z
instead of original value in TEMP[2].x.

This patch stores the results in temp reg and moves them to
dst after performing operation on all channels.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=70327

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
src/gallium/drivers/r600/r600_shader.c