diff options
Diffstat (limited to 'src/gallium/drivers/radeon/r600_gpu_load.c')
-rw-r--r-- | src/gallium/drivers/radeon/r600_gpu_load.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/gallium/drivers/radeon/r600_gpu_load.c b/src/gallium/drivers/radeon/r600_gpu_load.c index 775ac7ac92f..83b7bd72106 100644 --- a/src/gallium/drivers/radeon/r600_gpu_load.c +++ b/src/gallium/drivers/radeon/r600_gpu_load.c @@ -58,11 +58,13 @@ #define CB_BUSY(x) (((x) >> 30) & 0x1) #define GUI_ACTIVE(x) (((x) >> 31) & 0x1) -#define UPDATE_COUNTER(field, mask) \ - if (mask(value)) \ - p_atomic_inc(&counters->named.field.busy); \ - else \ - p_atomic_inc(&counters->named.field.idle); +#define UPDATE_COUNTER(field, mask) \ + do { \ + if (mask(value)) \ + p_atomic_inc(&counters->named.field.busy); \ + else \ + p_atomic_inc(&counters->named.field.idle); \ + } while (0) static void r600_update_grbm_counters(struct r600_common_screen *rscreen, union r600_grbm_counters *counters) @@ -87,6 +89,8 @@ static void r600_update_grbm_counters(struct r600_common_screen *rscreen, UPDATE_COUNTER(gui, GUI_ACTIVE); } +#undef UPDATE_COUNTER + static PIPE_THREAD_ROUTINE(r600_gpu_load_thread, param) { struct r600_common_screen *rscreen = (struct r600_common_screen*)param; |