mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Migrate extensions suites to the new test registration framework (#2334)
This covers: * cl_ext_cxx_for_opencl * cl_khr_command_buffer * cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch * cl_khr_dx9_media_sharing * cl_khr_external_semaphore * cl_khr_kernel_clock * cl_khr_semaphore Contributes to #2181. --------- Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
This commit is contained in:
@@ -13,8 +13,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "procs.h"
|
||||
#include <CL/cl.h>
|
||||
|
||||
#include "harness/typeWrappers.h"
|
||||
|
||||
int test_cxx_for_opencl(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue)
|
||||
@@ -90,8 +91,7 @@ int test_cxx_for_opencl(cl_device_id device, cl_context context,
|
||||
return TEST_PASS;
|
||||
}
|
||||
|
||||
int test_cxx_for_opencl_ext(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int)
|
||||
REGISTER_TEST_VERSION(cxx_for_opencl_ext, Version(2, 0))
|
||||
{
|
||||
if (!is_extension_available(device, "cl_ext_cxx_for_opencl"))
|
||||
{
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "procs.h"
|
||||
#include <CL/cl.h>
|
||||
|
||||
#include "harness/typeWrappers.h"
|
||||
|
||||
int test_cxx_for_opencl_version(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue)
|
||||
@@ -88,8 +89,7 @@ int test_cxx_for_opencl_version(cl_device_id device, cl_context context,
|
||||
return TEST_PASS;
|
||||
}
|
||||
|
||||
int test_cxx_for_opencl_ver(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int)
|
||||
REGISTER_TEST_VERSION(cxx_for_opencl_ver, Version(2, 0))
|
||||
{
|
||||
if (!is_extension_available(device, "cl_ext_cxx_for_opencl"))
|
||||
{
|
||||
|
||||
@@ -14,15 +14,11 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#include "procs.h"
|
||||
|
||||
test_definition test_list[] = {
|
||||
ADD_TEST_VERSION(cxx_for_opencl_ext, Version(2, 0)),
|
||||
ADD_TEST_VERSION(cxx_for_opencl_ver, Version(2, 0))
|
||||
};
|
||||
#include "harness/testHarness.h"
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
return runTestHarnessWithCheck(argc, argv, ARRAY_SIZE(test_list), test_list,
|
||||
false, 0, nullptr);
|
||||
return runTestHarnessWithCheck(
|
||||
argc, argv, test_registry::getInstance().num_tests(),
|
||||
test_registry::getInstance().definitions(), false, 0, nullptr);
|
||||
}
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
//
|
||||
// Copyright (c) 2021 The Khronos Group Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
#ifndef _procs_h
|
||||
#define _procs_h
|
||||
|
||||
#include "harness/typeWrappers.h"
|
||||
|
||||
extern int test_cxx_for_opencl_ext(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int);
|
||||
extern int test_cxx_for_opencl_ver(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int);
|
||||
|
||||
#endif /*_procs_h*/
|
||||
@@ -3,6 +3,7 @@ set(MODULE_NAME CL_KHR_COMMAND_BUFFER)
|
||||
set(${MODULE_NAME}_SOURCES
|
||||
main.cpp
|
||||
basic_command_buffer.cpp
|
||||
basic_command_buffer_tests.cpp
|
||||
svm_command_basic.cpp
|
||||
command_buffer_printf.cpp
|
||||
command_buffer_get_command_buffer_info.cpp
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "basic_command_buffer.h"
|
||||
#include "procs.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
@@ -186,324 +185,253 @@ cl_int BasicCommandBufferTest::SetUp(int elements)
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
// Test that the CL_COMMAND_BUFFER_FLAGS_KHR bitfield is parsed correctly when
|
||||
// multiple flags are set.
|
||||
struct MultiFlagCreationTest : public BasicCommandBufferTest
|
||||
cl_int MultiFlagCreationTest::Run()
|
||||
{
|
||||
using BasicCommandBufferTest::BasicCommandBufferTest;
|
||||
cl_command_buffer_properties_khr flags = 0;
|
||||
cl_int error = CL_SUCCESS;
|
||||
|
||||
cl_int Run() override
|
||||
// First try to find multiple flags that are supported by the driver and
|
||||
// device.
|
||||
if (simultaneous_use_support)
|
||||
{
|
||||
cl_command_buffer_properties_khr flags = 0;
|
||||
cl_int error = CL_SUCCESS;
|
||||
|
||||
// First try to find multiple flags that are supported by the driver and
|
||||
// device.
|
||||
if (simultaneous_use_support)
|
||||
{
|
||||
flags |= CL_COMMAND_BUFFER_SIMULTANEOUS_USE_KHR;
|
||||
}
|
||||
|
||||
if (is_extension_available(
|
||||
device, CL_KHR_COMMAND_BUFFER_MULTI_DEVICE_EXTENSION_NAME))
|
||||
{
|
||||
flags |= CL_COMMAND_BUFFER_DEVICE_SIDE_SYNC_KHR;
|
||||
}
|
||||
|
||||
if (is_extension_available(
|
||||
device, CL_KHR_COMMAND_BUFFER_MUTABLE_DISPATCH_EXTENSION_NAME))
|
||||
{
|
||||
flags |= CL_COMMAND_BUFFER_MUTABLE_KHR;
|
||||
}
|
||||
|
||||
cl_command_buffer_properties_khr props[] = {
|
||||
CL_COMMAND_BUFFER_FLAGS_KHR, flags, 0
|
||||
};
|
||||
|
||||
command_buffer = clCreateCommandBufferKHR(1, &queue, props, &error);
|
||||
test_error(error, "clCreateCommandBufferKHR failed");
|
||||
|
||||
return CL_SUCCESS;
|
||||
flags |= CL_COMMAND_BUFFER_SIMULTANEOUS_USE_KHR;
|
||||
}
|
||||
|
||||
if (is_extension_available(
|
||||
device, CL_KHR_COMMAND_BUFFER_MULTI_DEVICE_EXTENSION_NAME))
|
||||
{
|
||||
flags |= CL_COMMAND_BUFFER_DEVICE_SIDE_SYNC_KHR;
|
||||
}
|
||||
|
||||
if (is_extension_available(
|
||||
device, CL_KHR_COMMAND_BUFFER_MUTABLE_DISPATCH_EXTENSION_NAME))
|
||||
{
|
||||
flags |= CL_COMMAND_BUFFER_MUTABLE_KHR;
|
||||
}
|
||||
|
||||
cl_command_buffer_properties_khr props[] = { CL_COMMAND_BUFFER_FLAGS_KHR,
|
||||
flags, 0 };
|
||||
|
||||
command_buffer = clCreateCommandBufferKHR(1, &queue, props, &error);
|
||||
test_error(error, "clCreateCommandBufferKHR failed");
|
||||
|
||||
return CL_SUCCESS;
|
||||
};
|
||||
|
||||
// Test enqueuing a command-buffer containing a single NDRange command once
|
||||
struct BasicEnqueueTest : public BasicCommandBufferTest
|
||||
cl_int BasicEnqueueTest::Run()
|
||||
{
|
||||
using BasicCommandBufferTest::BasicCommandBufferTest;
|
||||
|
||||
cl_int Run() override
|
||||
cl_int error = clCommandNDRangeKernelKHR(
|
||||
command_buffer, nullptr, nullptr, kernel, 1, nullptr, &num_elements,
|
||||
nullptr, 0, nullptr, nullptr, nullptr);
|
||||
test_error(error, "clCommandNDRangeKernelKHR failed");
|
||||
|
||||
error = clFinalizeCommandBufferKHR(command_buffer);
|
||||
test_error(error, "clFinalizeCommandBufferKHR failed");
|
||||
|
||||
const cl_int pattern = 42;
|
||||
error = clEnqueueFillBuffer(queue, in_mem, &pattern, sizeof(cl_int), 0,
|
||||
data_size(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueFillBuffer failed");
|
||||
|
||||
error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0, nullptr,
|
||||
nullptr);
|
||||
test_error(error, "clEnqueueCommandBufferKHR failed");
|
||||
|
||||
std::vector<cl_int> output_data_1(num_elements);
|
||||
error = clEnqueueReadBuffer(queue, out_mem, CL_TRUE, 0, data_size(),
|
||||
output_data_1.data(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueReadBuffer failed");
|
||||
|
||||
for (size_t i = 0; i < num_elements; i++)
|
||||
{
|
||||
cl_int error = clCommandNDRangeKernelKHR(
|
||||
CHECK_VERIFICATION_ERROR(pattern, output_data_1[i], i);
|
||||
}
|
||||
|
||||
const cl_int new_pattern = 12;
|
||||
error = clEnqueueFillBuffer(queue, in_mem, &new_pattern, sizeof(cl_int), 0,
|
||||
data_size(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueFillBuffer failed");
|
||||
|
||||
error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0, nullptr,
|
||||
nullptr);
|
||||
test_error(error, "clEnqueueCommandBufferKHR failed");
|
||||
|
||||
std::vector<cl_int> output_data_2(num_elements);
|
||||
error = clEnqueueReadBuffer(queue, out_mem, CL_TRUE, 0, data_size(),
|
||||
output_data_2.data(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueReadBuffer failed");
|
||||
|
||||
for (size_t i = 0; i < num_elements; i++)
|
||||
{
|
||||
CHECK_VERIFICATION_ERROR(new_pattern, output_data_2[i], i);
|
||||
}
|
||||
|
||||
return CL_SUCCESS;
|
||||
};
|
||||
|
||||
cl_int MixedCommandsTest::Run()
|
||||
{
|
||||
cl_int error;
|
||||
const size_t iterations = 4;
|
||||
clMemWrapper result_mem =
|
||||
clCreateBuffer(context, CL_MEM_READ_WRITE, sizeof(cl_int) * iterations,
|
||||
nullptr, &error);
|
||||
test_error(error, "clCreateBuffer failed");
|
||||
|
||||
const cl_int pattern_base = 42;
|
||||
for (size_t i = 0; i < iterations; i++)
|
||||
{
|
||||
const cl_int pattern = pattern_base + i;
|
||||
cl_int error = clCommandFillBufferKHR(
|
||||
command_buffer, nullptr, nullptr, in_mem, &pattern, sizeof(cl_int),
|
||||
0, data_size(), 0, nullptr, nullptr, nullptr);
|
||||
test_error(error, "clCommandFillBufferKHR failed");
|
||||
|
||||
error = clCommandNDRangeKernelKHR(
|
||||
command_buffer, nullptr, nullptr, kernel, 1, nullptr, &num_elements,
|
||||
nullptr, 0, nullptr, nullptr, nullptr);
|
||||
test_error(error, "clCommandNDRangeKernelKHR failed");
|
||||
|
||||
error = clFinalizeCommandBufferKHR(command_buffer);
|
||||
test_error(error, "clFinalizeCommandBufferKHR failed");
|
||||
|
||||
const cl_int pattern = 42;
|
||||
error = clEnqueueFillBuffer(queue, in_mem, &pattern, sizeof(cl_int), 0,
|
||||
data_size(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueFillBuffer failed");
|
||||
|
||||
error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0,
|
||||
nullptr, nullptr);
|
||||
test_error(error, "clEnqueueCommandBufferKHR failed");
|
||||
|
||||
std::vector<cl_int> output_data_1(num_elements);
|
||||
error = clEnqueueReadBuffer(queue, out_mem, CL_TRUE, 0, data_size(),
|
||||
output_data_1.data(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueReadBuffer failed");
|
||||
|
||||
for (size_t i = 0; i < num_elements; i++)
|
||||
{
|
||||
CHECK_VERIFICATION_ERROR(pattern, output_data_1[i], i);
|
||||
}
|
||||
|
||||
const cl_int new_pattern = 12;
|
||||
error = clEnqueueFillBuffer(queue, in_mem, &new_pattern, sizeof(cl_int),
|
||||
0, data_size(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueFillBuffer failed");
|
||||
|
||||
error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0,
|
||||
nullptr, nullptr);
|
||||
test_error(error, "clEnqueueCommandBufferKHR failed");
|
||||
|
||||
std::vector<cl_int> output_data_2(num_elements);
|
||||
error = clEnqueueReadBuffer(queue, out_mem, CL_TRUE, 0, data_size(),
|
||||
output_data_2.data(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueReadBuffer failed");
|
||||
|
||||
for (size_t i = 0; i < num_elements; i++)
|
||||
{
|
||||
CHECK_VERIFICATION_ERROR(new_pattern, output_data_2[i], i);
|
||||
}
|
||||
|
||||
return CL_SUCCESS;
|
||||
const size_t result_offset = i * sizeof(cl_int);
|
||||
error = clCommandCopyBufferKHR(
|
||||
command_buffer, nullptr, nullptr, out_mem, result_mem, 0,
|
||||
result_offset, sizeof(cl_int), 0, nullptr, nullptr, nullptr);
|
||||
test_error(error, "clCommandCopyBufferKHR failed");
|
||||
}
|
||||
};
|
||||
|
||||
// Test enqueuing a command-buffer containing multiple command, including
|
||||
// operations other than NDRange kernel execution.
|
||||
struct MixedCommandsTest : public BasicCommandBufferTest
|
||||
{
|
||||
using BasicCommandBufferTest::BasicCommandBufferTest;
|
||||
error = clFinalizeCommandBufferKHR(command_buffer);
|
||||
test_error(error, "clFinalizeCommandBufferKHR failed");
|
||||
|
||||
cl_int Run() override
|
||||
error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0, nullptr,
|
||||
nullptr);
|
||||
test_error(error, "clEnqueueCommandBufferKHR failed");
|
||||
|
||||
std::vector<cl_int> result_data(num_elements);
|
||||
error = clEnqueueReadBuffer(queue, result_mem, CL_TRUE, 0,
|
||||
iterations * sizeof(cl_int), result_data.data(),
|
||||
0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueReadBuffer failed");
|
||||
|
||||
for (size_t i = 0; i < iterations; i++)
|
||||
{
|
||||
cl_int error;
|
||||
const size_t iterations = 4;
|
||||
clMemWrapper result_mem =
|
||||
clCreateBuffer(context, CL_MEM_READ_WRITE,
|
||||
sizeof(cl_int) * iterations, nullptr, &error);
|
||||
test_error(error, "clCreateBuffer failed");
|
||||
|
||||
const cl_int pattern_base = 42;
|
||||
for (size_t i = 0; i < iterations; i++)
|
||||
{
|
||||
const cl_int pattern = pattern_base + i;
|
||||
cl_int error = clCommandFillBufferKHR(
|
||||
command_buffer, nullptr, nullptr, in_mem, &pattern,
|
||||
sizeof(cl_int), 0, data_size(), 0, nullptr, nullptr, nullptr);
|
||||
test_error(error, "clCommandFillBufferKHR failed");
|
||||
|
||||
error = clCommandNDRangeKernelKHR(
|
||||
command_buffer, nullptr, nullptr, kernel, 1, nullptr,
|
||||
&num_elements, nullptr, 0, nullptr, nullptr, nullptr);
|
||||
test_error(error, "clCommandNDRangeKernelKHR failed");
|
||||
|
||||
const size_t result_offset = i * sizeof(cl_int);
|
||||
error = clCommandCopyBufferKHR(
|
||||
command_buffer, nullptr, nullptr, out_mem, result_mem, 0,
|
||||
result_offset, sizeof(cl_int), 0, nullptr, nullptr, nullptr);
|
||||
test_error(error, "clCommandCopyBufferKHR failed");
|
||||
}
|
||||
|
||||
error = clFinalizeCommandBufferKHR(command_buffer);
|
||||
test_error(error, "clFinalizeCommandBufferKHR failed");
|
||||
|
||||
error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0,
|
||||
nullptr, nullptr);
|
||||
test_error(error, "clEnqueueCommandBufferKHR failed");
|
||||
|
||||
std::vector<cl_int> result_data(num_elements);
|
||||
error = clEnqueueReadBuffer(queue, result_mem, CL_TRUE, 0,
|
||||
iterations * sizeof(cl_int),
|
||||
result_data.data(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueReadBuffer failed");
|
||||
|
||||
for (size_t i = 0; i < iterations; i++)
|
||||
{
|
||||
const cl_int ref = pattern_base + i;
|
||||
CHECK_VERIFICATION_ERROR(ref, result_data[i], i);
|
||||
}
|
||||
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
};
|
||||
|
||||
// Test flushing the command-queue between command-buffer enqueues
|
||||
struct ExplicitFlushTest : public BasicCommandBufferTest
|
||||
{
|
||||
using BasicCommandBufferTest::BasicCommandBufferTest;
|
||||
|
||||
cl_int Run() override
|
||||
{
|
||||
cl_int error = clCommandNDRangeKernelKHR(
|
||||
command_buffer, nullptr, nullptr, kernel, 1, nullptr, &num_elements,
|
||||
nullptr, 0, nullptr, nullptr, nullptr);
|
||||
test_error(error, "clCommandNDRangeKernelKHR failed");
|
||||
|
||||
error = clFinalizeCommandBufferKHR(command_buffer);
|
||||
test_error(error, "clFinalizeCommandBufferKHR failed");
|
||||
|
||||
const cl_int pattern_A = 42;
|
||||
error = clEnqueueFillBuffer(queue, in_mem, &pattern_A, sizeof(cl_int),
|
||||
0, data_size(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueFillBuffer failed");
|
||||
|
||||
error = clFlush(queue);
|
||||
test_error(error, "clFlush failed");
|
||||
|
||||
error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0,
|
||||
nullptr, nullptr);
|
||||
test_error(error, "clEnqueueCommandBufferKHR failed");
|
||||
|
||||
std::vector<cl_int> output_data_A(num_elements);
|
||||
error = clEnqueueReadBuffer(queue, out_mem, CL_FALSE, 0, data_size(),
|
||||
output_data_A.data(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueReadBuffer failed");
|
||||
|
||||
const cl_int pattern_B = 0xA;
|
||||
error = clEnqueueFillBuffer(queue, in_mem, &pattern_B, sizeof(cl_int),
|
||||
0, data_size(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueFillBuffer failed");
|
||||
|
||||
error = clFlush(queue);
|
||||
test_error(error, "clFlush failed");
|
||||
|
||||
error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0,
|
||||
nullptr, nullptr);
|
||||
test_error(error, "clEnqueueCommandBufferKHR failed");
|
||||
|
||||
error = clFlush(queue);
|
||||
test_error(error, "clFlush failed");
|
||||
|
||||
std::vector<cl_int> output_data_B(num_elements);
|
||||
error = clEnqueueReadBuffer(queue, out_mem, CL_FALSE, 0, data_size(),
|
||||
output_data_B.data(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueReadBuffer failed");
|
||||
|
||||
error = clFinish(queue);
|
||||
test_error(error, "clFinish failed");
|
||||
|
||||
for (size_t i = 0; i < num_elements; i++)
|
||||
{
|
||||
CHECK_VERIFICATION_ERROR(pattern_A, output_data_A[i], i);
|
||||
|
||||
CHECK_VERIFICATION_ERROR(pattern_B, output_data_B[i], i);
|
||||
}
|
||||
return CL_SUCCESS;
|
||||
const cl_int ref = pattern_base + i;
|
||||
CHECK_VERIFICATION_ERROR(ref, result_data[i], i);
|
||||
}
|
||||
|
||||
bool Skip() override
|
||||
{
|
||||
return BasicCommandBufferTest::Skip() || !simultaneous_use_support;
|
||||
}
|
||||
};
|
||||
|
||||
// Test enqueueing a command-buffer twice separated by another enqueue operation
|
||||
struct InterleavedEnqueueTest : public BasicCommandBufferTest
|
||||
{
|
||||
using BasicCommandBufferTest::BasicCommandBufferTest;
|
||||
|
||||
cl_int Run() override
|
||||
{
|
||||
cl_int error = clCommandNDRangeKernelKHR(
|
||||
command_buffer, nullptr, nullptr, kernel, 1, nullptr, &num_elements,
|
||||
nullptr, 0, nullptr, nullptr, nullptr);
|
||||
test_error(error, "clCommandNDRangeKernelKHR failed");
|
||||
|
||||
error = clFinalizeCommandBufferKHR(command_buffer);
|
||||
test_error(error, "clFinalizeCommandBufferKHR failed");
|
||||
|
||||
cl_int pattern = 42;
|
||||
error = clEnqueueFillBuffer(queue, in_mem, &pattern, sizeof(cl_int), 0,
|
||||
data_size(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueFillBuffer failed");
|
||||
|
||||
error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0,
|
||||
nullptr, nullptr);
|
||||
test_error(error, "clEnqueueCommandBufferKHR failed");
|
||||
|
||||
pattern = 0xABCD;
|
||||
error = clEnqueueFillBuffer(queue, in_mem, &pattern, sizeof(cl_int), 0,
|
||||
data_size(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueFillBuffer failed");
|
||||
|
||||
error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0,
|
||||
nullptr, nullptr);
|
||||
test_error(error, "clEnqueueCommandBufferKHR failed");
|
||||
|
||||
error = clEnqueueCopyBuffer(queue, in_mem, out_mem, 0, 0, data_size(),
|
||||
0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueCopyBuffer failed");
|
||||
|
||||
std::vector<cl_int> output_data(num_elements);
|
||||
error = clEnqueueReadBuffer(queue, out_mem, CL_TRUE, 0, data_size(),
|
||||
output_data.data(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueReadBuffer failed");
|
||||
|
||||
for (size_t i = 0; i < num_elements; i++)
|
||||
{
|
||||
CHECK_VERIFICATION_ERROR(pattern, output_data[i], i);
|
||||
}
|
||||
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
|
||||
bool Skip() override
|
||||
{
|
||||
return BasicCommandBufferTest::Skip() || !simultaneous_use_support;
|
||||
}
|
||||
};
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
int test_multi_flag_creation(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
{
|
||||
return MakeAndRunTest<MultiFlagCreationTest>(device, context, queue,
|
||||
num_elements);
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
|
||||
int test_single_ndrange(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
cl_int ExplicitFlushTest::Run()
|
||||
{
|
||||
return MakeAndRunTest<BasicEnqueueTest>(device, context, queue,
|
||||
num_elements);
|
||||
cl_int error = clCommandNDRangeKernelKHR(
|
||||
command_buffer, nullptr, nullptr, kernel, 1, nullptr, &num_elements,
|
||||
nullptr, 0, nullptr, nullptr, nullptr);
|
||||
test_error(error, "clCommandNDRangeKernelKHR failed");
|
||||
|
||||
error = clFinalizeCommandBufferKHR(command_buffer);
|
||||
test_error(error, "clFinalizeCommandBufferKHR failed");
|
||||
|
||||
const cl_int pattern_A = 42;
|
||||
error = clEnqueueFillBuffer(queue, in_mem, &pattern_A, sizeof(cl_int), 0,
|
||||
data_size(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueFillBuffer failed");
|
||||
|
||||
error = clFlush(queue);
|
||||
test_error(error, "clFlush failed");
|
||||
|
||||
error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0, nullptr,
|
||||
nullptr);
|
||||
test_error(error, "clEnqueueCommandBufferKHR failed");
|
||||
|
||||
std::vector<cl_int> output_data_A(num_elements);
|
||||
error = clEnqueueReadBuffer(queue, out_mem, CL_FALSE, 0, data_size(),
|
||||
output_data_A.data(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueReadBuffer failed");
|
||||
|
||||
const cl_int pattern_B = 0xA;
|
||||
error = clEnqueueFillBuffer(queue, in_mem, &pattern_B, sizeof(cl_int), 0,
|
||||
data_size(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueFillBuffer failed");
|
||||
|
||||
error = clFlush(queue);
|
||||
test_error(error, "clFlush failed");
|
||||
|
||||
error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0, nullptr,
|
||||
nullptr);
|
||||
test_error(error, "clEnqueueCommandBufferKHR failed");
|
||||
|
||||
error = clFlush(queue);
|
||||
test_error(error, "clFlush failed");
|
||||
|
||||
std::vector<cl_int> output_data_B(num_elements);
|
||||
error = clEnqueueReadBuffer(queue, out_mem, CL_FALSE, 0, data_size(),
|
||||
output_data_B.data(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueReadBuffer failed");
|
||||
|
||||
error = clFinish(queue);
|
||||
test_error(error, "clFinish failed");
|
||||
|
||||
for (size_t i = 0; i < num_elements; i++)
|
||||
{
|
||||
CHECK_VERIFICATION_ERROR(pattern_A, output_data_A[i], i);
|
||||
|
||||
CHECK_VERIFICATION_ERROR(pattern_B, output_data_B[i], i);
|
||||
}
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
|
||||
int test_interleaved_enqueue(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
bool ExplicitFlushTest::Skip()
|
||||
{
|
||||
return MakeAndRunTest<InterleavedEnqueueTest>(device, context, queue,
|
||||
num_elements);
|
||||
return BasicCommandBufferTest::Skip() || !simultaneous_use_support;
|
||||
}
|
||||
|
||||
int test_mixed_commands(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
cl_int InterleavedEnqueueTest::Run()
|
||||
{
|
||||
return MakeAndRunTest<MixedCommandsTest>(device, context, queue,
|
||||
num_elements);
|
||||
cl_int error = clCommandNDRangeKernelKHR(
|
||||
command_buffer, nullptr, nullptr, kernel, 1, nullptr, &num_elements,
|
||||
nullptr, 0, nullptr, nullptr, nullptr);
|
||||
test_error(error, "clCommandNDRangeKernelKHR failed");
|
||||
|
||||
error = clFinalizeCommandBufferKHR(command_buffer);
|
||||
test_error(error, "clFinalizeCommandBufferKHR failed");
|
||||
|
||||
cl_int pattern = 42;
|
||||
error = clEnqueueFillBuffer(queue, in_mem, &pattern, sizeof(cl_int), 0,
|
||||
data_size(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueFillBuffer failed");
|
||||
|
||||
error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0, nullptr,
|
||||
nullptr);
|
||||
test_error(error, "clEnqueueCommandBufferKHR failed");
|
||||
|
||||
pattern = 0xABCD;
|
||||
error = clEnqueueFillBuffer(queue, in_mem, &pattern, sizeof(cl_int), 0,
|
||||
data_size(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueFillBuffer failed");
|
||||
|
||||
error = clEnqueueCommandBufferKHR(0, nullptr, command_buffer, 0, nullptr,
|
||||
nullptr);
|
||||
test_error(error, "clEnqueueCommandBufferKHR failed");
|
||||
|
||||
error = clEnqueueCopyBuffer(queue, in_mem, out_mem, 0, 0, data_size(), 0,
|
||||
nullptr, nullptr);
|
||||
test_error(error, "clEnqueueCopyBuffer failed");
|
||||
|
||||
std::vector<cl_int> output_data(num_elements);
|
||||
error = clEnqueueReadBuffer(queue, out_mem, CL_TRUE, 0, data_size(),
|
||||
output_data.data(), 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueReadBuffer failed");
|
||||
|
||||
for (size_t i = 0; i < num_elements; i++)
|
||||
{
|
||||
CHECK_VERIFICATION_ERROR(pattern, output_data[i], i);
|
||||
}
|
||||
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
|
||||
int test_explicit_flush(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
bool InterleavedEnqueueTest::Skip()
|
||||
{
|
||||
return MakeAndRunTest<ExplicitFlushTest>(device, context, queue,
|
||||
num_elements);
|
||||
return BasicCommandBufferTest::Skip() || !simultaneous_use_support;
|
||||
}
|
||||
|
||||
@@ -84,6 +84,49 @@ protected:
|
||||
clCommandBufferWrapper command_buffer;
|
||||
};
|
||||
|
||||
// Test that CL_COMMAND_BUFFER_FLAGS_KHR bitfield is parsed correctly when
|
||||
// multiple flags are set.
|
||||
struct MultiFlagCreationTest : public BasicCommandBufferTest
|
||||
{
|
||||
using BasicCommandBufferTest::BasicCommandBufferTest;
|
||||
|
||||
cl_int Run() override;
|
||||
};
|
||||
|
||||
// Test enqueuing a command-buffer containing a single NDRange command once
|
||||
struct BasicEnqueueTest : public BasicCommandBufferTest
|
||||
{
|
||||
using BasicCommandBufferTest::BasicCommandBufferTest;
|
||||
|
||||
cl_int Run() override;
|
||||
};
|
||||
|
||||
// Test enqueuing a command-buffer containing multiple command, including
|
||||
// operations other than NDRange kernel execution.
|
||||
struct MixedCommandsTest : public BasicCommandBufferTest
|
||||
{
|
||||
using BasicCommandBufferTest::BasicCommandBufferTest;
|
||||
|
||||
cl_int Run() override;
|
||||
};
|
||||
|
||||
// Test flushing the command-queue between command-buffer enqueues
|
||||
struct ExplicitFlushTest : public BasicCommandBufferTest
|
||||
{
|
||||
using BasicCommandBufferTest::BasicCommandBufferTest;
|
||||
|
||||
cl_int Run() override;
|
||||
bool Skip() override;
|
||||
};
|
||||
|
||||
// Test enqueueing a command-buffer twice separated by another enqueue operation
|
||||
struct InterleavedEnqueueTest : public BasicCommandBufferTest
|
||||
{
|
||||
using BasicCommandBufferTest::BasicCommandBufferTest;
|
||||
|
||||
cl_int Run() override;
|
||||
bool Skip() override;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
int MakeAndRunTest(cl_device_id device, cl_context context,
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// Copyright (c) 2025 The Khronos Group Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "basic_command_buffer.h"
|
||||
|
||||
REGISTER_TEST(multi_flag_creation)
|
||||
{
|
||||
return MakeAndRunTest<MultiFlagCreationTest>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
REGISTER_TEST(single_ndrange)
|
||||
{
|
||||
return MakeAndRunTest<BasicEnqueueTest>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
REGISTER_TEST(interleaved_enqueue)
|
||||
{
|
||||
return MakeAndRunTest<InterleavedEnqueueTest>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
REGISTER_TEST(mixed_commands)
|
||||
{
|
||||
return MakeAndRunTest<MixedCommandsTest>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
REGISTER_TEST(explicit_flush)
|
||||
{
|
||||
return MakeAndRunTest<ExplicitFlushTest>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
@@ -12,43 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "procs.h"
|
||||
#include "harness/testHarness.h"
|
||||
|
||||
test_definition test_list[] = {
|
||||
ADD_TEST(mutable_command_info_device_query),
|
||||
ADD_TEST(mutable_command_info_buffer),
|
||||
ADD_TEST(mutable_command_properties_array),
|
||||
ADD_TEST(mutable_command_kernel),
|
||||
ADD_TEST(mutable_command_dimensions),
|
||||
ADD_TEST(mutable_command_info_type),
|
||||
ADD_TEST(mutable_command_info_queue),
|
||||
ADD_TEST(mutable_command_info_global_work_offset),
|
||||
ADD_TEST(mutable_command_info_local_work_size),
|
||||
ADD_TEST(mutable_command_info_global_work_size),
|
||||
ADD_TEST(mutable_command_full_dispatch),
|
||||
ADD_TEST(mutable_command_overwrite_update),
|
||||
ADD_TEST(mutable_command_multiple_dispatches),
|
||||
ADD_TEST(mutable_command_iterative_arg_update),
|
||||
ADD_TEST(mutable_dispatch_image_1d_arguments),
|
||||
ADD_TEST(mutable_dispatch_image_2d_arguments),
|
||||
ADD_TEST(mutable_dispatch_out_of_order),
|
||||
ADD_TEST(mutable_dispatch_simultaneous_out_of_order),
|
||||
ADD_TEST(mutable_dispatch_simultaneous_in_order),
|
||||
ADD_TEST(mutable_dispatch_simultaneous_cross_queue),
|
||||
ADD_TEST(mutable_dispatch_global_size),
|
||||
ADD_TEST(mutable_dispatch_local_size),
|
||||
ADD_TEST(mutable_dispatch_global_offset),
|
||||
ADD_TEST(mutable_dispatch_svm_arguments),
|
||||
ADD_TEST(mutable_dispatch_local_arguments),
|
||||
ADD_TEST(mutable_dispatch_global_arguments),
|
||||
ADD_TEST(mutable_dispatch_pod_arguments),
|
||||
ADD_TEST(mutable_dispatch_null_arguments),
|
||||
ADD_TEST(command_buffer_with_no_additional_work_groups),
|
||||
ADD_TEST(ndrange_with_no_additional_work_groups),
|
||||
ADD_TEST(ndrange_command_buffer_with_no_additional_work_groups),
|
||||
};
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
// A device may report the required properties of a queue that
|
||||
@@ -57,7 +22,9 @@ int main(int argc, const char *argv[])
|
||||
// for this in the tests themselves, rather than here, where we have a
|
||||
// device to query.
|
||||
const cl_command_queue_properties queue_properties = 0;
|
||||
return runTestHarnessWithCheck(argc, argv, ARRAY_SIZE(test_list), test_list,
|
||||
return runTestHarnessWithCheck(argc, argv,
|
||||
test_registry::getInstance().num_tests(),
|
||||
test_registry::getInstance().definitions(),
|
||||
false, queue_properties, nullptr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -826,44 +826,31 @@ struct MutableDispatchSVMArguments : public MutableDispatchArgumentsTest
|
||||
|
||||
}
|
||||
|
||||
int test_mutable_dispatch_local_arguments(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(mutable_dispatch_local_arguments)
|
||||
{
|
||||
return MakeAndRunTest<MutableDispatchLocalArguments>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
int test_mutable_dispatch_global_arguments(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(mutable_dispatch_global_arguments)
|
||||
{
|
||||
return MakeAndRunTest<MutableDispatchGlobalArguments>(device, context,
|
||||
queue, num_elements);
|
||||
}
|
||||
|
||||
int test_mutable_dispatch_pod_arguments(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(mutable_dispatch_pod_arguments)
|
||||
{
|
||||
return MakeAndRunTest<MutableDispatchPODArguments>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
int test_mutable_dispatch_null_arguments(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(mutable_dispatch_null_arguments)
|
||||
{
|
||||
return MakeAndRunTest<MutableDispatchNullArguments>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
int test_mutable_dispatch_svm_arguments(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(mutable_dispatch_svm_arguments)
|
||||
{
|
||||
return MakeAndRunTest<MutableDispatchSVMArguments>(device, context, queue,
|
||||
num_elements);
|
||||
|
||||
@@ -492,8 +492,7 @@ struct MutableCommandFullDispatch : InfoMutableCommandBufferTest
|
||||
|
||||
}
|
||||
|
||||
int test_mutable_command_full_dispatch(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(mutable_command_full_dispatch)
|
||||
{
|
||||
return MakeAndRunTest<MutableCommandFullDispatch>(device, context, queue,
|
||||
num_elements);
|
||||
|
||||
@@ -160,9 +160,7 @@ struct MutableDispatchGlobalOffset : InfoMutableCommandBufferTest
|
||||
cl_mutable_command_khr command = nullptr;
|
||||
};
|
||||
|
||||
int test_mutable_dispatch_global_offset(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(mutable_dispatch_global_offset)
|
||||
{
|
||||
|
||||
return MakeAndRunTest<MutableDispatchGlobalOffset>(device, context, queue,
|
||||
|
||||
@@ -159,8 +159,7 @@ struct MutableDispatchGlobalSize : public InfoMutableCommandBufferTest
|
||||
cl_mutable_command_khr command = nullptr;
|
||||
};
|
||||
|
||||
int test_mutable_dispatch_global_size(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(mutable_dispatch_global_size)
|
||||
{
|
||||
return MakeAndRunTest<MutableDispatchGlobalSize>(device, context, queue,
|
||||
num_elements);
|
||||
|
||||
@@ -412,19 +412,13 @@ struct MutableDispatchImage2DArguments : public BasicMutableCommandBufferTest
|
||||
cl_mutable_command_khr command = nullptr;
|
||||
};
|
||||
|
||||
int test_mutable_dispatch_image_1d_arguments(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(mutable_dispatch_image_1d_arguments)
|
||||
{
|
||||
return MakeAndRunTest<MutableDispatchImage1DArguments>(device, context,
|
||||
queue, num_elements);
|
||||
}
|
||||
|
||||
int test_mutable_dispatch_image_2d_arguments(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(mutable_dispatch_image_2d_arguments)
|
||||
{
|
||||
return MakeAndRunTest<MutableDispatchImage2DArguments>(device, context,
|
||||
queue, num_elements);
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
#include <extensionHelpers.h>
|
||||
#include "typeWrappers.h"
|
||||
#include "procs.h"
|
||||
#include "testHarness.h"
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
@@ -441,76 +440,56 @@ struct InfoLocalWorkSize : public InfoMutableCommandBufferTest
|
||||
size_t test_local_work_size = 0;
|
||||
};
|
||||
|
||||
int test_mutable_command_info_device_query(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(mutable_command_info_device_query)
|
||||
{
|
||||
return MakeAndRunTest<InfoDeviceQuery>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
int test_mutable_command_info_buffer(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(mutable_command_info_buffer)
|
||||
{
|
||||
return MakeAndRunTest<InfoBuffer>(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_mutable_command_properties_array(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(mutable_command_properties_array)
|
||||
{
|
||||
return MakeAndRunTest<PropertiesArray>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
int test_mutable_command_kernel(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(mutable_command_kernel)
|
||||
{
|
||||
return MakeAndRunTest<Kernel>(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_mutable_command_dimensions(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(mutable_command_dimensions)
|
||||
{
|
||||
return MakeAndRunTest<Dimensions>(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_mutable_command_info_type(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(mutable_command_info_type)
|
||||
{
|
||||
return MakeAndRunTest<InfoType>(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_mutable_command_info_queue(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(mutable_command_info_queue)
|
||||
{
|
||||
return MakeAndRunTest<InfoQueue>(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_mutable_command_info_global_work_offset(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(mutable_command_info_global_work_offset)
|
||||
{
|
||||
return MakeAndRunTest<InfoGlobalWorkOffset>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
int test_mutable_command_info_global_work_size(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(mutable_command_info_global_work_size)
|
||||
{
|
||||
return MakeAndRunTest<InfoGlobalWorkSize>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
int test_mutable_command_info_local_work_size(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(mutable_command_info_local_work_size)
|
||||
{
|
||||
return MakeAndRunTest<InfoLocalWorkSize>(device, context, queue,
|
||||
num_elements);
|
||||
|
||||
@@ -212,10 +212,7 @@ struct IterativeArgUpdateDispatch : BasicMutableCommandBufferTest
|
||||
|
||||
}
|
||||
|
||||
int test_mutable_command_iterative_arg_update(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(mutable_command_iterative_arg_update)
|
||||
{
|
||||
return MakeAndRunTest<IterativeArgUpdateDispatch>(device, context, queue,
|
||||
num_elements);
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
#include <extensionHelpers.h>
|
||||
#include "typeWrappers.h"
|
||||
#include "procs.h"
|
||||
#include "testHarness.h"
|
||||
#include "mutable_command_basic.h"
|
||||
#include <vector>
|
||||
@@ -166,8 +165,7 @@ struct MutableDispatchLocalSize : public InfoMutableCommandBufferTest
|
||||
cl_mutable_command_khr command = nullptr;
|
||||
};
|
||||
|
||||
int test_mutable_dispatch_local_size(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(mutable_dispatch_local_size)
|
||||
{
|
||||
return MakeAndRunTest<MutableDispatchLocalSize>(device, context, queue,
|
||||
num_elements);
|
||||
|
||||
@@ -207,10 +207,7 @@ struct MultipleCommandsDispatch : BasicMutableCommandBufferTest
|
||||
|
||||
}
|
||||
|
||||
int test_mutable_command_multiple_dispatches(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(mutable_command_multiple_dispatches)
|
||||
{
|
||||
return MakeAndRunTest<MultipleCommandsDispatch>(device, context, queue,
|
||||
num_elements);
|
||||
|
||||
@@ -215,10 +215,7 @@ struct OverwriteUpdateDispatch : BasicMutableCommandBufferTest
|
||||
|
||||
}
|
||||
|
||||
int test_mutable_command_overwrite_update(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(mutable_command_overwrite_update)
|
||||
{
|
||||
return MakeAndRunTest<OverwriteUpdateDispatch>(device, context, queue,
|
||||
num_elements);
|
||||
|
||||
@@ -605,35 +605,25 @@ struct CrossQueueSimultaneousMutableDispatchTest
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
int test_mutable_dispatch_out_of_order(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(mutable_dispatch_out_of_order)
|
||||
{
|
||||
return MakeAndRunTest<SimultaneousMutableDispatchTest<false, true>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_mutable_dispatch_simultaneous_out_of_order(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(mutable_dispatch_simultaneous_out_of_order)
|
||||
{
|
||||
return MakeAndRunTest<SimultaneousMutableDispatchTest<true, true>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_mutable_dispatch_simultaneous_in_order(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(mutable_dispatch_simultaneous_in_order)
|
||||
{
|
||||
return MakeAndRunTest<SimultaneousMutableDispatchTest<true, false>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_mutable_dispatch_simultaneous_cross_queue(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(mutable_dispatch_simultaneous_cross_queue)
|
||||
{
|
||||
return MakeAndRunTest<CrossQueueSimultaneousMutableDispatchTest>(
|
||||
device, context, queue, num_elements);
|
||||
|
||||
@@ -284,29 +284,21 @@ struct MutableDispatchWorkGroups : public BasicMutableCommandBufferTest
|
||||
const size_t sizeToAllocate = 64 * sizeof(cl_int);
|
||||
};
|
||||
|
||||
int test_command_buffer_with_no_additional_work_groups(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(command_buffer_with_no_additional_work_groups)
|
||||
{
|
||||
|
||||
return MakeAndRunTest<MutableDispatchWorkGroups<0>>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
int test_ndrange_with_no_additional_work_groups(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(ndrange_with_no_additional_work_groups)
|
||||
{
|
||||
|
||||
return MakeAndRunTest<MutableDispatchWorkGroups<1>>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
int test_ndrange_command_buffer_with_no_additional_work_groups(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(ndrange_command_buffer_with_no_additional_work_groups)
|
||||
{
|
||||
|
||||
return MakeAndRunTest<MutableDispatchWorkGroups<2>>(device, context, queue,
|
||||
|
||||
@@ -1,143 +0,0 @@
|
||||
//
|
||||
// Copyright (c) 2023 The Khronos Group Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
#ifndef CL_KHR_COMMAND_BUFFER_MUTABLE_DISPATCH_PROCS_H
|
||||
#define CL_KHR_COMMAND_BUFFER_MUTABLE_DISPATCH_PROCS_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
|
||||
|
||||
// Basic mutable dispatch tests
|
||||
extern int test_mutable_command_info_device_query(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_command_info_buffer(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_command_info_type(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_command_info_queue(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_command_properties_array(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_command_kernel(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_command_dimensions(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_command_info_global_work_offset(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_command_info_local_work_size(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_command_info_global_work_size(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_dispatch_image_1d_arguments(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_dispatch_image_2d_arguments(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_dispatch_global_arguments(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_dispatch_local_arguments(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_dispatch_pod_arguments(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_dispatch_null_arguments(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_dispatch_svm_arguments(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_dispatch_out_of_order(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_dispatch_simultaneous_out_of_order(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_dispatch_simultaneous_in_order(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_dispatch_simultaneous_cross_queue(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_dispatch_global_size(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_dispatch_local_size(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_dispatch_global_offset(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_command_full_dispatch(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_command_overwrite_update(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_command_multiple_dispatches(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_mutable_command_iterative_arg_update(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_command_buffer_with_no_additional_work_groups(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_ndrange_with_no_additional_work_groups(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_ndrange_command_buffer_with_no_additional_work_groups(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
|
||||
#endif /*_CL_KHR_COMMAND_BUFFER_MUTABLE_DISPATCH_PROCS_H*/
|
||||
@@ -15,7 +15,6 @@
|
||||
//
|
||||
|
||||
#include "basic_command_buffer.h"
|
||||
#include "procs.h"
|
||||
|
||||
#include <vector>
|
||||
#include <thread>
|
||||
@@ -823,10 +822,7 @@ struct CommandBufferEventSync : public BasicCommandBufferTest
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// return-events test cases for regular queue
|
||||
int test_regular_wait_for_command_buffer(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(regular_wait_for_command_buffer)
|
||||
{
|
||||
int status = TEST_PASS;
|
||||
// The approach here is that test scenario which involves out-of-order
|
||||
@@ -848,10 +844,7 @@ int test_regular_wait_for_command_buffer(cl_device_id device,
|
||||
return status;
|
||||
}
|
||||
|
||||
int test_command_buffer_wait_for_command_buffer(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(command_buffer_wait_for_command_buffer)
|
||||
{
|
||||
int status = TEST_PASS;
|
||||
// out-of-order command queue test
|
||||
@@ -871,10 +864,7 @@ int test_command_buffer_wait_for_command_buffer(cl_device_id device,
|
||||
return status;
|
||||
}
|
||||
|
||||
int test_command_buffer_wait_for_sec_command_buffer(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(command_buffer_wait_for_sec_command_buffer)
|
||||
{
|
||||
int status = TEST_PASS;
|
||||
// out-of-order command queue test
|
||||
@@ -894,8 +884,7 @@ int test_command_buffer_wait_for_sec_command_buffer(cl_device_id device,
|
||||
return status;
|
||||
}
|
||||
|
||||
int test_return_event_callback(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(return_event_callback)
|
||||
{
|
||||
int status = TEST_PASS;
|
||||
// out-of-order command queue test
|
||||
@@ -913,8 +902,7 @@ int test_return_event_callback(cl_device_id device, cl_context context,
|
||||
return status;
|
||||
}
|
||||
|
||||
int test_clwaitforevents_single(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(clwaitforevents_single)
|
||||
{
|
||||
int status = TEST_PASS;
|
||||
// out-of-order command queue test
|
||||
@@ -934,8 +922,7 @@ int test_clwaitforevents_single(cl_device_id device, cl_context context,
|
||||
return status;
|
||||
}
|
||||
|
||||
int test_clwaitforevents(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(clwaitforevents)
|
||||
{
|
||||
int status = TEST_PASS;
|
||||
// out-of-order command queue test
|
||||
@@ -953,10 +940,7 @@ int test_clwaitforevents(cl_device_id device, cl_context context,
|
||||
return status;
|
||||
}
|
||||
|
||||
int test_command_buffer_wait_for_regular(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(command_buffer_wait_for_regular)
|
||||
{
|
||||
int status = TEST_PASS;
|
||||
// out-of-order command queue test
|
||||
@@ -976,8 +960,7 @@ int test_command_buffer_wait_for_regular(cl_device_id device,
|
||||
return status;
|
||||
}
|
||||
|
||||
int test_wait_for_sec_queue_event(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(wait_for_sec_queue_event)
|
||||
{
|
||||
int status = TEST_PASS;
|
||||
// out-of-order command queue test
|
||||
@@ -1000,8 +983,7 @@ int test_wait_for_sec_queue_event(cl_device_id device, cl_context context,
|
||||
//--------------------------------------------------------------------------
|
||||
// user-events test cases
|
||||
|
||||
int test_user_event_wait(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(user_event_wait)
|
||||
{
|
||||
int status = TEST_PASS;
|
||||
// out-of-order command queue test
|
||||
@@ -1019,8 +1001,7 @@ int test_user_event_wait(cl_device_id device, cl_context context,
|
||||
return status;
|
||||
}
|
||||
|
||||
int test_user_events_wait(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(user_events_wait)
|
||||
{
|
||||
int status = TEST_PASS;
|
||||
// out-of-order command queue test
|
||||
@@ -1038,8 +1019,7 @@ int test_user_events_wait(cl_device_id device, cl_context context,
|
||||
return status;
|
||||
}
|
||||
|
||||
int test_user_event_callback(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(user_event_callback)
|
||||
{
|
||||
int status = TEST_PASS;
|
||||
// out-of-order command queue test
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
// limitations under the License.
|
||||
|
||||
#include "basic_command_buffer.h"
|
||||
#include "procs.h"
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -71,15 +70,13 @@ struct FinalizeEmpty : public BasicCommandBufferTest
|
||||
};
|
||||
} // anonymous namespace
|
||||
|
||||
int test_finalize_invalid(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(finalize_invalid)
|
||||
{
|
||||
return MakeAndRunTest<FinalizeInvalid>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
int test_finalize_empty(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(finalize_empty)
|
||||
{
|
||||
return MakeAndRunTest<FinalizeEmpty>(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
//
|
||||
|
||||
#include "basic_command_buffer.h"
|
||||
#include "procs.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -374,40 +373,35 @@ struct CommandBufferGetCommandBufferInfo : public BasicCommandBufferTest
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
int test_info_queues(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(info_queues)
|
||||
{
|
||||
return MakeAndRunTest<
|
||||
CommandBufferGetCommandBufferInfo<CombufInfoTestMode::CITM_QUEUES>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_info_ref_count(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(info_ref_count)
|
||||
{
|
||||
return MakeAndRunTest<
|
||||
CommandBufferGetCommandBufferInfo<CombufInfoTestMode::CITM_REF_COUNT>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_info_state(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(info_state)
|
||||
{
|
||||
return MakeAndRunTest<
|
||||
CommandBufferGetCommandBufferInfo<CombufInfoTestMode::CITM_STATE>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_info_prop_array(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(info_prop_array)
|
||||
{
|
||||
return MakeAndRunTest<
|
||||
CommandBufferGetCommandBufferInfo<CombufInfoTestMode::CITM_PROP_ARRAY>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_info_context(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(info_context)
|
||||
{
|
||||
return MakeAndRunTest<
|
||||
CommandBufferGetCommandBufferInfo<CombufInfoTestMode::CITM_CONTEXT>>(
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
//
|
||||
|
||||
#include "basic_command_buffer.h"
|
||||
#include "procs.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -337,15 +336,13 @@ struct OutOfOrderTest : public BasicCommandBufferTest
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
int test_out_of_order(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(out_of_order)
|
||||
{
|
||||
return MakeAndRunTest<OutOfOrderTest<false>>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
int test_simultaneous_out_of_order(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(simultaneous_out_of_order)
|
||||
{
|
||||
return MakeAndRunTest<OutOfOrderTest<true>>(device, context, queue,
|
||||
num_elements);
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include <harness/os_helpers.h>
|
||||
|
||||
#include "basic_command_buffer.h"
|
||||
#include "procs.h"
|
||||
|
||||
#if !defined(_WIN32)
|
||||
#if defined(__APPLE__)
|
||||
@@ -524,15 +523,13 @@ struct CommandBufferPrintfTest : public BasicCommandBufferTest
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
int test_basic_printf(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(basic_printf)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferPrintfTest<false>>(device, context,
|
||||
queue, num_elements);
|
||||
}
|
||||
|
||||
int test_simultaneous_printf(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(simultaneous_printf)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferPrintfTest<true>>(device, context, queue,
|
||||
num_elements);
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
//
|
||||
|
||||
#include "basic_command_buffer.h"
|
||||
#include "procs.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -357,22 +356,19 @@ struct CommandBufferSubstituteQueueProfiling : public BasicCommandBufferTest
|
||||
};
|
||||
} // anonymous namespace
|
||||
|
||||
int test_basic_profiling(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(basic_profiling)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferProfiling<false>>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
int test_simultaneous_profiling(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(simultaneous_profiling)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferProfiling<true>>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
int test_substitute_queue_profiling(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(substitute_queue_profiling)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferSubstituteQueueProfiling>(
|
||||
device, context, queue, num_elements);
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "basic_command_buffer.h"
|
||||
#include "procs.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -396,38 +395,31 @@ struct QueueOrderTest : public BasicCommandBufferTest
|
||||
};
|
||||
} // anonymous namespace
|
||||
|
||||
int test_queue_substitution(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(queue_substitution)
|
||||
{
|
||||
return MakeAndRunTest<SubstituteQueueTest<false, false>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_properties_queue_substitution(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(properties_queue_substitution)
|
||||
{
|
||||
return MakeAndRunTest<SubstituteQueueTest<true, false>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_simultaneous_queue_substitution(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(simultaneous_queue_substitution)
|
||||
{
|
||||
return MakeAndRunTest<SubstituteQueueTest<false, true>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_queue_substitute_in_order(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(queue_substitute_in_order)
|
||||
{
|
||||
return MakeAndRunTest<QueueOrderTest<false>>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
int test_queue_substitute_out_of_order(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(queue_substitute_out_of_order)
|
||||
{
|
||||
return MakeAndRunTest<QueueOrderTest<true>>(device, context, queue,
|
||||
num_elements);
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
//
|
||||
|
||||
#include "basic_command_buffer.h"
|
||||
#include "procs.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -306,15 +305,13 @@ struct CommandBufferSetKernelArg : public BasicCommandBufferTest
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
int test_basic_set_kernel_arg(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(basic_set_kernel_arg)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferSetKernelArg<false>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_pending_set_kernel_arg(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(pending_set_kernel_arg)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferSetKernelArg<true>>(device, context,
|
||||
queue, num_elements);
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "basic_command_buffer.h"
|
||||
#include "procs.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -146,8 +145,7 @@ struct BarrierWithWaitListKHR : public BasicCommandBufferTest
|
||||
};
|
||||
|
||||
|
||||
int test_barrier_wait_list(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(barrier_wait_list)
|
||||
{
|
||||
return MakeAndRunTest<BarrierWithWaitListKHR>(device, context, queue,
|
||||
num_elements);
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include "basic_command_buffer.h"
|
||||
#include "svm_command_basic.h"
|
||||
#include "harness/typeWrappers.h"
|
||||
#include "procs.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -563,42 +562,36 @@ struct CopyBufferRectKHR : public BasicCommandBufferTest
|
||||
};
|
||||
};
|
||||
|
||||
int test_copy_image(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(copy_image)
|
||||
{
|
||||
return MakeAndRunTest<CopyImageKHR>(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_copy_buffer(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(copy_buffer)
|
||||
{
|
||||
return MakeAndRunTest<CopyBufferKHR>(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_copy_svm_buffer(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(copy_svm_buffer)
|
||||
{
|
||||
return MakeAndRunTest<CopySVMBufferKHR>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
|
||||
int test_copy_buffer_to_image(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(copy_buffer_to_image)
|
||||
{
|
||||
return MakeAndRunTest<CopyBufferToImageKHR>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
int test_copy_image_to_buffer(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(copy_image_to_buffer)
|
||||
{
|
||||
return MakeAndRunTest<CopyImageToBufferKHR>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
int test_copy_buffer_rect(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(copy_buffer_rect)
|
||||
{
|
||||
return MakeAndRunTest<CopyBufferRectKHR>(device, context, queue,
|
||||
num_elements);
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "basic_command_buffer.h"
|
||||
#include "procs.h"
|
||||
#include <vector>
|
||||
|
||||
namespace {
|
||||
@@ -222,33 +221,28 @@ struct ReferenceCount : public BasicCommandBufferTest
|
||||
};
|
||||
};
|
||||
|
||||
int test_event_info_command_type(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(event_info_command_type)
|
||||
{
|
||||
return MakeAndRunTest<CommandType>(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_event_info_command_queue(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(event_info_command_queue)
|
||||
{
|
||||
return MakeAndRunTest<CommandQueue>(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_event_info_context(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(event_info_context)
|
||||
{
|
||||
return MakeAndRunTest<Context>(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_event_info_execution_status(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(event_info_execution_status)
|
||||
{
|
||||
return MakeAndRunTest<ExecutionStatus>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
int test_event_info_reference_count(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(event_info_reference_count)
|
||||
{
|
||||
return MakeAndRunTest<ReferenceCount>(device, context, queue, num_elements);
|
||||
}
|
||||
@@ -16,7 +16,6 @@
|
||||
#include "basic_command_buffer.h"
|
||||
#include "svm_command_basic.h"
|
||||
#include "harness/typeWrappers.h"
|
||||
#include "procs.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -230,22 +229,19 @@ struct FillSVMBufferKHR : public BasicSVMCommandBufferTest
|
||||
};
|
||||
};
|
||||
|
||||
int test_fill_buffer(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(fill_buffer)
|
||||
{
|
||||
return MakeAndRunTest<FillBufferKHR>(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_fill_svm_buffer(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(fill_svm_buffer)
|
||||
{
|
||||
return MakeAndRunTest<FillSVMBufferKHR>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
|
||||
int test_fill_image(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(fill_image)
|
||||
{
|
||||
return MakeAndRunTest<FillImageKHR>(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
@@ -12,157 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "procs.h"
|
||||
#include "harness/testHarness.h"
|
||||
|
||||
test_definition test_list[] = {
|
||||
ADD_TEST(multi_flag_creation),
|
||||
ADD_TEST(single_ndrange),
|
||||
ADD_TEST(interleaved_enqueue),
|
||||
ADD_TEST(mixed_commands),
|
||||
ADD_TEST(explicit_flush),
|
||||
ADD_TEST(out_of_order),
|
||||
ADD_TEST(simultaneous_out_of_order),
|
||||
ADD_TEST(info_queues),
|
||||
ADD_TEST(info_ref_count),
|
||||
ADD_TEST(info_state),
|
||||
ADD_TEST(info_prop_array),
|
||||
ADD_TEST(info_context),
|
||||
ADD_TEST(basic_profiling),
|
||||
ADD_TEST(simultaneous_profiling),
|
||||
ADD_TEST(substitute_queue_profiling),
|
||||
ADD_TEST(regular_wait_for_command_buffer),
|
||||
ADD_TEST(command_buffer_wait_for_command_buffer),
|
||||
ADD_TEST(command_buffer_wait_for_sec_command_buffer),
|
||||
ADD_TEST(return_event_callback),
|
||||
ADD_TEST(clwaitforevents_single),
|
||||
ADD_TEST(clwaitforevents),
|
||||
ADD_TEST(command_buffer_wait_for_regular),
|
||||
ADD_TEST(wait_for_sec_queue_event),
|
||||
ADD_TEST(user_event_wait),
|
||||
ADD_TEST(user_events_wait),
|
||||
ADD_TEST(user_event_callback),
|
||||
ADD_TEST(queue_substitution),
|
||||
ADD_TEST(properties_queue_substitution),
|
||||
ADD_TEST(simultaneous_queue_substitution),
|
||||
ADD_TEST(queue_substitute_in_order),
|
||||
ADD_TEST(queue_substitute_out_of_order),
|
||||
ADD_TEST(fill_image),
|
||||
ADD_TEST(fill_buffer),
|
||||
ADD_TEST(fill_svm_buffer),
|
||||
ADD_TEST(copy_image),
|
||||
ADD_TEST(copy_buffer),
|
||||
ADD_TEST(copy_svm_buffer),
|
||||
ADD_TEST(copy_buffer_to_image),
|
||||
ADD_TEST(copy_image_to_buffer),
|
||||
ADD_TEST(copy_buffer_rect),
|
||||
ADD_TEST(barrier_wait_list),
|
||||
ADD_TEST(basic_printf),
|
||||
ADD_TEST(simultaneous_printf),
|
||||
ADD_TEST(basic_set_kernel_arg),
|
||||
ADD_TEST(pending_set_kernel_arg),
|
||||
ADD_TEST(event_info_command_type),
|
||||
ADD_TEST(event_info_command_queue),
|
||||
ADD_TEST(event_info_execution_status),
|
||||
ADD_TEST(event_info_context),
|
||||
ADD_TEST(event_info_reference_count),
|
||||
ADD_TEST(finalize_invalid),
|
||||
ADD_TEST(finalize_empty),
|
||||
// Command-buffer negative tests
|
||||
ADD_TEST(negative_retain_command_buffer_invalid_command_buffer),
|
||||
ADD_TEST(negative_release_command_buffer_invalid_command_buffer),
|
||||
ADD_TEST(negative_finalize_command_buffer_invalid_command_buffer),
|
||||
ADD_TEST(negative_finalize_command_buffer_not_recording_state),
|
||||
ADD_TEST(negative_command_buffer_command_fill_buffer_queue_not_null),
|
||||
ADD_TEST(negative_command_buffer_command_fill_buffer_context_not_same),
|
||||
ADD_TEST(
|
||||
negative_command_buffer_command_fill_buffer_sync_points_null_or_num_zero),
|
||||
ADD_TEST(
|
||||
negative_command_buffer_command_fill_buffer_invalid_command_buffer),
|
||||
ADD_TEST(
|
||||
negative_command_buffer_command_fill_buffer_finalized_command_buffer),
|
||||
ADD_TEST(
|
||||
negative_command_buffer_command_fill_buffer_mutable_handle_not_null),
|
||||
ADD_TEST(negative_command_buffer_command_fill_image_queue_not_null),
|
||||
ADD_TEST(negative_command_buffer_command_fill_image_context_not_same),
|
||||
ADD_TEST(
|
||||
negative_command_buffer_command_fill_image_sync_points_null_or_num_zero),
|
||||
ADD_TEST(negative_command_buffer_command_fill_image_invalid_command_buffer),
|
||||
ADD_TEST(
|
||||
negative_command_buffer_command_fill_image_finalized_command_buffer),
|
||||
ADD_TEST(
|
||||
negative_command_buffer_command_fill_image_mutable_handle_not_null),
|
||||
ADD_TEST(negative_create_command_buffer_num_queues),
|
||||
ADD_TEST(negative_create_command_buffer_null_queues),
|
||||
ADD_TEST(negative_create_command_buffer_repeated_properties),
|
||||
ADD_TEST(negative_create_command_buffer_not_supported_properties),
|
||||
ADD_TEST(negative_command_ndrange_queue_not_null),
|
||||
ADD_TEST(negative_command_ndrange_kernel_with_different_context),
|
||||
ADD_TEST(negative_command_ndrange_kernel_sync_points_null_or_num_zero),
|
||||
ADD_TEST(negative_command_ndrange_kernel_invalid_command_buffer),
|
||||
ADD_TEST(negative_command_ndrange_kernel_invalid_properties),
|
||||
ADD_TEST(negative_command_ndrange_kernel_command_buffer_finalized),
|
||||
ADD_TEST(negative_command_ndrange_kernel_mutable_handle_not_null),
|
||||
ADD_TEST(negative_command_ndrange_kernel_not_support_printf),
|
||||
ADD_TEST(negative_command_ndrange_kernel_with_enqueue_call),
|
||||
ADD_TEST(negative_command_buffer_command_copy_buffer_queue_not_null),
|
||||
ADD_TEST(negative_command_buffer_command_copy_buffer_different_contexts),
|
||||
ADD_TEST(
|
||||
negative_command_buffer_command_copy_buffer_sync_points_null_or_num_zero),
|
||||
ADD_TEST(
|
||||
negative_command_buffer_command_copy_buffer_invalid_command_buffer),
|
||||
ADD_TEST(
|
||||
negative_command_buffer_command_copy_buffer_finalized_command_buffer),
|
||||
ADD_TEST(
|
||||
negative_command_buffer_command_copy_buffer_mutable_handle_not_null),
|
||||
ADD_TEST(negative_command_buffer_command_copy_image_queue_not_null),
|
||||
ADD_TEST(negative_command_buffer_command_copy_image_different_contexts),
|
||||
ADD_TEST(
|
||||
negative_command_buffer_command_copy_image_sync_points_null_or_num_zero),
|
||||
ADD_TEST(negative_command_buffer_command_copy_image_invalid_command_buffer),
|
||||
ADD_TEST(
|
||||
negative_command_buffer_command_copy_image_finalized_command_buffer),
|
||||
ADD_TEST(
|
||||
negative_command_buffer_command_copy_image_mutable_handle_not_null),
|
||||
ADD_TEST(negative_get_command_buffer_info_invalid_command_buffer),
|
||||
ADD_TEST(negative_get_command_buffer_info_not_supported_param_name),
|
||||
ADD_TEST(negative_get_command_buffer_info_queues),
|
||||
ADD_TEST(negative_get_command_buffer_info_ref_count),
|
||||
ADD_TEST(negative_get_command_buffer_info_state),
|
||||
ADD_TEST(negative_get_command_buffer_info_prop_array),
|
||||
ADD_TEST(negative_get_command_buffer_info_context),
|
||||
ADD_TEST(negative_command_buffer_command_svm_queue_not_null),
|
||||
ADD_TEST(negative_command_buffer_command_svm_sync_points_null_or_num_zero),
|
||||
ADD_TEST(negative_command_buffer_command_svm_invalid_command_buffer),
|
||||
ADD_TEST(negative_command_buffer_command_svm_finalized_command_buffer),
|
||||
ADD_TEST(negative_command_buffer_command_svm_mutable_handle_not_null),
|
||||
ADD_TEST(negative_command_buffer_copy_image_queue_not_null),
|
||||
ADD_TEST(negative_command_buffer_copy_image_context_not_same),
|
||||
ADD_TEST(negative_command_buffer_copy_image_sync_points_null_or_num_zero),
|
||||
ADD_TEST(negative_command_buffer_copy_image_invalid_command_buffer),
|
||||
ADD_TEST(negative_command_buffer_copy_image_finalized_command_buffer),
|
||||
ADD_TEST(negative_command_buffer_copy_image_mutable_handle_not_null),
|
||||
ADD_TEST(negative_command_buffer_barrier_not_null_queue),
|
||||
ADD_TEST(negative_command_buffer_barrier_invalid_command_buffer),
|
||||
ADD_TEST(negative_command_buffer_barrier_buffer_finalized),
|
||||
ADD_TEST(negative_command_buffer_barrier_mutable_handle_not_null),
|
||||
ADD_TEST(negative_command_buffer_barrier_sync_points_null_or_num_zero),
|
||||
ADD_TEST(negative_enqueue_command_buffer_invalid_command_buffer),
|
||||
ADD_TEST(negative_enqueue_command_buffer_not_finalized),
|
||||
ADD_TEST(
|
||||
negative_enqueue_command_buffer_without_simultaneous_no_pending_state),
|
||||
ADD_TEST(negative_enqueue_command_buffer_null_queues_num_queues),
|
||||
ADD_TEST(
|
||||
negative_enqueue_command_buffer_num_queues_not_zero_different_while_buffer_creation),
|
||||
ADD_TEST(negative_enqueue_command_buffer_not_valid_queue_in_queues),
|
||||
ADD_TEST(negative_enqueue_queue_with_different_context),
|
||||
ADD_TEST(negative_enqueue_command_buffer_different_context_than_event),
|
||||
ADD_TEST(negative_enqueue_event_wait_list_null_or_events_null),
|
||||
ADD_TEST(negative_enqueue_queue_without_reqd_properties),
|
||||
ADD_TEST(negative_enqueue_with_unsupported_queue_property),
|
||||
ADD_TEST(negative_enqueue_inconsistent_device),
|
||||
};
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
// A device may report the required properties of a queue that
|
||||
@@ -171,6 +22,8 @@ int main(int argc, const char *argv[])
|
||||
// for this in the tests themselves, rather than here, where we have a
|
||||
// device to query.
|
||||
const cl_command_queue_properties queue_properties = 0;
|
||||
return runTestHarnessWithCheck(argc, argv, ARRAY_SIZE(test_list), test_list,
|
||||
return runTestHarnessWithCheck(argc, argv,
|
||||
test_registry::getInstance().num_tests(),
|
||||
test_registry::getInstance().definitions(),
|
||||
false, queue_properties, nullptr);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "basic_command_buffer.h"
|
||||
#include "procs.h"
|
||||
#include <vector>
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -159,42 +158,31 @@ struct CommandBufferBarrierSyncPointsNullOrNumZero
|
||||
};
|
||||
};
|
||||
|
||||
int test_negative_command_buffer_barrier_not_null_queue(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_barrier_not_null_queue)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferBarrierNotNullQueue>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_barrier_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_barrier_invalid_command_buffer)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferBarrierInvalidCommandBuffer>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_barrier_buffer_finalized(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_barrier_buffer_finalized)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferBarrierBufferFinalized>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_barrier_mutable_handle_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_barrier_mutable_handle_not_null)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferBarrierMutableHandleNotNull>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_barrier_sync_points_null_or_num_zero(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_barrier_sync_points_null_or_num_zero)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferBarrierSyncPointsNullOrNumZero>(
|
||||
device, context, queue, num_elements);
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "basic_command_buffer.h"
|
||||
#include "procs.h"
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
template <bool check_image_support>
|
||||
@@ -580,97 +579,80 @@ struct CommandBufferCopyImageMutableHandleNotNull
|
||||
};
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_copy_buffer_queue_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_command_copy_buffer_queue_not_null)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCopyBufferQueueNotNull>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_copy_image_queue_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_command_copy_image_queue_not_null)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCopyImageQueueNotNull>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_copy_buffer_different_contexts(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_command_copy_buffer_different_contexts)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCopyBufferDifferentContexts>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_copy_image_different_contexts(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_command_copy_image_different_contexts)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCopyImageDifferentContexts>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_copy_buffer_sync_points_null_or_num_zero(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(
|
||||
negative_command_buffer_command_copy_buffer_sync_points_null_or_num_zero)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCopyBufferSyncPointsNullOrNumZero>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_copy_image_sync_points_null_or_num_zero(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(
|
||||
negative_command_buffer_command_copy_image_sync_points_null_or_num_zero)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCopyImageSyncPointsNullOrNumZero>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_copy_buffer_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(
|
||||
negative_command_buffer_command_copy_buffer_invalid_command_buffer)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCopyBufferInvalidCommandBuffer>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_copy_image_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_command_copy_image_invalid_command_buffer)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCopyImageInvalidCommandBuffer>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_copy_buffer_finalized_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(
|
||||
negative_command_buffer_command_copy_buffer_finalized_command_buffer)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCopyBufferFinalizedCommandBuffer>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_copy_image_finalized_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(
|
||||
negative_command_buffer_command_copy_image_finalized_command_buffer)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCopyImageFinalizedCommandBuffer>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_copy_buffer_mutable_handle_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(
|
||||
negative_command_buffer_command_copy_buffer_mutable_handle_not_null)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCopyBufferMutableHandleNotNull>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_copy_image_mutable_handle_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(
|
||||
negative_command_buffer_command_copy_image_mutable_handle_not_null)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCopyImageMutableHandleNotNull>(
|
||||
device, context, queue, num_elements);
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "basic_command_buffer.h"
|
||||
#include "procs.h"
|
||||
#include <vector>
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -384,49 +383,37 @@ struct CommandBufferCopyImageMutableHandleNotNull : public CommandCopyBaseTest
|
||||
};
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_copy_image_queue_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_copy_image_queue_not_null)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCopyImageQueueNotNull>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_copy_image_context_not_same(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_copy_image_context_not_same)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCopyImageContextNotSame>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_copy_image_sync_points_null_or_num_zero(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_copy_image_sync_points_null_or_num_zero)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCopySyncPointsNullOrNumZero>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_copy_image_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_copy_image_invalid_command_buffer)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCopyImageInvalidCommandBuffer>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_copy_image_finalized_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_copy_image_finalized_command_buffer)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCopyImageFinalizedCommandBuffer>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_copy_image_mutable_handle_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_copy_image_mutable_handle_not_null)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCopyImageMutableHandleNotNull>(
|
||||
device, context, queue, num_elements);
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "basic_command_buffer.h"
|
||||
#include "procs.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -199,35 +198,25 @@ struct CreateCommandBufferNotSupportedProperties : public BasicCommandBufferTest
|
||||
};
|
||||
};
|
||||
|
||||
int test_negative_create_command_buffer_num_queues(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_create_command_buffer_num_queues)
|
||||
{
|
||||
return MakeAndRunTest<CreateCommandBufferNumQueues>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
int test_negative_create_command_buffer_null_queues(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_create_command_buffer_null_queues)
|
||||
{
|
||||
return MakeAndRunTest<CreateCommandBufferNullQueues>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
int test_negative_create_command_buffer_repeated_properties(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_create_command_buffer_repeated_properties)
|
||||
{
|
||||
return MakeAndRunTest<CreateCommandBufferRepeatedProperties>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_create_command_buffer_not_supported_properties(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_create_command_buffer_not_supported_properties)
|
||||
{
|
||||
return MakeAndRunTest<CreateCommandBufferNotSupportedProperties>(
|
||||
device, context, queue, num_elements);
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "basic_command_buffer.h"
|
||||
#include "procs.h"
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
namespace {
|
||||
@@ -614,103 +613,77 @@ struct EnqueueCommandBufferInconsistentDevice : public BasicCommandBufferTest
|
||||
};
|
||||
};
|
||||
|
||||
int test_negative_enqueue_command_buffer_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_enqueue_command_buffer_invalid_command_buffer)
|
||||
{
|
||||
return MakeAndRunTest<EnqueueCommandBufferInvalidCommandBuffer>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_enqueue_command_buffer_not_finalized(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_enqueue_command_buffer_not_finalized)
|
||||
{
|
||||
return MakeAndRunTest<EnqueueCommandBufferNotFinalized>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_enqueue_command_buffer_without_simultaneous_no_pending_state(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(
|
||||
negative_enqueue_command_buffer_without_simultaneous_no_pending_state)
|
||||
{
|
||||
return MakeAndRunTest<
|
||||
EnqueueCommandBufferWithoutSimultaneousUseNotInPendingState>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_enqueue_command_buffer_null_queues_num_queues(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_enqueue_command_buffer_null_queues_num_queues)
|
||||
{
|
||||
return MakeAndRunTest<EnqueueCommandBufferNullQueuesNumQueues>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_enqueue_command_buffer_num_queues_not_zero_different_while_buffer_creation(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(
|
||||
negative_enqueue_command_buffer_num_queues_not_zero_different_while_buffer_creation)
|
||||
{
|
||||
return MakeAndRunTest<
|
||||
EnqueueCommandBufferNumQueuesNotZeroAndDifferentThanWhileBufferCreation>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_enqueue_command_buffer_not_valid_queue_in_queues(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_enqueue_command_buffer_not_valid_queue_in_queues)
|
||||
{
|
||||
return MakeAndRunTest<EnqueueCommandBufferNotValidQueueInQueues>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_enqueue_queue_with_different_context(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_enqueue_queue_with_different_context)
|
||||
{
|
||||
return MakeAndRunTest<EnqueueCommandBufferQueueWithDifferentContext>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_enqueue_command_buffer_different_context_than_event(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_enqueue_command_buffer_different_context_than_event)
|
||||
{
|
||||
return MakeAndRunTest<EnqueueCommandBufferWithDiferentContextThanEvent>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_enqueue_event_wait_list_null_or_events_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_enqueue_event_wait_list_null_or_events_null)
|
||||
{
|
||||
return MakeAndRunTest<EnqueueCommandBufferEventWaitListNullOrEventsNull>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_enqueue_queue_without_reqd_properties(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_enqueue_queue_without_reqd_properties)
|
||||
{
|
||||
return MakeAndRunTest<EnqueueCommandBufferQueueWithoutReqdProperties>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_enqueue_with_unsupported_queue_property(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_enqueue_with_unsupported_queue_property)
|
||||
{
|
||||
return MakeAndRunTest<EnqueueCommandBufferWithUnsupportedQueueProperty>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_enqueue_inconsistent_device(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_enqueue_inconsistent_device)
|
||||
{
|
||||
return MakeAndRunTest<EnqueueCommandBufferInconsistentDevice>(
|
||||
device, context, queue, num_elements);
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "basic_command_buffer.h"
|
||||
#include "procs.h"
|
||||
#include <vector>
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -459,98 +458,81 @@ struct CommandBufferCommandFillImageMutableHandleNotNull
|
||||
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_fill_buffer_queue_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_command_fill_buffer_queue_not_null)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCommandFillBufferQueueNotNull>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_fill_image_queue_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_command_fill_image_queue_not_null)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCommandFillImageQueueNotNull>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_fill_buffer_context_not_same(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_command_fill_buffer_context_not_same)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCommandFillBufferContextNotSame>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_fill_image_context_not_same(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_command_fill_image_context_not_same)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCommandFillImageContextNotSame>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_fill_buffer_sync_points_null_or_num_zero(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(
|
||||
negative_command_buffer_command_fill_buffer_sync_points_null_or_num_zero)
|
||||
{
|
||||
return MakeAndRunTest<
|
||||
CommandBufferCommandFillBufferSyncPointsNullOrNumZero>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_fill_image_sync_points_null_or_num_zero(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(
|
||||
negative_command_buffer_command_fill_image_sync_points_null_or_num_zero)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCommandFillImageSyncPointsNullOrNumZero>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_fill_buffer_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(
|
||||
negative_command_buffer_command_fill_buffer_invalid_command_buffer)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCommandFillBufferInvalidCommandBuffer>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_fill_image_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_command_fill_image_invalid_command_buffer)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCommandFillImageInvalidCommandBuffer>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_fill_buffer_finalized_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(
|
||||
negative_command_buffer_command_fill_buffer_finalized_command_buffer)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCommandFillBufferFinalizedCommandBuffer>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_fill_image_finalized_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(
|
||||
negative_command_buffer_command_fill_image_finalized_command_buffer)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCommandFillImageFinalizedCommandBuffer>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_fill_buffer_mutable_handle_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(
|
||||
negative_command_buffer_command_fill_buffer_mutable_handle_not_null)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCommandFillBufferMutableHandleNotNull>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_fill_image_mutable_handle_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(
|
||||
negative_command_buffer_command_fill_image_mutable_handle_not_null)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCommandFillImageMutableHandleNotNull>(
|
||||
device, context, queue, num_elements);
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "basic_command_buffer.h"
|
||||
#include "procs.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -136,17 +135,13 @@ struct FinalizeCommandBufferNotRecordingState : public BasicCommandBufferTest
|
||||
};
|
||||
};
|
||||
|
||||
int test_negative_finalize_command_buffer_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_finalize_command_buffer_invalid_command_buffer)
|
||||
{
|
||||
return MakeAndRunTest<FinalizeCommandBufferInvalidCommandBuffer>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_finalize_command_buffer_not_recording_state(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_finalize_command_buffer_not_recording_state)
|
||||
{
|
||||
return MakeAndRunTest<FinalizeCommandBufferNotRecordingState>(
|
||||
device, context, queue, num_elements);
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "basic_command_buffer.h"
|
||||
#include "procs.h"
|
||||
#include <vector>
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -259,66 +258,47 @@ struct GetCommandBufferInfo : public BasicCommandBufferTest
|
||||
};
|
||||
};
|
||||
|
||||
int test_negative_get_command_buffer_info_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_get_command_buffer_info_invalid_command_buffer)
|
||||
{
|
||||
return MakeAndRunTest<GetCommandBufferInfoInvalidCommandBuffer>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_get_command_buffer_info_not_supported_param_name(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_get_command_buffer_info_not_supported_param_name)
|
||||
{
|
||||
return MakeAndRunTest<
|
||||
GetCommandBufferInfo<CombufInfoTestMode::CITM_PARAM_NAME>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_get_command_buffer_info_queues(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_get_command_buffer_info_queues)
|
||||
{
|
||||
return MakeAndRunTest<
|
||||
GetCommandBufferInfo<CombufInfoTestMode::CITM_QUEUES>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_get_command_buffer_info_ref_count(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_get_command_buffer_info_ref_count)
|
||||
{
|
||||
return MakeAndRunTest<
|
||||
GetCommandBufferInfo<CombufInfoTestMode::CITM_REF_COUNT>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_get_command_buffer_info_state(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_get_command_buffer_info_state)
|
||||
{
|
||||
return MakeAndRunTest<GetCommandBufferInfo<CombufInfoTestMode::CITM_STATE>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_get_command_buffer_info_prop_array(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_get_command_buffer_info_prop_array)
|
||||
{
|
||||
return MakeAndRunTest<
|
||||
GetCommandBufferInfo<CombufInfoTestMode::CITM_PROP_ARRAY>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_get_command_buffer_info_context(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_get_command_buffer_info_context)
|
||||
{
|
||||
return MakeAndRunTest<
|
||||
GetCommandBufferInfo<CombufInfoTestMode::CITM_CONTEXT>>(
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "basic_command_buffer.h"
|
||||
#include "procs.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -59,17 +58,13 @@ struct ReleaseCommandBufferInvalidCommandBuffer : public BasicCommandBufferTest
|
||||
};
|
||||
};
|
||||
|
||||
int test_negative_retain_command_buffer_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_retain_command_buffer_invalid_command_buffer)
|
||||
{
|
||||
return MakeAndRunTest<RetainCommandBufferInvalidCommandBuffer>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_release_command_buffer_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_release_command_buffer_invalid_command_buffer)
|
||||
{
|
||||
return MakeAndRunTest<ReleaseCommandBufferInvalidCommandBuffer>(
|
||||
device, context, queue, num_elements);
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
//
|
||||
#include "basic_command_buffer.h"
|
||||
#include "svm_command_basic.h"
|
||||
#include "procs.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -234,41 +233,31 @@ struct CommandBufferCommandSVMMutableHandleNotNull
|
||||
};
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_svm_queue_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_command_svm_queue_not_null)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCommandSVMQueueNotNull>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_svm_sync_points_null_or_num_zero(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_command_svm_sync_points_null_or_num_zero)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCommandSVMSyncPointsNullOrNumZero>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_svm_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_command_svm_invalid_command_buffer)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCommandSVMInvalidCommandBuffer>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_svm_finalized_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_command_svm_finalized_command_buffer)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCommandSVMFinalizedCommandBuffer>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_buffer_command_svm_mutable_handle_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_buffer_command_svm_mutable_handle_not_null)
|
||||
{
|
||||
return MakeAndRunTest<CommandBufferCommandSVMMutableHandleNotNull>(
|
||||
device, context, queue, num_elements);
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "basic_command_buffer.h"
|
||||
#include "procs.h"
|
||||
#include "harness/featureHelpers.h"
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -459,74 +458,55 @@ enqueue_kernel(def_q, CLK_ENQUEUE_FLAGS_WAIT_KERNEL, ndrange,
|
||||
};
|
||||
};
|
||||
|
||||
int test_negative_command_ndrange_queue_not_null(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_ndrange_queue_not_null)
|
||||
{
|
||||
return MakeAndRunTest<CommandNDRangeKernelQueueNotNull>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_ndrange_kernel_with_different_context(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_ndrange_kernel_with_different_context)
|
||||
{
|
||||
return MakeAndRunTest<CommandNDRangeKernelKernelWithDifferentContext>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_ndrange_kernel_sync_points_null_or_num_zero(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_ndrange_kernel_sync_points_null_or_num_zero)
|
||||
{
|
||||
return MakeAndRunTest<CommandNDRangeKerneSyncPointsNullOrNumZero>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_ndrange_kernel_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_ndrange_kernel_invalid_command_buffer)
|
||||
{
|
||||
return MakeAndRunTest<CommandNDRangeKernelInvalidCommandBuffer>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_ndrange_kernel_invalid_properties(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_ndrange_kernel_invalid_properties)
|
||||
{
|
||||
return MakeAndRunTest<CommandNDRangeKernelInvalidProperties>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_ndrange_kernel_command_buffer_finalized(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_ndrange_kernel_command_buffer_finalized)
|
||||
{
|
||||
return MakeAndRunTest<CommandNDRangeKernelCommandBufferFinalized>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_ndrange_kernel_mutable_handle_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_ndrange_kernel_mutable_handle_not_null)
|
||||
{
|
||||
return MakeAndRunTest<CommandNDRangeKernelMutableHandleNotNull>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_ndrange_kernel_not_support_printf(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_ndrange_kernel_not_support_printf)
|
||||
{
|
||||
return MakeAndRunTest<CommandNDRangeKernelNotSupportPrintf>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_negative_command_ndrange_kernel_with_enqueue_call(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(negative_command_ndrange_kernel_with_enqueue_call)
|
||||
{
|
||||
return MakeAndRunTest<CommandNDRangeKernelWithKernelEnqueueCall>(
|
||||
device, context, queue, num_elements);
|
||||
|
||||
@@ -1,410 +0,0 @@
|
||||
//
|
||||
// Copyright (c) 2022 The Khronos Group Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
#ifndef CL_KHR_COMMAND_BUFFER_PROCS_H
|
||||
#define CL_KHR_COMMAND_BUFFER_PROCS_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
|
||||
// Basic command-buffer tests
|
||||
extern int test_multi_flag_creation(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_single_ndrange(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_interleaved_enqueue(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_mixed_commands(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_explicit_flush(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_out_of_order(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_basic_printf(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_simultaneous_printf(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_info_queues(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_info_ref_count(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_info_state(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_info_prop_array(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_info_context(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_basic_set_kernel_arg(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_pending_set_kernel_arg(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_regular_wait_for_command_buffer(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_command_buffer_wait_for_command_buffer(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_command_buffer_wait_for_sec_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_return_event_callback(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_clwaitforevents_single(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_clwaitforevents(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_command_buffer_wait_for_regular(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_wait_for_sec_queue_event(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_user_event_wait(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_user_events_wait(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_user_event_callback(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_simultaneous_out_of_order(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_basic_profiling(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_simultaneous_profiling(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_substitute_queue_profiling(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_queue_substitution(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_properties_queue_substitution(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_simultaneous_queue_substitution(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_queue_substitute_in_order(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_queue_substitute_out_of_order(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_fill_image(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_fill_buffer(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_fill_svm_buffer(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_copy_image(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_copy_buffer(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_copy_svm_buffer(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_copy_buffer_to_image(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_copy_image_to_buffer(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_copy_buffer_rect(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_barrier_wait_list(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_event_info_command_type(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_event_info_command_queue(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_event_info_context(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_event_info_execution_status(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_event_info_reference_count(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_finalize_invalid(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_finalize_empty(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
// Command-buffer negative tests
|
||||
extern int test_negative_retain_command_buffer_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_release_command_buffer_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_finalize_command_buffer_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_finalize_command_buffer_not_recording_state(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_command_fill_buffer_queue_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_command_fill_buffer_context_not_same(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int
|
||||
test_negative_command_buffer_command_fill_buffer_sync_points_null_or_num_zero(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int
|
||||
test_negative_command_buffer_command_fill_buffer_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int
|
||||
test_negative_command_buffer_command_fill_buffer_finalized_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_command_fill_image_queue_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int
|
||||
test_negative_command_buffer_command_fill_buffer_mutable_handle_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_command_fill_image_context_not_same(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int
|
||||
test_negative_command_buffer_command_fill_image_sync_points_null_or_num_zero(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int
|
||||
test_negative_command_buffer_command_fill_image_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int
|
||||
test_negative_command_buffer_command_fill_image_finalized_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int
|
||||
test_negative_command_buffer_command_fill_image_mutable_handle_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_create_command_buffer_num_queues(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_create_command_buffer_null_queues(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_create_command_buffer_repeated_properties(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_create_command_buffer_not_supported_properties(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_ndrange_queue_not_null(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_ndrange_kernel_with_different_context(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_ndrange_kernel_sync_points_null_or_num_zero(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_ndrange_kernel_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_ndrange_kernel_invalid_properties(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_ndrange_kernel_command_buffer_finalized(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_ndrange_kernel_mutable_handle_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_ndrange_kernel_not_support_printf(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_ndrange_kernel_with_enqueue_call(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_command_copy_buffer_queue_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_command_copy_buffer_different_contexts(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int
|
||||
test_negative_command_buffer_command_copy_buffer_sync_points_null_or_num_zero(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int
|
||||
test_negative_command_buffer_command_copy_buffer_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int
|
||||
test_negative_command_buffer_command_copy_buffer_finalized_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int
|
||||
test_negative_command_buffer_command_copy_buffer_mutable_handle_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_command_copy_image_queue_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_command_copy_image_different_contexts(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int
|
||||
test_negative_command_buffer_command_copy_image_sync_points_null_or_num_zero(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int
|
||||
test_negative_command_buffer_command_copy_image_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int
|
||||
test_negative_command_buffer_command_copy_image_finalized_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int
|
||||
test_negative_command_buffer_command_copy_image_mutable_handle_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_get_command_buffer_info_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_get_command_buffer_info_not_supported_param_name(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_get_command_buffer_info_queues(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_get_command_buffer_info_ref_count(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_get_command_buffer_info_state(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_get_command_buffer_info_prop_array(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_get_command_buffer_info_context(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_command_svm_queue_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int
|
||||
test_negative_command_buffer_command_svm_sync_points_null_or_num_zero(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_command_svm_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_command_svm_finalized_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_command_svm_mutable_handle_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_barrier_not_null_queue(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_barrier_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_barrier_buffer_finalized(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_barrier_mutable_handle_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_barrier_sync_points_null_or_num_zero(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_enqueue_command_buffer_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_enqueue_command_buffer_not_finalized(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int
|
||||
test_negative_enqueue_command_buffer_without_simultaneous_no_pending_state(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_enqueue_command_buffer_null_queues_num_queues(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int
|
||||
test_negative_enqueue_command_buffer_num_queues_not_zero_different_while_buffer_creation(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_copy_image_queue_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_copy_image_context_not_same(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_copy_image_sync_points_null_or_num_zero(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_copy_image_invalid_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_copy_image_finalized_command_buffer(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_command_buffer_copy_image_mutable_handle_not_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_enqueue_command_buffer_not_valid_queue_in_queues(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_enqueue_queue_with_different_context(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_enqueue_command_buffer_different_context_than_event(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_enqueue_event_wait_list_null_or_events_null(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_enqueue_queue_without_reqd_properties(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_enqueue_with_unsupported_queue_property(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_negative_enqueue_inconsistent_device(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
#endif // CL_KHR_COMMAND_BUFFER_PROCS_H
|
||||
@@ -21,16 +21,6 @@
|
||||
#include "procs.h"
|
||||
|
||||
|
||||
test_definition test_list[] = { ADD_TEST(context_create),
|
||||
ADD_TEST(get_device_ids),
|
||||
ADD_TEST(api),
|
||||
ADD_TEST(kernel),
|
||||
ADD_TEST(other_data_types),
|
||||
ADD_TEST(memory_access),
|
||||
ADD_TEST(interop_user_sync) };
|
||||
|
||||
const int test_num = ARRAY_SIZE(test_list);
|
||||
|
||||
clGetDeviceIDsFromDX9MediaAdapterKHR_fn clGetDeviceIDsFromDX9MediaAdapterKHR =
|
||||
NULL;
|
||||
clCreateFromDX9MediaSurfaceKHR_fn clCreateFromDX9MediaSurfaceKHR = NULL;
|
||||
@@ -227,5 +217,6 @@ int main(int argc, const char *argv[])
|
||||
|
||||
if (!MediaSurfaceSharingExtensionInit()) return TEST_FAIL;
|
||||
|
||||
return runTestHarness(argc, argv, test_num, test_list, true, 0);
|
||||
return runTestHarness(argc, argv, test_registry::getInstance().num_tests(),
|
||||
test_registry::getInstance().definitions(), true, 0);
|
||||
}
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
//
|
||||
// Copyright (c) 2019 The Khronos Group Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
|
||||
#ifndef __MEDIA_SHARING_PROCS_H__
|
||||
#define __MEDIA_SHARING_PROCS_H__
|
||||
|
||||
|
||||
extern int test_context_create(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_get_device_ids(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_api(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_kernel(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_memory_access(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_interop_user_sync(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
|
||||
|
||||
#endif // #ifndef __MEDIA_SHARING_PROCS_H__
|
||||
@@ -292,8 +292,7 @@ int context_create(cl_device_id deviceID, cl_context context,
|
||||
return result.Result();
|
||||
}
|
||||
|
||||
int test_context_create(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(context_create)
|
||||
{
|
||||
const unsigned int WIDTH = 256;
|
||||
const unsigned int HEIGHT = 256;
|
||||
@@ -341,8 +340,8 @@ int test_context_create(cl_device_id deviceID, cl_context context,
|
||||
continue;
|
||||
|
||||
if (context_create(
|
||||
deviceID, context, queue, num_elements, WIDTH,
|
||||
HEIGHT, contextFuncs[contextFuncIdx],
|
||||
device, context, queue, num_elements, WIDTH, HEIGHT,
|
||||
contextFuncs[contextFuncIdx],
|
||||
adapterTypes[adapterTypeIdx], formats[formatIdx],
|
||||
sharedHandleTypes[sharedHandleIdx])
|
||||
!= 0)
|
||||
|
||||
@@ -674,14 +674,13 @@ int api_functions(cl_device_id deviceID, cl_context context,
|
||||
return result.Result();
|
||||
}
|
||||
|
||||
int test_api(cl_device_id deviceID, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST(api)
|
||||
{
|
||||
CResult result;
|
||||
|
||||
#if defined(_WIN32)
|
||||
// D3D9
|
||||
if (api_functions(deviceID, context, queue, num_elements, 10, 256, 256,
|
||||
if (api_functions(device, context, queue, num_elements, 10, 256, 256,
|
||||
CL_ADAPTER_D3D9_KHR, SURFACE_FORMAT_NV12,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -690,7 +689,7 @@ int test_api(cl_device_id deviceID, cl_context context, cl_command_queue queue,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (api_functions(deviceID, context, queue, num_elements, 3, 512, 256,
|
||||
if (api_functions(device, context, queue, num_elements, 3, 512, 256,
|
||||
CL_ADAPTER_D3D9_KHR, SURFACE_FORMAT_YV12,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -700,7 +699,7 @@ int test_api(cl_device_id deviceID, cl_context context, cl_command_queue queue,
|
||||
}
|
||||
|
||||
// D3D9EX
|
||||
if (api_functions(deviceID, context, queue, num_elements, 5, 256, 512,
|
||||
if (api_functions(device, context, queue, num_elements, 5, 256, 512,
|
||||
CL_ADAPTER_D3D9EX_KHR, SURFACE_FORMAT_NV12,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -709,7 +708,7 @@ int test_api(cl_device_id deviceID, cl_context context, cl_command_queue queue,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (api_functions(deviceID, context, queue, num_elements, 7, 512, 256,
|
||||
if (api_functions(device, context, queue, num_elements, 7, 512, 256,
|
||||
CL_ADAPTER_D3D9EX_KHR, SURFACE_FORMAT_NV12,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
@@ -718,7 +717,7 @@ int test_api(cl_device_id deviceID, cl_context context, cl_command_queue queue,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (api_functions(deviceID, context, queue, num_elements, 10, 256, 256,
|
||||
if (api_functions(device, context, queue, num_elements, 10, 256, 256,
|
||||
CL_ADAPTER_D3D9EX_KHR, SURFACE_FORMAT_YV12,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -727,7 +726,7 @@ int test_api(cl_device_id deviceID, cl_context context, cl_command_queue queue,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (api_functions(deviceID, context, queue, num_elements, 15, 128, 128,
|
||||
if (api_functions(device, context, queue, num_elements, 15, 128, 128,
|
||||
CL_ADAPTER_D3D9EX_KHR, SURFACE_FORMAT_YV12,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
@@ -737,7 +736,7 @@ int test_api(cl_device_id deviceID, cl_context context, cl_command_queue queue,
|
||||
}
|
||||
|
||||
// DXVA
|
||||
if (api_functions(deviceID, context, queue, num_elements, 20, 128, 128,
|
||||
if (api_functions(device, context, queue, num_elements, 20, 128, 128,
|
||||
CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_NV12,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -746,7 +745,7 @@ int test_api(cl_device_id deviceID, cl_context context, cl_command_queue queue,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (api_functions(deviceID, context, queue, num_elements, 40, 64, 64,
|
||||
if (api_functions(device, context, queue, num_elements, 40, 64, 64,
|
||||
CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_NV12,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
@@ -755,7 +754,7 @@ int test_api(cl_device_id deviceID, cl_context context, cl_command_queue queue,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (api_functions(deviceID, context, queue, num_elements, 5, 512, 512,
|
||||
if (api_functions(device, context, queue, num_elements, 5, 512, 512,
|
||||
CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_YV12,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -764,7 +763,7 @@ int test_api(cl_device_id deviceID, cl_context context, cl_command_queue queue,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (api_functions(deviceID, context, queue, num_elements, 2, 1024, 1024,
|
||||
if (api_functions(device, context, queue, num_elements, 2, 1024, 1024,
|
||||
CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_YV12,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
|
||||
@@ -434,14 +434,13 @@ int kernel_functions(cl_device_id deviceID, cl_context context,
|
||||
return result.Result();
|
||||
}
|
||||
|
||||
int test_kernel(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(kernel)
|
||||
{
|
||||
CResult result;
|
||||
|
||||
#if defined(_WIN32)
|
||||
// D3D9
|
||||
if (kernel_functions(deviceID, context, queue, num_elements, 10, 256, 256,
|
||||
if (kernel_functions(device, context, queue, num_elements, 10, 256, 256,
|
||||
CL_ADAPTER_D3D9_KHR, SURFACE_FORMAT_NV12,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -450,7 +449,7 @@ int test_kernel(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (kernel_functions(deviceID, context, queue, num_elements, 3, 256, 256,
|
||||
if (kernel_functions(device, context, queue, num_elements, 3, 256, 256,
|
||||
CL_ADAPTER_D3D9_KHR, SURFACE_FORMAT_YV12,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -460,7 +459,7 @@ int test_kernel(cl_device_id deviceID, cl_context context,
|
||||
}
|
||||
|
||||
// D3D9EX
|
||||
if (kernel_functions(deviceID, context, queue, num_elements, 5, 256, 512,
|
||||
if (kernel_functions(device, context, queue, num_elements, 5, 256, 512,
|
||||
CL_ADAPTER_D3D9EX_KHR, SURFACE_FORMAT_NV12,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -469,7 +468,7 @@ int test_kernel(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (kernel_functions(deviceID, context, queue, num_elements, 7, 512, 256,
|
||||
if (kernel_functions(device, context, queue, num_elements, 7, 512, 256,
|
||||
CL_ADAPTER_D3D9EX_KHR, SURFACE_FORMAT_NV12,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
@@ -478,7 +477,7 @@ int test_kernel(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (kernel_functions(deviceID, context, queue, num_elements, 10, 256, 256,
|
||||
if (kernel_functions(device, context, queue, num_elements, 10, 256, 256,
|
||||
CL_ADAPTER_D3D9EX_KHR, SURFACE_FORMAT_YV12,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -487,7 +486,7 @@ int test_kernel(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (kernel_functions(deviceID, context, queue, num_elements, 15, 128, 128,
|
||||
if (kernel_functions(device, context, queue, num_elements, 15, 128, 128,
|
||||
CL_ADAPTER_D3D9EX_KHR, SURFACE_FORMAT_YV12,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
@@ -497,7 +496,7 @@ int test_kernel(cl_device_id deviceID, cl_context context,
|
||||
}
|
||||
|
||||
// DXVA
|
||||
if (kernel_functions(deviceID, context, queue, num_elements, 20, 128, 128,
|
||||
if (kernel_functions(device, context, queue, num_elements, 20, 128, 128,
|
||||
CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_NV12,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -506,7 +505,7 @@ int test_kernel(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (kernel_functions(deviceID, context, queue, num_elements, 40, 64, 64,
|
||||
if (kernel_functions(device, context, queue, num_elements, 40, 64, 64,
|
||||
CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_NV12,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
@@ -515,7 +514,7 @@ int test_kernel(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (kernel_functions(deviceID, context, queue, num_elements, 5, 512, 512,
|
||||
if (kernel_functions(device, context, queue, num_elements, 5, 512, 512,
|
||||
CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_YV12,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -524,7 +523,7 @@ int test_kernel(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (kernel_functions(deviceID, context, queue, num_elements, 2, 1024, 1024,
|
||||
if (kernel_functions(device, context, queue, num_elements, 2, 1024, 1024,
|
||||
CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_YV12,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
|
||||
@@ -182,13 +182,12 @@ int get_device_ids(cl_device_id deviceID, cl_context context,
|
||||
return result.Result();
|
||||
}
|
||||
|
||||
int test_get_device_ids(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(get_device_ids)
|
||||
{
|
||||
CResult result;
|
||||
|
||||
#if defined(_WIN32)
|
||||
if (get_device_ids(deviceID, context, queue, num_elements,
|
||||
if (get_device_ids(device, context, queue, num_elements,
|
||||
CL_ADAPTER_D3D9_KHR)
|
||||
!= 0)
|
||||
{
|
||||
@@ -196,7 +195,7 @@ int test_get_device_ids(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (get_device_ids(deviceID, context, queue, num_elements,
|
||||
if (get_device_ids(device, context, queue, num_elements,
|
||||
CL_ADAPTER_D3D9EX_KHR)
|
||||
!= 0)
|
||||
{
|
||||
@@ -204,7 +203,7 @@ int test_get_device_ids(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (get_device_ids(deviceID, context, queue, num_elements,
|
||||
if (get_device_ids(device, context, queue, num_elements,
|
||||
CL_ADAPTER_DXVA_KHR)
|
||||
!= 0)
|
||||
{
|
||||
|
||||
@@ -327,8 +327,7 @@ int interop_user_sync(cl_device_id deviceID, cl_context context,
|
||||
return result.Result();
|
||||
}
|
||||
|
||||
int test_interop_user_sync(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(interop_user_sync)
|
||||
{
|
||||
const unsigned int WIDTH = 256;
|
||||
const unsigned int HEIGHT = 256;
|
||||
@@ -382,7 +381,7 @@ int test_interop_user_sync(cl_device_id deviceID, cl_context context,
|
||||
continue;
|
||||
|
||||
if (interop_user_sync(
|
||||
deviceID, context, queue, num_elements, WIDTH,
|
||||
device, context, queue, num_elements, WIDTH,
|
||||
HEIGHT, contextFuncs[contextFuncIdx],
|
||||
adapters[adapterIdx], formats[formatIdx],
|
||||
sharedHandleTypes[sharedHandleIdx],
|
||||
|
||||
@@ -442,14 +442,13 @@ int memory_access(cl_device_id deviceID, cl_context context,
|
||||
return result.Result();
|
||||
}
|
||||
|
||||
int test_memory_access(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(memory_access)
|
||||
{
|
||||
CResult result;
|
||||
|
||||
#if defined(_WIN32)
|
||||
// D3D9
|
||||
if (memory_access(deviceID, context, queue, num_elements, 256, 256,
|
||||
if (memory_access(device, context, queue, num_elements, 256, 256,
|
||||
CL_ADAPTER_D3D9_KHR, SURFACE_FORMAT_NV12,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -458,7 +457,7 @@ int test_memory_access(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (memory_access(deviceID, context, queue, num_elements, 512, 256,
|
||||
if (memory_access(device, context, queue, num_elements, 512, 256,
|
||||
CL_ADAPTER_D3D9_KHR, SURFACE_FORMAT_YV12,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -468,7 +467,7 @@ int test_memory_access(cl_device_id deviceID, cl_context context,
|
||||
}
|
||||
|
||||
// D3D9EX
|
||||
if (memory_access(deviceID, context, queue, num_elements, 256, 512,
|
||||
if (memory_access(device, context, queue, num_elements, 256, 512,
|
||||
CL_ADAPTER_D3D9EX_KHR, SURFACE_FORMAT_NV12,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -477,7 +476,7 @@ int test_memory_access(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (memory_access(deviceID, context, queue, num_elements, 512, 256,
|
||||
if (memory_access(device, context, queue, num_elements, 512, 256,
|
||||
CL_ADAPTER_D3D9EX_KHR, SURFACE_FORMAT_NV12,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
@@ -486,7 +485,7 @@ int test_memory_access(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (memory_access(deviceID, context, queue, num_elements, 256, 256,
|
||||
if (memory_access(device, context, queue, num_elements, 256, 256,
|
||||
CL_ADAPTER_D3D9EX_KHR, SURFACE_FORMAT_YV12,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -495,7 +494,7 @@ int test_memory_access(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (memory_access(deviceID, context, queue, num_elements, 128, 128,
|
||||
if (memory_access(device, context, queue, num_elements, 128, 128,
|
||||
CL_ADAPTER_D3D9EX_KHR, SURFACE_FORMAT_YV12,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
@@ -505,7 +504,7 @@ int test_memory_access(cl_device_id deviceID, cl_context context,
|
||||
}
|
||||
|
||||
// DXVA
|
||||
if (memory_access(deviceID, context, queue, num_elements, 128, 128,
|
||||
if (memory_access(device, context, queue, num_elements, 128, 128,
|
||||
CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_NV12,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -514,7 +513,7 @@ int test_memory_access(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (memory_access(deviceID, context, queue, num_elements, 64, 64,
|
||||
if (memory_access(device, context, queue, num_elements, 64, 64,
|
||||
CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_NV12,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
@@ -523,7 +522,7 @@ int test_memory_access(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (memory_access(deviceID, context, queue, num_elements, 512, 512,
|
||||
if (memory_access(device, context, queue, num_elements, 512, 512,
|
||||
CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_YV12,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -532,7 +531,7 @@ int test_memory_access(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (memory_access(deviceID, context, queue, num_elements, 1024, 1024,
|
||||
if (memory_access(device, context, queue, num_elements, 1024, 1024,
|
||||
CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_YV12,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
|
||||
@@ -527,15 +527,14 @@ int other_data_types(cl_device_id deviceID, cl_context context,
|
||||
return result.Result();
|
||||
}
|
||||
|
||||
int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(other_data_types)
|
||||
{
|
||||
CResult result;
|
||||
|
||||
#if defined(_WIN32)
|
||||
// D3D9
|
||||
if (other_data_types<cl_float>(deviceID, context, queue, num_elements, 10,
|
||||
64, 256, CL_ADAPTER_D3D9_KHR,
|
||||
if (other_data_types<cl_float>(device, context, queue, num_elements, 10, 64,
|
||||
256, CL_ADAPTER_D3D9_KHR,
|
||||
SURFACE_FORMAT_R32F, SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
{
|
||||
@@ -543,16 +542,16 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_half>(deviceID, context, queue, num_elements, 10,
|
||||
256, 128, CL_ADAPTER_D3D9_KHR,
|
||||
SURFACE_FORMAT_R16F, SHARED_HANDLE_DISABLED)
|
||||
if (other_data_types<cl_half>(device, context, queue, num_elements, 10, 256,
|
||||
128, CL_ADAPTER_D3D9_KHR, SURFACE_FORMAT_R16F,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
{
|
||||
log_error("\nTest case (D3D9, R16F, no shared handle) failed\n\n");
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_ushort>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_ushort>(device, context, queue, num_elements, 10,
|
||||
512, 256, CL_ADAPTER_D3D9_KHR,
|
||||
SURFACE_FORMAT_L16, SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -561,7 +560,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
256, 512, CL_ADAPTER_D3D9_KHR,
|
||||
SURFACE_FORMAT_A8, SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -570,7 +569,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
1024, 32, CL_ADAPTER_D3D9_KHR,
|
||||
SURFACE_FORMAT_L8, SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -580,7 +579,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
}
|
||||
|
||||
if (other_data_types<cl_float>(
|
||||
deviceID, context, queue, num_elements, 10, 32, 1024,
|
||||
device, context, queue, num_elements, 10, 32, 1024,
|
||||
CL_ADAPTER_D3D9_KHR, SURFACE_FORMAT_G32R32F, SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
{
|
||||
@@ -589,7 +588,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
}
|
||||
|
||||
if (other_data_types<cl_half>(
|
||||
deviceID, context, queue, num_elements, 10, 64, 64,
|
||||
device, context, queue, num_elements, 10, 64, 64,
|
||||
CL_ADAPTER_D3D9_KHR, SURFACE_FORMAT_G16R16F, SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
{
|
||||
@@ -598,7 +597,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
}
|
||||
|
||||
if (other_data_types<cl_ushort>(
|
||||
deviceID, context, queue, num_elements, 10, 256, 256,
|
||||
device, context, queue, num_elements, 10, 256, 256,
|
||||
CL_ADAPTER_D3D9_KHR, SURFACE_FORMAT_G16R16, SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
{
|
||||
@@ -606,7 +605,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
512, 128, CL_ADAPTER_D3D9_KHR,
|
||||
SURFACE_FORMAT_A8L8, SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -615,7 +614,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_float>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_float>(device, context, queue, num_elements, 10,
|
||||
128, 512, CL_ADAPTER_D3D9_KHR,
|
||||
SURFACE_FORMAT_A32B32G32R32F,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
@@ -626,8 +625,8 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_half>(deviceID, context, queue, num_elements, 10,
|
||||
128, 128, CL_ADAPTER_D3D9_KHR,
|
||||
if (other_data_types<cl_half>(device, context, queue, num_elements, 10, 128,
|
||||
128, CL_ADAPTER_D3D9_KHR,
|
||||
SURFACE_FORMAT_A16B16G16R16F,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -637,7 +636,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_ushort>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_ushort>(device, context, queue, num_elements, 10,
|
||||
64, 128, CL_ADAPTER_D3D9_KHR,
|
||||
SURFACE_FORMAT_A16B16G16R16,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
@@ -648,7 +647,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
128, 64, CL_ADAPTER_D3D9_KHR,
|
||||
SURFACE_FORMAT_A8B8G8R8,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
@@ -658,8 +657,8 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
16, 512, CL_ADAPTER_D3D9_KHR,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10, 16,
|
||||
512, CL_ADAPTER_D3D9_KHR,
|
||||
SURFACE_FORMAT_X8B8G8R8,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -668,7 +667,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
512, 16, CL_ADAPTER_D3D9_KHR,
|
||||
SURFACE_FORMAT_A8R8G8B8,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
@@ -678,7 +677,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
256, 256, CL_ADAPTER_D3D9_KHR,
|
||||
SURFACE_FORMAT_X8R8G8B8,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
@@ -690,8 +689,8 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
|
||||
// D3D9EX
|
||||
|
||||
if (other_data_types<cl_float>(deviceID, context, queue, num_elements, 10,
|
||||
64, 256, CL_ADAPTER_D3D9EX_KHR,
|
||||
if (other_data_types<cl_float>(device, context, queue, num_elements, 10, 64,
|
||||
256, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_R32F, SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
{
|
||||
@@ -699,8 +698,8 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_float>(deviceID, context, queue, num_elements, 10,
|
||||
64, 256, CL_ADAPTER_D3D9EX_KHR,
|
||||
if (other_data_types<cl_float>(device, context, queue, num_elements, 10, 64,
|
||||
256, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_R32F, SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
{
|
||||
@@ -708,8 +707,8 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_half>(deviceID, context, queue, num_elements, 10,
|
||||
256, 128, CL_ADAPTER_D3D9EX_KHR,
|
||||
if (other_data_types<cl_half>(device, context, queue, num_elements, 10, 256,
|
||||
128, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_R16F, SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
{
|
||||
@@ -717,8 +716,8 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_half>(deviceID, context, queue, num_elements, 10,
|
||||
256, 128, CL_ADAPTER_D3D9EX_KHR,
|
||||
if (other_data_types<cl_half>(device, context, queue, num_elements, 10, 256,
|
||||
128, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_R16F, SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
{
|
||||
@@ -726,7 +725,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_ushort>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_ushort>(device, context, queue, num_elements, 10,
|
||||
512, 256, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_L16, SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -735,7 +734,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_ushort>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_ushort>(device, context, queue, num_elements, 10,
|
||||
512, 256, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_L16, SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
@@ -744,7 +743,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
256, 512, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_A8, SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -753,7 +752,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
256, 512, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_A8, SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
@@ -762,7 +761,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
1024, 32, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_L8, SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -771,7 +770,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
1024, 32, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_L8, SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
@@ -780,8 +779,8 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_float>(deviceID, context, queue, num_elements, 10,
|
||||
32, 1024, CL_ADAPTER_D3D9EX_KHR,
|
||||
if (other_data_types<cl_float>(device, context, queue, num_elements, 10, 32,
|
||||
1024, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_G32R32F,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -790,8 +789,8 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_float>(deviceID, context, queue, num_elements, 10,
|
||||
32, 1024, CL_ADAPTER_D3D9EX_KHR,
|
||||
if (other_data_types<cl_float>(device, context, queue, num_elements, 10, 32,
|
||||
1024, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_G32R32F,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
@@ -800,8 +799,8 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_half>(deviceID, context, queue, num_elements, 10,
|
||||
64, 64, CL_ADAPTER_D3D9EX_KHR,
|
||||
if (other_data_types<cl_half>(device, context, queue, num_elements, 10, 64,
|
||||
64, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_G16R16F,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -810,8 +809,8 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_half>(deviceID, context, queue, num_elements, 10,
|
||||
64, 64, CL_ADAPTER_D3D9EX_KHR,
|
||||
if (other_data_types<cl_half>(device, context, queue, num_elements, 10, 64,
|
||||
64, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_G16R16F, SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
{
|
||||
@@ -819,7 +818,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_ushort>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_ushort>(device, context, queue, num_elements, 10,
|
||||
256, 256, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_G16R16,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
@@ -830,7 +829,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
}
|
||||
|
||||
if (other_data_types<cl_ushort>(
|
||||
deviceID, context, queue, num_elements, 10, 256, 256,
|
||||
device, context, queue, num_elements, 10, 256, 256,
|
||||
CL_ADAPTER_D3D9EX_KHR, SURFACE_FORMAT_G16R16, SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
{
|
||||
@@ -838,7 +837,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
512, 128, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_A8L8, SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -847,7 +846,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
512, 128, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_A8L8, SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
@@ -856,7 +855,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_float>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_float>(device, context, queue, num_elements, 10,
|
||||
128, 512, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_A32B32G32R32F,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
@@ -867,7 +866,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_float>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_float>(device, context, queue, num_elements, 10,
|
||||
128, 512, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_A32B32G32R32F,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
@@ -878,8 +877,8 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_half>(deviceID, context, queue, num_elements, 10,
|
||||
128, 128, CL_ADAPTER_D3D9EX_KHR,
|
||||
if (other_data_types<cl_half>(device, context, queue, num_elements, 10, 128,
|
||||
128, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_A16B16G16R16F,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -889,8 +888,8 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_half>(deviceID, context, queue, num_elements, 10,
|
||||
128, 128, CL_ADAPTER_D3D9EX_KHR,
|
||||
if (other_data_types<cl_half>(device, context, queue, num_elements, 10, 128,
|
||||
128, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_A16B16G16R16F,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
@@ -900,7 +899,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_ushort>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_ushort>(device, context, queue, num_elements, 10,
|
||||
64, 128, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_A16B16G16R16,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
@@ -911,7 +910,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_ushort>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_ushort>(device, context, queue, num_elements, 10,
|
||||
64, 128, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_A16B16G16R16,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
@@ -922,7 +921,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
128, 64, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_A8B8G8R8,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
@@ -933,7 +932,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
128, 64, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_A8B8G8R8,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
@@ -943,8 +942,8 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
16, 512, CL_ADAPTER_D3D9EX_KHR,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10, 16,
|
||||
512, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_X8B8G8R8,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -954,8 +953,8 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
16, 512, CL_ADAPTER_D3D9EX_KHR,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10, 16,
|
||||
512, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_X8B8G8R8,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
@@ -964,7 +963,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
512, 16, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_A8R8G8B8,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
@@ -975,7 +974,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
512, 16, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_A8R8G8B8,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
@@ -985,7 +984,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
256, 256, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_X8R8G8B8,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
@@ -996,7 +995,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
256, 256, CL_ADAPTER_D3D9EX_KHR,
|
||||
SURFACE_FORMAT_X8R8G8B8,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
@@ -1008,8 +1007,8 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
|
||||
// DXVA
|
||||
|
||||
if (other_data_types<cl_float>(deviceID, context, queue, num_elements, 10,
|
||||
64, 256, CL_ADAPTER_DXVA_KHR,
|
||||
if (other_data_types<cl_float>(device, context, queue, num_elements, 10, 64,
|
||||
256, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_R32F, SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
{
|
||||
@@ -1017,8 +1016,8 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_float>(deviceID, context, queue, num_elements, 10,
|
||||
64, 256, CL_ADAPTER_DXVA_KHR,
|
||||
if (other_data_types<cl_float>(device, context, queue, num_elements, 10, 64,
|
||||
256, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_R32F, SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
{
|
||||
@@ -1026,25 +1025,25 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_half>(deviceID, context, queue, num_elements, 10,
|
||||
256, 128, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_R16F, SHARED_HANDLE_DISABLED)
|
||||
if (other_data_types<cl_half>(device, context, queue, num_elements, 10, 256,
|
||||
128, CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_R16F,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
{
|
||||
log_error("\nTest case (DXVA, R16F, no shared handle) failed\n\n");
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_half>(deviceID, context, queue, num_elements, 10,
|
||||
256, 128, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_R16F, SHARED_HANDLE_ENABLED)
|
||||
if (other_data_types<cl_half>(device, context, queue, num_elements, 10, 256,
|
||||
128, CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_R16F,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
{
|
||||
log_error("\nTest case (DXVA, R16F, shared handle) failed\n\n");
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_ushort>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_ushort>(device, context, queue, num_elements, 10,
|
||||
512, 256, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_L16, SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -1053,7 +1052,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_ushort>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_ushort>(device, context, queue, num_elements, 10,
|
||||
512, 256, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_L16, SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
@@ -1062,7 +1061,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
256, 512, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_A8, SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -1071,7 +1070,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
256, 512, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_A8, SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
@@ -1080,7 +1079,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
1024, 32, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_L8, SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -1089,7 +1088,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
1024, 32, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_L8, SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
@@ -1099,7 +1098,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
}
|
||||
|
||||
if (other_data_types<cl_float>(
|
||||
deviceID, context, queue, num_elements, 10, 32, 1024,
|
||||
device, context, queue, num_elements, 10, 32, 1024,
|
||||
CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_G32R32F, SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
{
|
||||
@@ -1108,7 +1107,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
}
|
||||
|
||||
if (other_data_types<cl_float>(
|
||||
deviceID, context, queue, num_elements, 10, 32, 1024,
|
||||
device, context, queue, num_elements, 10, 32, 1024,
|
||||
CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_G32R32F, SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
{
|
||||
@@ -1117,7 +1116,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
}
|
||||
|
||||
if (other_data_types<cl_half>(
|
||||
deviceID, context, queue, num_elements, 10, 64, 64,
|
||||
device, context, queue, num_elements, 10, 64, 64,
|
||||
CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_G16R16F, SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
{
|
||||
@@ -1125,8 +1124,8 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_half>(deviceID, context, queue, num_elements, 10,
|
||||
64, 64, CL_ADAPTER_DXVA_KHR,
|
||||
if (other_data_types<cl_half>(device, context, queue, num_elements, 10, 64,
|
||||
64, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_G16R16F, SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
{
|
||||
@@ -1135,7 +1134,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
}
|
||||
|
||||
if (other_data_types<cl_ushort>(
|
||||
deviceID, context, queue, num_elements, 10, 256, 256,
|
||||
device, context, queue, num_elements, 10, 256, 256,
|
||||
CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_G16R16, SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
{
|
||||
@@ -1144,7 +1143,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
}
|
||||
|
||||
if (other_data_types<cl_ushort>(
|
||||
deviceID, context, queue, num_elements, 10, 256, 256,
|
||||
device, context, queue, num_elements, 10, 256, 256,
|
||||
CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_G16R16, SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
{
|
||||
@@ -1152,7 +1151,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
512, 128, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_A8L8, SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -1161,7 +1160,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
512, 128, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_A8L8, SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
@@ -1170,7 +1169,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_float>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_float>(device, context, queue, num_elements, 10,
|
||||
128, 512, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_A32B32G32R32F,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
@@ -1181,7 +1180,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_float>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_float>(device, context, queue, num_elements, 10,
|
||||
128, 512, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_A32B32G32R32F,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
@@ -1192,8 +1191,8 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_half>(deviceID, context, queue, num_elements, 10,
|
||||
128, 128, CL_ADAPTER_DXVA_KHR,
|
||||
if (other_data_types<cl_half>(device, context, queue, num_elements, 10, 128,
|
||||
128, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_A16B16G16R16F,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -1203,8 +1202,8 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_half>(deviceID, context, queue, num_elements, 10,
|
||||
128, 128, CL_ADAPTER_DXVA_KHR,
|
||||
if (other_data_types<cl_half>(device, context, queue, num_elements, 10, 128,
|
||||
128, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_A16B16G16R16F,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
@@ -1214,7 +1213,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_ushort>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_ushort>(device, context, queue, num_elements, 10,
|
||||
64, 128, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_A16B16G16R16,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
@@ -1225,7 +1224,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_ushort>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_ushort>(device, context, queue, num_elements, 10,
|
||||
64, 128, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_A16B16G16R16,
|
||||
SHARED_HANDLE_ENABLED)
|
||||
@@ -1235,7 +1234,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
128, 64, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_A8B8G8R8,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
@@ -1246,7 +1245,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(
|
||||
deviceID, context, queue, num_elements, 10, 128, 64,
|
||||
device, context, queue, num_elements, 10, 128, 64,
|
||||
CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_A8B8G8R8, SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
{
|
||||
@@ -1254,8 +1253,8 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
16, 512, CL_ADAPTER_DXVA_KHR,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10, 16,
|
||||
512, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_X8B8G8R8,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
!= 0)
|
||||
@@ -1265,7 +1264,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(
|
||||
deviceID, context, queue, num_elements, 10, 16, 512,
|
||||
device, context, queue, num_elements, 10, 16, 512,
|
||||
CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_X8B8G8R8, SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
{
|
||||
@@ -1273,7 +1272,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
512, 16, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_A8R8G8B8,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
@@ -1284,7 +1283,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(
|
||||
deviceID, context, queue, num_elements, 10, 512, 16,
|
||||
device, context, queue, num_elements, 10, 512, 16,
|
||||
CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_A8R8G8B8, SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
{
|
||||
@@ -1292,7 +1291,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(deviceID, context, queue, num_elements, 10,
|
||||
if (other_data_types<cl_uchar>(device, context, queue, num_elements, 10,
|
||||
256, 256, CL_ADAPTER_DXVA_KHR,
|
||||
SURFACE_FORMAT_X8R8G8B8,
|
||||
SHARED_HANDLE_DISABLED)
|
||||
@@ -1303,7 +1302,7 @@ int test_other_data_types(cl_device_id deviceID, cl_context context,
|
||||
}
|
||||
|
||||
if (other_data_types<cl_uchar>(
|
||||
deviceID, context, queue, num_elements, 10, 256, 256,
|
||||
device, context, queue, num_elements, 10, 256, 256,
|
||||
CL_ADAPTER_DXVA_KHR, SURFACE_FORMAT_X8R8G8B8, SHARED_HANDLE_ENABLED)
|
||||
!= 0)
|
||||
{
|
||||
|
||||
@@ -12,24 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "procs.h"
|
||||
#include "harness/testHarness.h"
|
||||
|
||||
test_definition test_list[] = {
|
||||
ADD_TEST_VERSION(external_semaphores_queries, Version(1, 2)),
|
||||
ADD_TEST_VERSION(external_semaphores_cross_context, Version(1, 2)),
|
||||
ADD_TEST_VERSION(external_semaphores_simple_1, Version(1, 2)),
|
||||
ADD_TEST_VERSION(external_semaphores_simple_2, Version(1, 2)),
|
||||
ADD_TEST_VERSION(external_semaphores_reuse, Version(1, 2)),
|
||||
ADD_TEST_VERSION(external_semaphores_cross_queues_ooo, Version(1, 2)),
|
||||
ADD_TEST_VERSION(external_semaphores_cross_queues_io, Version(1, 2)),
|
||||
ADD_TEST_VERSION(external_semaphores_cross_queues_io2, Version(1, 2)),
|
||||
ADD_TEST_VERSION(external_semaphores_multi_signal, Version(1, 2)),
|
||||
ADD_TEST_VERSION(external_semaphores_multi_wait, Version(1, 2)),
|
||||
ADD_TEST_VERSION(external_semaphores_import_export_fd, Version(1, 2)),
|
||||
};
|
||||
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
// A device may report the required properties of a queue that
|
||||
@@ -38,6 +22,8 @@ int main(int argc, const char *argv[])
|
||||
// for this in the tests themselves, rather than here, where we have a
|
||||
// device to query.
|
||||
const cl_command_queue_properties queue_properties = 0;
|
||||
return runTestHarnessWithCheck(argc, argv, ARRAY_SIZE(test_list), test_list,
|
||||
return runTestHarnessWithCheck(argc, argv,
|
||||
test_registry::getInstance().num_tests(),
|
||||
test_registry::getInstance().definitions(),
|
||||
false, queue_properties, nullptr);
|
||||
}
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
//
|
||||
// Copyright (c) 2022 The Khronos Group Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
#ifndef CL_KHR_EXTERNAL_SEMAPHORE_PROCS_H
|
||||
#define CL_KHR_EXTERNAL_SEMAPHORE_PROCS_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
|
||||
// Basic command-buffer tests
|
||||
|
||||
extern int test_external_semaphores_queries(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements);
|
||||
extern int test_external_semaphores_cross_context(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements);
|
||||
extern int test_external_semaphores_simple_1(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_external_semaphores_simple_2(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_external_semaphores_reuse(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_external_semaphores_cross_queues_ooo(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_external_semaphores_cross_queues_io(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_external_semaphores_cross_queues_io2(
|
||||
cl_device_id deviceID, cl_context context, cl_command_queue defaultQueue,
|
||||
int num_elements);
|
||||
extern int test_external_semaphores_multi_signal(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_external_semaphores_multi_wait(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_external_semaphores_import_export_fd(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
#endif // CL_KHR_EXTERNAL_SEMAPHORE_PROCS_H
|
||||
@@ -119,9 +119,7 @@ static cl_int get_device_semaphore_handle_types(
|
||||
}
|
||||
|
||||
// Confirm the semaphores can be successfully queried
|
||||
int test_external_semaphores_queries(cl_device_id device, cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(external_semaphores_queries, Version(1, 2))
|
||||
{
|
||||
REQUIRE_EXTENSION("cl_khr_semaphore");
|
||||
REQUIRE_EXTENSION("cl_khr_external_semaphore");
|
||||
@@ -199,10 +197,7 @@ int test_external_semaphores_queries(cl_device_id device, cl_context context,
|
||||
return TEST_PASS;
|
||||
}
|
||||
|
||||
int test_external_semaphores_cross_context(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(external_semaphores_cross_context, Version(1, 2))
|
||||
{
|
||||
REQUIRE_EXTENSION("cl_khr_external_semaphore");
|
||||
|
||||
@@ -325,9 +320,7 @@ int test_external_semaphores_cross_context(cl_device_id device,
|
||||
}
|
||||
|
||||
// Confirm that a signal followed by a wait will complete successfully
|
||||
int test_external_semaphores_simple_1(cl_device_id device, cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(external_semaphores_simple_1, Version(1, 2))
|
||||
{
|
||||
REQUIRE_EXTENSION("cl_khr_external_semaphore");
|
||||
|
||||
@@ -397,9 +390,7 @@ int test_external_semaphores_simple_1(cl_device_id device, cl_context context,
|
||||
|
||||
// Confirm that signal a semaphore with no event dependencies will not result
|
||||
// in an implicit dependency on everything previously submitted
|
||||
int test_external_semaphores_simple_2(cl_device_id device, cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(external_semaphores_simple_2, Version(1, 2))
|
||||
{
|
||||
REQUIRE_EXTENSION("cl_khr_external_semaphore");
|
||||
|
||||
@@ -501,9 +492,7 @@ int test_external_semaphores_simple_2(cl_device_id device, cl_context context,
|
||||
}
|
||||
|
||||
// Confirm that a semaphore can be reused multiple times
|
||||
int test_external_semaphores_reuse(cl_device_id device, cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(external_semaphores_reuse, Version(1, 2))
|
||||
{
|
||||
REQUIRE_EXTENSION("cl_khr_external_semaphore");
|
||||
|
||||
@@ -689,51 +678,42 @@ static int external_semaphore_cross_queue_helper(cl_device_id device,
|
||||
|
||||
|
||||
// Confirm that a semaphore works across different ooo queues
|
||||
int test_external_semaphores_cross_queues_ooo(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(external_semaphores_cross_queues_ooo, Version(1, 2))
|
||||
{
|
||||
cl_int err;
|
||||
|
||||
// Create ooo queues
|
||||
clCommandQueueWrapper queue_1 = clCreateCommandQueue(
|
||||
context, deviceID, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, &err);
|
||||
context, device, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, &err);
|
||||
test_error(err, "Could not create command queue");
|
||||
|
||||
clCommandQueueWrapper queue_2 = clCreateCommandQueue(
|
||||
context, deviceID, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, &err);
|
||||
context, device, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, &err);
|
||||
test_error(err, "Could not create command queue");
|
||||
|
||||
return external_semaphore_cross_queue_helper(deviceID, context, queue_1,
|
||||
return external_semaphore_cross_queue_helper(device, context, queue_1,
|
||||
queue_2);
|
||||
}
|
||||
|
||||
// Confirm that a semaphore works across different in-order queues
|
||||
int test_external_semaphores_cross_queues_io(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(external_semaphores_cross_queues_io, Version(1, 2))
|
||||
{
|
||||
cl_int err;
|
||||
|
||||
// Create in-order queues
|
||||
clCommandQueueWrapper queue_1 =
|
||||
clCreateCommandQueue(context, deviceID, 0, &err);
|
||||
clCreateCommandQueue(context, device, 0, &err);
|
||||
test_error(err, "Could not create command queue");
|
||||
|
||||
clCommandQueueWrapper queue_2 =
|
||||
clCreateCommandQueue(context, deviceID, 0, &err);
|
||||
clCreateCommandQueue(context, device, 0, &err);
|
||||
test_error(err, "Could not create command queue");
|
||||
|
||||
return external_semaphore_cross_queue_helper(deviceID, context, queue_1,
|
||||
return external_semaphore_cross_queue_helper(device, context, queue_1,
|
||||
queue_2);
|
||||
}
|
||||
|
||||
int test_external_semaphores_cross_queues_io2(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(external_semaphores_cross_queues_io2, Version(1, 2))
|
||||
{
|
||||
REQUIRE_EXTENSION("cl_khr_external_semaphore");
|
||||
|
||||
@@ -835,10 +815,7 @@ int test_external_semaphores_cross_queues_io2(cl_device_id device,
|
||||
}
|
||||
|
||||
// Confirm that we can signal multiple semaphores with one command
|
||||
int test_external_semaphores_multi_signal(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(external_semaphores_multi_signal, Version(1, 2))
|
||||
{
|
||||
REQUIRE_EXTENSION("cl_khr_external_semaphore");
|
||||
|
||||
@@ -920,9 +897,7 @@ int test_external_semaphores_multi_signal(cl_device_id device,
|
||||
}
|
||||
|
||||
// Confirm that we can wait for multiple semaphores with one command
|
||||
int test_external_semaphores_multi_wait(cl_device_id device, cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(external_semaphores_multi_wait, Version(1, 2))
|
||||
{
|
||||
REQUIRE_EXTENSION("cl_khr_external_semaphore");
|
||||
|
||||
|
||||
@@ -20,14 +20,11 @@
|
||||
|
||||
// Test it is possible to export a semaphore to a sync fd and import the same
|
||||
// sync fd to a new semaphore
|
||||
int test_external_semaphores_import_export_fd(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(external_semaphores_import_export_fd, Version(1, 2))
|
||||
{
|
||||
cl_int err = CL_SUCCESS;
|
||||
|
||||
if (!is_extension_available(deviceID, "cl_khr_external_semaphore"))
|
||||
if (!is_extension_available(device, "cl_khr_external_semaphore"))
|
||||
{
|
||||
log_info(
|
||||
"cl_khr_external_semaphore is not supported on this platoform. "
|
||||
@@ -35,7 +32,7 @@ int test_external_semaphores_import_export_fd(cl_device_id deviceID,
|
||||
return TEST_SKIPPED_ITSELF;
|
||||
}
|
||||
|
||||
if (!is_extension_available(deviceID, "cl_khr_external_semaphore_sync_fd"))
|
||||
if (!is_extension_available(device, "cl_khr_external_semaphore_sync_fd"))
|
||||
{
|
||||
log_info("cl_khr_external_semaphore_sync_fd is not supported on this "
|
||||
"platoform. Skipping test.\n");
|
||||
@@ -43,7 +40,7 @@ int test_external_semaphores_import_export_fd(cl_device_id deviceID,
|
||||
}
|
||||
|
||||
cl_command_queue_properties device_props = 0;
|
||||
err = clGetDeviceInfo(deviceID, CL_DEVICE_QUEUE_PROPERTIES,
|
||||
err = clGetDeviceInfo(device, CL_DEVICE_QUEUE_PROPERTIES,
|
||||
sizeof(device_props), &device_props, NULL);
|
||||
test_error(err, "clGetDeviceInfo for CL_DEVICE_QUEUE_PROPERTIES failed");
|
||||
|
||||
@@ -55,15 +52,15 @@ int test_external_semaphores_import_export_fd(cl_device_id deviceID,
|
||||
}
|
||||
|
||||
// Obtain pointers to semaphore's API
|
||||
GET_PFN(deviceID, clCreateSemaphoreWithPropertiesKHR);
|
||||
GET_PFN(deviceID, clEnqueueSignalSemaphoresKHR);
|
||||
GET_PFN(deviceID, clEnqueueWaitSemaphoresKHR);
|
||||
GET_PFN(deviceID, clGetSemaphoreHandleForTypeKHR);
|
||||
GET_PFN(deviceID, clReleaseSemaphoreKHR);
|
||||
GET_PFN(device, clCreateSemaphoreWithPropertiesKHR);
|
||||
GET_PFN(device, clEnqueueSignalSemaphoresKHR);
|
||||
GET_PFN(device, clEnqueueWaitSemaphoresKHR);
|
||||
GET_PFN(device, clGetSemaphoreHandleForTypeKHR);
|
||||
GET_PFN(device, clReleaseSemaphoreKHR);
|
||||
|
||||
// Create ooo queue
|
||||
clCommandQueueWrapper queue = clCreateCommandQueue(
|
||||
context, deviceID, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, &err);
|
||||
clCommandQueueWrapper test_queue = clCreateCommandQueue(
|
||||
context, device, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, &err);
|
||||
test_error(err, "Could not create command queue");
|
||||
|
||||
// Create semaphore
|
||||
@@ -84,14 +81,14 @@ int test_external_semaphores_import_export_fd(cl_device_id deviceID,
|
||||
|
||||
// Signal semaphore
|
||||
clEventWrapper signal_event;
|
||||
err = clEnqueueSignalSemaphoresKHR(queue, 1, &sema_1, nullptr, 0, nullptr,
|
||||
&signal_event);
|
||||
err = clEnqueueSignalSemaphoresKHR(test_queue, 1, &sema_1, nullptr, 0,
|
||||
nullptr, &signal_event);
|
||||
test_error(err, "Could not signal semaphore");
|
||||
|
||||
// Extract sync fd
|
||||
int handle = -1;
|
||||
size_t handle_size;
|
||||
err = clGetSemaphoreHandleForTypeKHR(sema_1, deviceID,
|
||||
err = clGetSemaphoreHandleForTypeKHR(sema_1, device,
|
||||
CL_SEMAPHORE_HANDLE_SYNC_FD_KHR,
|
||||
sizeof(handle), &handle, &handle_size);
|
||||
test_error(err, "Could not extract semaphore handle");
|
||||
@@ -112,12 +109,12 @@ int test_external_semaphores_import_export_fd(cl_device_id deviceID,
|
||||
|
||||
// Wait semaphore
|
||||
clEventWrapper wait_event;
|
||||
err = clEnqueueWaitSemaphoresKHR(queue, 1, &sema_2, nullptr, 0, nullptr,
|
||||
&wait_event);
|
||||
err = clEnqueueWaitSemaphoresKHR(test_queue, 1, &sema_2, nullptr, 0,
|
||||
nullptr, &wait_event);
|
||||
test_error(err, "Could not wait semaphore");
|
||||
|
||||
// Finish
|
||||
err = clFinish(queue);
|
||||
err = clFinish(test_queue);
|
||||
test_error(err, "Could not finish queue");
|
||||
|
||||
// Check all events are completed
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "procs.h"
|
||||
#include "harness/typeWrappers.h"
|
||||
|
||||
namespace {
|
||||
@@ -173,22 +172,19 @@ int MakeAndRunTest(cl_device_id device, cl_context context,
|
||||
|
||||
}
|
||||
|
||||
int test_device_scope(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(device_scope)
|
||||
{
|
||||
return MakeAndRunTest(device, context, queue,
|
||||
CL_DEVICE_KERNEL_CLOCK_SCOPE_DEVICE_KHR);
|
||||
}
|
||||
|
||||
int test_workgroup_scope(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(workgroup_scope)
|
||||
{
|
||||
return MakeAndRunTest(device, context, queue,
|
||||
CL_DEVICE_KERNEL_CLOCK_SCOPE_WORK_GROUP_KHR);
|
||||
}
|
||||
|
||||
int test_subgroup_scope(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST(subgroup_scope)
|
||||
{
|
||||
return MakeAndRunTest(device, context, queue,
|
||||
CL_DEVICE_KERNEL_CLOCK_SCOPE_SUB_GROUP_KHR);
|
||||
|
||||
@@ -12,18 +12,10 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "procs.h"
|
||||
#include "harness/testHarness.h"
|
||||
|
||||
test_definition test_list[] = {
|
||||
ADD_TEST(device_scope),
|
||||
ADD_TEST(workgroup_scope),
|
||||
ADD_TEST(subgroup_scope),
|
||||
};
|
||||
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
return runTestHarness(argc, argv, ARRAY_SIZE(test_list), test_list, false,
|
||||
0);
|
||||
return runTestHarness(argc, argv, test_registry::getInstance().num_tests(),
|
||||
test_registry::getInstance().definitions(), false, 0);
|
||||
}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
// Copyright (c) 2024 The Khronos Group Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
#ifndef CL_KHR_KERNEL_CLOCK_PROCS_H
|
||||
#define CL_KHR_KERNEL_CLOCK_PROCS_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
|
||||
int test_device_scope(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
int test_workgroup_scope(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
int test_subgroup_scope(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
|
||||
#endif /*CL_KHR_KERNEL_CLOCK_PROCS_H*/
|
||||
@@ -13,71 +13,10 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "harness/compat.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <string.h>
|
||||
#include "procs.h"
|
||||
#include "harness/testHarness.h"
|
||||
|
||||
#if !defined(_WIN32)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
test_definition test_list[] = {
|
||||
ADD_TEST_VERSION(semaphores_simple_1, Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_simple_2, Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_reuse, Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_cross_queues_ooo, Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_cross_queues_io, Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_multi_signal, Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_multi_wait, Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_device_list_queries, Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_no_device_list_queries, Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_multi_device_context_queries, Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_ooo_ops_single_queue, Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_ooo_ops_cross_queue, Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_create_invalid_context, Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_create_invalid_property,
|
||||
Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_create_multi_device_property,
|
||||
Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_create_invalid_device, Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_create_import_invalid_device,
|
||||
Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_create_invalid_value, Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_create_invalid_operation,
|
||||
Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_get_info_invalid_semaphore,
|
||||
Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_get_info_invalid_value, Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_wait_invalid_command_queue,
|
||||
Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_wait_invalid_value, Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_wait_invalid_semaphore, Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_wait_invalid_context, Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_wait_invalid_event_wait_list,
|
||||
Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_wait_invalid_event_status,
|
||||
Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_signal_invalid_command_queue,
|
||||
Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_signal_invalid_value, Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_signal_invalid_semaphore,
|
||||
Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_signal_invalid_context, Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_signal_invalid_event_wait_list,
|
||||
Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_signal_invalid_event_status,
|
||||
Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_release, Version(1, 2)),
|
||||
ADD_TEST_VERSION(semaphores_negative_retain, Version(1, 2)),
|
||||
};
|
||||
|
||||
const int test_num = ARRAY_SIZE(test_list);
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
return runTestHarness(argc, argv, test_num, test_list, false, 0);
|
||||
return runTestHarness(argc, argv, test_registry::getInstance().num_tests(),
|
||||
test_registry::getInstance().definitions(), false, 0);
|
||||
}
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
//
|
||||
// Copyright (c) 2023 The Khronos Group Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
#include "harness/errorHelpers.h"
|
||||
#include "harness/kernelHelpers.h"
|
||||
#include "harness/typeWrappers.h"
|
||||
#include "harness/clImageHelper.h"
|
||||
#include "harness/imageHelpers.h"
|
||||
|
||||
extern int test_semaphores_simple_1(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_semaphores_simple_2(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_semaphores_reuse(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_semaphores_cross_queues_ooo(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_cross_queues_io(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_multi_signal(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_multi_wait(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
extern int test_semaphores_device_list_queries(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_no_device_list_queries(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_multi_device_context_queries(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_import_export_fd(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_create_invalid_context(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_create_invalid_property(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_create_multi_device_property(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_create_invalid_device(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_create_import_invalid_device(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_create_invalid_value(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_create_invalid_operation(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_get_info_invalid_semaphore(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_get_info_invalid_value(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_wait_invalid_command_queue(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_wait_invalid_value(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_wait_invalid_semaphore(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_wait_invalid_context(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_wait_invalid_event_wait_list(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_wait_invalid_event_status(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_signal_invalid_command_queue(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_signal_invalid_value(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_signal_invalid_semaphore(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_signal_invalid_context(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_signal_invalid_event_wait_list(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_signal_invalid_event_status(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_release(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_negative_retain(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_ooo_ops_single_queue(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements);
|
||||
extern int test_semaphores_ooo_ops_cross_queue(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements);
|
||||
@@ -381,43 +381,36 @@ struct SemaphoreMultiWait : public SemaphoreTestBase
|
||||
} // anonymous namespace
|
||||
|
||||
// Confirm that a signal followed by a wait will complete successfully
|
||||
int test_semaphores_simple_1(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue defaultQueue, int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_simple_1, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<SimpleSemaphore1>(deviceID, context, defaultQueue,
|
||||
return MakeAndRunTest<SimpleSemaphore1>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
// Confirm that signal a semaphore with no event dependencies will not result
|
||||
// in an implicit dependency on everything previously submitted
|
||||
int test_semaphores_simple_2(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue defaultQueue, int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_simple_2, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<SimpleSemaphore2>(deviceID, context, defaultQueue,
|
||||
return MakeAndRunTest<SimpleSemaphore2>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
// Confirm that a semaphore can be reused multiple times
|
||||
int test_semaphores_reuse(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue defaultQueue, int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_reuse, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<SemaphoreReuse>(deviceID, context, defaultQueue,
|
||||
num_elements);
|
||||
return MakeAndRunTest<SemaphoreReuse>(device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
// Confirm that we can signal multiple semaphores with one command
|
||||
int test_semaphores_multi_signal(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_multi_signal, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<SemaphoreMultiSignal>(deviceID, context, defaultQueue,
|
||||
return MakeAndRunTest<SemaphoreMultiSignal>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
// Confirm that we can wait for multiple semaphores with one command
|
||||
int test_semaphores_multi_wait(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue defaultQueue, int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_multi_wait, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<SemaphoreMultiWait>(deviceID, context, defaultQueue,
|
||||
return MakeAndRunTest<SemaphoreMultiWait>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
@@ -312,41 +312,31 @@ struct SemaphoreOutOfOrderOps : public SemaphoreTestBase
|
||||
} // anonymous namespace
|
||||
|
||||
// Confirm that a semaphore works across different ooo queues
|
||||
int test_semaphores_cross_queues_ooo(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_cross_queues_ooo, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<SemaphoreCrossQueue<false>>(
|
||||
deviceID, context, defaultQueue, num_elements);
|
||||
return MakeAndRunTest<SemaphoreCrossQueue<false>>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
// Confirm that a semaphore works across different in-order queues
|
||||
int test_semaphores_cross_queues_io(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_cross_queues_io, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<SemaphoreCrossQueue<true>>(
|
||||
deviceID, context, defaultQueue, num_elements);
|
||||
return MakeAndRunTest<SemaphoreCrossQueue<true>>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
// Confirm that we can synchronize signal/wait commands in single out-of-order
|
||||
// queue
|
||||
int test_semaphores_ooo_ops_single_queue(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_ooo_ops_single_queue, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<SemaphoreOutOfOrderOps<true>>(
|
||||
deviceID, context, defaultQueue, num_elements);
|
||||
return MakeAndRunTest<SemaphoreOutOfOrderOps<true>>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
// Confirm that we can synchronize signal/wait commands across two out-of-order
|
||||
// queues
|
||||
int test_semaphores_ooo_ops_cross_queue(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_ooo_ops_cross_queue, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<SemaphoreOutOfOrderOps<false>>(
|
||||
deviceID, context, defaultQueue, num_elements);
|
||||
return MakeAndRunTest<SemaphoreOutOfOrderOps<false>>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
@@ -679,10 +679,7 @@ struct CreateInvalidOperation : public SemaphoreTestBase
|
||||
|
||||
// Confirm that creation semaphore with nullptr context would return
|
||||
// CL_INVALID_CONTEXT
|
||||
int test_semaphores_negative_create_invalid_context(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_create_invalid_context, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<CreateInvalidContext>(device, context, queue,
|
||||
num_elements);
|
||||
@@ -690,10 +687,8 @@ int test_semaphores_negative_create_invalid_context(cl_device_id device,
|
||||
|
||||
// Confirm that creation semaphore with invalid properties return
|
||||
// CL_INVALID_PROPERTY
|
||||
int test_semaphores_negative_create_invalid_property(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_create_invalid_property,
|
||||
Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<CreateInvalidProperty>(device, context, queue,
|
||||
num_elements);
|
||||
@@ -701,9 +696,8 @@ int test_semaphores_negative_create_invalid_property(cl_device_id device,
|
||||
|
||||
// Confirm that creation semaphore with multi device property return
|
||||
// CL_INVALID_PROPERTY
|
||||
int test_semaphores_negative_create_multi_device_property(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_create_multi_device_property,
|
||||
Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<CreateInvalidMultiDeviceProperty>(
|
||||
device, context, queue, num_elements);
|
||||
@@ -711,10 +705,7 @@ int test_semaphores_negative_create_multi_device_property(
|
||||
|
||||
// Confirm that creation semaphore with invalid device(s) return
|
||||
// CL_INVALID_DEVICE
|
||||
int test_semaphores_negative_create_invalid_device(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_create_invalid_device, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<CreateInvalidDevice>(device, context, queue,
|
||||
num_elements);
|
||||
@@ -722,9 +713,8 @@ int test_semaphores_negative_create_invalid_device(cl_device_id device,
|
||||
|
||||
// Confirm that creation semaphore with invalid device(s) return
|
||||
// CL_INVALID_DEVICE
|
||||
int test_semaphores_negative_create_import_invalid_device(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_create_import_invalid_device,
|
||||
Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<CreateImportExternalWithInvalidDevice>(
|
||||
device, context, queue, num_elements);
|
||||
@@ -732,10 +722,7 @@ int test_semaphores_negative_create_import_invalid_device(
|
||||
|
||||
// Confirm that creation semaphore with invalid props values return
|
||||
// CL_INVALID_VALUE
|
||||
int test_semaphores_negative_create_invalid_value(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_create_invalid_value, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<CreateInvalidValue>(device, context, queue,
|
||||
num_elements);
|
||||
@@ -743,10 +730,8 @@ int test_semaphores_negative_create_invalid_value(cl_device_id device,
|
||||
|
||||
// Confirm that creation semaphore with invalid props values return
|
||||
// CL_INVALID_VALUE
|
||||
int test_semaphores_negative_create_invalid_operation(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_create_invalid_operation,
|
||||
Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<CreateInvalidOperation>(device, context, queue,
|
||||
num_elements);
|
||||
|
||||
@@ -113,19 +113,14 @@ struct GetInfoInvalidValue : public SemaphoreTestBase
|
||||
|
||||
}
|
||||
|
||||
int test_semaphores_negative_get_info_invalid_semaphore(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_get_info_invalid_semaphore,
|
||||
Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<GetInfoInvalidSemaphore>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
int test_semaphores_negative_get_info_invalid_value(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_get_info_invalid_value, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<GetInfoInvalidValue>(device, context, queue,
|
||||
num_elements);
|
||||
|
||||
@@ -76,15 +76,13 @@ struct RetainInvalidSemaphore : public SemaphoreTestBase
|
||||
|
||||
}
|
||||
|
||||
int test_semaphores_negative_release(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_release, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<ReleaseInvalidSemaphore>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
int test_semaphores_negative_retain(cl_device_id device, cl_context context,
|
||||
cl_command_queue queue, int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_retain, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<RetainInvalidSemaphore>(device, context, queue,
|
||||
num_elements);
|
||||
|
||||
@@ -494,106 +494,80 @@ template <RunMode mode> struct InvalidEventStatus : public SemaphoreTestBase
|
||||
|
||||
}
|
||||
|
||||
int test_semaphores_negative_wait_invalid_command_queue(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_wait_invalid_command_queue,
|
||||
Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<InvalidCommandQueue<RunMode::RM_WAIT>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_semaphores_negative_wait_invalid_value(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_wait_invalid_value, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<InvalidValue<RunMode::RM_WAIT>>(device, context,
|
||||
queue, num_elements);
|
||||
}
|
||||
|
||||
int test_semaphores_negative_wait_invalid_semaphore(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_wait_invalid_semaphore, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<InvalidSemaphore<RunMode::RM_WAIT>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_semaphores_negative_wait_invalid_context(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_wait_invalid_context, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<InvalidContext<RunMode::RM_WAIT>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_semaphores_negative_wait_invalid_event_wait_list(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_wait_invalid_event_wait_list,
|
||||
Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<InvalidEventWaitList<RunMode::RM_WAIT>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_semaphores_negative_wait_invalid_event_status(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_wait_invalid_event_status,
|
||||
Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<InvalidEventStatus<RunMode::RM_WAIT>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_semaphores_negative_signal_invalid_command_queue(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_signal_invalid_command_queue,
|
||||
Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<InvalidCommandQueue<RunMode::RM_SIGNAL>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_semaphores_negative_signal_invalid_value(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_signal_invalid_value, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<InvalidValue<RunMode::RM_SIGNAL>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_semaphores_negative_signal_invalid_semaphore(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_signal_invalid_semaphore,
|
||||
Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<InvalidSemaphore<RunMode::RM_SIGNAL>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_semaphores_negative_signal_invalid_context(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_signal_invalid_context, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<InvalidContext<RunMode::RM_SIGNAL>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_semaphores_negative_signal_invalid_event_wait_list(
|
||||
cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_signal_invalid_event_wait_list,
|
||||
Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<InvalidEventWaitList<RunMode::RM_SIGNAL>>(
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
int test_semaphores_negative_signal_invalid_event_status(cl_device_id device,
|
||||
cl_context context,
|
||||
cl_command_queue queue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_negative_signal_invalid_event_status,
|
||||
Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<InvalidEventStatus<RunMode::RM_SIGNAL>>(
|
||||
device, context, queue, num_elements);
|
||||
|
||||
@@ -255,32 +255,23 @@ struct SemaphoreMultiDeviceContextQueries : public SemaphoreTestBase
|
||||
} // anonymous namespace
|
||||
|
||||
// Confirm the semaphore with device list can be successfully queried
|
||||
int test_semaphores_device_list_queries(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_device_list_queries, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<SemaphoreWithDeviceListQueries>(
|
||||
deviceID, context, defaultQueue, num_elements);
|
||||
return MakeAndRunTest<SemaphoreWithDeviceListQueries>(device, context,
|
||||
queue, num_elements);
|
||||
}
|
||||
|
||||
// Confirm the semaphore without device list can be successfully queried
|
||||
int test_semaphores_no_device_list_queries(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_no_device_list_queries, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<SemaphoreNoDeviceListQueries>(
|
||||
deviceID, context, defaultQueue, num_elements);
|
||||
return MakeAndRunTest<SemaphoreNoDeviceListQueries>(device, context, queue,
|
||||
num_elements);
|
||||
}
|
||||
|
||||
// Confirm the semaphore created with multi-device context can be successfully
|
||||
// queried
|
||||
int test_semaphores_multi_device_context_queries(cl_device_id deviceID,
|
||||
cl_context context,
|
||||
cl_command_queue defaultQueue,
|
||||
int num_elements)
|
||||
REGISTER_TEST_VERSION(semaphores_multi_device_context_queries, Version(1, 2))
|
||||
{
|
||||
return MakeAndRunTest<SemaphoreMultiDeviceContextQueries>(
|
||||
deviceID, context, defaultQueue, num_elements);
|
||||
device, context, queue, num_elements);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user