OSDN Git Service

r600g: fixup AR handling (v5)
authorDave Airlie <airlied@redhat.com>
Wed, 18 Jan 2012 15:16:55 +0000 (15:16 +0000)
committerDave Airlie <airlied@redhat.com>
Mon, 23 Jan 2012 09:14:19 +0000 (09:14 +0000)
commit6988699e445407318608021693089b9cc5b0442e
treee1b0adfe2c02edd849741dab3dd45ace2f8c47d1
parent533651b679fdcfbc152e1e935aa5ae375df78c57
r600g: fixup AR handling (v5)

So it appears R600s (except rv670) do AR handling different using a different
opcode. This patch fixes up r600g to work properly on r600.

This fixes ~100 piglit tests here (in GLSL1.30 mode) on rv610.

v3: add index_mode as per the docs.

This still fails any dst relative tests for some reason I can't quite see yet,
but it passes a lot more tests than without.

v4: add a nop after dst.rel this could be improved using a second pass,
where we only insert nops if two instructions are sure to collide.
The docs say r600, rv610, rv630 needs this, and not rv670, rs780, rs880,
need AMD to confirm rv620, rv635.

v5: add is_nop_inst.

NOTE: This is a candidate for stable branches.

Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit c96b9834032952492efbd2d1f5511fe225704918)
src/gallium/drivers/r600/r600_asm.c
src/gallium/drivers/r600/r600_asm.h
src/gallium/drivers/r600/r600_shader.c
src/gallium/drivers/r600/r600_sq.h