summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon
diff options
context:
space:
mode:
authorGrazvydas Ignotas <[email protected]>2015-08-10 00:42:35 +0300
committerMarek Olšák <[email protected]>2015-08-11 14:46:54 +0200
commit50545882113b389decc3f05771764f6c62213af3 (patch)
treee7a5cd5ecc4354968e10ec2ad34cd9e8d3aaab3e /src/gallium/drivers/radeon
parentc58534c1384dc63bb1b13eb37c06bdb4652c13ff (diff)
r600g: use a bitfield to track dirty atoms
r600 currently has 73 atoms and looping through their dirty flags has become costly because checking each flag requires a pointer dereference before the read. To avoid having to do that add additional bitfield which can be checked really quickly thanks to tzcnt instruction. id field was added to struct r600_atom but that doesn't affect memory usage for both 32 and 64 bit CPUs because it was stuffed into padding. The performance improvement is ~2% for benchmarks that can have FPS in the thousands but is hardly measurable in "real" programs. Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h
index 765ee3f70ba..768fe282981 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.h
+++ b/src/gallium/drivers/radeon/r600_pipe_common.h
@@ -315,6 +315,7 @@ struct r600_common_screen {
struct r600_atom {
void (*emit)(struct r600_common_context *ctx, struct r600_atom *state);
unsigned num_dw;
+ unsigned short id; /* used by r600 only */
bool dirty;
};