summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2010-06-18 10:29:15 +1000
committerRhys Weatherley <rhys.weatherley@nokia.com>2010-06-18 11:03:20 +1000
commit8dc268f32546dc047af8a1b61c4cba56dc6e22ec (patch)
treeb439a1f7995e6c72ff0597f61be2905e402e5219 /tests/auto
parenta23facb9e2fcf88208be1c7357ec0d13de29582c (diff)
Remove command queue property setting.
OpenCL 1.1 has deprecated clSetCommandQueueProperty() because it isn't thread safe. Rather than have a difference between the OpenCL 1.0 and 1.1 versions of QtOpenCL, we just implement the OpenCL 1.1 behavior. Out-of-order execution and profiling can be enabled by explicitly calling QCLContext::createCommandQueue().
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qcl/tst_qcl.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/auto/qcl/tst_qcl.cpp b/tests/auto/qcl/tst_qcl.cpp
index 44b8c34..6f887ca 100644
--- a/tests/auto/qcl/tst_qcl.cpp
+++ b/tests/auto/qcl/tst_qcl.cpp
@@ -412,10 +412,12 @@ void tst_QCL::vectorBuffer()
void tst_QCL::eventProfiling()
{
- QCLCommandQueue queue = context.defaultCommandQueue();
- QVERIFY(!queue.isProfilingEnabled());
- queue.setProfilingEnabled(true);
+ QVERIFY(!context.defaultCommandQueue().isProfilingEnabled());
+
+ QCLCommandQueue queue =
+ context.createCommandQueue(CL_QUEUE_PROFILING_ENABLE);
QVERIFY(queue.isProfilingEnabled());
+ context.setCommandQueue(queue);
QCLVector<float> vector1 = context.createVector<float>(20000);
for (int index = 0; index < vector1.size(); ++index)
@@ -433,8 +435,7 @@ void tst_QCL::eventProfiling()
QVERIFY(event.runTime() >= event.submitTime());
QVERIFY(event.finishTime() >= event.runTime());
- queue.setProfilingEnabled(false);
- QVERIFY(!queue.isProfilingEnabled());
+ context.setCommandQueue(context.defaultCommandQueue());
}
// Test QCLSampler.