[Piglit] [PATCH 4/5] cl: Run vXi32-stack subtest in parallel
Jan Vesely
jan.vesely at rutgers.edu
Wed Sep 3 17:51:39 PDT 2014
Avoid duplicate subtest names
Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---
tests/cl/program/execute/v2i32-stack.cl | 17 ++++++-----------
tests/cl/program/execute/v3i32-stack.cl | 15 ++++++---------
tests/cl/program/execute/v4i32-stack.cl | 15 ++++++---------
3 files changed, 18 insertions(+), 29 deletions(-)
diff --git a/tests/cl/program/execute/v2i32-stack.cl b/tests/cl/program/execute/v2i32-stack.cl
index e61e386..536e39c 100644
--- a/tests/cl/program/execute/v2i32-stack.cl
+++ b/tests/cl/program/execute/v2i32-stack.cl
@@ -1,22 +1,17 @@
/*!
[config]
+dimensions: 1
[test]
kernel_name: direct_write_indirect_read
name: direct write - indirect read
-arg_out: 0 buffer int2[1] 0 1
-arg_in: 1 int 0
-
-[test]
-kernel_name: direct_write_indirect_read
-name: direct write - indirect read
-arg_out: 0 buffer int2[1] 2 3
-arg_in: 1 int 1
-
+arg_out: 0 buffer int2[2] 0 1 2 3
+global_size: 2 0 0
!*/
-kernel void direct_write_indirect_read(global int2 *out, int index) {
+kernel void direct_write_indirect_read(global int2 *out) {
+ int index = get_global_id(0);
int2 stack[2];
stack[0].s0 = 0;
stack[0].s1 = 1;
@@ -24,5 +19,5 @@ kernel void direct_write_indirect_read(global int2 *out, int index) {
stack[1].s0 = 2;
stack[1].s1 = 3;
- out[0] = stack[index];
+ out[index] = stack[index];
}
diff --git a/tests/cl/program/execute/v3i32-stack.cl b/tests/cl/program/execute/v3i32-stack.cl
index 7c88979..8b7b13c 100644
--- a/tests/cl/program/execute/v3i32-stack.cl
+++ b/tests/cl/program/execute/v3i32-stack.cl
@@ -1,21 +1,18 @@
/*!
[config]
+dimensions: 1
[test]
kernel_name: direct_write_indirect_read
name: direct write - indirect read
-arg_out: 0 buffer int3[1] 0 1 2
-arg_in: 1 int 0
+arg_out: 0 buffer int3[2] 0 1 2 3 4 5
+global_size: 2 0 0
-[test]
-kernel_name: direct_write_indirect_read
-name: direct write - indirect read
-arg_out: 0 buffer int3[1] 3 4 5
-arg_in: 1 int 1
!*/
-kernel void direct_write_indirect_read(global int3 *out, int index) {
+kernel void direct_write_indirect_read(global int3 *out) {
+ int index = get_global_id(0);
int3 stack[2];
stack[0].s0 = 0;
stack[0].s1 = 1;
@@ -25,5 +22,5 @@ kernel void direct_write_indirect_read(global int3 *out, int index) {
stack[1].s1 = 4;
stack[1].s2 = 5;
- out[0] = stack[index];
+ out[index] = stack[index];
}
diff --git a/tests/cl/program/execute/v4i32-stack.cl b/tests/cl/program/execute/v4i32-stack.cl
index 751a370..79a1584 100644
--- a/tests/cl/program/execute/v4i32-stack.cl
+++ b/tests/cl/program/execute/v4i32-stack.cl
@@ -1,21 +1,18 @@
/*!
[config]
+dimensions: 1
[test]
kernel_name: direct_write_indirect_read
name: direct write - indirect read
-arg_out: 0 buffer int4[1] 0 1 2 3
-arg_in: 1 int 0
+arg_out: 0 buffer int4[2] 0 1 2 3 4 5 6 7
+global_size: 2 0 0
-[test]
-kernel_name: direct_write_indirect_read
-name: direct write - indirect read
-arg_out: 0 buffer int4[1] 4 5 6 7
-arg_in: 1 int 1
!*/
-kernel void direct_write_indirect_read(global int4 *out, int index) {
+kernel void direct_write_indirect_read(global int4 *out) {
+ int index = get_global_id(0);
int4 stack[2];
stack[0].s0 = 0;
stack[0].s1 = 1;
@@ -27,5 +24,5 @@ kernel void direct_write_indirect_read(global int4 *out, int index) {
stack[1].s2 = 6;
stack[1].s3 = 7;
- out[0] = stack[index];
+ out[index] = stack[index];
}
--
1.9.3
More information about the Piglit
mailing list