summaryrefslogtreecommitdiff
path: root/tgsi
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2016-04-25 14:27:23 +0200
committerHans de Goede <hdegoede@redhat.com>2016-06-27 08:32:50 +0200
commit257c391e7b0232e9cd292e8ae8ff859f6b90c600 (patch)
treebbbd8382d4014b038e556ae2252a39a1532c0675 /tgsi
parentb7b536a525838ba056c96cc9c099808a65e52877 (diff)
tgsi: Add get_work_dim implementationHEADmaster
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'tgsi')
-rw-r--r--tgsi/lib/SOURCES1
-rw-r--r--tgsi/lib/workitem/get_work_dim.ll8
2 files changed, 9 insertions, 0 deletions
diff --git a/tgsi/lib/SOURCES b/tgsi/lib/SOURCES
index 4aba61d..4380c09 100644
--- a/tgsi/lib/SOURCES
+++ b/tgsi/lib/SOURCES
@@ -2,3 +2,4 @@ workitem/get_group_id.ll
workitem/get_local_id.ll
workitem/get_local_size.ll
workitem/get_num_groups.ll
+workitem/get_work_dim.ll
diff --git a/tgsi/lib/workitem/get_work_dim.ll b/tgsi/lib/workitem/get_work_dim.ll
new file mode 100644
index 0000000..c47a299
--- /dev/null
+++ b/tgsi/lib/workitem/get_work_dim.ll
@@ -0,0 +1,8 @@
+declare i32 @llvm.tgsi.read.workdim() nounwind readnone
+
+define i32 @get_work_dim() nounwind readnone alwaysinline {
+ %x = call i32 @llvm.tgsi.read.workdim() nounwind readnone , !range !0
+ ret i32 %x
+}
+
+!0 = !{ i32 1, i32 4 }