aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/sb/sb_peephole.cpp
diff options
context:
space:
mode:
authorVadim Girlin <[email protected]>2013-05-14 17:08:38 +0400
committerVadim Girlin <[email protected]>2013-05-14 17:36:25 +0400
commitecde4b07e2208934a17a09d26c43baf314c10a60 (patch)
treeecab4397e3d8d6d2e01f328a1b3bdc52fce61acf /src/gallium/drivers/r600/sb/sb_peephole.cpp
parent57d1be0d2d195dac0e08585b6cd098779f7a7bd7 (diff)
r600g/sb: get rid of standard c++ streams
Static initialization of internal libstdc++ data related to iostream causes segfaults with some apps. This patch replaces all uses of std::ostream and std::ostringstream in sb with custom lightweight classes. Prevents segfaults with ut2004demo and probably some other old apps. Signed-off-by: Vadim Girlin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/sb/sb_peephole.cpp')
-rw-r--r--src/gallium/drivers/r600/sb/sb_peephole.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/gallium/drivers/r600/sb/sb_peephole.cpp b/src/gallium/drivers/r600/sb/sb_peephole.cpp
index 444765e8779..db51ad52370 100644
--- a/src/gallium/drivers/r600/sb/sb_peephole.cpp
+++ b/src/gallium/drivers/r600/sb/sb_peephole.cpp
@@ -33,13 +33,10 @@
#endif
#include "sb_shader.h"
-
#include "sb_pass.h"
namespace r600_sb {
-using std::cerr;
-
int peephole::run() {
run_on(sh.root);
@@ -112,9 +109,9 @@ void peephole::optimize_SETcc_op(alu_node* a) {
bool_op_info bop = {};
PPH_DUMP(
- cerr << "optSETcc ";
+ sblog << "optSETcc ";
dump::dump_op(a);
- cerr << "\n";
+ sblog << "\n";
);
if (!get_bool_op_info(s, bop))
@@ -136,10 +133,10 @@ void peephole::optimize_SETcc_op(alu_node* a) {
}
PPH_DUMP(
- cerr << "boi node: ";
+ sblog << "boi node: ";
dump::dump_op(bop.n);
- cerr << " invert: " << bop.invert << " int_cvt: " << bop.int_cvt;
- cerr <<"\n";
+ sblog << " invert: " << bop.invert << " int_cvt: " << bop.int_cvt;
+ sblog <<"\n";
);
unsigned newop = is_pred ? get_predsetcc_opcode(cc, cmp_type) :