From 03331c276767d66d2965f0528ed2d0e3a9a56e61 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 14 Mar 2012 10:36:52 -0400 Subject: r600: Fix get_global_id implementation --- r600/lib/workitem/get_global_id.cl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/r600/lib/workitem/get_global_id.cl b/r600/lib/workitem/get_global_id.cl index 9b0bd94..671f657 100644 --- a/r600/lib/workitem/get_global_id.cl +++ b/r600/lib/workitem/get_global_id.cl @@ -2,9 +2,9 @@ _CLC_DEF size_t get_global_id(uint dim) { switch (dim) { - case 0: return __builtin_r600_read_tgid_x()*__builtin_r600_read_ngroups_x()+__builtin_r600_read_tidig_x(); - case 1: return __builtin_r600_read_tgid_y()*__builtin_r600_read_ngroups_y()+__builtin_r600_read_tidig_y(); - case 2: return __builtin_r600_read_tgid_z()*__builtin_r600_read_ngroups_z()+__builtin_r600_read_tidig_z(); + case 0: return __builtin_r600_read_tgid_x()*__builtin_r600_read_local_size_x()+__builtin_r600_read_tidig_x(); + case 1: return __builtin_r600_read_tgid_y()*__builtin_r600_read_local_size_y()+__builtin_r600_read_tidig_y(); + case 2: return __builtin_r600_read_tgid_z()*__builtin_r600_read_local_size_z()+__builtin_r600_read_tidig_z(); default: return 0; } } -- cgit v1.2.3