diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2012-03-14 10:36:52 -0400 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2012-06-01 09:03:19 -0400 |
commit | 03331c276767d66d2965f0528ed2d0e3a9a56e61 (patch) | |
tree | 77253ae52a4a66b4522ad95f0ee42dd17c9b2cf3 | |
parent | fa147b7e9c203bb0a5bbec9d1eb403ed5ef0be78 (diff) |
r600: Fix get_global_id implementation
-rw-r--r-- | r600/lib/workitem/get_global_id.cl | 6 |
1 files 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; } } |