r600g: Workaround for a harware bug with nested loops on Cayman
authorMartin Andersson <g02maran@gmail.com>
Tue, 16 Apr 2013 14:02:00 +0000 (18:02 +0400)
committerVadim Girlin <vadimgirlin@gmail.com>
Tue, 16 Apr 2013 14:02:11 +0000 (18:02 +0400)
commit4c3ed795662974a1c2ad2326fc74bef608a34f31
tree461c0b0294f0aa55f809a3e01c55b0db9d58c522
parent8616b224bf267d2d114cf32c3242912313e9ccc4
r600g: Workaround for a harware bug with nested loops on Cayman

There is a hardware bug on Cayman where a BREAK/CONTINUE followed by
LOOP_STARTxxx for nested loops may put the branch stack into a state
such that ALU_PUSH_BEFORE doesn't work as expected. Workaround this
by replacing the ALU_PUSH_BEFORE with a PUSH + ALU

Fixes piglit tests EXT_transform_feedback/order*

v2: Use existing loop count and improve comment
v3: [Vadim Girlin] Set jump address for PUSH instructions

NOTE: This is a candidate for the 9.1 branch

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