From 14ea0bdbff063dc41b41c583b1b3b5f27eaee707 Mon Sep 17 00:00:00 2001 From: Kyle Lutz Date: Tue, 26 Mar 2013 23:33:57 -0400 Subject: [PATCH] Fix bug in command_queue test on AMD platforms This fixes a bug in the event_profiling test case in the command_queue test. On AMD platforms, the event object returned from clEnqueueMarker() has no profiling information associated with it and returns an error code when accessed. Now, profiling information for a simple write to a device buffer is checked instead. --- test/test_command_queue.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/test_command_queue.cpp b/test/test_command_queue.cpp index de8de3d2..e6d24611 100644 --- a/test/test_command_queue.cpp +++ b/test/test_command_queue.cpp @@ -30,7 +30,14 @@ BOOST_AUTO_TEST_CASE(event_profiling) bc::context context(device); bc::command_queue queue(context, device, bc::command_queue::enable_profiling); - bc::event event = queue.enqueue_marker(); + int data[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; + bc::buffer buffer(context, sizeof(data)); + + bc::event event = + queue.enqueue_write_buffer_async(buffer, + 0, + sizeof(data), + static_cast(data)); queue.finish(); event.get_profiling_info(bc::event::profiling_command_queued);