summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2012-06-07 19:30:47 +0200
committerMichel Dänzer <[email protected]>2012-06-12 18:33:54 +0200
commit4c4ef9c29acf4f1f40aa3c5d268322efd26c1786 (patch)
treebbdae4c84db998b742c9985b74c2c360129648c6 /src/gallium/drivers/radeon
parent7b11051a28731b099dc47df9e5db7eccfa889369 (diff)
radeonsi: Only dump shaders with environment variable RADEON_DUMP_SHADERS=1.
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r--src/gallium/drivers/radeon/SICodeEmitter.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/SICodeEmitter.cpp b/src/gallium/drivers/radeon/SICodeEmitter.cpp
index 1d247061e41..585d4180e4d 100644
--- a/src/gallium/drivers/radeon/SICodeEmitter.cpp
+++ b/src/gallium/drivers/radeon/SICodeEmitter.cpp
@@ -156,8 +156,12 @@ void SICodeEmitter::emitState(MachineFunction & MF)
bool SICodeEmitter::runOnMachineFunction(MachineFunction &MF)
{
- MF.dump();
TM = &MF.getTarget();
+ const AMDILSubtarget &STM = TM->getSubtarget<AMDILSubtarget>();
+
+ if (STM.dumpCode()) {
+ MF.dump();
+ }
emitState(MF);