mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-20 06:29:02 +00:00
The maintenance of the conformance tests is moving to Github. This commit contains all the changes that have been done in Gitlab since the first public release of the conformance tests. Signed-off-by: Kevin Petit <kevin.petit@arm.com>
69 lines
2.5 KiB
C
69 lines
2.5 KiB
C
//
|
|
// 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
|
|
//
|
|
// 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 _testBase_h
|
|
#define _testBase_h
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <math.h>
|
|
#include <string.h>
|
|
|
|
#if !defined(_WIN32)
|
|
#include <stdbool.h>
|
|
#endif
|
|
|
|
#include <sys/types.h>
|
|
#include <sys/stat.h>
|
|
|
|
#if !defined (__APPLE__)
|
|
#include <CL/cl.h>
|
|
#include "../../test_common/gl/gl_headers.h"
|
|
#include <CL/cl_gl.h>
|
|
#else
|
|
#include "../../test_common/gl/gl_headers.h"
|
|
#endif
|
|
|
|
#include "../../test_common/harness/errorHelpers.h"
|
|
#include "../../test_common/harness/kernelHelpers.h"
|
|
#include "../../test_common/harness/threadTesting.h"
|
|
#include "../../test_common/harness/typeWrappers.h"
|
|
#include "../../test_common/harness/conversions.h"
|
|
#include "../../test_common/harness/mt19937.h"
|
|
|
|
#include "../../test_common/gl/helpers.h"
|
|
#include "../images/image_helpers.h"
|
|
|
|
extern const char *get_kernel_suffix( cl_image_format *format );
|
|
extern const char *get_write_conversion( cl_image_format *format, ExplicitType type);
|
|
extern ExplicitType get_read_kernel_type( cl_image_format *format );
|
|
extern ExplicitType get_write_kernel_type( cl_image_format *format );
|
|
|
|
extern char * convert_to_expected( void * inputBuffer, size_t numPixels, ExplicitType inType, ExplicitType outType );
|
|
extern int validate_integer_results( void *expectedResults, void *actualResults, size_t width, size_t height, size_t typeSize );
|
|
extern int validate_integer_results( void *expectedResults, void *actualResults, size_t width, size_t height, size_t depth, size_t typeSize );
|
|
extern int validate_float_results( void *expectedResults, void *actualResults, size_t width, size_t height );
|
|
extern int validate_float_results( void *expectedResults, void *actualResults, size_t width, size_t height, size_t depth );
|
|
|
|
extern int CheckGLObjectInfo(cl_mem mem, cl_gl_object_type expected_cl_gl_type, GLuint expected_gl_name,
|
|
GLenum expected_cl_gl_texture_target, GLint expected_cl_gl_mipmap_level);
|
|
|
|
extern bool CheckGLIntegerExtensionSupport();
|
|
|
|
#endif // _testBase_h
|
|
|
|
|
|
|