mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-21 06:49:02 +00:00
* Fixes issue #497 - Image tests from master branch on OCL 1.2 device * Fixes issue #497 - use get_device_cl_version
This commit is contained in:
committed by
Kévin Petit
parent
841123040e
commit
daafdac555
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// Copyright (c) 2017 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
|
||||
@@ -20,7 +20,7 @@ extern cl_addressing_mode gAddressModeToUse;
|
||||
extern int gTypesToTest;
|
||||
extern int gNormalizedModeToUse;
|
||||
extern cl_channel_type gChannelTypeToUse;
|
||||
|
||||
extern bool gDeviceLt20;
|
||||
|
||||
extern bool gDebugTrace;
|
||||
|
||||
@@ -199,14 +199,19 @@ int test_image_type( cl_device_id device, cl_context context, cl_command_queue q
|
||||
int test_image_set( cl_device_id device, cl_context context, cl_command_queue queue, cl_mem_object_type imageType )
|
||||
{
|
||||
int version_check;
|
||||
if ((version_check = check_opencl_version(device,1,2))) {
|
||||
switch (imageType) {
|
||||
case CL_MEM_OBJECT_IMAGE1D:
|
||||
test_missing_feature(version_check, "image_1D");
|
||||
case CL_MEM_OBJECT_IMAGE1D_ARRAY:
|
||||
test_missing_feature(version_check, "image_1D_array");
|
||||
case CL_MEM_OBJECT_IMAGE2D_ARRAY:
|
||||
test_missing_feature(version_check, "image_2D_array");
|
||||
auto version = get_device_cl_version(device);
|
||||
if (version < Version(2, 0)) {
|
||||
gDeviceLt20 = true;
|
||||
}
|
||||
|
||||
if ((version_check = check_opencl_version(device,1,2))) {
|
||||
switch (imageType) {
|
||||
case CL_MEM_OBJECT_IMAGE1D:
|
||||
test_missing_feature(version_check, "image_1D");
|
||||
case CL_MEM_OBJECT_IMAGE1D_ARRAY:
|
||||
test_missing_feature(version_check, "image_1D_array");
|
||||
case CL_MEM_OBJECT_IMAGE2D_ARRAY:
|
||||
test_missing_feature(version_check, "image_2D_array");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user