From 71ca761f9db9b43188e0508be5a188e8d8881afa Mon Sep 17 00:00:00 2001 From: Vadim Girlin Date: Sun, 25 Aug 2013 01:35:00 +0400 Subject: [PATCH] use PUSH + ALU instead of ALU_PUSH_BEFORE --- src/gallium/drivers/r600/sb/sb_bc_finalize.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/gallium/drivers/r600/sb/sb_bc_finalize.cpp b/src/gallium/drivers/r600/sb/sb_bc_finalize.cpp index c56c866..82dff04 100644 --- a/src/gallium/drivers/r600/sb/sb_bc_finalize.cpp +++ b/src/gallium/drivers/r600/sb/sb_bc_finalize.cpp @@ -798,6 +798,19 @@ void bc_finalizer::cf_peephole() { for (node_iterator N, I = sh.root->begin(), E = sh.root->end(); I != E; I = N) { N = I; ++N; + cf_node *c = static_cast(*I); + + if (c->bc.op == CF_OP_ALU_PUSH_BEFORE) { + cf_node *push = sh.create_cf(CF_OP_PUSH); + c->insert_before(push); + push->jump(c); + c->bc.set_op(CF_OP_ALU); + } + } + + for (node_iterator N, I = sh.root->begin(), E = sh.root->end(); I != E; + I = N) { + N = I; ++N; cf_node *c = static_cast(*I); -- 1.8.3.1